hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
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
4
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
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
4
247
max_forks_repo_name
stringlengths
4
130
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
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
09e2dc619c35d5411db322a66ca58bf665f99b11
5,297
py
Python
_modules/disa_stig7.py
sunayu/disa_stig7
7a0905129b9fd2fc3777b4c2143054ed5736b914
[ "Apache-2.0" ]
12
2018-07-06T03:49:55.000Z
2021-04-22T14:38:01.000Z
_modules/disa_stig7.py
sunayu/disa_stig7
7a0905129b9fd2fc3777b4c2143054ed5736b914
[ "Apache-2.0" ]
2
2019-01-15T15:44:37.000Z
2019-01-16T13:57:57.000Z
_modules/disa_stig7.py
sunayu/disa_stig7
7a0905129b9fd2fc3777b4c2143054ed5736b914
[ "Apache-2.0" ]
3
2018-11-30T14:51:33.000Z
2019-10-09T17:09:59.000Z
# Copyright [2018] [Sunayu LLC] # # 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 law or agreed to...
29.104396
107
0.58939
# Copyright [2018] [Sunayu LLC] # # 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 law or agreed to...
0
0
0
0
0
4,002
0
-12
184
f9f3cbd68c16ef7e7c923d55e2389dd8e2c192bf
2,758
py
Python
migrations/versions/df19fc248886_initial_migration.py
martingathu/Pitches
436098ec1457b52dcaf8d3472acc04200cda4176
[ "MIT" ]
null
null
null
migrations/versions/df19fc248886_initial_migration.py
martingathu/Pitches
436098ec1457b52dcaf8d3472acc04200cda4176
[ "MIT" ]
null
null
null
migrations/versions/df19fc248886_initial_migration.py
martingathu/Pitches
436098ec1457b52dcaf8d3472acc04200cda4176
[ "MIT" ]
null
null
null
"""Initial Migration Revision ID: df19fc248886 Revises: Create Date: 2020-05-04 14:05:37.920674 """ # revision identifiers, used by Alembic. revision = 'df19fc248886' down_revision = None branch_labels = None depends_on = None
41.787879
135
0.680566
"""Initial Migration Revision ID: df19fc248886 Revises: Create Date: 2020-05-04 14:05:37.920674 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'df19fc248886' down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands auto ...
0
0
0
0
0
2,431
0
3
90
4461c8604a4346809d117ad8771559742a70c7bf
283
py
Python
backend/flockly/mongo.py
Flockly/Flockly
1dcaa4d17f049ceba2566d182106c7f898455657
[ "WTFPL" ]
1
2018-04-26T23:34:09.000Z
2018-04-26T23:34:09.000Z
backend/flockly/mongo.py
Flockly/Flockly
1dcaa4d17f049ceba2566d182106c7f898455657
[ "WTFPL" ]
null
null
null
backend/flockly/mongo.py
Flockly/Flockly
1dcaa4d17f049ceba2566d182106c7f898455657
[ "WTFPL" ]
null
null
null
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # $File: mongo.py # $Date: Fri Feb 14 20:24:26 2014 +0800 # $Author: Xiaoyu Liu <i[at]vuryleo[dot]com> """database connections""" from mongoengine import connect import config connect(config.DATABASE_NAME) # vim: foldmethod=marker
17.6875
44
0.699647
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # $File: mongo.py # $Date: Fri Feb 14 20:24:26 2014 +0800 # $Author: Xiaoyu Liu <i[at]vuryleo[dot]com> """database connections""" from mongoengine import connect import config connect(config.DATABASE_NAME) # vim: foldmethod=marker
0
0
0
0
0
0
0
0
0
d69bcdf60b5d6215abeabf00591c19e611756a14
2,084
py
Python
inter_data.py
CNwangbin/deepgozero
d2327c93d301662197cf8aced4a65b5bd3217123
[ "BSD-3-Clause" ]
5
2022-01-21T18:07:29.000Z
2022-03-16T21:38:52.000Z
inter_data.py
CNwangbin/deepgozero
d2327c93d301662197cf8aced4a65b5bd3217123
[ "BSD-3-Clause" ]
2
2022-03-02T07:35:43.000Z
2022-03-04T01:51:19.000Z
inter_data.py
CNwangbin/deepgozero
d2327c93d301662197cf8aced4a65b5bd3217123
[ "BSD-3-Clause" ]
2
2022-01-13T13:30:00.000Z
2022-03-01T10:49:55.000Z
if __name__ == '__main__': main()
30.202899
88
0.56334
import click as ck import pandas as pd import gzip @ck.command() @ck.option( '--data-file', '-df', default='data/swissprot_exp_annots.pkl', help='Data file generated by uni2pandas script') @ck.option( '--inter-file', '-if', default=f'data/protein.links.full.v11.0.txt.gz', help='Data file with interacti...
0
1,969
0
0
0
0
0
-15
89
36f172e86974dc32e0992bbc848591f9dbfabcb2
1,987
py
Python
jessiql/sainfo/relations.py
kolypto/py-jessiql
724a1eda84e912483bb2d96bb0f74ce6a12098a3
[ "MIT" ]
null
null
null
jessiql/sainfo/relations.py
kolypto/py-jessiql
724a1eda84e912483bb2d96bb0f74ce6a12098a3
[ "MIT" ]
null
null
null
jessiql/sainfo/relations.py
kolypto/py-jessiql
724a1eda84e912483bb2d96bb0f74ce6a12098a3
[ "MIT" ]
null
null
null
from __future__ import annotations try: # Python 3.9+ from functools import cache except ImportError: # Python 3.8 # region: Relation Attribute types # endregion # region Relation Attribute info # endregion
25.151899
109
0.749371
from __future__ import annotations from sqlalchemy.orm import RelationshipProperty from sqlalchemy.orm.attributes import InstrumentedAttribute from sqlalchemy.orm.base import ( ONETOMANY, MANYTOONE, MANYTOMANY, ) from sqlalchemy.orm.dynamic import DynaLoader try: # Python 3.9+ from functools impor...
0
757
0
0
0
457
0
224
320
a432a23771d1a3d909226a6514489611f7b5bf1a
3,190
py
Python
app/adm/urls.py
rogeriopaulos/gep
e56fd0450bdb8f572e2e35cc59a74ab0f0b372e2
[ "MIT" ]
null
null
null
app/adm/urls.py
rogeriopaulos/gep
e56fd0450bdb8f572e2e35cc59a74ab0f0b372e2
[ "MIT" ]
2
2021-09-02T04:22:45.000Z
2021-09-02T04:52:26.000Z
app/adm/urls.py
rogeriopaulos/gep
e56fd0450bdb8f572e2e35cc59a74ab0f0b372e2
[ "MIT" ]
1
2021-09-15T02:16:38.000Z
2021-09-15T02:16:38.000Z
# -*- coding: utf-8 -*- from adm import views from django.urls import path app_name = "adm" urlpatterns = [ # Processo path('instaurar/', views.criar_processo_adm, name='criar_processo_adm'), path('listar/', views.listar_adm, name='listar_adm'), path('listar/ajax/', views.processos_adm_ajax, name='pr...
65.102041
131
0.731348
# -*- coding: utf-8 -*- from adm import views from django.urls import path app_name = "adm" urlpatterns = [ # Processo path('instaurar/', views.criar_processo_adm, name='criar_processo_adm'), path('listar/', views.listar_adm, name='listar_adm'), path('listar/ajax/', views.processos_adm_ajax, name='pr...
20
0
0
0
0
0
0
0
0
aae42c0badb0a669d2cb68307fe40b140965d324
11,868
py
Python
cv_fisher.py
sjforeman/RadioFisher
fe25f969de9a700c5697168ba9e0d2645c55ed81
[ "AFL-3.0" ]
3
2020-12-05T11:28:47.000Z
2021-07-09T02:42:21.000Z
cv_fisher.py
sjforeman/RadioFisher
fe25f969de9a700c5697168ba9e0d2645c55ed81
[ "AFL-3.0" ]
null
null
null
cv_fisher.py
sjforeman/RadioFisher
fe25f969de9a700c5697168ba9e0d2645c55ed81
[ "AFL-3.0" ]
2
2021-07-09T02:42:23.000Z
2021-11-30T06:37:47.000Z
#!/usr/bin/python """ Calculate Fisher matrix and P(k) constraints for all redshift bins for a given experiment. """ import numpy as np import pylab as P import scipy.spatial, scipy.integrate, scipy.interpolate from scipy.integrate import simps import radiofisher as rf from radiofisher.experiments import USE, foregrou...
33.715909
100
0.493765
#!/usr/bin/python """ Calculate Fisher matrix and P(k) constraints for all redshift bins for a given experiment. """ import numpy as np import pylab as P import scipy.spatial, scipy.integrate, scipy.interpolate from scipy.integrate import simps import radiofisher as rf from radiofisher.units import * from radiofisher....
0
0
0
0
0
0
0
10
22
36129dbdd55b42e45f06edb430b1e75efd43fd2f
4,128
py
Python
tests/test_arbor.py
pattonw/ffskel
4a0bb1d61b41eef13658677e730a682e7f3e887d
[ "MIT" ]
null
null
null
tests/test_arbor.py
pattonw/ffskel
4a0bb1d61b41eef13658677e730a682e7f3e887d
[ "MIT" ]
238
2019-03-14T22:28:12.000Z
2022-03-28T05:08:18.000Z
tests/test_arbor.py
pattonw/ffskel
4a0bb1d61b41eef13658677e730a682e7f3e887d
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for `sarbor` package."""
34.4
78
0.578246
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for `sarbor` package.""" import unittest import sarbor class TestSarborToy(unittest.TestCase): """Tests for `sarbor` package.""" def setUp(self): """ 0-1-2-3-4-5 | | 6 10 | 7-9 ...
0
206
0
3,784
0
0
0
-14
69
508e6840433f9d43b714ea5df2b4a7239ec1454a
1,549
py
Python
tests/test_ahd_to_observation_smkstat.py
miracum/ahd2fhir
0c1bf3e0d86278145f9f1fa5c99a121f8e961d5f
[ "Apache-2.0" ]
3
2021-11-23T16:24:21.000Z
2022-03-30T07:59:03.000Z
tests/test_ahd_to_observation_smkstat.py
miracum/ahd2fhir
0c1bf3e0d86278145f9f1fa5c99a121f8e961d5f
[ "Apache-2.0" ]
40
2021-05-27T14:26:33.000Z
2022-03-29T14:29:33.000Z
tests/test_ahd_to_observation_smkstat.py
miracum/ahd2fhir
0c1bf3e0d86278145f9f1fa5c99a121f8e961d5f
[ "Apache-2.0" ]
1
2021-06-30T11:11:01.000Z
2021-06-30T11:11:01.000Z
AHD_PAYLOADS_EXPECTED_NUMBER_OF_CONDITIONS = [ ("payload_1.json", 3), ("payload_2.json", 0), ]
29.788462
84
0.757908
import pytest from ahd2fhir.mappers.ahd_to_observation_smkstat import AHD_TYPE, get_fhir_resources from tests.utils import map_resources AHD_PAYLOADS_EXPECTED_NUMBER_OF_CONDITIONS = [ ("payload_1.json", 3), ("payload_2.json", 0), ] @pytest.mark.parametrize( "ahd_json_path,expected_number_of_conditions",...
0
1,235
0
0
0
0
0
71
136
d91dfacc794bfa8401899395ce687c902e4f33d0
383
py
Python
setup.py
roger-selzler/ThingSpeak
92f24d04063dbd947115b7d3dd00730ed60bd17f
[ "MIT" ]
null
null
null
setup.py
roger-selzler/ThingSpeak
92f24d04063dbd947115b7d3dd00730ed60bd17f
[ "MIT" ]
null
null
null
setup.py
roger-selzler/ThingSpeak
92f24d04063dbd947115b7d3dd00730ed60bd17f
[ "MIT" ]
null
null
null
import setuptools setuptools.setup( name="thingspeak", version='0.0.1', author='Roger Selzler', description='Tools to ease the manipulation of data on thingspek from Mathworks using REST API and python.', url='https://github.com/roger-selzler/ThingSpeak', packages=setupto...
38.3
116
0.64752
import setuptools setuptools.setup( name="thingspeak", version='0.0.1', author='Roger Selzler', description='Tools to ease the manipulation of data on thingspek from Mathworks using REST API and python.', url='https://github.com/roger-selzler/ThingSpeak', packages=setupto...
0
0
0
0
0
0
0
0
0
ac55b30e934ead270e6996f3d6d0a98a2c9b1a61
559
py
Python
assignments/handle_data_types_clinton.py
theCodingProfessor/intro_to_Python
87c3c4816530f4ca07091d17acf645f3261ecaea
[ "MIT" ]
null
null
null
assignments/handle_data_types_clinton.py
theCodingProfessor/intro_to_Python
87c3c4816530f4ca07091d17acf645f3261ecaea
[ "MIT" ]
null
null
null
assignments/handle_data_types_clinton.py
theCodingProfessor/intro_to_Python
87c3c4816530f4ca07091d17acf645f3261ecaea
[ "MIT" ]
null
null
null
# Copyright (C) 2021 Clinton Garwood # MIT Open Source Initiative Approved License # handle_data_types_clinton.py # CIS-135 Python # Assignment #5 # # Include five variables: # # Include three variables: # # An integer with value 1 named one one = 1 # # A float with a value 10.10 named tenTen tenTen = 10.10...
22.36
52
0.697674
# Copyright (C) 2021 Clinton Garwood # MIT Open Source Initiative Approved License # handle_data_types_clinton.py # CIS-135 Python # Assignment #5 # # Include five variables: # # Include three variables: # # An integer with value 1 named one one = 1 # # A float with a value 10.10 named tenTen tenTen = 10.10...
0
0
0
0
0
0
0
0
0
196cf73b5b7b9b6a9c40b256d5690ed0837d6048
37
py
Python
matter/__init__.py
xxxspy/matter.py
178cf22e3a7e1d2c67e0d4e4a7c04782998a2fe7
[ "MIT" ]
null
null
null
matter/__init__.py
xxxspy/matter.py
178cf22e3a7e1d2c67e0d4e4a7c04782998a2fe7
[ "MIT" ]
null
null
null
matter/__init__.py
xxxspy/matter.py
178cf22e3a7e1d2c67e0d4e4a7c04782998a2fe7
[ "MIT" ]
null
null
null
name = 'matter'
18.5
21
0.702703
from .matter import * name = 'matter'
0
0
0
0
0
0
0
0
22
ed893d03c940755b4da6a964c9b200036b54f479
18,886
py
Python
app/device_forms.py
ServerFarm3r/fermentrack
69748378d567f93d1adc3f3cfb10979f7054ec66
[ "MIT" ]
null
null
null
app/device_forms.py
ServerFarm3r/fermentrack
69748378d567f93d1adc3f3cfb10979f7054ec66
[ "MIT" ]
null
null
null
app/device_forms.py
ServerFarm3r/fermentrack
69748378d567f93d1adc3f3cfb10979f7054ec66
[ "MIT" ]
null
null
null
import fermentrack_django.settings as settings
56.54491
171
0.610876
from django import forms from app.models import BrewPiDevice, OldControlConstants, NewControlConstants, SensorDevice, FermentationProfile, FermentationProfilePoint from django.core import validators import fermentrack_django.settings as settings from django.forms import ModelForm from . import udev_integration import...
0
381
0
17,994
0
0
0
119
338
3603adf51e0d8d62fa3317a0b60a5ab6f33dc561
579
py
Python
scripts/plot_cone_response_matrix.py
MaxNoe/soak19
76ebffe8290118a7bb0a927d87a66e6664c0b4c8
[ "MIT" ]
1
2020-11-24T19:07:55.000Z
2020-11-24T19:07:55.000Z
scripts/plot_cone_response_matrix.py
maxnoe/soak19
76ebffe8290118a7bb0a927d87a66e6664c0b4c8
[ "MIT" ]
null
null
null
scripts/plot_cone_response_matrix.py
maxnoe/soak19
76ebffe8290118a7bb0a927d87a66e6664c0b4c8
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt from soak19 import wl_to_rgb import pandas as pd cone = pd.read_csv('data/cone_response_5nm.csv', index_col=0, comment='#') fig, axs = plt.subplots(1, 3) _, h = fig.get_size_inches() fig.set_size_inches(h, h) for ax, (name, c) in zip(axs[::-1], cone.items()): ax.set_axis_off() ...
25.173913
74
0.711572
import matplotlib.pyplot as plt import numpy as np from scipy.stats import norm from soak19 import wl_to_rgb import pandas as pd cone = pd.read_csv('data/cone_response_5nm.csv', index_col=0, comment='#') fig, axs = plt.subplots(1, 3) _, h = fig.get_size_inches() fig.set_size_inches(h, h) for ax, (name, c) in zip(axs...
0
0
0
0
0
0
0
4
44
b8ac3e1d5e543381265ae44aa5842bc73797e9e3
1,299
py
Python
library/templatetags/library_extras.py
mwschall/storkive
5d52d5a4a06be7755aa1a93472bbc395bdb80d8f
[ "0BSD" ]
null
null
null
library/templatetags/library_extras.py
mwschall/storkive
5d52d5a4a06be7755aa1a93472bbc395bdb80d8f
[ "0BSD" ]
12
2019-12-04T22:20:55.000Z
2022-03-15T05:17:51.000Z
library/templatetags/library_extras.py
mwschall/storkive
5d52d5a4a06be7755aa1a93472bbc395bdb80d8f
[ "0BSD" ]
null
null
null
from django import template register = template.Library() # noinspection PyShadowingBuiltins # noinspection PyShadowingBuiltins
25.98
86
0.682063
from django import template from django.template.defaultfilters import pluralize from django.utils.formats import date_format as djd_fmt register = template.Library() @register.filter def classes(value): return ' '.join([str(v) for v in filter(None, list(value))]) # noinspection PyShadowingBuiltins @register.f...
3
915
0
0
0
0
0
65
180
0704dd72f905f655ccaad626805cf5f840e9b8e4
3,036
py
Python
models/mlp_image_classifier.py
nuric/pix2rule
0f0f654e488a1839455786ccc4ad023c0aa0c2e8
[ "MIT" ]
6
2021-06-15T10:37:34.000Z
2022-01-26T14:41:44.000Z
models/mlp_image_classifier.py
nuric/pix2rule
0f0f654e488a1839455786ccc4ad023c0aa0c2e8
[ "MIT" ]
3
2021-08-25T15:17:22.000Z
2021-11-12T13:52:14.000Z
models/mlp_image_classifier.py
nuric/pix2rule
0f0f654e488a1839455786ccc4ad023c0aa0c2e8
[ "MIT" ]
1
2021-11-08T17:36:52.000Z
2021-11-08T17:36:52.000Z
"""Base MLP model.""" from typing import Dict, Any import tensorflow as tf import tensorflow.keras.layers as L import configlib from configlib import config as C from components.inputlayers.categorical import OneHotCategoricalInput import components.inputlayers.image import utils.factory # Setup configurable parame...
34.5
91
0.647892
"""Base MLP model.""" from typing import Dict, Any import tensorflow as tf import tensorflow.keras.layers as L import configlib from configlib import config as C from components.inputlayers.categorical import OneHotCategoricalInput import components.inputlayers.image import utils.factory # Setup configurable parame...
0
0
0
0
0
0
0
0
0
e0e6f5da15964ae5289a463d201d46fc324e20ed
4,192
py
Python
py/reorder_lines_inversed.py
WANDEX/scripts
69e8f1b9579daf2446dccae1b482e1f33480c3b1
[ "MIT" ]
3
2020-11-28T03:32:06.000Z
2021-03-04T15:05:51.000Z
py/reorder_lines_inversed.py
WANDEX/scripts
69e8f1b9579daf2446dccae1b482e1f33480c3b1
[ "MIT" ]
null
null
null
py/reorder_lines_inversed.py
WANDEX/scripts
69e8f1b9579daf2446dccae1b482e1f33480c3b1
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """reorder_lines_inversed.py. This module is designed to reorganize the string sequence of a simple text document. There are 2 types of string sequence reorganization in reverse order: strict and blocks. In the strict reorganization method, each row is rearranged in rever...
31.518797
78
0.57562
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """reorder_lines_inversed.py. This module is designed to reorganize the string sequence of a simple text document. There are 2 types of string sequence reorganization in reverse order: strict and blocks. In the strict reorganization method, each row is rearranged in rever...
0
0
0
0
0
0
0
0
0
daa7035a19c5dd018dd2bb1cc7912707c1250e7f
1,207
py
Python
exercises_sequence/exe045.py
gpeixotobr/exercices-python
ff1d220f11e139069cf02f2086cd10b32ba73bd7
[ "MIT" ]
null
null
null
exercises_sequence/exe045.py
gpeixotobr/exercices-python
ff1d220f11e139069cf02f2086cd10b32ba73bd7
[ "MIT" ]
null
null
null
exercises_sequence/exe045.py
gpeixotobr/exercices-python
ff1d220f11e139069cf02f2086cd10b32ba73bd7
[ "MIT" ]
null
null
null
import time from random import randint itens = ('Pedra','Papel', 'Tesoura') computador = randint(0, 2) print('''Suas opes: [0] PEDRA [1] PAPEL [2] TESOURA ''') jogador = int(input('Qual a sua jogada? ')) print('-'* 20) t = 1 print('JO') time.sleep(t) print('KEN') time.sleep(t) print('PO!!!') print('O computador jogou...
24.632653
56
0.599834
import time from random import randint from time import sleep itens = ('Pedra','Papel', 'Tesoura') computador = randint(0, 2) print('''Suas opções: [0] PEDRA [1] PAPEL [2] TESOURA ''') jogador = int(input('Qual é a sua jogada? ')) print('-'* 20) t = 1 print('JO') time.sleep(t) print('KEN') time.sleep(t) print('PO!!!')...
12
0
0
0
0
0
0
1
22
22eadccf723108d079ab6ea3225009ad804dd517
130
py
Python
numpy/doc/methods_vs_functions.py
walshb/numpy
073bc39c58a6788ffda6aaa7549955cc3d4fdc93
[ "BSD-3-Clause" ]
343
2015-01-07T05:58:44.000Z
2022-03-15T14:55:21.000Z
numpy/doc/methods_vs_functions.py
walshb/numpy
073bc39c58a6788ffda6aaa7549955cc3d4fdc93
[ "BSD-3-Clause" ]
61
2015-03-19T18:20:21.000Z
2019-10-23T12:58:23.000Z
numpy/doc/methods_vs_functions.py
walshb/numpy
073bc39c58a6788ffda6aaa7549955cc3d4fdc93
[ "BSD-3-Clause" ]
66
2015-01-20T15:35:05.000Z
2021-11-25T16:49:41.000Z
""" ===================== Methods vs. Functions ===================== Placeholder for Methods vs. Functions documentation. """
13
52
0.484615
""" ===================== Methods vs. Functions ===================== Placeholder for Methods vs. Functions documentation. """
0
0
0
0
0
0
0
0
0
2edd48bd496075f42344da37597b9e12a8a88ed5
212
py
Python
stl_dsa/test_integrations.py
meagles/site
c54a61a0e9e98788086d0d9300baebbcac7fb625
[ "MIT" ]
null
null
null
stl_dsa/test_integrations.py
meagles/site
c54a61a0e9e98788086d0d9300baebbcac7fb625
[ "MIT" ]
null
null
null
stl_dsa/test_integrations.py
meagles/site
c54a61a0e9e98788086d0d9300baebbcac7fb625
[ "MIT" ]
null
null
null
# from stl_dsa.users.models import User # def test_user_is_member(faker): # email = faker.email() # taggings = # user = User(email=email, first_name=faker.first_name(), last_name=faker.last_name())
26.5
90
0.698113
# from stl_dsa.users.models import User # def test_user_is_member(faker): # email = faker.email() # taggings = # user = User(email=email, first_name=faker.first_name(), last_name=faker.last_name())
0
0
0
0
0
0
0
0
0
76fe6dd3cdd9e636a31280b791b25f9da1c6d094
2,844
py
Python
venv/Lib/site-packages/sql/tests/test_join.py
hu120051/cybercafe_management
901b121cf8bef799d19962df7b11e16d9422421a
[ "Apache-2.0" ]
null
null
null
venv/Lib/site-packages/sql/tests/test_join.py
hu120051/cybercafe_management
901b121cf8bef799d19962df7b11e16d9422421a
[ "Apache-2.0" ]
null
null
null
venv/Lib/site-packages/sql/tests/test_join.py
hu120051/cybercafe_management
901b121cf8bef799d19962df7b11e16d9422421a
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (c) 2011-2013, Cdric Krier # Copyright (c) 2011-2013, B2CK # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain ...
42.447761
79
0.655767
# -*- coding: utf-8 -*- # # Copyright (c) 2011-2013, Cédric Krier # Copyright (c) 2011-2013, B2CK # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain...
2
0
0
1,122
0
0
0
22
91
1b3fccd50f2b856d572b6235bb84d70c1445b5a0
2,853
py
Python
cmd/updateEndpoint.py
robertchoi80/tks-client
ba7cb9b3e937e2e2784f8c06c2f49fb819837bf3
[ "MIT" ]
null
null
null
cmd/updateEndpoint.py
robertchoi80/tks-client
ba7cb9b3e937e2e2784f8c06c2f49fb819837bf3
[ "MIT" ]
null
null
null
cmd/updateEndpoint.py
robertchoi80/tks-client
ba7cb9b3e937e2e2784f8c06c2f49fb819837bf3
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import argparse import git import ruamel.yaml import os import sys print("Entering updateEndpoint script..") parser = argparse.ArgumentParser() parser.add_argument('--action', required=True, type=str, help="action to take: 'add' or 'delete'") parser.add_argument('--cluster_name', requi...
31.7
104
0.686646
#!/usr/bin/python3 import argparse import git import ruamel.yaml import os import sys print("Entering updateEndpoint script..") parser = argparse.ArgumentParser() parser.add_argument('--action', required=True, type=str, help="action to take: 'add' or 'delete'") parser.add_argument('--cluster_name', requi...
0
0
0
0
0
0
0
0
0
39fd5e0e218d95a439da47c3fe65db27ce8897d8
11,434
py
Python
bfillings/tests/test_muscle_v38.py
gregcaporaso/burrito-fillings
a7b3b4db0d20b4baa064d447033782969f491622
[ "BSD-3-Clause" ]
null
null
null
bfillings/tests/test_muscle_v38.py
gregcaporaso/burrito-fillings
a7b3b4db0d20b4baa064d447033782969f491622
[ "BSD-3-Clause" ]
null
null
null
bfillings/tests/test_muscle_v38.py
gregcaporaso/burrito-fillings
a7b3b4db0d20b4baa064d447033782969f491622
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python #----------------------------------------------------------------------------- # Copyright (c) 2013--, biocore development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #-------------------------...
39.839721
183
0.671856
#!/usr/bin/env python #----------------------------------------------------------------------------- # Copyright (c) 2013--, biocore development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #-------------------------...
0
0
0
7,211
0
0
0
336
203
b8c92b41edc7525498b3e50e34f3a76fcf2f6713
534
py
Python
helper_funcs/step_one.py
Kobsser/appScraper
ccb8febb914fde969415c6a6b2b1233683fbda39
[ "MIT" ]
null
null
null
helper_funcs/step_one.py
Kobsser/appScraper
ccb8febb914fde969415c6a6b2b1233683fbda39
[ "MIT" ]
null
null
null
helper_funcs/step_one.py
Kobsser/appScraper
ccb8febb914fde969415c6a6b2b1233683fbda39
[ "MIT" ]
null
null
null
""" STEP ONE """ import requests def request_tg_code_get_random_hash(input_phone_number): """ requests Login Code and returns a random_hash which is used in STEP TWO """ request_url = "https://my.telegram.org/auth/send_password" request_data = { "phone": input_phone_number ...
26.7
63
0.661049
""" STEP ONE """ import requests def request_tg_code_get_random_hash(input_phone_number): """ requests Login Code and returns a random_hash which is used in STEP TWO """ request_url = "https://my.telegram.org/auth/send_password" request_data = { "phone": input_phone_number ...
0
0
0
0
0
0
0
0
0
a66ae604560e37cdaa1d12503e05f6ed0c1fcecb
487
py
Python
Uso do for.py
JhonatasAntonelli/Pyhton_2
e455d9b8fae7e8e82dd0e44e5e25de4a49c4c424
[ "MIT" ]
null
null
null
Uso do for.py
JhonatasAntonelli/Pyhton_2
e455d9b8fae7e8e82dd0e44e5e25de4a49c4c424
[ "MIT" ]
null
null
null
Uso do for.py
JhonatasAntonelli/Pyhton_2
e455d9b8fae7e8e82dd0e44e5e25de4a49c4c424
[ "MIT" ]
null
null
null
for c in range (0,6): print('oi') for c in range (0,6): print(c) for c in range (6,0,-1): print(c) for c in range (0,20,2): print(c) n = int(input('Digite um nmero')) for c in range (0,n+1): print(c) i = int(input('Digite um nmero inicial')) f = int(input('Digite um nmero final')) p = int(input('Dig...
23.190476
54
0.589322
for c in range (0,6): print('oi') for c in range (0,6): print(c) for c in range (6,0,-1): print(c) for c in range (0,20,2): print(c) n = int(input('Digite um número')) for c in range (0,n+1): print(c) i = int(input('Digite um número inicial')) f = int(input('Digite um número final')) p = int(input('...
10
0
0
0
0
0
0
0
0
1ed3824d303ebbaa73a0006dd0441b6c7d94aaf6
448
py
Python
cmachines_slave/cmachines_slave/persistent_object.py
JinpengLI/gpu_share_platform
53d7f2b45acd9340cf49908fe9809f8d2856757c
[ "MIT" ]
18
2018-02-21T00:39:37.000Z
2019-05-21T08:03:49.000Z
cmachines_slave/cmachines_slave/persistent_object.py
JinpengLI/gpu_share_platform
53d7f2b45acd9340cf49908fe9809f8d2856757c
[ "MIT" ]
1
2020-08-08T18:05:31.000Z
2020-08-08T19:57:05.000Z
cmachines_slave/cmachines_slave/persistent_object.py
JinpengLI/gpu_share_platform
53d7f2b45acd9340cf49908fe9809f8d2856757c
[ "MIT" ]
12
2018-02-22T07:22:58.000Z
2020-01-06T07:45:52.000Z
# -*- coding: utf-8 -*-
19.478261
65
0.604911
# -*- coding: utf-8 -*- from datetime import datetime import uuid import os import json class PersistentObject(object): def __init__(self, mem_file): self.mem_file = mem_file self.data = {} self.load() def load(self,): if os.path.isfile(self.mem_file): self.data = j...
0
0
0
333
0
0
0
-24
111
ee8d9ab20ef3486a2ba22af6d3d18deec3df1328
575
py
Python
src/collection/cd_raw_collection.py
youlu860612/IDAR
30e711fafb17731905febc8e86cb51306456d023
[ "Unlicense" ]
null
null
null
src/collection/cd_raw_collection.py
youlu860612/IDAR
30e711fafb17731905febc8e86cb51306456d023
[ "Unlicense" ]
null
null
null
src/collection/cd_raw_collection.py
youlu860612/IDAR
30e711fafb17731905febc8e86cb51306456d023
[ "Unlicense" ]
null
null
null
# cd_raw_collection.py # "cd" stands for class discovery. This script is used by class discovery # related scripts, and represents a raw input list file. # # Steven Lu 5/20/2019
31.944444
73
0.758261
# cd_raw_collection.py # "cd" stands for class discovery. This script is used by class discovery # related scripts, and represents a raw input list file. # # Steven Lu 5/20/2019 from entity.cd_subject import CDSubject from collection.raw_collection import RawCollection class CDRawCollection(RawCollection): def _...
0
0
0
281
0
0
0
48
68
a0023bb0475d5600e88fd35f2906730e8ccb2ea0
713
py
Python
tests/generic/snapshots/snap_test_translater.py
intellihr/interlagos
f09651b460f7f6030fcb9299be45eb83d199f136
[ "MIT" ]
null
null
null
tests/generic/snapshots/snap_test_translater.py
intellihr/interlagos
f09651b460f7f6030fcb9299be45eb83d199f136
[ "MIT" ]
null
null
null
tests/generic/snapshots/snap_test_translater.py
intellihr/interlagos
f09651b460f7f6030fcb9299be45eb83d199f136
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # snapshottest: v1 - https://goo.gl/zC4yUc from __future__ import unicode_literals from snapshottest import Snapshot snapshots = Snapshot() snapshots['test_translate 1'] = [ 'ca', "n't", "'m", "'s", "'ve", 'ha', 'wo', 'atm', 'xmas', "'ll", 'im' ] ...
12.508772
42
0.443198
# -*- coding: utf-8 -*- # snapshottest: v1 - https://goo.gl/zC4yUc from __future__ import unicode_literals from snapshottest import Snapshot snapshots = Snapshot() snapshots['test_translate 1'] = [ 'ca', "n't", "'m", "'s", "'ve", 'ha', 'wo', 'atm', 'xmas', "'ll", 'im' ] ...
0
0
0
0
0
0
0
0
0
2bcdcf5790574b9937fea1e6baba9a832db37686
1,638
py
Python
click to coordinate.py
sunnyCUD/we_want_some_eyes_donut
9d0620a48fc1b68ff9e2e12b39949d4ead0dc90c
[ "MIT" ]
null
null
null
click to coordinate.py
sunnyCUD/we_want_some_eyes_donut
9d0620a48fc1b68ff9e2e12b39949d4ead0dc90c
[ "MIT" ]
null
null
null
click to coordinate.py
sunnyCUD/we_want_some_eyes_donut
9d0620a48fc1b68ff9e2e12b39949d4ead0dc90c
[ "MIT" ]
2
2020-01-13T18:28:52.000Z
2020-04-23T04:27:08.000Z
#!/usr/bin/env python # coding: utf-8 # In[22]: import cv2 import glob def findClickCoordinate(img,dot,dot_size = 5): """ Find coordinate of clicked location Parameters: -img: input image -dot: amount of output dot -dot_size: size of dot Returns: -circles: list of cli...
22.75
71
0.59707
#!/usr/bin/env python # coding: utf-8 # In[22]: import cv2 import glob import numpy as np def findClickCoordinate(img,dot,dot_size = 5): """ Find coordinate of clicked location Parameters: -img: input image -dot: amount of output dot -dot_size: size of dot Returns: -c...
0
0
0
0
0
136
0
-3
48
6c73dd38b04df9c7bba92e8573363c485cbca2c6
3,257
py
Python
aphid/profile_plugin_FFFEFD_system_info.py
stepleton/cameo
ca64ef0f286fabcdfb018684bf078709f3188b11
[ "Unlicense" ]
11
2018-08-12T22:55:24.000Z
2022-03-06T17:30:27.000Z
aphid/profile_plugin_FFFEFD_system_info.py
stepleton/cameo
ca64ef0f286fabcdfb018684bf078709f3188b11
[ "Unlicense" ]
1
2021-05-28T22:14:42.000Z
2021-05-28T22:14:42.000Z
aphid/profile_plugin_FFFEFD_system_info.py
stepleton/cameo
ca64ef0f286fabcdfb018684bf078709f3188b11
[ "Unlicense" ]
3
2020-08-24T07:23:33.000Z
2021-09-24T16:13:05.000Z
"""A ProFile "magic block" plugin for Cameo/Aphid system information. Forfeited into the public domain with NO WARRANTY. Read LICENSE for details. This plugin allows the Apple to obtain some basic system information from a Cameo/Aphid. By convention, this plugin is associated with block $FFFEFD. There's no reason it...
33.234694
79
0.683144
"""A ProFile "magic block" plugin for Cameo/Aphid system information. Forfeited into the public domain with NO WARRANTY. Read LICENSE for details. This plugin allows the Apple to obtain some basic system information from a Cameo/Aphid. By convention, this plugin is associated with block $FFFEFD. There's no reason it...
0
0
0
1,784
0
0
0
-12
114
2f42afcd96a30c4efcdde57c19ee7397fb53d156
3,453
py
Python
reqlog/support/jwt_plugin/backends.py
JFF-Bohdan/reqlog
a7ba7b6e12609d736b3cd8cd8bc2913d511848ee
[ "MIT" ]
null
null
null
reqlog/support/jwt_plugin/backends.py
JFF-Bohdan/reqlog
a7ba7b6e12609d736b3cd8cd8bc2913d511848ee
[ "MIT" ]
null
null
null
reqlog/support/jwt_plugin/backends.py
JFF-Bohdan/reqlog
a7ba7b6e12609d736b3cd8cd8bc2913d511848ee
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """`bottle_jwt.auth` module. Main auth providers class implementation. """ from __future__ import print_function from __future__ import unicode_literals __all__ = ["BaseAuthBackend", ]
33.524272
99
0.611932
# -*- coding: utf-8 -*- """`bottle_jwt.auth` module. Main auth providers class implementation. """ from __future__ import print_function from __future__ import unicode_literals import abc import six from .compat import signature __all__ = ["BaseAuthBackend", ] @six.add_metaclass(abc.ABCMeta) class BaseAuthBacke...
0
3,162
0
0
0
0
0
-14
92
f20f12c759526f75e5227ea606bb361467833b57
1,011
py
Python
setup.py
StartTheShift/jondis
5d59894b7af50b6f941ccb070f7b95e5d81bfd75
[ "BSD-2-Clause" ]
17
2015-01-04T03:26:46.000Z
2019-08-21T06:07:47.000Z
setup.py
StartTheShift/jondis
5d59894b7af50b6f941ccb070f7b95e5d81bfd75
[ "BSD-2-Clause" ]
null
null
null
setup.py
StartTheShift/jondis
5d59894b7af50b6f941ccb070f7b95e5d81bfd75
[ "BSD-2-Clause" ]
8
2015-09-05T00:11:23.000Z
2019-03-10T10:20:29.000Z
from setuptools import setup, find_packages setup(name="jondis", version="0.1", description="Redis pool for HA redis clusters", long_description=read('README.md'), author="Jon Haddad", author_email="jon@grapheffect.com", classifiers=[ "Development Status :: 3 - Alpha", ...
33.7
73
0.603363
from setuptools import setup, find_packages import os def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup(name="jondis", version="0.1", description="Redis pool for HA redis clusters", long_description=read('README.md'), author="Jon Haddad", autho...
0
0
0
0
0
66
0
-12
45
8a71f9244f52ba5824662bbc0c92cfdf48b01bf3
5,469
py
Python
sql/tests/engines/test_db_count.py
oskarkocol/smartnoise-sdk
e76cad9c8fd6c58c4fc126e90f00b60eb589d1be
[ "MIT" ]
63
2020-03-26T15:26:10.000Z
2020-10-22T06:26:38.000Z
sql/tests/engines/test_db_count.py
oskarkocol/smartnoise-sdk
e76cad9c8fd6c58c4fc126e90f00b60eb589d1be
[ "MIT" ]
82
2020-03-10T17:54:48.000Z
2020-10-23T02:11:06.000Z
sql/tests/engines/test_db_count.py
oskarkocol/smartnoise-sdk
e76cad9c8fd6c58c4fc126e90f00b60eb589d1be
[ "MIT" ]
15
2020-03-10T05:52:14.000Z
2020-10-09T09:09:52.000Z
from snsql.sql.privacy import Privacy privacy = Privacy(alphas=[0.01, 0.05], epsilon=30.0, delta=0.1) overrides = {'censor_dims': False}
49.27027
114
0.544524
import pytest import sys from snsql import metadata from snsql.sql.privacy import Privacy privacy = Privacy(alphas=[0.01, 0.05], epsilon=30.0, delta=0.1) overrides = {'censor_dims': False} class TestDbCounts: @pytest.mark.skipif(sys.version_info < (3, 8), reason="Skip because older PRNG") def test_db_counts...
0
3,300
0
1,955
0
0
0
-14
89
0ea8355f9ac6a1ab1062eaddf6cb37a447304deb
3,390
py
Python
hypernets/tests/tabular/tb_dask/drift_detection_test.py
Enpen/Hypernets
5fbf01412ffaef310855d98f52f8cc169e96246b
[ "Apache-2.0" ]
null
null
null
hypernets/tests/tabular/tb_dask/drift_detection_test.py
Enpen/Hypernets
5fbf01412ffaef310855d98f52f8cc169e96246b
[ "Apache-2.0" ]
null
null
null
hypernets/tests/tabular/tb_dask/drift_detection_test.py
Enpen/Hypernets
5fbf01412ffaef310855d98f52f8cc169e96246b
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- """ """ from . import is_dask_installed if is_dask_installed: from hypernets.tabular.dask_ex import DaskToolBox dd_selector = DaskToolBox.feature_selector_with_drift_detection
37.666667
114
0.621534
# -*- coding:utf-8 -*- """ """ import numpy as np import pandas as pd from pandas.util import hash_pandas_object from hypernets.tabular.datasets.dsutils import load_bank from . import if_dask_ready, is_dask_installed from ..dask_transofromer_test import setup_dask if is_dask_installed: import dask.dataframe as d...
0
2,922
0
0
0
0
0
98
160
b912edf4bcee3ee25cab1d157e798845da79ef94
1,370
py
Python
brainrender/__init__.py
hadivafaii/brainrender
e4e165fa7d92492a453f68030a669f540f7966c5
[ "BSD-3-Clause" ]
null
null
null
brainrender/__init__.py
hadivafaii/brainrender
e4e165fa7d92492a453f68030a669f540f7966c5
[ "BSD-3-Clause" ]
null
null
null
brainrender/__init__.py
hadivafaii/brainrender
e4e165fa7d92492a453f68030a669f540f7966c5
[ "BSD-3-Clause" ]
null
null
null
import os import sys from os.path import join as pjoin from loguru import logger from pathlib import Path from rich.logging import RichHandler try: from pyinspect import install_traceback install_traceback() except ImportError: pass # fails in notebooks from . import settings base_dir = Path(os.path.joi...
22.833333
70
0.641606
import os import sys from os.path import join as pjoin from loguru import logger from pathlib import Path from rich.logging import RichHandler try: from pyinspect import install_traceback install_traceback() except ImportError: pass # fails in notebooks from . import settings, actors from .scene import S...
0
0
0
0
0
0
0
23
88
db53eafa60721e7c9d1393ee4238633978967228
9,455
py
Python
tests/parsers/main_parser/test_headers.py
Project-Mau/mau
193d16633c1573227debf4517ebcaf07add24979
[ "MIT" ]
28
2021-02-22T18:46:52.000Z
2022-02-21T15:14:05.000Z
tests/parsers/main_parser/test_headers.py
Project-Mau/mau
193d16633c1573227debf4517ebcaf07add24979
[ "MIT" ]
5
2021-02-23T09:56:13.000Z
2022-03-13T09:47:42.000Z
tests/parsers/main_parser/test_headers.py
Project-Mau/mau
193d16633c1573227debf4517ebcaf07add24979
[ "MIT" ]
2
2021-02-23T09:11:45.000Z
2021-03-13T11:08:21.000Z
from mau.parsers.main_parser import MainParser from tests.helpers import init_parser_factory, parser_test_factory init_parser = init_parser_factory(MainParser) _test = parser_test_factory(MainParser)
23.461538
79
0.474669
from unittest.mock import patch from mau.parsers import nodes from mau.parsers.main_parser import MainParser from tests.helpers import init_parser_factory, parser_test_factory init_parser = init_parser_factory(MainParser) _test = parser_test_factory(MainParser) def test_default_header_anchor_function(): sourc...
0
7,341
0
0
0
1,536
0
18
344
4bf1332f9ce8f027a1d7a190699e9d35d1a0c7b5
458
py
Python
mayan/apps/common/setting_migrations.py
O2Graphics/Mayan-EDMS
e11e6f47240f3c536764be66828dbe6428dceb41
[ "Apache-2.0" ]
null
null
null
mayan/apps/common/setting_migrations.py
O2Graphics/Mayan-EDMS
e11e6f47240f3c536764be66828dbe6428dceb41
[ "Apache-2.0" ]
5
2021-03-19T22:56:45.000Z
2022-03-12T00:08:43.000Z
mayan/apps/common/setting_migrations.py
halsten/mayan-edms
10372daede6e6dea0bea67eb98767e3be6fbf86f
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals
26.941176
68
0.729258
from __future__ import unicode_literals from mayan.apps.smart_settings.classes import NamespaceMigration from .serialization import yaml_load class CommonSettingMigration(NamespaceMigration): """ From version 0001 to 0002 backend arguments are no longer quoted but YAML valid too. Changed in version 3.3....
0
0
0
290
0
0
0
58
69
de604e17191b552dfe46b96b883c71f3128ba442
4,260
py
Python
utils/data_loader.py
manhtrantienhn/sentiment
0ee59c7b607b5d6b5d9341a867f5a62653e960f8
[ "MIT" ]
1
2022-03-28T10:42:01.000Z
2022-03-28T10:42:01.000Z
utils/data_loader.py
manhtrantienhn/sentiment
0ee59c7b607b5d6b5d9341a867f5a62653e960f8
[ "MIT" ]
null
null
null
utils/data_loader.py
manhtrantienhn/sentiment
0ee59c7b607b5d6b5d9341a867f5a62653e960f8
[ "MIT" ]
null
null
null
# import torchtext import nltk nltk.download('punkt') # def clean_text(text): # text = re.sub(r"<.*?>", " ", text) # text = re.sub(r"[^A-Za-z0-9(),!?\'`]", " ", text) # text = re.sub(r"\s{2,}", " ", text) # return text.strip().lower()
48.965517
212
0.701878
import json import numpy as np # import torchtext from torchtext.vocab import Vectors from tqdm import tqdm import torch from torch.utils.data import TensorDataset, DataLoader import nltk nltk.download('punkt') def read_data(train_dataset: str, valid_dataset: str): with open(train_dataset, 'r', encoding='utf-8') a...
0
0
0
0
0
3,760
0
25
224
d4fe28966faa5a50b7d0e50bd68f31a197d1d9e0
3,233
py
Python
fix15/test.py
davidmreed/fix15
0e76df68f8cc69b7d0937e77dc270e47e1798b0a
[ "MIT" ]
8
2018-07-09T13:39:51.000Z
2020-12-02T00:53:14.000Z
fix15/test.py
davidmreed/fix15
0e76df68f8cc69b7d0937e77dc270e47e1798b0a
[ "MIT" ]
null
null
null
fix15/test.py
davidmreed/fix15
0e76df68f8cc69b7d0937e77dc270e47e1798b0a
[ "MIT" ]
null
null
null
import unittest import fix15 import unittest.mock test_file = \ """id,firstname,lastname,accountid 00300000053jhOc,john,smith,00100006gG70oPa 003000A694fjJ21,allison,brown,001000000043463 0030000bB09fQt9,thomas,tomlinson,001000004FfoA00 003000000044000,hannah,anderson,001000000000001 003000000npQ9vB,sarah,white,001000...
35.527473
87
0.694401
import unittest import fix15 import io import unittest.mock import fix15.__main__ test_file = \ """id,firstname,lastname,accountid 00300000053jhOc,john,smith,00100006gG70oPa 003000A694fjJ21,allison,brown,001000000043463 0030000bB09fQt9,thomas,tomlinson,001000004FfoA00 003000000044000,hannah,anderson,001000000000001 00...
0
0
0
2,475
0
0
0
-12
67
c816c9419d8c53a405e48f53b1ae479e7a2fe366
1,929
py
Python
smadventure/namegen.py
Gustavo6046/sentient-mushes-adventure
182e0cae27b161ad331f29a954dc17d952811349
[ "MIT" ]
1
2018-05-31T20:37:08.000Z
2018-05-31T20:37:08.000Z
smadventure/namegen.py
Gustavo6046/sentient-mushes-adventure
182e0cae27b161ad331f29a954dc17d952811349
[ "MIT" ]
null
null
null
smadventure/namegen.py
Gustavo6046/sentient-mushes-adventure
182e0cae27b161ad331f29a954dc17d952811349
[ "MIT" ]
null
null
null
""" This name generator is an improved version of das' random syllable-based name generator. Original source at: https://codereview.stackexchange.com/q/156903 Improved by: Gustavo R. Rehermann (Gustavo6046) """ vowels = 'aeiou' consonants = 'bcdfghjklmnpqrstvwxyz' pre_consonants = 'tspdkcmnlxrg' post_consonants = 'rh...
31.622951
112
0.54225
""" This name generator is an improved version of das' random syllable-based name generator. Original source at: https://codereview.stackexchange.com/q/156903 Improved by: Gustavo R. Rehermann (Gustavo6046) """ import random vowels = 'aeiou' consonants = 'bcdfghjklmnpqrstvwxyz' pre_consonants = 'tspdkcmnlxrg' post_c...
0
0
0
0
0
1,443
0
-8
46
0c338ed5a2b6ac8155e929c1d6f420df08eff519
716
py
Python
src/djanban/apps/charts/migrations/0007_cachedchart_is_expired.py
diegojromerolopez/djanban
6451688d49cf235d03c604b19a6a8480b33eed87
[ "MIT" ]
33
2017-06-14T18:04:25.000Z
2021-06-15T07:07:56.000Z
src/djanban/apps/charts/migrations/0007_cachedchart_is_expired.py
diegojromerolopez/djanban
6451688d49cf235d03c604b19a6a8480b33eed87
[ "MIT" ]
1
2017-05-10T08:45:55.000Z
2017-05-10T08:45:55.000Z
src/djanban/apps/charts/migrations/0007_cachedchart_is_expired.py
diegojromerolopez/djanban
6451688d49cf235d03c604b19a6a8480b33eed87
[ "MIT" ]
8
2017-08-27T11:14:25.000Z
2021-03-03T12:11:16.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2017-03-05 16:59 from __future__ import unicode_literals
26.518519
97
0.675978
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2017-03-05 16:59 from __future__ import unicode_literals from django.db import migrations, models def delete_all_current_cached_charts(apps, schema): CachedChart = apps.get_model("charts", "CachedChart") CachedChart.objects.all().delete() class Migratio...
0
0
0
388
0
127
0
19
69
e1ae3b8dceb17721b3d805f334f83deed58bf35e
1,430
py
Python
lib/evaluate.py
timhannifan/ml-toolkit
a4a113ea5c88c3e64d50fbafa2c82bdf66c5d373
[ "MIT" ]
null
null
null
lib/evaluate.py
timhannifan/ml-toolkit
a4a113ea5c88c3e64d50fbafa2c82bdf66c5d373
[ "MIT" ]
3
2020-06-05T20:41:55.000Z
2021-06-10T21:24:21.000Z
lib/evaluate.py
timhannifan/ml-toolkit
a4a113ea5c88c3e64d50fbafa2c82bdf66c5d373
[ "MIT" ]
null
null
null
''' Class for evaluating trained Classifier model ''' from sklearn.metrics import accuracy_score func_map = { 'accuracy_score': accuracy_score }
26
71
0.593007
''' Class for evaluating trained Classifier model ''' from sklearn.metrics import accuracy_score func_map = { 'accuracy_score': accuracy_score } class ModelEvaluator: ''' Class for evaluating trained Classifier model ''' def __init__(self): self.input = None self.config = {} ...
0
0
0
1,255
0
0
0
0
23
171b35e459d4df2ef610ce1e9bf98a196e7313aa
2,475
py
Python
out1.py
LAKSHMI-PANNEER/Project-works
229b92c89fe5ef133759e4bd5140b23d823fd317
[ "bzip2-1.0.6" ]
null
null
null
out1.py
LAKSHMI-PANNEER/Project-works
229b92c89fe5ef133759e4bd5140b23d823fd317
[ "bzip2-1.0.6" ]
null
null
null
out1.py
LAKSHMI-PANNEER/Project-works
229b92c89fe5ef133759e4bd5140b23d823fd317
[ "bzip2-1.0.6" ]
null
null
null
import nltk from nltk.corpus import stopwords ''' url = 'https://www.lifewire.com/how-to-edit-videos-on-android-4770052' print("From URL:",url,"\n") r = requests.get(url) s = BeautifulSoup(r.content, 'html.parser') ol_read = [tag.text for tag in s.find_all('ol')] ol = [m+'' for m in ol_read] ol_list = "".join(ol) with...
23.798077
70
0.57899
from bs4 import BeautifulSoup import requests import nltk from nltk import sent_tokenize from nltk.tokenize import word_tokenize from nltk.corpus import stopwords from nltk.probability import FreqDist from collections import Counter from nltk import Tree import re ''' url = 'https://www.lifewire.com/how-to-edit-videos-...
0
0
0
0
0
0
0
43
176
8d0baee078c877d889b6857d37c69ce3368c900a
266
py
Python
03-loops/l2.py
philiphinton/learn_python
6ddfe3c7818d6c919bfa49bd6302c75ee761b6a4
[ "MIT" ]
null
null
null
03-loops/l2.py
philiphinton/learn_python
6ddfe3c7818d6c919bfa49bd6302c75ee761b6a4
[ "MIT" ]
3
2022-01-17T22:55:09.000Z
2022-01-26T07:26:13.000Z
03-loops/l2.py
philiphinton/learn_python
6ddfe3c7818d6c919bfa49bd6302c75ee761b6a4
[ "MIT" ]
1
2021-12-14T01:33:21.000Z
2021-12-14T01:33:21.000Z
# Getting all the elements in a list a better way, using a "for" loop shopping_list = ["Tomatoes", "Bananas", "Crackers", "Sugar", "Icecream", "Bread", "Bananas", "Chocolate"] print("Shopping list:") for item in shopping_list: print(item)
24.181818
71
0.635338
# Getting all the elements in a list — a better way, using a "for" loop shopping_list = ["Tomatoes", "Bananas", "Crackers", "Sugar", "Icecream", "Bread", "Bananas", "Chocolate"] print("Shopping list:") for item in shopping_list: print(item)
3
0
0
0
0
0
0
0
0
6ae222686adf7be738f54c0e87c2c1ae9fbf0804
22,835
py
Python
pysnmp-with-texts/A3COM-SWITCHING-SYSTEMS-POLL-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/A3COM-SWITCHING-SYSTEMS-POLL-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/A3COM-SWITCHING-SYSTEMS-POLL-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module A3COM-SWITCHING-SYSTEMS-POLL-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/A3COM-SWITCHING-SYSTEMS-POLL-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:08:25 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Pyt...
248.206522
1,468
0.790891
# # PySNMP MIB module A3COM-SWITCHING-SYSTEMS-POLL-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/A3COM-SWITCHING-SYSTEMS-POLL-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:08:25 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Pyt...
0
0
0
0
0
0
0
0
0
04f724f65cf3f46e8fc88c0677143aa5fee28059
4,150
py
Python
model/hyparameter.py
zouguojian/FDN-Learning
ef89cb7d6654d5ac2425621ec6b330652a281f16
[ "MIT" ]
1
2021-03-24T10:59:27.000Z
2021-03-24T10:59:27.000Z
model/hyparameter.py
zouguojian/FDN-Learning
ef89cb7d6654d5ac2425621ec6b330652a281f16
[ "MIT" ]
null
null
null
model/hyparameter.py
zouguojian/FDN-Learning
ef89cb7d6654d5ac2425621ec6b330652a281f16
[ "MIT" ]
null
null
null
# -- coding: utf-8 -- import argparse if __name__=='__main__': para=parameter(argparse.ArgumentParser()) print(para.get_para().batch_size)
68.032787
126
0.567229
# -- coding: utf-8 -- import argparse class parameter(object): def __init__(self,parser): self.parser=parser self.parser.add_argument('--city_list',type=list,default=['ShangHai','NanJing','SuZhou', 'NanTong','WuXi','ChangZhou', ...
0
0
0
3,980
0
0
0
0
22
46d4f1dd50ef6402432da80f3c3bdcae3c08f7f3
1,856
py
Python
scripts/swarm_mon.py
khromiumos/chromiumos-chromite
a42a85481cdd9d635dc40a04585e427f89f3bb3f
[ "BSD-3-Clause" ]
null
null
null
scripts/swarm_mon.py
khromiumos/chromiumos-chromite
a42a85481cdd9d635dc40a04585e427f89f3bb3f
[ "BSD-3-Clause" ]
2
2021-03-26T00:29:32.000Z
2021-04-30T21:29:33.000Z
scripts/swarm_mon.py
khromiumos/chromiumos-chromite
a42a85481cdd9d635dc40a04585e427f89f3bb3f
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2017 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Send swarming-proxy latency monitoring data to ts_mon.""" from __future__ import absolute_import from __future__ import print_...
34.37037
77
0.689655
# -*- coding: utf-8 -*- # Copyright 2017 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Send swarming-proxy latency monitoring data to ts_mon.""" from __future__ import absolute_import from __future__ import print_...
0
0
0
0
0
1,088
0
107
200
9033ef6254220337e98d6c41b45cfd91eef6907e
181
py
Python
touchtechnology/common/__init__.py
goodtune/vitriolic
d135eecf7acbc229a872585ebafb8bbefca52df4
[ "BSD-3-Clause" ]
null
null
null
touchtechnology/common/__init__.py
goodtune/vitriolic
d135eecf7acbc229a872585ebafb8bbefca52df4
[ "BSD-3-Clause" ]
28
2016-12-09T21:14:19.000Z
2022-01-11T07:17:16.000Z
touchtechnology/common/__init__.py
goodtune/vitriolic
d135eecf7acbc229a872585ebafb8bbefca52df4
[ "BSD-3-Clause" ]
null
null
null
import logging logger = logging.getLogger(__name__) NAME = 'Common Components' INSTALL = ('AccountsSite',) __version__ = '3.5.5' logger.debug('"%s"/"%s"' % (NAME, __version__))
16.454545
47
0.685083
import logging logger = logging.getLogger(__name__) NAME = 'Common Components' INSTALL = ('AccountsSite',) __version__ = '3.5.5' logger.debug('"%s"/"%s"' % (NAME, __version__))
0
0
0
0
0
0
0
0
0
30b13541657f8048f09881d6c5d930cc12bd4dfe
2,893
py
Python
PythonAPI/examples/plot_avg_speed.py
AdaCompNUS/summ
a91f0c06202fb6a4100249882eec69ddf5bc7656
[ "MIT" ]
103
2020-03-10T04:21:50.000Z
2022-03-29T13:26:57.000Z
PythonAPI/examples/plot_avg_speed.py
AdaCompNUS/summ
a91f0c06202fb6a4100249882eec69ddf5bc7656
[ "MIT" ]
12
2020-04-11T11:36:01.000Z
2021-12-09T11:35:56.000Z
PythonAPI/examples/plot_avg_speed.py
AdaCompNUS/summ
a91f0c06202fb6a4100249882eec69ddf5bc7656
[ "MIT" ]
8
2020-11-21T07:47:12.000Z
2022-03-25T13:41:05.000Z
import matplotlib.pyplot as plt INTERVAL = 30 WINDOW = 5 data_gamma = read_avg_speed('statistics.gamma.log') data_simple = read_avg_speed('statistics.ttc.log') fig, axs = plt.subplots(figsize=(17.5, 8)) axs.set_xlabel('Simulation Time (s)', fontsize=34) axs.set_ylabel('Average Speed (m/s)', fontsize=34) plt.xlim(0, ...
25.830357
98
0.529554
import numpy as np import matplotlib.pyplot as plt INTERVAL = 30 WINDOW = 5 def read_avg_speed(path): data = [] with open(path) as f: last_time = 0 line = f.readline() window_total_speed = [0, 0, 0] window_num = 0 global_total_speed = 0 global_num = 0 ...
0
0
0
0
0
1,110
0
-3
45
25661dcea64c2d32d43027c7a16476ed57b60ea4
1,579
py
Python
ipyparallel/client/_joblib.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
1
2022-01-25T22:52:58.000Z
2022-01-25T22:52:58.000Z
ipyparallel/client/_joblib.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
ipyparallel/client/_joblib.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
"""joblib parallel backend for IPython Parallel""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from __future__ import absolute_import
30.960784
74
0.58898
"""joblib parallel backend for IPython Parallel""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from __future__ import absolute_import import ipyparallel as ipp from joblib.parallel import ParallelBackendBase, AutoBatchingMixin class IPythonParallelBackend(Auto...
0
0
0
1,268
0
0
0
49
68
d8d78f589fecd38330fac246db9e695fca3359d5
42
py
Python
Autokey/CapsKeybinds/shift alt/left.py
MisaghM/Capslock-Keybindings
00332c7d39cf776c43fe13aa08e1c2969747425d
[ "MIT" ]
1
2021-11-05T19:39:36.000Z
2021-11-05T19:39:36.000Z
Autokey/CapsKeybinds/shift alt/left.py
MisaghM/Capslock-Keybindings
00332c7d39cf776c43fe13aa08e1c2969747425d
[ "MIT" ]
null
null
null
Autokey/CapsKeybinds/shift alt/left.py
MisaghM/Capslock-Keybindings
00332c7d39cf776c43fe13aa08e1c2969747425d
[ "MIT" ]
null
null
null
keyboard.send_keys("<shift>+<alt>+<left>")
42
42
0.690476
keyboard.send_keys("<shift>+<alt>+<left>")
0
0
0
0
0
0
0
0
0
9c32dd67d59654f7d35162c52dc0a458bdcd6fc5
242
py
Python
tests/test_multiple_lines_489.py
themiwi/ggplot
b6d23c22d52557b983da8ce7a3a6992501dadcd6
[ "BSD-2-Clause" ]
1,133
2017-01-10T16:58:15.000Z
2022-03-31T14:40:29.000Z
tests/test_multiple_lines_489.py
themiwi/ggplot
b6d23c22d52557b983da8ce7a3a6992501dadcd6
[ "BSD-2-Clause" ]
287
2015-01-02T18:54:17.000Z
2017-01-10T14:48:14.000Z
tests/test_multiple_lines_489.py
themiwi/ggplot
b6d23c22d52557b983da8ce7a3a6992501dadcd6
[ "BSD-2-Clause" ]
295
2017-01-16T19:16:49.000Z
2022-02-18T14:10:58.000Z
import pandas as pd df = pd.DataFrame({'a': range(0,3), 'b': range(1,4)}) df['x'] = df.index df = pd.melt(df, id_vars='x') print df print ggplot(aes(x='x', y='value', color='variable'), df) + geom_line() + geom_point()
24.2
86
0.628099
from ggplot import * import pandas as pd df = pd.DataFrame({'a': range(0,3), 'b': range(1,4)}) df['x'] = df.index df = pd.melt(df, id_vars='x') print df print ggplot(aes(x='x', y='value', color='variable'), df) + geom_line() + geom_point()
0
0
0
0
0
0
0
-1
22
a91506587a48276be47e00254986ca05fb660424
17,256
py
Python
hpx/general.py
flowmatters/py-hpx
43408da4235dd22d17dd7189bf485eb5682ed944
[ "0BSD" ]
null
null
null
hpx/general.py
flowmatters/py-hpx
43408da4235dd22d17dd7189bf485eb5682ed944
[ "0BSD" ]
null
null
null
hpx/general.py
flowmatters/py-hpx
43408da4235dd22d17dd7189bf485eb5682ed944
[ "0BSD" ]
null
null
null
import os from datetime import datetime HP1_DIR=os.path.join(os.getcwd(),'HP1') HP1_EXE=os.path.join(HP1_DIR,'hp1.exe') DEFAULT_OUTPUTS={ 'Volume':{ 'time':True, 'file':'T_LEVEL', 'column':'Volume' }, 'pH':{ 'dims':[ 'time', ...
32.806084
577
0.511242
import pandas as pd import numpy as np import xarray as xr import sys import os from glob import glob import re from datetime import datetime import tempfile import shutil from .gw import set_gw_depth HP1_DIR=os.path.join(os.getcwd(),'HP1') HP1_EXE=os.path.join(HP1_DIR,'hp1.exe') DEFAULT_OUTPUTS={ ...
0
0
0
8,737
0
4,191
0
-37
585
5867f6c9c7c4def1e9b0a718d6d1eb06ea352cdf
7,931
py
Python
neutron/db/migration/alembic_migrations/versions/4dbe243cd84d_nsxv.py
gampel/neutron
51a6260266dc59c066072ca890ad9c40b1aad6cf
[ "Apache-2.0" ]
null
null
null
neutron/db/migration/alembic_migrations/versions/4dbe243cd84d_nsxv.py
gampel/neutron
51a6260266dc59c066072ca890ad9c40b1aad6cf
[ "Apache-2.0" ]
null
null
null
neutron/db/migration/alembic_migrations/versions/4dbe243cd84d_nsxv.py
gampel/neutron
51a6260266dc59c066072ca890ad9c40b1aad6cf
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 OpenStack Foundation # # 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 law ...
47.777108
79
0.655403
# Copyright 2015 OpenStack Foundation # # 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 law ...
0
0
0
0
0
6,359
0
1
68
1d1ff3b7b618564e23192fb672b17c4db4eaae46
3,048
py
Python
byslib/numeric/modint.py
bayashi-cl/byslib-python
d7cbb1cb75904e85c353227def7c99a2bceea12c
[ "CC0-1.0" ]
null
null
null
byslib/numeric/modint.py
bayashi-cl/byslib-python
d7cbb1cb75904e85c353227def7c99a2bceea12c
[ "CC0-1.0" ]
null
null
null
byslib/numeric/modint.py
bayashi-cl/byslib-python
d7cbb1cb75904e85c353227def7c99a2bceea12c
[ "CC0-1.0" ]
null
null
null
# @title Modint def using_modint(modulo: int): """using modint set modulo to modint class Parameters ---------- modulo Returns ------- modint class mod = modulo """ return Mint modint998244353 = using_modint(998244353) modint1000000007 = using_modint(1000000007)
22.746269
69
0.533793
# @title Modint from typing import Union class modint: """Modint Not so fast. """ __slots__ = ("v",) mod: int = 0 def __init__(self, v: int = 0) -> None: self.v = v % self.mod def __repr__(self): return str(self.v) def __index__(self): return self.v def...
0
0
0
2,657
0
0
0
3
72
8ef7506f7bb587683b0b006d526ff934d98c696d
264
py
Python
python challenges/level03.py
Vinay26k/python
9acfb8b6a2ba2dbe0621edf2260d29cc0e3b087d
[ "MIT" ]
3
2019-02-22T12:57:15.000Z
2021-08-07T16:27:47.000Z
python challenges/level03.py
Vinay26k/python
9acfb8b6a2ba2dbe0621edf2260d29cc0e3b087d
[ "MIT" ]
null
null
null
python challenges/level03.py
Vinay26k/python
9acfb8b6a2ba2dbe0621edf2260d29cc0e3b087d
[ "MIT" ]
2
2019-04-27T06:02:12.000Z
2020-12-16T14:50:41.000Z
'Hint: Page Source' #https://github.com/Vinay26k/pythonchallenge import requests url = r'http://www.pythonchallenge.com/pc/def/equality.html' r = requests.get(url).text import re print(''.join((re.findall("[^A-Z]+[A-Z]{3}([a-z])[A-Z]{3}[^A-Z]+",r))))
24
72
0.640152
'Hint: Page Source' #https://github.com/Vinay26k/pythonchallenge import requests url = r'http://www.pythonchallenge.com/pc/def/equality.html' r = requests.get(url).text import re print(''.join((re.findall("[^A-Z]+[A-Z]{3}([a-z])[A-Z]{3}[^A-Z]+",r))))
0
0
0
0
0
0
0
0
0
f2c9cb1a9f3e4af8d25f8ecf6c9552ba003f742e
1,979
py
Python
setup.py
JMarkin/afbmq
8491abfdd17e2ab745b5150eafdaf68a0f3cd1d0
[ "MIT" ]
null
null
null
setup.py
JMarkin/afbmq
8491abfdd17e2ab745b5150eafdaf68a0f3cd1d0
[ "MIT" ]
null
null
null
setup.py
JMarkin/afbmq
8491abfdd17e2ab745b5150eafdaf68a0f3cd1d0
[ "MIT" ]
null
null
null
import os import setuptools from setuptools import find_packages base_path = os.path.dirname(__file__) with open(os.path.join(base_path, 'README.md')) as readme: README = readme.read() os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) packages = find_packages() exclude_packages...
29.984848
94
0.640222
import os import re import setuptools from pkg_resources import parse_requirements from setuptools import find_packages base_path = os.path.dirname(__file__) with open(os.path.join(base_path, 'README.md')) as readme: README = readme.read() os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.par...
0
0
0
0
0
832
0
11
90
6efc3b28633381c436d432be8ec27980b701a080
820
py
Python
main.py
kodi1/hts.tivi.bridge
428da95c5d28b11a3292597205d78961064fe130
[ "MIT" ]
1
2018-12-01T05:59:38.000Z
2018-12-01T05:59:38.000Z
main.py
kodi1/hts.tivi.bridge
428da95c5d28b11a3292597205d78961064fe130
[ "MIT" ]
null
null
null
main.py
kodi1/hts.tivi.bridge
428da95c5d28b11a3292597205d78961064fe130
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import os if __name__ == "__main__": mac = os.getenv('TIVIBG_MAC', False) if not mac: sys.exit('TIVIBG_MAC is not set\nTIVIBG_MAC=aa:bb:cc:dd:ee:ff %s' % (sys.argv[0])) import server server.log_cb = __log server.my_serv = server.serv(host=os.uname()[1...
21.025641
86
0.557317
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import os def cmd_get_dbg(): return raw_input("q - quit\nr - restart\n") def main(): server.my_serv.start() try: while True: c = raw_input("q - quit\nr - restart\n") if c: print c if c == "q": ...
0
0
0
0
0
396
0
0
69
a04975a1d1e192e5e6724d0b2152e08ff387b8e7
2,438
py
Python
searchAssetsTest.py
cldcvr/CCSimpleMonitor
6591470b9a97930aab27f330fbc3dc62a950276a
[ "BSD-3-Clause" ]
null
null
null
searchAssetsTest.py
cldcvr/CCSimpleMonitor
6591470b9a97930aab27f330fbc3dc62a950276a
[ "BSD-3-Clause" ]
null
null
null
searchAssetsTest.py
cldcvr/CCSimpleMonitor
6591470b9a97930aab27f330fbc3dc62a950276a
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import requests, json, random, string, time, sys try: response_time_threshold = int(sys.argv[1]) except IndexError: response_time_threshold = 500 #default value of response_time_threshold url = "http://tvpapi.as.tvinci.com/v3_4/gateways/jsonpostgw.aspx" querystring = {"m":"SearchAsset...
46.884615
624
0.633306
#!/usr/bin/env python import requests, json, random, string, time, sys try: response_time_threshold = int(sys.argv[1]) except IndexError: response_time_threshold = 500 #default value of response_time_threshold url = "http://tvpapi.as.tvinci.com/v3_4/gateways/jsonpostgw.aspx" querystring = {"m":"SearchAsset...
0
0
0
0
0
0
0
0
0
9b2b51cceff01f31b74be47de73dfe6a6723b5e0
1,733
py
Python
Python3/61.py
rakhi2001/ecom7
73790d44605fbd51e8f7e804b9808e364fcfc680
[ "MIT" ]
854
2018-11-09T08:06:16.000Z
2022-03-31T06:05:53.000Z
Python3/61.py
rakhi2001/ecom7
73790d44605fbd51e8f7e804b9808e364fcfc680
[ "MIT" ]
29
2019-06-02T05:02:25.000Z
2021-11-15T04:09:37.000Z
Python3/61.py
rakhi2001/ecom7
73790d44605fbd51e8f7e804b9808e364fcfc680
[ "MIT" ]
347
2018-12-23T01:57:37.000Z
2022-03-12T14:51:21.000Z
__________________________________________________________________________________________________ sample 28 ms submission # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None _______________________________________________________________...
28.883333
98
0.594345
__________________________________________________________________________________________________ sample 28 ms submission # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: def rotateRight(self, head: ListNode, k: i...
0
0
0
1,071
0
0
0
0
46
89003caf5fec2469679ebee46daf640b60326a87
3,167
py
Python
services/DiscordRpcService.py
phineas05/discord-rich-presence-plex
bdb39e44d4a1b4773ba502f0cfd12202017d9bea
[ "MIT" ]
9
2022-01-06T18:00:53.000Z
2022-03-27T07:53:48.000Z
services/DiscordRpcService.py
phineas05/discord-rich-presence-plex
bdb39e44d4a1b4773ba502f0cfd12202017d9bea
[ "MIT" ]
2
2022-01-09T19:41:52.000Z
2022-03-12T15:14:07.000Z
services/DiscordRpcService.py
phineas05/discord-rich-presence-plex
bdb39e44d4a1b4773ba502f0cfd12202017d9bea
[ "MIT" ]
2
2022-01-09T20:22:31.000Z
2022-03-05T13:37:03.000Z
# pyright: reportOptionalMemberAccess=none
33.691489
221
0.719608
# pyright: reportOptionalMemberAccess=none from store.constants import discordClientID, isUnix, processID from typing import Any, Optional from utils.logging import logger import asyncio import json import models.discord import os import struct import time class DiscordRpcService: ipcPipe = ((os.environ.get("XDG_RU...
0
0
832
2,054
0
0
0
16
222
d35d8d0a446de0c957a1295bd285b4b186d8e4d6
1,560
py
Python
tests/unit/decisions/test_start_child_workflow_execution.py
EpicWink/floto
eb0d93d032b5e14e304e350cee28f27cfe735b73
[ "MIT" ]
43
2016-02-29T17:44:57.000Z
2021-12-28T00:41:47.000Z
tests/unit/decisions/test_start_child_workflow_execution.py
EpicWink/floto
eb0d93d032b5e14e304e350cee28f27cfe735b73
[ "MIT" ]
9
2016-02-29T23:38:36.000Z
2016-09-02T21:48:00.000Z
tests/unit/decisions/test_start_child_workflow_execution.py
EpicWink/floto
eb0d93d032b5e14e304e350cee28f27cfe735b73
[ "MIT" ]
10
2016-02-29T16:53:09.000Z
2018-12-12T00:06:08.000Z
import floto.decisions
38.04878
98
0.667949
import pytest import floto.decisions import floto.api import json class TestStartChildWorkflowExecution(): def test_init_workflow_id(self): w = floto.decisions.StartChildWorkflowExecution(workflow_id='id') assert w.get_attributes()['workflowId'] == 'id' def test_init_workflow_type(se...
0
0
0
1,467
0
0
0
-23
91
8c640c909303fd9482442a51b360dde5e01bfdd5
2,394
py
Python
ytGhostBuster.py
carneeki/ytGhostBuster
caa0022ea41a2eb8a84ad17666c97f5a4093c0dc
[ "MIT" ]
null
null
null
ytGhostBuster.py
carneeki/ytGhostBuster
caa0022ea41a2eb8a84ad17666c97f5a4093c0dc
[ "MIT" ]
null
null
null
ytGhostBuster.py
carneeki/ytGhostBuster
caa0022ea41a2eb8a84ad17666c97f5a4093c0dc
[ "MIT" ]
null
null
null
#!/usr/bin/python import os API_KEY="" # TODO: get from console.google.com VIDSBASE='{}/Videos/YouTubes/'.format(os.path.expanduser("~")) # TODO: set where all vids will be saved channels=[ "UC7SeFWZYFmsm1tqWxfuOTPQ", # dankula "UCwW_vaMPlq8J4weKDsfeJzw", # Bearing "UC-yewGHQbNFpDrGM0diZOLA", # Sargon ...
32.794521
133
0.586466
#!/usr/bin/python import urllib.request import json import os import itertools import re API_KEY="" # TODO: get from console.google.com VIDSBASE='{}/Videos/YouTubes/'.format(os.path.expanduser("~")) # TODO: set where all vids will be saved channels=[ "UC7SeFWZYFmsm1tqWxfuOTPQ", # dankula "UCwW_vaMPlq8J4weKDs...
0
0
0
0
0
740
0
-27
158
40d2c44e01333ae9a14e5570c9447ecdd991c725
3,192
py
Python
tests/models/test_array_transformer.py
mschulzie/xeofs
a446135962c1a5a3f3588a08c2e572cf8d19ac2f
[ "MIT" ]
null
null
null
tests/models/test_array_transformer.py
mschulzie/xeofs
a446135962c1a5a3f3588a08c2e572cf8d19ac2f
[ "MIT" ]
null
null
null
tests/models/test_array_transformer.py
mschulzie/xeofs
a446135962c1a5a3f3588a08c2e572cf8d19ac2f
[ "MIT" ]
null
null
null
import warnings warnings.filterwarnings("ignore", message="numpy.dtype size changed") warnings.filterwarnings("ignore", message="numpy.ufunc size changed")
29.018182
69
0.657895
import numpy as np import pytest import warnings from numpy.testing import assert_array_equal from xeofs.models._array_transformer import _ArrayTransformer warnings.filterwarnings("ignore", message="numpy.dtype size changed") warnings.filterwarnings("ignore", message="numpy.ufunc size changed") @pytest.mark.parametr...
0
2,140
0
0
0
587
0
52
249
a739fbedc96013ef7b3b5bed5b53ceca7aa8cf0b
375
py
Python
d2_total_checker.py
DK2K00/100DaysOfCode
68a9422b8b0b3aa233b1e11e310a6a58453e35c1
[ "MIT" ]
null
null
null
d2_total_checker.py
DK2K00/100DaysOfCode
68a9422b8b0b3aa233b1e11e310a6a58453e35c1
[ "MIT" ]
null
null
null
d2_total_checker.py
DK2K00/100DaysOfCode
68a9422b8b0b3aa233b1e11e310a6a58453e35c1
[ "MIT" ]
null
null
null
total_checker_all([0, 1, 2, 2, 3, 4], 4)
18.75
40
0.386667
def total_checker_all(arr, tot): n = 0 pairs = set() for i in arr: for j in arr: if(i + j == tot): if(i - j >= 0): tut = (i, j) pairs.add(tut) n += 1 print("Number pf pairs: ", n) print("Pairs are: ...
0
0
0
0
0
308
0
0
22
d3d379251f1cbea4fb9320f8d52695b92b82a5d8
1,252
py
Python
magnum/common/nova.py
ajmadsen/magnum
042d2ad14489afcecf0a3bc4038e2333e2acb3fb
[ "Apache-2.0" ]
319
2015-04-01T01:36:14.000Z
2022-01-18T13:21:46.000Z
magnum/common/nova.py
ajmadsen/magnum
042d2ad14489afcecf0a3bc4038e2333e2acb3fb
[ "Apache-2.0" ]
10
2015-06-05T20:12:46.000Z
2018-10-17T09:14:22.000Z
magnum/common/nova.py
ajmadsen/magnum
042d2ad14489afcecf0a3bc4038e2333e2acb3fb
[ "Apache-2.0" ]
254
2015-03-30T13:56:06.000Z
2022-03-26T03:40:22.000Z
# Copyright 2019 Catalyst Cloud Ltd. # # 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 law or...
35.771429
77
0.723642
# Copyright 2019 Catalyst Cloud Ltd. # # 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 law or...
0
0
0
0
0
415
0
42
68
6ad87f45efcf6c3e5326ac7bc79bca2462043553
14,158
py
Python
code/train.py
kensakurada/SceneChangeDet
0530e0162863fec0c5296188526f0d27e0109814
[ "MIT" ]
null
null
null
code/train.py
kensakurada/SceneChangeDet
0530e0162863fec0c5296188526f0d27e0109814
[ "MIT" ]
null
null
null
code/train.py
kensakurada/SceneChangeDet
0530e0162863fec0c5296188526f0d27e0109814
[ "MIT" ]
null
null
null
import torch.nn as nn import torchvision.datasets as dates ### options = ['TSUNAMI','GSV','CMU','CD2014'] datasets = 'TSUNAMI' if datasets == 'TSUNAMI': import cfgs.TSUNAMIconfig as cfg import dataset.TSUNAMI as dates if datasets == 'GSV': import cfgs.GSVconfig as cfg import dataset.GSV as dates if dat...
50.028269
189
0.680887
import numpy as np import os import torch import torch.nn as nn import torchvision import torch.utils.data as Data import torchvision.datasets as dates from torch.autograd import Variable from torch.nn import functional as F import utils.transforms as trans import utils.utils as util import layer.loss as ls import util...
0
0
0
0
1,008
12,072
0
34
568
7c88a39a0373fdf4993468230d1a7f437b9fb756
5,868
py
Python
examples/workflow_steps/async_steps_from_apps_decorator.py
hirosassa/bolt-python
befc3a1463f3ac8dbb780d66decc304e2bdf3e7a
[ "MIT" ]
504
2020-08-07T05:02:57.000Z
2022-03-31T14:32:46.000Z
examples/workflow_steps/async_steps_from_apps_decorator.py
hirosassa/bolt-python
befc3a1463f3ac8dbb780d66decc304e2bdf3e7a
[ "MIT" ]
560
2020-08-07T01:16:06.000Z
2022-03-30T00:40:56.000Z
examples/workflow_steps/async_steps_from_apps_decorator.py
hirosassa/bolt-python
befc3a1463f3ac8dbb780d66decc304e2bdf3e7a
[ "MIT" ]
150
2020-08-07T09:41:14.000Z
2022-03-30T04:54:51.000Z
import logging from slack_bolt.async_app import AsyncApp from slack_bolt.workflows.step.async_step import (AsyncWorkflowStep) logging.basicConfig(level=logging.DEBUG) # export SLACK_SIGNING_SECRET=*** # export SLACK_BOT_TOKEN=xoxb-*** app = AsyncApp() # https://api.slack.com/tutorials/workflow-builder-steps copy_r...
30.092308
165
0.488412
import asyncio import logging from slack_sdk.web.async_client import AsyncSlackResponse, AsyncWebClient from slack_bolt.async_app import AsyncApp, AsyncAck from slack_bolt.workflows.step.async_step import ( AsyncConfigure, AsyncUpdate, AsyncComplete, AsyncFail, AsyncWorkflowStep, ) logging.basicCo...
0
4,681
348
0
0
0
0
133
183
53f01f135edde500f7cc4d318c0c16eb690dafed
4,559
py
Python
src/core.py
t-ntran/vscode
79488e9971073b6a065744ae5eca7146f4e10257
[ "MIT" ]
null
null
null
src/core.py
t-ntran/vscode
79488e9971073b6a065744ae5eca7146f4e10257
[ "MIT" ]
null
null
null
src/core.py
t-ntran/vscode
79488e9971073b6a065744ae5eca7146f4e10257
[ "MIT" ]
1
2021-11-29T16:51:54.000Z
2021-11-29T16:51:54.000Z
# import numpy as np # from PIL import Image # Code manipulation magic_var_name = "__run_py__" ''' Reference: https://stackoverflow.com/questions/1769332/script-to-remove-python-comments-docstrings ''' #Getting test comment lines # Image Processing # Convert PIL.Image to html # Convert ndarray to PIL.Image # C...
27.969325
171
0.694012
import re import io import base64 # import numpy as np import tokenize # from PIL import Image # Code manipulation magic_var_name = "__run_py__" ''' Reference: https://stackoverflow.com/questions/1769332/script-to-remove-python-comments-docstrings ''' def remove_comments_and_docstrings(source): io_obj = io.StringIO...
0
0
0
0
0
3,886
0
-38
359
5cd06a6e171653ae9a38c5507965ef87661c0d81
1,570
py
Python
tests/DummyEngine.py
TonyFlury/pyorm
6d811fa32d3ba4c4a013fbb8f627277fa9d20b64
[ "MIT" ]
null
null
null
tests/DummyEngine.py
TonyFlury/pyorm
6d811fa32d3ba4c4a013fbb8f627277fa9d20b64
[ "MIT" ]
null
null
null
tests/DummyEngine.py
TonyFlury/pyorm
6d811fa32d3ba4c4a013fbb8f627277fa9d20b64
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding=utf-8 """ # pyORM : Implementation of DummyEngine Summary : <summary of module/class being implemented> Use Case : As a <actor> I want <outcome> So that <justification> Testable Statements : Can I <Boolean statement> .... """ __version__ = "0.1" __author__ = 'Tony Flu...
24.920635
85
0.680892
#!/usr/bin/env python # coding=utf-8 """ # pyORM : Implementation of DummyEngine Summary : <summary of module/class being implemented> Use Case : As a <actor> I want <outcome> So that <justification> Testable Statements : Can I <Boolean statement> .... """ from unittest.mock import MagicMock from p...
0
130
0
888
0
0
0
55
113
f8f23887f0d0074ba36e4792c44de2f2b901d252
3,171
py
Python
core/wagtail_hooks.py
methods/phe-cv19-site
fd5f877b8a0725a9893fa3c24a54e9495e749744
[ "MIT" ]
1
2020-09-21T16:35:16.000Z
2020-09-21T16:35:16.000Z
core/wagtail_hooks.py
methods/phe-cv19-site
fd5f877b8a0725a9893fa3c24a54e9495e749744
[ "MIT" ]
14
2020-03-25T10:29:26.000Z
2022-01-13T03:45:38.000Z
core/wagtail_hooks.py
methods/phe-cv19-site
fd5f877b8a0725a9893fa3c24a54e9495e749744
[ "MIT" ]
null
null
null
from wagtail.contrib.modeladmin.options import (modeladmin_register) from wagtail.core import hooks modeladmin_register(MenuAdmin) modeladmin_register(FooterAdmin) modeladmin_register(AccessAttemptAdmin) modeladmin_register(CreateNewResourceTypeAdmin) modeladmin_register(MethodsRedirectAdmin) # Remove the ...
31.39604
103
0.737307
from axes.models import AccessAttempt from wagtail.contrib.modeladmin.options import (ModelAdmin, modeladmin_register) from wagtail.core import hooks from wagtail.admin import widgets as wagtailadmin_widgets from .models.nav import Menu, Footer from contentPages.models import HomePage, CreateNewResourceType from .mod...
0
588
0
1,609
0
0
0
142
295
1201c64cfbfc13d30456c47727cabb0fec523874
4,411
py
Python
tools/lint/usort_linter.py
samiwilf/torchrec
50ff0973d5d01ec80fe36ba5f1d524c92c799836
[ "BSD-3-Clause" ]
1
2022-03-07T09:06:11.000Z
2022-03-07T09:06:11.000Z
tools/lint/usort_linter.py
samiwilf/torchrec
50ff0973d5d01ec80fe36ba5f1d524c92c799836
[ "BSD-3-Clause" ]
null
null
null
tools/lint/usort_linter.py
samiwilf/torchrec
50ff0973d5d01ec80fe36ba5f1d524c92c799836
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. if __name__ == "__main__": main()
30.631944
79
0.52029
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. import argparse import concurrent.futures import json import os import subprocess from t...
0
0
0
0
0
3,881
0
32
225
0e742138560ef22f1f33a7b6f136527baba2d4c2
4,030
py
Python
src/pred/LinearSVC_L2/RUNME_pred.py
WojciechMigda/TCO-CDC-OIICS
f6f8da2c09d0c77b10fddeadb1d9b30e6764c895
[ "MIT" ]
null
null
null
src/pred/LinearSVC_L2/RUNME_pred.py
WojciechMigda/TCO-CDC-OIICS
f6f8da2c09d0c77b10fddeadb1d9b30e6764c895
[ "MIT" ]
null
null
null
src/pred/LinearSVC_L2/RUNME_pred.py
WojciechMigda/TCO-CDC-OIICS
f6f8da2c09d0c77b10fddeadb1d9b30e6764c895
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import plac if __name__ == "__main__": plac.call(main)
32.24
155
0.617866
#!/usr/bin/python3 from ReadData import read_train, read_test from sklearn.base import BaseEstimator, TransformerMixin from sklearn.pipeline import FeatureUnion from sklearn.compose import ColumnTransformer from sklearn.feature_extraction.text import CountVectorizer from sklearn.preprocessing import FunctionTransform...
0
2,146
0
1,301
0
0
0
229
269
722913a99c98b289366edfe8f69fda2d1b33fc18
1,186
py
Python
Algorithms/Sorting/MergeSort.py
Yarintop/Data-Structures-And-Algorithms-In-Python
55db9e7f39211c42988171d51ef2659041df1aa1
[ "MIT" ]
null
null
null
Algorithms/Sorting/MergeSort.py
Yarintop/Data-Structures-And-Algorithms-In-Python
55db9e7f39211c42988171d51ef2659041df1aa1
[ "MIT" ]
null
null
null
Algorithms/Sorting/MergeSort.py
Yarintop/Data-Structures-And-Algorithms-In-Python
55db9e7f39211c42988171d51ef2659041df1aa1
[ "MIT" ]
null
null
null
import random if __name__ == "__main__": arr = [] for i in range(10): arr.append(random.randint(-20, 20)) print(arr) MergeSort.mergeSort(arr) print(arr)
21.962963
72
0.369309
import random class MergeSort: @staticmethod def mergeSort(arr): """Sort an array using the Merge Sort algorithm. Args: arr ((Comparable) objects array): The array we wish to sort. Time Complexity: Worst-Case: T(n) = 2T(n/2) + θ(n) || θ(nLog(n)) ...
4
929
0
-5
0
0
0
0
49
1a6a4976a069bdb461e9c492db9b0df3067479e6
1,906
py
Python
downloadutil/checksum_util.py
yugabyte/downloadutil
231c472b60e78ef3033b9e90d5e7b4231f64e228
[ "Apache-2.0" ]
2
2021-04-06T00:49:03.000Z
2021-04-06T17:44:04.000Z
downloadutil/checksum_util.py
mbautin/downloadutil
19995e08c03ac267ba0e6f9b4724a12df247f79a
[ "Apache-2.0" ]
null
null
null
downloadutil/checksum_util.py
mbautin/downloadutil
19995e08c03ac267ba0e6f9b4724a12df247f79a
[ "Apache-2.0" ]
1
2021-04-19T20:16:42.000Z
2021-04-19T20:16:42.000Z
from downloadutil.util import BUFFER_SIZE_BYTES from typing import Any import re SHA256_CHECKSUM_RE = re.compile(r'^[0-9a-f]{64}$') SHA256_CHECKSUM_FILE_SUFFIX = '.sha256' def validate_sha256sum(checksum_str: str) -> None: """ Validtes the given SHA256 checksum. Raises an exception if it is invalid. ""...
31.766667
96
0.721406
import os from downloadutil.util import BUFFER_SIZE_BYTES from typing import Any import re import hashlib SHA256_CHECKSUM_RE = re.compile(r'^[0-9a-f]{64}$') SHA256_CHECKSUM_FILE_SUFFIX = '.sha256' def validate_sha256sum(checksum_str: str) -> None: """ Validtes the given SHA256 checksum. Raises an exception...
0
0
0
0
0
876
0
-19
159
d8d4205d758aefb9175a8fe50596bd93757be97c
2,858
py
Python
d18.py
sclarke/adventofcode2017
9994d613f26879c6e6dccc7962e3191407214fa3
[ "BSD-3-Clause" ]
2
2017-12-02T18:52:33.000Z
2017-12-08T09:49:41.000Z
d18.py
sclarke/adventofcode2017
9994d613f26879c6e6dccc7962e3191407214fa3
[ "BSD-3-Clause" ]
null
null
null
d18.py
sclarke/adventofcode2017
9994d613f26879c6e6dccc7962e3191407214fa3
[ "BSD-3-Clause" ]
null
null
null
test_input = [line.split() for line in """ set a 1 add a 2 mul a a mod a 5 snd a set a 0 rcv a jgz a -1 set a 1 jgz a -2 """.strip().splitlines()] test_input2 = [line.split() for line in """ snd 1 snd 2 snd p rcv a rcv b rcv c rcv d""".strip().splitlines()] with open('d18_input.txt') as f: puzzle_input = [line.s...
21.984615
88
0.59972
from collections import defaultdict from queue import Queue, Empty from threading import Thread test_input = [line.split() for line in """ set a 1 add a 2 mul a a mod a 5 snd a set a 0 rcv a jgz a -1 set a 1 jgz a -2 """.strip().splitlines()] test_input2 = [line.split() for line in """ snd 1 snd 2 snd p rcv a rcv b r...
0
0
0
0
0
2,208
0
30
112
0aba810decb5a5f50b912d603dfe077ffa97d0df
5,888
py
Python
scripts/core/io.py
whackashoe/entwinement
4acff2147b86e08e267fc50c327917a338c7bf36
[ "Unlicense" ]
1
2020-03-10T10:52:13.000Z
2020-03-10T10:52:13.000Z
scripts/core/io.py
whackashoe/entwinement
4acff2147b86e08e267fc50c327917a338c7bf36
[ "Unlicense" ]
null
null
null
scripts/core/io.py
whackashoe/entwinement
4acff2147b86e08e267fc50c327917a338c7bf36
[ "Unlicense" ]
null
null
null
#TODO #def addPhysObjBox(id, x, y, w, h, d, r, f): pass #def addCirc(id, x, y, r, d, r, f): pass #def addTri(id, x1, y1, x2, y2, x3, y3): pass #def addDJoint(id, b1_id, b2_id, x1, y1, x2, y2, dist, freq): pass # DEATH/REMOVAL # TODO # def rm_Object(id): pass # def rm_Joint(id): pass # world shit """ all of the ...
26.053097
289
0.574049
def createPhysicalCircle(id, x, y, radius, d, r, f): global com com += 'a fo '+str(id)+' '+str(x)+' '+str(y)+' '+str(radius)+' '+str(d)+' '+str(r)+' '+str(f)+';' def createPhysicalRect(id, x, y, w, h, d, r, f): global com com += 'a fo '+str(id)+' '+str(x)+' '+str(y)+' '+str(w)+' '+str(h)+' '+str(d)+' '+str(r)+' '...
0
0
0
0
0
3,945
0
0
1,140
f496cfe7ddd043e31b8309491379e83806b4dc94
5,523
py
Python
utils/mqtt/mqtt-test-node.py
fjmolinas/pyaiot
7b8ae503c13289380fd42584e33d6585b1790c75
[ "BSD-3-Clause" ]
33
2017-05-02T13:54:29.000Z
2022-01-31T13:52:59.000Z
utils/mqtt/mqtt-test-node.py
fjmolinas/pyaiot
7b8ae503c13289380fd42584e33d6585b1790c75
[ "BSD-3-Clause" ]
20
2017-04-28T07:45:32.000Z
2021-06-14T06:55:07.000Z
utils/mqtt/mqtt-test-node.py
fjmolinas/pyaiot
7b8ae503c13289380fd42584e33d6585b1790c75
[ "BSD-3-Clause" ]
12
2017-04-24T14:21:23.000Z
2021-11-25T13:47:46.000Z
import logging import asyncio import random import socket logging.basicConfig(format='%(asctime)s - %(name)14s - ' '%(levelname)5s - %(message)s') logger = logging.getLogger("mqtt_test_node") MQTT_URL = 'mqtt://localhost:1886/' NODE_ID = 'mqtt_test_node' LED_VALUE = '0' DELAY_CHECK = 30 # ...
39.45
78
0.543907
import json import logging import asyncio import random import socket from hbmqtt.client import MQTTClient, ClientException from hbmqtt.mqtt.constants import QOS_1 logging.basicConfig(format='%(asctime)s - %(name)14s - ' '%(levelname)5s - %(message)s') logger = logging.getLogger("mqtt_test_...
4
0
3,155
0
0
369
0
40
205
5ce67e748396b114b331d39df035b0a4adf76d7b
4,171
py
Python
sportsdataverse/mbb/mbb_loaders.py
saiemgilani/sportsdataverse-py
77ae3accbb071b5308335b931e4e55a65e1500cd
[ "MIT" ]
12
2021-10-15T01:24:18.000Z
2022-03-15T17:00:22.000Z
sportsdataverse/mbb/mbb_loaders.py
saiemgilani/sportsdataverse-py
77ae3accbb071b5308335b931e4e55a65e1500cd
[ "MIT" ]
19
2021-11-02T05:53:41.000Z
2022-03-16T14:16:51.000Z
sportsdataverse/mbb/mbb_loaders.py
saiemgilani/sportsdataverse-py
77ae3accbb071b5308335b931e4e55a65e1500cd
[ "MIT" ]
1
2021-12-21T14:49:25.000Z
2021-12-21T14:49:25.000Z
import pandas as pd from typing import List from sportsdataverse.config import MBB_BASE_URL, MBB_TEAM_BOX_URL, MBB_PLAYER_BOX_URL, MBB_TEAM_SCHEDULE_URL from sportsdataverse.errors import SeasonNotFoundError def load_mbb_pbp(seasons: List[int]) -> pd.DataFrame: """Load men's college basketball play by play data go...
33.910569
108
0.680412
import pyarrow.parquet as pq import pandas as pd import json from typing import List, Callable, Iterator, Union, Optional from sportsdataverse.config import MBB_BASE_URL, MBB_TEAM_BOX_URL, MBB_PLAYER_BOX_URL, MBB_TEAM_SCHEDULE_URL from sportsdataverse.errors import SeasonNotFoundError from sportsdataverse.dl_utils impo...
0
0
0
0
0
0
0
58
66
f3d34ad446846e57b5983143666ed1d5baa5928b
1,710
py
Python
provided_client.py
DTMcNamara/CS4980-AdvancedOperatingSystems-HW3
53c22df0ef821de7700d6223ff02738aa3e836f1
[ "MIT" ]
null
null
null
provided_client.py
DTMcNamara/CS4980-AdvancedOperatingSystems-HW3
53c22df0ef821de7700d6223ff02738aa3e836f1
[ "MIT" ]
null
null
null
provided_client.py
DTMcNamara/CS4980-AdvancedOperatingSystems-HW3
53c22df0ef821de7700d6223ff02738aa3e836f1
[ "MIT" ]
null
null
null
# UDP IP address and port UDP_IP = "127.0.0.1" UDP_PORT = 5005 # Press the green button in the gutter to run the script. if __name__ == '__main__': # Import functions from mycode import abc, double_int, say_hello, rpc_test, doggo_test, favorite_number, half_float, bye_professor # Wrap all functions ...
30.535714
115
0.7
import json import socket # UDP IP address and port UDP_IP = "127.0.0.1" UDP_PORT = 5005 class RPCClient: def __init__(self, func): # wrap the function self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) self.tempFunc = func def __call__(self, *args, **kwargs): # For...
0
0
0
626
0
0
0
-18
67
7832e1262d582130c97ac85b4ffb13a5e6c3f6ac
1,084
py
Python
pyapi/addins-api/localapi/logger.py
dockerian/py-api
777db7d5dacf3ecf29a991f50d2ac78bb5bef66a
[ "Apache-2.0" ]
null
null
null
pyapi/addins-api/localapi/logger.py
dockerian/py-api
777db7d5dacf3ecf29a991f50d2ac78bb5bef66a
[ "Apache-2.0" ]
6
2019-12-26T16:51:55.000Z
2022-03-21T22:16:45.000Z
pyapi/addins-api/localapi/logger.py
dockerian/pyapi
777db7d5dacf3ecf29a991f50d2ac78bb5bef66a
[ "Apache-2.0" ]
null
null
null
import logging
29.297297
77
0.699262
import os import logging import logging.config import logger_formatter import yaml def getLogger(name): # Get the path to the logging config yaml path = "{0}{1}".format(os.getcwd(), '/logging.yaml') # Set a basic level of logging logger = logging.basicConfig(level=logging.DEBUG) # Load up the l...
0
0
0
520
0
433
0
-20
134
a0b9e0506ca742b0ca28a4187fe2309ec0620777
342
py
Python
hw4/tcontrol/scripts/detekcijaPozicije.py
Daria2002/ROS_hw
fd9fccb5ec2e38a4c8887d26e9fa10d54c6ea7ca
[ "MIT" ]
null
null
null
hw4/tcontrol/scripts/detekcijaPozicije.py
Daria2002/ROS_hw
fd9fccb5ec2e38a4c8887d26e9fa10d54c6ea7ca
[ "MIT" ]
null
null
null
hw4/tcontrol/scripts/detekcijaPozicije.py
Daria2002/ROS_hw
fd9fccb5ec2e38a4c8887d26e9fa10d54c6ea7ca
[ "MIT" ]
null
null
null
#!/usr/bin/env python import rospy from turtlesim.msg import Pose if __name__ == '__main__': rospy.init_node('subscriber', anonymous=True) rospy.Subscriber("pose", Pose, detekcija) rospy.spin()
24.428571
64
0.678363
#!/usr/bin/env python import rospy from turtlesim.msg import Pose def detekcija(data): if(data.x<5.5 and data.x>4.5 and data.y<5.5 and data.y>4.5): rospy.loginfo("Turtle in the middle!") if __name__ == '__main__': rospy.init_node('subscriber', anonymous=True) rospy.Subscriber("pose", Pose, detekci...
0
0
0
0
0
111
0
0
23
5719acd97e21d17564c512cad64a18d6762575d2
1,214
py
Python
test/test_config.py
sarnold/nanoservice
fdaf6cdcc93fbd4259a005f832a5666356307a12
[ "MIT" ]
28
2015-03-26T10:25:31.000Z
2022-01-31T21:59:11.000Z
test/test_config.py
sarnold/nanoservice
fdaf6cdcc93fbd4259a005f832a5666356307a12
[ "MIT" ]
3
2015-09-14T04:10:04.000Z
2020-01-29T03:52:05.000Z
test/test_config.py
freepn/nanoservice
fdaf6cdcc93fbd4259a005f832a5666356307a12
[ "MIT" ]
9
2015-09-10T08:11:37.000Z
2020-11-08T10:41:51.000Z
import unittest if __name__ == '__main__': unittest.main()
27.590909
59
0.593081
import json import unittest from nanoservice import * from nanoservice import config class TestConfig(unittest.TestCase): def setUp(self): self.addr = 'ipc:///whatever' self.expected = { 'db.name': 'test', 'rq.requester': 'ipc:///whatever', 'rs.responder': 'ip...
0
0
0
1,055
0
0
0
3
90
113c71ad709293c4626d76c2d255727b03c76461
1,506
py
Python
getPlugins.py
quinnjr/PluMA
a62c83fac9989cea5bcab607ef209ce3b8ba15f0
[ "MIT" ]
9
2018-11-20T07:48:18.000Z
2022-01-23T08:57:33.000Z
getPlugins.py
quinnjr/PluMA
a62c83fac9989cea5bcab607ef209ce3b8ba15f0
[ "MIT" ]
null
null
null
getPlugins.py
quinnjr/PluMA
a62c83fac9989cea5bcab607ef209ce3b8ba15f0
[ "MIT" ]
7
2018-06-06T14:57:49.000Z
2022-01-23T09:04:03.000Z
# Note this requires an internet connection import os import urllib.request import sys thepipelines = set() theplugins = set() thepipelines.add(sys.argv[1]+"/config.txt") while (len(thepipelines) != 0): configfile = open(thepipelines.pop(), 'r') for line in configfile: contents = line.strip().split(" ") ...
30.734694
85
0.629482
# Note this requires an internet connection import os import urllib.request import sys thepipelines = set() theplugins = set() thepipelines.add(sys.argv[1]+"/config.txt") while (len(thepipelines) != 0): configfile = open(thepipelines.pop(), 'r') for line in configfile: contents = line.strip().split(" ") ...
0
0
0
0
0
0
0
0
0
de25ff3e019358cbd8b18e033a39fd90ee1ff202
846
py
Python
intro_to_shelves.py
carlosmertens/Python-Masterclass
2bc514baf2173ab4c55baa2531f13841495371a6
[ "MIT" ]
null
null
null
intro_to_shelves.py
carlosmertens/Python-Masterclass
2bc514baf2173ab4c55baa2531f13841495371a6
[ "MIT" ]
null
null
null
intro_to_shelves.py
carlosmertens/Python-Masterclass
2bc514baf2173ab4c55baa2531f13841495371a6
[ "MIT" ]
null
null
null
import shelve blt = ["bacon", "lettuce", "tomato", "bread"] beans_on_toast = ["beans", "bread"] scrambled_eggs = ["eggs", "butter", "milk"] soup = ["tin of soup"] pasta = ["pasta", "cheese"] with shelve.open("recipes") as recipes: recipes["blt"] = blt recipes["beans on toast"] = beans_on_toast recipes["sc...
31.333333
68
0.529551
import shelve blt = ["bacon", "lettuce", "tomato", "bread"] beans_on_toast = ["beans", "bread"] scrambled_eggs = ["eggs", "butter", "milk"] soup = ["tin of soup"] pasta = ["pasta", "cheese"] with shelve.open("recipes") as recipes: recipes["blt"] = blt recipes["beans on toast"] = beans_on_toast recipes["sc...
0
0
0
0
0
0
0
0
0
8cfe71d1eadc1209619ad24ce11cd97cc4082983
912
py
Python
test.py
rodneyspark/pass_locker
385fe8359219a771ff26a7e47a49839ad22ee54f
[ "MIT" ]
null
null
null
test.py
rodneyspark/pass_locker
385fe8359219a771ff26a7e47a49839ad22ee54f
[ "MIT" ]
null
null
null
test.py
rodneyspark/pass_locker
385fe8359219a771ff26a7e47a49839ad22ee54f
[ "MIT" ]
null
null
null
import unittest if __name__ == '__main__': unittest.main()
30.4
68
0.64693
import unittest from user import User from info import Info class TestUser(unittest.TestCase): def setUp(self): self.new_user = User('john','mwangi','johnmwagi@gmail.com') def test1(self): self.assertEqual(self.new_user.fname,'john') self.assertEqual(self.new_user.lname, 'mwang...
0
0
0
783
0
0
0
0
67
82c6296aad6d623ae03de902815437af383c7d5c
3,126
py
Python
ez_repo/main.py
jpigree/ez-repo
ad1f829151b60a9b035802f7e93d2147e35d1761
[ "MIT" ]
2
2018-01-10T18:18:25.000Z
2018-11-21T09:04:48.000Z
ez_repo/main.py
jpigree/ez-repo
ad1f829151b60a9b035802f7e93d2147e35d1761
[ "MIT" ]
null
null
null
ez_repo/main.py
jpigree/ez-repo
ad1f829151b60a9b035802f7e93d2147e35d1761
[ "MIT" ]
2
2017-12-20T15:20:41.000Z
2019-08-13T17:07:03.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Main entry. Setup the command line interface then run the main function.""" from logging import INFO, DEBUG from sys import argv import argparse import botocore.exceptions from . import __version__ import ez_repo.command as command import ez_repo.error as error imp...
25.622951
79
0.632438
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Main entry. Setup the command line interface then run the main function.""" from logging import INFO, DEBUG from sys import argv import argparse import botocore.exceptions from . import __version__ import ez_repo.command as command import ez_repo.error as error imp...
0
0
0
0
0
0
0
0
0
4581097a8901abe555695274c6dfdcca8df1d4ca
2,665
py
Python
DataStructure/U5/U5_43.py
qiaw99/Data-Structure
3b1cdce96d4f35329ccfec29c03de57378ef0552
[ "MIT" ]
1
2019-10-29T08:21:41.000Z
2019-10-29T08:21:41.000Z
DataStructure/U5/U5_43.py
qiaw99/Data-Structure
3b1cdce96d4f35329ccfec29c03de57378ef0552
[ "MIT" ]
null
null
null
DataStructure/U5/U5_43.py
qiaw99/Data-Structure
3b1cdce96d4f35329ccfec29c03de57378ef0552
[ "MIT" ]
null
null
null
__author__ = "Qianli Wang and Nazar Sopiha" __copyright__ = "Copyright (c) 2019 qiaw99" # https://github.com/qiaw99/WS2019-20/blob/master/LICENSE if __name__ == '__main__': main()
25.380952
118
0.547467
__author__ = "Qianli Wang and Nazar Sopiha" __copyright__ = "Copyright (c) 2019 qiaw99" # https://github.com/qiaw99/WS2019-20/blob/master/LICENSE from matplotlib import pyplot as plt def berechnen(g): # g = (a, value, b) # f(x) = g(x) * x + c ls = [] # Erste Konstant temp_k = g[1] # Der erste Punkt ist: (...
12
0
0
0
0
2,345
0
15
117
45bc48f698eb6ce1171d8583f196fc7e1716eea2
4,523
py
Python
tests/unit/test_secrets_writer.py
Kami/python-dcsm
5afcbad355c31836343e7e9445f72271b9458446
[ "Apache-2.0" ]
null
null
null
tests/unit/test_secrets_writer.py
Kami/python-dcsm
5afcbad355c31836343e7e9445f72271b9458446
[ "Apache-2.0" ]
null
null
null
tests/unit/test_secrets_writer.py
Kami/python-dcsm
5afcbad355c31836343e7e9445f72271b9458446
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2020 Tomaz Muraus # # 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 requ...
38.991379
99
0.719213
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2020 Tomaz Muraus # # 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 requ...
0
0
0
3,152
0
0
0
133
201
b0a2a0b066f7cad6eaa28cd08629ac502da0c12d
10,507
py
Python
tests/test_iqn.py
carljohanhoel/EnsembleQuantileNetworks
7dfbed562f3e0c7552fa98a821db502ea565618c
[ "MIT" ]
9
2021-05-29T14:55:27.000Z
2022-03-08T11:19:44.000Z
tests/test_iqn.py
carljohanhoel/EnsembleQuantileNetworks
7dfbed562f3e0c7552fa98a821db502ea565618c
[ "MIT" ]
1
2021-09-27T08:59:43.000Z
2022-01-13T14:13:03.000Z
tests/test_iqn.py
carljohanhoel/EnsembleQuantileNetworks
7dfbed562f3e0c7552fa98a821db502ea565618c
[ "MIT" ]
1
2022-02-03T14:17:36.000Z
2022-02-03T14:17:36.000Z
import unittest import sys sys.path.append('../src') if __name__ == '__main__': unittest.main()
45.288793
116
0.587323
import unittest import numpy as np from keras.optimizers import Adam from keras.utils import plot_model from rl.policy import EpsGreedyQPolicy, LinearAnnealedPolicy, GreedyQPolicy from rl.memory import SequentialMemory import sys sys.path.append('../src') from iqn import IQNAgent from network_architecture_distribution...
0
0
0
10,004
0
0
0
200
199
b9dbe476120ad757392fc6e5b6384fc15aa0bac6
6,599
py
Python
tests/test_main.py
sgibson91/bump-jhub-image-action
4da67a8e2f9586da26021c1183a2f64bd24a5573
[ "MIT" ]
null
null
null
tests/test_main.py
sgibson91/bump-jhub-image-action
4da67a8e2f9586da26021c1183a2f64bd24a5573
[ "MIT" ]
4
2022-02-01T17:53:28.000Z
2022-03-30T22:41:15.000Z
tests/test_main.py
sgibson91/bump-jhub-image-action
4da67a8e2f9586da26021c1183a2f64bd24a5573
[ "MIT" ]
null
null
null
import unittest from tag_bot.yaml_parser import YamlParser yaml = YamlParser() if __name__ == "__main__": unittest.main()
30.981221
86
0.558721
import base64 import unittest import pytest from tag_bot.main import UpdateImageTags, assert_images_info_input, split_str_to_list from tag_bot.yaml_parser import YamlParser yaml = YamlParser() class TestUpdateImageTags(unittest.TestCase): def test_update_config_singleuser(self): update_images = UpdateI...
0
0
0
4,659
0
1,503
0
48
252
92c544b6062d9040c1bae598fb594a425b63e9b4
9,316
py
Python
python-scripts/generatePseudo.py
Siddhant-K-code/Code-Kindle
e5dc3bdcb206baf7e8a1c7e27fc952710c552250
[ "Apache-2.0" ]
6
2021-02-28T09:14:04.000Z
2021-03-25T12:36:49.000Z
python-scripts/generatePseudo.py
Siddhant-K-code/Code-Kindle
e5dc3bdcb206baf7e8a1c7e27fc952710c552250
[ "Apache-2.0" ]
23
2021-04-13T08:44:13.000Z
2021-04-18T18:12:40.000Z
python-scripts/generatePseudo.py
Siddhant-K-code/Code-Kindle
e5dc3bdcb206baf7e8a1c7e27fc952710c552250
[ "Apache-2.0" ]
8
2021-04-16T14:37:28.000Z
2022-03-03T01:02:30.000Z
TestFile = "hello.py" from logging import basicConfig, WARNING basicConfig(level = WARNING) main(TestFile) print("") print("") print("----------------") print("Process complete") print("----------------")
38.655602
380
0.487226
TestFile = "hello.py" import logging from logging import debug, info, warning, basicConfig, INFO, DEBUG, WARNING basicConfig(level = WARNING) def getTextFile(filep): file = open(filep) listFile = [] while 1: line = file.readline() if not line: break listFile.append(line)...
0
0
0
0
0
8,759
0
28
321
f501b065741f8b6935586e8dfcc2180e5d2cfb8e
1,929
py
Python
sphinx_json_schema/directive.py
tkhyn/sphinx-json-schema
df5e10bad62cf9a13cc8f50a21183f8590bcd888
[ "MIT" ]
1
2020-02-07T08:23:25.000Z
2020-02-07T08:23:25.000Z
sphinx_json_schema/directive.py
tkhyn/sphinx-json-schema
df5e10bad62cf9a13cc8f50a21183f8590bcd888
[ "MIT" ]
1
2022-02-21T14:35:02.000Z
2022-02-21T14:35:02.000Z
sphinx_json_schema/directive.py
tkhyn/sphinx-json-schema
df5e10bad62cf9a13cc8f50a21183f8590bcd888
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*-
33.258621
98
0.590461
# -*- coding: utf-8 -*- import os.path from docutils import nodes from docutils.parsers.rst import Directive from sphinx.directives.code import container_wrapper from .loader import JsonSchemaLoader class JsonSchema(Directive): optional_arguments = 1 has_content = True def __init__(self, *args, **kwa...
0
0
0
1,702
0
0
0
65
136
8073238ca13ec013848a229a5f6378da1d42fad7
4,405
py
Python
code/experiments/experiments.py
juvian/Manga-Text-Segmentation
de8f148c78978d70ad0e0ae3242566da6d70f3a5
[ "MIT" ]
37
2020-09-10T03:15:51.000Z
2022-03-24T06:11:21.000Z
code/experiments/experiments.py
KUR-creative/Manga-Text-Segmentation
de8f148c78978d70ad0e0ae3242566da6d70f3a5
[ "MIT" ]
2
2020-10-17T16:13:19.000Z
2021-02-06T22:52:02.000Z
code/experiments/experiments.py
juvian/Manga-Text-Segmentation
de8f148c78978d70ad0e0ae3242566da6d70f3a5
[ "MIT" ]
6
2021-02-27T23:13:46.000Z
2022-03-13T06:07:46.000Z
import os import sys sys.path.append('..') trainFolders = [ 'ARMS', 'AisazuNihaIrarenai', 'AkkeraKanjinchou', 'Akuhamu', 'AosugiruHaru', 'AppareKappore', 'Arisa', 'BEMADER_P', 'BakuretsuKungFuGirl', 'Belmondo', 'BokuHaSitatakaKun', 'BurariTessenTorimonocho'...
30.804196
141
0.650851
import numpy as np import torch import random import os from pathlib import Path from sklearn.model_selection import KFold import sys sys.path.append('..') from dataset import get_segmentation, random_crop, SegItemListCustom from config import * def random_seed(seed_value, use_cuda = True): np.random.seed(seed...
0
0
0
0
0
2,366
0
49
313
6f0fc1e0b91dc2dc9f56afba63e9c156e278166f
8,858
py
Python
froide/publicbody/views.py
xenein/froide
59bd3eeded3c3ed00fbc858fe20bfea99c8dbefa
[ "MIT" ]
198
2016-12-03T22:42:55.000Z
2022-03-25T15:08:36.000Z
froide/publicbody/views.py
xenein/froide
59bd3eeded3c3ed00fbc858fe20bfea99c8dbefa
[ "MIT" ]
264
2016-11-30T18:53:17.000Z
2022-03-17T11:34:18.000Z
froide/publicbody/views.py
xenein/froide
59bd3eeded3c3ed00fbc858fe20bfea99c8dbefa
[ "MIT" ]
42
2016-12-22T04:08:27.000Z
2022-02-26T08:30:38.000Z
from django.conf import settings FILTER_ORDER = ("jurisdiction", "category") SUB_FILTERS = {"jurisdiction": ("category",)} SITEMAP_PROTOCOL = "https" if settings.SITE_URL.startswith("https") else "http"
31.411348
99
0.650824
from django.shortcuts import render, redirect, get_object_or_404, Http404 from django.utils.translation import gettext_lazy as _ from django.contrib import messages from django.conf import settings from django.contrib.sitemaps import Sitemap from django.contrib.auth.mixins import LoginRequiredMixin from django.views.ge...
0
648
0
6,015
289
542
0
490
654
6cae922e3ba0b9cc34cb7080a3bf10d097a55b2f
4,732
py
Python
server/server.py
BlueKnek/Wheere2
d19374e720f4de36607ad421434be85f52f24052
[ "MIT" ]
null
null
null
server/server.py
BlueKnek/Wheere2
d19374e720f4de36607ad421434be85f52f24052
[ "MIT" ]
null
null
null
server/server.py
BlueKnek/Wheere2
d19374e720f4de36607ad421434be85f52f24052
[ "MIT" ]
null
null
null
from flask import Flask from tinydb import TinyDB import socketio import eventlet UPLOADED_IMAGES = 'uploaded_images' app = Flask(__name__) sio = socketio.Server() db = TinyDB('db.json') items = db.table('items') # Any table api if __name__ == '__main__': app = socketio.Middleware(sio,...
23.778894
84
0.632925
from flask import Flask, jsonify, request, send_from_directory from tinydb import TinyDB, Query from werkzeug.utils import secure_filename import socketio import eventlet import os UPLOADED_IMAGES = 'uploaded_images' app = Flask(__name__) sio = socketio.Server() db = TinyDB('db.json') items = db.table('items') def ...
0
1,671
0
0
0
2,003
0
55
618
ef81c44825192700d24b6b8b4230b37a226d052d
206
py
Python
birdie_stress/birdie_stress/__init__.py
gr-/birdie
ddfaa8d9e067d533605052214b04e944e0659c26
[ "MIT" ]
1
2015-08-26T14:00:15.000Z
2015-08-26T14:00:15.000Z
birdie_stress/birdie_stress/__init__.py
gr-/birdie
ddfaa8d9e067d533605052214b04e944e0659c26
[ "MIT" ]
1
2015-11-27T16:34:54.000Z
2015-11-27T16:34:54.000Z
birdie_stress/birdie_stress/__init__.py
gr-/birdie
ddfaa8d9e067d533605052214b04e944e0659c26
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This app provides a basic stress test suite for the birdie app with locust.io library. """ __version__ = "0.1" #from birdie-stress import xxx
18.727273
90
0.645631
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This app provides a basic stress test suite for the birdie app with locust.io library. """ __version__ = "0.1" #from birdie-stress import xxx
0
0
0
0
0
0
0
0
0
e1f75c251400bbf6a5e60f208f49d31366299240
1,435
py
Python
src/zconfig_watchedfile/tests/test_handler.py
gocept/zconfig_watchedfile
f82c1b2e027ad245cb9be35044a0497d3b1a07f5
[ "ZPL-2.1" ]
null
null
null
src/zconfig_watchedfile/tests/test_handler.py
gocept/zconfig_watchedfile
f82c1b2e027ad245cb9be35044a0497d3b1a07f5
[ "ZPL-2.1" ]
null
null
null
src/zconfig_watchedfile/tests/test_handler.py
gocept/zconfig_watchedfile
f82c1b2e027ad245cb9be35044a0497d3b1a07f5
[ "ZPL-2.1" ]
null
null
null
from io import StringIO import ZConfig import logging import logging.handlers import pkg_resources def load_config(config): """Help to load config.""" schema = ZConfig.loadSchemaFile(open(pkg_resources.resource_filename( __name__, 'schema.xml'))) conf, handler = ZConfig.loadConfigFile(schema, Str...
23.145161
78
0.689895
from io import StringIO import ZConfig import logging import logging.handlers import pkg_resources import pytest @pytest.fixture(autouse=True) def logger(request): """Logger for tests.""" def reset_handler(): logging.getLogger('foo').handlers[:] = [] request.addfinalizer(reset_handler) def load_...
0
172
0
0
0
0
0
-8
45
1b10957d24b48c435f29370c20228448c73ec4b4
10,200
py
Python
make_test_data.py
jddixon/xlreg_py
c3e8461b5d046c7a3d351ab9f84f2581668560ad
[ "MIT" ]
null
null
null
make_test_data.py
jddixon/xlreg_py
c3e8461b5d046c7a3d351ab9f84f2581668560ad
[ "MIT" ]
null
null
null
make_test_data.py
jddixon/xlreg_py
c3e8461b5d046c7a3d351ab9f84f2581668560ad
[ "MIT" ]
null
null
null
#!/usr/bin/python # ~/dev/py/xlreg_py/makeTestData """ Make data for test scripts. """ import os import subprocess from Crypto.Cipher import AES from xlutil import DecimalVersion as dv OPENSSL = '/usr/bin/openssl' SSH_KEYGEN = '/usr/bin/ssh-keygen' KEY_BITS = 1024 KEY_BYTES = KEY_BITS / 8 SHA1_BYTES = 20 TEST_DATA_...
35.416667
76
0.574314
#!/usr/bin/python # ~/dev/py/xlreg_py/makeTestData """ Make data for test scripts. """ import os import subprocess import sys import time from Crypto.Cipher import AES from xlutil import DecimalVersion as dv from xlReg import reg_cred import rnglib OPENSSL = '/usr/bin/openssl' SSH_KEYGEN = '/usr/bin/ssh-keygen' KEY_...
0
0
0
0
0
2,266
0
-24
157
c40d3e0ebeb841550fa0469185d5a7ab85d43874
7,454
py
Python
tests/test_football_badges.py
domdfcoding/football_badges
4d282b407ad8c0e9fbe50bf06f29226ab8edda46
[ "Apache-2.0" ]
null
null
null
tests/test_football_badges.py
domdfcoding/football_badges
4d282b407ad8c0e9fbe50bf06f29226ab8edda46
[ "Apache-2.0" ]
13
2020-12-23T08:26:57.000Z
2021-04-03T17:28:12.000Z
tests/test_football_badges.py
domdfcoding/football_badges
4d282b407ad8c0e9fbe50bf06f29226ab8edda46
[ "Apache-2.0" ]
1
2021-03-23T17:05:54.000Z
2021-03-23T17:05:54.000Z
# stdlib # 3rd party import pytest from domdf_python_tools.iterative import permutations # this package teams = [ "ARS", # Arsenal "AV", # Aston Villa "BRH", # Brighton & Hove Albion "CHE", # Chelsea "EVE", # Everton "FUL", # Fulham "LEI", # Leicester City "MCI", # Manchester City "SHU", #...
23.366771
94
0.627448
# stdlib import webbrowser from typing import Tuple # 3rd party import pytest from coincidence.regressions import AdvancedFileRegressionFixture from consolekit.testing import CliRunner, Result from domdf_python_tools.iterative import permutations from domdf_python_tools.paths import PathPlus # this package from footb...
0
2,934
0
1,502
0
701
0
135
295