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
a8347ba774f82ced779a3ceac5d45c914fbb1cf6
3,179
py
Python
tests/test_derivatives.py
whalenpt/rkstiff
9fbec7ddd123cc644d392933b518d342751b4cd8
[ "MIT" ]
4
2021-11-05T15:35:21.000Z
2022-01-17T10:20:57.000Z
tests/test_derivatives.py
whalenpt/rkstiff
9fbec7ddd123cc644d392933b518d342751b4cd8
[ "MIT" ]
null
null
null
tests/test_derivatives.py
whalenpt/rkstiff
9fbec7ddd123cc644d392933b518d342751b4cd8
[ "MIT" ]
null
null
null
from rkstiff.grids import construct_x_kx_rfft, construct_x_kx_fft from rkstiff.grids import construct_x_Dx_cheb from rkstiff.derivatives import dx_rfft, dx_fft import numpy as np def test_periodic_dx_rfft(): N = 100 a, b = 0, 2*np.pi x,kx = construct_x_kx_rfft(N,a,b) u = np.sin(x) ux_exact = np.co...
26.057377
74
0.624096
0
0
0
0
0
0
0
0
56
0.017616
a834a938200061353abd64e3aa79cc1eac77b3bf
2,511
py
Python
python/jinja2_template.py
bismog/leetcode
13b8a77045f96e7c59ddfe287481f6aaa68e564d
[ "MIT" ]
null
null
null
python/jinja2_template.py
bismog/leetcode
13b8a77045f96e7c59ddfe287481f6aaa68e564d
[ "MIT" ]
null
null
null
python/jinja2_template.py
bismog/leetcode
13b8a77045f96e7c59ddfe287481f6aaa68e564d
[ "MIT" ]
1
2018-08-17T07:07:15.000Z
2018-08-17T07:07:15.000Z
#!/usr/bin/env python import os from jinja2 import Environment, FileSystemLoader PATH = os.path.dirname(os.path.abspath(__file__)) env = Environment(loader=FileSystemLoader(os.path.join(PATH, 'templates'))) mac_addr = "01:23:45:67:89:01" PXE_ROOT_DIR = "/data/tftpboot" pxe_options = { 'os_distribution': 'centos...
31
84
0.68419
0
0
0
0
0
0
0
0
1,244
0.49542
a837db7dbbd9e3811093f9342986a637e65f9e07
1,101
py
Python
school_system/users/admin.py
SanyaDeath/BIA-school-system
d07e4e86f91cf1e24c211cc9f5524c50da45b0e5
[ "BSD-3-Clause" ]
null
null
null
school_system/users/admin.py
SanyaDeath/BIA-school-system
d07e4e86f91cf1e24c211cc9f5524c50da45b0e5
[ "BSD-3-Clause" ]
null
null
null
school_system/users/admin.py
SanyaDeath/BIA-school-system
d07e4e86f91cf1e24c211cc9f5524c50da45b0e5
[ "BSD-3-Clause" ]
null
null
null
from django.contrib import admin from django.contrib.auth.admin import UserAdmin as DjangoUserAdmin from .models import Student, User admin.site.site_header = 'BIA SCHOOL SYSTEM' class UserAdmin(DjangoUserAdmin): model = User fieldsets = DjangoUserAdmin.fieldsets + ((None, { 'fields': ('role', 'midd...
28.230769
66
0.613079
831
0.754768
0
0
0
0
0
0
267
0.242507
b5179adb5c10e59288f470f8fa76ecec344ba97b
1,111
py
Python
converter.py
ownerofworld/TDroidDesk
5c773f15d764e6cff468bb39ed40dca5ba07d902
[ "MIT" ]
20
2017-02-22T18:36:57.000Z
2022-03-23T11:03:35.000Z
converter.py
extratone/TDroidDesk
e778463e996368374c856e6154dc0885df1f3c11
[ "MIT" ]
3
2017-02-23T03:51:07.000Z
2017-03-26T15:06:35.000Z
converter.py
extratone/TDroidDesk
e778463e996368374c856e6154dc0885df1f3c11
[ "MIT" ]
9
2017-02-23T19:39:20.000Z
2022-01-02T03:28:01.000Z
# coding: utf-8 """Converter module.""" import util THEME = 'theme' BACKGROUND = 'background' class ThemeConverter(object): """Object that converts themes using given map file.""" def __init__(self, theme_map, transp_map): """Constructor.""" self.theme_map = theme_map self.transp_m...
26.452381
74
0.621062
1,011
0.909991
0
0
0
0
0
0
302
0.271827
b517e64ad1c06cf00c0f78b0ee1fc02a33f3ce6e
3,109
py
Python
tools/serve/test_serve.py
mtrzos/wpt
6e559a60ecfa38ad6cc434911dd0995a63900db6
[ "BSD-3-Clause" ]
null
null
null
tools/serve/test_serve.py
mtrzos/wpt
6e559a60ecfa38ad6cc434911dd0995a63900db6
[ "BSD-3-Clause" ]
null
null
null
tools/serve/test_serve.py
mtrzos/wpt
6e559a60ecfa38ad6cc434911dd0995a63900db6
[ "BSD-3-Clause" ]
1
2021-04-06T20:06:58.000Z
2021-04-06T20:06:58.000Z
import pickle import platform import os import pytest import localpaths from . import serve from .serve import Config @pytest.mark.skipif(platform.uname()[0] == "Windows", reason="Expected contents are platform-dependent") def test_make_hosts_file_nix(): c = Config(browser_host="foo.bar", al...
38.8625
88
0.525571
0
0
0
0
2,331
0.749759
0
0
1,189
0.382438
b51830bb1dccb3fd7e3c8b9bb5061b4737e27584
8,440
py
Python
webshell/preprocess.py
radish608/graduationProject_DL4WebSecurity
1bafeca95d8c02be438b79e8192cae3f624879c9
[ "MIT" ]
1
2020-09-15T01:44:21.000Z
2020-09-15T01:44:21.000Z
webshell/preprocess.py
radish608/graduationProject_DL4WebSecurity
1bafeca95d8c02be438b79e8192cae3f624879c9
[ "MIT" ]
null
null
null
webshell/preprocess.py
radish608/graduationProject_DL4WebSecurity
1bafeca95d8c02be438b79e8192cae3f624879c9
[ "MIT" ]
null
null
null
# -*-coding: utf-8 -*- import os import re from sklearn.feature_extraction.text import CountVectorizer import sys import numpy as np from sklearn.model_selection import train_test_split from sklearn.feature_extraction.text import TfidfTransformer import commands import tflearn import pickle max_features=10000 max_docu...
26.049383
104
0.619313
0
0
0
0
0
0
0
0
996
0.11773
b5195d6a3d0b3fd5a3b08706a1231fda25ed0eb8
2,252
py
Python
py/DREAM/Settings/Equations/RunawayElectronDistribution.py
chalmersplasmatheory/DREAM
715637ada94f5e35db16f23c2fd49bb7401f4a27
[ "MIT" ]
12
2020-09-07T11:19:10.000Z
2022-02-17T17:40:19.000Z
py/DREAM/Settings/Equations/RunawayElectronDistribution.py
chalmersplasmatheory/DREAM
715637ada94f5e35db16f23c2fd49bb7401f4a27
[ "MIT" ]
110
2020-09-02T15:29:24.000Z
2022-03-09T09:50:01.000Z
py/DREAM/Settings/Equations/RunawayElectronDistribution.py
chalmersplasmatheory/DREAM
715637ada94f5e35db16f23c2fd49bb7401f4a27
[ "MIT" ]
3
2021-05-21T13:24:31.000Z
2022-02-11T14:43:12.000Z
import numpy as np from DREAM.Settings.Equations.EquationException import EquationException from . import DistributionFunction as DistFunc from . DistributionFunction import DistributionFunction from .. TransportSettings import TransportSettings INIT_FORWARD = 1 INIT_XI_NEGATIVE = 2 INIT_XI_POSITIVE = 3 INIT_ISOTROP...
30.026667
83
0.655861
1,920
0.852575
0
0
0
0
0
0
491
0.218028
b519b948a7702826eb1cadca71144eb49329174c
8,907
py
Python
chevah/compat/tests/normal/testing/test_assertion.py
chevah/compat
d22e5f551a628f8a1652c9f2eea306e17930cb8f
[ "BSD-3-Clause" ]
5
2016-12-03T22:54:50.000Z
2021-11-17T11:17:39.000Z
chevah/compat/tests/normal/testing/test_assertion.py
chevah/compat
d22e5f551a628f8a1652c9f2eea306e17930cb8f
[ "BSD-3-Clause" ]
76
2015-01-22T16:00:31.000Z
2022-02-09T22:13:34.000Z
chevah/compat/tests/normal/testing/test_assertion.py
chevah/compat
d22e5f551a628f8a1652c9f2eea306e17930cb8f
[ "BSD-3-Clause" ]
1
2016-12-10T15:57:31.000Z
2016-12-10T15:57:31.000Z
# Copyright (c) 2015 Adi Roiban. # See LICENSE for details. """ Tests for the assertion helpers. """ from __future__ import print_function from __future__ import division from __future__ import absolute_import import os from chevah.compat.exceptions import CompatError from chevah.compat.testing import ChevahTestCase, ...
32.507299
78
0.615359
8,581
0.9634
0
0
0
0
0
0
3,206
0.359942
b51c24c2a8046cf56cf971ce8b89fbb099048127
2,253
py
Python
tests/basic_test.py
patpizio/conformal_predictors
80d46d8728af23cf4a412024f592c40b51d977c7
[ "MIT" ]
null
null
null
tests/basic_test.py
patpizio/conformal_predictors
80d46d8728af23cf4a412024f592c40b51d977c7
[ "MIT" ]
4
2021-08-04T15:11:33.000Z
2021-08-04T22:52:03.000Z
tests/basic_test.py
patpizio/conformal_predictors
80d46d8728af23cf4a412024f592c40b51d977c7
[ "MIT" ]
null
null
null
import unittest import sys sys.path.insert(0, '../src/') from conformal_predictors.icp import ConformalPredictor from conformal_predictors.nc_measures import * import conformal_predictors.calibrutils as cu from sklearn.datasets import * import numpy as np from sklearn.svm import SVC from sklearn.ensemble import Ran...
29.644737
112
0.699512
1,585
0.703506
0
0
0
0
0
0
243
0.107856
b51c95bad3faa026a48a62db4fc8bca989c644e2
7,561
py
Python
data/unaligned_dataset.py
basicskywards/cyclegan-yolo
536498706da30707facf1211355ff21df2e5b227
[ "BSD-3-Clause" ]
null
null
null
data/unaligned_dataset.py
basicskywards/cyclegan-yolo
536498706da30707facf1211355ff21df2e5b227
[ "BSD-3-Clause" ]
null
null
null
data/unaligned_dataset.py
basicskywards/cyclegan-yolo
536498706da30707facf1211355ff21df2e5b227
[ "BSD-3-Clause" ]
null
null
null
import os.path import torchvision.transforms as transforms from data.base_dataset import BaseDataset, get_transform from data.image_folder import make_dataset from PIL import Image import PIL from pdb import set_trace as st import torch import numpy as np #from yolo.utils.datasets import pad #import torchvision.trans...
40.005291
206
0.562492
7,148
0.945378
0
0
0
0
0
0
2,675
0.353789
b51f90c659e185b69613117f368541efd8ec132f
8,396
py
Python
primare_control/primare_interface.py
ZenithDK/primare-control
597a2dd15bedb511fab5cca8d01044692d1e2d96
[ "Apache-2.0" ]
null
null
null
primare_control/primare_interface.py
ZenithDK/primare-control
597a2dd15bedb511fab5cca8d01044692d1e2d96
[ "Apache-2.0" ]
null
null
null
primare_control/primare_interface.py
ZenithDK/primare-control
597a2dd15bedb511fab5cca8d01044692d1e2d96
[ "Apache-2.0" ]
null
null
null
"""Interface to Primare amplifiers using Twisted SerialPort. This module allows you to control your Primare I22 and I32 amplifier from the command line using Primare's binary protocol via the RS232 port on the amplifier. """ import logging import click from contextlib import closing from primare_control import Prima...
36.504348
79
0.47737
2,575
0.306694
0
0
6,070
0.722963
0
0
2,322
0.27656
b51fa08d66290d275d2da9e4167fcbc0a1d4e931
382
py
Python
sjfxjc/foundations-for-analytics-with-python-master/csv/2csv_reader_parsing_and_write.py
SaronZhou/python
40d73b49b9b17542c73a3c09d28e479d2fefcde3
[ "MIT" ]
null
null
null
sjfxjc/foundations-for-analytics-with-python-master/csv/2csv_reader_parsing_and_write.py
SaronZhou/python
40d73b49b9b17542c73a3c09d28e479d2fefcde3
[ "MIT" ]
null
null
null
sjfxjc/foundations-for-analytics-with-python-master/csv/2csv_reader_parsing_and_write.py
SaronZhou/python
40d73b49b9b17542c73a3c09d28e479d2fefcde3
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import csv import sys input_file = sys.argv[1] output_file = sys.argv[2] with open(input_file, 'r', newline='') as csv_in_file: with open(output_file, 'w', newline='') as csv_out_file: filereader = csv.reader(csv_in_file, delimiter=',') filewriter = csv.writer(csv_out_file, delimiter=',') ...
29.384615
57
0.730366
0
0
0
0
0
0
0
0
38
0.099476
b5205edd8aab4d0aa6260c04b7e15a833d448e5d
298
py
Python
challenges/fifo-animal-shelter/pets.py
jeremyCtown/data-structures-and-algorithms
d4ba8741f858fb5298f8ce560240373fb7742e20
[ "MIT" ]
null
null
null
challenges/fifo-animal-shelter/pets.py
jeremyCtown/data-structures-and-algorithms
d4ba8741f858fb5298f8ce560240373fb7742e20
[ "MIT" ]
null
null
null
challenges/fifo-animal-shelter/pets.py
jeremyCtown/data-structures-and-algorithms
d4ba8741f858fb5298f8ce560240373fb7742e20
[ "MIT" ]
null
null
null
class Dog: """ Creates dog object """ def __init__(self): self.val = 'dog' def __repr__(self): return self.val class Cat: """ Creates cat object """ def __init__(self): self.val = 'cat' def __repr__(self): return self.val
14.190476
24
0.516779
294
0.986577
0
0
0
0
0
0
78
0.261745
b520efe1b1cf2e4fbb13042874cc3d5189db3ae6
2,980
py
Python
provdbconnector/tests/db_adapters/neo4j/test_neo4jadapter.py
Ama-Gi/prov-neo4j-covid19-track
67a79694ad3b48c34dd263f1508c0bdfbc6702fb
[ "Apache-2.0" ]
15
2016-09-21T22:27:45.000Z
2022-01-17T15:44:42.000Z
provdbconnector/tests/db_adapters/neo4j/test_neo4jadapter.py
Ama-Gi/prov-neo4j-covid19-track
67a79694ad3b48c34dd263f1508c0bdfbc6702fb
[ "Apache-2.0" ]
87
2016-09-19T13:26:05.000Z
2022-03-16T04:16:47.000Z
provdbconnector/tests/db_adapters/neo4j/test_neo4jadapter.py
Ama-Gi/prov-neo4j-covid19-track
67a79694ad3b48c34dd263f1508c0bdfbc6702fb
[ "Apache-2.0" ]
3
2016-10-17T19:25:10.000Z
2020-06-26T12:38:34.000Z
import unittest from provdbconnector.exceptions.database import InvalidOptionsException, AuthException from provdbconnector import Neo4jAdapter, NEO4J_USER, NEO4J_PASS, NEO4J_HOST, NEO4J_BOLT_PORT from provdbconnector.prov_db import ProvDb from provdbconnector.tests import AdapterTestTemplate from provdbconnector.test...
33.863636
124
0.601342
2,626
0.881208
0
0
559
0.187584
0
0
884
0.296644
b521c6c0f419d3631f195792a8be1ffaddad4502
1,956
py
Python
Python3-ThirdPartyLibrary/Chapter06_psutil.py
anliven/Reading-Code-Learning-Python
a814cab207bbaad6b5c69b9feeb8bf2f459baf2b
[ "Apache-2.0" ]
null
null
null
Python3-ThirdPartyLibrary/Chapter06_psutil.py
anliven/Reading-Code-Learning-Python
a814cab207bbaad6b5c69b9feeb8bf2f459baf2b
[ "Apache-2.0" ]
null
null
null
Python3-ThirdPartyLibrary/Chapter06_psutil.py
anliven/Reading-Code-Learning-Python
a814cab207bbaad6b5c69b9feeb8bf2f459baf2b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import psutil # CPU print("CPU: ", psutil.cpu_count()) # CPU逻辑数量 print("CPU: ", psutil.cpu_count(logical=False)) # CPU物理核心 print("CPU: ", psutil.cpu_times()) # 统计CPU的用户/系统/空闲时间 # for x in range(3): # print(psutil.cpu_percent(interval=1, percpu=True)) # 每秒刷新一次CPU使用率 # 内存 prin...
36.222222
73
0.596626
0
0
0
0
0
0
0
0
1,481
0.615033
b5220f9d88a447b033fc07fa837a16f3731fa688
1,971
py
Python
ocrDA.py
it-pebune/ani-research-data-extraction
e8b0ffecb0835020ce7942223cf566dc45ccee35
[ "MIT" ]
null
null
null
ocrDA.py
it-pebune/ani-research-data-extraction
e8b0ffecb0835020ce7942223cf566dc45ccee35
[ "MIT" ]
7
2022-01-29T22:19:55.000Z
2022-03-28T18:18:19.000Z
ocrDA.py
it-pebune/ani-research-data-extraction
e8b0ffecb0835020ce7942223cf566dc45ccee35
[ "MIT" ]
null
null
null
import json from NewDeclarationInQueue.formular_converter import FormularConverter from NewDeclarationInQueue.preprocess_one_step import PreprocessOneStep from NewDeclarationInQueue.preprocess_two_steps import PreProcessTwoSteps from NewDeclarationInQueue.processfiles.customprocess.search_text_line_parameter import Se...
38.647059
112
0.811771
0
0
0
0
0
0
0
0
286
0.145104
b522c08e48bccc21cac46f1faeda9461a2a4bfcf
1,187
py
Python
backend/model/migrate/versions/18632a2d5fc_.py
deti/boss
bc0cfe3067bf1cbf26789f7443a36e7cdd2ac869
[ "Apache-2.0" ]
7
2018-05-20T08:56:08.000Z
2022-03-11T15:50:54.000Z
backend/model/migrate/versions/18632a2d5fc_.py
deti/boss
bc0cfe3067bf1cbf26789f7443a36e7cdd2ac869
[ "Apache-2.0" ]
2
2021-06-08T21:12:51.000Z
2022-01-13T01:25:27.000Z
backend/model/migrate/versions/18632a2d5fc_.py
deti/boss
bc0cfe3067bf1cbf26789f7443a36e7cdd2ac869
[ "Apache-2.0" ]
5
2016-10-09T14:52:09.000Z
2020-12-25T01:04:35.000Z
"""Extend event column in account history Revision ID: 18632a2d5fc Revises: 3e19c50e864 Create Date: 2015-06-05 17:49:12.757269 """ # revision identifiers, used by Alembic. revision = '18632a2d5fc' down_revision = '3e19c50e864' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa fr...
21.581818
63
0.670598
0
0
0
0
0
0
0
0
445
0.374895
b522cbe5a92fd1c03c4cc0d0200215ca4a546a8f
8,018
py
Python
grid_user/models.py
topd333/Xlab
28d89b3b18717957229ca52cb2cbbbc20bd31eae
[ "Unlicense" ]
null
null
null
grid_user/models.py
topd333/Xlab
28d89b3b18717957229ca52cb2cbbbc20bd31eae
[ "Unlicense" ]
null
null
null
grid_user/models.py
topd333/Xlab
28d89b3b18717957229ca52cb2cbbbc20bd31eae
[ "Unlicense" ]
null
null
null
import random import datetime from django.db import models from django.contrib.auth.models import ( BaseUserManager, AbstractBaseUser ) from django.utils import timezone SECURTYQUESTION = ( ('1', "What city were you born in?"), ('2', "What is your mother's maiden name?"), ('3', "What street did you gro...
31.077519
114
0.634697
7,512
0.936892
0
0
0
0
0
0
1,451
0.180968
b523c2ff097c63e33e8bee17d44fcc56243d89de
1,729
py
Python
keyboards/inline/in_processing/confirm_keyboard.py
itcosplay/cryptobot
6890cfde64a631bf0e4db55f6873a2217212d801
[ "MIT" ]
null
null
null
keyboards/inline/in_processing/confirm_keyboard.py
itcosplay/cryptobot
6890cfde64a631bf0e4db55f6873a2217212d801
[ "MIT" ]
null
null
null
keyboards/inline/in_processing/confirm_keyboard.py
itcosplay/cryptobot
6890cfde64a631bf0e4db55f6873a2217212d801
[ "MIT" ]
null
null
null
from emoji import emojize from data import all_emoji from aiogram.types import InlineKeyboardMarkup from aiogram.types import InlineKeyboardButton from aiogram.utils.callback_data import CallbackData cb_confirm_close = CallbackData('cb_cc', 'type_btn') def create_kb_confirm_close(): emo_snail = all_emoji['back__...
26.6
76
0.625795
0
0
0
0
0
0
0
0
412
0.224523
b524a997831cceef37fb6ffcb9a5a1813e885500
9,076
py
Python
utils/HCA/a_star.py
proroklab/magat_pathplanning
a2cab3b11abc46904bc45be1762a780becb1e8c7
[ "MIT" ]
40
2021-07-01T03:14:20.000Z
2022-03-23T23:45:22.000Z
utils/HCA/a_star.py
QingbiaoLi/magat_pathplanning
f28429b1a2ab7866c3001b82e6ae9ca3f072c106
[ "MIT" ]
null
null
null
utils/HCA/a_star.py
QingbiaoLi/magat_pathplanning
f28429b1a2ab7866c3001b82e6ae9ca3f072c106
[ "MIT" ]
13
2021-07-14T07:57:16.000Z
2022-03-03T10:43:25.000Z
''' This file contains utility of AStarSearch. Thanks to Binyu Wang for providing the codes. ''' from random import randint import numpy as np class SearchEntry(): def __init__(self, x, y, g_cost, f_cost=0, pre_entry=None): self.x = x self.y = y # cost move form start entry to this entry ...
35.592157
119
0.552336
676
0.074482
0
0
0
0
0
0
1,537
0.169348
b525a442d992316233f044f50e799f9a075c90fa
1,270
py
Python
app/users/tasks.py
atulmishra-one/dairy_management_portal
a07320dc0f4419d4c78f7d2453c63b1c9544aba8
[ "MIT" ]
2
2020-08-02T10:06:19.000Z
2022-03-29T06:10:57.000Z
app/users/tasks.py
atulmishra-one/dairy_management_portal
a07320dc0f4419d4c78f7d2453c63b1c9544aba8
[ "MIT" ]
null
null
null
app/users/tasks.py
atulmishra-one/dairy_management_portal
a07320dc0f4419d4c78f7d2453c63b1c9544aba8
[ "MIT" ]
2
2019-02-03T15:44:02.000Z
2021-03-09T07:30:28.000Z
import xlrd from app.services.extension import task_server, sqlalchemy as db from app.models.core.user import User from app.application import initialize_app try: from app.config.production import ProductionConfig as config_object except ImportError: from app.config.local import LocalConfig as config_object ...
27.608696
71
0.607874
0
0
0
0
949
0.747244
0
0
104
0.08189
b526e227b8af6adb71768eb4900aaf57a69f1acb
3,444
py
Python
savenger.py
SlapBot/GodkillerArmor
27058332cd94c4389b092a621eeedc834d8f5a15
[ "MIT" ]
3
2018-07-06T17:06:28.000Z
2018-09-06T03:31:43.000Z
savenger.py
SlapBot/GodkillerArmor
27058332cd94c4389b092a621eeedc834d8f5a15
[ "MIT" ]
null
null
null
savenger.py
SlapBot/GodkillerArmor
27058332cd94c4389b092a621eeedc834d8f5a15
[ "MIT" ]
1
2018-07-10T00:13:07.000Z
2018-07-10T00:13:07.000Z
from praw import Reddit import random class Savenger: AVENGERS = ["Iron Man", "Doctor Strange", "Star-Lord", "Black Widow", "Thor", "Spider-Man", "Captain America", "Wanda Maximoff", "Bucky Barnes", "Loki", "Hulk", "Black Panther", "Vision", "Gamora", "Drax", "Nebula", ...
44.727273
108
0.626597
3,403
0.988095
0
0
0
0
0
0
963
0.279617
b52a4b91de40afb841386437bc92df7dcd61942d
1,493
py
Python
python-packages/pyRiemann-0.2.2/pyriemann/channelselection.py
rajegannathan/grasp-lift-eeg-cat-dog-solution-updated
ee45bee6f96cdb6d91184abc16f41bba1546c943
[ "BSD-3-Clause" ]
2
2017-08-13T14:09:32.000Z
2018-07-16T23:39:00.000Z
python-packages/pyRiemann-0.2.2/pyriemann/channelselection.py
rajegannathan/grasp-lift-eeg-cat-dog-solution-updated
ee45bee6f96cdb6d91184abc16f41bba1546c943
[ "BSD-3-Clause" ]
null
null
null
python-packages/pyRiemann-0.2.2/pyriemann/channelselection.py
rajegannathan/grasp-lift-eeg-cat-dog-solution-updated
ee45bee6f96cdb6d91184abc16f41bba1546c943
[ "BSD-3-Clause" ]
2
2018-04-02T06:45:11.000Z
2018-07-16T23:39:02.000Z
from .utils.distance import distance from .classification import MDM import numpy from sklearn.base import BaseEstimator, TransformerMixin ########################################################## class ElectrodeSelection(BaseEstimator, TransformerMixin): def __init__(self, nelec=16, metric='riemann'): ...
31.765957
62
0.464836
1,291
0.864702
0
0
0
0
0
0
77
0.051574
b52aa43dd118effc265e50061d8175f3814721d2
1,897
py
Python
syncbase/user/urls.py
gkrnours/syncbase
0e20d400fe83e2157ee6e893a105253d20634808
[ "MIT" ]
null
null
null
syncbase/user/urls.py
gkrnours/syncbase
0e20d400fe83e2157ee6e893a105253d20634808
[ "MIT" ]
null
null
null
syncbase/user/urls.py
gkrnours/syncbase
0e20d400fe83e2157ee6e893a105253d20634808
[ "MIT" ]
null
null
null
from django.conf.urls import url, include from django.contrib.auth import views as auth from user.forms import NewAccountForm from user import views app_name = 'user' urlpatterns = [ # auth url(r'^create/$', views.UserCreate.as_view(), name='create'), url(r'^login/$', auth.login, {'template_name...
34.490909
95
0.655245
0
0
0
0
0
0
0
0
1,022
0.538745
b52daf8a9a6916b3bc3be9fb6b077491427da67f
1,728
py
Python
mac_changer.py
xicoder96/luv-sic
033527b558c3e4d7f254dca1e2f6f0ccf9ff78fe
[ "MIT" ]
null
null
null
mac_changer.py
xicoder96/luv-sic
033527b558c3e4d7f254dca1e2f6f0ccf9ff78fe
[ "MIT" ]
null
null
null
mac_changer.py
xicoder96/luv-sic
033527b558c3e4d7f254dca1e2f6f0ccf9ff78fe
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import subprocess import re import argparse def get_arguments(): parser = argparse.ArgumentParser() parser.add_argument("-i", "--interface", dest="interface", help="interface to change mac address") parser.add_argument("-m", "--mac", dest="new_mac", ...
33.230769
79
0.65162
0
0
0
0
0
0
0
0
583
0.337384
b53016b4f1a8a22aaafbf177615312636a59d031
1,916
py
Python
training/model.py
J77M/stuffy-nose-recognition
e5d8957e2026e9046e6ffee69a60a11a686bc042
[ "MIT" ]
null
null
null
training/model.py
J77M/stuffy-nose-recognition
e5d8957e2026e9046e6ffee69a60a11a686bc042
[ "MIT" ]
null
null
null
training/model.py
J77M/stuffy-nose-recognition
e5d8957e2026e9046e6ffee69a60a11a686bc042
[ "MIT" ]
null
null
null
import tensorflow as tf import numpy as np import time import utils path = r'data/' x, y = utils.reload_data(path) inp_shape = (x[0].shape[0],1) x = np.array(x).reshape(-1, 1000, 1)# change 1000 to your sample lenght if you changed frame (= CHUNK ) or RESOLUTION # prepared for testing and evaluating. try other comb...
39.102041
173
0.641441
0
0
0
0
0
0
0
0
343
0.179019
b5317c9553e4578dd1313a39baa5b57770eff21b
6,163
py
Python
app/api_service/ice_creams/migrations/0001_initial.py
TheRayOfSeasons/worker-heavy-cicd
fa36e89dd68ee2fd8b37bda55d6bb885f31afaa7
[ "MIT" ]
null
null
null
app/api_service/ice_creams/migrations/0001_initial.py
TheRayOfSeasons/worker-heavy-cicd
fa36e89dd68ee2fd8b37bda55d6bb885f31afaa7
[ "MIT" ]
null
null
null
app/api_service/ice_creams/migrations/0001_initial.py
TheRayOfSeasons/worker-heavy-cicd
fa36e89dd68ee2fd8b37bda55d6bb885f31afaa7
[ "MIT" ]
null
null
null
# Generated by Django 3.1.6 on 2021-02-12 07:47 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
66.268817
204
0.646438
6,004
0.974201
0
0
0
0
0
0
1,199
0.194548
b5325a85e324486debcb82eb330c6fd293cb8cf4
1,306
py
Python
game/game/protocol.py
maosplx/L2py
5d81b2ea150c0096cfce184706fa226950f7f583
[ "MIT" ]
7
2020-09-01T21:52:37.000Z
2022-02-25T16:00:08.000Z
game/game/protocol.py
maosplx/L2py
5d81b2ea150c0096cfce184706fa226950f7f583
[ "MIT" ]
4
2021-09-10T22:15:09.000Z
2022-03-25T22:17:43.000Z
game/game/protocol.py
maosplx/L2py
5d81b2ea150c0096cfce184706fa226950f7f583
[ "MIT" ]
9
2020-09-01T21:53:39.000Z
2022-03-30T12:03:04.000Z
import logging from common.api_handlers import handle_request from common.packet import Packet from common.response import Response from common.transport.protocol import TCPProtocol from game.models.world import WORLD from game.session import GameSession from game.states import Connected LOG = logging.getLogger(f"l2p...
30.372093
79
0.658499
968
0.741194
0
0
575
0.440276
547
0.418836
70
0.053599
b532e08e69d241104c91b1c89e9d10205dab72ab
292
py
Python
day6.py
seblars/AdventOfCode2020
dc41181caa50fe03645aa36d70fe0ebd76cd6e25
[ "MIT" ]
1
2020-12-16T09:37:01.000Z
2020-12-16T09:37:01.000Z
day6.py
seblars/AdventOfCode2020
dc41181caa50fe03645aa36d70fe0ebd76cd6e25
[ "MIT" ]
null
null
null
day6.py
seblars/AdventOfCode2020
dc41181caa50fe03645aa36d70fe0ebd76cd6e25
[ "MIT" ]
null
null
null
import fileinput # "day6.txt" groups = [x.split() for x in ''.join(fileinput.input()).split('\n\n')] # part 1 print(sum(len(set([j for sub in group for j in sub])) for group in groups)) # part 2 print(sum(len(set.intersection(*[set(list(j)) for j in group])) for group in groups))
29.2
86
0.64726
0
0
0
0
0
0
0
0
39
0.133562
b53308bf2a97499e9f1e960c2ded7b7ca3598996
370
py
Python
Conditional/Extras/Everton/02.py
Vitor-ORB/algorithms-and-programming-1-ufms
10821e9b580b78b7f78c27e740f3ead9c6b9f0bd
[ "MIT" ]
7
2021-05-25T16:49:20.000Z
2022-02-17T11:57:32.000Z
Conditional/Extras/Everton/02.py
Vitor-ORB/algorithms-and-programming-1-ufms
10821e9b580b78b7f78c27e740f3ead9c6b9f0bd
[ "MIT" ]
null
null
null
Conditional/Extras/Everton/02.py
Vitor-ORB/algorithms-and-programming-1-ufms
10821e9b580b78b7f78c27e740f3ead9c6b9f0bd
[ "MIT" ]
8
2021-05-25T16:49:39.000Z
2021-09-30T18:02:07.000Z
'''Considere o problema de computar o valor absoluto de um número real. O valor absoluto de um número real x é dado por f(x) = x se x >= 0 ou f(x) = -x se x < 0. Projete e implemente um programa em Python que lei um número de ponto flutuante x, calcule e imprima o valor absoluto de x.''' x = float(input()) y = (x**2)...
33.636364
126
0.651351
0
0
0
0
0
0
0
0
311
0.831551
b536ac94f02abdab43e5ca604aa965f6ad2715d0
1,394
py
Python
pyoptmat/solvers.py
Argonne-National-Laboratory/pyoptmat
a6e5e8d0b93c77374d4ccbc65a86262eec5df77b
[ "MIT" ]
null
null
null
pyoptmat/solvers.py
Argonne-National-Laboratory/pyoptmat
a6e5e8d0b93c77374d4ccbc65a86262eec5df77b
[ "MIT" ]
1
2022-03-30T22:20:38.000Z
2022-03-31T15:02:22.000Z
pyoptmat/solvers.py
Argonne-National-Laboratory/pyoptmat
a6e5e8d0b93c77374d4ccbc65a86262eec5df77b
[ "MIT" ]
2
2021-11-16T15:13:54.000Z
2022-01-06T21:35:42.000Z
import torch import warnings def newton_raphson(fn, x0, linsolver = "lu", rtol = 1e-6, atol = 1e-10, miter = 100): """ Solve a nonlinear system with Newton's method. Return the solution and the last Jacobian Args: fn: function that returns the residual and Jacobian x0:...
27.333333
82
0.585366
0
0
0
0
0
0
0
0
770
0.552367
b5373a616def2b1d58dca3805f309b56a4c149e0
323
py
Python
Algo and DSA/LeetCode-Solutions-master/Python/number-of-substrings-with-only-1s.py
Sourav692/FAANG-Interview-Preparation
f523e5c94d582328b3edc449ea16ac6ab28cdc81
[ "Unlicense" ]
3,269
2018-10-12T01:29:40.000Z
2022-03-31T17:58:41.000Z
Algo and DSA/LeetCode-Solutions-master/Python/number-of-substrings-with-only-1s.py
Sourav692/FAANG-Interview-Preparation
f523e5c94d582328b3edc449ea16ac6ab28cdc81
[ "Unlicense" ]
53
2018-12-16T22:54:20.000Z
2022-02-25T08:31:20.000Z
Algo and DSA/LeetCode-Solutions-master/Python/number-of-substrings-with-only-1s.py
Sourav692/FAANG-Interview-Preparation
f523e5c94d582328b3edc449ea16ac6ab28cdc81
[ "Unlicense" ]
1,236
2018-10-12T02:51:40.000Z
2022-03-30T13:30:37.000Z
# Time: O(n) # Space: O(1) class Solution(object): def numSub(self, s): """ :type s: str :rtype: int """ MOD = 10**9+7 result, count = 0, 0 for c in s: count = count+1 if c == '1' else 0 result = (result+count)%MOD return resu...
20.1875
46
0.436533
293
0.907121
0
0
0
0
0
0
85
0.263158
b537ff6eac7f94b76cf8db09b3957cee998efb52
4,531
py
Python
usecase-2/monitoring/fleet-seat-info-monitor/src/seat_res_train_monitor.py
edgefarm/edgefarm-demos
6381d4a2f7f9c1d0632ab8123fed2bd0763d3b34
[ "MIT" ]
null
null
null
usecase-2/monitoring/fleet-seat-info-monitor/src/seat_res_train_monitor.py
edgefarm/edgefarm-demos
6381d4a2f7f9c1d0632ab8123fed2bd0763d3b34
[ "MIT" ]
9
2021-04-21T10:37:45.000Z
2021-07-28T05:56:50.000Z
usecase-2/monitoring/fleet-seat-info-monitor/src/seat_res_train_monitor.py
edgefarm/train-simulation
6381d4a2f7f9c1d0632ab8123fed2bd0763d3b34
[ "MIT" ]
null
null
null
import logging import datetime import asyncio from edgefarm_application.base.application_module import application_module_network_nats from edgefarm_application.base.avro import schemaless_decode from run_task import run_task from state_tracker import StateTracker from schema_loader import schema_load _logger = logg...
31.685315
96
0.608034
4,132
0.91194
0
0
0
0
2,598
0.573383
920
0.203046
b53809b9629204fc4062a7f81e9f288aeb36cec8
302
py
Python
modulo 03/script_03.py
p-g-krish/CursoSecurityToolsPython
7b2205a33d23166a37a6b8105b9ca5863855aa85
[ "Apache-2.0" ]
10
2020-02-13T03:14:29.000Z
2021-09-16T04:32:40.000Z
modulo 03/script_03.py
p-g-krish/CursoSecurityToolsPython
7b2205a33d23166a37a6b8105b9ca5863855aa85
[ "Apache-2.0" ]
null
null
null
modulo 03/script_03.py
p-g-krish/CursoSecurityToolsPython
7b2205a33d23166a37a6b8105b9ca5863855aa85
[ "Apache-2.0" ]
4
2020-02-18T23:42:23.000Z
2021-09-10T05:52:09.000Z
from termcolor import colored, cprint import sys text = colored('Hello, World!', 'red', attrs=['reverse', 'blink']) print(text) cprint('Hello, World!', 'green', 'on_red') for i in range(10): cprint(i, 'magenta', end=' ') cprint("Attention!",'red', attrs=['bold'], file=sys.stdout)
33.555556
68
0.622517
0
0
0
0
0
0
0
0
101
0.334437
b538595bde41c89c5a8fbdc33e2ae560a927b953
1,597
py
Python
src/AML/run_training.py
monkeypants/CartridgeOCR
a2cdaa72e3839a881118b85f5ff7b4515579004b
[ "MIT" ]
2
2021-07-12T02:37:46.000Z
2021-12-28T23:03:20.000Z
src/AML/run_training.py
monkeypants/CartridgeOCR
a2cdaa72e3839a881118b85f5ff7b4515579004b
[ "MIT" ]
28
2021-12-29T00:51:24.000Z
2022-03-24T08:03:59.000Z
src/AML/run_training.py
monkeypants/CartridgeOCR
a2cdaa72e3839a881118b85f5ff7b4515579004b
[ "MIT" ]
4
2021-09-24T16:13:43.000Z
2022-03-09T17:52:35.000Z
import sys from azureml.core import Workspace, Experiment, Environment, ScriptRunConfig from azureml.core.compute import ComputeTarget, AmlCompute from azureml.core.compute_target import ComputeTargetException from shutil import copy ws = Workspace.from_config() # Choose a name for your CPU cluster # cpu_cluster_name...
35.488889
86
0.708203
0
0
0
0
0
0
0
0
318
0.199123
b538fc619dc6adad01e93a8132a517e7cc8b2d80
818
py
Python
tests/conftest.py
cielavenir/pyppmd-py2
c148b8fbe7cb0c0e9f68fdf9a1c3599325f0e4c8
[ "BSD-3-Clause" ]
3
2021-05-04T13:20:39.000Z
2021-11-03T12:43:02.000Z
tests/conftest.py
cielavenir/pyppmd-py2
c148b8fbe7cb0c0e9f68fdf9a1c3599325f0e4c8
[ "BSD-3-Clause" ]
39
2021-04-16T02:55:28.000Z
2022-03-30T14:23:50.000Z
tests/conftest.py
cielavenir/pyppmd-py2
c148b8fbe7cb0c0e9f68fdf9a1c3599325f0e4c8
[ "BSD-3-Clause" ]
3
2021-07-07T17:39:30.000Z
2022-03-30T15:15:44.000Z
import cpuinfo def pytest_benchmark_update_json(config, benchmarks, output_json): """Calculate compression/decompression speed and add as extra_info""" for benchmark in output_json["benchmarks"]: if "data_size" in benchmark["extra_info"]: rate = benchmark["extra_info"].get("data_size", 0.0...
43.052632
110
0.684597
0
0
0
0
0
0
0
0
286
0.349633
b53920dd20dbdafabadb24be44f2a512437147fb
331
py
Python
examples/test_gcld3.py
lbp0200/EasyNMT
d253e9346996a47aa989bb33aed72e531528dc27
[ "Apache-2.0" ]
null
null
null
examples/test_gcld3.py
lbp0200/EasyNMT
d253e9346996a47aa989bb33aed72e531528dc27
[ "Apache-2.0" ]
null
null
null
examples/test_gcld3.py
lbp0200/EasyNMT
d253e9346996a47aa989bb33aed72e531528dc27
[ "Apache-2.0" ]
null
null
null
import time import gcld3 detector = gcld3.NNetLanguageIdentifier(min_num_bytes=0, max_num_bytes=1000) # text = "This text is written in English" text = "薄雾" while True: result = detector.FindLanguage(text=text) print(text, result.probability, result.language) time.s...
25.461538
59
0.65861
0
0
0
0
0
0
0
0
50
0.149254
b539e3fd28c31f9e28937feef603fdbd7a3fc98e
1,593
py
Python
src/0075下一个排列/index.py
zzh2036/OneDayOneLeetcode
1198692e68f8f0dbf15555e45969122e1a92840a
[ "MIT" ]
null
null
null
src/0075下一个排列/index.py
zzh2036/OneDayOneLeetcode
1198692e68f8f0dbf15555e45969122e1a92840a
[ "MIT" ]
null
null
null
src/0075下一个排列/index.py
zzh2036/OneDayOneLeetcode
1198692e68f8f0dbf15555e45969122e1a92840a
[ "MIT" ]
null
null
null
''' 实现获取 下一个排列 的函数,算法需要将给定数字序列重新排列成字典序中下一个更大的排列。 如果不存在下一个更大的排列,则将数字重新排列成最小的排列(即升序排列)。 必须 原地 修改,只允许使用额外常数空间。 示例 1: 输入:nums = [1,2,3] 输出:[1,3,2] 示例 2: 输入:nums = [3,2,1] 输出:[1,2,3] 示例 3: 输入:nums = [1,1,5] 输出:[1,5,1] 示例 4: 输入:nums = [1] 输出:[1]   提示: 1 <= nums.length <= 100 0 <= nums[i] <= 100 ''' class Solution: ...
22.125
61
0.468927
1,411
0.669355
0
0
0
0
0
0
1,056
0.500949
b53a0396d1bab4e9ce336103d0380f331ae41db6
7,906
py
Python
scripts/structural_make_html_report.py
vogelbac/LAB-QA2GO-
be434da7399d396413309f947f4b634d8fae9a17
[ "BSD-3-Clause" ]
14
2019-02-07T10:50:58.000Z
2021-09-03T16:11:00.000Z
scripts/structural_make_html_report.py
vogelbac/LAB-QA2GO-
be434da7399d396413309f947f4b634d8fae9a17
[ "BSD-3-Clause" ]
6
2019-01-28T09:19:27.000Z
2021-09-09T06:56:42.000Z
scripts/structural_make_html_report.py
vogelbac/LAB-QA2GO
be434da7399d396413309f947f4b634d8fae9a17
[ "BSD-3-Clause" ]
4
2019-01-28T09:00:58.000Z
2021-05-25T13:54:40.000Z
# script to generate the overview and individual html report website. import os import numpy def main(result_folder, name, header_comp): menu_html_file_path = '/home/brain/qa/html/menu_html.html' menu_html_file = open(menu_html_file_path, 'r') menu_html = menu_html_file.readlines() menu_html_file.close() resul...
41.610526
193
0.68214
0
0
0
0
0
0
0
0
2,525
0.319378
b53d20ea8c808f96c712a842e16ae3ddaa8b7e31
786
py
Python
argumenta.py
el3ctron/argumenta
3d66425b31a36940ba0dccb1361b250a06b02fec
[ "Apache-2.0" ]
null
null
null
argumenta.py
el3ctron/argumenta
3d66425b31a36940ba0dccb1361b250a06b02fec
[ "Apache-2.0" ]
null
null
null
argumenta.py
el3ctron/argumenta
3d66425b31a36940ba0dccb1361b250a06b02fec
[ "Apache-2.0" ]
null
null
null
class tabla_de_sesgos : def __init__(self) : self.sesgo = None # self.clase_de_sesgo = None # pass class marcador (reproductor, tabla_de_sesgos, registro_de_tiempos, medio) : def __init__(self) : pass def cargar_medio (self) : # returns pass def marcar_tiempos (self) : # returns pass def marcar...
19.170732
75
0.664122
781
0.993639
0
0
0
0
0
0
80
0.101781
b53dea5224a5f4701caa31694ad6c985328e3868
12,226
py
Python
pynetdicom3/sop_class.py
mcgregorandrew/pynetdicom3
1c798f9b0ad086cf0a8d0619e57f2bc2fbbf13f1
[ "MIT" ]
null
null
null
pynetdicom3/sop_class.py
mcgregorandrew/pynetdicom3
1c798f9b0ad086cf0a8d0619e57f2bc2fbbf13f1
[ "MIT" ]
null
null
null
pynetdicom3/sop_class.py
mcgregorandrew/pynetdicom3
1c798f9b0ad086cf0a8d0619e57f2bc2fbbf13f1
[ "MIT" ]
2
2020-09-27T06:41:41.000Z
2021-02-07T06:53:02.000Z
"""Generates the supported SOP Classes.""" from collections import namedtuple import inspect import logging import sys from pydicom.uid import UID from pynetdicom3.service_class import ( VerificationServiceClass, StorageServiceClass, QueryRetrieveServiceClass, BasicWorklistManagementServiceClass, ) ...
49.699187
108
0.679699
0
0
0
0
0
0
0
0
9,389
0.767954
b53df049332ea39e2f7827214e41edfb7e42ca6c
7,885
py
Python
feed_forward_model.py
karlschrader/deepPD
678793c9026eab2681d2d0a3b7e7f9f91c0f3bc5
[ "MIT" ]
null
null
null
feed_forward_model.py
karlschrader/deepPD
678793c9026eab2681d2d0a3b7e7f9f91c0f3bc5
[ "MIT" ]
null
null
null
feed_forward_model.py
karlschrader/deepPD
678793c9026eab2681d2d0a3b7e7f9f91c0f3bc5
[ "MIT" ]
null
null
null
import os from datetime import datetime import numpy as np import tensorflow as tf from tensorflow.python.training import moving_averages TF_DTYPE = tf.float64 MOMENTUM = 0.99 EPSILON = 1e-6 DELTA_CLIP = 50.0 class FeedForwardModel(): """ Abstract class for creating neural networks. Offers functions to ...
38.842365
95
0.557261
7,672
0.972987
0
0
0
0
0
0
2,971
0.376791
b53f8bde038bcadd2b2dcbf0be630c6ab3f7dcdd
122
py
Python
semg_bss/hyser/__init__.py
nihil21/semg-bss
c8abd8aad6ed35e22a31d238adafe28f22bbcb3f
[ "MIT" ]
2
2021-12-09T15:27:42.000Z
2021-12-16T12:48:54.000Z
semg_bss/hyser/__init__.py
nihil21/semg-bss
c8abd8aad6ed35e22a31d238adafe28f22bbcb3f
[ "MIT" ]
null
null
null
semg_bss/hyser/__init__.py
nihil21/semg-bss
c8abd8aad6ed35e22a31d238adafe28f22bbcb3f
[ "MIT" ]
null
null
null
from .dataset import load_pr, load_1dof, load_mvc, load_ndof __all__ = ["load_pr", "load_1dof", "load_mvc", "load_ndof"]
30.5
60
0.737705
0
0
0
0
0
0
0
0
41
0.336066
b540b40d9aaf331bef2f785083b2bbd7ed30bfe6
619
py
Python
Fibonacci/Python/fibonacci.py
IanDoarn/LearningRepo
4c5906b3c1f497a979c3fce89a66d1e571cd6b42
[ "MIT" ]
null
null
null
Fibonacci/Python/fibonacci.py
IanDoarn/LearningRepo
4c5906b3c1f497a979c3fce89a66d1e571cd6b42
[ "MIT" ]
null
null
null
Fibonacci/Python/fibonacci.py
IanDoarn/LearningRepo
4c5906b3c1f497a979c3fce89a66d1e571cd6b42
[ "MIT" ]
null
null
null
""" Fibonacci sequence using python generators Written by: Ian Doarn """ def fib(): # Generator that yields fibonacci numbers a, b = 0, 1 while True: # First iteration: yield a # yield 0 to start with and then a, b = b, a + b # a will now be 1, and b will also be 1,...
23.807692
75
0.55412
0
0
254
0.410339
0
0
0
0
327
0.528271
b543980e156f1837cc8c91284aa02b3f5bbf8218
974
py
Python
Chapter 6/glossary_2.py
WilliamJaber/Python-Crash-Course
d87621785011039fbe0b42f0d8b6cd2364246577
[ "MIT" ]
null
null
null
Chapter 6/glossary_2.py
WilliamJaber/Python-Crash-Course
d87621785011039fbe0b42f0d8b6cd2364246577
[ "MIT" ]
null
null
null
Chapter 6/glossary_2.py
WilliamJaber/Python-Crash-Course
d87621785011039fbe0b42f0d8b6cd2364246577
[ "MIT" ]
5
2021-09-22T16:53:47.000Z
2022-03-24T00:56:49.000Z
glossary = { 'intger': 'is colloquially defined as a number that can be written without a fractional component.\n', 'iterate': 'is the repetition of a process in order to generate a sequence of outcomes.\n', 'indentation': 'is an empty space at the beginning of a line that groups particular blocks of code.\...
64.933333
125
0.710472
0
0
0
0
0
0
0
0
840
0.862423
b543f58cf6e8b8dc209086801165057172e20d3f
1,711
py
Python
scripts/test_spider_roundtrip.py
mattr1/seq2struct_forPRs
cdc9e3c94380fb479ed3e3c77f370038d27cf2d6
[ "MIT" ]
25
2019-07-16T22:32:44.000Z
2022-01-25T05:23:07.000Z
scripts/test_spider_roundtrip.py
mattr1/seq2struct_forPRs
cdc9e3c94380fb479ed3e3c77f370038d27cf2d6
[ "MIT" ]
19
2018-12-17T20:42:11.000Z
2020-02-12T21:29:51.000Z
scripts/test_spider_roundtrip.py
mattr1/seq2struct_forPRs
cdc9e3c94380fb479ed3e3c77f370038d27cf2d6
[ "MIT" ]
22
2019-03-16T05:57:27.000Z
2020-10-25T04:34:54.000Z
import ast import argparse import json import os import pprint import astor import tqdm import _jsonnet from seq2struct import datasets from seq2struct import grammars from seq2struct.utils import registry from third_party.spider import evaluation def main(): parser = argparse.ArgumentParser() parser.add_a...
30.553571
102
0.663939
0
0
0
0
0
0
0
0
269
0.157218
b5441f2ff301c902adbb89a228a3e18af8032444
1,632
py
Python
tune/noniterative/objective.py
fugue-project/tune
bf2288ddcb29c8345d996a9b22c0910da9002da1
[ "Apache-2.0" ]
14
2021-03-03T20:02:09.000Z
2021-11-10T20:32:22.000Z
tune/noniterative/objective.py
fugue-project/tune
bf2288ddcb29c8345d996a9b22c0910da9002da1
[ "Apache-2.0" ]
26
2021-04-30T19:56:06.000Z
2022-01-18T04:40:00.000Z
tune/noniterative/objective.py
fugue-project/tune
bf2288ddcb29c8345d996a9b22c0910da9002da1
[ "Apache-2.0" ]
2
2021-04-30T03:12:21.000Z
2022-02-05T12:13:37.000Z
from tune.constants import TUNE_STOPPER_DEFAULT_CHECK_INTERVAL from typing import Any, Callable, Optional from tune._utils import run_monitored_process from tune.concepts.flow import Trial, TrialReport class NonIterativeObjectiveFunc: def generate_sort_metric(self, value: float) -> float: # pragma: no cover ...
33.306122
85
0.717525
1,051
0.643995
0
0
66
0.040441
0
0
82
0.050245
b545de61a4d0708ce0bd62bccdbaa4f9ddf7238d
371
py
Python
ThinkPython/chap10/ex7.py
sokolowskik/Tutorials
d2681d4f18b03e00f90f9132c77f0b23b74d2629
[ "MIT" ]
null
null
null
ThinkPython/chap10/ex7.py
sokolowskik/Tutorials
d2681d4f18b03e00f90f9132c77f0b23b74d2629
[ "MIT" ]
null
null
null
ThinkPython/chap10/ex7.py
sokolowskik/Tutorials
d2681d4f18b03e00f90f9132c77f0b23b74d2629
[ "MIT" ]
null
null
null
a1 = 'mary' b1 = 'army' a2 = 'mary' b2 = 'mark' def is_anagram(a, b): """ Return True if words a and b are anagrams. Return Flase if otherwise. """ a_list = list(a) b_list = list(b) a_list.sort() b_list.sort() if a_list == b_list: return True else: return False ...
16.130435
46
0.574124
0
0
0
0
0
0
0
0
113
0.304582
b54662251afe3923c7f22e2ffa35d6fb5d4cc63b
459
py
Python
pymotion/models/notification.py
LeResKP/motion
4a7c6200ca6fd20edb3b98c6ea1215c90d988a78
[ "MIT" ]
null
null
null
pymotion/models/notification.py
LeResKP/motion
4a7c6200ca6fd20edb3b98c6ea1215c90d988a78
[ "MIT" ]
null
null
null
pymotion/models/notification.py
LeResKP/motion
4a7c6200ca6fd20edb3b98c6ea1215c90d988a78
[ "MIT" ]
null
null
null
from sqlalchemy import ( Column, ForeignKey, Integer, Text, ) from sqlalchemy.orm import relationship from .meta import Base class Notification(Base): __tablename__ = 'notification' id = Column(Integer, primary_key=True) user_id = Column(Integer, ForeignKey("user.id"), nullable=False) ...
21.857143
77
0.714597
313
0.681917
0
0
0
0
0
0
43
0.093682
b5473421d6c0b8e5ed5978ee678700c80296d6a9
1,340
py
Python
utils/model_helper.py
CocoBir/django-restful-demo
aeb7f8a0bcff5c52b528c7b0c48f87de5f392320
[ "MIT" ]
null
null
null
utils/model_helper.py
CocoBir/django-restful-demo
aeb7f8a0bcff5c52b528c7b0c48f87de5f392320
[ "MIT" ]
null
null
null
utils/model_helper.py
CocoBir/django-restful-demo
aeb7f8a0bcff5c52b528c7b0c48f87de5f392320
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ model helper ~~~~~~~~~~~~ :Created: 2016-8-5 :Copyright: (c) 2016<smileboywtu@gmail.com> """ from customer_exceptions import OffsetOutOfRangeException class ListModelHelper(object): """get the object list""" @classmethod def list(cls, index=0, limit=8, sor...
23.103448
60
0.568657
1,132
0.844776
0
0
931
0.694776
0
0
600
0.447761
b54756c2e6e68e661aab45de212b547f340ad633
2,603
py
Python
djadmin2/templatetags/admin2_tags.py
beezz/django-admin2
4aec1a3836011cd46e5eb8b6375590bf5a76c044
[ "BSD-3-Clause" ]
1
2015-04-30T13:34:03.000Z
2015-04-30T13:34:03.000Z
djadmin2/templatetags/admin2_tags.py
taxido/django-admin2
6a6b3d5f790b8289b0dd0f9194d80799af8804dc
[ "BSD-3-Clause" ]
1
2021-03-19T23:57:09.000Z
2021-03-19T23:57:09.000Z
djadmin2/templatetags/admin2_tags.py
RyanBalfanz/django-admin2
e7f0611eea22370bb3418e25e9cd10ddbac4fd6d
[ "BSD-3-Clause" ]
null
null
null
from django import template register = template.Library() from .. import utils @register.filter def admin2_urlname(view, action): """ Converts the view and the specified action into a valid namespaced URLConf name. """ return utils.admin2_urlname(view, action) @register.filter def model_app_label(...
26.835052
84
0.702651
0
0
0
0
2,495
0.958509
0
0
1,270
0.487899
b5484bee48cb34153d413c1639f3e4d36037235a
2,323
py
Python
tests/test_filters/test_edges.py
luluricketts/biothings_explorer
ae2009ff285f96a08e0145f242846ca613b5069c
[ "Apache-2.0" ]
null
null
null
tests/test_filters/test_edges.py
luluricketts/biothings_explorer
ae2009ff285f96a08e0145f242846ca613b5069c
[ "Apache-2.0" ]
null
null
null
tests/test_filters/test_edges.py
luluricketts/biothings_explorer
ae2009ff285f96a08e0145f242846ca613b5069c
[ "Apache-2.0" ]
null
null
null
""" Tests for edges.py """ import unittest import pandas as pd from biothings_explorer.user_query_dispatcher import SingleEdgeQueryDispatcher from biothings_explorer.filters.edges import filter_node_degree class TestFilterEdges(unittest.TestCase): # test for count values def test_count_values(self): ...
40.754386
106
0.54025
2,066
0.889367
0
0
0
0
0
0
374
0.160999
b54ed986a0849287fd62118ba89a87ae8732ba9e
974
py
Python
get_data.py
ryanw3bb/fpl
a06fbf8ada5f549f0750ed9af46f53b3a1a0149e
[ "MIT" ]
1
2018-08-15T02:52:52.000Z
2018-08-15T02:52:52.000Z
get_data.py
ryanw3bb/fpl
a06fbf8ada5f549f0750ed9af46f53b3a1a0149e
[ "MIT" ]
null
null
null
get_data.py
ryanw3bb/fpl
a06fbf8ada5f549f0750ed9af46f53b3a1a0149e
[ "MIT" ]
null
null
null
""" Retrieves data as json files from fantasy.premierleague.com """ import json import requests LAST_SEASON_DATA_FILENAME = "data/player_data_20_21.json" DATA_URL = "https://fantasy.premierleague.com/api/bootstrap-static/" DATA_FILENAME = "data/player_data_21_22.json" FIXTURES_URL = "https://fantasy.premierleague.c...
24.974359
68
0.74846
0
0
0
0
0
0
0
0
352
0.361396
b54f720607fa63d495bc79cd36045e62028217a1
5,587
py
Python
examples/spawning5.py
MissMeriel/BeamNGpy
a8467c57537441802bc5b56f0012dfee2b5f5af0
[ "MIT" ]
1
2021-08-10T19:29:52.000Z
2021-08-10T19:29:52.000Z
examples/spawning5.py
MissMeriel/BeamNGpy
a8467c57537441802bc5b56f0012dfee2b5f5af0
[ "MIT" ]
null
null
null
examples/spawning5.py
MissMeriel/BeamNGpy
a8467c57537441802bc5b56f0012dfee2b5f5af0
[ "MIT" ]
null
null
null
from beamngpy import BeamNGpy, Vehicle, Scenario, ScenarioObject from beamngpy import setup_logging, Config from beamngpy.sensors import Camera, GForces, Lidar, Electrics, Damage, Timer import beamngpy import time, random # globals default_model = 'pickup' default_scenario = 'west_coast_usa' #'cliff' # smallgrid dt = ...
36.51634
133
0.583139
0
0
0
0
0
0
0
0
1,407
0.251835
b55212239eec52a949a21799291c19c62811b1b2
17,827
py
Python
steam/check_acf.py
DarkStarSword/junk
f0de649a3ef92715fbc6aeff7599ad843763c32b
[ "MIT" ]
19
2015-02-02T16:49:32.000Z
2021-12-04T02:33:10.000Z
steam/check_acf.py
DarkStarSword/junk
f0de649a3ef92715fbc6aeff7599ad843763c32b
[ "MIT" ]
1
2015-07-11T13:57:34.000Z
2015-11-16T02:36:23.000Z
steam/check_acf.py
DarkStarSword/junk
f0de649a3ef92715fbc6aeff7599ad843763c32b
[ "MIT" ]
4
2017-02-06T21:11:17.000Z
2019-04-04T15:11:50.000Z
#!/usr/bin/env python from __future__ import print_function import os, optparse, glob import depotcache, acf from ui import ui_tty as ui import hashlib import sys g_indent = ' ' colours = { False: 'back_red black', True: '' } class UnknownLen(list): pass def depot_summary_ok(mounted): if len(mounted) > 0: ...
35.941532
388
0.710664
398
0.022326
0
0
0
0
0
0
5,998
0.336456
b5523d39a4d4c8cb3b8be163ac345c9888bb29a1
178
py
Python
reference/old/distance-simple.py
Art31/trekking-pro-cefetrj
37ab58759b42978cbd8d950bd75c487e1292cb2b
[ "Apache-1.1" ]
null
null
null
reference/old/distance-simple.py
Art31/trekking-pro-cefetrj
37ab58759b42978cbd8d950bd75c487e1292cb2b
[ "Apache-1.1" ]
null
null
null
reference/old/distance-simple.py
Art31/trekking-pro-cefetrj
37ab58759b42978cbd8d950bd75c487e1292cb2b
[ "Apache-1.1" ]
null
null
null
from gpiozero import DistanceSensor from time import sleep sensor = DistanceSensor(echo=23, trigger=22) while True: print('Distance: ', sensor.distance * 100) sleep(1)
19.777778
46
0.735955
0
0
0
0
0
0
0
0
12
0.067416
b5526b9490a6617e9343309ab67db978943793e5
1,070
py
Python
SmallTips/RemoveDuplication.py
Akasan/PythonTips
eee85c35fd25576c7b2b01af838749608bf8989c
[ "MIT" ]
null
null
null
SmallTips/RemoveDuplication.py
Akasan/PythonTips
eee85c35fd25576c7b2b01af838749608bf8989c
[ "MIT" ]
null
null
null
SmallTips/RemoveDuplication.py
Akasan/PythonTips
eee85c35fd25576c7b2b01af838749608bf8989c
[ "MIT" ]
null
null
null
import pickle def remove_duplicate_from_list(data): """ remove duplications from specific list any data can be contained in the data. if the data is hashable, you can implement this function easily like below. data = list(set(data)) but if the data is unhashable, you have to im...
36.896552
89
0.66729
0
0
0
0
0
0
0
0
651
0.608411
b5533e6640dc60d29a04f82e1a7722aa55036807
7,226
py
Python
ultraviolet_cli/commands/fixtures.py
mnyrop/ultraviolet-cli
f177adde71a899ca6775bd4673d30e19ccdb2a30
[ "MIT" ]
1
2022-02-08T18:28:30.000Z
2022-02-08T18:28:30.000Z
ultraviolet_cli/commands/fixtures.py
mnyrop/ultraviolet-cli
f177adde71a899ca6775bd4673d30e19ccdb2a30
[ "MIT" ]
null
null
null
ultraviolet_cli/commands/fixtures.py
mnyrop/ultraviolet-cli
f177adde71a899ca6775bd4673d30e19ccdb2a30
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2022 NYU Libraries. # # ultraviolet-cli is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Invenio module for custom UltraViolet commands.""" import click import glob import json import os imp...
33.146789
128
0.63313
0
0
0
0
4,900
0.678107
0
0
2,124
0.293939
b553c83a33407279287a7fa673284b12f5a363b1
1,320
py
Python
consts.py
twyair/hebrew-verb-inflection
a85773a008ea3fc1b8c36f92ac3100315edee6b6
[ "MIT" ]
null
null
null
consts.py
twyair/hebrew-verb-inflection
a85773a008ea3fc1b8c36f92ac3100315edee6b6
[ "MIT" ]
null
null
null
consts.py
twyair/hebrew-verb-inflection
a85773a008ea3fc1b8c36f92ac3100315edee6b6
[ "MIT" ]
null
null
null
from __future__ import annotations from enum import Enum, auto class Paradigm(Enum): NONE = auto() KFULIM = auto() KFULIM_2 = auto() # used only for HUFAL NO_PREFIX = auto() # used for words like 'hUnDA!s', 'hU_wA!n', 'nI_sa!H', 'nI_qa!H' PE_ALEF = auto() # used only for PAAL PAAL_1 = auto(...
22
88
0.559848
1,230
0.931818
0
0
0
0
0
0
202
0.15303
b55c52f4a65b506287148bb4b6f73c63cbf60fe9
266
py
Python
cbsettings/exceptions.py
matthewwithanm/django-classbasedsettings
4b208f1c73a2acedc5cd3bfa2b73541607ed9ce8
[ "MIT" ]
23
2015-02-17T13:35:33.000Z
2020-10-02T07:06:24.000Z
cbsettings/exceptions.py
matthewwithanm/django-classbasedsettings
4b208f1c73a2acedc5cd3bfa2b73541607ed9ce8
[ "MIT" ]
8
2015-12-23T19:42:49.000Z
2021-10-01T20:13:40.000Z
cbsettings/exceptions.py
matthewwithanm/django-classbasedsettings
4b208f1c73a2acedc5cd3bfa2b73541607ed9ce8
[ "MIT" ]
4
2015-12-23T19:17:39.000Z
2020-09-27T19:29:13.000Z
class SettingsFactoryDoesNotExist(Exception): pass class InvalidSettingsFactory(Exception): pass class NoMatchingSettings(Exception): """Raised when a suitable settings class cannot be found.""" pass class InvalidCondition(Exception): pass
16.625
64
0.75188
256
0.962406
0
0
0
0
0
0
60
0.225564
b55d244aa62443aced945674009694fb76ee238b
1,834
py
Python
src/function_manager/function_manager.py
lzjzx1122/FaaSFlow
c4a32a04797770c21fe6a0dcacd85ac27a3d29ec
[ "Apache-2.0" ]
24
2021-12-02T01:00:54.000Z
2022-03-27T00:50:28.000Z
src/function_manager/function_manager.py
lzjzx1122/FaaSFlow
c4a32a04797770c21fe6a0dcacd85ac27a3d29ec
[ "Apache-2.0" ]
null
null
null
src/function_manager/function_manager.py
lzjzx1122/FaaSFlow
c4a32a04797770c21fe6a0dcacd85ac27a3d29ec
[ "Apache-2.0" ]
3
2021-12-02T01:00:47.000Z
2022-03-04T07:33:09.000Z
import gevent import docker import os from function_info import parse from port_controller import PortController from function import Function import random repack_clean_interval = 5.000 # repack and clean every 5 seconds dispatch_interval = 0.005 # 200 qps at most # the class for scheduling functions' int...
37.428571
104
0.681025
1,497
0.816249
0
0
0
0
0
0
289
0.157579
b55f0296b5c70a3898760614021a220983b1ac36
333
py
Python
getall.py
bransorem/Magic-Scraper
f68ae25122391efe440c8652119d146a75be4cea
[ "Unlicense" ]
2
2018-07-16T21:24:34.000Z
2020-12-19T21:34:00.000Z
getall.py
bransorem/Magic-Scraper
f68ae25122391efe440c8652119d146a75be4cea
[ "Unlicense" ]
null
null
null
getall.py
bransorem/Magic-Scraper
f68ae25122391efe440c8652119d146a75be4cea
[ "Unlicense" ]
null
null
null
import sets import scan_set import os path = 'ids/' setlist = os.listdir(path) def getall(set): id = scan_set.scan_set(set) scan_set.write_ids(set, id) for set in sets.set_info: s = set + '.txt' if s not in setlist: print "Getting " + set getall(set) print "\n\nCompletely Finis...
15.857143
39
0.615616
0
0
0
0
0
0
0
0
55
0.165165
b55f0ffd6458d9da1434363a2f94293d840e899b
6,717
py
Python
MalmoEnv/run.py
chemgymrl/malmo
207e2530ec94af46450ba6d0e62d691ade91e282
[ "MIT" ]
1
2022-02-17T07:58:06.000Z
2022-02-17T07:58:06.000Z
MalmoEnv/run.py
chemgymrl/malmo
207e2530ec94af46450ba6d0e62d691ade91e282
[ "MIT" ]
null
null
null
MalmoEnv/run.py
chemgymrl/malmo
207e2530ec94af46450ba6d0e62d691ade91e282
[ "MIT" ]
null
null
null
# ------------------------------------------------------------------------------------------------ # Copyright (c) 2018 Microsoft Corporation # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and # associated documentation files (the "Software"), to deal in the Software ...
46.645833
128
0.650737
1,867
0.277951
0
0
0
0
0
0
3,538
0.526723
b55f2629add10c43d98efae9012f1f13e3691bd5
1,172
py
Python
example/wrapper/common/5001-get_tgpio_digital.py
krasin/xArm-Python-SDK-ssh
9c854e8bfa78d0e91b67efbab79f733ddf19e916
[ "BSD-3-Clause" ]
62
2018-11-30T05:53:32.000Z
2022-03-20T13:15:22.000Z
example/wrapper/common/5001-get_tgpio_digital.py
krasin/xArm-Python-SDK-ssh
9c854e8bfa78d0e91b67efbab79f733ddf19e916
[ "BSD-3-Clause" ]
25
2019-08-12T18:53:41.000Z
2021-12-28T10:17:39.000Z
example/wrapper/common/5001-get_tgpio_digital.py
krasin/xArm-Python-SDK-ssh
9c854e8bfa78d0e91b67efbab79f733ddf19e916
[ "BSD-3-Clause" ]
43
2019-01-03T04:47:13.000Z
2022-03-18T06:40:59.000Z
#!/usr/bin/env python3 # Software License Agreement (BSD License) # # Copyright (c) 2019, UFACTORY, Inc. # All rights reserved. # # Author: Vinman <vinman.wen@ufactory.cc> <vinman.cub@gmail.com> """ Example: Get GPIO Digital """ import os import sys import time sys.path.append(os.path.join(os.path.dirname(__file__), ...
23.44
70
0.648464
0
0
0
0
0
0
0
0
365
0.311433
b560237f424501f39681590b33c61e9846076455
2,429
py
Python
sdk/python/pulumi_lxd/__init__.py
soupdiver/pulumi-lxd
258395aefd6a4cf138d470d7de70babed3310063
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_lxd/__init__.py
soupdiver/pulumi-lxd
258395aefd6a4cf138d470d7de70babed3310063
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_lxd/__init__.py
soupdiver/pulumi-lxd
258395aefd6a4cf138d470d7de70babed3310063
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** from . import _utilities import typing # Export this package's modules as members: from .cached_image import * from .container import *...
19.58871
87
0.627419
0
0
0
0
0
0
0
0
1,865
0.767806
b56057ff5dbd4cdc1d25d244ff87b18b26455492
544
py
Python
49-group anagrams/main.py
ytong82/leetcode
34e08c430d654b14b1608211f74702f57e507189
[ "Apache-2.0" ]
null
null
null
49-group anagrams/main.py
ytong82/leetcode
34e08c430d654b14b1608211f74702f57e507189
[ "Apache-2.0" ]
null
null
null
49-group anagrams/main.py
ytong82/leetcode
34e08c430d654b14b1608211f74702f57e507189
[ "Apache-2.0" ]
null
null
null
class Solution: def groupAnagrams(self, strs): l = len(strs) if l == 0: return [] map = dict() for i in range(l): key = ''.join(sorted(strs[i])) if key in map.keys(): map[key].append(i) else: map[key] = ...
22.666667
51
0.443015
444
0.816176
0
0
0
0
0
0
32
0.058824
b561af012e5087c35cc2997a33fe02fbbdb5ae5d
2,429
py
Python
vending.py
mit-dci/litvending
28f8f2b51691eac7c69de153aafbe72663d9892c
[ "MIT" ]
1
2018-06-20T01:42:54.000Z
2018-06-20T01:42:54.000Z
vending.py
mit-dci/litvending
28f8f2b51691eac7c69de153aafbe72663d9892c
[ "MIT" ]
null
null
null
vending.py
mit-dci/litvending
28f8f2b51691eac7c69de153aafbe72663d9892c
[ "MIT" ]
1
2022-02-15T06:48:15.000Z
2022-02-15T06:48:15.000Z
#!/usr/bin/env python3 import os import time import sys gpio = None try: import RPi.GPIO gpio = RPi.GPIO except: print('RPi library not found. We\'re probably on a dev machine. Moving on...') import lvconfig import litrpc # This could be more efficient, we're making a lot more requests than we need to. def che...
26.11828
136
0.669823
0
0
0
0
0
0
0
0
1,025
0.421984
b563b116c6a5501886a56db83d13d435b9bc033e
3,070
py
Python
python-study/2.py
yu1k/python-study
0bf2e2927696f58f36c05602446ecd71e31596e3
[ "MIT" ]
null
null
null
python-study/2.py
yu1k/python-study
0bf2e2927696f58f36c05602446ecd71e31596e3
[ "MIT" ]
null
null
null
python-study/2.py
yu1k/python-study
0bf2e2927696f58f36c05602446ecd71e31596e3
[ "MIT" ]
null
null
null
#*** 文字列 *** #Pythonで文字列を作るには, ' (シングルクォーテーション)もしくは, " (ダブルクォーテーション)で囲む. print('some eggs') print("some eggs") print('some eggs\nsome eggs') #a == b は aとb同値であればTrue, そうでなければFalseを返す演算子です print('some eggs' == "some eggs") #True #'...' の中で ' ,または "..." の中で " を使う場合には, #各記号のまえに \ (バックスラッシュ) を入力する. print("I don't Kno...
17.150838
59
0.70684
0
0
0
0
0
0
0
0
5,108
0.888039
b5656eebed6c2a64ded792a644ba9d21bbe79fe1
570
py
Python
tests/test_delete_query.py
RaduG/fluentql
653a77bb95b40724eb58744f5f8dbed9c88eaebd
[ "MIT" ]
4
2020-04-15T10:50:03.000Z
2021-07-22T12:23:50.000Z
tests/test_delete_query.py
RaduG/fluentql
653a77bb95b40724eb58744f5f8dbed9c88eaebd
[ "MIT" ]
2
2020-05-24T08:54:56.000Z
2020-05-24T09:04:31.000Z
tests/test_delete_query.py
RaduG/fluentql
653a77bb95b40724eb58744f5f8dbed9c88eaebd
[ "MIT" ]
null
null
null
import pytest from fluentql import GenericSQLDialect, Q from fluentql.types import Table test_table = Table("test_table") @pytest.fixture def dialect_cls(): return GenericSQLDialect @pytest.mark.parametrize( ["q", "expected"], [ (Q.delete().from_(test_table), "delete from test_table;"), ...
21.111111
73
0.652632
0
0
0
0
439
0.770175
0
0
98
0.17193
b56b02915f5cdfb61babcb70fc1c32bc2970b2fa
597
py
Python
Section02/ParsingChart.py
fosterleejoe/Developing-NLP-Applications-Using-NLTK-in-Python
f2cac32c02d0632fb89f32446388ef15d9926bbc
[ "MIT" ]
67
2017-11-23T18:48:47.000Z
2022-03-29T08:03:25.000Z
Section02/ParsingChart.py
fosterleejoe/Developing-NLP-Applications-Using-NLTK-in-Python
f2cac32c02d0632fb89f32446388ef15d9926bbc
[ "MIT" ]
null
null
null
Section02/ParsingChart.py
fosterleejoe/Developing-NLP-Applications-Using-NLTK-in-Python
f2cac32c02d0632fb89f32446388ef15d9926bbc
[ "MIT" ]
49
2017-12-06T16:10:14.000Z
2021-11-25T09:02:49.000Z
from nltk.grammar import CFG from nltk.parse.chart import ChartParser, BU_LC_STRATEGY grammar = CFG.fromstring(""" S -> T1 T4 T1 -> NNP VBZ T2 -> DT NN T3 -> IN NNP T4 -> T3 | T2 T3 NNP -> 'Tajmahal' | 'Agra' | 'Bangalore' | 'Karnataka' VBZ -> 'is' IN -> 'in' | 'of' DT -> 'the' NN -> 'capital' """) cp = ChartParser(g...
22.961538
56
0.676717
0
0
0
0
0
0
0
0
241
0.403685
b56b4c5922bce77528a0bba1e6eec4b2613a9cca
62
py
Python
msm_pele/AdaptivePELE/docs/makehtml.py
danielSoler93/msm_pele
80b187ceb6446059f6c7b0dd2c0968f0db4a17a1
[ "MIT" ]
13
2017-06-14T14:42:22.000Z
2022-01-25T08:46:04.000Z
msm_pele/AdaptivePELE/docs/makehtml.py
danielSoler93/msm_pele
80b187ceb6446059f6c7b0dd2c0968f0db4a17a1
[ "MIT" ]
16
2018-01-16T01:32:02.000Z
2021-02-19T17:05:12.000Z
msm_pele/AdaptivePELE/docs/makehtml.py
danielSoler93/msm_pele
80b187ceb6446059f6c7b0dd2c0968f0db4a17a1
[ "MIT" ]
8
2018-02-20T10:47:07.000Z
2022-03-21T12:28:07.000Z
from sphinx import cmdline import sys cmdline.main(sys.argv)
12.4
26
0.806452
0
0
0
0
0
0
0
0
0
0
b56c623a069eaa852720532015deec19073b3d1a
5,526
py
Python
sirbot/slack/wrapper.py
Ovvovy/sirbot-slack
2d27e49cfbc2cb12e87ef3814823d2ad68d0a788
[ "MIT" ]
7
2017-05-06T11:37:25.000Z
2018-11-22T09:46:32.000Z
sirbot/slack/wrapper.py
Ovvovy/sirbot-slack
2d27e49cfbc2cb12e87ef3814823d2ad68d0a788
[ "MIT" ]
19
2017-05-07T16:25:02.000Z
2017-09-22T08:02:59.000Z
sirbot/slack/wrapper.py
Ovvovy/sirbot-slack
2d27e49cfbc2cb12e87ef3814823d2ad68d0a788
[ "MIT" ]
3
2017-05-06T11:37:28.000Z
2017-07-07T09:32:54.000Z
import logging from .store.user import User from .errors import SlackInactiveDispatcher, SlackNoThread logger = logging.getLogger(__name__) class SlackWrapper: """ A class to compose all available functionality of the slack plugin. An instance is offered to all incoming message of all the plugins to ...
32.892857
79
0.596091
5,381
0.97376
0
0
0
0
3,545
0.641513
1,497
0.270901
b56d3d57d3b008ef213624e96067cf823658819f
4,321
py
Python
rc/returninfo/classifier.py
ddangelorb/gthbmining
a7d18623cd14a2ffd2508a4bb6a71b06a5f26215
[ "MIT" ]
4
2019-09-17T02:53:51.000Z
2020-10-23T14:48:16.000Z
rc/returninfo/classifier.py
ddangelorb/gthbmining
a7d18623cd14a2ffd2508a4bb6a71b06a5f26215
[ "MIT" ]
null
null
null
rc/returninfo/classifier.py
ddangelorb/gthbmining
a7d18623cd14a2ffd2508a4bb6a71b06a5f26215
[ "MIT" ]
null
null
null
import warnings warnings.filterwarnings('ignore') #ignore warnings to print values properly import logging import pandas as pd import numpy as np import matplotlib.pyplot as plt from matplotlib.colors import ListedColormap from sklearn.model_selection import train_test_split from sklearn.tree import DecisionTreeClassif...
50.244186
190
0.682249
3,813
0.882435
0
0
0
0
0
0
1,315
0.304328
b56d8510f015d44a803fb673140f624e3488a4d1
326
py
Python
pctiler/pctiler/colormaps/mtbs.py
hobu/planetary-computer-apis
27f5b8ce78737f43b306fa4738007c207a329b5b
[ "MIT" ]
1
2021-11-02T16:13:43.000Z
2021-11-02T16:13:43.000Z
pctiler/pctiler/colormaps/mtbs.py
moradology/planetary-computer-apis-1
81a666e843cd0d8592708b35e1360fb68815816d
[ "MIT" ]
null
null
null
pctiler/pctiler/colormaps/mtbs.py
moradology/planetary-computer-apis-1
81a666e843cd0d8592708b35e1360fb68815816d
[ "MIT" ]
null
null
null
from typing import Dict, List mtbs_colormaps: Dict[str, Dict[int, List[int]]] = { "mtbs-severity": { 0: [0, 0, 0, 0], 1: [0, 100, 0, 255], 2: [127, 255, 212, 255], 3: [255, 255, 0, 255], 4: [255, 0, 0, 255], 5: [127, 255, 0, 255], 6: [255, 255, 255, 255], ...
23.285714
51
0.435583
0
0
0
0
0
0
0
0
15
0.046012
b56dd907e3a9ba7c7134351a3ded86b0fead6823
183
py
Python
run.py
sgilhuly/mire
8ac07af9083831a03a1901c1bb655932111ae4cf
[ "MIT" ]
2
2020-06-15T10:51:43.000Z
2020-08-02T07:38:44.000Z
run.py
sgilhuly/mire
8ac07af9083831a03a1901c1bb655932111ae4cf
[ "MIT" ]
null
null
null
run.py
sgilhuly/mire
8ac07af9083831a03a1901c1bb655932111ae4cf
[ "MIT" ]
1
2018-05-15T04:45:37.000Z
2018-05-15T04:45:37.000Z
import sys from app import app, socketio if __name__ == "__main__": if len(sys.argv) > 1: port = int(sys.argv[1]) else: port=5000 socketio.run(app, host="0.0.0.0", port=port)
18.3
45
0.661202
0
0
0
0
0
0
0
0
19
0.103825
b56fc2f3040d889070f9fe524690dd7b2af07b3c
1,004
py
Python
pyFoam/extractForces.py
mjsauvinen/P4US
ba7bbc77a6e482f612ba5aa5f021a41fcbb23345
[ "MIT" ]
4
2017-06-10T13:34:29.000Z
2021-10-08T14:33:43.000Z
pyFoam/extractForces.py
mjsauvinen/P4US
ba7bbc77a6e482f612ba5aa5f021a41fcbb23345
[ "MIT" ]
8
2018-07-10T12:00:49.000Z
2021-09-16T13:58:59.000Z
pyFoam/extractForces.py
mjsauvinen/P4US
ba7bbc77a6e482f612ba5aa5f021a41fcbb23345
[ "MIT" ]
6
2019-05-03T07:29:12.000Z
2022-01-21T03:10:27.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys import numpy as np import pylab as pl from txtTools import openIOFile # =*=*=*=* FUNCTION DEFINITIONS *=*=*=*=*=*=*=*=*=*=*=* def isolateValues( line , stripChars ): v = [] sl = line.split() for i in xrange(len(sl)): for sc in stripChars: sl[i]...
20.489796
55
0.531873
0
0
0
0
0
0
0
0
243
0.242032
b5708d1fb897807ff8443226c727f7b6941ec2ec
580
py
Python
fluentcheck/tests/tests_is/test_basic_checks_is.py
jstoebel/fluentcheck
9258dab4f46776b5df50528f5028ce2d11a443c5
[ "MIT" ]
83
2018-05-31T13:21:06.000Z
2022-03-20T14:27:49.000Z
fluentcheck/tests/tests_is/test_basic_checks_is.py
jstoebel/fluentcheck
9258dab4f46776b5df50528f5028ce2d11a443c5
[ "MIT" ]
20
2019-02-10T15:07:44.000Z
2021-04-02T13:18:52.000Z
fluentcheck/tests/tests_is/test_basic_checks_is.py
jstoebel/fluentcheck
9258dab4f46776b5df50528f5028ce2d11a443c5
[ "MIT" ]
11
2019-02-16T21:33:11.000Z
2022-03-25T03:39:52.000Z
import unittest from fluentcheck import Is from fluentcheck.exceptions import CheckError # noinspection PyStatementEffect class TestIsBasicChecks(unittest.TestCase): def test_is_none_pass(self): self.assertIsInstance(Is(None).none, Is) def test_is_none_fail(self): with self.assertRaises(Chec...
26.363636
63
0.712069
455
0.784483
0
0
0
0
0
0
62
0.106897
b57121e74eb14c59a54321fc4b77f18535e2b4a3
414
py
Python
back_to_back/apps/calculator/migrations/0003_calculation_last_occurrence.py
mhotwagner/back-to-back
ce8e0a58406d4fd6c20ecc71b8d1c49e6851f752
[ "MIT" ]
null
null
null
back_to_back/apps/calculator/migrations/0003_calculation_last_occurrence.py
mhotwagner/back-to-back
ce8e0a58406d4fd6c20ecc71b8d1c49e6851f752
[ "MIT" ]
null
null
null
back_to_back/apps/calculator/migrations/0003_calculation_last_occurrence.py
mhotwagner/back-to-back
ce8e0a58406d4fd6c20ecc71b8d1c49e6851f752
[ "MIT" ]
null
null
null
# Generated by Django 2.0.2 on 2018-02-18 17:06 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('calculator', '0002_calculation_add_occurrences'), ] operations = [ migrations.AddField( model_name='calculation', na...
21.789474
59
0.625604
321
0.775362
0
0
0
0
0
0
123
0.297101
b57208d1dd6013bfe4af88d2691bee115d3cc089
627
py
Python
api/interests/models.py
sorinburghiu2323/Supervisio
df0b682d031914904547efafb3ec4d060bf96526
[ "MIT" ]
null
null
null
api/interests/models.py
sorinburghiu2323/Supervisio
df0b682d031914904547efafb3ec4d060bf96526
[ "MIT" ]
null
null
null
api/interests/models.py
sorinburghiu2323/Supervisio
df0b682d031914904547efafb3ec4d060bf96526
[ "MIT" ]
null
null
null
from django.db import models from django.core.exceptions import ValidationError from rest_framework.exceptions import ValidationError as DRFValidationError from api.models import TimestampedModel class Interest(TimestampedModel): name = models.CharField(max_length=255, unique=True) def __str__(self): ...
29.857143
75
0.700159
427
0.681021
0
0
0
0
0
0
30
0.047847
b572d60eef0c25ee409f0d4d3f9822ab96421622
3,652
py
Python
src/eddington_gui/boxes/initial_guess_box.py
tsarpaul/eddington-gui
6022c28fde22a97d97e0bcbe357a45d168bdf251
[ "Apache-2.0" ]
null
null
null
src/eddington_gui/boxes/initial_guess_box.py
tsarpaul/eddington-gui
6022c28fde22a97d97e0bcbe357a45d168bdf251
[ "Apache-2.0" ]
null
null
null
src/eddington_gui/boxes/initial_guess_box.py
tsarpaul/eddington-gui
6022c28fde22a97d97e0bcbe357a45d168bdf251
[ "Apache-2.0" ]
null
null
null
"""Box for specifying initial guess for the fitting algorithm.""" from typing import Callable, List, Optional import numpy as np import toga from eddington import EddingtonException from toga.style import Pack from eddington_gui.boxes.line_box import LineBox from eddington_gui.consts import SMALL_INPUT_WIDTH class ...
34.780952
87
0.618839
3,337
0.913746
0
0
2,019
0.552848
0
0
773
0.211665
b5742eb898932211cf75e05e216d0c94c86949cb
418
py
Python
examples/select.py
GBS3/cues
09bce776f9275b71a4028e5c59103e45d81ebed6
[ "MIT" ]
1
2021-09-13T02:29:43.000Z
2021-09-13T02:29:43.000Z
examples/select.py
giosali/cues
09bce776f9275b71a4028e5c59103e45d81ebed6
[ "MIT" ]
null
null
null
examples/select.py
giosali/cues
09bce776f9275b71a4028e5c59103e45d81ebed6
[ "MIT" ]
1
2021-05-26T04:35:47.000Z
2021-05-26T04:35:47.000Z
""" examples.select =============== An example that demonstrates the Select child class. """ from cues.cues import Select def main(): name = 'programming_language' message = 'Which of these is your favorite programming language?' options = ['Python', 'JavaScript', 'C++', 'C#'] cue = Select(name, me...
18.173913
69
0.629187
0
0
0
0
0
0
0
0
209
0.5
b576d5aece893c6e7258835bd199ea37f39fabca
6,685
py
Python
ckanext/satreasury/tests/test_plugin.py
OpenUpSA/ckanext-satreasury
b6e71009ee5fdfe8cc477304b10536b5af614de6
[ "MIT" ]
1
2019-09-08T08:56:54.000Z
2019-09-08T08:56:54.000Z
ckanext/satreasury/tests/test_plugin.py
vulekamali/ckanext-satreasury
b6e71009ee5fdfe8cc477304b10536b5af614de6
[ "MIT" ]
3
2020-03-24T17:05:46.000Z
2021-02-02T22:01:44.000Z
ckanext/satreasury/tests/test_plugin.py
vulekamali/ckanext-satreasury
b6e71009ee5fdfe8cc477304b10536b5af614de6
[ "MIT" ]
1
2019-05-30T19:30:22.000Z
2019-05-30T19:30:22.000Z
import json import unittest from functools import partial import ckan.model as model import responses from ckanext.satreasury.plugin import SATreasuryDatasetPlugin from mock import MagicMock, Mock, PropertyMock, patch TRAVIS_ENDPOINT = "https://api.travis-ci.org/repo/vulekamali%2Fstatic-budget-portal" TRAVIS_COMMIT_M...
43.129032
219
0.57457
6,236
0.932835
0
0
6,159
0.921316
0
0
2,228
0.333283
b57c5c0aef7e6b76df1071bc270b08f415d805ee
2,011
py
Python
src/kbpo/db_evaluation.py
arunchaganty/kbp-online
9f8763d8f4bfb1fb8a01f1f4f506f56625dd38d8
[ "MIT" ]
4
2017-08-09T14:05:48.000Z
2018-12-25T01:34:23.000Z
src/kbpo/db_evaluation.py
arunchaganty/kbp-online
9f8763d8f4bfb1fb8a01f1f4f506f56625dd38d8
[ "MIT" ]
12
2017-01-19T23:18:18.000Z
2018-12-23T18:57:54.000Z
src/kbpo/db_evaluation.py
arunchaganty/kbp-online
9f8763d8f4bfb1fb8a01f1f4f506f56625dd38d8
[ "MIT" ]
2
2017-08-08T09:48:20.000Z
2018-07-09T09:12:43.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Routines to evaluate the system. """ import logging from collections import Counter from . import db logger = logging.getLogger(__name__) def get_exhaustive_samples(corpus_tag): """ Use the document_sample table to get which documents have been exhaustively...
40.22
147
0.635007
0
0
0
0
0
0
0
0
1,302
0.647439
b57f76841f0c85c583ef9797290a21bbf823a12e
2,212
py
Python
model_metadata/utils.py
csdms/model_metadata
62acab7ae2a152bec64bc1f52751f7a8aa1d4184
[ "MIT" ]
1
2021-05-25T14:38:10.000Z
2021-05-25T14:38:10.000Z
model_metadata/utils.py
csdms/model_metadata
62acab7ae2a152bec64bc1f52751f7a8aa1d4184
[ "MIT" ]
3
2018-04-05T21:50:24.000Z
2021-04-02T03:54:04.000Z
model_metadata/utils.py
csdms/model_metadata
62acab7ae2a152bec64bc1f52751f7a8aa1d4184
[ "MIT" ]
null
null
null
#! /usr/bin/env python import os import sys from .api import install as install_mmd def model_data_dir(name, datarootdir=None): """Get a model's data dir. Parameters ---------- name : str The name of the model. Returns ------- str The absolute path to the data directory ...
26.97561
66
0.574593
819
0.370253
0
0
0
0
0
0
328
0.148282
b582e5842d21e445f1825c2debc8042c425aedda
8,060
py
Python
solution/serverlist.py
ksh0165/lhms
8848a74ac5c0f309e3ab28583af4bd574575ab8a
[ "Apache-2.0" ]
null
null
null
solution/serverlist.py
ksh0165/lhms
8848a74ac5c0f309e3ab28583af4bd574575ab8a
[ "Apache-2.0" ]
null
null
null
solution/serverlist.py
ksh0165/lhms
8848a74ac5c0f309e3ab28583af4bd574575ab8a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 import os import subprocess import re import pymysql from datetime import datetime strPath = r"/etc/webmin/servers";# file dir files = os.listdir(strPath) lists = [];# file lists host = []; user = []; pwd = []; val = 0;# extractServer use test = "";# grep host test1 = "";# grep user test2 = "";# gre...
42.198953
150
0.458561
0
0
0
0
0
0
0
0
3,909
0.484988
b58403121af69cb7645522d11585b8ed10c27038
579
py
Python
algorithms/tree_level_width.py
danielhgasparin/algorithms-python
4b27c3cddd22762599fe55d3b760f388733c4fa7
[ "MIT" ]
null
null
null
algorithms/tree_level_width.py
danielhgasparin/algorithms-python
4b27c3cddd22762599fe55d3b760f388733c4fa7
[ "MIT" ]
null
null
null
algorithms/tree_level_width.py
danielhgasparin/algorithms-python
4b27c3cddd22762599fe55d3b760f388733c4fa7
[ "MIT" ]
null
null
null
"""Tree level width module.""" from collections import deque def tree_level_width(tree): """Return a list containing the width of each level of the specified tree.""" result = [] count = 0 queue = deque([tree.root, "s"]) while len(queue) > 0: node = queue.popleft() if node == "s": ...
26.318182
81
0.504318
0
0
0
0
0
0
0
0
116
0.200345
b5843a61298c91586c4a21bf7567496274b5cfe9
592
py
Python
tests/utils/test_bbox.py
Swall0w/clib
46f659783d5a0a6ec5994c3c707c1cc8a7934385
[ "MIT" ]
1
2017-08-27T00:01:27.000Z
2017-08-27T00:01:27.000Z
tests/utils/test_bbox.py
Swall0w/clib
46f659783d5a0a6ec5994c3c707c1cc8a7934385
[ "MIT" ]
49
2017-08-20T02:09:26.000Z
2017-12-31T11:58:27.000Z
tests/utils/test_bbox.py
Swall0w/clib
46f659783d5a0a6ec5994c3c707c1cc8a7934385
[ "MIT" ]
1
2017-12-08T08:31:38.000Z
2017-12-08T08:31:38.000Z
import os import unittest import clib from clib.utils import Box class BboxTest(unittest.TestCase): def setUp(self): self.bbox = Box(50, 50, 40, 60) def test_vi_bbox(self): self.assertEqual(self.bbox.int_left_top(), (30, 20)) self.assertEqual(self.bbox.int_right_bottom(), (70, 80)) ...
26.909091
64
0.646959
475
0.802365
0
0
0
0
0
0
10
0.016892
b586010d4e3392e2a65d444fb3bb7f33c20e15b9
67,167
py
Python
iriusrisk-python-client-lib/iriusrisk_python_client_lib/api/users_api.py
iriusrisk/iriusrisk-python-client-lib
4912706cd1e5c0bc555dbc7da02fb64cbeab3b18
[ "Apache-2.0" ]
null
null
null
iriusrisk-python-client-lib/iriusrisk_python_client_lib/api/users_api.py
iriusrisk/iriusrisk-python-client-lib
4912706cd1e5c0bc555dbc7da02fb64cbeab3b18
[ "Apache-2.0" ]
null
null
null
iriusrisk-python-client-lib/iriusrisk_python_client_lib/api/users_api.py
iriusrisk/iriusrisk-python-client-lib
4912706cd1e5c0bc555dbc7da02fb64cbeab3b18
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ IriusRisk API Products API # noqa: E501 OpenAPI spec version: 1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # noqa: F401 # python 2 and python 3 compatibility library import six from iriusrisk_py...
46.322069
390
0.634448
66,800
0.994536
0
0
0
0
0
0
37,773
0.562374
b5888f3a509cecfa1613e21a4254b8b55ec9d01b
1,246
py
Python
gcd/lop.py
bthate/genocide
8de7a2cccee7315ae6cf5661738ba1335e30a5ba
[ "DOC" ]
null
null
null
gcd/lop.py
bthate/genocide
8de7a2cccee7315ae6cf5661738ba1335e30a5ba
[ "DOC" ]
null
null
null
gcd/lop.py
bthate/genocide
8de7a2cccee7315ae6cf5661738ba1335e30a5ba
[ "DOC" ]
null
null
null
# This file is placed in the Public Domain. import queue import threading from .dpt import Dispatcher from .obj import Object from .thr import launch from .utl import get_exception class Restart(Exception): pass class Stop(Exception): pass class Loop(Object): def __init__(self): super().__...
18.878788
43
0.544944
1,054
0.845907
0
0
0
0
0
0
51
0.040931
b58c5490649547fd191436f9730cc2a2c51f3b00
3,619
py
Python
src/utils.py
Flantropy/TelegramChatAnalyzer
88e879fa771361d47292721ff8adfd82a74e9b93
[ "MIT" ]
null
null
null
src/utils.py
Flantropy/TelegramChatAnalyzer
88e879fa771361d47292721ff8adfd82a74e9b93
[ "MIT" ]
null
null
null
src/utils.py
Flantropy/TelegramChatAnalyzer
88e879fa771361d47292721ff8adfd82a74e9b93
[ "MIT" ]
null
null
null
import json import logging from io import BytesIO from typing import List from typing import Optional import matplotlib.pyplot as plt import pandas as pd import seaborn as sns from telegram import InputMediaPhoto def __convert_plot_to_telegram_photo(plot) -> InputMediaPhoto: with BytesIO() as buffer: plo...
30.411765
94
0.671733
0
0
0
0
0
0
0
0
619
0.170947
b58c5890c2ea7e046b469064a62ceb8bea1ea212
2,215
py
Python
pyxrd/calculations/improve.py
PyXRD/pyxrd
26bacdf64f3153fa74b8caa62e219b76d91a55c1
[ "BSD-2-Clause" ]
27
2018-06-15T15:28:18.000Z
2022-03-10T12:23:50.000Z
pyxrd/calculations/improve.py
PyXRD/pyxrd
26bacdf64f3153fa74b8caa62e219b76d91a55c1
[ "BSD-2-Clause" ]
22
2018-06-14T08:29:16.000Z
2021-07-05T13:33:44.000Z
pyxrd/calculations/improve.py
PyXRD/pyxrd
26bacdf64f3153fa74b8caa62e219b76d91a55c1
[ "BSD-2-Clause" ]
8
2019-04-13T13:03:51.000Z
2021-06-19T09:29:11.000Z
# coding=UTF-8 # ex:ts=4:sw=4:et=on # Copyright (c) 2013, Mathijs Dumon # All rights reserved. # Complete license can be found in the LICENSE file. from io import StringIO from scipy.optimize import fmin_l_bfgs_b from .exceptions import wrap_exceptions def setup_project(projectf): from pyxrd.file_parsers.json_...
27.012195
86
0.648307
0
0
0
0
1,687
0.761625
0
0
408
0.184199
b58ccbfff32cc054d600f5f7877ef4514f099933
931
py
Python
enforceTH.py
Multivalence/enforceTypeHint
fb87fd48baa525044516ddbdf2160128e03fb7b7
[ "MIT" ]
null
null
null
enforceTH.py
Multivalence/enforceTypeHint
fb87fd48baa525044516ddbdf2160128e03fb7b7
[ "MIT" ]
null
null
null
enforceTH.py
Multivalence/enforceTypeHint
fb87fd48baa525044516ddbdf2160128e03fb7b7
[ "MIT" ]
1
2020-12-16T18:34:19.000Z
2020-12-16T18:34:19.000Z
import functools def enforceType(func): @functools.wraps(func) def wrapper(*args): wrapper.has_been_called = True x = func.__annotations__ t = [x[i] for i in x if i != 'return'] if len(args) != len(t): raise TypeError("Missing required positional arguments and/or annotations.") for i in range(...
23.275
94
0.664876
0
0
0
0
837
0.899033
0
0
227
0.243824
b591052db3d50aa3c4ca4b5f6cbba2c5ca1708a6
3,239
py
Python
examples/DataRecording/runDataRecording.py
mumuwoyou/pytrader
6b94e0c8ecbc3ef238cf31715acf8474b9d26b4a
[ "MIT" ]
4
2019-03-14T05:30:59.000Z
2021-11-21T20:05:22.000Z
examples/DataRecording/runDataRecording.py
mumuwoyou/pytrader
6b94e0c8ecbc3ef238cf31715acf8474b9d26b4a
[ "MIT" ]
null
null
null
examples/DataRecording/runDataRecording.py
mumuwoyou/pytrader
6b94e0c8ecbc3ef238cf31715acf8474b9d26b4a
[ "MIT" ]
4
2019-02-14T14:30:46.000Z
2021-01-05T09:46:19.000Z
# encoding: UTF-8 from __future__ import print_function import sys try: reload(sys) # Python 2 sys.setdefaultencoding('utf8') except NameError: pass # Python 3 import multiprocessing from time import sleep from datetime import datetime, time from cyvn.trader.vtEvent import EVENT_LOG, EVENT_REC...
26.120968
77
0.562211
0
0
0
0
0
0
0
0
1,084
0.293052
b5913a9cb235f8d0707df68f9171ff05c9b0c7aa
232
py
Python
2.4 lcm.py
rahul263-stack/PROJECT-Dump
d8b1cfe0da8cad9fe2f3bbd427334b979c7d2c09
[ "MIT" ]
1
2020-04-06T04:41:56.000Z
2020-04-06T04:41:56.000Z
2.4 lcm.py
rahul263-stack/quarantine
d8b1cfe0da8cad9fe2f3bbd427334b979c7d2c09
[ "MIT" ]
null
null
null
2.4 lcm.py
rahul263-stack/quarantine
d8b1cfe0da8cad9fe2f3bbd427334b979c7d2c09
[ "MIT" ]
null
null
null
# Python3 a, b = [int(i) for i in input().split()] def euclid_gcd(a, b): if b == 0: return a c = a%b return euclid_gcd(b, c) if a>b: gcd = euclid_gcd(a, b) else: gcd = euclid_gcd(b, a) print(a*b//gcd)
14.5
40
0.534483
0
0
0
0
0
0
0
0
9
0.038793
b59341fea7f0dca1f065a80700c550e7ea708375
711
py
Python
environments/__init__.py
electronicarts/character-motion-vaes
d8ff62f3a9f7fd330ebd797df3e7f8f7ec7c3816
[ "BSD-3-Clause" ]
132
2021-03-12T18:45:19.000Z
2022-03-28T16:54:33.000Z
environments/__init__.py
electronicarts/character-motion-vaes
d8ff62f3a9f7fd330ebd797df3e7f8f7ec7c3816
[ "BSD-3-Clause" ]
5
2021-03-14T08:41:32.000Z
2022-01-29T21:58:22.000Z
environments/__init__.py
electronicarts/character-motion-vaes
d8ff62f3a9f7fd330ebd797df3e7f8f7ec7c3816
[ "BSD-3-Clause" ]
13
2021-03-16T13:06:20.000Z
2021-12-29T11:57:38.000Z
import os current_dir = os.path.dirname(os.path.realpath(__file__)) import gym from gym.envs.registration import registry, make, spec def register(id, *args, **kvargs): if id in registry.env_specs: return else: return gym.envs.registration.register(id, *args, **kvargs) register(id="RandomW...
33.857143
84
0.773558
0
0
0
0
0
0
0
0
271
0.381153
b59346ae49540ddec35f1665aa5dcc8cc4da2da0
471
py
Python
libya_elections/tests/test_schedule.py
SmartElect/SmartElect
d6d35f2fa8f60e756ad5247f8f0a5f05830e92f8
[ "Apache-2.0" ]
23
2015-10-28T14:08:23.000Z
2021-09-11T21:38:41.000Z
libya_elections/tests/test_schedule.py
SmartElect/SmartElect
d6d35f2fa8f60e756ad5247f8f0a5f05830e92f8
[ "Apache-2.0" ]
4
2019-12-05T20:36:10.000Z
2020-06-05T18:41:54.000Z
libya_elections/tests/test_schedule.py
SmartElect/SmartElect
d6d35f2fa8f60e756ad5247f8f0a5f05830e92f8
[ "Apache-2.0" ]
11
2015-10-28T15:49:56.000Z
2021-09-14T14:18:36.000Z
import datetime from django.test import TestCase from libya_elections.utils import at_noon class ScheduleTest(TestCase): def test_at_noon(self): # at_noon returns a datetime with the right values dt = datetime.datetime(1970, 2, 3, 4, 5, 6, 7) result = at_noon(dt) self.assertEqual(...
29.4375
58
0.685775
376
0.798301
0
0
0
0
0
0
50
0.106157
b5934a3e23d4a7debafa86c699f518b3070881a9
153
py
Python
website/website/apps/statistics/urls.py
SimonGreenhill/Language5
c59f502dda7be27fc338f0338cc3b03e63bad9c8
[ "MIT" ]
1
2020-08-17T05:56:16.000Z
2020-08-17T05:56:16.000Z
website/website/apps/statistics/urls.py
SimonGreenhill/Language5
c59f502dda7be27fc338f0338cc3b03e63bad9c8
[ "MIT" ]
5
2020-06-05T17:51:56.000Z
2022-01-13T00:42:51.000Z
website/website/apps/statistics/urls.py
SimonGreenhill/Language5
c59f502dda7be27fc338f0338cc3b03e63bad9c8
[ "MIT" ]
1
2015-02-23T22:54:00.000Z
2015-02-23T22:54:00.000Z
from django.conf.urls import url from website.apps.statistics.views import statistics urlpatterns = [ url(r'^$', statistics, name="statistics"), ]
19.125
52
0.732026
0
0
0
0
0
0
0
0
17
0.111111
b593abbfc1101fb51b4b3e49fd3161d9712060e7
12,779
py
Python
sitk_rtss_io.py
Auto-segmentation-in-Radiation-Oncology/Chapter-3
307330c848c7ddb650353484e18fa9bc7903f737
[ "BSD-3-Clause" ]
1
2020-06-28T01:57:46.000Z
2020-06-28T01:57:46.000Z
sitk_rtss_io.py
Auto-segmentation-in-Radiation-Oncology/Chapter-12
307330c848c7ddb650353484e18fa9bc7903f737
[ "BSD-3-Clause" ]
null
null
null
sitk_rtss_io.py
Auto-segmentation-in-Radiation-Oncology/Chapter-12
307330c848c7ddb650353484e18fa9bc7903f737
[ "BSD-3-Clause" ]
1
2021-11-15T21:47:17.000Z
2021-11-15T21:47:17.000Z
from skimage import measure import pydicom from pydicom.dataset import Dataset, FileDataset from pydicom.sequence import Sequence import os import numpy as np import SimpleITK as sITK import time import glob import sitk_ct_io as imio from skimage.draw import polygon # for debugging # import matplotlib.p...
44.526132
120
0.642069
0
0
0
0
0
0
0
0
1,982
0.155098
b59742af888cb2d88c4cbf6cba219ceb64599613
2,364
py
Python
code/opt_algo/downhillsimplex_untested.py
nicolai-schwartze/Masterthesis
7857af20c6b233901ab3cedc325bd64704111e16
[ "MIT" ]
1
2020-06-13T10:02:02.000Z
2020-06-13T10:02:02.000Z
code/opt_algo/downhillsimplex_untested.py
nicolai-schwartze/Masterthesis
7857af20c6b233901ab3cedc325bd64704111e16
[ "MIT" ]
null
null
null
code/opt_algo/downhillsimplex_untested.py
nicolai-schwartze/Masterthesis
7857af20c6b233901ab3cedc325bd64704111e16
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Apr 20 14:03:18 2020 @author: Nicolai """ import sys sys.path.append("../differential_evolution") from JADE import JADE import numpy as np import scipy as sc import testFunctions as tf def downhillsimplex(population, function, minError, maxFeval): ''' implementatio...
26.863636
87
0.593909
0
0
0
0
0
0
0
0
1,243
0.525804
b5977a635ec36409ea956827d6f1116885b0d8e3
7,030
py
Python
bot_instagram.py
Lucas-Okamura/Instagram-Bot
e5e515f55a351c20add2389723dbbef452dc371b
[ "MIT" ]
1
2020-08-24T20:05:13.000Z
2020-08-24T20:05:13.000Z
bot_instagram.py
Lucas-Okamura/Instagram-Bot
e5e515f55a351c20add2389723dbbef452dc371b
[ "MIT" ]
null
null
null
bot_instagram.py
Lucas-Okamura/Instagram-Bot
e5e515f55a351c20add2389723dbbef452dc371b
[ "MIT" ]
null
null
null
from selenium import webdriver from selenium.webdriver.common.keys import Keys import time import random import pandas as pd import os class InstagramBot: def __init__(self, username, password, function, url, num_people=1): ''' Bot that comment on photos on Instagram Args: usern...
32.546296
187
0.52845
6,895
0.980378
0
0
502
0.071378
0
0
2,451
0.3485