hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
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
125
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
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
8a06e90aea089e2875525aefc172f812701dac06
6,408
py
Python
trac/ticket/tests/roadmap.py
wiraqutra/photrackjp
e120cba2a5d5d30f99ad084c6521e61f09694ee6
[ "BSD-3-Clause" ]
null
null
null
trac/ticket/tests/roadmap.py
wiraqutra/photrackjp
e120cba2a5d5d30f99ad084c6521e61f09694ee6
[ "BSD-3-Clause" ]
null
null
null
trac/ticket/tests/roadmap.py
wiraqutra/photrackjp
e120cba2a5d5d30f99ad084c6521e61f09694ee6
[ "BSD-3-Clause" ]
null
null
null
from trac.test import EnvironmentStub from trac.ticket.roadmap import * from trac.core import ComponentManager import unittest if __name__ == '__main__': unittest.main(defaultTest='suite')
46.100719
83
0.608926
from trac.test import EnvironmentStub from trac.ticket.roadmap import * from trac.core import ComponentManager import unittest class TicketGroupStatsTestCase(unittest.TestCase): def setUp(self): self.stats = TicketGroupStats('title', 'units') def test_init(self): self.assertEqual...
5,709
73
419
d867450e161c8b6b48ecd7fcba1c1e589b81ceb2
169
py
Python
lambdata_pdugovich/__init__.py
Pdugovich/lambdata_ds8
d30b594347f2b17ea155ef1571e806d9cb674480
[ "MIT" ]
null
null
null
lambdata_pdugovich/__init__.py
Pdugovich/lambdata_ds8
d30b594347f2b17ea155ef1571e806d9cb674480
[ "MIT" ]
2
2020-03-24T18:04:31.000Z
2020-03-24T18:08:50.000Z
lambdata_pdugovich/__init__.py
Pdugovich/lambdata_pdugovich
d30b594347f2b17ea155ef1571e806d9cb674480
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np #sample code ONES = pd.DataFrame(np) ZEROES = pd.DataFrame(np.zeros(50)) #sample functions
14.083333
35
0.710059
import pandas as pd import numpy as np #sample code ONES = pd.DataFrame(np) ZEROES = pd.DataFrame(np.zeros(50)) #sample functions def increment(x): return(x + 1)
14
0
22
9114baf7f1a01653308fac609b21964ca35706b0
5,650
py
Python
custom_components/luxtronik/config_flow.py
BenPru/luxtronik
d5d160d7ab82d78a46310553f8f09cb2dd1c0c2b
[ "MIT" ]
2
2021-11-16T19:43:45.000Z
2021-11-29T11:30:49.000Z
custom_components/luxtronik/config_flow.py
BenPru/luxtronik
d5d160d7ab82d78a46310553f8f09cb2dd1c0c2b
[ "MIT" ]
6
2021-10-30T16:07:57.000Z
2021-11-18T14:27:38.000Z
custom_components/luxtronik/config_flow.py
BenPru/luxtronik
d5d160d7ab82d78a46310553f8f09cb2dd1c0c2b
[ "MIT" ]
null
null
null
"""Config flow to configure the Luxtronik heatpump controller integration.""" # region Imports from __future__ import annotations from typing import Any import homeassistant.helpers.config_validation as cv import voluptuous as vol from homeassistant import config_entries from homeassistant.components.dhcp import HOST...
37.171053
88
0.646549
"""Config flow to configure the Luxtronik heatpump controller integration.""" # region Imports from __future__ import annotations from typing import Any import homeassistant.helpers.config_validation as cv import voluptuous as vol from homeassistant import config_entries from homeassistant.components.dhcp import HOST...
673
0
54
55d979bebf0158e59c64f2d22022177f7acf650b
1,385
py
Python
djangocms_link/fields.py
donce/djangocms-link
561e8475dd25cf299acd428829e758c3047f2e5e
[ "BSD-3-Clause" ]
null
null
null
djangocms_link/fields.py
donce/djangocms-link
561e8475dd25cf299acd428829e758c3047f2e5e
[ "BSD-3-Clause" ]
null
null
null
djangocms_link/fields.py
donce/djangocms-link
561e8475dd25cf299acd428829e758c3047f2e5e
[ "BSD-3-Clause" ]
null
null
null
from django.conf import settings if 'django_select2' in settings.INSTALLED_APPS: try: from django_select2.fields import AutoModelSelect2Field except ImportError: pass
35.512821
125
0.59639
from django.conf import settings if 'django_select2' in settings.INSTALLED_APPS: try: from django_select2.fields import AutoModelSelect2Field class PageSearchField(AutoModelSelect2Field): empty_values = [] search_fields = ['title_set__title__icontains', 'title_set__menu_tit...
686
443
62
8d025c69cfed8c249f9ca208101f14321734307a
3,981
py
Python
RC49/CcGAN-based_KD/models/autoencoder_extract.py
UBCDingXin/cGAN-KD
c32a4b014fe024222101ff11d63de518448f7f8d
[ "MIT" ]
1
2021-08-21T09:19:17.000Z
2021-08-21T09:19:17.000Z
RC49/CcGAN-based_KD/models/autoencoder_extract.py
UBCDingXin/cGAN-KD
c32a4b014fe024222101ff11d63de518448f7f8d
[ "MIT" ]
null
null
null
RC49/CcGAN-based_KD/models/autoencoder_extract.py
UBCDingXin/cGAN-KD
c32a4b014fe024222101ff11d63de518448f7f8d
[ "MIT" ]
2
2021-04-15T08:23:49.000Z
2021-09-15T06:52:25.000Z
import torch from torch import nn if __name__=="__main__": #test net_encoder = encoder_extract(dim_bottleneck=64*64*3, ch=64).cuda() net_decoder = decoder_extract(dim_bottleneck=64*64*3, ch=64).cuda() net_encoder = nn.DataParallel(net_encoder) net_decoder = nn.DataParallel(net_decoder) x...
31.595238
101
0.532781
import torch from torch import nn class encoder_extract(nn.Module): def __init__(self, dim_bottleneck=64*64*3, ch=64): super(encoder_extract, self).__init__() self.ch = ch self.dim_bottleneck = dim_bottleneck self.conv = nn.Sequential( nn.Conv2d(3, ch, kernel_size=4, ...
3,336
24
152
1a688412a3db94e5aa0c2e4f45550052b3d82fe6
7,019
py
Python
windows/utils/winutils.py
sogeti-esec-lab/LKD
f388b5f8c08b7bba2a31c5a16ea64add6cc2dd1a
[ "BSD-3-Clause" ]
102
2015-10-21T10:58:06.000Z
2021-06-07T17:59:52.000Z
windows/utils/winutils.py
a1ext/LKD
f388b5f8c08b7bba2a31c5a16ea64add6cc2dd1a
[ "BSD-3-Clause" ]
1
2019-09-24T20:45:57.000Z
2019-09-24T20:45:57.000Z
windows/utils/winutils.py
w4kfu/LKD
f388b5f8c08b7bba2a31c5a16ea64add6cc2dd1a
[ "BSD-3-Clause" ]
16
2015-10-29T14:10:14.000Z
2019-10-27T18:58:52.000Z
import ctypes import msvcrt import os import sys import code import windows from .. import winproxy from ..generated_def import windef from ..generated_def.winstructs import * # Function resolution ! def create_file_from_handle(handle, mode="r"): """Return a Python :class:`file` arround a windows HANDLE""" ...
35.095
129
0.707366
import ctypes import msvcrt import os import sys import code import windows from .. import winproxy from ..generated_def import windef from ..generated_def.winstructs import * # Function resolution ! def get_func_addr(dll_name, func_name): # Load the DLL ctypes.WinDLL(dll_name) modules = wind...
2,841
34
296
3c885abd66e00ab0f13484522522acd705fc0407
1,450
py
Python
scripts/common.py
phvalguima/bundle-kubeflow
e6097e8d4271f2dce634ec6763fd2587cf72714c
[ "Apache-2.0" ]
null
null
null
scripts/common.py
phvalguima/bundle-kubeflow
e6097e8d4271f2dce634ec6763fd2587cf72714c
[ "Apache-2.0" ]
null
null
null
scripts/common.py
phvalguima/bundle-kubeflow
e6097e8d4271f2dce634ec6763fd2587cf72714c
[ "Apache-2.0" ]
null
null
null
import os import shutil import subprocess import sys def run(*args, env: dict = None, check=True): """Runs command and exits script gracefully on errors.""" print(f'+ {" ".join(args)}') if env is None: env = os.environ else: env = {**env, **os.environ} result = subprocess.run(ar...
25.892857
94
0.609655
import os import shutil import subprocess import sys def run(*args, env: dict = None, check=True): """Runs command and exits script gracefully on errors.""" print(f'+ {" ".join(args)}') if env is None: env = os.environ else: env = {**env, **os.environ} result = subprocess.run(ar...
0
0
0
200784d7ee7effded0239659e7b45333e901ccb3
1,418
py
Python
model/investor.py
keremkoseoglu/Kifu
bed7a15f71e2345c654b1adab07a5edecdbae342
[ "MIT" ]
null
null
null
model/investor.py
keremkoseoglu/Kifu
bed7a15f71e2345c654b1adab07a5edecdbae342
[ "MIT" ]
82
2020-06-25T09:45:01.000Z
2022-03-31T09:35:31.000Z
model/investor.py
keremkoseoglu/Kifu
bed7a15f71e2345c654b1adab07a5edecdbae342
[ "MIT" ]
null
null
null
""" Investment adviser module """ import os import json import config from model.bank_account import get_next_investment_account _INVEST_FILE = "invest.json" class InvestmentAdviser: """ Investment adviser class """ def advise(self, amount: float) -> []: """ Advise investment """ result = []...
31.511111
74
0.547955
""" Investment adviser module """ import os import json import config from model.bank_account import get_next_investment_account _INVEST_FILE = "invest.json" def _get_file_path() -> str: return os.path.join(config.CONSTANTS["DATA_DIR_PATH"] + _INVEST_FILE) class InvestmentAdviser: """ Investment adviser cla...
205
0
49
607b5c080fb83d5692222b16c4e20140f5d61384
3,971
py
Python
road_pointcloud/points_to_2d.py
Lab1028-19/A-Novel-CNN
67f8039a8a0595597858c9de0cb1cd2e3b9d8274
[ "MIT" ]
2
2019-09-05T07:36:26.000Z
2020-03-18T19:43:02.000Z
road_pointcloud/points_to_2d.py
Lab1028-19/A-Novel-CNN
67f8039a8a0595597858c9de0cb1cd2e3b9d8274
[ "MIT" ]
null
null
null
road_pointcloud/points_to_2d.py
Lab1028-19/A-Novel-CNN
67f8039a8a0595597858c9de0cb1cd2e3b9d8274
[ "MIT" ]
1
2019-10-13T18:46:15.000Z
2019-10-13T18:46:15.000Z
import numpy as np import matplotlib.pyplot as plt import time
31.267717
69
0.62478
import numpy as np import matplotlib.pyplot as plt import time def xyz_to_ra(points_xyz,v_sy,v_angle,h_sy,h_angle): v_angle/=180*np.pi h_angle/=180*np.pi h_sy/=180*np.pi v_sy/=180*np.pi x=points_xyz[:,0] y=points_xyz[:,1] z=points_xyz[:,2] a_h=np.arctan2(x,y+0.00000000000000001) #pri...
4,044
0
89
bf8cd270bf4d6917bb5c84e64ac1edd18df3c812
738
py
Python
tests/checks/test_blank_header.py
jdaviscooke/goodtables-py
7778d1e3630f4ab95dfb76d13106c9733d4ec4c0
[ "MIT" ]
243
2016-11-20T21:15:21.000Z
2022-02-22T04:55:40.000Z
tests/checks/test_blank_header.py
jdaviscooke/goodtables-py
7778d1e3630f4ab95dfb76d13106c9733d4ec4c0
[ "MIT" ]
235
2016-10-02T21:08:31.000Z
2020-09-10T11:14:21.000Z
tests/checks/test_blank_header.py
jdaviscooke/goodtables-py
7778d1e3630f4ab95dfb76d13106c9733d4ec4c0
[ "MIT" ]
49
2017-02-22T04:36:43.000Z
2020-07-01T11:10:40.000Z
# -*- coding: utf-8 -*- from __future__ import division from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals from goodtables.checks.blank_header import blank_header import goodtables.cells # Check
22.363636
58
0.676152
# -*- coding: utf-8 -*- from __future__ import division from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals from goodtables.checks.blank_header import blank_header import goodtables.cells # Check def test_check_blank_header(log): errors = [] c...
427
0
46
0df6ceec0b1a1f15a22334ec4e936b287fcc97ab
366
py
Python
Python/Basics/py_R3/merging.py
ABPande/MyPythonRepo
51de39aee6c99b6ea2eb47fb199925ee63ca3750
[ "Apache-2.0" ]
null
null
null
Python/Basics/py_R3/merging.py
ABPande/MyPythonRepo
51de39aee6c99b6ea2eb47fb199925ee63ca3750
[ "Apache-2.0" ]
null
null
null
Python/Basics/py_R3/merging.py
ABPande/MyPythonRepo
51de39aee6c99b6ea2eb47fb199925ee63ca3750
[ "Apache-2.0" ]
null
null
null
import numpy as np import pandas as pd d1 = { 'c1':[1,2,3,4], 'c2':[444,555,666,444], 'c3':'abc def hij lmn'.split()} d2 = { 'c1':[1,2,3], 'c4':'x y z'.split() } print (d1) df1 = pd.DataFrame(d1) print (df1) print(df1['c2'].unique()) df2 = pd.DataFrame(d2) print (pd.merge(df1,df2,how="inner",on='c1')) print (df1[...
17.428571
45
0.606557
import numpy as np import pandas as pd d1 = { 'c1':[1,2,3,4], 'c2':[444,555,666,444], 'c3':'abc def hij lmn'.split()} d2 = { 'c1':[1,2,3], 'c4':'x y z'.split() } print (d1) df1 = pd.DataFrame(d1) print (df1) print(df1['c2'].unique()) df2 = pd.DataFrame(d2) print (pd.merge(df1,df2,how="inner",on='c1')) print (df1[...
0
0
0
0c4507987bbe041cc2bdbe487c94ab7c04dde3de
23
py
Python
lager_cantools/version.py
lagerdata/cantools
d6d571ff2ddd55289d918155186f4d0271652f72
[ "MIT" ]
1
2021-01-23T14:11:44.000Z
2021-01-23T14:11:44.000Z
lager_cantools/version.py
lagerdata/cantools
d6d571ff2ddd55289d918155186f4d0271652f72
[ "MIT" ]
null
null
null
lager_cantools/version.py
lagerdata/cantools
d6d571ff2ddd55289d918155186f4d0271652f72
[ "MIT" ]
null
null
null
__version__ = '36.1.0'
11.5
22
0.652174
__version__ = '36.1.0'
0
0
0
052b077ebfa28832d4fca6bf0a9de9a5d100eebe
780
py
Python
script_migrate_maplet.py
gislite/maplet
eb2577eea96775861fd20b949cd4d88cbb6cd7d1
[ "MIT" ]
36
2017-04-04T15:20:33.000Z
2021-06-30T09:37:42.000Z
script_migrate_maplet.py
gislite/maplet
eb2577eea96775861fd20b949cd4d88cbb6cd7d1
[ "MIT" ]
null
null
null
script_migrate_maplet.py
gislite/maplet
eb2577eea96775861fd20b949cd4d88cbb6cd7d1
[ "MIT" ]
16
2017-02-26T01:01:43.000Z
2021-03-17T07:47:57.000Z
# -*- coding: utf-8 -*- ''' for database schema migration. Memo for Usage: migrate.migrate(torcms_migrator.rename_table('e_layout', 'mablayout')) migrate.migrate(torcms_migrator.drop_column('tabtag', 'role_mask')) ''' from playhouse import migrate from playhouse.postgres_ext import BinaryJSONField import conf...
21.081081
88
0.691026
# -*- coding: utf-8 -*- ''' for database schema migration. Memo for Usage: migrate.migrate(torcms_migrator.rename_table('e_layout', 'mablayout')) migrate.migrate(torcms_migrator.drop_column('tabtag', 'role_mask')) ''' from playhouse import migrate from playhouse.postgres_ext import BinaryJSONField import conf...
0
0
0
99639389fb139783327e32121d0f6f95f80e55e4
119
py
Python
asyncorm/migrations/app.py
kejkz/asyncorm
6342e2d5fbaa22fb368aead772ac4f255df7562a
[ "Apache-2.0" ]
1
2017-02-27T05:37:39.000Z
2017-02-27T05:37:39.000Z
asyncorm/migrations/app.py
kejkz/asyncorm
6342e2d5fbaa22fb368aead772ac4f255df7562a
[ "Apache-2.0" ]
null
null
null
asyncorm/migrations/app.py
kejkz/asyncorm
6342e2d5fbaa22fb368aead772ac4f255df7562a
[ "Apache-2.0" ]
null
null
null
from asyncorm.apps.app_config import AppConfig
19.833333
46
0.806723
from asyncorm.apps.app_config import AppConfig class AsyncormMigrations(AppConfig): name = "asyncorm_migrations"
0
48
23
65137ad9cb8ed21ca53490be07665f9b8c6f200c
2,149
py
Python
pytype/tools/annotate_ast/annotate_ast_test.py
priyansh19/pytype
44b1f6f7cddccb326abac4c21b4f26688369764e
[ "Apache-2.0" ]
2
2019-07-25T12:53:02.000Z
2019-08-18T16:26:16.000Z
pytype/tools/annotate_ast/annotate_ast_test.py
priyansh19/pytype
44b1f6f7cddccb326abac4c21b4f26688369764e
[ "Apache-2.0" ]
null
null
null
pytype/tools/annotate_ast/annotate_ast_test.py
priyansh19/pytype
44b1f6f7cddccb326abac4c21b4f26688369764e
[ "Apache-2.0" ]
null
null
null
import ast import itertools import textwrap from pytype import config from pytype.tests import test_base from pytype.tools.annotate_ast import annotate_ast import six test_base.main(globals(), __name__ == '__main__')
29.040541
80
0.63006
import ast import itertools import textwrap from pytype import config from pytype.tests import test_base from pytype.tools.annotate_ast import annotate_ast import six class AnnotaterTest(test_base.TargetIndependentTest): def annotate(self, source): source = textwrap.dedent(source.lstrip('\n')) filename = ...
1,773
32
123
5d394aab4a97dddeead75000c18cb7c974c9cf00
5,205
py
Python
app/management/services/user.py
Arjun-sna/flask-forum-api-service
9c33c10269a147d7c5225e9c9106ccc43eb31705
[ "BSD-3-Clause" ]
null
null
null
app/management/services/user.py
Arjun-sna/flask-forum-api-service
9c33c10269a147d7c5225e9c9106ccc43eb31705
[ "BSD-3-Clause" ]
1
2021-11-25T17:25:19.000Z
2021-11-25T17:25:19.000Z
app/management/services/user.py
Arjun-sna/flask-forum-api-service
9c33c10269a147d7c5225e9c9106ccc43eb31705
[ "BSD-3-Clause" ]
null
null
null
from sqlalchemy.orm.session import make_transient, make_transient_to_detached from app.utils.settings import app_config from flask_allows import Not, Permission from app.utils.requirements import IsAdmin from flask_jwt_extended import current_user from app.user.models import User, Group from ..schemas import UsersSchem...
34.932886
84
0.614986
from sqlalchemy.orm.session import make_transient, make_transient_to_detached from app.utils.settings import app_config from flask_allows import Not, Permission from app.utils.requirements import IsAdmin from flask_jwt_extended import current_user from app.user.models import User, Group from ..schemas import UsersSchem...
4,333
-1
427
6ad70d4913158b0de1cd1d5f537e156a79bc50eb
1,339
py
Python
chapter05/dcc.py
farispriadi/pelatihan-dash-plotly
0b5d19457ee7b8a2ae3d6226eefcbb5bd1288c4e
[ "MIT" ]
null
null
null
chapter05/dcc.py
farispriadi/pelatihan-dash-plotly
0b5d19457ee7b8a2ae3d6226eefcbb5bd1288c4e
[ "MIT" ]
null
null
null
chapter05/dcc.py
farispriadi/pelatihan-dash-plotly
0b5d19457ee7b8a2ae3d6226eefcbb5bd1288c4e
[ "MIT" ]
null
null
null
import dash import dash_core_components as dcc import dash_html_components as html # object Dash app app = dash.Dash() app.layout = html.Div([ # Div untuk Dropdown html.Div([ html.Label(["Length Unit"]), dcc.Dropdown(id='my-dropdown', options=[{'label':'cm', 'value': 'centimeter'}, {'label':'m',...
25.264151
69
0.572816
import dash import dash_core_components as dcc import dash_html_components as html # object Dash app app = dash.Dash() app.layout = html.Div([ # Div untuk Dropdown html.Div([ html.Label(["Length Unit"]), dcc.Dropdown(id='my-dropdown', options=[{'label':'cm', 'value': 'centimeter'}, {'label':'m',...
0
0
0
0709136c65c19a457ce1e79f275f302e590174e3
305
py
Python
twitter-api/tweet_fields.py
YusukeTokugawa/twitter-api
ca8f255990763c18509133fc91bdb50687d53051
[ "MIT" ]
null
null
null
twitter-api/tweet_fields.py
YusukeTokugawa/twitter-api
ca8f255990763c18509133fc91bdb50687d53051
[ "MIT" ]
null
null
null
twitter-api/tweet_fields.py
YusukeTokugawa/twitter-api
ca8f255990763c18509133fc91bdb50687d53051
[ "MIT" ]
null
null
null
# coding: UTF-8 ''' Created on Nov 13, 2018 @author: Yusuke_Tokugawa ''' import dataclasses from typing import List @dataclasses.dataclass
15.25
24
0.665574
# coding: UTF-8 ''' Created on Nov 13, 2018 @author: Yusuke_Tokugawa ''' import dataclasses from typing import List @dataclasses.dataclass class TweetFields: fullname: str href: str id: int date: str hashtags: List[str] likes: int replies: int retweets: int text: str
0
143
22
24f316fad364552997dc369dd2acbc4eb744fea3
4,912
py
Python
PasteJacker/Core/utils.py
TheRipperJhon/Paste_Jacker
16ba7ad81c5ed999921092c1b4547ff5234dbb4d
[ "CNRI-Python", "Linux-OpenIB" ]
null
null
null
PasteJacker/Core/utils.py
TheRipperJhon/Paste_Jacker
16ba7ad81c5ed999921092c1b4547ff5234dbb4d
[ "CNRI-Python", "Linux-OpenIB" ]
null
null
null
PasteJacker/Core/utils.py
TheRipperJhon/Paste_Jacker
16ba7ad81c5ed999921092c1b4547ff5234dbb4d
[ "CNRI-Python", "Linux-OpenIB" ]
null
null
null
# -*- encoding: utf-8 -*- #Written by: Karim shoair - D4Vinci ( Cr3dOv3r ) import os,time,subprocess,pkg_resources from . import updater from .color import * banner = """{G} /T /I / |/ | .-~/ T\ Y I |/ / _ /T ...
40.595041
142
0.398208
# -*- encoding: utf-8 -*- #Written by: Karim shoair - D4Vinci ( Cr3dOv3r ) import os,time,subprocess,pkg_resources from . import updater from .color import * banner = """{G} /T /I / |/ | .-~/ T\ Y I |/ / _ /T ...
1,893
0
207
5b216f79fa5ffe20d22dfb6cc1246b8152e02dc6
319
py
Python
BPt/extensions/tests/test_feat_selectors.py
sahahn/ABCD_ML
a8b1c48c33f3fdc046c8922964f1c456273238da
[ "MIT" ]
1
2019-09-25T23:23:49.000Z
2019-09-25T23:23:49.000Z
BPt/extensions/tests/test_feat_selectors.py
sahahn/ABCD_ML
a8b1c48c33f3fdc046c8922964f1c456273238da
[ "MIT" ]
1
2020-04-20T20:53:27.000Z
2020-04-20T20:53:27.000Z
BPt/extensions/tests/test_feat_selectors.py
sahahn/ABCD_ML
a8b1c48c33f3fdc046c8922964f1c456273238da
[ "MIT" ]
1
2019-06-21T14:44:40.000Z
2019-06-21T14:44:40.000Z
import numpy as np from ..feat_selectors import FeatureSelector
18.764706
49
0.633229
import numpy as np from ..feat_selectors import FeatureSelector def basic_test(): mask = np.ones(10) mask[0] = .4 X = np.random.random((20, 10)) fs = FeatureSelector(mask=mask) X_trans = fs.fit_transform(X) assert X_trans.shape == (20, 9) assert np.array_equal(X_trans[:, 0], X[:, 1])
231
0
23
621a9a60082fb8b10a97b7cd141a6116567a51df
7,906
py
Python
GPG/util/utils.py
HLTCHKUST/MulQG
8e257f2d6c0f03c07ea8a0bf0e8f55b0cde60605
[ "MIT" ]
19
2020-10-05T16:28:13.000Z
2022-02-22T12:16:27.000Z
GPG/util/utils.py
Iamfinethanksu/MulQG
8e257f2d6c0f03c07ea8a0bf0e8f55b0cde60605
[ "MIT" ]
9
2021-01-20T15:15:53.000Z
2021-09-07T09:07:56.000Z
GPG/util/utils.py
Iamfinethanksu/MulQG
8e257f2d6c0f03c07ea8a0bf0e8f55b0cde60605
[ "MIT" ]
7
2020-10-16T14:18:24.000Z
2021-11-09T05:46:00.000Z
import os import csv import codecs import yaml import time import numpy as np import nltk from nltk.translate import bleu_score import pickle import gzip def read_config(path): '''读取config文件''' return AttrDict(yaml.load(open(path, 'r')))
33.218487
142
0.536175
import os import csv import codecs import yaml import time import numpy as np import nltk from nltk.translate import bleu_score import pickle import gzip class AttrDict(dict): def __init__(self, *args, **kwargs): super(AttrDict, self).__init__(*args, **kwargs) self.__dict__ = self ...
7,265
0
352
5d090eb55bb69a6293474e9189a1449f588d5950
1,446
py
Python
lektor_expression_type.py
dairiki/lektor-expression-type
f6840da291c0f7bb7edc453f31e0499bc54899a7
[ "MIT" ]
1
2021-12-17T20:26:06.000Z
2021-12-17T20:26:06.000Z
lektor_expression_type.py
dairiki/lektor-expression-type
f6840da291c0f7bb7edc453f31e0499bc54899a7
[ "MIT" ]
null
null
null
lektor_expression_type.py
dairiki/lektor-expression-type
f6840da291c0f7bb7edc453f31e0499bc54899a7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Add jinja-evaluated types to lektor. """ import jinja2 from lektor.environment import ( Expression, FormatExpression, ) from lektor.pluginsystem import Plugin from lektor.types import Type
26.290909
72
0.670124
# -*- coding: utf-8 -*- """Add jinja-evaluated types to lektor. """ import jinja2 from lektor.environment import ( Expression, FormatExpression, ) from lektor.pluginsystem import Plugin from lektor.types import Type class ExpressionDescriptor(object): def __init__(self, pad, expr): self.pad = ...
725
293
195
47d9074575468008735489144ac6845135745e46
784
py
Python
utils.py
jwustrack/climon
0fca00a727c39de01c42162d42b193f326705892
[ "MIT" ]
3
2018-12-22T06:30:46.000Z
2021-05-05T04:51:22.000Z
utils.py
jwustrack/climon
0fca00a727c39de01c42162d42b193f326705892
[ "MIT" ]
null
null
null
utils.py
jwustrack/climon
0fca00a727c39de01c42162d42b193f326705892
[ "MIT" ]
null
null
null
''' Non-business-logic utility functions ''' def firsts(rows): ''' Returns the set of first elements of all rows: >>> sorted(firsts([(7, 1, 2),\ [5, 4, 0, 3],\ [8, 4],\ [5, 4]])) [5, 7, 8] ''' return set(r[0] for r in rows) def pack_by(l, n): ''' Yields element...
21.189189
86
0.482143
''' Non-business-logic utility functions ''' def firsts(rows): ''' Returns the set of first elements of all rows: >>> sorted(firsts([(7, 1, 2),\ [5, 4, 0, 3],\ [8, 4],\ [5, 4]])) [5, 7, 8] ''' return set(r[0] for r in rows) def pack_by(l, n): ''' Yields element...
0
0
0
70a2317f1023e36a90a02c4f0ade61f4afe73e24
2,559
py
Python
speccases/extrapolatecases2.py
alex1770/Covid-19
0212593bf5d9bcbb7009c7d1fb1710116ad8bf32
[ "MIT" ]
5
2021-06-26T09:22:45.000Z
2021-12-20T21:29:22.000Z
speccases/extrapolatecases2.py
alex1770/Covid-19
0212593bf5d9bcbb7009c7d1fb1710116ad8bf32
[ "MIT" ]
1
2021-12-21T09:45:17.000Z
2021-12-21T09:45:17.000Z
speccases/extrapolatecases2.py
alex1770/Covid-19
0212593bf5d9bcbb7009c7d1fb1710116ad8bf32
[ "MIT" ]
2
2021-06-25T18:27:56.000Z
2021-12-12T17:49:31.000Z
from stuff import * import json,os from requests import get import numpy as np from random import random from math import sqrt,log np.set_printoptions(precision=4,suppress=True) np.set_printoptions(edgeitems=30, linewidth=100000) adir='casesbyspecdate' mindate='2021-02-24'# Can't get archive data earlier than 2021-02...
28.120879
144
0.686987
from stuff import * import json,os from requests import get import numpy as np from random import random from math import sqrt,log np.set_printoptions(precision=4,suppress=True) np.set_printoptions(edgeitems=30, linewidth=100000) adir='casesbyspecdate' mindate='2021-02-24'# Can't get archive data earlier than 2021-02...
0
0
0
42aa2f6ae401e038ba8cf92ad6a26fc1d78559e2
8,578
py
Python
qiskit_metal/qlibrary/qubits/transmon_concentric.py
TomVethaak/qiskit-metal
0fd3049b16a2b28dc6890b696d67329a91da70b9
[ "Apache-2.0" ]
167
2021-03-17T20:35:17.000Z
2022-03-31T13:25:04.000Z
qiskit_metal/qlibrary/qubits/transmon_concentric.py
TomVethaak/qiskit-metal
0fd3049b16a2b28dc6890b696d67329a91da70b9
[ "Apache-2.0" ]
307
2021-03-17T14:07:43.000Z
2022-03-23T14:22:20.000Z
qiskit_metal/qlibrary/qubits/transmon_concentric.py
TomVethaak/qiskit-metal
0fd3049b16a2b28dc6890b696d67329a91da70b9
[ "Apache-2.0" ]
122
2021-03-17T14:21:24.000Z
2022-03-18T10:09:38.000Z
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any...
41.240385
93
0.56097
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any...
421
0
30
8031c75efb463daa85a3b8255bc080c973495316
1,987
py
Python
optimal/common.py
Azzukhan/optimal
75c59742b3942f12b2dfca9b4d1a282e76a394c9
[ "MIT" ]
36
2017-09-08T14:47:27.000Z
2022-03-31T02:12:31.000Z
optimal/common.py
Azzukhan/optimal
75c59742b3942f12b2dfca9b4d1a282e76a394c9
[ "MIT" ]
1
2020-03-03T04:29:57.000Z
2020-07-06T03:42:56.000Z
optimal/common.py
Azzukhan/optimal
75c59742b3942f12b2dfca9b4d1a282e76a394c9
[ "MIT" ]
14
2017-10-03T12:45:20.000Z
2021-12-16T01:48:00.000Z
############################################################################### # The MIT License (MIT) # # Copyright (c) 2014 Justin Lovinger # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Softwar...
42.276596
80
0.688978
############################################################################### # The MIT License (MIT) # # Copyright (c) 2014 Justin Lovinger # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Softwar...
0
0
0
3ff917c777f72277fd28e8ac7003422aca296956
3,594
py
Python
RQ1_data_software/phase2_energy_detector/energy_to_csv/rosd_energy_to_csv.py
S2-group/msr-2021-robotics-green-architectural-tactics-replication-package
fc4a205b00abb0b096c472856002e440e73f2c5d
[ "MIT" ]
2
2021-03-26T17:29:27.000Z
2021-03-27T20:06:21.000Z
RQ1_data_software/phase2_energy_detector/energy_to_csv/rosd_energy_to_csv.py
S2-group/msr-2021-robotics-green-architectural-tactics-replication-package
fc4a205b00abb0b096c472856002e440e73f2c5d
[ "MIT" ]
null
null
null
RQ1_data_software/phase2_energy_detector/energy_to_csv/rosd_energy_to_csv.py
S2-group/msr-2021-robotics-green-architectural-tactics-replication-package
fc4a205b00abb0b096c472856002e440e73f2c5d
[ "MIT" ]
null
null
null
import csv import json from itertools import zip_longest with open('../energy_detectors/data/ros-discourse_data.json') as f: rosd_data = json.load(f) rosd_url = [item.get('url') for item in rosd_data] rosd_tcontents = [item.get('thread_contents') for item in rosd_data] rosd_tdetails = [item.get(...
25.856115
67
0.640512
import csv import json from itertools import zip_longest with open('../energy_detectors/data/ros-discourse_data.json') as f: rosd_data = json.load(f) rosd_url = [item.get('url') for item in rosd_data] rosd_tcontents = [item.get('thread_contents') for item in rosd_data] rosd_tdetails = [item.get(...
0
0
0
2aca6a7718320e83f4233372a60a2fc78adae9c3
4,535
py
Python
core/wavenet/utils.py
rist-ro/argo
a10c33346803239db8a64c104db7f22ec4e05bef
[ "MIT" ]
4
2020-12-07T19:13:13.000Z
2022-01-30T18:52:18.000Z
core/wavenet/utils.py
rist-ro/argo
a10c33346803239db8a64c104db7f22ec4e05bef
[ "MIT" ]
12
2020-09-25T22:41:28.000Z
2022-02-09T23:46:34.000Z
core/wavenet/utils.py
rist-ro/argo
a10c33346803239db8a64c104db7f22ec4e05bef
[ "MIT" ]
2
2021-03-02T18:31:04.000Z
2021-03-02T21:56:43.000Z
import tensorflow as tf import numpy as np def mu_law(x, mu=255, int8=False): """A TF implementation of Mu-Law encoding. Args: x: The audio samples to encode between [-1, 1] mu: The Mu to use in our Mu-Law. int8: Use int8 encoding. Returns: out: The Mu-Law encoded int8 data [-128...
29.835526
80
0.609041
import tensorflow as tf import numpy as np def mu_law(x, mu=255, int8=False): """A TF implementation of Mu-Law encoding. Args: x: The audio samples to encode between [-1, 1] mu: The Mu to use in our Mu-Law. int8: Use int8 encoding. Returns: out: The Mu-Law encoded int8 data [-128...
384
0
23
ec6d2c8aee2e2a6ef3c232a2eeca32800b0fb871
899
py
Python
Assignment3/src/test/ParserSuite.py
ntnguyen648936/PPL-BKOOOL
458f54683da01d2105cf3cffc8ecbc2aeb796df8
[ "Apache-2.0" ]
null
null
null
Assignment3/src/test/ParserSuite.py
ntnguyen648936/PPL-BKOOOL
458f54683da01d2105cf3cffc8ecbc2aeb796df8
[ "Apache-2.0" ]
null
null
null
Assignment3/src/test/ParserSuite.py
ntnguyen648936/PPL-BKOOOL
458f54683da01d2105cf3cffc8ecbc2aeb796df8
[ "Apache-2.0" ]
1
2022-01-27T15:38:22.000Z
2022-01-27T15:38:22.000Z
import unittest from TestUtils import TestParser
28.09375
58
0.522803
import unittest from TestUtils import TestParser class ParserSuite(unittest.TestCase): def test_simple_program(self): input = r""" class main { final static boolean[3] a = {true,false,true}; int[2] b = {1,2}; final string[1] c = {"hello"}, d = {"world"}; ...
732
16
102
3b1cb9b4c99e4da7354a4da28dddc7745979a487
250
py
Python
list01/exer_07.py
pedrolucas27/exercising-python
4b30bbce6b860fb617baf4600d8da83b68023e82
[ "MIT" ]
null
null
null
list01/exer_07.py
pedrolucas27/exercising-python
4b30bbce6b860fb617baf4600d8da83b68023e82
[ "MIT" ]
null
null
null
list01/exer_07.py
pedrolucas27/exercising-python
4b30bbce6b860fb617baf4600d8da83b68023e82
[ "MIT" ]
null
null
null
#Faça um Programa que calcule a área de um quadrado, # em seguida mostre o dobro desta área para o usuário. from decimal import Decimal lado = Decimal(input("Informe o lado do quadrado:")) a = lado ** 2 print("O dobro da área do quadrado é",(a * 2))
41.666667
55
0.724
#Faça um Programa que calcule a área de um quadrado, # em seguida mostre o dobro desta área para o usuário. from decimal import Decimal lado = Decimal(input("Informe o lado do quadrado:")) a = lado ** 2 print("O dobro da área do quadrado é",(a * 2))
0
0
0
de0d5a324575b0402bd8b86558dc69e727ac424a
3,396
py
Python
common/OpTestVIOS.py
rashijhawar/op-test
ccc1ced2a9dc0177a538f170b5e029ac3473c3ae
[ "Apache-2.0" ]
null
null
null
common/OpTestVIOS.py
rashijhawar/op-test
ccc1ced2a9dc0177a538f170b5e029ac3473c3ae
[ "Apache-2.0" ]
null
null
null
common/OpTestVIOS.py
rashijhawar/op-test
ccc1ced2a9dc0177a538f170b5e029ac3473c3ae
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # IBM_PROLOG_BEGIN_TAG # OpenPOWER Automated Test Project # # Contributors Listed Below - COPYRIGHT 2022 # [+] International Business Machines Corp. # # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may o...
36.12766
102
0.664016
#!/usr/bin/env python3 # IBM_PROLOG_BEGIN_TAG # OpenPOWER Automated Test Project # # Contributors Listed Below - COPYRIGHT 2022 # [+] International Business Machines Corp. # # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may o...
341
0
54
1792a601d25a24087e8227af24b3f9f553e31f8b
385
py
Python
traktor_tester.py
DrLuke/VJPyree-GPN20
dfe27c7c342de15cb10ff454b99732f13eca05b0
[ "MIT" ]
1
2022-03-30T21:28:52.000Z
2022-03-30T21:28:52.000Z
traktor_tester.py
DrLuke/VJPyree-GPN20
dfe27c7c342de15cb10ff454b99732f13eca05b0
[ "MIT" ]
null
null
null
traktor_tester.py
DrLuke/VJPyree-GPN20
dfe27c7c342de15cb10ff454b99732f13eca05b0
[ "MIT" ]
null
null
null
import mido from pythonosc import udp_client import time oscip = "127.0.0.1" oscport = 31337 client = udp_client.SimpleUDPClient(oscip, oscport) # Read from midi #with mido.open_input() as inport: # while True: # for msg in inport: # client.send_message("/traktor/beat", msg.type) while True: ...
19.25
59
0.680519
import mido from pythonosc import udp_client import time oscip = "127.0.0.1" oscport = 31337 client = udp_client.SimpleUDPClient(oscip, oscport) # Read from midi #with mido.open_input() as inport: # while True: # for msg in inport: # client.send_message("/traktor/beat", msg.type) while True: ...
0
0
0
433541354c6056e9f1524970ecb5bba556957a14
12,259
py
Python
mediagoblin/auth/views.py
stenwt/mediagoblin-quickstart-openshift
4a728c4b3b988c59eb9a43ad1ae1ca5edf8bc3c2
[ "CC0-1.0" ]
1
2016-02-10T18:22:42.000Z
2016-02-10T18:22:42.000Z
mediagoblin/auth/views.py
stenwt/mediagoblin-quickstart-openshift
4a728c4b3b988c59eb9a43ad1ae1ca5edf8bc3c2
[ "CC0-1.0" ]
1
2016-04-19T13:03:17.000Z
2016-04-19T13:03:17.000Z
mediagoblin/auth/views.py
stenwt/mediagoblin-quickstart-openshift
4a728c4b3b988c59eb9a43ad1ae1ca5edf8bc3c2
[ "CC0-1.0" ]
null
null
null
# GNU MediaGoblin -- federated, autonomous media hosting # Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either versio...
34.532394
99
0.625907
# GNU MediaGoblin -- federated, autonomous media hosting # Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either versio...
127
0
23
81481a59f2f7e592b80b5ac6e993fd1db93b953a
750
py
Python
tf_netbuilder/utils.py
thunfischtoast/tf_netbuilder
728826ac5e4e58a39ea862cecc86ad249a19e278
[ "Apache-2.0" ]
10
2020-11-06T13:44:44.000Z
2021-11-20T11:20:23.000Z
tf_netbuilder/utils.py
thunfischtoast/tf_netbuilder
728826ac5e4e58a39ea862cecc86ad249a19e278
[ "Apache-2.0" ]
2
2021-01-11T06:41:54.000Z
2021-03-31T10:41:49.000Z
tf_netbuilder/utils.py
thunfischtoast/tf_netbuilder
728826ac5e4e58a39ea862cecc86ad249a19e278
[ "Apache-2.0" ]
10
2020-11-12T23:02:28.000Z
2022-01-29T12:07:41.000Z
def round_channels(channels, multiplier=1.0, divisor=8, channel_min=None): """Round number of filters based on depth multiplier.""" if not multiplier: return channels channels *= multiplier return make_divisible(channels, divisor, channel_min)
27.777778
79
0.646667
def make_divisible(v: int, divisor: int = 8, min_value: int = None): min_value = min_value or divisor new_v = max(min_value, int(v + divisor / 2) // divisor * divisor) if new_v < 0.9 * v: # ensure round down does not go down by more than 10%. new_v += divisor return new_v def round_channels...
409
0
69
1b56d28081a5ccc2d9b201eb90aaaf5c059d79c3
1,064
py
Python
tests/webpage_get_test.py
wasPrime/mini-spider
a6489834bfa4447acb1f167876519cdc94aa4e3a
[ "MIT" ]
null
null
null
tests/webpage_get_test.py
wasPrime/mini-spider
a6489834bfa4447acb1f167876519cdc94aa4e3a
[ "MIT" ]
null
null
null
tests/webpage_get_test.py
wasPrime/mini-spider
a6489834bfa4447acb1f167876519cdc94aa4e3a
[ "MIT" ]
null
null
null
import unittest from module import webpage_get NORMAL_URL_LIST = ["http://www.baidu.com"] ABNORMAL_URL_LIST = ["aaa"] DEFAULT_TIMEOUT = 1
32.242424
78
0.693609
import unittest from module import webpage_get NORMAL_URL_LIST = ["http://www.baidu.com"] ABNORMAL_URL_LIST = ["aaa"] DEFAULT_TIMEOUT = 1 class TestIsUrlAccessible(unittest.TestCase): def test_normal(self): for normal_url in NORMAL_URL_LIST: ret = webpage_get.is_url_accessible(normal_url, DEF...
728
43
152
351c0194af81465a2af9324be0bbf9d87b4d0893
4,467
py
Python
src/eduid_action/tou/action.py
SUNET/eduid-action
16c7c737de604ae7376d0b44ef4ff0f274810139
[ "BSD-3-Clause" ]
null
null
null
src/eduid_action/tou/action.py
SUNET/eduid-action
16c7c737de604ae7376d0b44ef4ff0f274810139
[ "BSD-3-Clause" ]
2
2018-09-11T06:06:30.000Z
2018-12-20T15:02:52.000Z
src/eduid_action/tou/action.py
SUNET/eduid-action
16c7c737de604ae7376d0b44ef4ff0f274810139
[ "BSD-3-Clause" ]
1
2018-09-11T10:11:55.000Z
2018-09-11T10:11:55.000Z
# # Copyright (c) 2015 NORDUnet A/S # All rights reserved. # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the following # conditions are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of ...
42.141509
91
0.690172
# # Copyright (c) 2015 NORDUnet A/S # All rights reserved. # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the following # conditions are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of ...
2,397
184
23
3560f4e8f134dcb8a39aec649cb2bc15d8b44924
4,864
py
Python
throttle/zones/__init__.py
alimp5/django-throttle-requests
9072b2570f1ce3c2e12f7590fc2596045ab528d7
[ "MIT" ]
1
2021-05-16T16:57:13.000Z
2021-05-16T16:57:13.000Z
throttle/zones/__init__.py
alimp5/django-throttle-requests
9072b2570f1ce3c2e12f7590fc2596045ab528d7
[ "MIT" ]
null
null
null
throttle/zones/__init__.py
alimp5/django-throttle-requests
9072b2570f1ce3c2e12f7590fc2596045ab528d7
[ "MIT" ]
null
null
null
import time from django.core.exceptions import ImproperlyConfigured from django.conf import settings from throttle.zones.remoteip import RemoteIP from throttle.exceptions import ThrottleZoneNotDefined, ThrottleImproperlyConfigured, RateLimitExceeded from throttle.utils import load_class_from_path, serialize_bucket_key...
40.533333
119
0.680304
import time from django.core.exceptions import ImproperlyConfigured from django.conf import settings from throttle.zones.remoteip import RemoteIP from throttle.exceptions import ThrottleZoneNotDefined, ThrottleImproperlyConfigured, RateLimitExceeded from throttle.utils import load_class_from_path, serialize_bucket_key...
4,202
127
69
c584425081b5cf5b4c4ae2163f73660f6a7819ee
2,602
py
Python
brml/potvariables.py
herupraptono/pybrml
42fa70f17c303943447816234a87b3c5815f12bb
[ "CNRI-Python" ]
136
2015-02-15T15:10:56.000Z
2022-03-09T10:08:17.000Z
brml/potvariables.py
tulcod/PyBRML
55357ef60e394d7146af037dbfcab97f7b29d44b
[ "CNRI-Python" ]
null
null
null
brml/potvariables.py
tulcod/PyBRML
55357ef60e394d7146af037dbfcab97f7b29d44b
[ "CNRI-Python" ]
43
2015-02-15T15:11:25.000Z
2021-07-16T15:08:10.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Mingjun Zhou <mingjun.zhou@gmail.com> # Licence: BSD 3 clause import numpy as np def potvariables(pots): """Returns information about all variables in a set of potentials Return the variables and their number of states. If there is a dimension mi...
34.236842
78
0.586088
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Mingjun Zhou <mingjun.zhou@gmail.com> # Licence: BSD 3 clause import numpy as np def potvariables(pots): """Returns information about all variables in a set of potentials Return the variables and their number of states. If there is a dimension mi...
0
0
0
0c76192008acbda76de5c6c98621f555a262cb8c
2,601
py
Python
app/utils/login/login_util.py
Hansybx/guohe3
53990b92f5d45bac1c2b903fd8df9cb97283697e
[ "Apache-2.0" ]
1
2019-08-18T13:16:14.000Z
2019-08-18T13:16:14.000Z
app/utils/login/login_util.py
Hansybx/guohe3
53990b92f5d45bac1c2b903fd8df9cb97283697e
[ "Apache-2.0" ]
1
2019-08-19T02:05:32.000Z
2022-02-11T07:27:37.000Z
app/utils/login/login_util.py
Hansybx/guohe3
53990b92f5d45bac1c2b903fd8df9cb97283697e
[ "Apache-2.0" ]
1
2019-08-18T09:08:25.000Z
2019-08-18T09:08:25.000Z
""" -*- coding: utf-8 -*- Time : 2019/7/13 15:51 Author : Hansybx """ import re import requests from bs4 import BeautifulSoup from flask import jsonify from app.models.error import PasswordFailed from app.models.student_info import StudentInfo from app.utils.common_utils import put_to_mysql headers = { '...
28.582418
135
0.657824
""" -*- coding: utf-8 -*- Time : 2019/7/13 15:51 Author : Hansybx """ import re import requests from bs4 import BeautifulSoup from flask import jsonify from app.models.error import PasswordFailed from app.models.student_info import StudentInfo from app.utils.common_utils import put_to_mysql headers = { '...
1,909
0
92
db4010607e5a532af1db0ed8547b61b66ea92b78
947
py
Python
sysinv/sysinv/sysinv/sysinv/db/sqlalchemy/migrate_repo/versions/039_rpm_to_idisk.py
albailey/config
40ebe63d7dfc6a0a03216ebe55ed3ec9cf5410b9
[ "Apache-2.0" ]
10
2020-02-07T18:57:44.000Z
2021-09-11T10:29:34.000Z
sysinv/sysinv/sysinv/sysinv/db/sqlalchemy/migrate_repo/versions/039_rpm_to_idisk.py
albailey/config
40ebe63d7dfc6a0a03216ebe55ed3ec9cf5410b9
[ "Apache-2.0" ]
1
2021-01-14T12:01:55.000Z
2021-01-14T12:01:55.000Z
sysinv/sysinv/sysinv/sysinv/db/sqlalchemy/migrate_repo/versions/039_rpm_to_idisk.py
albailey/config
40ebe63d7dfc6a0a03216ebe55ed3ec9cf5410b9
[ "Apache-2.0" ]
10
2020-10-13T08:37:46.000Z
2022-02-09T00:21:25.000Z
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (c) 2013-2016 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # from sqlalchemy import Column, MetaData, String, Table from sysinv.common import constants ENGINE = 'InnoDB' CHARSET = 'utf8'
23.675
74
0.697994
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (c) 2013-2016 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # from sqlalchemy import Column, MetaData, String, Table from sysinv.common import constants ENGINE = 'InnoDB' CHARSET = 'utf8' def _populate_rpm_type(idisk_table): disks =...
606
0
69
d84e5b1e84e339c738c6715276cfc4602317308a
317
py
Python
venv/lib/python3.8/site-packages/songpal/__init__.py
vsevolodpohvalenko/home-assistant
4ae19b7d5d843c65ba700922c1814755257eb4e0
[ "Apache-2.0" ]
null
null
null
venv/lib/python3.8/site-packages/songpal/__init__.py
vsevolodpohvalenko/home-assistant
4ae19b7d5d843c65ba700922c1814755257eb4e0
[ "Apache-2.0" ]
null
null
null
venv/lib/python3.8/site-packages/songpal/__init__.py
vsevolodpohvalenko/home-assistant
4ae19b7d5d843c65ba700922c1814755257eb4e0
[ "Apache-2.0" ]
null
null
null
# flake8: noqa from importlib_metadata import version # type: ignore from songpal.common import SongpalException from songpal.device import Device from songpal.notification import ( ConnectChange, ContentChange, Notification, PowerChange, VolumeChange, ) __version__ = version("python-songpal")
22.642857
54
0.769716
# flake8: noqa from importlib_metadata import version # type: ignore from songpal.common import SongpalException from songpal.device import Device from songpal.notification import ( ConnectChange, ContentChange, Notification, PowerChange, VolumeChange, ) __version__ = version("python-songpal")
0
0
0
9fdbf1fc42ece41e217bfd55e5aff5e2209c5666
1,343
py
Python
torch_rl/envs/__init__.py
JimmyMVP/plain_rl
4780f05fffb62533a339197b49de487cdc9d9954
[ "MIT" ]
10
2018-03-18T21:27:59.000Z
2020-08-13T20:15:05.000Z
torch_rl/envs/__init__.py
JimmyMVP/plain_rl
4780f05fffb62533a339197b49de487cdc9d9954
[ "MIT" ]
1
2018-03-19T09:51:04.000Z
2018-03-19T10:11:02.000Z
torch_rl/envs/__init__.py
JimmyMVP/plain_rl
4780f05fffb62533a339197b49de487cdc9d9954
[ "MIT" ]
3
2018-03-10T09:17:10.000Z
2019-12-17T20:19:56.000Z
from gym.envs.registration import register from .wrappers import * from .logger import * from .envs import * register( id='BanditsX2-v0', kwargs = {'num_bandits' : 2}, entry_point='torch_rl.envs:BanditEnv', ) register( id='BanditsX4-v0', kwargs = {'num_bandits' : 4}, entry_point='torch_rl.env...
17.671053
60
0.613552
from gym.envs.registration import register from .wrappers import * from .logger import * from .envs import * register( id='BanditsX2-v0', kwargs = {'num_bandits' : 2}, entry_point='torch_rl.envs:BanditEnv', ) register( id='BanditsX4-v0', kwargs = {'num_bandits' : 4}, entry_point='torch_rl.env...
0
0
0
e6eff242e63560ac48a84867e188b0929841ee24
1,883
py
Python
dash_app/predict.py
zeyu2001/ICT1002-Python
76a2c8ad3e3c4a3c873a9259e2a11488c33f2bf7
[ "MIT" ]
1
2020-10-31T06:57:01.000Z
2020-10-31T06:57:01.000Z
dash_app/predict.py
zeyu2001/ICT1002-Python
76a2c8ad3e3c4a3c873a9259e2a11488c33f2bf7
[ "MIT" ]
null
null
null
dash_app/predict.py
zeyu2001/ICT1002-Python
76a2c8ad3e3c4a3c873a9259e2a11488c33f2bf7
[ "MIT" ]
1
2021-12-04T10:02:16.000Z
2021-12-04T10:02:16.000Z
import dash_html_components as html import dash_core_components as dcc import dash_table as dt import pandas as pd heading_2 = html.Header( html.H2( "Classify Emails (Spam or Ham)", style={ "text-align": "center", "margin": "10px", "font-weight": "lighter", ...
19.821053
82
0.548593
import dash_html_components as html import dash_core_components as dcc import dash_table as dt import pandas as pd heading_2 = html.Header( html.H2( "Classify Emails (Spam or Ham)", style={ "text-align": "center", "margin": "10px", "font-weight": "lighter", ...
0
0
0
f63e6de423ae23e53a526db48daf20e265d3c7e9
2,144
py
Python
utils/visualization.py
bhpfelix/NDDR-CNN-PyTorch
8c45f444093934831c83c5e2d592db962b300272
[ "Apache-2.0" ]
9
2020-04-03T02:44:33.000Z
2021-12-21T01:53:39.000Z
utils/visualization.py
bhpfelix/NDDR-CNN-PyTorch
8c45f444093934831c83c5e2d592db962b300272
[ "Apache-2.0" ]
null
null
null
utils/visualization.py
bhpfelix/NDDR-CNN-PyTorch
8c45f444093934831c83c5e2d592db962b300272
[ "Apache-2.0" ]
2
2020-05-22T11:58:01.000Z
2020-08-06T08:02:43.000Z
from PIL import Image import numpy as np label_colours = [(178, 45, 45), (153, 115, 115), (64, 36, 32), (255, 68, 0), (89, 24, 0), (191, 121, 96), (191, 102, 0), (76, 41, 0), (153, 115, 38), (102, 94, 77), (242, 194, 0), (191, 188, 143), (226, 242, 0), (119, 128, 0), (59, 64, 0), (10...
43.755102
120
0.527519
from PIL import Image import numpy as np label_colours = [(178, 45, 45), (153, 115, 115), (64, 36, 32), (255, 68, 0), (89, 24, 0), (191, 121, 96), (191, 102, 0), (76, 41, 0), (153, 115, 38), (102, 94, 77), (242, 194, 0), (191, 188, 143), (226, 242, 0), (119, 128, 0), (59, 64, 0), (10...
1,210
0
92
13e64fee553d5f2cf24434a7a7f137f544379377
209
py
Python
UVa 12004 - Bubble Sort/sample/main1.py
tadvi/uva
0ac0cbdf593879b4fb02a3efc09adbb031cb47d5
[ "MIT" ]
1
2020-11-24T03:17:21.000Z
2020-11-24T03:17:21.000Z
UVa 12004 - Bubble Sort/sample/main1.py
tadvi/uva
0ac0cbdf593879b4fb02a3efc09adbb031cb47d5
[ "MIT" ]
null
null
null
UVa 12004 - Bubble Sort/sample/main1.py
tadvi/uva
0ac0cbdf593879b4fb02a3efc09adbb031cb47d5
[ "MIT" ]
1
2021-04-11T16:22:31.000Z
2021-04-11T16:22:31.000Z
import sys from fractions import * sys.stdin = open('input.txt') numTest = int(input()) for itertest in range(numTest): n = int(input()) print 'Case %d: %s' % (itertest + 1, Fraction(n * (n - 1), 4))
23.222222
66
0.617225
import sys from fractions import * sys.stdin = open('input.txt') numTest = int(input()) for itertest in range(numTest): n = int(input()) print 'Case %d: %s' % (itertest + 1, Fraction(n * (n - 1), 4))
0
0
0
2caefcd75c993da7fc3a0bc51c96f9a90de0d590
2,016
py
Python
regression-tests/sparktkregtests/testcases/scoretests/lda.py
lewisc/spark-tk
5548fc925b5c278263cbdebbd9e8c7593320c2f4
[ "ECL-2.0", "Apache-2.0" ]
34
2016-05-20T22:26:05.000Z
2022-01-21T12:55:13.000Z
regression-tests/sparktkregtests/testcases/scoretests/lda.py
lewisc/spark-tk
5548fc925b5c278263cbdebbd9e8c7593320c2f4
[ "ECL-2.0", "Apache-2.0" ]
70
2016-06-28T01:11:21.000Z
2021-03-15T21:40:01.000Z
regression-tests/sparktkregtests/testcases/scoretests/lda.py
lewisc/spark-tk
5548fc925b5c278263cbdebbd9e8c7593320c2f4
[ "ECL-2.0", "Apache-2.0" ]
34
2016-04-21T22:25:22.000Z
2020-10-06T09:23:43.000Z
# vim: set encoding=utf-8 # Copyright (c) 2016 Intel Corporation  # # 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 require...
33.6
98
0.636905
# vim: set encoding=utf-8 # Copyright (c) 2016 Intel Corporation  # # 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 require...
0
1,156
23
b5f007c5a5c0a8c23aaa14a8fbbe0f808b36e134
108
py
Python
structlog_wrapper/apps.py
ankitkr/structlog-wrapper
bc085937656ef6aec5f485d95c9d761f4a3c0299
[ "MIT" ]
null
null
null
structlog_wrapper/apps.py
ankitkr/structlog-wrapper
bc085937656ef6aec5f485d95c9d761f4a3c0299
[ "MIT" ]
null
null
null
structlog_wrapper/apps.py
ankitkr/structlog-wrapper
bc085937656ef6aec5f485d95c9d761f4a3c0299
[ "MIT" ]
null
null
null
from django.apps import AppConfig
18
40
0.796296
from django.apps import AppConfig class StructLogWrapperConfig(AppConfig): name = "structlog_wrapper"
0
50
23
e010a27a8bef3db333bf29794eb1567b3fd118cb
978
py
Python
src/models/downsamples/linear.py
takedarts/skipresnet
d6f1e16042f8433a287355009e17e4e5768ad319
[ "MIT" ]
3
2022-02-03T13:25:12.000Z
2022-02-04T16:12:23.000Z
src/models/downsamples/linear.py
takedarts/skipresnet
d6f1e16042f8433a287355009e17e4e5768ad319
[ "MIT" ]
null
null
null
src/models/downsamples/linear.py
takedarts/skipresnet
d6f1e16042f8433a287355009e17e4e5768ad319
[ "MIT" ]
1
2022-02-04T12:28:02.000Z
2022-02-04T12:28:02.000Z
import collections from typing import Callable import torch.nn as nn from ..modules import DropBlock class LinearDownsample(nn.Sequential): ''' Downsample class with linear mapping. This is a default donwsample mudule for ResNets. '''
26.432432
65
0.563395
import collections from typing import Callable import torch.nn as nn from ..modules import DropBlock class LinearDownsample(nn.Sequential): ''' Downsample class with linear mapping. This is a default donwsample mudule for ResNets. ''' def __init__( self, in_channels: int, ...
696
0
27
55620ff3bb7d277fbbafa5914f90a695c8f4cae6
3,908
py
Python
rmssl.py
rmayherr/python
830aec82e3ab155b66d01032eac71bbe6f961fce
[ "MIT" ]
null
null
null
rmssl.py
rmayherr/python
830aec82e3ab155b66d01032eac71bbe6f961fce
[ "MIT" ]
null
null
null
rmssl.py
rmayherr/python
830aec82e3ab155b66d01032eac71bbe6f961fce
[ "MIT" ]
null
null
null
Cellname="???rk" NodeName="???dea" #Que...
102.842105
106
0.141505
Cellname="???rk" NodeName="???dea" def Query(): #a...
2,337
0
613
08e0e943768cfcd3df2ba44b3fb53d2e9556f4bb
13,881
py
Python
article/src/scripts/Canaries/eval_without_and_with_output_transforms.py
yardencsGitHub/tweetynet
281f8876726359a298a2c387c7b4c2e40ac61c91
[ "BSD-3-Clause" ]
28
2018-11-14T08:18:15.000Z
2022-03-25T13:31:08.000Z
article/src/scripts/Canaries/eval_without_and_with_output_transforms.py
yardencsGitHub/tweetynet
281f8876726359a298a2c387c7b4c2e40ac61c91
[ "BSD-3-Clause" ]
116
2018-11-06T02:53:18.000Z
2022-03-23T20:57:37.000Z
article/src/scripts/Canaries/eval_without_and_with_output_transforms.py
yardencsGitHub/tweetynet
281f8876726359a298a2c387c7b4c2e40ac61c91
[ "BSD-3-Clause" ]
6
2019-03-11T16:41:54.000Z
2021-11-10T20:47:01.000Z
# This script is identical to the on for BFSongRepository but with canaries from collections import defaultdict import json from pathlib import Path import matplotlib.pyplot as plt import numpy as np import pandas as pd import torch from tqdm import tqdm import vak.device import vak.files from vak.labeled_timebins im...
46.89527
116
0.568403
# This script is identical to the on for BFSongRepository but with canaries from collections import defaultdict import json from pathlib import Path import matplotlib.pyplot as plt import numpy as np import pandas as pd import torch from tqdm import tqdm import vak.device import vak.files from vak.labeled_timebins im...
1,058
0
23
de7ae50b15e9c0501c863d61efda3f3695764d08
560
py
Python
instanotifier/feedsource/tests/test_forms.py
chaudbak/instanotifier
d29bc6bd9b7a003403886bfff1376b2c1925cc74
[ "MIT" ]
null
null
null
instanotifier/feedsource/tests/test_forms.py
chaudbak/instanotifier
d29bc6bd9b7a003403886bfff1376b2c1925cc74
[ "MIT" ]
6
2020-06-06T01:27:17.000Z
2022-02-10T11:20:17.000Z
instanotifier/feedsource/tests/test_forms.py
chaudbak/instanotifier
d29bc6bd9b7a003403886bfff1376b2c1925cc74
[ "MIT" ]
null
null
null
import json from test_plus.test import TestCase from instanotifier.feedsource.models import FeedSource from instanotifier.feedsource.forms import FeedSourceForm
25.454545
89
0.692857
import json from test_plus.test import TestCase from instanotifier.feedsource.models import FeedSource from instanotifier.feedsource.forms import FeedSourceForm class TestFeedSource(TestCase): def setUp(self): pass def test_validation(self): feed_source_data = dict( url="https:/...
310
10
76
1fc4ddea08f856b07584e4f2608797c3be15a0d9
439
py
Python
Python/REPL/test.py
kibetamos/Everything-Tech
25edb8e3be35bda13faf258c18d5c6653b9e73a7
[ "Apache-2.0" ]
null
null
null
Python/REPL/test.py
kibetamos/Everything-Tech
25edb8e3be35bda13faf258c18d5c6653b9e73a7
[ "Apache-2.0" ]
null
null
null
Python/REPL/test.py
kibetamos/Everything-Tech
25edb8e3be35bda13faf258c18d5c6653b9e73a7
[ "Apache-2.0" ]
null
null
null
import pytest from temperature import celsius_to_fahrenheit
39.909091
51
0.790433
import pytest from temperature import celsius_to_fahrenheit def test_celsius_to_fahrenheit(): assert celsius_to_fahrenheit(21) == 69.8 def test_celsius_to_fahrenheit_equivalance_point(): assert celsius_to_fahrenheit(-40) == -40 def test_celsius_to_fahrenheit_float(): assert celsius_to_fahrenheit(21.2) == 70...
292
0
88
502607423aa216fcab835f6de138bf34f5b7a3a2
666
py
Python
UTFPR/Prova.while -2.py
MateusCohuzer/Algoritmos-UTFPR-M31-de-2020
2dde62311eaaebbc30ca48b24261e68c4cb65777
[ "MIT" ]
null
null
null
UTFPR/Prova.while -2.py
MateusCohuzer/Algoritmos-UTFPR-M31-de-2020
2dde62311eaaebbc30ca48b24261e68c4cb65777
[ "MIT" ]
null
null
null
UTFPR/Prova.while -2.py
MateusCohuzer/Algoritmos-UTFPR-M31-de-2020
2dde62311eaaebbc30ca48b24261e68c4cb65777
[ "MIT" ]
null
null
null
txt = str('S') desconto = int(0) while txt == 'S': valor = float(input('Insira o valor do carro (sem desconto): ')) ano = int(input('Insira o ano de fabricação do veículo: ')) if ano <= 2010: desconto = float(valor * 0.2) elif ano <= 2020: desconto = float(valor * 0.15) elif ano > 2...
39.176471
97
0.591592
txt = str('S') desconto = int(0) while txt == 'S': valor = float(input('Insira o valor do carro (sem desconto): ')) ano = int(input('Insira o ano de fabricação do veículo: ')) if ano <= 2010: desconto = float(valor * 0.2) elif ano <= 2020: desconto = float(valor * 0.15) elif ano > 2...
0
0
0
43872271e85ec59e40c6326c549a7f0d1fabccac
1,108
py
Python
DLtorch/dataset/base.py
A-LinCui/DLtorch
27bfe18d9298fad99d6eda4508afa707e35b898f
[ "MIT" ]
3
2020-08-28T15:43:48.000Z
2020-08-29T11:34:42.000Z
DLtorch/dataset/base.py
zhaojb17/DLtorch
27bfe18d9298fad99d6eda4508afa707e35b898f
[ "MIT" ]
null
null
null
DLtorch/dataset/base.py
zhaojb17/DLtorch
27bfe18d9298fad99d6eda4508afa707e35b898f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import abc import os import torchvision.transforms as transforms from DLtorch.base import BaseComponent
33.575758
147
0.668773
# -*- coding: utf-8 -*- import abc import os import torchvision.transforms as transforms from DLtorch.base import BaseComponent class BaseDataset(BaseComponent): def __init__(self, path: str): super(BaseDataset, self).__init__() self.path = path self.datasets = {} self.logger.in...
854
24
98
3b5df536910fdac79072a757f041676d0d7ac5cc
1,028
py
Python
mandelbrot/naive.py
kidmose/python-course-mini-project
d8ebcc2f5e79f84ce350f2eafbc6c6e572d71584
[ "MIT" ]
null
null
null
mandelbrot/naive.py
kidmose/python-course-mini-project
d8ebcc2f5e79f84ce350f2eafbc6c6e572d71584
[ "MIT" ]
null
null
null
mandelbrot/naive.py
kidmose/python-course-mini-project
d8ebcc2f5e79f84ce350f2eafbc6c6e572d71584
[ "MIT" ]
null
null
null
from __future__ import division """Implementation of naive and inefficient mandelbrot calculator.""" import mandelbrot import math logger = mandelbrot.get_logger(__name__) class NaiveCalculator(mandelbrot.MandelbrotCalculator): """See parrent.""" file_name_data = "naive_data.csv" file_name_plot = "naive...
27.052632
68
0.550584
from __future__ import division """Implementation of naive and inefficient mandelbrot calculator.""" import mandelbrot import math logger = mandelbrot.get_logger(__name__) class NaiveCalculator(mandelbrot.MandelbrotCalculator): """See parrent.""" file_name_data = "naive_data.csv" file_name_plot = "naive...
0
0
0
114113c2327e984853bcfe3d2bdb8fbe4a9538bc
4,149
py
Python
tests/test_lookups.py
gluk-w/python-tuple-lookup
b0c44bb8fb9c94925c97b54b02ffc8abeb570914
[ "MIT" ]
null
null
null
tests/test_lookups.py
gluk-w/python-tuple-lookup
b0c44bb8fb9c94925c97b54b02ffc8abeb570914
[ "MIT" ]
null
null
null
tests/test_lookups.py
gluk-w/python-tuple-lookup
b0c44bb8fb9c94925c97b54b02ffc8abeb570914
[ "MIT" ]
null
null
null
import pytest from listlookup import ListLookup sample_list = [ {"id": 1, "country": "us", "name": "Atlanta"}, {"id": 2, "country": "us", "name": "Miami"}, {"id": 3, "country": "uk", "name": "Britain"}, {"id": 5, "country": "uk", "name": "Bermingham"}, {"id": 4, "country": "ca", "name": "Barrie"},...
31.195489
114
0.614124
import pytest from listlookup import ListLookup sample_list = [ {"id": 1, "country": "us", "name": "Atlanta"}, {"id": 2, "country": "us", "name": "Miami"}, {"id": 3, "country": "uk", "name": "Britain"}, {"id": 5, "country": "uk", "name": "Bermingham"}, {"id": 4, "country": "ca", "name": "Barrie"},...
3,216
0
161
611db959982df706f77658f35604719e25cee6f4
533
py
Python
uniclass_to_nf_ea_com_source/b_code/migrators/uniclass_raw_to_domain/evolve/evolve_stage_1/domain_tables_data_processor/top_level_items_table_remover.py
boro-alpha/uniclass_to_nf_ea_com
753e97467ce53c25bc86341b915489c2eeeb3f49
[ "MIT" ]
2
2021-08-09T14:40:04.000Z
2022-03-13T22:22:19.000Z
uniclass_to_nf_ea_com_source/b_code/migrators/uniclass_raw_to_domain/evolve/evolve_stage_1/domain_tables_data_processor/top_level_items_table_remover.py
boro-alpha/uniclass_to_nf_ea_com
753e97467ce53c25bc86341b915489c2eeeb3f49
[ "MIT" ]
null
null
null
uniclass_to_nf_ea_com_source/b_code/migrators/uniclass_raw_to_domain/evolve/evolve_stage_1/domain_tables_data_processor/top_level_items_table_remover.py
boro-alpha/uniclass_to_nf_ea_com
753e97467ce53c25bc86341b915489c2eeeb3f49
[ "MIT" ]
null
null
null
from uniclass_to_nf_ea_com_source.b_code.configurations.common_constants.uniclass_bclearer_constants import \ UNICLASS2015_TOP_LEVEL_OBJECTS_TABLE_NAME
35.533333
109
0.79925
from uniclass_to_nf_ea_com_source.b_code.configurations.common_constants.uniclass_bclearer_constants import \ UNICLASS2015_TOP_LEVEL_OBJECTS_TABLE_NAME def remove_top_level_items_table_from_dataframes_dictionary( dataframe_dictionary: dict): top_level_dataframe_dictionary = {} for table, datafram...
353
0
23
f0f3d2a9d3148588926e7346929e0dafccfb068f
7,143
py
Python
spectral_analysis/classifiers/neural_network/cnn.py
csepreghy/spectral_analysis
1cbd9770347a71721164a7daf7b133ad0eeba8e4
[ "MIT" ]
5
2019-05-29T07:16:27.000Z
2019-08-20T07:15:54.000Z
spectral_analysis/classifiers/neural_network/cnn.py
csepreghy/spectral-analysis
1cbd9770347a71721164a7daf7b133ad0eeba8e4
[ "MIT" ]
19
2020-02-20T09:48:46.000Z
2020-02-24T11:42:54.000Z
spectral_analysis/classifiers/neural_network/cnn.py
csepreghy/spectral_analysis
1cbd9770347a71721164a7daf7b133ad0eeba8e4
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from tensorflow.keras.optimizers import SGD, Adam from tensorflow.keras.callbacks import History, EarlyStopping from tensorflow.keras.layers import Dense, Dropout, Flatten, Conv...
41.289017
111
0.576648
import numpy as np import pandas as pd from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from tensorflow.keras.optimizers import SGD, Adam from tensorflow.keras.callbacks import History, EarlyStopping from tensorflow.keras.layers import Dense, Dropout, Flatten, Conv...
6,334
-11
180
d2bc237a95b3258f1a7bede6065ddf5da53dcd8a
413
py
Python
tests/test_colmet_collector.py
oar-team/colmet-collector
b962a84574093adfd4a1c1877277b96119d5fe77
[ "BSD-3-Clause" ]
null
null
null
tests/test_colmet_collector.py
oar-team/colmet-collector
b962a84574093adfd4a1c1877277b96119d5fe77
[ "BSD-3-Clause" ]
null
null
null
tests/test_colmet_collector.py
oar-team/colmet-collector
b962a84574093adfd4a1c1877277b96119d5fe77
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_colmet_collector ---------------------------------- Tests for `colmet_collector` module. """ import unittest from colmet_collector import colmet_collector
14.241379
45
0.615012
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_colmet_collector ---------------------------------- Tests for `colmet_collector` module. """ import unittest from colmet_collector import colmet_collector class TestColmetCollector(object): @classmethod def setup_class(cls): pass def te...
46
128
23
3ae829e90b7c9ef052514f4aefcb4694ee18d845
26,355
py
Python
bin/Python27/Lib/site-packages/omniORBpy-4.2.0/lib/python/omniORB/COS/CosNaming_idl.py
lefevre-fraser/openmeta-mms
08f3115e76498df1f8d70641d71f5c52cab4ce5f
[ "MIT" ]
null
null
null
bin/Python27/Lib/site-packages/omniORBpy-4.2.0/lib/python/omniORB/COS/CosNaming_idl.py
lefevre-fraser/openmeta-mms
08f3115e76498df1f8d70641d71f5c52cab4ce5f
[ "MIT" ]
null
null
null
bin/Python27/Lib/site-packages/omniORBpy-4.2.0/lib/python/omniORB/COS/CosNaming_idl.py
lefevre-fraser/openmeta-mms
08f3115e76498df1f8d70641d71f5c52cab4ce5f
[ "MIT" ]
null
null
null
# Python stubs generated by omniidl from ..\..\..\..\..\idl\COS\CosNaming.idl # DO NOT EDIT THIS FILE! import omniORB, _omnipy from omniORB import CORBA, PortableServer _0_CORBA = CORBA _omnipy.checkVersion(4,2, __file__, 1) try: property except NameError: # # Start of module "CosNaming" # _...
59.358108
576
0.782053
# Python stubs generated by omniidl from ..\..\..\..\..\idl\COS\CosNaming.idl # DO NOT EDIT THIS FILE! import omniORB, _omnipy from omniORB import CORBA, PortableServer _0_CORBA = CORBA _omnipy.checkVersion(4,2, __file__, 1) try: property except NameError: def property(*args): return N...
3,249
9,165
341
60d991e2a6a2caab3b549170e63eb1abc3587e40
41,359
py
Python
source/objects/waveClass.py
THREDgroup/WEC-Sim-Python
c04ef42724cbf72419713970bf9ae63658a4d1b3
[ "Apache-2.0" ]
2
2020-12-15T08:42:05.000Z
2021-09-14T08:28:17.000Z
tests/test_objects/test_waveclass/waveclass/__init__.py
THREDgroup/WEC-Sim-Python
c04ef42724cbf72419713970bf9ae63658a4d1b3
[ "Apache-2.0" ]
1
2020-09-14T03:08:46.000Z
2020-10-19T05:47:42.000Z
tests/test_objects/test_waveclass/waveclass/__init__.py
THREDgroup/WEC-Sim-Python
c04ef42724cbf72419713970bf9ae63658a4d1b3
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Apr 3 07:52:07 2020 @author: SungJun Won This code is written based on WEC-sim. wonsungjun0000@gmail.com Note: readData method is included to import data type of both .txt and .mat Note: irregularWaveSpectrum method has been modified for the faster computation. The or...
52.686624
218
0.567615
# -*- coding: utf-8 -*- """ Created on Fri Apr 3 07:52:07 2020 @author: SungJun Won This code is written based on WEC-sim. wonsungjun0000@gmail.com Note: readData method is included to import data type of both .txt and .mat Note: irregularWaveSpectrum method has been modified for the faster computation. The or...
0
39,873
23
05943b7cd700824a3706bc635056b541dae70aac
632
py
Python
day1.py
Arrain/Advent-of-Code-2020
db41301ba39b6315a40704bc26b89e00a4bb4940
[ "Unlicense" ]
null
null
null
day1.py
Arrain/Advent-of-Code-2020
db41301ba39b6315a40704bc26b89e00a4bb4940
[ "Unlicense" ]
null
null
null
day1.py
Arrain/Advent-of-Code-2020
db41301ba39b6315a40704bc26b89e00a4bb4940
[ "Unlicense" ]
null
null
null
""" AOC2020 - day1 """ import sys; FILEPATH = "./day1.txt"; with open(FILEPATH) as fp: lines = fp.readlines(); EXISTING = []; for line in lines: val = int(line); ## part 1 # for i in EXISTING: # if val + i == 2020: # print(val * i); ...
21.066667
49
0.419304
""" AOC2020 - day1 """ import sys; FILEPATH = "./day1.txt"; with open(FILEPATH) as fp: lines = fp.readlines(); EXISTING = []; for line in lines: val = int(line); ## part 1 # for i in EXISTING: # if val + i == 2020: # print(val * i); ...
0
0
0
aae87473e511a2747dbfd45a8cb37ea418bc8165
2,878
py
Python
eeyore/kernels/kernel.py
papamarkou/eeyore
4cd9b5a619cd095035aa93f348d1c937629aa8a3
[ "MIT" ]
6
2020-04-22T18:56:46.000Z
2021-09-09T15:57:48.000Z
eeyore/kernels/kernel.py
papamarkou/eeyore
4cd9b5a619cd095035aa93f348d1c937629aa8a3
[ "MIT" ]
19
2019-11-14T21:22:21.000Z
2020-10-31T16:18:36.000Z
eeyore/kernels/kernel.py
scidom/eeyore
4cd9b5a619cd095035aa93f348d1c937629aa8a3
[ "MIT" ]
null
null
null
import itertools import torch class Kernel: """ Base class for kernels """
28.215686
100
0.539958
import itertools import torch class Kernel: """ Base class for kernels """ def k(self, x1, x2): raise NotImplementedError def check_input_dtype(self, x, dtype): if not all(t == dtype for t in [element.dtype for element in x]): raise ValueError def check_inputs_dtype(self,...
2,555
0
243
7cc0f26d7e7eb64f945903a377d48acf02309297
25,275
py
Python
cirq-core/cirq/_compat.py
melonwater211/Cirq
e9ec70d3ed7e7e4dbc36418743faba170e488364
[ "Apache-2.0" ]
null
null
null
cirq-core/cirq/_compat.py
melonwater211/Cirq
e9ec70d3ed7e7e4dbc36418743faba170e488364
[ "Apache-2.0" ]
null
null
null
cirq-core/cirq/_compat.py
melonwater211/Cirq
e9ec70d3ed7e7e4dbc36418743faba170e488364
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The Cirq Developers # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
38.179758
105
0.63545
# Copyright 2018 The Cirq Developers # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
8,019
118
498
d3df745d68f0c8483badccb255fdb37c09a3cf9f
10,777
py
Python
slowfast/datasets/epickitchens.py
dylan-campbell/Motionformer
6c860614a3b252c6163971ba20e61ea3184d5291
[ "Apache-2.0" ]
153
2021-06-10T14:00:22.000Z
2022-03-31T04:12:54.000Z
slowfast/datasets/epickitchens.py
dylan-campbell/Motionformer
6c860614a3b252c6163971ba20e61ea3184d5291
[ "Apache-2.0" ]
10
2021-06-30T04:48:50.000Z
2022-03-11T15:51:05.000Z
slowfast/datasets/epickitchens.py
dylan-campbell/Motionformer
6c860614a3b252c6163971ba20e61ea3184d5291
[ "Apache-2.0" ]
22
2021-06-11T13:10:05.000Z
2022-03-28T03:42:39.000Z
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import numpy as np import random import os import pandas as pd import torch import torch.utils.data from torchvision import transforms import slowfast.utils.logging as logging from .build import DATASET_REGISTRY from .epic...
41.133588
131
0.593857
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import numpy as np import random import os import pandas as pd import torch import torch.utils.data from torchvision import transforms import slowfast.utils.logging as logging from .build import DATASET_REGISTRY from .epic...
926
9,233
22
c5fda76eda5749a6451e2494fedda422ecadeadf
2,184
py
Python
kingbird/tests/unit/objects/test_base.py
starlingx-staging/stx-kingbird
9869ad4640e76384fa14f031a59134cd439929a8
[ "Apache-2.0" ]
null
null
null
kingbird/tests/unit/objects/test_base.py
starlingx-staging/stx-kingbird
9869ad4640e76384fa14f031a59134cd439929a8
[ "Apache-2.0" ]
null
null
null
kingbird/tests/unit/objects/test_base.py
starlingx-staging/stx-kingbird
9869ad4640e76384fa14f031a59134cd439929a8
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2015 Ericsson AB. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
35.803279
75
0.668498
# Copyright (c) 2015 Ericsson AB. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
1,233
172
23
501c0365ef91bce64122ec705c531968f2d62a8a
3,798
py
Python
spine_json_lib/data/data_types/draworder.py
ivan-ah/spine-json-lib
1ea8460127f005d57af56090d2a48e6039437306
[ "MIT" ]
null
null
null
spine_json_lib/data/data_types/draworder.py
ivan-ah/spine-json-lib
1ea8460127f005d57af56090d2a48e6039437306
[ "MIT" ]
null
null
null
spine_json_lib/data/data_types/draworder.py
ivan-ah/spine-json-lib
1ea8460127f005d57af56090d2a48e6039437306
[ "MIT" ]
null
null
null
import copy from collections import OrderedDict from typing import List, Dict, Any from spine_json_lib.data.data_types.base_type import SpineData
39.5625
88
0.660874
import copy from collections import OrderedDict from typing import List, Dict, Any from spine_json_lib.data.data_types.base_type import SpineData class DrawOrderTimelineOffset(SpineData): DEFAULT_VALUES: Dict[str, Any] = {"slot": "", "offset": 0} SPINE_3_8_DEFAULT_VALUES: Dict[str, Any] = DEFAULT_VALUES ...
2,185
1,418
46
41ef0551465c518220c7a9780b2ba081205812fd
1,550
py
Python
tests/test_config.py
BenjaminNMitchell/alias-cd
253ec6714674eb00171f60e4219a57033734bc68
[ "MIT" ]
null
null
null
tests/test_config.py
BenjaminNMitchell/alias-cd
253ec6714674eb00171f60e4219a57033734bc68
[ "MIT" ]
null
null
null
tests/test_config.py
BenjaminNMitchell/alias-cd
253ec6714674eb00171f60e4219a57033734bc68
[ "MIT" ]
null
null
null
"""This module tests config.py.""" from typing import Dict import pytest from alias_cd import config @pytest.fixture def config_data() -> str: """Sample config data in yaml format.""" return """--- "~": _alias: root my_long_directory_1: _alias: d1 my_sub_directory_1: _alias: ...
23.134328
81
0.604516
"""This module tests config.py.""" from typing import Dict import pytest from alias_cd import config @pytest.fixture def config_data() -> str: """Sample config data in yaml format.""" return """--- "~": _alias: root my_long_directory_1: _alias: d1 my_sub_directory_1: _alias: ...
0
0
0
ac9f73c642523112474bd5926f7d7437d66a04f6
318
py
Python
code/List/all_unique.py
jumploop/30-seconds-of-python
bfcc5a35d9bd0bba67e81de5715dba21e1ba43be
[ "CC0-1.0" ]
null
null
null
code/List/all_unique.py
jumploop/30-seconds-of-python
bfcc5a35d9bd0bba67e81de5715dba21e1ba43be
[ "CC0-1.0" ]
null
null
null
code/List/all_unique.py
jumploop/30-seconds-of-python
bfcc5a35d9bd0bba67e81de5715dba21e1ba43be
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ 功能实现:检查列表中的所有值是否都是唯一的。 解读: 在给定的列表中使用set()来保持唯一的出现。 使用len()将唯一值的长度与原始列表进行比较。 """ # Examples x = [1, 2, 3, 4, 5, 6] y = [1, 2, 2, 3, 4, 5] print(all_unique(x)) print(all_unique(y)) # output: # True # False
12.72
36
0.610063
#!/usr/bin/env python # -*- coding: utf-8 -*- """ 功能实现:检查列表中的所有值是否都是唯一的。 解读: 在给定的列表中使用set()来保持唯一的出现。 使用len()将唯一值的长度与原始列表进行比较。 """ def all_unique(lst): return len(lst) == len(set(lst)) # Examples x = [1, 2, 3, 4, 5, 6] y = [1, 2, 2, 3, 4, 5] print(all_unique(x)) print(all_unique(y)) # output: # True # False
36
0
23
3a42abb5968dc7ddee6b6d6d527b50ae9dad8f7d
92
py
Python
output/models/ms_data/regex/specials_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/ms_data/regex/specials_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/ms_data/regex/specials_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.ms_data.regex.specials_xsd.specials import Doc __all__ = [ "Doc", ]
15.333333
65
0.728261
from output.models.ms_data.regex.specials_xsd.specials import Doc __all__ = [ "Doc", ]
0
0
0
a9574398a0f9ac6f8bf6506334a684f1b1d58870
927
py
Python
taiga/files/celery.py
tcpcloud/salt-formula-taiga
eb6fd3e438f830bb69adc24efe10ebd21e7d4e1e
[ "Apache-2.0" ]
2
2017-08-21T23:29:20.000Z
2018-02-28T12:06:09.000Z
taiga/files/celery.py
tcpcloud/salt-formula-taiga
eb6fd3e438f830bb69adc24efe10ebd21e7d4e1e
[ "Apache-2.0" ]
2
2018-02-28T21:34:12.000Z
2018-03-05T13:53:17.000Z
taiga/files/celery.py
tcpcloud/salt-formula-taiga
eb6fd3e438f830bb69adc24efe10ebd21e7d4e1e
[ "Apache-2.0" ]
4
2017-05-29T08:52:57.000Z
2020-06-30T23:52:48.000Z
{%- from "taiga/map.jinja" import server with context -%} # -*- coding: utf-8 -*- from kombu import Queue broker_url = 'amqp{% if server.message_queue.get('ssl', False) %}s{% endif %}://{{ server.message_queue.user }}:{{ server.message_queue.password }}@{{ server.message_queue.host }}:{{ server.message_queue.get('por...
34.333333
277
0.695793
{%- from "taiga/map.jinja" import server with context -%} # -*- coding: utf-8 -*- from kombu import Queue broker_url = 'amqp{% if server.message_queue.get('ssl', False) %}s{% endif %}://{{ server.message_queue.user }}:{{ server.message_queue.password }}@{{ server.message_queue.host }}:{{ server.message_queue.get('por...
0
0
0
07957b053e02713a96c02e7f857f5413a35e652a
5,776
py
Python
The container /Robotic Arm/craves.ai-master/unreal/virtual_db/vdb.py
ReEn-Neom/ReEn.Neom-source-code-
11ec834d5eac5a5a63c71f6b41107769dafc591c
[ "MIT" ]
null
null
null
The container /Robotic Arm/craves.ai-master/unreal/virtual_db/vdb.py
ReEn-Neom/ReEn.Neom-source-code-
11ec834d5eac5a5a63c71f6b41107769dafc591c
[ "MIT" ]
null
null
null
The container /Robotic Arm/craves.ai-master/unreal/virtual_db/vdb.py
ReEn-Neom/ReEn.Neom-source-code-
11ec834d5eac5a5a63c71f6b41107769dafc591c
[ "MIT" ]
null
null
null
import glob, os, json import logging import numpy as np logger = logging.Logger("vdb") def seg2bb(obj_mask): ''' Convert binary seg mask of object to bouding box, (x0, y0, x1, y1) format ''' y, x = np.where(obj_mask == True) bb = [x.min(), x.max(), y.min(), y.max()] return bb def get_obj_mask(seg_im...
40.391608
139
0.571676
import glob, os, json import logging import numpy as np logger = logging.Logger("vdb") class Dataset: def __init__(self, db_root_dir): self.db_root_dir = db_root_dir pass def get_ids(self): ''' Get frame ids of this dataset ''' filenames = glob.glob(os.path.join(self.db_root_d...
687
4,346
23
cb9495c8b2d34d527e8e56500e484dc76cd595ea
15,092
py
Python
sample_code/stockdatawork.py
yunfeiz/py_learnt
d4134d8e9f1caed2db2848f19474c15c1b36557e
[ "Apache-2.0" ]
null
null
null
sample_code/stockdatawork.py
yunfeiz/py_learnt
d4134d8e9f1caed2db2848f19474c15c1b36557e
[ "Apache-2.0" ]
null
null
null
sample_code/stockdatawork.py
yunfeiz/py_learnt
d4134d8e9f1caed2db2848f19474c15c1b36557e
[ "Apache-2.0" ]
null
null
null
import tushare as ts import matplotlib.pyplot as plt import matplotlib.finance as mpf from matplotlib.pylab import date2num import datetime import time import os import pandas as pd import sys from multiprocessing.dummy import Pool as ThreadPool stockBasicInfo=None myG={} workingStock=[] blackList=["000033"] lastTrad...
27.291139
182
0.601378
import tushare as ts import matplotlib.pyplot as plt import matplotlib.finance as mpf from matplotlib.pylab import date2num import datetime import time import os import pandas as pd import sys from multiprocessing.dummy import Pool as ThreadPool stockBasicInfo=None myG={} workingStock=[] blackList=["000033"] lastTrad...
13,133
0
766
9000070b2550faa1d17f57c00a6b8e20ec634906
8,214
py
Python
Source/cameras/cameras.py
Neseebits/SpaceGrantMachineVision
451244e05354abd8c866b6560b105b62c404896e
[ "MIT" ]
1
2022-02-09T05:16:10.000Z
2022-02-09T05:16:10.000Z
Source/cameras/cameras.py
Neseebits/SpaceGrantMachineVision
451244e05354abd8c866b6560b105b62c404896e
[ "MIT" ]
null
null
null
Source/cameras/cameras.py
Neseebits/SpaceGrantMachineVision
451244e05354abd8c866b6560b105b62c404896e
[ "MIT" ]
null
null
null
# Built in python libs import os import time # Additional libs import numpy as np import cv2 from numba import jit # Custom imports try: from logger.logger import Logger import utilities.exceptions from cameras.CaptureManager import CaptureManager, createCaptureSourceData from cameras.DisplayManager ...
45.381215
145
0.72206
# Built in python libs import os import time # Additional libs import numpy as np import cv2 from numba import jit # Custom imports try: from logger.logger import Logger import utilities.exceptions from cameras.CaptureManager import CaptureManager, createCaptureSourceData from cameras.DisplayManager ...
2,990
0
176
b036ee264b290d8dd805f85d1df215108041b1b3
520
py
Python
src/retrowrapper.py
CrazyBene/EvolutionaryStrategy
09f63ad64a5ef0c542c6c1a7c1b60c55a64a69f6
[ "MIT" ]
10
2019-03-11T07:46:50.000Z
2021-05-18T10:10:12.000Z
src/retrowrapper.py
CrazyBene/EvolutionaryStrategy
09f63ad64a5ef0c542c6c1a7c1b60c55a64a69f6
[ "MIT" ]
null
null
null
src/retrowrapper.py
CrazyBene/EvolutionaryStrategy
09f63ad64a5ef0c542c6c1a7c1b60c55a64a69f6
[ "MIT" ]
2
2020-04-04T16:37:32.000Z
2021-05-16T09:34:24.000Z
import retro
22.608696
55
0.584615
import retro class RetroWrapper: def __init__(self, game, state): self.env = retro.make(game, state) def reset(self): obs = self.env.reset() return obs def step(self, action): obs, reward, done, info = self.env.step(action) sumReward = reward obs, reward, ...
352
-2
158
36b455555d1c07279dee83299eb1c998003e175e
5,453
py
Python
tests/src/Diksha_Reports/usage_by_textbook/check_course_type_content_play_counts.py
JalajaTR/cQube
6bf58ab25f0c36709630987ab730bbd5d9192c03
[ "MIT" ]
null
null
null
tests/src/Diksha_Reports/usage_by_textbook/check_course_type_content_play_counts.py
JalajaTR/cQube
6bf58ab25f0c36709630987ab730bbd5d9192c03
[ "MIT" ]
null
null
null
tests/src/Diksha_Reports/usage_by_textbook/check_course_type_content_play_counts.py
JalajaTR/cQube
6bf58ab25f0c36709630987ab730bbd5d9192c03
[ "MIT" ]
null
null
null
import csv import os import re import time from selenium.webdriver.support.select import Select from Data.parameters import Data from filenames import file_extention from get_dir import pwd from reuse_func import GetData
44.696721
122
0.578764
import csv import os import re import time from selenium.webdriver.support.select import Select from Data.parameters import Data from filenames import file_extention from get_dir import pwd from reuse_func import GetData class test_course_based_on_timeperiods(): def __init__(self,driver): self.driver = ...
5,079
20
130
10bef9b5a34167ab75d179d166d27707e36a3c8a
435
py
Python
desafios/desafio 033a.py
juaoantonio/curso_video_python
7520223d8647929530a1cd96f7c7d8c8f264ba1e
[ "MIT" ]
null
null
null
desafios/desafio 033a.py
juaoantonio/curso_video_python
7520223d8647929530a1cd96f7c7d8c8f264ba1e
[ "MIT" ]
null
null
null
desafios/desafio 033a.py
juaoantonio/curso_video_python
7520223d8647929530a1cd96f7c7d8c8f264ba1e
[ "MIT" ]
null
null
null
num1 = float(input('Digite o primeiro número: ')) num2 = float(input('Digite o segundo: ')) num3 = float(input('Digite o terceiro: ')) # Para descobrir qual o maior: maior = num1 if num2 > maior: maior = num2 if num3 > maior: maior = num3 print(f'O maior número é {maior}') # Para descobrir qual o menor: meno...
19.772727
49
0.655172
num1 = float(input('Digite o primeiro número: ')) num2 = float(input('Digite o segundo: ')) num3 = float(input('Digite o terceiro: ')) # Para descobrir qual o maior: maior = num1 if num2 > maior: maior = num2 if num3 > maior: maior = num3 print(f'O maior número é {maior}') # Para descobrir qual o menor: meno...
0
0
0
1d2e3d2efff8dbcfc5dbf7a2395c42c519c52312
1,487
py
Python
7/Lab7.py
aravindsuresh98/ML_LAB
2dbd8075a2119c02ce31de4325763058e41b592c
[ "MIT" ]
3
2018-12-26T18:03:56.000Z
2019-08-28T09:09:02.000Z
7/Lab7.py
aravindsuresh98/ML_LAB
2dbd8075a2119c02ce31de4325763058e41b592c
[ "MIT" ]
null
null
null
7/Lab7.py
aravindsuresh98/ML_LAB
2dbd8075a2119c02ce31de4325763058e41b592c
[ "MIT" ]
2
2018-12-09T17:40:12.000Z
2019-10-01T04:08:10.000Z
""" Write a program to construct aBayesian network considering medical data. Use this model to demonstrate the diagnosis of heart patients using standard Heart Disease Data Set. You can use Java/Python ML library classes/API. """ import numpy as np import pandas as pd import csv from pgmpy.estimators import Maximu...
33.795455
222
0.752522
""" Write a program to construct aBayesian network considering medical data. Use this model to demonstrate the diagnosis of heart patients using standard Heart Disease Data Set. You can use Java/Python ML library classes/API. """ import numpy as np import pandas as pd import csv from pgmpy.estimators import Maximu...
0
0
0
3d200ae33250c404db7e4e3699ca0722880f653b
2,310
py
Python
opencv.py
Kratos-is-here/Sign-Language-Recognition-CNNs
4b7f4d726d111b80ca299c4ee0d6cb0cc9fe7a45
[ "MIT" ]
26
2020-07-22T09:55:51.000Z
2022-03-31T14:36:10.000Z
opencv.py
Kratos-is-here/Sign-Language-Recognition-CNNs
4b7f4d726d111b80ca299c4ee0d6cb0cc9fe7a45
[ "MIT" ]
1
2019-03-04T13:00:56.000Z
2019-03-09T14:17:50.000Z
opencv.py
Kratos-is-here/Sign-Language-Recognition-CNNs
4b7f4d726d111b80ca299c4ee0d6cb0cc9fe7a45
[ "MIT" ]
23
2019-03-17T21:00:19.000Z
2020-05-18T07:04:34.000Z
import cv2 import numpy as np from keras.models import load_model from skimage.transform import resize, pyramid_reduce model = load_model('model.h5') while True: cam_capture = cv2.VideoCapture(0) _, image_frame = cam_capture.read() # Select ROI im2 = crop_image(image_frame, 300,300,300,300) ...
25.955056
106
0.662338
import cv2 import numpy as np from keras.models import load_model from skimage.transform import resize, pyramid_reduce model = load_model('model.h5') def get_square(image, square_size): height, width = image.shape if(height > width): differ = height else: differ = width differ += ...
1,063
0
92
fbad7ab50f7c085f8d3fdacc6e39664949cd6fcb
2,116
py
Python
portfolio/Python/scrapy/naturebest/simplysupplements.py
0--key/lib
ba7a85dda2b208adc290508ca617bdc55a5ded22
[ "Apache-2.0" ]
null
null
null
portfolio/Python/scrapy/naturebest/simplysupplements.py
0--key/lib
ba7a85dda2b208adc290508ca617bdc55a5ded22
[ "Apache-2.0" ]
null
null
null
portfolio/Python/scrapy/naturebest/simplysupplements.py
0--key/lib
ba7a85dda2b208adc290508ca617bdc55a5ded22
[ "Apache-2.0" ]
5
2016-03-22T07:40:46.000Z
2021-05-30T16:12:21.000Z
import re import os from scrapy.spider import BaseSpider from scrapy.selector import HtmlXPathSelector from scrapy.http import Request, HtmlResponse from scrapy.utils.response import get_base_url from scrapy.utils.url import urljoin_rfc from urllib import urlencode import hashlib import csv from product_spiders.item...
36.482759
80
0.634216
import re import os from scrapy.spider import BaseSpider from scrapy.selector import HtmlXPathSelector from scrapy.http import Request, HtmlResponse from scrapy.utils.response import get_base_url from scrapy.utils.url import urljoin_rfc from urllib import urlencode import hashlib import csv from product_spiders.item...
1,350
258
23
d937604fb4e91713fdba8f2d3d4c28da67b01bd2
18,801
py
Python
playshop.py
Aurangazeeb/ai_gambler
ce4282bba76b1c6de37ad6521be89215c6ca3a5e
[ "MIT" ]
null
null
null
playshop.py
Aurangazeeb/ai_gambler
ce4282bba76b1c6de37ad6521be89215c6ca3a5e
[ "MIT" ]
null
null
null
playshop.py
Aurangazeeb/ai_gambler
ce4282bba76b1c6de37ad6521be89215c6ca3a5e
[ "MIT" ]
null
null
null
import tensorflow as tf from tensorflow.keras.layers import LSTM, Dense from tensorflow.keras.models import Sequential from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions f...
41.050218
125
0.591139
import tensorflow as tf from tensorflow.keras.layers import LSTM, Dense from tensorflow.keras.models import Sequential from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions f...
13,699
4,256
23
3766756ce033a36b9287ee8b5c6f0003b06a8c12
170
py
Python
matchzoo/utils/__init__.py
MDoid10111/EMNLP2020
97e4da06abc72873a4830cfa53c035a27eb3975b
[ "MIT" ]
42
2020-10-13T19:47:37.000Z
2022-03-26T09:56:46.000Z
matchzoo/utils/__init__.py
MDoid10111/EMNLP2020
97e4da06abc72873a4830cfa53c035a27eb3975b
[ "MIT" ]
3
2020-01-29T16:37:50.000Z
2022-02-04T12:01:51.000Z
matchzoo/utils/__init__.py
MDoid10111/EMNLP2020
97e4da06abc72873a4830cfa53c035a27eb3975b
[ "MIT" ]
5
2020-11-30T14:48:44.000Z
2022-02-19T17:18:21.000Z
from .one_hot import one_hot from .get_file import get_file from .tensor_type import TensorType from .list_recursive_subclasses import list_recursive_concrete_subclasses
34
73
0.882353
from .one_hot import one_hot from .get_file import get_file from .tensor_type import TensorType from .list_recursive_subclasses import list_recursive_concrete_subclasses
0
0
0
ff2925af782214b7663348906512006641492f76
4,663
py
Python
players/GnuPlayer.py
tatemunnich/Backgammon
7a8ff4b80b419415230c89bb0af94304f095ae76
[ "MIT" ]
null
null
null
players/GnuPlayer.py
tatemunnich/Backgammon
7a8ff4b80b419415230c89bb0af94304f095ae76
[ "MIT" ]
null
null
null
players/GnuPlayer.py
tatemunnich/Backgammon
7a8ff4b80b419415230c89bb0af94304f095ae76
[ "MIT" ]
null
null
null
import re from subprocess import Popen, PIPE from board.Board import BLACK, NONE, getOtherColor, getPieceSymbol, WHITE, getDirection, Board from move.Move import MoveNode from move.MovementFactory import generate_moves from players.Player import Player
34.036496
127
0.611195
import re from subprocess import Popen, PIPE from board.Board import BLACK, NONE, getOtherColor, getPieceSymbol, WHITE, getDirection, Board from move.Move import MoveNode from move.MovementFactory import generate_moves from players.Player import Player class GnuPlayer(Player): def __init__(self, color): s...
4,255
3
149
0c16d56ca458115c2cc33d34e677bdd46dc3ff7f
638
py
Python
codeforces_api.py
belkka/codeforces-command-line-tool
7882159cd5b7719ad747d3fa3bb5747899a93356
[ "MIT" ]
null
null
null
codeforces_api.py
belkka/codeforces-command-line-tool
7882159cd5b7719ad747d3fa3bb5747899a93356
[ "MIT" ]
null
null
null
codeforces_api.py
belkka/codeforces-command-line-tool
7882159cd5b7719ad747d3fa3bb5747899a93356
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import requests BASE_URL = 'http://codeforces.com/api/' contest_standings = method('contest.standings') user_info = method('user.info')
23.62963
73
0.601881
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import requests BASE_URL = 'http://codeforces.com/api/' def method(name): def cf_api_method(**kwargs): headers = { 'Accept-Language': 'ru,en;q=0.9' } r = requests.get(BASE_URL + name, params=kwargs, headers=headers) r.raise_for_status() ...
427
0
23
aed730d21c0dbd6241b25e15d565858ffbdcb8b8
8,238
py
Python
ModularER_2D/Encodings/Network_Encoding.py
FrankVeenstra/gym_rem2D
ea295e6398054c023c88df88d9c70f5486061207
[ "MIT" ]
27
2020-07-15T10:43:02.000Z
2021-04-15T15:01:12.000Z
ModularER_2D/Encodings/Network_Encoding.py
FrankVeenstra/gym_rem2D
ea295e6398054c023c88df88d9c70f5486061207
[ "MIT" ]
3
2021-06-08T22:44:19.000Z
2021-09-15T08:50:44.000Z
ModularER_2D/Encodings/Network_Encoding.py
FrankVeenstra/gym_rem2D
ea295e6398054c023c88df88d9c70f5486061207
[ "MIT" ]
6
2020-07-22T01:25:49.000Z
2021-09-21T12:07:31.000Z
""" This encoding is an interface between neural networks and the robot blueprint It is used to create a 'tree' structure that is interpreted as a robot. """ import numpy as np import copy import random from Encodings import abstract_encoding as enc import Tree as tree_structure from NeuralNetwork import NEAT_NN fro...
36.776786
155
0.721413
""" This encoding is an interface between neural networks and the robot blueprint It is used to create a 'tree' structure that is interpreted as a robot. """ import numpy as np import copy import random from Encodings import abstract_encoding as enc import Tree as tree_structure from NeuralNetwork import NEAT_NN fro...
5,497
16
187
c5b3b4160db42472260a053d6fa5098fe5dd5e7d
2,029
py
Python
sparrow_cloud/message_service/sender.py
ArcturusMensk/sparrow_cloud
0ae75716de23b97366c2e2ac6c08e9850291c95d
[ "MIT" ]
null
null
null
sparrow_cloud/message_service/sender.py
ArcturusMensk/sparrow_cloud
0ae75716de23b97366c2e2ac6c08e9850291c95d
[ "MIT" ]
null
null
null
sparrow_cloud/message_service/sender.py
ArcturusMensk/sparrow_cloud
0ae75716de23b97366c2e2ac6c08e9850291c95d
[ "MIT" ]
null
null
null
from django.conf import settings from .sender_controller import TaskSender from sparrow_cloud.registry.service_discovery import consul_service from sparrow_cloud.restclient.exception import HTTPException from functools import lru_cache import time # # @lru_cache(maxsize=None) # def get_tasks_sender_object(message_back...
32.206349
83
0.622474
from django.conf import settings from .sender_controller import TaskSender from sparrow_cloud.registry.service_discovery import consul_service from sparrow_cloud.restclient.exception import HTTPException from functools import lru_cache import time # # @lru_cache(maxsize=None) # def get_tasks_sender_object(message_back...
0
0
0
71a12dda1e6b4be8bc190b978385d5bf130b11eb
32,955
py
Python
pyloxi/loxi/of14/port_desc_prop.py
floodlight/loxigen-artifacts
1822ec984cb6da342bbaa381677071cbbe53cee6
[ "Apache-2.0" ]
1
2017-06-01T09:41:07.000Z
2017-06-01T09:41:07.000Z
pyloxi/loxi/of14/port_desc_prop.py
floodlight/loxigen-artifacts
1822ec984cb6da342bbaa381677071cbbe53cee6
[ "Apache-2.0" ]
2
2017-07-03T08:50:56.000Z
2018-03-12T16:16:19.000Z
pyloxi/loxi/of14/port_desc_prop.py
floodlight/loxigen-artifacts
1822ec984cb6da342bbaa381677071cbbe53cee6
[ "Apache-2.0" ]
20
2015-02-16T15:23:04.000Z
2022-03-15T20:06:10.000Z
# Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University # Copyright (c) 2011, 2012 Open Networking Foundation # Copyright (c) 2012, 2013 Big Switch Networks, Inc. # See the file LICENSE.pyloxi which should have been included in the source distribution # Automatically generated by LOXI from ...
33.593272
213
0.557123
# Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University # Copyright (c) 2011, 2012 Open Networking Foundation # Copyright (c) 2012, 2013 Big Switch Networks, Inc. # See the file LICENSE.pyloxi which should have been included in the source distribution # Automatically generated by LOXI from ...
28,680
2,972
322
56fa38dc8515c579b448dbab443928f46c9f1b58
1,861
py
Python
classes/Controller/Controller.py
danielmoore-info/IpCleaner
9caee1a6b12bb0ea2b2db78a4a04fdb3fcea4791
[ "Unlicense" ]
null
null
null
classes/Controller/Controller.py
danielmoore-info/IpCleaner
9caee1a6b12bb0ea2b2db78a4a04fdb3fcea4791
[ "Unlicense" ]
null
null
null
classes/Controller/Controller.py
danielmoore-info/IpCleaner
9caee1a6b12bb0ea2b2db78a4a04fdb3fcea4791
[ "Unlicense" ]
null
null
null
from classes.IP.IPGrepr import IPGrepr from classes.IP.utils import handle_mask_or_no_mask
29.539683
63
0.48576
from classes.IP.IPGrepr import IPGrepr from classes.IP.utils import handle_mask_or_no_mask class Controller(): def __init__(self, arguments, output): self.args = arguments self.output = output self.banner() if self.args.input: input_file_name=self.args.input ...
1,696
-2
76
975822ef99828677846ed604310f8a03f9902b3c
11,061
py
Python
appearance_optimization/train_sim_corners.py
hietalajulius/clothmanip
ec2ee1177d5cf31ee2367c2576c34b9cf3691501
[ "MIT" ]
null
null
null
appearance_optimization/train_sim_corners.py
hietalajulius/clothmanip
ec2ee1177d5cf31ee2367c2576c34b9cf3691501
[ "MIT" ]
null
null
null
appearance_optimization/train_sim_corners.py
hietalajulius/clothmanip
ec2ee1177d5cf31ee2367c2576c34b9cf3691501
[ "MIT" ]
null
null
null
from rlkit.torch.sac.policies import ScriptPolicy import argparse import json import torch from torch.utils.data import Dataset, DataLoader import os import pandas as pd import numpy as np from collections import deque import cv2 import albumentations as A import copy from clothmanip.envs.template_renderer import Templ...
40.076087
144
0.596962
from rlkit.torch.sac.policies import ScriptPolicy import argparse import json import torch from torch.utils.data import Dataset, DataLoader import os import pandas as pd import numpy as np from collections import deque import cv2 import albumentations as A import copy from clothmanip.envs.template_renderer import Templ...
10,065
16
252
77fec9c48291d0fcce36ad25599e588513744ea2
578
py
Python
python/code_advent/year_2015/day_04.py
fdm1/advent_of_code
a1e91d847fd8fd9f6b2f48333203729b9d64fd80
[ "MIT" ]
null
null
null
python/code_advent/year_2015/day_04.py
fdm1/advent_of_code
a1e91d847fd8fd9f6b2f48333203729b9d64fd80
[ "MIT" ]
null
null
null
python/code_advent/year_2015/day_04.py
fdm1/advent_of_code
a1e91d847fd8fd9f6b2f48333203729b9d64fd80
[ "MIT" ]
1
2018-12-02T20:30:23.000Z
2018-12-02T20:30:23.000Z
""" http://adventofcode.com/2015/day/4 """ from hashlib import md5 # pylint: disable=inconsistent-return-statements def validate_hash(input_str, num_zeros): """Check if hex md5 starts with '00000'""" if md5(input_str.encode('utf-8')).hexdigest().startswith('0'*num_zeros): return input_str def find_m...
30.421053
76
0.679931
""" http://adventofcode.com/2015/day/4 """ from hashlib import md5 # pylint: disable=inconsistent-return-statements def validate_hash(input_str, num_zeros): """Check if hex md5 starts with '00000'""" if md5(input_str.encode('utf-8')).hexdigest().startswith('0'*num_zeros): return input_str def find_m...
0
0
0
9973662f2cb4fd8887a75d26b419199453b1321b
4,497
py
Python
MT.py
makar-pelogeiko/prime_numbers
2e3b42d792f47dd3c61b5aca6be885942b305714
[ "Apache-2.0" ]
null
null
null
MT.py
makar-pelogeiko/prime_numbers
2e3b42d792f47dd3c61b5aca6be885942b305714
[ "Apache-2.0" ]
null
null
null
MT.py
makar-pelogeiko/prime_numbers
2e3b42d792f47dd3c61b5aca6be885942b305714
[ "Apache-2.0" ]
null
null
null
from DoubleLinkedList import DLinkedList as dList class Mt: """ :raise Exception("BAD DELTA ELEMENT") """ @classmethod def from_text(cls, text: str): """ :raise Exception("BAD DELTA ELEMENT") """ obj = cls() lines = text.splitlines() flag = 'alphabe...
28.826923
95
0.479653
from DoubleLinkedList import DLinkedList as dList class Mt: """ :raise Exception("BAD DELTA ELEMENT") """ def __init__(self): self.alphabet = set() self.alphabet_spec = set() self.memory_step = {'>', '<', '.'} self.states = set() self.start_state = None ...
2,364
0
107
2748d48d24b53792d2e6016abf84bed1b3c6d82c
7,227
py
Python
scores/database.py
zesk06/scores
b1142d9630fcf6b5a969847ff4ef6856e08652ce
[ "MIT" ]
null
null
null
scores/database.py
zesk06/scores
b1142d9630fcf6b5a969847ff4ef6856e08652ce
[ "MIT" ]
null
null
null
scores/database.py
zesk06/scores
b1142d9630fcf6b5a969847ff4ef6856e08652ce
[ "MIT" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 """ The database connection management """ from __future__ import print_function import datetime import json import logging import os import re import subprocess import tempfile from mongokit import Connection from .common import hash_password from .play import Play, PlayMigr...
33.613953
78
0.582399
#!/usr/bin/env python # encoding: utf-8 """ The database connection management """ from __future__ import print_function import datetime import json import logging import os import re import subprocess import tempfile from mongokit import Connection from .common import hash_password from .play import Play, PlayMigr...
0
0
0
e9102a8268a2e5e84716a2aec2f62999bc435176
3,311
py
Python
Engine.py
code-geek/pybaghchal
7f260c318ebbb9181dd1bff0ae4c469dd2a07457
[ "MIT" ]
4
2018-09-25T00:18:40.000Z
2020-12-22T14:44:10.000Z
Engine.py
Suraj1127/pybaghchal
9a611e0c91264d8b2a1797e40fc6109fd1957b75
[ "MIT" ]
3
2018-09-23T10:42:43.000Z
2018-09-26T02:55:03.000Z
Engine.py
Suraj1127/pybaghchal
9a611e0c91264d8b2a1797e40fc6109fd1957b75
[ "MIT" ]
3
2018-08-25T09:32:11.000Z
2020-12-26T11:06:42.000Z
from Board import Board class Engine(object): """ Takes a board position and returns the best move """ INF = 1000000 def evaluate(self, depth=0): """ Returns a numeric evaluation of the position Written from the perspective of Tiger """ winner = self.board...
28.791304
82
0.530051
from Board import Board class Engine(object): """ Takes a board position and returns the best move """ INF = 1000000 def __init__(self, board, depth=5): super(Engine, self).__init__() self.board = board self.depth = depth self.best_move = None def evaluate(se...
2,511
0
162
15ed83d04674561587a56bf1fdc574c07867e3de
1,481
py
Python
catkin_ws/src:/opt/ros/kinetic/lib/python2.7/dist-packages:/home/bala/duckietown/catkin_ws/src:/home/bala/duckietown/catkin_ws/src/lib/python2.7/site-packages/geometry/manifolds/euclidean.py
johnson880319/Software
045894227f359e0a3a3ec5b7a53f8d1ebc06acdd
[ "CC-BY-2.0" ]
null
null
null
catkin_ws/src:/opt/ros/kinetic/lib/python2.7/dist-packages:/home/bala/duckietown/catkin_ws/src:/home/bala/duckietown/catkin_ws/src/lib/python2.7/site-packages/geometry/manifolds/euclidean.py
johnson880319/Software
045894227f359e0a3a3ec5b7a53f8d1ebc06acdd
[ "CC-BY-2.0" ]
null
null
null
catkin_ws/src:/opt/ros/kinetic/lib/python2.7/dist-packages:/home/bala/duckietown/catkin_ws/src:/home/bala/duckietown/catkin_ws/src/lib/python2.7/site-packages/geometry/manifolds/euclidean.py
johnson880319/Software
045894227f359e0a3a3ec5b7a53f8d1ebc06acdd
[ "CC-BY-2.0" ]
null
null
null
# coding=utf-8 from contracts import contract from geometry.utils import assert_allclose import numpy as np from .matrix_linear_space import MatrixLinearSpace __all__ = ['Euclidean', 'R', 'R1', 'R2', 'R3'] class Euclidean(MatrixLinearSpace): ''' This is the usual Euclidean space of finite dimension; ...
25.534483
68
0.636057
# coding=utf-8 from contracts import contract from geometry.utils import assert_allclose import numpy as np from .matrix_linear_space import MatrixLinearSpace __all__ = ['Euclidean', 'R', 'R1', 'R2', 'R3'] class Euclidean(MatrixLinearSpace): ''' This is the usual Euclidean space of finite dimension; ...
583
0
214
e6b656f7e2f5daf8de206906f2a56c825acac06a
967
py
Python
foodshering/mainapp/urls.py
malfin/silvehanger
c71a936a0c59c5a6fb909861cf2197b72782642d
[ "Apache-2.0" ]
null
null
null
foodshering/mainapp/urls.py
malfin/silvehanger
c71a936a0c59c5a6fb909861cf2197b72782642d
[ "Apache-2.0" ]
null
null
null
foodshering/mainapp/urls.py
malfin/silvehanger
c71a936a0c59c5a6fb909861cf2197b72782642d
[ "Apache-2.0" ]
null
null
null
from django.urls import path import mainapp.views as mainapp app_name = 'mainapp' urlpatterns = [ path('', mainapp.index, name='index'), path('cabinet/', mainapp.cabinet, name='cabinet'), path('cabinet/profile/', mainapp.profile, name='profile'), path('cabinet/profile/edit/', mainapp.edit_profile, ...
37.192308
99
0.706308
from django.urls import path import mainapp.views as mainapp app_name = 'mainapp' urlpatterns = [ path('', mainapp.index, name='index'), path('cabinet/', mainapp.cabinet, name='cabinet'), path('cabinet/profile/', mainapp.profile, name='profile'), path('cabinet/profile/edit/', mainapp.edit_profile, ...
0
0
0
893cab2c61ac550985eb0e17a32ce132b5022cd3
3,401
py
Python
code/blackjack_doc.py
garyjames/building-skills-oo-design-book
e4deecfbef871983e9993ad4128ef1112ac0954a
[ "MIT" ]
32
2019-11-02T20:05:47.000Z
2022-03-24T21:34:56.000Z
code/blackjack_doc.py
garyjames/building-skills-oo-design-book
e4deecfbef871983e9993ad4128ef1112ac0954a
[ "MIT" ]
5
2019-11-01T23:01:41.000Z
2021-12-10T13:16:17.000Z
code/blackjack_doc.py
garyjames/building-skills-oo-design-book
e4deecfbef871983e9993ad4128ef1112ac0954a
[ "MIT" ]
12
2019-11-05T04:04:30.000Z
2021-12-10T12:59:22.000Z
#!/usr/bin/env python3 """ Building Skills in Object-Oriented Design V4 The blackjack module includes the Suit class and Card class hierarchy. :author: S. Lott :license: http://creativecommons.org/licenses/by-nc-nd/3.0/us/ """ from typing import Any import enum class Suit(enum.Enum): """Enumerated suit names an...
26.364341
83
0.580712
#!/usr/bin/env python3 """ Building Skills in Object-Oriented Design V4 The blackjack module includes the Suit class and Card class hierarchy. :author: S. Lott :license: http://creativecommons.org/licenses/by-nc-nd/3.0/us/ """ from typing import Any import enum class Suit(enum.Enum): """Enumerated suit names an...
164
0
81
431ed5c4f7cfe1dec9f3003f9bf4c54d46e15e68
14,347
py
Python
kerrlib.py
XanaduAI/kerr-squeezing
633db9d39f0943d8a8b7431c8d87a9d1147ba32d
[ "Apache-2.0" ]
1
2021-01-13T02:02:43.000Z
2021-01-13T02:02:43.000Z
kerrlib.py
XanaduAI/kerr-squeezing
633db9d39f0943d8a8b7431c8d87a9d1147ba32d
[ "Apache-2.0" ]
null
null
null
kerrlib.py
XanaduAI/kerr-squeezing
633db9d39f0943d8a8b7431c8d87a9d1147ba32d
[ "Apache-2.0" ]
5
2020-02-27T00:58:05.000Z
2022-02-10T15:10:19.000Z
# Copyright 2019 Xanadu Quantum Technologies Inc. # 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 agre...
34.159524
100
0.596989
# Copyright 2019 Xanadu Quantum Technologies Inc. # 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 agre...
0
0
0
16cc86fad7a7172c7c782122f5ad65bb2e4e6377
1,226
py
Python
Python/counting_and_celebrating_fizzbuzz.py
RDxR10/Hacktoberfest-2020-FizzBuzz
c9a8e3a0ac1ff9886c013a6b5628b7f64eb0d342
[ "Unlicense" ]
80
2020-10-01T00:32:34.000Z
2021-01-08T21:56:09.000Z
Python/counting_and_celebrating_fizzbuzz.py
RDxR10/Hacktoberfest-2020-FizzBuzz
c9a8e3a0ac1ff9886c013a6b5628b7f64eb0d342
[ "Unlicense" ]
672
2020-09-30T22:53:47.000Z
2020-11-01T12:39:59.000Z
Python/counting_and_celebrating_fizzbuzz.py
RDxR10/Hacktoberfest-2020-FizzBuzz
c9a8e3a0ac1ff9886c013a6b5628b7f64eb0d342
[ "Unlicense" ]
618
2020-09-30T22:21:12.000Z
2020-10-31T21:28:06.000Z
# This solution counts how many times the words "fizz" and "buzz" appear in a range provided by the user # The input has to be a valid positive integer # The current count of the word is shown each time the word appears, and a random expression for FizzBuzz # Author: @moisesjsalmeida import random fizz = 0 buzz = 0 ...
24.039216
105
0.576672
# This solution counts how many times the words "fizz" and "buzz" appear in a range provided by the user # The input has to be a valid positive integer # The current count of the word is shown each time the word appears, and a random expression for FizzBuzz # Author: @moisesjsalmeida import random fizz = 0 buzz = 0 ...
0
0
0
22c9b3edccaf1b55549a0d75ac9ddb40a856d3e2
5,449
pyw
Python
examples/ctrltestjson/gui/gui.pyw
MrLeeh/pidctrl
2e09eeb3fc5cf5cd72c69bf208c44b86e8d3f729
[ "MIT" ]
1
2018-03-04T06:13:49.000Z
2018-03-04T06:13:49.000Z
examples/ctrltestjson/gui/gui.pyw
MrLeeh/pidctrl
2e09eeb3fc5cf5cd72c69bf208c44b86e8d3f729
[ "MIT" ]
null
null
null
examples/ctrltestjson/gui/gui.pyw
MrLeeh/pidctrl
2e09eeb3fc5cf5cd72c69bf208c44b86e8d3f729
[ "MIT" ]
1
2018-07-17T11:58:59.000Z
2018-07-17T11:58:59.000Z
#! python3 import sys import json import serial from PyQt5.QtWidgets import QApplication, QWidget, QLabel, QSpinBox, \ QGridLayout, QPushButton, QGroupBox, QVBoxLayout from PyQt5.QtCore import QTimer COMPORT = "/dev/cu.usbmodemfd121" if __name__ == "__main__": app = QApplication(sys.argv) w = CtrlTest...
29.93956
70
0.591485
#! python3 import sys import json import serial from PyQt5.QtWidgets import QApplication, QWidget, QLabel, QSpinBox, \ QGridLayout, QPushButton, QGroupBox, QVBoxLayout from PyQt5.QtCore import QTimer COMPORT = "/dev/cu.usbmodemfd121" class MySpinBox(QSpinBox): def __init__(self, parent=None): super(...
4,849
11
234
d10c481606909bb2fa1e303b6d6b2e830bddf544
12,306
py
Python
tests/test_ts_dweepy.py
jeffskinnerbox/ts_dweepy
9b6de51e145979a61a9be295e91d70db199b61f4
[ "MIT" ]
null
null
null
tests/test_ts_dweepy.py
jeffskinnerbox/ts_dweepy
9b6de51e145979a61a9be295e91d70db199b61f4
[ "MIT" ]
null
null
null
tests/test_ts_dweepy.py
jeffskinnerbox/ts_dweepy
9b6de51e145979a61a9be295e91d70db199b61f4
[ "MIT" ]
null
null
null
"""A port of dweetio-client's (the official javascript one, to python) """ # stdlib imports import os import subprocess import unittest import uuid # local imports import ts_dweepy test_data = { 'hello': "world", 'somenum': 6816513845, } test_lock = os.environ.get('DWEET_LOCK') test_key = os.environ.get('DW...
34.470588
143
0.638388
"""A port of dweetio-client's (the official javascript one, to python) """ # stdlib imports import os import subprocess import unittest import uuid # local imports import ts_dweepy test_data = { 'hello': "world", 'somenum': 6816513845, } test_lock = os.environ.get('DWEET_LOCK') test_key = os.environ.get('DW...
2,302
9,296
230