hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k โ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 โ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 โ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k โ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 โ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 โ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k โ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 โ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 โ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fec502d06e7f6b4c2323778a4f480e3ca87b83f7 | 243 | py | Python | appointment_booking/appointment_booking/doctype/visitor_appointment/tasks.py | smarty-india/appointment_booking | 781b8883b749d78d543b21f39f9c1a12f16033ae | [
"MIT"
] | 1 | 2021-02-10T05:13:29.000Z | 2021-02-10T05:13:29.000Z | appointment_booking/appointment_booking/doctype/visitor_appointment/tasks.py | smarty-india/appointment_booking | 781b8883b749d78d543b21f39f9c1a12f16033ae | [
"MIT"
] | null | null | null | appointment_booking/appointment_booking/doctype/visitor_appointment/tasks.py | smarty-india/appointment_booking | 781b8883b749d78d543b21f39f9c1a12f16033ae | [
"MIT"
] | 7 | 2020-09-23T13:10:29.000Z | 2021-12-28T19:03:34.000Z | import frappe
def set_appointment_as_pending():
frappe.db.sql("""update `tabVisitor Appointment` set `status`='Pending'
where appointment_date is not null
and appointment_date < CURDATE()
and `status` not in ('Closed', 'Cancelled')""") | 34.714286 | 72 | 0.740741 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 178 | 0.73251 |
fec6c828f7c2c56e87c8344597efe1d8c44178c3 | 986 | py | Python | hood/urls.py | virginiah894/Hood-alert | 9c00ca7e4bec3d8c46ff4b9b74f2f770f1c60873 | [
"MIT"
] | 1 | 2020-03-10T18:01:51.000Z | 2020-03-10T18:01:51.000Z | hood/urls.py | virginiah894/Hood-alert | 9c00ca7e4bec3d8c46ff4b9b74f2f770f1c60873 | [
"MIT"
] | 4 | 2020-06-06T01:09:13.000Z | 2021-09-08T01:36:28.000Z | hood/urls.py | virginiah894/Hood-alert | 9c00ca7e4bec3d8c46ff4b9b74f2f770f1c60873 | [
"MIT"
] | null | null | null | from django.urls import path , include
from . import views
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
path('', views.home,name='home'),
path('profile/', views.profile , name = 'profile'),
path('update_profile/',views.update_profile,name='update'),
... | 30.8125 | 81 | 0.684584 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 248 | 0.251521 |
fec70c2989068076b5623aeccec1da14a757918e | 962 | py | Python | base/client/TargetTracker.py | marlamade/generals-bot | b485e416a2c4fc307e7d015ecdb70e278c4c1417 | [
"MIT"
] | null | null | null | base/client/TargetTracker.py | marlamade/generals-bot | b485e416a2c4fc307e7d015ecdb70e278c4c1417 | [
"MIT"
] | null | null | null | base/client/TargetTracker.py | marlamade/generals-bot | b485e416a2c4fc307e7d015ecdb70e278c4c1417 | [
"MIT"
] | null | null | null | from typing import List
from .tile import Tile
class TargetTracker(list):
"""
Track the targets that might be good to attack/explore
"""
def __init__(self, *args, **kwargs):
list.__init__(self, *args, **kwargs)
self.turn_last_updated: int = 0
def update_list(self, target_list: Li... | 29.151515 | 92 | 0.591476 | 910 | 0.945946 | 0 | 0 | 0 | 0 | 0 | 0 | 194 | 0.201663 |
fec8bbb3f41ea8513300db1174bf26c5ac72fcf6 | 7,546 | py | Python | chatbrick/brick/shortener.py | BluehackRano/cb-wh | ecf11100ad83df71eac9d56f6abbd59ceeda9d83 | [
"MIT"
] | null | null | null | chatbrick/brick/shortener.py | BluehackRano/cb-wh | ecf11100ad83df71eac9d56f6abbd59ceeda9d83 | [
"MIT"
] | null | null | null | chatbrick/brick/shortener.py | BluehackRano/cb-wh | ecf11100ad83df71eac9d56f6abbd59ceeda9d83 | [
"MIT"
] | 1 | 2019-03-05T06:50:11.000Z | 2019-03-05T06:50:11.000Z | import logging
import time
import blueforge.apis.telegram as tg
import requests
import urllib.parse
import json
from blueforge.apis.facebook import Message, ImageAttachment, QuickReply, QuickReplyTextItem, TemplateAttachment, \
GenericTemplate, Element, PostBackButton, ButtonTemplate, UrlButton
logger = logging.g... | 37.542289 | 115 | 0.373178 | 7,402 | 0.945097 | 0 | 0 | 492 | 0.062819 | 7,250 | 0.925689 | 1,974 | 0.252043 |
fec8fbc55d1af1209c9e7e098a82c13f771956eb | 1,195 | py | Python | ask/qa/models.py | nikitabray/web | ef2e1a6ed2e917b0398622c488be2f222742b882 | [
"Unlicense"
] | null | null | null | ask/qa/models.py | nikitabray/web | ef2e1a6ed2e917b0398622c488be2f222742b882 | [
"Unlicense"
] | null | null | null | ask/qa/models.py | nikitabray/web | ef2e1a6ed2e917b0398622c488be2f222742b882 | [
"Unlicense"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
from django.urls import reverse
# Create your models here.
class QuestionManager(models.Manager):
def new(self):
return self.order_by('-id')
def popular(self):
return self.order_by('-rating')
class Question(models.Model... | 31.447368 | 103 | 0.708787 | 1,056 | 0.883682 | 0 | 0 | 0 | 0 | 0 | 0 | 126 | 0.105439 |
fec96362f67167dcf46b5bbb0c6f46d9d1526eeb | 368 | py | Python | 6/max_average_subarray1.py | IronCore864/leetcode | a62a4cdde9814ae48997176debcaad537f7ad01f | [
"Apache-2.0"
] | 4 | 2018-03-07T02:56:03.000Z | 2021-06-15T05:43:31.000Z | 6/max_average_subarray1.py | IronCore864/leetcode | a62a4cdde9814ae48997176debcaad537f7ad01f | [
"Apache-2.0"
] | null | null | null | 6/max_average_subarray1.py | IronCore864/leetcode | a62a4cdde9814ae48997176debcaad537f7ad01f | [
"Apache-2.0"
] | 1 | 2021-09-02T12:05:15.000Z | 2021-09-02T12:05:15.000Z | class Solution:
def findMaxAverage(self, nums: List[int], k: int) -> float:
pre_sum = sum(nums[0:k])
max_sum = pre_sum
for i in range(len(nums)-k):
next_sum = pre_sum - nums[i] + nums[i + k]
if next_sum > max_sum:
max_sum = next_sum
pre_su... | 26.285714 | 63 | 0.516304 | 358 | 0.972826 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fec9f02854eb9eb4fafaedb66ec68d2f2a2ba154 | 152 | py | Python | meuCursoEmVideo/mundo1/ex008.py | FelipeSilveiraL/EstudoPython | 8dc6cb70415badd180a1375da68f9dc9cb8fc8df | [
"MIT"
] | null | null | null | meuCursoEmVideo/mundo1/ex008.py | FelipeSilveiraL/EstudoPython | 8dc6cb70415badd180a1375da68f9dc9cb8fc8df | [
"MIT"
] | null | null | null | meuCursoEmVideo/mundo1/ex008.py | FelipeSilveiraL/EstudoPython | 8dc6cb70415badd180a1375da68f9dc9cb8fc8df | [
"MIT"
] | null | null | null | n = float(input("informe um medida em metros: "));
cm = n * 100
mm = n * 1000
print('A medida {}M รฉ correspondente a {}Cm e {}Mm'.format(n, cm, mm)) | 21.714286 | 70 | 0.605263 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 77 | 0.503268 |
fecbabb08af60d46436a84bbcfcf8d984bfc2f0d | 301 | py | Python | import_descendants/test_example/__init__.py | ZumatechLtd/import-descendants | ad3dd65ae74dd98ae1eec68fad3b1fa775a5d74f | [
"Unlicense"
] | null | null | null | import_descendants/test_example/__init__.py | ZumatechLtd/import-descendants | ad3dd65ae74dd98ae1eec68fad3b1fa775a5d74f | [
"Unlicense"
] | null | null | null | import_descendants/test_example/__init__.py | ZumatechLtd/import-descendants | ad3dd65ae74dd98ae1eec68fad3b1fa775a5d74f | [
"Unlicense"
] | 1 | 2020-03-23T13:59:40.000Z | 2020-03-23T13:59:40.000Z | # -*- coding: utf-8 -*-
# (c) 2013 Bright Interactive Limited. All rights reserved.
# http://www.bright-interactive.com | info@bright-interactive.com
from import_descendants import import_descendants
import sys
this_module = sys.modules[__name__]
import_descendants(this_module, globals(), locals())
| 33.444444 | 65 | 0.774086 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 147 | 0.488372 |
feccebf8b7f5ab31a62544c1a696cbcf12f4d112 | 1,264 | py | Python | DelibeRating/DelibeRating/env/Lib/site-packages/tests/test_widgets.py | Severose/DelibeRating | 5d227f35c071477ce3fd6fbf3ab13a44d13f6e08 | [
"MIT"
] | 1 | 2018-11-01T15:05:12.000Z | 2018-11-01T15:05:12.000Z | DelibeRating/DelibeRating/env/Lib/site-packages/tests/test_widgets.py | Severose/DelibeRating | 5d227f35c071477ce3fd6fbf3ab13a44d13f6e08 | [
"MIT"
] | null | null | null | DelibeRating/DelibeRating/env/Lib/site-packages/tests/test_widgets.py | Severose/DelibeRating | 5d227f35c071477ce3fd6fbf3ab13a44d13f6e08 | [
"MIT"
] | null | null | null | import pytest
from tempus_dominus import widgets
def test_datepicker_format_localized(settings):
settings.TEMPUS_DOMINUS_LOCALIZE = True
widget = widgets.DatePicker()
assert widget.get_js_format() == 'L'
def test_datepicker_format_nonlocalized(settings):
settings.TEMPUS_DOMINUS_LOCALIZE = False
... | 28.088889 | 58 | 0.761867 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 58 | 0.045886 |
fece96dc896e75a634255768c6898114b3c6f1c0 | 9,568 | py | Python | maps/foliumMaps.py | selinerguncu/Yelp-Spatial-Analysis | befbcb927ef225bda9ffaea0fd41a88344f9693c | [
"MIT"
] | null | null | null | maps/foliumMaps.py | selinerguncu/Yelp-Spatial-Analysis | befbcb927ef225bda9ffaea0fd41a88344f9693c | [
"MIT"
] | null | null | null | maps/foliumMaps.py | selinerguncu/Yelp-Spatial-Analysis | befbcb927ef225bda9ffaea0fd41a88344f9693c | [
"MIT"
] | null | null | null | import folium
from folium import plugins
import numpy as np
import sqlite3 as sqlite
import os
import sys
import pandas as pd
#extract data from yelp DB and clean it:
DB_PATH = "/Users/selinerguncu/Desktop/PythonProjects/Fun Projects/Yelp/data/yelpCleanDB.sqlite"
conn = sqlite.connect(DB_PATH)
##################... | 44.502326 | 302 | 0.666074 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,264 | 0.654682 |
fecede72453f312f65abb3c7e2bbaa8b798ac96a | 352 | py | Python | telethon/client/telegramclient.py | chrizrobert/Telethon | 99711457213a2bb1a844830a3c57536c5fa9b1c2 | [
"MIT"
] | 1 | 2018-10-07T08:31:49.000Z | 2018-10-07T08:31:49.000Z | telethon/client/telegramclient.py | chrizrobert/Telethon | 99711457213a2bb1a844830a3c57536c5fa9b1c2 | [
"MIT"
] | null | null | null | telethon/client/telegramclient.py | chrizrobert/Telethon | 99711457213a2bb1a844830a3c57536c5fa9b1c2 | [
"MIT"
] | 1 | 2018-09-05T14:59:27.000Z | 2018-09-05T14:59:27.000Z | from . import (
UpdateMethods, AuthMethods, DownloadMethods, DialogMethods,
ChatMethods, MessageMethods, UploadMethods, MessageParseMethods,
UserMethods
)
class TelegramClient(
UpdateMethods, AuthMethods, DownloadMethods, DialogMethods,
ChatMethods, MessageMethods, UploadMethods, MessageParseMetho... | 25.142857 | 68 | 0.775568 | 182 | 0.517045 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fecf4c8aeffd0ce28d05065c07b1a272ca60037e | 1,529 | py | Python | great_expectations/data_context/data_context/explorer_data_context.py | andyjessen/great_expectations | 74f7f2aa7b51144f34156ed49490dae4edaa5cb7 | [
"Apache-2.0"
] | null | null | null | great_expectations/data_context/data_context/explorer_data_context.py | andyjessen/great_expectations | 74f7f2aa7b51144f34156ed49490dae4edaa5cb7 | [
"Apache-2.0"
] | null | null | null | great_expectations/data_context/data_context/explorer_data_context.py | andyjessen/great_expectations | 74f7f2aa7b51144f34156ed49490dae4edaa5cb7 | [
"Apache-2.0"
] | null | null | null | import logging
from ruamel.yaml import YAML
from great_expectations.data_context.data_context.data_context import DataContext
logger = logging.getLogger(__name__)
yaml = YAML()
yaml.indent(mapping=2, sequence=4, offset=2)
yaml.default_flow_style = False
class ExplorerDataContext(DataContext):
def __init__(self... | 33.23913 | 119 | 0.688685 | 1,269 | 0.829954 | 0 | 0 | 0 | 0 | 0 | 0 | 519 | 0.339438 |
fecf532f1524b2d286c4ac2038b09f2f317636bc | 406 | py | Python | rio_cogeo/errors.py | vincentsarago/rio-cogeo | a758c7befa394568daa7d926c331b5489753a694 | [
"BSD-3-Clause"
] | 159 | 2019-02-12T18:22:30.000Z | 2022-03-23T18:49:47.000Z | rio_cogeo/errors.py | vincentsarago/rio-cogeo | a758c7befa394568daa7d926c331b5489753a694 | [
"BSD-3-Clause"
] | 121 | 2019-01-28T18:00:18.000Z | 2022-03-31T17:54:42.000Z | rio_cogeo/errors.py | vincentsarago/rio-cogeo | a758c7befa394568daa7d926c331b5489753a694 | [
"BSD-3-Clause"
] | 27 | 2019-02-12T23:52:33.000Z | 2022-03-07T14:40:24.000Z | """Rio-Cogeo Errors and Warnings."""
class LossyCompression(UserWarning):
"""Rio-cogeo module Lossy compression warning."""
class IncompatibleBlockRasterSize(UserWarning):
"""Rio-cogeo module incompatible raster block/size warning."""
class RioCogeoError(Exception):
"""Base exception class."""
class... | 22.555556 | 66 | 0.738916 | 357 | 0.87931 | 0 | 0 | 0 | 0 | 0 | 0 | 218 | 0.536946 |
fecfe168fd1f83e2b06ca1bb819712b3c0b0b0b9 | 293 | py | Python | src/songbook/console/_update.py | kipyin/- | 5d372c7d987e6a1da380197c1b990def0d240298 | [
"MIT"
] | 1 | 2021-01-03T10:40:28.000Z | 2021-01-03T10:40:28.000Z | src/songbook/console/_update.py | kipyin/- | 5d372c7d987e6a1da380197c1b990def0d240298 | [
"MIT"
] | null | null | null | src/songbook/console/_update.py | kipyin/- | 5d372c7d987e6a1da380197c1b990def0d240298 | [
"MIT"
] | 1 | 2021-01-03T10:40:29.000Z | 2021-01-03T10:40:29.000Z | import click
@click.group()
def update():
pass
@update.command("song")
def _update_song():
pass
@update.command("arrangement")
def _update_arrangement():
pass
@update.command("worship")
def _update_worship():
pass
@update.command("hymn")
def _update_hymn():
pass
| 10.851852 | 30 | 0.675768 | 0 | 0 | 0 | 0 | 265 | 0.904437 | 0 | 0 | 34 | 0.116041 |
fecfe7347f543cbcfbae4629f1a3340b7de24b39 | 1,367 | py | Python | util/rmcompile.py | likwoka/ak | e6ac14e202e5a0d8f1b57e3e1a5c5a1ed9ecc14b | [
"Apache-2.0"
] | null | null | null | util/rmcompile.py | likwoka/ak | e6ac14e202e5a0d8f1b57e3e1a5c5a1ed9ecc14b | [
"Apache-2.0"
] | null | null | null | util/rmcompile.py | likwoka/ak | e6ac14e202e5a0d8f1b57e3e1a5c5a1ed9ecc14b | [
"Apache-2.0"
] | null | null | null | '''
Copyright (c) Alex Li 2003. All rights reserved.
'''
__version__ = '0.1'
__file__ = 'rmcompile.py'
import os, getopt, sys
EXTLIST = ['.ptlc', '.pyc']
def remove(extlist, dirname, files):
for file in files:
(name, ext) = os.path.splitext(file)
if ext in extlist:
os.remove(os.p... | 21.030769 | 64 | 0.547184 | 83 | 0.060717 | 0 | 0 | 0 | 0 | 0 | 0 | 354 | 0.258961 |
fed030e5255f1c16fe14660b2bdc69ee621a5da4 | 706 | py | Python | app/integrations/opsgenie.py | cds-snc/sre-bot | b34cdaba357fccbcdbaac1e1ac70ebbe408d7316 | [
"MIT"
] | null | null | null | app/integrations/opsgenie.py | cds-snc/sre-bot | b34cdaba357fccbcdbaac1e1ac70ebbe408d7316 | [
"MIT"
] | 12 | 2022-02-21T18:57:07.000Z | 2022-03-31T03:06:48.000Z | app/integrations/opsgenie.py | cds-snc/sre-bot | b34cdaba357fccbcdbaac1e1ac70ebbe408d7316 | [
"MIT"
] | null | null | null | import json
import os
from urllib.request import Request, urlopen
OPSGENIE_KEY = os.getenv("OPSGENIE_KEY", None)
def get_on_call_users(schedule):
content = api_get_request(
f"https://api.opsgenie.com/v2/schedules/{schedule}/on-calls",
{"name": "GenieKey", "token": OPSGENIE_KEY},
)
try:
... | 28.24 | 81 | 0.651558 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 222 | 0.314448 |
fed05ac1dfedd9e75b62b9d7eec9b45bc5c84bcd | 366 | py | Python | observatorio/dados/migrations/0007_auto_20201007_1720.py | guerrasao/Observatorio-Socioeconomico-da-COVID-19 | 15457859092a41e539e57af6cc1bc875f3fbdf93 | [
"MIT"
] | null | null | null | observatorio/dados/migrations/0007_auto_20201007_1720.py | guerrasao/Observatorio-Socioeconomico-da-COVID-19 | 15457859092a41e539e57af6cc1bc875f3fbdf93 | [
"MIT"
] | null | null | null | observatorio/dados/migrations/0007_auto_20201007_1720.py | guerrasao/Observatorio-Socioeconomico-da-COVID-19 | 15457859092a41e539e57af6cc1bc875f3fbdf93 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.1 on 2020-10-07 20:20
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('dados', '0006_auto_20201007_1630'),
]
operations = [
migrations.AlterUniqueTogether(
name='variaveisgrafico',
unique_togethe... | 20.333333 | 54 | 0.612022 | 281 | 0.76776 | 0 | 0 | 0 | 0 | 0 | 0 | 116 | 0.31694 |
fed3744cb0d9a7b7d5b538e2e8bb1083ab7dd9b2 | 688 | py | Python | Part 1 - Data Preprocessing/data_preprocessing.py | Tatvam/Machine-Learning | a18d3f541d99a8fb0cfbe89df358a11d3121b4f5 | [
"MIT"
] | null | null | null | Part 1 - Data Preprocessing/data_preprocessing.py | Tatvam/Machine-Learning | a18d3f541d99a8fb0cfbe89df358a11d3121b4f5 | [
"MIT"
] | null | null | null | Part 1 - Data Preprocessing/data_preprocessing.py | Tatvam/Machine-Learning | a18d3f541d99a8fb0cfbe89df358a11d3121b4f5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Dec 8 15:15:29 2018
@author: tatvam
importing the libraries
"""
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# import the dataset
dataset = pd.read_csv("Data.csv")
X = dataset.iloc[:, :-1].values
Y = dataset.iloc[:, 3].value... | 22.933333 | 88 | 0.741279 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 378 | 0.549419 |
fed3cd8321c318f2dc707c9994a2ee0cad04c478 | 785 | py | Python | qiniu_ufop/management/commands/createproject.py | Xavier-Lam/qiniu-ufop | 02c6119c69637cb39e2b73a915e68b77afa07fe3 | [
"MIT"
] | 5 | 2019-06-10T12:53:41.000Z | 2020-12-06T02:57:37.000Z | qiniu_ufop/management/commands/createproject.py | Xavier-Lam/qiniu-ufop | 02c6119c69637cb39e2b73a915e68b77afa07fe3 | [
"MIT"
] | null | null | null | qiniu_ufop/management/commands/createproject.py | Xavier-Lam/qiniu-ufop | 02c6119c69637cb39e2b73a915e68b77afa07fe3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
from distutils.dir_util import copy_tree
from kombu.utils.objects import cached_property
import qiniu_ufop
from ..base import BaseCommand
class Command(BaseCommand):
"""ๅๅปบไธไธช้กน็ฎ"""
def execute(self, args, unknown):
src = os.pa... | 28.035714 | 75 | 0.657325 | 585 | 0.728518 | 0 | 0 | 0 | 0 | 0 | 0 | 114 | 0.141968 |
fed4560e0eada1a8875a46b508b9927cb620d08a | 8,991 | py | Python | jenkinsapi_tests/unittests/test_nodes.py | kkpattern/jenkinsapi | 6b0091c5f44e4473c0a3d5addbfdc416bc6515ca | [
"MIT"
] | 556 | 2016-07-27T03:42:48.000Z | 2022-03-31T15:05:19.000Z | jenkinsapi_tests/unittests/test_nodes.py | kkpattern/jenkinsapi | 6b0091c5f44e4473c0a3d5addbfdc416bc6515ca | [
"MIT"
] | 366 | 2016-07-24T02:51:45.000Z | 2022-03-24T17:02:45.000Z | jenkinsapi_tests/unittests/test_nodes.py | kkpattern/jenkinsapi | 6b0091c5f44e4473c0a3d5addbfdc416bc6515ca | [
"MIT"
] | 308 | 2016-08-01T03:35:45.000Z | 2022-03-31T01:06:57.000Z | import pytest
from jenkinsapi.jenkins import Jenkins
from jenkinsapi.nodes import Nodes
from jenkinsapi.node import Node
DATA0 = {
'assignedLabels': [{}],
'description': None,
'jobs': [],
'mode': 'NORMAL',
'nodeDescription': 'the master Jenkins node',
'nodeName': '',
'numExecutors': 2,
... | 30.686007 | 82 | 0.571015 | 0 | 0 | 0 | 0 | 446 | 0.049605 | 0 | 0 | 3,656 | 0.406629 |
fed6388f5baf349f9563436e423b3f0bfd27a9e9 | 790 | py | Python | message_gen/legacy/messages/ClientGetCloudHostResponse.py | zadjii/nebula | 50c4ec019c9f7eb15fe105a6c53a8a12880e281c | [
"MIT"
] | 2 | 2020-04-15T11:20:59.000Z | 2021-05-12T13:01:36.000Z | message_gen/legacy/messages/ClientGetCloudHostResponse.py | zadjii/nebula | 50c4ec019c9f7eb15fe105a6c53a8a12880e281c | [
"MIT"
] | 1 | 2018-06-05T04:48:56.000Z | 2018-06-05T04:48:56.000Z | message_gen/legacy/messages/ClientGetCloudHostResponse.py | zadjii/nebula | 50c4ec019c9f7eb15fe105a6c53a8a12880e281c | [
"MIT"
] | 1 | 2018-08-15T06:45:46.000Z | 2018-08-15T06:45:46.000Z | from messages.SessionMessage import SessionMessage
from msg_codes import CLIENT_GET_CLOUD_HOST_RESPONSE as CLIENT_GET_CLOUD_HOST_RESPONSE
__author__ = 'Mike'
class ClientGetCloudHostResponse(SessionMessage):
def __init__(self, session_id=None, cname=None, ip=None, port=None, wsport=None):
super(ClientGetC... | 34.347826 | 86 | 0.698734 | 629 | 0.796203 | 0 | 0 | 266 | 0.336709 | 0 | 0 | 31 | 0.039241 |
fed71aa40e24235555d670228f89196c28a60884 | 8,072 | py | Python | research/route_diversity/timeline_from_csv.py | jweckstr/journey-diversity-scripts | 7b754c5f47a77ee1d630a0b26d8ec5cf6be202ae | [
"MIT"
] | null | null | null | research/route_diversity/timeline_from_csv.py | jweckstr/journey-diversity-scripts | 7b754c5f47a77ee1d630a0b26d8ec5cf6be202ae | [
"MIT"
] | null | null | null | research/route_diversity/timeline_from_csv.py | jweckstr/journey-diversity-scripts | 7b754c5f47a77ee1d630a0b26d8ec5cf6be202ae | [
"MIT"
] | null | null | null | """
PSEUDOCODE:
Load csv to pandas
csv will be of form: city, event type, event name, year, theme_A, theme_B, theme_C...
City can contain multiple cities, separated by TBD?
Check min and max year
Open figure,
Deal with events in same year, offset a little bit?
For city in cities:tle
for event in events
"""
impor... | 35.559471 | 175 | 0.650768 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,577 | 0.319252 |
fed7cf7a07873e74fd5bc50796d61484b796fe97 | 2,012 | py | Python | bevm/db.py | sorawit/bevm | 850b2d64fc12dae92d9cdaf8b4c48b90cc0d05d6 | [
"MIT"
] | 1 | 2021-09-15T10:16:46.000Z | 2021-09-15T10:16:46.000Z | bevm/db.py | sorawit/bevm | 850b2d64fc12dae92d9cdaf8b4c48b90cc0d05d6 | [
"MIT"
] | null | null | null | bevm/db.py | sorawit/bevm | 850b2d64fc12dae92d9cdaf8b4c48b90cc0d05d6 | [
"MIT"
] | null | null | null | from eth.db.atomic import AtomicDB
from eth.db.backends.level import LevelDB
from eth.db.account import AccountDB
from rlp.sedes import big_endian_int
from bevm.block import Block
from bevm.action import rlp_decode_action
ACTION_COUNT = b'BEVM:ACTION_COUNT'
def block_key(blockno):
return 'BEVM:BLOCK_KEY_{}'.for... | 32.983607 | 77 | 0.700795 | 1,667 | 0.828529 | 0 | 0 | 175 | 0.086978 | 0 | 0 | 39 | 0.019384 |
fed896e00f41aed0c3e19962de5fce02825adb90 | 2,408 | py | Python | api/ops/tasks/detection/core/detectionTypes/valueThreshold.py | LeiSoft/CueObserve | cc5254df7d0cb817a8b3ec427f5cb54a1d420f7e | [
"Apache-2.0"
] | 149 | 2021-07-16T13:37:30.000Z | 2022-03-21T10:13:15.000Z | api/ops/tasks/detection/core/detectionTypes/valueThreshold.py | LeiSoft/CueObserve | cc5254df7d0cb817a8b3ec427f5cb54a1d420f7e | [
"Apache-2.0"
] | 61 | 2021-07-15T06:39:05.000Z | 2021-12-27T06:58:10.000Z | api/ops/tasks/detection/core/detectionTypes/valueThreshold.py | LeiSoft/CueObserve | cc5254df7d0cb817a8b3ec427f5cb54a1d420f7e | [
"Apache-2.0"
] | 22 | 2021-07-19T07:20:49.000Z | 2022-03-21T10:13:16.000Z | import dateutil.parser as dp
from dateutil.relativedelta import relativedelta
import pandas as pd, datetime as dt
def checkLatestAnomaly(df, operationCheckStr):
"""
Looks up latest anomaly in dataframe
"""
anomalies = df[df["anomaly"] == 15]
if anomalies.shape[0] > 0:
lastAnomalyRow = anom... | 35.411765 | 101 | 0.572674 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 815 | 0.338455 |
fed8e9ad56ccf5ea28b13fbec8dee05b0037dc77 | 343 | py | Python | src/chapter8/exercise6.py | group7BSE1/BSE-2021 | 2553b12e5fd5d1015af4746bcf84a8ee7c1cb8e0 | [
"MIT"
] | null | null | null | src/chapter8/exercise6.py | group7BSE1/BSE-2021 | 2553b12e5fd5d1015af4746bcf84a8ee7c1cb8e0 | [
"MIT"
] | null | null | null | src/chapter8/exercise6.py | group7BSE1/BSE-2021 | 2553b12e5fd5d1015af4746bcf84a8ee7c1cb8e0 | [
"MIT"
] | 1 | 2021-04-07T14:49:04.000Z | 2021-04-07T14:49:04.000Z | list = []
while True:
number = 0.0
input_num = input('Enter a number: ')
if input_num == 'done':
break
try:
number = float(input_num)
except:
print('Invalid input')
quit()
list.append(input_num)
if list:
print('Maximum: ', max(list) or None)
print('Minimum... | 22.866667 | 41 | 0.559767 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 61 | 0.177843 |
fed8fa9a87db15241481aa01020912d1d1d9aa17 | 91 | py | Python | client/const.py | math2001/nine43 | 7749dc63b9717a6ee4ddc1723d6c59e16046fc01 | [
"MIT"
] | null | null | null | client/const.py | math2001/nine43 | 7749dc63b9717a6ee4ddc1723d6c59e16046fc01 | [
"MIT"
] | 3 | 2019-04-27T06:34:34.000Z | 2019-04-27T21:29:31.000Z | client/const.py | math2001/nine43 | 7749dc63b9717a6ee4ddc1723d6c59e16046fc01 | [
"MIT"
] | null | null | null | MONO = "FiraMono-Medium"
PORT = 9999
ISSUES = "https://github.com/math2001/nine43/issues"
| 18.2 | 52 | 0.725275 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 60 | 0.659341 |
fed91e7ac94b5be8280a7f183dba3afc80ab32c6 | 484 | py | Python | zipencrypt/__init__.py | norcuni/zipencrypt | 897f03d05f5b2881e915ed346d0498f58abf3ac8 | [
"MIT"
] | 5 | 2018-06-05T18:57:10.000Z | 2020-12-04T10:08:31.000Z | zipencrypt/__init__.py | norcuni/zipencrypt | 897f03d05f5b2881e915ed346d0498f58abf3ac8 | [
"MIT"
] | 2 | 2018-11-07T02:53:40.000Z | 2019-10-30T20:48:40.000Z | zipencrypt/__init__.py | devthat/zipencrypt | 897f03d05f5b2881e915ed346d0498f58abf3ac8 | [
"MIT"
] | null | null | null | import sys
PY2 = sys.version_info[0] == 2
if PY2:
from .zipencrypt2 import ZipFile
from zipfile import BadZipfile, error, ZIP_STORED, ZIP_DEFLATED, \
is_zipfile, ZipInfo, PyZipFile, LargeZipFile
__all__ = ["BadZipfile", "error", "ZIP_STORED", "ZIP_DEFLATED",
"is_zipfile", "ZipInfo",... | 32.266667 | 79 | 0.692149 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 100 | 0.206612 |
fed9bd2808591485831ae3b90b08dc959af84228 | 19 | py | Python | deprecated/origin_stgcn_repo/feeder/__init__.py | fserracant/mmskeleton | 44008bdef3dd6354a17c220fac8bcd8cd08ed201 | [
"Apache-2.0"
] | 2,302 | 2018-01-23T11:18:30.000Z | 2022-03-31T12:24:55.000Z | deprecated/origin_stgcn_repo/feeder/__init__.py | fserracant/mmskeleton | 44008bdef3dd6354a17c220fac8bcd8cd08ed201 | [
"Apache-2.0"
] | 246 | 2019-08-24T15:36:11.000Z | 2022-03-23T06:57:02.000Z | deprecated/origin_stgcn_repo/feeder/__init__.py | fserracant/mmskeleton | 44008bdef3dd6354a17c220fac8bcd8cd08ed201 | [
"Apache-2.0"
] | 651 | 2018-01-24T00:56:54.000Z | 2022-03-25T23:42:53.000Z | from . import tools | 19 | 19 | 0.789474 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
feda36d66368a5ba3e059121a70717771426dc48 | 138 | py | Python | nifs/retrieve/rawdata/__init__.py | nifs-software/nifs-retrieve | 4ff9d70a1d2301d7b5762162586388ae67046ad2 | [
"MIT"
] | null | null | null | nifs/retrieve/rawdata/__init__.py | nifs-software/nifs-retrieve | 4ff9d70a1d2301d7b5762162586388ae67046ad2 | [
"MIT"
] | 2 | 2021-12-16T04:50:00.000Z | 2021-12-22T11:55:01.000Z | nifs/retrieve/rawdata/__init__.py | nifs-software/nifs-retrieve | 4ff9d70a1d2301d7b5762162586388ae67046ad2 | [
"MIT"
] | null | null | null | from .rawdata import RawData
from .timedata import TimeData
from .voltdata import VoltData
__all__ = ["RawData", "TimeData", "VoltData"]
| 23 | 45 | 0.768116 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 0.210145 |
fedb6c7eea105f52852855900c26c30796b4a06e | 5,654 | py | Python | preprocess/sketch_generation.py | code-gen/exploration | c83d79745df9566c5f1a82e581008e0984fcc319 | [
"MIT"
] | null | null | null | preprocess/sketch_generation.py | code-gen/exploration | c83d79745df9566c5f1a82e581008e0984fcc319 | [
"MIT"
] | 1 | 2019-05-11T14:49:58.000Z | 2019-05-24T15:02:54.000Z | preprocess/sketch_generation.py | code-gen/exploration | c83d79745df9566c5f1a82e581008e0984fcc319 | [
"MIT"
] | null | null | null | """
Sketch (similar to Coarse-to-Fine)
- keep Python keywords as is
- strip off arguments and variable names
- substitute tokens with types: `NUMBER`, `STRING`
- specialize `NAME` token:
- for functions: `FUNC#<num_args>`
# Examples
x = 1 if True else 0
NAME = NUMBER if True else NUMBER
result = SomeFunc(1,... | 29.447917 | 105 | 0.579413 | 4,466 | 0.789883 | 0 | 0 | 850 | 0.150336 | 0 | 0 | 1,363 | 0.241068 |
fedbf772bab9d4ac688fa0669b5207dce247b24c | 8,538 | py | Python | LPBv2/tests/game/test_player.py | TierynnB/LeaguePyBot | 2e96230b9dc24d185ddc0c6086d79f7d01e7a643 | [
"MIT"
] | 45 | 2020-11-28T04:45:45.000Z | 2022-03-31T05:53:37.000Z | LPBv2/tests/game/test_player.py | TierynnB/LeaguePyBot | 2e96230b9dc24d185ddc0c6086d79f7d01e7a643 | [
"MIT"
] | 13 | 2021-01-15T00:50:10.000Z | 2022-02-02T15:16:49.000Z | LPBv2/tests/game/test_player.py | TierynnB/LeaguePyBot | 2e96230b9dc24d185ddc0c6086d79f7d01e7a643 | [
"MIT"
] | 14 | 2020-12-21T10:03:31.000Z | 2021-11-22T04:03:03.000Z | import pytest
from LPBv2.common import (
InventoryItem,
PlayerInfo,
PlayerScore,
PlayerStats,
TeamMember,
MinimapZone,
merge_dicts,
)
from LPBv2.game import Player
update_data = {
"abilities": {
"E": {
"abilityLevel": 0,
"displayName": "\u9b42\u306e\u8a6... | 33.093023 | 103 | 0.613844 | 0 | 0 | 0 | 0 | 2,048 | 0.239869 | 1,869 | 0.218904 | 3,405 | 0.398805 |
fedcf036c6fb8965eea9548fe948c1a18ef9db31 | 785 | py | Python | seiketsu/users/schema.py | tychota/seiketsu | 2b5280365b9de44cd84ac65ed74981b30be5cc76 | [
"MIT"
] | null | null | null | seiketsu/users/schema.py | tychota/seiketsu | 2b5280365b9de44cd84ac65ed74981b30be5cc76 | [
"MIT"
] | null | null | null | seiketsu/users/schema.py | tychota/seiketsu | 2b5280365b9de44cd84ac65ed74981b30be5cc76 | [
"MIT"
] | null | null | null | # cookbook/ingredients/schema.py
import graphene
from graphene_django_extras import DjangoObjectField, DjangoFilterPaginateListField, LimitOffsetGraphqlPagination
from .types import UserType
from .mutations import UserSerializerMutation
from .subscriptions import UserSubscription
class Query(graphene.ObjectType):
... | 34.130435 | 113 | 0.831847 | 494 | 0.629299 | 0 | 0 | 0 | 0 | 0 | 0 | 51 | 0.064968 |
fedd8583c4097da76284324d87da760d236bb283 | 1,026 | py | Python | app/__init__.py | alineayumi/desafio-ton-API-REST | cf9f88adc4f7de6060f2c3f2c31147077c311ce9 | [
"MIT"
] | null | null | null | app/__init__.py | alineayumi/desafio-ton-API-REST | cf9f88adc4f7de6060f2c3f2c31147077c311ce9 | [
"MIT"
] | null | null | null | app/__init__.py | alineayumi/desafio-ton-API-REST | cf9f88adc4f7de6060f2c3f2c31147077c311ce9 | [
"MIT"
] | null | null | null | import os
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask.logging import default_handler
from flask_request_id_header.middleware import RequestID
from app.resources.encoders import CustomJSONEncoder
from app.resources.logger import formatter
from flask_jwt import JWT
db = SQLAlchemy()
def ... | 26.307692 | 86 | 0.789474 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 83 | 0.080897 |
fee0850f728247adf6624bff53382da94eff6965 | 1,199 | py | Python | tests/test_negate_with_undo.py | robobeaver6/hier_config | efd413ef709d462effe8bfd11ef0520c1d62eb33 | [
"MIT"
] | null | null | null | tests/test_negate_with_undo.py | robobeaver6/hier_config | efd413ef709d462effe8bfd11ef0520c1d62eb33 | [
"MIT"
] | null | null | null | tests/test_negate_with_undo.py | robobeaver6/hier_config | efd413ef709d462effe8bfd11ef0520c1d62eb33 | [
"MIT"
] | null | null | null | import unittest
import tempfile
import os
import yaml
import types
from hier_config import HConfig
from hier_config.host import Host
class TestNegateWithUndo(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.os = 'comware5'
cls.options_file = os.path.join(
os.path.dirname... | 30.74359 | 101 | 0.692244 | 1,001 | 0.834862 | 0 | 0 | 594 | 0.495413 | 0 | 0 | 230 | 0.191827 |
fee18a5b11572b38d902059c0db310b2cf42cd2d | 6,984 | py | Python | code/gauss_legendre.py | MarkusLohmayer/master-thesis-code | b107d1b582064daf9ad4414e1c9f332ef0be8660 | [
"MIT"
] | 1 | 2020-11-14T15:56:07.000Z | 2020-11-14T15:56:07.000Z | code/gauss_legendre.py | MarkusLohmayer/master-thesis-code | b107d1b582064daf9ad4414e1c9f332ef0be8660 | [
"MIT"
] | null | null | null | code/gauss_legendre.py | MarkusLohmayer/master-thesis-code | b107d1b582064daf9ad4414e1c9f332ef0be8660 | [
"MIT"
] | null | null | null | """Gauss-Legendre collocation methods for port-Hamiltonian systems"""
import sympy
import numpy
import math
from newton import newton_raphson, DidNotConvergeError
from symbolic import eval_expr
def butcher(s):
"""Compute the Butcher tableau for a Gauss-Legendre collocation method.
Parameters
----------... | 31.459459 | 114 | 0.593643 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,410 | 0.488259 |
fee2dd08a38899ceea87863c92dafc29503606c4 | 525 | py | Python | feeds/rss_feed.py | godwinaden/movie_api_server | 1b467bd91d0a5a9a2f0a2a9fc921b3a4f5c04217 | [
"MIT"
] | null | null | null | feeds/rss_feed.py | godwinaden/movie_api_server | 1b467bd91d0a5a9a2f0a2a9fc921b3a4f5c04217 | [
"MIT"
] | null | null | null | feeds/rss_feed.py | godwinaden/movie_api_server | 1b467bd91d0a5a9a2f0a2a9fc921b3a4f5c04217 | [
"MIT"
] | null | null | null | from sql_app.repositories.movie_repository import MovieRepo
from feedgenerator import RssFeed
from sqlalchemy.orm import Session
class LatestRssFeed(RssFeed):
title: str
price: float
description: str
@staticmethod
def items(db: Session):
return MovieRepo.fetch_all(db)
@staticmethod
... | 20.192308 | 59 | 0.704762 | 393 | 0.748571 | 0 | 0 | 287 | 0.546667 | 0 | 0 | 0 | 0 |
fee307cf09fb64ad8f6da891a9a28954c9a3eeae | 3,026 | py | Python | teraserver/python/opentera/db/models/TeraDeviceParticipant.py | introlab/opentera | bfc4de672c9de40b7c9a659be2138731e7ee4e94 | [
"Apache-2.0"
] | 10 | 2020-03-16T14:46:06.000Z | 2022-02-11T16:07:38.000Z | teraserver/python/opentera/db/models/TeraDeviceParticipant.py | introlab/opentera | bfc4de672c9de40b7c9a659be2138731e7ee4e94 | [
"Apache-2.0"
] | 114 | 2019-09-16T13:02:50.000Z | 2022-03-22T19:17:36.000Z | teraserver/python/opentera/db/models/TeraDeviceParticipant.py | introlab/opentera | bfc4de672c9de40b7c9a659be2138731e7ee4e94 | [
"Apache-2.0"
] | null | null | null | from opentera.db.Base import db, BaseModel
class TeraDeviceParticipant(db.Model, BaseModel):
__tablename__ = 't_devices_participants'
id_device_participant = db.Column(db.Integer, db.Sequence('id_device_participant_sequence'), primary_key=True,
autoincrement=True)
id_... | 44.5 | 114 | 0.718771 | 2,982 | 0.984808 | 0 | 0 | 2,009 | 0.663474 | 0 | 0 | 249 | 0.082232 |
fee39b66b3b2ef9dd7dd901d2d89a2d3c684442c | 11,043 | py | Python | leetcode_python/Linked_list/split-linked-list-in-parts.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Linked_list/split-linked-list-in-parts.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Linked_list/split-linked-list-in-parts.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | """
725. Split Linked List in Parts
Medium
0Given the head of a singly linked list and an integer k, split the linked list into k consecutive linked list parts.
The length of each part should be as equal as possible: no two parts should have a size differing by more than one. This may lead to some parts being null.
... | 29.845946 | 167 | 0.472698 | 8,824 | 0.799058 | 0 | 0 | 0 | 0 | 0 | 0 | 3,672 | 0.332518 |
fee526d6327eadfd2a1c6fc5732f854eab5a5bb2 | 1,645 | py | Python | carl/charts.py | zaratec/carl | 9d655c2cb75d90ddc6b2d101073248a2fc3c252e | [
"MIT"
] | null | null | null | carl/charts.py | zaratec/carl | 9d655c2cb75d90ddc6b2d101073248a2fc3c252e | [
"MIT"
] | null | null | null | carl/charts.py | zaratec/carl | 9d655c2cb75d90ddc6b2d101073248a2fc3c252e | [
"MIT"
] | 1 | 2020-11-19T23:41:28.000Z | 2020-11-19T23:41:28.000Z | import numpy as np
import matplotlib.pyplot as plt
import matplotlib
"""
def ecdf(sorted_views):
for view, data in sorted_views.iteritems():
yvals = np.arange(len(data))/float(len(data))
plt.plot(data, yvals, label=view)
plt.grid(True)
plt.xlabel('jaccard')
plt.ylabel('CDF')
lgnd ... | 25.703125 | 78 | 0.6231 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 586 | 0.356231 |
fee57ff8598ad386cc6460807e129b503a56f217 | 1,740 | py | Python | tests/stimuli/test_flashed_images.py | balefebvre/pystim | ae51d8a4b478da6dec44b296407099c6257fa3fa | [
"MIT"
] | null | null | null | tests/stimuli/test_flashed_images.py | balefebvre/pystim | ae51d8a4b478da6dec44b296407099c6257fa3fa | [
"MIT"
] | null | null | null | tests/stimuli/test_flashed_images.py | balefebvre/pystim | ae51d8a4b478da6dec44b296407099c6257fa3fa | [
"MIT"
] | null | null | null | import pystim
bin_path = None # TODO correct.
vec_path = None # TODO correct.
trials_path = None # TODO correct.
stimulus = pystim.stimuli.flashed_images.load(bin_path, vec_path, trials_path)
print(stimulus.nb_frames)
print(stimulus.nb_diplays)
print(stimulus.nb_trials)
print(stimulus.nb_conditions)
print(stimulu... | 34.8 | 105 | 0.820115 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 577 | 0.33028 |
fee65bcaf5d8cc11fa9804e94169f7ab6dcff8da | 427 | py | Python | test/test_google.py | kcather/Legacy | dcf92aa7d5d4213736e3018ce4b0eb945d80afb7 | [
"MIT"
] | null | null | null | test/test_google.py | kcather/Legacy | dcf92aa7d5d4213736e3018ce4b0eb945d80afb7 | [
"MIT"
] | null | null | null | test/test_google.py | kcather/Legacy | dcf92aa7d5d4213736e3018ce4b0eb945d80afb7 | [
"MIT"
] | null | null | null | #### neeed to make sure google still work for sure
# this may have to run on non-python devs' boxes, try/catch an install of the requests lib to be SURE
try:
import requests
except:
import os
os.sys('easy_install pip')
os.sys('pip install requests')
import requests
#r = requests.get('http://www.go... | 25.117647 | 101 | 0.683841 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 274 | 0.641686 |
fee67822f155f266cc796b6f601f1860ad8b8823 | 4,760 | py | Python | examples/Kane1985/Chapter5/Ex10.10.py | nouiz/pydy | 20c8ca9fc521208ae2144b5b453c14ed4a22a0ec | [
"BSD-3-Clause"
] | 298 | 2015-01-31T11:43:22.000Z | 2022-03-15T02:18:21.000Z | examples/Kane1985/Chapter5/Ex10.10.py | nouiz/pydy | 20c8ca9fc521208ae2144b5b453c14ed4a22a0ec | [
"BSD-3-Clause"
] | 359 | 2015-01-17T16:56:42.000Z | 2022-02-08T05:27:08.000Z | examples/Kane1985/Chapter5/Ex10.10.py | nouiz/pydy | 20c8ca9fc521208ae2144b5b453c14ed4a22a0ec | [
"BSD-3-Clause"
] | 109 | 2015-02-03T13:02:45.000Z | 2021-12-21T12:57:21.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Exercise 10.10 from Kane 1985."""
from __future__ import division
from sympy import expand, solve, symbols, sin, cos, S
from sympy.physics.mechanics import ReferenceFrame, RigidBody, Point
from sympy.physics.mechanics import dot, dynamicsymbols, inertia, msprint
from ut... | 33.521127 | 76 | 0.602731 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,115 | 0.233949 |
fee67e3507fde627d604b24556de9fa5e1ddebf0 | 1,179 | py | Python | src/test/test_pairwiseView.py | SensorDX/rainqc | d957705e0f1e2e05b3bf23c5b6fd77a135ac69cd | [
"Apache-2.0"
] | 1 | 2022-02-16T01:24:17.000Z | 2022-02-16T01:24:17.000Z | src/test/test_pairwiseView.py | SensorDX/rainqc | d957705e0f1e2e05b3bf23c5b6fd77a135ac69cd | [
"Apache-2.0"
] | null | null | null | src/test/test_pairwiseView.py | SensorDX/rainqc | d957705e0f1e2e05b3bf23c5b6fd77a135ac69cd | [
"Apache-2.0"
] | null | null | null | from unittest import TestCase
from src.view import PairwiseView
import numpy as np
class TestPairwiseView(TestCase):
def setUp(self):
self.num_stations = 4
self.n = 200
self.stations = np.random.randn(self.n, self.num_stations)
self.pv = PairwiseView(variable='pr')
def test_mak... | 35.727273 | 112 | 0.603053 | 1,091 | 0.92536 | 0 | 0 | 0 | 0 | 0 | 0 | 199 | 0.168787 |
feea04b5b8f70213610fd5b8726978dd6e62c7f1 | 1,013 | py | Python | bmi.py | blorincz1/bmi-tool | b49e66bac422ab1fe411642937bd0679862b7042 | [
"MIT"
] | null | null | null | bmi.py | blorincz1/bmi-tool | b49e66bac422ab1fe411642937bd0679862b7042 | [
"MIT"
] | null | null | null | bmi.py | blorincz1/bmi-tool | b49e66bac422ab1fe411642937bd0679862b7042 | [
"MIT"
] | null | null | null | # prompt user to enter how much they weigh in pounds
weight = int(input ("How much do you weigh (in pounds)? "))
# prompt user to enter their height in inches
height = int(input ("What is your height (in inches)? "))
# this converts weight to kilograms
weight_in_kg = weight / 2.2
# this converts height to c... | 31.65625 | 115 | 0.664363 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 619 | 0.611056 |
feee07121fe76d5736e52eb5411adc869715e8db | 7,031 | py | Python | day92021.py | GeirOwe/adventOfCode | fee1420cb8ecce8b7aaf9d48472364be191ca2a2 | [
"MIT"
] | 1 | 2021-12-20T11:10:59.000Z | 2021-12-20T11:10:59.000Z | day92021.py | GeirOwe/adventOfCode | fee1420cb8ecce8b7aaf9d48472364be191ca2a2 | [
"MIT"
] | null | null | null | day92021.py | GeirOwe/adventOfCode | fee1420cb8ecce8b7aaf9d48472364be191ca2a2 | [
"MIT"
] | 1 | 2021-12-02T14:40:12.000Z | 2021-12-02T14:40:12.000Z | # Day9 - 2021 Advent of code
# source: https://adventofcode.com/2021/day/9
import os
import numpy as np
def clear_console():
os.system('clear')
print('< .... AoC 2021 Day 9, part 1 .... >')
print()
return
def find_low_points(the_map, numOfRows, numOfCols):
low_points_list = []
row = 0
las... | 43.94375 | 114 | 0.54345 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,263 | 0.32186 |
feee0df189f0b37958204462a48904755aa19b63 | 7,420 | py | Python | cogs/Console.py | KhangOP/PaladinsAssistantBot | 9b705dc688610ba52909f0b0e152d8684006c6a6 | [
"MIT"
] | null | null | null | cogs/Console.py | KhangOP/PaladinsAssistantBot | 9b705dc688610ba52909f0b0e152d8684006c6a6 | [
"MIT"
] | null | null | null | cogs/Console.py | KhangOP/PaladinsAssistantBot | 9b705dc688610ba52909f0b0e152d8684006c6a6 | [
"MIT"
] | null | null | null | import discord
from discord.ext import commands
from datetime import date, datetime
# Class handles commands related to console players
class ConsoleCommands(commands.Cog, name="Console Commands"):
"""Console Commands"""
def __init__(self, bot):
self.bot = bot
# Returns a list of embeds of conso... | 51.172414 | 119 | 0.568329 | 7,204 | 0.969322 | 0 | 0 | 6,897 | 0.928014 | 6,700 | 0.901507 | 2,857 | 0.384419 |
feeebbc5a748ddb1157bf558ba36f40a432ef1a6 | 666 | py | Python | documentation/demonstrations/abfFromWks.py | swharden/PyOriginTools | 536fb8e11234ffdc27e26b1800e0358179ca7d26 | [
"MIT"
] | 11 | 2018-04-22T20:34:53.000Z | 2022-03-12T12:02:47.000Z | documentation/demonstrations/abfFromWks.py | swharden/PyOriginTools | 536fb8e11234ffdc27e26b1800e0358179ca7d26 | [
"MIT"
] | 3 | 2018-01-11T14:54:46.000Z | 2018-04-26T13:45:18.000Z | documentation/demonstrations/abfFromWks.py | swharden/PyOriginTools | 536fb8e11234ffdc27e26b1800e0358179ca7d26 | [
"MIT"
] | 3 | 2019-05-14T13:36:14.000Z | 2020-09-02T16:13:57.000Z | R"""
try to get the worksheet name from a worksheet
run -pyf C:\Users\swharden\Documents\GitHub\PyOriginTools\documentation\demonstrations\abfFromWks.py
"""
import sys
if False:
# this code block will NEVER actually run
sys.path.append('../') # helps my IDE autocomplete
sys.path.append('../../') # helps my... | 30.272727 | 100 | 0.711712 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 369 | 0.554054 |
feef852c484bcfaf650545d694c36f762735f100 | 803 | py | Python | geniza/corpus/migrations/0018_document_doctype_help_link.py | kmcelwee/geniza | 0e59134e35357d4f80d85bf1e423edbc29d1edfb | [
"Apache-2.0"
] | null | null | null | geniza/corpus/migrations/0018_document_doctype_help_link.py | kmcelwee/geniza | 0e59134e35357d4f80d85bf1e423edbc29d1edfb | [
"Apache-2.0"
] | 5 | 2020-09-22T17:35:24.000Z | 2020-09-22T19:45:46.000Z | geniza/corpus/migrations/0018_document_doctype_help_link.py | kmcelwee/geniza | 0e59134e35357d4f80d85bf1e423edbc29d1edfb | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.1 on 2021-08-19 15:49
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("corpus", "0017_secondary_lang_allow_unknown"),
]
operations = [
migrations.AlterField(
model_name... | 29.740741 | 176 | 0.595268 | 679 | 0.845579 | 0 | 0 | 0 | 0 | 0 | 0 | 283 | 0.352428 |
fef0f2eca41493ff175b1ce22f370a3502ed826a | 50 | py | Python | rubin_sim/scheduler/features/__init__.py | RileyWClarke/flarubin | eb7b1ee21c828523f8a5374fe4510fe6e5ec2a2a | [
"MIT"
] | null | null | null | rubin_sim/scheduler/features/__init__.py | RileyWClarke/flarubin | eb7b1ee21c828523f8a5374fe4510fe6e5ec2a2a | [
"MIT"
] | null | null | null | rubin_sim/scheduler/features/__init__.py | RileyWClarke/flarubin | eb7b1ee21c828523f8a5374fe4510fe6e5ec2a2a | [
"MIT"
] | null | null | null | from .features import *
from .conditions import *
| 16.666667 | 25 | 0.76 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fef10be702d297731f0eada02c3e9a2ec0107a0f | 5,932 | py | Python | traj_er/t2vec_experience/classify_exp/tested_feature_extractor.py | lzzppp/DERT | e1f9ee2489f76e2ed741d6637fd2b1e8bb225fb6 | [
"MIT"
] | 7 | 2020-08-21T02:19:15.000Z | 2021-12-30T02:02:40.000Z | traj_er/t2vec_experience/classify_exp/tested_feature_extractor.py | lzzppp/DERT | e1f9ee2489f76e2ed741d6637fd2b1e8bb225fb6 | [
"MIT"
] | 1 | 2021-04-21T13:50:53.000Z | 2021-04-25T02:34:48.000Z | traj_er/t2vec_experience/classify_exp/tested_feature_extractor.py | lzzppp/DERT | e1f9ee2489f76e2ed741d6637fd2b1e8bb225fb6 | [
"MIT"
] | 1 | 2020-12-02T07:15:13.000Z | 2020-12-02T07:15:13.000Z | import numpy as np
import h5py
from datetime import datetime
from geopy.distance import distance
import argparse
import pickle
import json
import os
class TestedFeatureExtractor:
driving_time_norm = 1
def __init__(self, selected_feature, norm_param):
self.selected_feature = selected_feature
s... | 39.546667 | 134 | 0.630142 | 4,354 | 0.733985 | 0 | 0 | 0 | 0 | 0 | 0 | 1,328 | 0.223871 |
fef114610ec0d475191a1220ffe83885004935bc | 2,545 | py | Python | psystem/plot.py | ranocha/Dispersive-wave-error-growth-notebooks | cffe67961db325291a02258118d3c7261fcce788 | [
"MIT"
] | null | null | null | psystem/plot.py | ranocha/Dispersive-wave-error-growth-notebooks | cffe67961db325291a02258118d3c7261fcce788 | [
"MIT"
] | null | null | null | psystem/plot.py | ranocha/Dispersive-wave-error-growth-notebooks | cffe67961db325291a02258118d3c7261fcce788 | [
"MIT"
] | null | null | null | from clawpack.petclaw.solution import Solution
import matplotlib
matplotlib.use('Agg')
import matplotlib.pylab as pl
from matplotlib import rc
import numpy as np
import os
def plot_q(frame,
file_prefix='claw',
path='./_output/',
xShift=0.0,
xlimits=None,
ylimits=N... | 27.074468 | 98 | 0.574853 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 279 | 0.109627 |
fef15a29a302098c87559c64e7c95311ad1af7bc | 2,285 | py | Python | deepl/layers/utils.py | akamnev/deepl | 392c757e21dec7bdd72cb0f71298389ef0d13968 | [
"MIT"
] | 1 | 2020-06-08T14:06:36.000Z | 2020-06-08T14:06:36.000Z | deepl/layers/utils.py | akamnev/deepl | 392c757e21dec7bdd72cb0f71298389ef0d13968 | [
"MIT"
] | null | null | null | deepl/layers/utils.py | akamnev/deepl | 392c757e21dec7bdd72cb0f71298389ef0d13968 | [
"MIT"
] | null | null | null | import torch
from typing import List
def get_min_value(tensor):
if tensor.dtype == torch.float16:
min_value = -1e4
elif tensor.dtype == torch.float32:
min_value = -1e9
else:
raise ValueError("{} not recognized. `dtype` "
"should be set to either `torch.floa... | 31.736111 | 122 | 0.617068 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 460 | 0.201313 |
fef388e9c0a8cc5d31503d18e82095b931d385f7 | 13,762 | py | Python | main.py | ooshyun/filterdesign | 59dbea191b8cd44aa9f2d02d3787b5805d486ae2 | [
"MIT"
] | 1 | 2021-12-27T00:38:32.000Z | 2021-12-27T00:38:32.000Z | main.py | ooshyun/FilterDesign | 7162ccad8e1ae8aebca370da56be56603b9e8b24 | [
"MIT"
] | null | null | null | main.py | ooshyun/FilterDesign | 7162ccad8e1ae8aebca370da56be56603b9e8b24 | [
"MIT"
] | null | null | null | import os
import json
import numpy as np
from numpy import log10, pi, sqrt
import scipy.io.wavfile as wav
from scipy.fftpack import *
from src import (
FilterAnalyzePlot,
WaveProcessor,
ParametricEqualizer,
GraphicalEqualizer,
cvt_char2num,
maker_logger,
DEBUG,
)
if DEBUG:
PRINTER = ma... | 26.113852 | 88 | 0.575861 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,231 | 0.162113 |
fef4b3fa8786cd370700430b9b9414a5a831d2bf | 3,322 | py | Python | time_transfer.py | EternityNull/alfred_scripts-TimeTransfer | d7c24c977d174d0b71b9903193ce8225a5538c7c | [
"MIT"
] | null | null | null | time_transfer.py | EternityNull/alfred_scripts-TimeTransfer | d7c24c977d174d0b71b9903193ce8225a5538c7c | [
"MIT"
] | null | null | null | time_transfer.py | EternityNull/alfred_scripts-TimeTransfer | d7c24c977d174d0b71b9903193ce8225a5538c7c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import re
import json
from datetime import datetime
from alfred import *
TIMESTAMP_SEC_RE = r'^\d{10}$' # 1643372599
TIMESTAMP_MSEC_RE = r'^\d{13}$' # 1643372599000
# 2022-01-28 10:00:00
DATETIME_LONG_STR = r'^[1-9]\d{3}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$'
DATET... | 27.454545 | 84 | 0.609874 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 661 | 0.19204 |
fef4d3e2153fde18995213ace718d0a7d41c56ac | 55 | py | Python | test.py | SquarerFive/ursina | 8d2a86a702a96fe2d3d3b608b87e755bf28cb2ae | [
"MIT"
] | null | null | null | test.py | SquarerFive/ursina | 8d2a86a702a96fe2d3d3b608b87e755bf28cb2ae | [
"MIT"
] | null | null | null | test.py | SquarerFive/ursina | 8d2a86a702a96fe2d3d3b608b87e755bf28cb2ae | [
"MIT"
] | null | null | null | import ursina
app = ursina.Ursina(init_showbase=True)
| 13.75 | 39 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fef5faa5a487c2ba4ddeb8aafe0c3838370c774b | 14,598 | py | Python | ravager/bot/commands/admin_interface.py | CoolFool/Ravager | 3d647115689dc23a160255221aaa493f879406a5 | [
"MIT"
] | null | null | null | ravager/bot/commands/admin_interface.py | CoolFool/Ravager | 3d647115689dc23a160255221aaa493f879406a5 | [
"MIT"
] | 1 | 2022-03-15T06:55:48.000Z | 2022-03-15T15:38:20.000Z | ravager/bot/commands/admin_interface.py | CoolFool/Ravager | 3d647115689dc23a160255221aaa493f879406a5 | [
"MIT"
] | 2 | 2022-02-09T21:30:57.000Z | 2022-03-15T06:19:57.000Z | import logging
from functools import wraps
import psutil
from telegram import InlineKeyboardMarkup, InlineKeyboardButton, ForceReply, ParseMode
from telegram.ext import CommandHandler, CallbackQueryHandler, MessageHandler, Filters
from ravager.bot.helpers.constants import *
from ravager.bot.helpers.timeout import Con... | 50.164948 | 140 | 0.644746 | 13,146 | 0.900534 | 0 | 0 | 4,157 | 0.284765 | 0 | 0 | 2,352 | 0.161118 |
fef71fd2689cde39a6617bb13c2101fc8e715b36 | 10,004 | py | Python | logo_rc.py | idocx/WHULibSeatReservation | 198fc62910a7937cc654069eb2f3fbf44b6e6f1d | [
"MIT"
] | 14 | 2019-02-24T01:53:37.000Z | 2021-03-27T02:21:24.000Z | logo_rc.py | Linqiaosong/WHULibSeatReservation | da89e1d3db920d41d6d74b3f83f8cdebad305457 | [
"MIT"
] | 3 | 2019-06-11T03:31:49.000Z | 2021-04-12T02:58:50.000Z | logo_rc.py | Linqiaosong/WHULibSeatReservation | da89e1d3db920d41d6d74b3f83f8cdebad305457 | [
"MIT"
] | 7 | 2019-06-06T17:31:27.000Z | 2020-11-08T13:03:49.000Z | #############################################################
# ไฝ่
๏ผๆ.doc
# Githubๅฐๅ๏ผhttps://github.com/idocx/WHULibSeatReservation
#############################################################
from PyQt5 import QtCore
qt_resource_data = b"\
\x00\x00\x03\xac\
\x00\
\x00\x67\xf6\x78\x9c... | 53.784946 | 104 | 0.703419 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9,370 | 0.935316 |
fef8828761203757d50e9784d410fa779ff9303d | 563 | py | Python | daoliagent/utils.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | 1 | 2019-09-11T11:56:19.000Z | 2019-09-11T11:56:19.000Z | daoliagent/utils.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | daoliagent/utils.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | import random
import six.moves.urllib.parse as urlparse
def replace_url(url, host=None, port=None, path=None):
o = urlparse.urlparse(url)
_host = o.hostname
_port = o.port
_path = o.path
if host is not None:
_host = host
if port is not None:
_port = port
netloc = _host
... | 20.107143 | 54 | 0.614565 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.024867 |
fef8bcaaac0327ab05b3750bfd80e03d8695818d | 2,745 | py | Python | cookbook/chap9/main.py | duyquang6/py-side-project | e3cdfcf424bbb15afad8241a357de49a1717fba6 | [
"Apache-2.0"
] | null | null | null | cookbook/chap9/main.py | duyquang6/py-side-project | e3cdfcf424bbb15afad8241a357de49a1717fba6 | [
"Apache-2.0"
] | null | null | null | cookbook/chap9/main.py | duyquang6/py-side-project | e3cdfcf424bbb15afad8241a357de49a1717fba6 | [
"Apache-2.0"
] | null | null | null | # 9.1. Putting a Wrapper Around a Function
#region
# import time
# from functools import wraps
# def timethis(func):
# '''
# Decorator that reports the execution time.
# '''
# @wraps(func)
# def wrapper(*args, **kwargs):
# start = time.time()
# result = func(*args, **kwargs)
# ... | 20.639098 | 59 | 0.587614 | 0 | 0 | 0 | 0 | 247 | 0.089982 | 0 | 0 | 2,089 | 0.76102 |
fefa551e8285feb448d258e854941881fb3ad2e9 | 759 | py | Python | doggo_ears_definitions.py | jryzkns/doggo-ears | 004dbb8b07a0a2170ce0d04b6e1458b268cdd543 | [
"MIT"
] | 1 | 2020-08-28T16:49:32.000Z | 2020-08-28T16:49:32.000Z | doggo_ears_definitions.py | jryzkns/doggo-ears | 004dbb8b07a0a2170ce0d04b6e1458b268cdd543 | [
"MIT"
] | null | null | null | doggo_ears_definitions.py | jryzkns/doggo-ears | 004dbb8b07a0a2170ce0d04b6e1458b268cdd543 | [
"MIT"
] | null | null | null | import numpy as np
import torch
torch.manual_seed(0)
# PRE-PROCESSING
RAVDESS_DSET_PATH = "C:\\Users\\***\\Downloads\\RAVDESS\\"
TESS_DSET_PATH = "C:\\Users\\***\\Downloads\\TESS\\"
N_WORKERS = 15
# DATASET
emote_id = {
"01" : "neutral", "03" : "happy",
"04" : "sad", "05" : "angry"}
emote_idn = ... | 22.323529 | 58 | 0.623188 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 208 | 0.274045 |
fefb10e3bc54bf078e079e6dd58a9eee22dea396 | 7,752 | py | Python | vdp/pipeline/v1alpha/pipeline_service_pb2.py | instill-ai/protogen-python | 6e118d34566b8d59e8bcd40e0ae28e0fc1a5d50f | [
"Apache-2.0"
] | 1 | 2022-03-22T09:09:46.000Z | 2022-03-22T09:09:46.000Z | vdp/pipeline/v1alpha/pipeline_service_pb2.py | instill-ai/protogen-python | 6e118d34566b8d59e8bcd40e0ae28e0fc1a5d50f | [
"Apache-2.0"
] | 4 | 2022-03-16T12:36:12.000Z | 2022-03-22T10:53:12.000Z | vdp/pipeline/v1alpha/pipeline_service_pb2.py | instill-ai/protogen-python | 6e118d34566b8d59e8bcd40e0ae28e0fc1a5d50f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: vdp/pipeline/v1alpha/pipeline_service.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import... | 131.389831 | 3,390 | 0.821723 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,304 | 0.684211 |
fefbae820a9ce01089538fc58c0ca13a3a6231eb | 119 | py | Python | slash/__init__.py | SilentJungle399/dpy-appcommands | d383ebd3414457aaaf1f65ff048604accb7bb1bc | [
"MIT"
] | 2 | 2021-09-02T13:06:46.000Z | 2021-09-03T07:19:54.000Z | slash/__init__.py | SilentJungle399/dpy-appcommands | d383ebd3414457aaaf1f65ff048604accb7bb1bc | [
"MIT"
] | null | null | null | slash/__init__.py | SilentJungle399/dpy-appcommands | d383ebd3414457aaaf1f65ff048604accb7bb1bc | [
"MIT"
] | 1 | 2021-08-14T03:38:42.000Z | 2021-08-14T03:38:42.000Z | __author__ = "SilentJungle399"
__version__ = "1.0.0"
from .client import *
from .models import *
from .enums import *
| 17 | 30 | 0.722689 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 0.201681 |
fefc83e00d4e08e9e4f83915c661bd7690cde11d | 211 | py | Python | django-app/main/textanalyzers/textblobanalyzer.py | honchardev/crypto-sentiment-app | 176a6ed61246490c42d2a2b7af4d45f67e3c7499 | [
"MIT"
] | 9 | 2019-07-07T02:57:50.000Z | 2022-01-07T10:03:30.000Z | django-app/main/textanalyzers/textblobanalyzer.py | honchardev/crypto-sentiment-app | 176a6ed61246490c42d2a2b7af4d45f67e3c7499 | [
"MIT"
] | null | null | null | django-app/main/textanalyzers/textblobanalyzer.py | honchardev/crypto-sentiment-app | 176a6ed61246490c42d2a2b7af4d45f67e3c7499 | [
"MIT"
] | null | null | null | from .abstractanalyzer import AbstractAnalyzer
from textblob import TextBlob
class TextBlobAnalyzer(AbstractAnalyzer):
def __init__(self):
pass
def analyze(self, text_content):
pass
| 16.230769 | 46 | 0.729858 | 130 | 0.616114 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fefccd0f2f86b8b353d1a858bb9e54ee6a296e8f | 850 | py | Python | 3/one.py | TheFrederick-git/adventofcode2021 | a320f3bba2655afab1aad8bf2520ccb705b2fd1e | [
"MIT"
] | null | null | null | 3/one.py | TheFrederick-git/adventofcode2021 | a320f3bba2655afab1aad8bf2520ccb705b2fd1e | [
"MIT"
] | null | null | null | 3/one.py | TheFrederick-git/adventofcode2021 | a320f3bba2655afab1aad8bf2520ccb705b2fd1e | [
"MIT"
] | null | null | null | """3/1 adventofcode"""
with open("input.txt", "r", encoding="UTF-8") as i_file:
data = i_file.read().splitlines()
columns = [[row[i] for row in data] for i in range(len(data[0]))]
def binlst_to_int(values) -> int:
"""Returns int values of binary in list form"""
values = values[::-1]
total = 0... | 35.416667 | 85 | 0.64 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 215 | 0.252941 |
fefd02d2de45b18b74656b9de90c0632735f1832 | 848 | py | Python | leetcode/palindrome_pairs/palindrome_pairs.py | sagasu/python-algorithms | d630777a3f17823165e4d72ab780ede7b10df752 | [
"MIT"
] | null | null | null | leetcode/palindrome_pairs/palindrome_pairs.py | sagasu/python-algorithms | d630777a3f17823165e4d72ab780ede7b10df752 | [
"MIT"
] | null | null | null | leetcode/palindrome_pairs/palindrome_pairs.py | sagasu/python-algorithms | d630777a3f17823165e4d72ab780ede7b10df752 | [
"MIT"
] | null | null | null | class Solution:
def palindromePairs(self, words: List[str]) -> List[List[int]]:
lookup = {}
for index, word in enumerate(words):
lookup[word] = index
ans = set()
for index, word in enumerate(words):
for k in range(len(word) + 1):
current = word... | 38.545455 | 67 | 0.471698 | 848 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fefdeea84966c3c376d5a46f9c21101aefc50772 | 193 | py | Python | landing/views.py | XeryusTC/projman | 3db118d51a9fc362153593f5a862187bdaf0a73c | [
"MIT"
] | null | null | null | landing/views.py | XeryusTC/projman | 3db118d51a9fc362153593f5a862187bdaf0a73c | [
"MIT"
] | 3 | 2015-12-08T17:14:31.000Z | 2016-01-29T18:46:59.000Z | landing/views.py | XeryusTC/projman | 3db118d51a9fc362153593f5a862187bdaf0a73c | [
"MIT"
] | null | null | null | from braces.views import AnonymousRequiredMixin
from django.views.generic import TemplateView
class LandingView(AnonymousRequiredMixin, TemplateView):
template_name = 'landing/index.html'
| 32.166667 | 56 | 0.839378 | 97 | 0.502591 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 0.103627 |
3a00eea590558911d75f7435e45a186ce7c2a0a1 | 30,437 | py | Python | startExperiment.py | aydindemircioglu/radFS | b50b2a78f7c7975751b699b6b74a2761f7fa3501 | [
"MIT",
"Unlicense"
] | 1 | 2022-02-24T02:16:55.000Z | 2022-02-24T02:16:55.000Z | startExperiment.py | aydindemircioglu/radFS | b50b2a78f7c7975751b699b6b74a2761f7fa3501 | [
"MIT",
"Unlicense"
] | null | null | null | startExperiment.py | aydindemircioglu/radFS | b50b2a78f7c7975751b699b6b74a2761f7fa3501 | [
"MIT",
"Unlicense"
] | null | null | null | #!/usr/bin/python3
from functools import partial
from datetime import datetime
import pandas as pd
from joblib import parallel_backend
import random
import numpy as np
from sklearn.calibration import CalibratedClassifierCV
import shutil
import pathlib
import os
import math
import random
from matplotlib import pyplot
... | 36.451497 | 182 | 0.610934 | 0 | 0 | 0 | 0 | 5,772 | 0.189638 | 0 | 0 | 3,772 | 0.123928 |
3a01b5b20e16dc59b45be5e462160adb8ae019e0 | 692 | py | Python | dm/algorithms/HungarianAlg.py | forons/distance-measurement | 39741aefed0aa2f86e8959338c867398ce6494c7 | [
"MIT"
] | null | null | null | dm/algorithms/HungarianAlg.py | forons/distance-measurement | 39741aefed0aa2f86e8959338c867398ce6494c7 | [
"MIT"
] | null | null | null | dm/algorithms/HungarianAlg.py | forons/distance-measurement | 39741aefed0aa2f86e8959338c867398ce6494c7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import numpy as np
from scipy import optimize, sparse
from .AbstractDistanceAlg import AbstractDistanceAlg
class HungarianAlg(AbstractDistanceAlg):
def __init__(self, df, size):
super().__init__(df, size)
def compute_matching(self):
distances = ... | 31.454545 | 81 | 0.669075 | 535 | 0.773121 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.065029 |
3a025d2fa53d6a334efac01743db85a3f7705e2e | 757 | py | Python | illallangi/delugeapi/filtercollection.py | illallangi/DelugeAPI | 8a949c0cf505992d5e6363d1ff3a9ed5147fc1a1 | [
"MIT"
] | null | null | null | illallangi/delugeapi/filtercollection.py | illallangi/DelugeAPI | 8a949c0cf505992d5e6363d1ff3a9ed5147fc1a1 | [
"MIT"
] | null | null | null | illallangi/delugeapi/filtercollection.py | illallangi/DelugeAPI | 8a949c0cf505992d5e6363d1ff3a9ed5147fc1a1 | [
"MIT"
] | null | null | null | from collections.abc import Sequence
from .filter import Filter
class FilterCollection(Sequence):
def __init__(self, host, filters, *args, **kwargs):
super().__init__(*args, **kwargs)
self.host = host
self._filters = [Filter(self.host, filter) for filter in filters]
def __repr__(self... | 29.115385 | 112 | 0.649934 | 689 | 0.910172 | 0 | 0 | 0 | 0 | 0 | 0 | 159 | 0.21004 |
3a04e44a83831c5da0bf2cc7640fd1129f243146 | 97 | py | Python | odds/__init__.py | nik849/Odds | a2403e5f5428fcf826322b59410471ec97a6aa26 | [
"MIT"
] | 1 | 2017-11-05T20:41:12.000Z | 2017-11-05T20:41:12.000Z | odds/__init__.py | nik849/Odds | a2403e5f5428fcf826322b59410471ec97a6aa26 | [
"MIT"
] | 2 | 2021-03-31T18:43:15.000Z | 2021-12-13T19:46:28.000Z | odds/__init__.py | nik849/Odds | a2403e5f5428fcf826322b59410471ec97a6aa26 | [
"MIT"
] | null | null | null | """
:copyright: Nick Hale
:license: MIT, see LICENSE for more details.
"""
__version__ = '0.0.1'
| 16.166667 | 44 | 0.670103 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 81 | 0.835052 |
3a078ca91eafb1c88f7c5c3ad6afd4b81ea83805 | 1,386 | py | Python | src/io/protobuf_test.py | fritzo/pomagma | 224bb6adab3fc68e2d853e6365b4b86a8f7f468f | [
"Apache-2.0"
] | 10 | 2015-06-09T00:25:01.000Z | 2019-06-11T16:07:31.000Z | src/io/protobuf_test.py | fritzo/pomagma | 224bb6adab3fc68e2d853e6365b4b86a8f7f468f | [
"Apache-2.0"
] | 25 | 2015-03-23T23:16:01.000Z | 2017-08-29T03:35:59.000Z | src/io/protobuf_test.py | fritzo/pomagma | 224bb6adab3fc68e2d853e6365b4b86a8f7f468f | [
"Apache-2.0"
] | null | null | null | from google.protobuf import text_format
from pomagma.io import protobuf_test_pb2
from pomagma.io.protobuf import InFile, OutFile
from pomagma.util import in_temp_dir
from pomagma.util.testing import for_each
def parse(text, Message=protobuf_test_pb2.TestMessage):
message = Message()
text_format.Merge(text, m... | 24.75 | 55 | 0.585859 | 0 | 0 | 0 | 0 | 361 | 0.260462 | 0 | 0 | 640 | 0.46176 |
3a079d600f0144ca6ea7cb473635485bda6d1725 | 2,039 | py | Python | python/oneflow/test/modules/test_linspace.py | lizhimeng159/oneflow | b5f504d7a2185c6d6ac2c97bc5f9a2a3dd78883d | [
"Apache-2.0"
] | null | null | null | python/oneflow/test/modules/test_linspace.py | lizhimeng159/oneflow | b5f504d7a2185c6d6ac2c97bc5f9a2a3dd78883d | [
"Apache-2.0"
] | null | null | null | python/oneflow/test/modules/test_linspace.py | lizhimeng159/oneflow | b5f504d7a2185c6d6ac2c97bc5f9a2a3dd78883d | [
"Apache-2.0"
] | null | null | null | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable l... | 33.983333 | 82 | 0.680726 | 1,141 | 0.559588 | 0 | 0 | 1,176 | 0.576753 | 0 | 0 | 618 | 0.30309 |
3a081670c8619a8dbe9b2b1bb3b4d9935ec6801d | 1,577 | py | Python | alexia/apps/general/templatetags/menuitem.py | LaudateCorpus1/alexia-1 | 9c0d3c90c0ffe2237299a561b755b9c17905e354 | [
"BSD-3-Clause"
] | 8 | 2015-06-29T20:01:22.000Z | 2020-10-19T13:49:38.000Z | alexia/apps/general/templatetags/menuitem.py | LaudateCorpus1/alexia-1 | 9c0d3c90c0ffe2237299a561b755b9c17905e354 | [
"BSD-3-Clause"
] | 67 | 2015-10-05T16:57:14.000Z | 2022-03-28T19:57:36.000Z | alexia/apps/general/templatetags/menuitem.py | LaudateCorpus1/alexia-1 | 9c0d3c90c0ffe2237299a561b755b9c17905e354 | [
"BSD-3-Clause"
] | 6 | 2015-10-05T13:54:34.000Z | 2021-11-30T05:11:58.000Z | import re
from django.template import Library, Node, TemplateSyntaxError
from django.template.base import token_kwargs
from django.urls import Resolver404, resolve
from django.utils.html import format_html
register = Library()
class MenuItemNode(Node):
def __init__(self, nodelist, pattern, kwargs):
self... | 29.203704 | 112 | 0.637286 | 912 | 0.578313 | 0 | 0 | 430 | 0.27267 | 0 | 0 | 149 | 0.094483 |
3a0830f683c3bcea14ab59eb19f8a4474d9635b6 | 3,984 | py | Python | superai/log/logger.py | mysuperai/superai-sdk | 796c411c6ab69209600bf727e8fd08c20f4d67b1 | [
"Apache-2.0"
] | 1 | 2020-12-03T18:18:16.000Z | 2020-12-03T18:18:16.000Z | superai/log/logger.py | mysuperai/superai-sdk | 796c411c6ab69209600bf727e8fd08c20f4d67b1 | [
"Apache-2.0"
] | 13 | 2021-02-22T18:27:58.000Z | 2022-02-10T08:14:10.000Z | superai/log/logger.py | mysuperai/superai-sdk | 796c411c6ab69209600bf727e8fd08c20f4d67b1 | [
"Apache-2.0"
] | 1 | 2021-04-27T12:38:47.000Z | 2021-04-27T12:38:47.000Z | """ Log initializer """
from __future__ import absolute_import, division, print_function, unicode_literals
import itertools
import logging
import sys
import os
from logging.handlers import RotatingFileHandler
from rich.logging import RichHandler
from typing import List
DEBUG = logging.DEBUG
INFO = logging.INFO
ERROR ... | 29.511111 | 116 | 0.704317 | 658 | 0.165161 | 0 | 0 | 0 | 0 | 0 | 0 | 966 | 0.24247 |
3a090e5c232242360194af34105d0efa576a5d9f | 6,613 | py | Python | src/test.py | 0shimax/SE-Wavenet | f3cf8239175fec02565c81995e5b9f9e1bbd5eb1 | [
"MIT"
] | null | null | null | src/test.py | 0shimax/SE-Wavenet | f3cf8239175fec02565c81995e5b9f9e1bbd5eb1 | [
"MIT"
] | null | null | null | src/test.py | 0shimax/SE-Wavenet | f3cf8239175fec02565c81995e5b9f9e1bbd5eb1 | [
"MIT"
] | null | null | null | import argparse
from pathlib import Path
import torch
import torch.nn.functional as F
from sklearn.metrics import precision_recall_fscore_support, roc_curve, auc
import matplotlib.pyplot as plt
import numpy as np
from data.data_loader import ActivDataset, loader
from models.focal_loss import FocalLoss
from models.ete_... | 42.121019 | 145 | 0.665356 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 859 | 0.129115 |
3a0d56385a100828a93d1a548339d663fa8c3ed6 | 4,031 | py | Python | code/ConvexHull.py | vijindal/cluspand | a3676594354ab59991fe75fccecdc3a400c7b153 | [
"MIT"
] | null | null | null | code/ConvexHull.py | vijindal/cluspand | a3676594354ab59991fe75fccecdc3a400c7b153 | [
"MIT"
] | null | null | null | code/ConvexHull.py | vijindal/cluspand | a3676594354ab59991fe75fccecdc3a400c7b153 | [
"MIT"
] | null | null | null | from structure_helper_class import structure_helper
from model_train_helper_class import model_train_helper
import matplotlib.pyplot as plt
import pandas as pd
from tabulate import tabulate
class convex_hull:
def get_convex_hull_points(structure_name_to_object_map, draw_hull = True, model = None, model_str =... | 47.988095 | 161 | 0.611015 | 3,833 | 0.950881 | 0 | 0 | 0 | 0 | 0 | 0 | 1,057 | 0.262218 |
3a0e24a4de9a8532f6e0fffca390853480dadb10 | 5,460 | py | Python | PoPs/warning.py | brown170/fudge | 4f818b0e0b0de52bc127dd77285b20ce3568c97a | [
"BSD-3-Clause"
] | 14 | 2019-08-29T23:46:24.000Z | 2022-03-21T10:16:25.000Z | PoPs/warning.py | brown170/fudge | 4f818b0e0b0de52bc127dd77285b20ce3568c97a | [
"BSD-3-Clause"
] | 1 | 2020-08-04T16:14:45.000Z | 2021-12-01T01:54:34.000Z | PoPs/warning.py | brown170/fudge | 4f818b0e0b0de52bc127dd77285b20ce3568c97a | [
"BSD-3-Clause"
] | 2 | 2022-03-03T22:41:41.000Z | 2022-03-03T22:54:43.000Z | # <<BEGIN-copyright>>
# Copyright 2021, Lawrence Livermore National Security, LLC.
# See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: BSD-3-Clause
# <<END-copyright>>
"""
Store and report warnings and errors in a PoPs database.
PoPs.check() returns a nested list of warning objects:
>>> ... | 31.37931 | 116 | 0.630952 | 4,558 | 0.834799 | 0 | 0 | 0 | 0 | 0 | 0 | 2,128 | 0.389744 |
3a0f2160b69e0995f3cc76e9cebbc03eb599b9f1 | 2,077 | py | Python | libra/transaction/script.py | MaslDi/libra-client | 0983adfcb6787f7a16de4bf364cdf5596c183d88 | [
"MIT"
] | null | null | null | libra/transaction/script.py | MaslDi/libra-client | 0983adfcb6787f7a16de4bf364cdf5596c183d88 | [
"MIT"
] | null | null | null | libra/transaction/script.py | MaslDi/libra-client | 0983adfcb6787f7a16de4bf364cdf5596c183d88 | [
"MIT"
] | null | null | null | from canoser import Struct, Uint8, bytes_to_int_list, hex_to_int_list
from libra.transaction.transaction_argument import TransactionArgument, normalize_public_key
from libra.bytecode import bytecodes
from libra.account_address import Address
class Script(Struct):
_fields = [
('code', [Uint8]),
... | 36.438596 | 93 | 0.641791 | 1,827 | 0.879634 | 0 | 0 | 1,673 | 0.805489 | 0 | 0 | 137 | 0.065961 |
3a0f8c5dad18187b53b099da32a80926deec7934 | 172 | py | Python | Statistics/SampleMean.py | Shannon-NJIT/MiniProject2_Statistics | 961d579d40682c030b3aa88b4cd38fa828e8e01e | [
"MIT"
] | null | null | null | Statistics/SampleMean.py | Shannon-NJIT/MiniProject2_Statistics | 961d579d40682c030b3aa88b4cd38fa828e8e01e | [
"MIT"
] | 6 | 2019-11-04T22:48:39.000Z | 2019-11-14T01:18:49.000Z | Statistics/SampleMean.py | Shannon-NJIT/MiniProject2_Statistics | 961d579d40682c030b3aa88b4cd38fa828e8e01e | [
"MIT"
] | 4 | 2019-10-29T23:24:57.000Z | 2019-11-15T01:25:46.000Z | from Calculators.Division import division
def sampleMean(data):
sample_data = data[0:999]
n = len(sample_data)
return round(division(n, sum(sample_data)), 1)
| 21.5 | 50 | 0.715116 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3a107df57da88f96818aa6ed0682c1887ef863ef | 1,901 | py | Python | puzzle/booking/candy.py | aliciawyy/dmining | 513f6f036f8f258281e1282fef052a74bf9cc3d3 | [
"Apache-2.0"
] | null | null | null | puzzle/booking/candy.py | aliciawyy/dmining | 513f6f036f8f258281e1282fef052a74bf9cc3d3 | [
"Apache-2.0"
] | 9 | 2017-10-25T10:03:36.000Z | 2018-06-12T22:49:22.000Z | puzzle/booking/candy.py | aliciawyy/dmining | 513f6f036f8f258281e1282fef052a74bf9cc3d3 | [
"Apache-2.0"
] | null | null | null | from collections import defaultdict
def read_line_to_list(as_type=int):
return map(as_type, raw_input().strip().split(' '))
N, M, T = read_line_to_list()
candies_ = [read_line_to_list() for _ in range(N)]
class CollectCandies(object):
def __init__(self, n, m, t, candies):
self.dim = n, m
s... | 32.220339 | 69 | 0.579695 | 1,607 | 0.845345 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 0.006839 |
3a110cf9f81c51a45a9e039e2675a3d01dca6237 | 13,818 | py | Python | SourceRepositoryTools/__init__.py | davidbrownell/Common_Environment | 4015872aeac8d5da30a6aa7940e1035a6aa6a75d | [
"BSL-1.0"
] | 1 | 2017-04-25T13:15:10.000Z | 2017-04-25T13:15:10.000Z | SourceRepositoryTools/__init__.py | davidbrownell/Common_Environment | 4015872aeac8d5da30a6aa7940e1035a6aa6a75d | [
"BSL-1.0"
] | null | null | null | SourceRepositoryTools/__init__.py | davidbrownell/Common_Environment | 4015872aeac8d5da30a6aa7940e1035a6aa6a75d | [
"BSL-1.0"
] | null | null | null | # ----------------------------------------------------------------------
# |
# | __init__.py
# |
# | David Brownell <db@DavidBrownell.com>
# | 2018-02-18 14:37:39
# |
# ----------------------------------------------------------------------
# |
# | Copyright David Brownell 2018.
# | Distribute... | 45.453947 | 285 | 0.481473 | 0 | 0 | 266 | 0.01925 | 353 | 0.025546 | 0 | 0 | 5,143 | 0.372196 |
3a11220a149a467396eed9e2f60bcf713ed632ac | 3,213 | py | Python | db/xtraResources/edXBigDataSeries2015/CS100-1x/Module 3: Lectures.py | chrislangst/scalable-data-science | c7beee15c7dd14d27353c4864d927c1b76cd2fa9 | [
"Unlicense"
] | 138 | 2017-07-25T06:48:28.000Z | 2022-03-31T12:23:36.000Z | db/xtraResources/edXBigDataSeries2015/CS100-1x/Module 3: Lectures.py | chrislangst/scalable-data-science | c7beee15c7dd14d27353c4864d927c1b76cd2fa9 | [
"Unlicense"
] | 11 | 2017-08-17T13:45:54.000Z | 2021-06-04T09:06:53.000Z | db/xtraResources/edXBigDataSeries2015/CS100-1x/Module 3: Lectures.py | chrislangst/scalable-data-science | c7beee15c7dd14d27353c4864d927c1b76cd2fa9 | [
"Unlicense"
] | 74 | 2017-08-18T17:04:46.000Z | 2022-03-21T14:30:51.000Z | # Databricks notebook source exported at Mon, 14 Mar 2016 03:21:05 UTC
# MAGIC %md
# MAGIC **SOURCE:** This is from the Community Edition of databricks and has been added to this databricks shard at [/#workspace/scalable-data-science/xtraResources/edXBigDataSeries2015/CS100-1x](/#workspace/scalable-data-science/xtraRes... | 30.6 | 749 | 0.698101 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,849 | 0.88671 |
3a11c774870f73e9df814c0fb0e907ad67a018a8 | 2,075 | py | Python | src/einsteinpy/tests/test_plotting/test_staticgeodesicplotter.py | Ankk98/einsteinpy | e6c3e3939063a7698410163b6de52e499bb3c8ea | [
"MIT"
] | null | null | null | src/einsteinpy/tests/test_plotting/test_staticgeodesicplotter.py | Ankk98/einsteinpy | e6c3e3939063a7698410163b6de52e499bb3c8ea | [
"MIT"
] | null | null | null | src/einsteinpy/tests/test_plotting/test_staticgeodesicplotter.py | Ankk98/einsteinpy | e6c3e3939063a7698410163b6de52e499bb3c8ea | [
"MIT"
] | null | null | null | from unittest import mock
import astropy.units as u
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import pytest
from einsteinpy.coordinates import SphericalDifferential
from einsteinpy.plotting import StaticGeodesicPlotter
@pytest.fixture()
def dummy_data():
sph_obj = SphericalDiff... | 28.040541 | 63 | 0.700241 | 0 | 0 | 0 | 0 | 1,001 | 0.48241 | 0 | 0 | 112 | 0.053976 |
3a14941cbf1878d6614fada903d6f5559aa474e0 | 367 | py | Python | pageOne.py | Priyanka1527/PageOne | ff129f305b13c8cac839e6a5f55f3853e1f16973 | [
"MIT"
] | null | null | null | pageOne.py | Priyanka1527/PageOne | ff129f305b13c8cac839e6a5f55f3853e1f16973 | [
"MIT"
] | null | null | null | pageOne.py | Priyanka1527/PageOne | ff129f305b13c8cac839e6a5f55f3853e1f16973 | [
"MIT"
] | null | null | null | #from inv_ind.py import inverted_index
import search
class main:
#vector_space = inverted_index()
# *************************** INPUTTING THE QUERY ***************************
k = input('Enter value of k:') #Accepting query from the user
query = input('Enter your search query:') #Accepting query fr... | 28.230769 | 81 | 0.599455 | 311 | 0.847411 | 0 | 0 | 0 | 0 | 0 | 0 | 254 | 0.692098 |
3a1626ac2fa1019fb590d26ad03b0ec329ab6d9d | 2,017 | py | Python | deciphon_cli/console/scan.py | EBI-Metagenomics/deciphon-cli | aa090c886db1f4dacc6bc88b46b6ebcecb79eaab | [
"MIT"
] | null | null | null | deciphon_cli/console/scan.py | EBI-Metagenomics/deciphon-cli | aa090c886db1f4dacc6bc88b46b6ebcecb79eaab | [
"MIT"
] | null | null | null | deciphon_cli/console/scan.py | EBI-Metagenomics/deciphon-cli | aa090c886db1f4dacc6bc88b46b6ebcecb79eaab | [
"MIT"
] | null | null | null | from enum import Enum
import typer
from fasta_reader import read_fasta
from deciphon_cli.core import ScanPost, SeqPost
from deciphon_cli.requests import get_json, get_plain, post_json
__all__ = ["app"]
app = typer.Typer()
class ScanIDType(str, Enum):
SCAN_ID = "scan_id"
JOB_ID = "job_id"
@app.command()
... | 24.901235 | 84 | 0.67526 | 74 | 0.036688 | 0 | 0 | 1,684 | 0.834903 | 0 | 0 | 273 | 0.13535 |
3a163271adf00fd1d184016bb403b5d130a4068f | 1,655 | py | Python | neuralmaterial/lib/models/vgg.py | NejcHirci/material-addon | c08e2081413c3319b712c2f7193ac8013f601382 | [
"MIT"
] | 4 | 2022-01-31T14:26:39.000Z | 2022-02-06T06:34:27.000Z | neuralmaterial/lib/models/vgg.py | NejcHirci/material_addon | c08e2081413c3319b712c2f7193ac8013f601382 | [
"MIT"
] | 2 | 2022-01-30T10:35:04.000Z | 2022-01-30T10:35:04.000Z | neuralmaterial/lib/models/vgg.py | NejcHirci/material-addon | c08e2081413c3319b712c2f7193ac8013f601382 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
from torch.hub import load_state_dict_from_url
class VGG(nn.Module):
def __init__(self, features, pretrained):
super(VGG, self).__init__()
self.features = features
if not pretrained:
self._initialize_weights()
def _initialize_weights(sel... | 33.77551 | 113 | 0.578852 | 816 | 0.493051 | 0 | 0 | 0 | 0 | 0 | 0 | 89 | 0.053776 |
3a16438d4a6793d41974ba3f9e345b3deca9076f | 296 | py | Python | portfolio/admin.py | jokimies/django-pj-portfolio | ce32882fa3f5cc3206b2a61eb5cd88c0cdf243ec | [
"BSD-3-Clause"
] | 3 | 2017-02-02T19:58:57.000Z | 2021-08-10T14:43:37.000Z | portfolio/admin.py | jokimies/django-pj-portfolio | ce32882fa3f5cc3206b2a61eb5cd88c0cdf243ec | [
"BSD-3-Clause"
] | 4 | 2016-01-15T14:18:37.000Z | 2016-03-06T15:06:31.000Z | portfolio/admin.py | jokimies/django-pj-portfolio | ce32882fa3f5cc3206b2a61eb5cd88c0cdf243ec | [
"BSD-3-Clause"
] | 2 | 2019-10-12T02:05:49.000Z | 2022-03-08T16:25:17.000Z | from portfolio.models import Transaction, Security, Price, Account
from portfolio.models import PriceTracker
from django.contrib import admin
admin.site.register(Transaction)
admin.site.register(Security)
admin.site.register(Price)
admin.site.register(PriceTracker)
admin.site.register(Account)
| 29.6 | 66 | 0.841216 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3a16bef75430d1f8616b4661d929e57eb96f5d11 | 1,295 | py | Python | quasimodo/cache/file_cache.py | Aunsiels/CSK | c88609bc76d865b4987aaf30ddf1247a2031b1a6 | [
"MIT"
] | 16 | 2019-11-28T13:26:37.000Z | 2022-02-09T09:53:10.000Z | quasimodo/cache/file_cache.py | Aunsiels/CSK | c88609bc76d865b4987aaf30ddf1247a2031b1a6 | [
"MIT"
] | 1 | 2021-03-26T20:31:48.000Z | 2021-07-15T08:52:47.000Z | quasimodo/cache/file_cache.py | Aunsiels/CSK | c88609bc76d865b4987aaf30ddf1247a2031b1a6 | [
"MIT"
] | 3 | 2020-08-14T23:23:25.000Z | 2021-12-24T14:02:35.000Z | import os
import shutil
class FileCache(object):
def __init__(self, cache_dir):
self.cache_dir = cache_dir + "/"
if not os.path.exists(self.cache_dir):
os.makedirs(self.cache_dir)
def write_cache(self, query, suggestions):
filename = self.cache_dir + query.replace(" ", "-... | 32.375 | 95 | 0.565251 | 1,268 | 0.979151 | 0 | 0 | 0 | 0 | 0 | 0 | 101 | 0.077992 |
3a16fcd29e32261f583e0fe17a97b6df4dbfd030 | 391 | py | Python | OpticsLab/components.py | AzizAlqasem/OpticsLab | a68c12edc9998f0709bae3da2fa0f85778e19bf0 | [
"MIT"
] | null | null | null | OpticsLab/components.py | AzizAlqasem/OpticsLab | a68c12edc9998f0709bae3da2fa0f85778e19bf0 | [
"MIT"
] | null | null | null | OpticsLab/components.py | AzizAlqasem/OpticsLab | a68c12edc9998f0709bae3da2fa0f85778e19bf0 | [
"MIT"
] | null | null | null | """ The components module has all optical components that are used in optics
"""
class Mirror:
def __init__(self,):
pass
class Lense:
def __init__(self,):
pass
class Mediam:
def __init__(self,):
pass
class BeamSpliter:
def __init__(self,):
... | 11.848485 | 76 | 0.557545 | 287 | 0.734015 | 0 | 0 | 0 | 0 | 0 | 0 | 81 | 0.207161 |
3a193908dfb0eb3ea9c064b546eae9b145317435 | 10,915 | py | Python | txraft/test_txraft.py | tehasdf/txraft | 860345e4a10d438d3fc69d752f09a06546c92d08 | [
"MIT"
] | null | null | null | txraft/test_txraft.py | tehasdf/txraft | 860345e4a10d438d3fc69d752f09a06546c92d08 | [
"MIT"
] | null | null | null | txraft/test_txraft.py | tehasdf/txraft | 860345e4a10d438d3fc69d752f09a06546c92d08 | [
"MIT"
] | null | null | null | from twisted.internet.defer import succeed
from twisted.internet.task import Clock
from twisted.trial.unittest import TestCase
from txraft import Entry, RaftNode, MockRPC, STATE
from txraft.commands import AppendEntriesCommand, RequestVotesCommand
class MockStoreDontUse(object):
def __init__(self, entries=None):... | 30.319444 | 93 | 0.599542 | 10,647 | 0.975447 | 0 | 0 | 0 | 0 | 0 | 0 | 85 | 0.007787 |
3a19793608f407d01e4af46fb22f949e028fb9e8 | 6,867 | py | Python | prototype/c2dn/script/analysis/extractData.py | Thesys-lab/C2DN | 55aa7fc1cd13ab0c80a9c25aa0288b454616d83c | [
"Apache-2.0"
] | null | null | null | prototype/c2dn/script/analysis/extractData.py | Thesys-lab/C2DN | 55aa7fc1cd13ab0c80a9c25aa0288b454616d83c | [
"Apache-2.0"
] | null | null | null | prototype/c2dn/script/analysis/extractData.py | Thesys-lab/C2DN | 55aa7fc1cd13ab0c80a9c25aa0288b454616d83c | [
"Apache-2.0"
] | null | null | null |
import os, sys
sys.path.append(os.path.expanduser("~/workspace/"))
from pyutils.common import *
def load_fe_metrics(ifilepath):
n_byte_partial_miss, n_req_partial_miss = 0, 0
n_byte_push_chunk, n_byte_chunk_hit, n_req_chunk_hit, n_byte_ICP_chunk = 0, 0, 0, 0
n_req_ICP_chunk, n_req_skip_chunk = 0, 0
... | 42.388889 | 128 | 0.642493 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,640 | 0.384447 |
3a1a4878173988f64e8012e0966e1a78c639eef8 | 4,116 | py | Python | ToDo/settings/common.py | adarsh9780/2Do | b0f3067b34c49987a4bbb7b56813d73805d83918 | [
"MIT"
] | null | null | null | ToDo/settings/common.py | adarsh9780/2Do | b0f3067b34c49987a4bbb7b56813d73805d83918 | [
"MIT"
] | 10 | 2020-01-03T16:56:27.000Z | 2022-01-13T00:41:57.000Z | ToDo/settings/common.py | adarsh9780/2Do | b0f3067b34c49987a4bbb7b56813d73805d83918 | [
"MIT"
] | null | null | null | """
Django settings for ToDo project.
Generated by 'django-admin startproject' using Django 1.11.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import os
# ... | 27.078947 | 91 | 0.710641 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,011 | 0.731535 |
3a1ad1cbd5fa6fd57f60b6cfe90e8e847de62504 | 89 | py | Python | openamundsen/modules/__init__.py | openamundsen/openamundsen | 2ac09eb34b0c72c84c421a0dac08d114a05b7b1c | [
"MIT"
] | 3 | 2021-05-28T06:46:36.000Z | 2021-06-14T13:39:25.000Z | openamundsen/modules/__init__.py | openamundsen/openamundsen | 2ac09eb34b0c72c84c421a0dac08d114a05b7b1c | [
"MIT"
] | 22 | 2021-04-28T12:31:58.000Z | 2022-03-09T18:29:12.000Z | openamundsen/modules/__init__.py | openamundsen/openamundsen | 2ac09eb34b0c72c84c421a0dac08d114a05b7b1c | [
"MIT"
] | 1 | 2021-06-01T12:48:54.000Z | 2021-06-01T12:48:54.000Z | from . import (
canopy,
evapotranspiration,
radiation,
snow,
soil,
)
| 11.125 | 23 | 0.573034 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3a1b3de82b0cb02451c59c3a93b30506f022268a | 188 | py | Python | config/urls.py | laactech/django-security-headers-example | 86ea0b7209f8871c32100ada31fe00aa4a8e9f63 | [
"BSD-3-Clause"
] | 1 | 2019-10-09T22:08:27.000Z | 2019-10-09T22:08:27.000Z | config/urls.py | laactech/django-security-headers-example | 86ea0b7209f8871c32100ada31fe00aa4a8e9f63 | [
"BSD-3-Clause"
] | 7 | 2020-06-05T23:45:57.000Z | 2022-02-10T10:40:54.000Z | config/urls.py | laactech/django-security-headers-example | 86ea0b7209f8871c32100ada31fe00aa4a8e9f63 | [
"BSD-3-Clause"
] | null | null | null | from django.urls import path
from django_security_headers_example.core.views import LandingPageView
urlpatterns = [
path("", view=LandingPageView.as_view(), name="landing_page"),
]
| 20.888889 | 70 | 0.776596 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 0.085106 |
3a1bb607068330f96d4bdb50c12759ee1c1a9528 | 14,071 | py | Python | tests/unit/test_experiments_analytics.py | LastRemote/sagemaker-python-sdk | fddf29d9e4383cd3f939253eef47ee79a464dd37 | [
"Apache-2.0"
] | 1,690 | 2017-11-29T20:13:37.000Z | 2022-03-31T12:58:11.000Z | tests/unit/test_experiments_analytics.py | LastRemote/sagemaker-python-sdk | fddf29d9e4383cd3f939253eef47ee79a464dd37 | [
"Apache-2.0"
] | 2,762 | 2017-12-04T05:18:03.000Z | 2022-03-31T23:40:11.000Z | tests/unit/test_experiments_analytics.py | LastRemote/sagemaker-python-sdk | fddf29d9e4383cd3f939253eef47ee79a464dd37 | [
"Apache-2.0"
] | 961 | 2017-11-30T16:44:03.000Z | 2022-03-30T23:12:09.000Z | from __future__ import absolute_import
import mock
import pytest
import pandas as pd
from collections import OrderedDict
from sagemaker.analytics import ExperimentAnalytics
@pytest.fixture
def mock_session():
return mock.Mock()
def trial_component(trial_component_name):
return {
"TrialComponentNa... | 40.66763 | 100 | 0.538341 | 0 | 0 | 0 | 0 | 58 | 0.004122 | 0 | 0 | 5,166 | 0.367138 |
3a1c1e3d3d934a3c220e33611b61500c0a74317b | 14,244 | py | Python | uni_ticket/migrations/0001_initial.py | biotech2021/uniTicket | 8c441eac18e67a983e158326b1c4b82f00f1f1ef | [
"Apache-2.0"
] | 15 | 2019-09-06T06:47:08.000Z | 2022-01-17T06:39:54.000Z | uni_ticket/migrations/0001_initial.py | biotech2021/uniTicket | 8c441eac18e67a983e158326b1c4b82f00f1f1ef | [
"Apache-2.0"
] | 69 | 2019-09-06T12:03:19.000Z | 2022-03-26T14:30:53.000Z | uni_ticket/migrations/0001_initial.py | biotech2021/uniTicket | 8c441eac18e67a983e158326b1c4b82f00f1f1ef | [
"Apache-2.0"
] | 13 | 2019-09-11T10:54:20.000Z | 2021-11-23T09:09:19.000Z | # Generated by Django 2.1.7 on 2019-04-04 12:15
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('organizational_area', '0017_organizationalstructure_slug'),
mig... | 53.750943 | 713 | 0.582982 | 14,086 | 0.988838 | 0 | 0 | 0 | 0 | 0 | 0 | 3,987 | 0.279888 |
3a20f5e777be4409e899dec4e5460fecff5677e0 | 10,325 | py | Python | baselines/baseline_summarunner/main.py | PKULiuHui/LiveBlogSum | b6a22521ee454e649981d70ddca6c89a1bac5a4c | [
"MIT"
] | null | null | null | baselines/baseline_summarunner/main.py | PKULiuHui/LiveBlogSum | b6a22521ee454e649981d70ddca6c89a1bac5a4c | [
"MIT"
] | null | null | null | baselines/baseline_summarunner/main.py | PKULiuHui/LiveBlogSum | b6a22521ee454e649981d70ddca6c89a1bac5a4c | [
"MIT"
] | null | null | null | # coding:utf-8
import torch
import torch.nn as nn
from torch.autograd import Variable
from torch.nn.utils import clip_grad_norm_
from torch.utils.data import DataLoader
from tqdm import tqdm
import numpy as np
import math
import re
import sys
from Vocab import Vocab
from Dataset import Dataset
from RNN_RNN import RNN_R... | 36.743772 | 120 | 0.606683 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,661 | 0.156418 |
3a236c93064f118a008812da513e38be43b9a0c5 | 3,512 | py | Python | data_utils/split_data.py | amitfishy/deep-objdetect | d8fc03bdb532443588b910fb9cb488766c8f6a97 | [
"MIT"
] | null | null | null | data_utils/split_data.py | amitfishy/deep-objdetect | d8fc03bdb532443588b910fb9cb488766c8f6a97 | [
"MIT"
] | null | null | null | data_utils/split_data.py | amitfishy/deep-objdetect | d8fc03bdb532443588b910fb9cb488766c8f6a97 | [
"MIT"
] | null | null | null | import os
from random import shuffle
import pascalvoc_to_yolo
def generate_yolo_format_data(dataset_type, annotation_directory, image_id_directory, train_data_fraction, use_validation_experiments, image_data_directory, class_names_file, train_mode):
get_split_data(image_id_directory, train_data_fraction, use_validat... | 46.210526 | 229 | 0.825456 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 191 | 0.054385 |
3a26a3c6be42741ef5f1bdf670939b37671499bb | 547 | py | Python | books/migrations/0002_auto_20200518_1636.py | JorgeluissilvaC/intellinext_books | 0495744920dac6ee98c7ad024f8d8f85d0838238 | [
"MIT"
] | null | null | null | books/migrations/0002_auto_20200518_1636.py | JorgeluissilvaC/intellinext_books | 0495744920dac6ee98c7ad024f8d8f85d0838238 | [
"MIT"
] | null | null | null | books/migrations/0002_auto_20200518_1636.py | JorgeluissilvaC/intellinext_books | 0495744920dac6ee98c7ad024f8d8f85d0838238 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2020-05-18 21:36
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('books', '0001_initial'),
]
operations = [
... | 24.863636 | 122 | 0.645338 | 355 | 0.648995 | 0 | 0 | 0 | 0 | 0 | 0 | 125 | 0.228519 |
3a278df76c850ba375f90a83b4923f079000c2f6 | 1,385 | py | Python | debian-11-PrisonPC/xfce/log-terminal-attempt.py | mijofa/bootstrap2020 | 38f557f4f0e72eaefe366f12f6adac3e2f9c9abd | [
"MIT"
] | null | null | null | debian-11-PrisonPC/xfce/log-terminal-attempt.py | mijofa/bootstrap2020 | 38f557f4f0e72eaefe366f12f6adac3e2f9c9abd | [
"MIT"
] | null | null | null | debian-11-PrisonPC/xfce/log-terminal-attempt.py | mijofa/bootstrap2020 | 38f557f4f0e72eaefe366f12f6adac3e2f9c9abd | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import os
import sys
import syslog # FIXME: use systemd.journal.send()?
import gi
gi.require_version('Notify', '0.7')
import gi.repository.Notify # noqa: E402
__doc__ = """ an ersatz xterm that says "No!" and quits """
# Tell the central server.
# FIXME: ends up in user journ... | 34.625 | 95 | 0.704693 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,024 | 0.73935 |