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
aac10eb6d326bdbc253c6f3cad42157c69e270a7
6,230
py
Python
server/apps/project/worker/delete_project.py
iotile/iotile_cloud
9dc65ac86d3a730bba42108ed7d9bbb963d22ba6
[ "MIT" ]
null
null
null
server/apps/project/worker/delete_project.py
iotile/iotile_cloud
9dc65ac86d3a730bba42108ed7d9bbb963d22ba6
[ "MIT" ]
null
null
null
server/apps/project/worker/delete_project.py
iotile/iotile_cloud
9dc65ac86d3a730bba42108ed7d9bbb963d22ba6
[ "MIT" ]
null
null
null
import logging from django.conf import settings from django.contrib.auth import get_user_model from apps.emailutil.tasks import Email from apps.org.models import Org from apps.physicaldevice.models import Device from apps.project.models import Project from apps.sqsworker.action import Action from apps.sqsworker.excep...
40.986842
113
0.651846
import logging from django.conf import settings from django.contrib.auth import get_user_model from apps.emailutil.tasks import Email from apps.org.models import Org from apps.physicaldevice.models import Device from apps.project.models import Project from apps.sqsworker.action import Action from apps.sqsworker.excep...
4,496
0
161
e0fe037a8c2c0fdc1adafdbd73b20496ab18d7e1
3,935
py
Python
hyperion/clustering/ahc.py
jsalt2019-diadet/hyperion
14a11436d62f3c15cd9b1f70bcce3eafbea2f753
[ "Apache-2.0" ]
9
2019-09-22T05:19:59.000Z
2022-03-05T18:03:37.000Z
hyperion/clustering/ahc.py
jsalt2019-diadet/hyperion
14a11436d62f3c15cd9b1f70bcce3eafbea2f753
[ "Apache-2.0" ]
null
null
null
hyperion/clustering/ahc.py
jsalt2019-diadet/hyperion
14a11436d62f3c15cd9b1f70bcce3eafbea2f753
[ "Apache-2.0" ]
4
2019-10-10T06:34:05.000Z
2022-03-05T18:03:56.000Z
""" Copyright 2018 Johns Hopkins University (Author: Jesus Villalba) Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """ from __future__ import absolute_import from __future__ import print_function from __future__ import division from six.moves import xrange import numpy as np import h5py from copy import ...
32.520661
101
0.602033
""" Copyright 2018 Johns Hopkins University (Author: Jesus Villalba) Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """ from __future__ import absolute_import from __future__ import print_function from __future__ import division from six.moves import xrange import numpy as np import h5py from copy import ...
3,168
-1
232
bee16100c634fe267f2ab3c9fb80f756a28e69da
423
py
Python
snakefmt/__init__.py
je3we3/snakefmt
fbe584deade1049f756ce1c7258902dbcdca41a5
[ "MIT" ]
83
2020-04-14T14:50:50.000Z
2022-03-22T21:34:23.000Z
snakefmt/__init__.py
je3we3/snakefmt
fbe584deade1049f756ce1c7258902dbcdca41a5
[ "MIT" ]
118
2020-04-20T13:29:06.000Z
2022-03-25T07:14:17.000Z
snakefmt/__init__.py
je3we3/snakefmt
fbe584deade1049f756ce1c7258902dbcdca41a5
[ "MIT" ]
18
2020-04-19T22:27:00.000Z
2022-03-29T06:23:37.000Z
import sys """ Version has unique source in pyproject.toml. importlib fetches version from distribution metadata files (in dist-info or egg-info dirs). From Python 3.8, importlib_metadata is in standard library as importlib.metadata. """ if sys.version_info >= (3, 8): from importlib import metadata else: impor...
24.882353
81
0.775414
import sys """ Version has unique source in pyproject.toml. importlib fetches version from distribution metadata files (in dist-info or egg-info dirs). From Python 3.8, importlib_metadata is in standard library as importlib.metadata. """ if sys.version_info >= (3, 8): from importlib import metadata else: impor...
0
0
0
693f14d8b2af0c9f8672aea85ecbeb39e1269b19
3,247
py
Python
target_snowflake/file_format.py
BlueOrangeDigital/pipelinewise-target-snowflake
a71c58a1344e96b51b4be2d085042109df0e1dc1
[ "Apache-2.0" ]
null
null
null
target_snowflake/file_format.py
BlueOrangeDigital/pipelinewise-target-snowflake
a71c58a1344e96b51b4be2d085042109df0e1dc1
[ "Apache-2.0" ]
null
null
null
target_snowflake/file_format.py
BlueOrangeDigital/pipelinewise-target-snowflake
a71c58a1344e96b51b4be2d085042109df0e1dc1
[ "Apache-2.0" ]
null
null
null
"""Enums used by pipelinewise-target-snowflake""" from enum import Enum, unique from types import ModuleType from typing import Callable import target_snowflake.file_formats from target_snowflake.exceptions import FileFormatNotFoundException, InvalidFileFormatException # Supported types for file formats. @unique clas...
36.077778
119
0.670157
"""Enums used by pipelinewise-target-snowflake""" from enum import Enum, unique from types import ModuleType from typing import Callable import target_snowflake.file_formats from target_snowflake.exceptions import FileFormatNotFoundException, InvalidFileFormatException # Supported types for file formats. @unique clas...
0
0
0
06d566d4e011abd6c510a15e8d2ed0a0680bbe5c
6,361
py
Python
az-function-durable/UpgradeSandbox/__init__.py
Mina69/AKSAutoUpgrade
66b1c5a233f5c202a73b63c8540a4ee57d9abaf9
[ "MIT" ]
null
null
null
az-function-durable/UpgradeSandbox/__init__.py
Mina69/AKSAutoUpgrade
66b1c5a233f5c202a73b63c8540a4ee57d9abaf9
[ "MIT" ]
null
null
null
az-function-durable/UpgradeSandbox/__init__.py
Mina69/AKSAutoUpgrade
66b1c5a233f5c202a73b63c8540a4ee57d9abaf9
[ "MIT" ]
null
null
null
# This function is not intended to be invoked directly. Instead it will be # triggered by an orchestrator function. import logging import os from azure.mgmt.containerservice import ContainerServiceClient from azure.identity import ClientSecretCredential from azure.mgmt.subscription import SubscriptionClient from az...
58.357798
263
0.606037
# This function is not intended to be invoked directly. Instead it will be # triggered by an orchestrator function. import logging import os from azure.mgmt.containerservice import ContainerServiceClient from azure.identity import ClientSecretCredential from azure.mgmt.subscription import SubscriptionClient from az...
5,788
0
23
23a6b1d6d602d4d4a4188bbfe7cd9a2071a366d5
2,776
py
Python
commaqa/configs/predicate_language_config.py
allenai/CommaQA
663fda8fa280306297a805aefb671b04661aef74
[ "Apache-2.0" ]
null
null
null
commaqa/configs/predicate_language_config.py
allenai/CommaQA
663fda8fa280306297a805aefb671b04661aef74
[ "Apache-2.0" ]
null
null
null
commaqa/configs/predicate_language_config.py
allenai/CommaQA
663fda8fa280306297a805aefb671b04661aef74
[ "Apache-2.0" ]
null
null
null
from commaqa.configs.step_config import StepConfig from commaqa.dataset.utils import get_predicate_args
40.823529
94
0.603746
from commaqa.configs.step_config import StepConfig from commaqa.dataset.utils import get_predicate_args class ModelQuestionConfig: def __init__(self, config_json): self.steps = [StepConfig(x) for x in config_json["steps"]] if "steps" in config_json else [] self.questions = co...
2,450
14
206
b7b493318a7a3b83dbe2c7866ef9fbe0f690ec4d
154
py
Python
documentation/rst2html.py
dutrow/crits
6b357daa5c3060cf622d3a3b0c7b41a9ca69c049
[ "MIT" ]
738
2015-01-02T12:39:55.000Z
2022-03-23T11:05:51.000Z
documentation/rst2html.py
deadbits/crits
154097a1892e9d3960d6faaed4bd2e912a196a47
[ "MIT" ]
605
2015-01-01T01:03:39.000Z
2021-11-17T18:51:07.000Z
documentation/rst2html.py
deadbits/crits
154097a1892e9d3960d6faaed4bd2e912a196a47
[ "MIT" ]
316
2015-01-07T12:35:01.000Z
2022-03-30T04:44:30.000Z
#!/usr/bin/env python """ This requires the python docutils library. """ from docutils.core import publish_cmdline publish_cmdline(writer_name='html')
15.4
42
0.766234
#!/usr/bin/env python """ This requires the python docutils library. """ from docutils.core import publish_cmdline publish_cmdline(writer_name='html')
0
0
0
e68756120394754488130dbeffd29954ffbe521b
38,575
py
Python
blender/arm/utils.py
notwarp/armory
bd6078e3035eefcb3c725664698eeb369b4c2d88
[ "Zlib" ]
null
null
null
blender/arm/utils.py
notwarp/armory
bd6078e3035eefcb3c725664698eeb369b4c2d88
[ "Zlib" ]
null
null
null
blender/arm/utils.py
notwarp/armory
bd6078e3035eefcb3c725664698eeb369b4c2d88
[ "Zlib" ]
null
null
null
import glob import json import os import platform import re import subprocess from typing import Any import webbrowser import shlex import locale import numpy as np import bpy import arm.lib.armpack from arm.lib.lz4 import LZ4 import arm.log as log import arm.make_state as state import arm.props_renderpath from enum...
35.100091
165
0.606455
import glob import json import os import platform import re import subprocess from typing import Any import webbrowser import shlex import locale import numpy as np import bpy import arm.lib.armpack from arm.lib.lz4 import LZ4 import arm.log as log import arm.make_state as state import arm.props_renderpath from enum...
31,747
590
2,195
e3304d55e263566a2adac7ca3d08576c8498fa85
4,426
py
Python
extensions/adm/templates/5-todo/__init__.py
icoman/AppServer
b7715d90662e112638000b5a3c242fbcb59488a3
[ "MIT" ]
null
null
null
extensions/adm/templates/5-todo/__init__.py
icoman/AppServer
b7715d90662e112638000b5a3c242fbcb59488a3
[ "MIT" ]
null
null
null
extensions/adm/templates/5-todo/__init__.py
icoman/AppServer
b7715d90662e112638000b5a3c242fbcb59488a3
[ "MIT" ]
null
null
null
# # Sample Todo module # """ Your license message ... """ import os, bottle, json, datetime from appmodule import AppModule from .modeldb import setupDB, Todo, MyS app = MyAppModule() @app.get('/static/<path:path>') @app.route('/') @app.auth('access module') @app.view('index.tpl') def _(): ''' D...
28.012658
118
0.504745
# # Sample Todo module # """ Your license message ... """ import os, bottle, json, datetime from appmodule import AppModule from .modeldb import setupDB, Todo, MyS class MyAppModule(AppModule): def init(self): DSN = self.module_config.get('DSN') try: setupDB(DSN) except: ...
3,493
8
183
551636b992bdc48b5739abf461de16da8884d738
812
py
Python
rss_importer.py
wakin-/simple_ap
f13013fdc79207cfb07f3944caeeef45fe31bbf7
[ "MIT" ]
10
2018-06-18T09:17:59.000Z
2020-04-22T11:46:12.000Z
rss_importer.py
wakin-/simple_ap
f13013fdc79207cfb07f3944caeeef45fe31bbf7
[ "MIT" ]
4
2020-06-05T18:24:12.000Z
2021-06-10T20:29:49.000Z
rss_importer.py
wakin-/simple_ap
f13013fdc79207cfb07f3944caeeef45fe31bbf7
[ "MIT" ]
null
null
null
import feedparser import pandas import django django.setup() from activitypub.models import Account, Note
31.230769
81
0.653941
import feedparser import pandas import django django.setup() from activitypub.models import Account, Note def get_feeds_from_url(url): feed = feedparser.parse(url) return pandas.DataFrame(feed.entries) def get_new_feeds(account): feeds = get_feeds_from_url(account.feed_url) note_ids = Note.objects.fil...
637
0
69
a0ef4efb407a0c4dd51e8c25cefb6ca15903ff15
4,561
py
Python
tests/test_fors.py
grantps/superhelp
d8e861bf1ad91571ac23b9c833a8cd461bb1952f
[ "MIT" ]
27
2020-05-17T20:48:43.000Z
2022-01-08T21:32:30.000Z
tests/test_fors.py
grantps/superhelp
d8e861bf1ad91571ac23b9c833a8cd461bb1952f
[ "MIT" ]
null
null
null
tests/test_fors.py
grantps/superhelp
d8e861bf1ad91571ac23b9c833a8cd461bb1952f
[ "MIT" ]
null
null
null
from textwrap import dedent from tests import check_as_expected ROOT = 'superhelp.helpers.for_help.' # test_misc()
33.536765
135
0.414164
from textwrap import dedent from tests import check_as_expected ROOT = 'superhelp.helpers.for_help.' def test_misc(): test_conf = [ ( dedent("""\ name_lengths = [] """), { ROOT + 'comprehension_option': 0, ROOT + 'for_index_i...
4,420
0
23
9f91870eb13e3d34567de16f00af7e96a020e741
738
py
Python
blitzcrank/tests/test_rate_limiting.py
samhine/blitzcrank
340898e9a8dfeedba747adb2a94c5b76687f7f11
[ "MIT" ]
null
null
null
blitzcrank/tests/test_rate_limiting.py
samhine/blitzcrank
340898e9a8dfeedba747adb2a94c5b76687f7f11
[ "MIT" ]
null
null
null
blitzcrank/tests/test_rate_limiting.py
samhine/blitzcrank
340898e9a8dfeedba747adb2a94c5b76687f7f11
[ "MIT" ]
null
null
null
from blitzcrank import Blitzcrank import responses import json
29.52
109
0.616531
from blitzcrank import Blitzcrank import responses import json class TestRateLimiting: def test_default_rate_limits(self): secret = "fakefakefake" region = "euw1" summoner_name = "foo" api_rsp = {'accountId': '123'} b = Blitzcrank(secret, region) with responses.R...
622
2
50
c4a3c80583b1fb723e0e2f1c5392f324c5581138
811
py
Python
11/1167.py
ToshikiShimizu/AOJ
e87f684b6520189170842e800451063dad1369dd
[ "MIT" ]
null
null
null
11/1167.py
ToshikiShimizu/AOJ
e87f684b6520189170842e800451063dad1369dd
[ "MIT" ]
null
null
null
11/1167.py
ToshikiShimizu/AOJ
e87f684b6520189170842e800451063dad1369dd
[ "MIT" ]
null
null
null
if __name__ == '__main__': main()
25.34375
65
0.364982
def main(): ans = [] N = 10**6 dp = [10**10]*(N+1) dp_odd = [10**10]*(N+1) dp[0] = 0 dp_odd[0] = 0 for i in range(1,10**3): w = i*(i+1)*(i+2)//6 if N<=w: break for n in range(N-w): # dp[n+w] = min(dp[n]+1,dp[n+w]) # TLE new = dp[n]...
752
0
22
21b4f0b5e1a796e28a9049075d652c5073d3add5
12,043
py
Python
main.py
semibroiled/mysql-gs-rpy
ddfbc175bbd86871b39c8e1dde4201c93e682b9d
[ "MIT" ]
null
null
null
main.py
semibroiled/mysql-gs-rpy
ddfbc175bbd86871b39c8e1dde4201c93e682b9d
[ "MIT" ]
null
null
null
main.py
semibroiled/mysql-gs-rpy
ddfbc175bbd86871b39c8e1dde4201c93e682b9d
[ "MIT" ]
null
null
null
from getpass import getpass from mysql.connector import connect, Error try: with connect( host="localhost", #user=input("Enter username: "), user = 'acm', password=getpass("Enter password: "), database = 'online_movie_rating' ) as connection: show_db_qu...
33.267956
112
0.560409
from getpass import getpass from mysql.connector import connect, Error try: with connect( host="localhost", #user=input("Enter username: "), user = 'acm', password=getpass("Enter password: "), database = 'online_movie_rating' ) as connection: show_db_qu...
0
0
0
c7ec4fea1556dea89fb52a03d8362d2a2bb1532e
2,930
py
Python
oemof_examples/oemof.solph/v0.2.x/generic_chp/ccet.py
ekatef/oemof-examples
f16511d20008c30889a6e75a788a3a1a0bc632c2
[ "MIT" ]
28
2018-11-10T12:14:04.000Z
2022-01-14T00:01:09.000Z
oemof_examples/oemof.solph/v0.2.x/generic_chp/ccet.py
ekatef/oemof-examples
f16511d20008c30889a6e75a788a3a1a0bc632c2
[ "MIT" ]
28
2018-11-08T06:58:06.000Z
2022-02-22T18:58:17.000Z
oemof_examples/oemof.solph/v0.2.x/generic_chp/ccet.py
oemof/examples
4805d5cef03141a917fd8a9e1141acfa8cc9d781
[ "MIT" ]
55
2018-11-09T09:50:36.000Z
2022-03-08T10:31:02.000Z
# -*- coding: utf-8 -*- """ General description: --------------------- Example that illustrates how to use custom component `GenericCHP` can be used. In this case it is used to model a combined cycle extraction turbine. Installation requirements: --------------------------- This example requires the latest version of ...
28.72549
78
0.669966
# -*- coding: utf-8 -*- """ General description: --------------------- Example that illustrates how to use custom component `GenericCHP` can be used. In this case it is used to model a combined cycle extraction turbine. Installation requirements: --------------------------- This example requires the latest version of ...
0
0
0
46392fac0bb552ed8d94ccaf8bf7aec2ec479708
15,524
py
Python
assemblyline/assemblyline/deployment/create_deployment.py
dendisuhubdy/grokmachine
120a21a25c2730ed356739231ec8b99fc0575c8b
[ "BSD-3-Clause" ]
46
2017-05-15T11:15:08.000Z
2018-07-02T03:32:52.000Z
deployment/create_deployment.py
rtruxal/assemblyline
d1f02c9c7c8859d4c0b7ac231d91d544bb3a33eb
[ "MIT" ]
null
null
null
deployment/create_deployment.py
rtruxal/assemblyline
d1f02c9c7c8859d4c0b7ac231d91d544bb3a33eb
[ "MIT" ]
24
2017-05-17T03:26:17.000Z
2018-07-09T07:00:50.000Z
#!/usr/bin/env python from __future__ import print_function import subprocess import re from getters import * DEVEL_VM = "Development VM" APPLIANCE = "Appliance (Full deployment on single machine)" CLUSTER = "Cluster (High volume production deployment)" DEPLOYMENT_TYPES = [DEVEL_VM, APPLIANCE, CLUSTER] # noinspecti...
43.00277
119
0.666516
#!/usr/bin/env python from __future__ import print_function import subprocess import re from getters import * DEVEL_VM = "Development VM" APPLIANCE = "Appliance (Full deployment on single machine)" CLUSTER = "Cluster (High volume production deployment)" DEPLOYMENT_TYPES = [DEVEL_VM, APPLIANCE, CLUSTER] # noinspecti...
14,568
0
274
52ef33a9f0aa2124be939ba0f08b14912e3558c0
3,366
py
Python
notification_integration/utilities/pubsub_test.py
GoogleCloudPlatform/cloud-alerting-notification-forwarding
1bd47043de723c92dee3f49ddf4bbe226ba5d106
[ "Apache-2.0" ]
3
2021-12-08T02:59:28.000Z
2022-02-04T01:14:54.000Z
notification_integration/utilities/pubsub_test.py
GoogleCloudPlatform/cloud-alerting-notification-forwarding
1bd47043de723c92dee3f49ddf4bbe226ba5d106
[ "Apache-2.0" ]
null
null
null
notification_integration/utilities/pubsub_test.py
GoogleCloudPlatform/cloud-alerting-notification-forwarding
1bd47043de723c92dee3f49ddf4bbe226ba5d106
[ "Apache-2.0" ]
1
2021-12-25T17:32:04.000Z
2021-12-25T17:32:04.000Z
# Copyright 2021 Google, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
44.88
133
0.687463
# Copyright 2021 Google, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
2,474
15
142
b0c958fe8c46070e76fa59d67f1dc606effc9559
460
py
Python
views/sms_scroll_area.py
swtar/StoreManageSystem
427dce8ff67146bde0da604f05c28b0e29d36192
[ "MIT" ]
null
null
null
views/sms_scroll_area.py
swtar/StoreManageSystem
427dce8ff67146bde0da604f05c28b0e29d36192
[ "MIT" ]
null
null
null
views/sms_scroll_area.py
swtar/StoreManageSystem
427dce8ff67146bde0da604f05c28b0e29d36192
[ "MIT" ]
null
null
null
from PyQt5.QtWidgets import QScrollArea class SMSScrollArea(QScrollArea): ''' 自定义滚动控件 '''
25.555556
52
0.628261
from PyQt5.QtWidgets import QScrollArea class SMSScrollArea(QScrollArea): ''' 自定义滚动控件 ''' def __init__(self, parent = None): QScrollArea.__init__(self, parent) self._view = None def resizeEvent(self, event): content_size = self.contentsRect() self._view.upda...
261
0
96
a9959636d5aafd55740dd9287c56898a3f184af2
8,632
py
Python
groupenc/vault.py
guilt/groupenc
579022edfa54323d9b19bb89ec82178da4d71081
[ "MIT" ]
5
2021-02-18T09:14:24.000Z
2021-02-23T09:20:44.000Z
groupenc/vault.py
guilt/groupenc
579022edfa54323d9b19bb89ec82178da4d71081
[ "MIT" ]
1
2021-02-23T05:44:26.000Z
2021-03-13T00:27:55.000Z
groupenc/vault.py
guilt/groupenc
579022edfa54323d9b19bb89ec82178da4d71081
[ "MIT" ]
1
2021-03-02T09:52:47.000Z
2021-03-02T09:52:47.000Z
import json import os from Crypto.Cipher import AES from Crypto.Hash import SHA256 from Crypto.Random import get_random_bytes from Crypto.Util.Padding import pad, unpad from .config import DEFAULT_VAULT_FILE, DEFAULT_GROUP_KEY_BITS, DEFAULT_PAD_BYTES, DEFAULT_IV_BITS, \ DEFAULT_KEY_ENCODING, HASH_SECRETS from .he...
38.535714
101
0.726483
import json import os from Crypto.Cipher import AES from Crypto.Hash import SHA256 from Crypto.Random import get_random_bytes from Crypto.Util.Padding import pad, unpad from .config import DEFAULT_VAULT_FILE, DEFAULT_GROUP_KEY_BITS, DEFAULT_PAD_BYTES, DEFAULT_IV_BITS, \ DEFAULT_KEY_ENCODING, HASH_SECRETS from .he...
7,346
462
299
c765837c6798605e5e1250e8dee402fade7036e7
587
py
Python
rancher/migrations/0033_auto_20210528_0844.py
rockychen-dpaw/it-assets
92ec23c6a413c5c45bb3d96981d6af68535d225c
[ "Apache-2.0" ]
4
2018-11-16T13:49:49.000Z
2021-08-19T05:16:50.000Z
rancher/migrations/0033_auto_20210528_0844.py
rockychen-dpaw/it-assets
92ec23c6a413c5c45bb3d96981d6af68535d225c
[ "Apache-2.0" ]
10
2018-07-06T09:34:56.000Z
2022-01-28T06:09:05.000Z
rancher/migrations/0033_auto_20210528_0844.py
rockychen-dpaw/it-assets
92ec23c6a413c5c45bb3d96981d6af68535d225c
[ "Apache-2.0" ]
9
2018-05-05T23:29:10.000Z
2020-06-26T02:29:17.000Z
# Generated by Django 2.2.21 on 2021-05-28 00:44 from django.db import migrations, models
25.521739
81
0.614991
# Generated by Django 2.2.21 on 2021-05-28 00:44 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('rancher', '0032_auto_20210527_1037'), ] operations = [ migrations.AlterField( model_name='vulnerability', name='vul...
0
472
23
c8e61fae94304118cdb5dd0f9f34585932fbe45c
42
py
Python
sksurgerytorch/ui/__init__.py
UCL/scikit-surgerytorch
5666077d4fe645f198afb0ae821c19472fcefdd8
[ "BSD-3-Clause" ]
null
null
null
sksurgerytorch/ui/__init__.py
UCL/scikit-surgerytorch
5666077d4fe645f198afb0ae821c19472fcefdd8
[ "BSD-3-Clause" ]
7
2020-08-20T07:41:53.000Z
2022-03-22T19:04:28.000Z
sksurgerytorch/ui/__init__.py
UCL/scikit-surgerytorch
5666077d4fe645f198afb0ae821c19472fcefdd8
[ "BSD-3-Clause" ]
null
null
null
# coding=utf-8 """scikit-surgerytorch"""
10.5
25
0.666667
# coding=utf-8 """scikit-surgerytorch"""
0
0
0
1bd046461d504a44bcac51e726db948ece84d020
1,540
py
Python
data/ONModelMetropolis/raw/raw_transformer.py
statphysandml/LatticeModelImplementations
5cadb44679445d821cc3d88646215d82d71e920c
[ "MIT" ]
3
2021-05-10T12:36:40.000Z
2021-06-03T13:56:15.000Z
data/ONModelMetropolis/raw/raw_transformer.py
statphysandml/LatticeModelImplementations
5cadb44679445d821cc3d88646215d82d71e920c
[ "MIT" ]
null
null
null
data/ONModelMetropolis/raw/raw_transformer.py
statphysandml/LatticeModelImplementations
5cadb44679445d821cc3d88646215d82d71e920c
[ "MIT" ]
null
null
null
# site, moving dimension, direction, index of site representation
41.621622
152
0.635065
# site, moving dimension, direction, index of site representation def get_neighbour_index(n, dim, direction, mu, dimensions, dim_mul, elem_per_site): if direction: return (n - n % (dim_mul[dim] * dimensions[dim]) + (n + dim_mul[dim]) % (dim_mul[dim] * dimensions[dim])) * elem_per_site + mu...
1,426
0
45
82fa0a041eb29566dcaf99ae0b138d182da6c4b2
7,264
py
Python
Model.py
microstrongruan/Google-News-Sum
498bbf03f74af062a18dccc9f9f9214e98aeff70
[ "MIT" ]
null
null
null
Model.py
microstrongruan/Google-News-Sum
498bbf03f74af062a18dccc9f9f9214e98aeff70
[ "MIT" ]
null
null
null
Model.py
microstrongruan/Google-News-Sum
498bbf03f74af062a18dccc9f9f9214e98aeff70
[ "MIT" ]
null
null
null
import tensorflow as tf import pickle from LstmUnit import LstmUnit from OutputUnit import OutputUnit model = Model() import numpy as np with tf.Session() as sess: for i in range(10): sess.run(tf.global_variables_initializer()) _1, _2 = sess.run([model.train_op, model.mean_loss], feed_dict={ ...
45.118012
116
0.640969
import tensorflow as tf import pickle from LstmUnit import LstmUnit from OutputUnit import OutputUnit class Model(object): def __init__(self): self.batch_size = 10 self.num_hidden = 133 self.emb_size = 199 self.source_vocab = 2000 self.target_vocab = 2000 self.grad_c...
6,412
-1
211
db25f91a097d58c966af1b9eff22b9e765700c97
12,807
py
Python
autoprocess/utils/xdsio.py
michel4j/auto-process
9c011cef3cdc2fc55df31f9cac88c3e1074aa366
[ "BSD-3-Clause" ]
null
null
null
autoprocess/utils/xdsio.py
michel4j/auto-process
9c011cef3cdc2fc55df31f9cac88c3e1074aa366
[ "BSD-3-Clause" ]
null
null
null
autoprocess/utils/xdsio.py
michel4j/auto-process
9c011cef3cdc2fc55df31f9cac88c3e1074aa366
[ "BSD-3-Clause" ]
null
null
null
""" Input/Output routines for XDS and file conversion utilities """ import os import numpy import multiprocessing from autoprocess.utils import misc DEFAULT_DELPHI = 8 if os.environ.get('DPS_NODES'): HOSTS = { x.split(':')[0]: int(x.split(':')[1]) for x in os.environ['DPS_NODES'].split() } else: ...
38.344311
136
0.596393
""" Input/Output routines for XDS and file conversion utilities """ import os import numpy import multiprocessing from autoprocess.utils import misc DEFAULT_DELPHI = 8 if os.environ.get('DPS_NODES'): HOSTS = { x.split(':')[0]: int(x.split(':')[1]) for x in os.environ['DPS_NODES'].split() } else: ...
558
0
46
00c729a004103fc887f583f5b1f988c531c16fb2
1,212
py
Python
joannas_vc_test.py
alagithub/Mattis-et-al.-2022
7a938275789b56f274eb78b04bb8efbfd30d7105
[ "MIT" ]
null
null
null
joannas_vc_test.py
alagithub/Mattis-et-al.-2022
7a938275789b56f274eb78b04bb8efbfd30d7105
[ "MIT" ]
null
null
null
joannas_vc_test.py
alagithub/Mattis-et-al.-2022
7a938275789b56f274eb78b04bb8efbfd30d7105
[ "MIT" ]
2
2022-01-16T15:27:25.000Z
2022-01-18T07:47:32.000Z
import os from pyabf import ABF from analyze_abf import VCTestData import numpy as np ABF_LOCATION = r'C:\Users\mattisj\Desktop\9-Patching\GC juvenile Scn1a\VC test' VC_TEST_OUTPUT_FILE = r'C:\Users\mattisj\Desktop\9-Patching\GC juvenile Scn1a\VC test GC juvenile Scn1a.csv' if os.path.isdir(ABF_LOCATION): abf_fil...
35.647059
108
0.747525
import os from pyabf import ABF from analyze_abf import VCTestData import numpy as np ABF_LOCATION = r'C:\Users\mattisj\Desktop\9-Patching\GC juvenile Scn1a\VC test' VC_TEST_OUTPUT_FILE = r'C:\Users\mattisj\Desktop\9-Patching\GC juvenile Scn1a\VC test GC juvenile Scn1a.csv' if os.path.isdir(ABF_LOCATION): abf_fil...
0
0
0
b37e85fca017fa8ed8de31f1a14234d705e40176
21
py
Python
.history/my_classes/FirstClassFunctions/MapFilterZipList_20210706140211.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
.history/my_classes/FirstClassFunctions/MapFilterZipList_20210706140211.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
.history/my_classes/FirstClassFunctions/MapFilterZipList_20210706140211.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
"""Map Filter Zip """
21
21
0.571429
"""Map Filter Zip """
0
0
0
f958b925ae899413aa39d4957103809a107e3c0d
71
py
Python
Arknights/click_location/__init__.py
boatliuz/ArknightsAutoHelper
2dd260b59b4734301dabb1b6793bba05a716517c
[ "MIT" ]
null
null
null
Arknights/click_location/__init__.py
boatliuz/ArknightsAutoHelper
2dd260b59b4734301dabb1b6793bba05a716517c
[ "MIT" ]
null
null
null
Arknights/click_location/__init__.py
boatliuz/ArknightsAutoHelper
2dd260b59b4734301dabb1b6793bba05a716517c
[ "MIT" ]
null
null
null
# coding: utf-8 from Arknights.click_location.click_location import *
17.75
53
0.802817
# coding: utf-8 from Arknights.click_location.click_location import *
0
0
0
4828785f5daf752c30998b7182958b20db797008
2,319
py
Python
cpu/jax/longest_common_subsequence.py
HiroakiMikami/benchmarks-of-deep-learning-libraries
a0ff9e50829321d3d6fa0ced3eb8fcc0ab4ea3a5
[ "MIT" ]
null
null
null
cpu/jax/longest_common_subsequence.py
HiroakiMikami/benchmarks-of-deep-learning-libraries
a0ff9e50829321d3d6fa0ced3eb8fcc0ab4ea3a5
[ "MIT" ]
null
null
null
cpu/jax/longest_common_subsequence.py
HiroakiMikami/benchmarks-of-deep-learning-libraries
a0ff9e50829321d3d6fa0ced3eb8fcc0ab4ea3a5
[ "MIT" ]
null
null
null
import argparse import json import os import time import numpy as np import jax.numpy as jnp from jax import jit from jax.lax import cond, fori_loop if __name__ == "__main__": main()
29.730769
89
0.579991
import argparse import json import os import time import numpy as np import jax.numpy as jnp from jax import jit from jax.lax import cond, fori_loop def _length_of_longest_common_subsequence(str0: jnp.array, str1: jnp.array) -> jnp.array: N = len(str0) M = len(str1) table = jnp.zeros(shape=(N + 1, M + 1)...
2,081
0
46
f0f13a9d49c5b84521aa3e00bdcabe0c494853a7
7,535
py
Python
python/paddle/fluid/tests/unittests/dist_save_load.py
ysh329/Paddle
50ad9046c9a440564d104eaa354eb9df83a35678
[ "Apache-2.0" ]
1
2019-09-05T07:32:44.000Z
2019-09-05T07:32:44.000Z
python/paddle/fluid/tests/unittests/dist_save_load.py
ysh329/Paddle
50ad9046c9a440564d104eaa354eb9df83a35678
[ "Apache-2.0" ]
1
2019-05-26T14:23:24.000Z
2019-05-26T14:23:51.000Z
python/paddle/fluid/tests/unittests/dist_save_load.py
ysh329/Paddle
50ad9046c9a440564d104eaa354eb9df83a35678
[ "Apache-2.0" ]
1
2019-07-19T06:47:23.000Z
2019-07-19T06:47:23.000Z
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
36.225962
96
0.586065
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
6,136
27
103
8f2846168e0d2ea4e7e4f55bc21b078cd54f9482
980
py
Python
color_classification_image.py
Ademboussetha/Person-Tracking
729d9d39e54b45c8d6b27ed7e44dcec5f1564d16
[ "MIT" ]
null
null
null
color_classification_image.py
Ademboussetha/Person-Tracking
729d9d39e54b45c8d6b27ed7e44dcec5f1564d16
[ "MIT" ]
null
null
null
color_classification_image.py
Ademboussetha/Person-Tracking
729d9d39e54b45c8d6b27ed7e44dcec5f1564d16
[ "MIT" ]
null
null
null
""" Developed by : Adem Boussetha Email : ademboussetha@gmail.com """ #!/usr/bin/python # -*- coding: utf-8 -*- import cv2 from color_recognition_api import color_histogram_feature_extraction from color_recognition_api import knn_classifier import os import os.path import sys global color
29.69697
82
0.723469
""" Developed by : Adem Boussetha Email : ademboussetha@gmail.com """ #!/usr/bin/python # -*- coding: utf-8 -*- import cv2 from color_recognition_api import color_histogram_feature_extraction from color_recognition_api import knn_classifier import os import os.path import sys global color def getColor(imageinput): ...
666
0
22
82a405414909b6dea1917ce2fcb6e6a022f2567d
875
py
Python
Backend/src/contract/migrations/0011_auto_20200519_1534.py
Valle1806/EnergyCorp
aba09105eedcb7dc694b201e50953e19e4e2936b
[ "MIT" ]
1
2021-01-21T08:30:57.000Z
2021-01-21T08:30:57.000Z
Backend/src/contract/migrations/0011_auto_20200519_1534.py
ChristianTaborda/Energycorp
2447b5af211501450177b0b60852dcb31d6ca12d
[ "MIT" ]
null
null
null
Backend/src/contract/migrations/0011_auto_20200519_1534.py
ChristianTaborda/Energycorp
2447b5af211501450177b0b60852dcb31d6ca12d
[ "MIT" ]
null
null
null
# Generated by Django 3.0.3 on 2020-05-19 15:34 import datetime from django.db import migrations, models
27.34375
95
0.587429
# Generated by Django 3.0.3 on 2020-05-19 15:34 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('contract', '0010_auto_20200519_0155'), ] operations = [ migrations.AddField( model_name='invoice', n...
0
745
23
1128bb86ee87028a66987f7f624b7ef0d0dabbe5
974
py
Python
setup.py
frogrammer/databricks-workspace-cleaner
4658bdab8fa9bac3669dc7e06093b535cead50ff
[ "Apache-2.0" ]
null
null
null
setup.py
frogrammer/databricks-workspace-cleaner
4658bdab8fa9bac3669dc7e06093b535cead50ff
[ "Apache-2.0" ]
null
null
null
setup.py
frogrammer/databricks-workspace-cleaner
4658bdab8fa9bac3669dc7e06093b535cead50ff
[ "Apache-2.0" ]
null
null
null
from setuptools import setup, find_packages from os import path from cli import __version__ # https://packaging.python.org/guides/making-a-pypi-friendly-readme/ this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'README.md')) as f: long_description = f.read() setup( nam...
30.4375
80
0.697125
from setuptools import setup, find_packages from os import path from cli import __version__ # https://packaging.python.org/guides/making-a-pypi-friendly-readme/ this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'README.md')) as f: long_description = f.read() setup( nam...
0
0
0
cdd6f82a38246541f973d940552f26a43941067a
1,524
py
Python
brewgorithm/neural/beer2vec/demo.py
ZXVentures/brewgorithm_devkit
f207e0526cf75ab957dad1b4e9129237cc2236e0
[ "MIT" ]
1
2018-03-13T15:18:23.000Z
2018-03-13T15:18:23.000Z
brewgorithm/neural/beer2vec/demo.py
ZXVentures/brewgorithm_devkit
f207e0526cf75ab957dad1b4e9129237cc2236e0
[ "MIT" ]
null
null
null
brewgorithm/neural/beer2vec/demo.py
ZXVentures/brewgorithm_devkit
f207e0526cf75ab957dad1b4e9129237cc2236e0
[ "MIT" ]
1
2020-10-08T18:57:32.000Z
2020-10-08T18:57:32.000Z
import numpy as np from sklearn.metrics.pairwise import cosine_similarity from .load import get_beer2vec from .access_ext import beer_emb, word_weighter if __name__ == "__main__": run_demo()
35.44186
121
0.672572
import numpy as np from sklearn.metrics.pairwise import cosine_similarity from .load import get_beer2vec from .access_ext import beer_emb, word_weighter def run_demo(): beer_labels = get_beer2vec() beer_vectors = [beer['vector'] for beer in beer_labels] while True: text = input("Positive sentence: ") ...
1,303
0
23
9ba862990f5ae98d3dd7d69e053d51df334a5037
294
py
Python
tests/conftest.py
gmarkey/k8s-snapshots
35a5125c6241f0eb35e04b69f9f6e512d718b4fb
[ "BSD-2-Clause" ]
326
2017-01-07T17:08:19.000Z
2022-03-28T05:54:51.000Z
tests/conftest.py
gmarkey/k8s-snapshots
35a5125c6241f0eb35e04b69f9f6e512d718b4fb
[ "BSD-2-Clause" ]
96
2017-01-25T15:42:35.000Z
2021-11-06T04:06:41.000Z
tests/conftest.py
gmarkey/k8s-snapshots
35a5125c6241f0eb35e04b69f9f6e512d718b4fb
[ "BSD-2-Clause" ]
66
2017-02-03T21:40:42.000Z
2021-08-15T17:27:40.000Z
import pytest from k8s_snapshots.logconf import configure_logging @pytest.fixture(scope='session', autouse=True) from .fixtures import * # noqa from .fixtures.kube import * # noqa
19.6
51
0.714286
import pytest from k8s_snapshots.logconf import configure_logging @pytest.fixture(scope='session', autouse=True) def configured_logging(): configure_logging( level_name='DEBUG', for_humans=True, ) from .fixtures import * # noqa from .fixtures.kube import * # noqa
86
0
22
7000d619966974609cd47da90f2c0d6dbfe50725
45
py
Python
src/mlscratch/arch/__init__.py
aicroe/mlscratch
59100ea2a83fc8cd8ae617b686f6981d62073528
[ "MIT" ]
null
null
null
src/mlscratch/arch/__init__.py
aicroe/mlscratch
59100ea2a83fc8cd8ae617b686f6981d62073528
[ "MIT" ]
5
2019-10-16T03:15:19.000Z
2019-12-14T19:38:43.000Z
src/mlscratch/arch/__init__.py
aicroe/mlscratch
59100ea2a83fc8cd8ae617b686f6981d62073528
[ "MIT" ]
null
null
null
"""Arch's package.""" from .arch import Arch
15
22
0.666667
"""Arch's package.""" from .arch import Arch
0
0
0
d0ba0c5bb8774036bcf5c7538b265ccbcb5df44e
8,832
py
Python
maps/migrations/0001_squashed_0011_auto_20161228_1520.py
ugoertz/django-familio
b3db5e508d98bedb32855e102c14218080b4dc01
[ "BSD-3-Clause" ]
3
2017-04-25T10:41:19.000Z
2020-10-31T15:08:18.000Z
maps/migrations/0001_squashed_0011_auto_20161228_1520.py
ugoertz/django-familio
b3db5e508d98bedb32855e102c14218080b4dc01
[ "BSD-3-Clause" ]
2
2019-11-02T20:58:31.000Z
2020-02-08T17:53:14.000Z
maps/migrations/0001_squashed_0011_auto_20161228_1520.py
ugoertz/django-familio
b3db5e508d98bedb32855e102c14218080b4dc01
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2016-12-30 20:11 from __future__ import unicode_literals import django.contrib.gis.db.models.fields import django.contrib.sites.managers from django.db import migrations, models import django.db.models.deletion import django.db.models.manager import filebrowser.f...
46.240838
407
0.586957
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2016-12-30 20:11 from __future__ import unicode_literals import django.contrib.gis.db.models.fields import django.contrib.sites.managers from django.db import migrations, models import django.db.models.deletion import django.db.models.manager import filebrowser.f...
0
8,459
23
eb8daa7163e7ae2ccdf87838ad1461d2879b1f75
717
py
Python
tests/test_evolutionary_forest.py
zhenlingcn/EvolutionaryForest
0228dfed46401efd0d87ec37a527f127cd3bad78
[ "BSD-3-Clause" ]
25
2021-05-22T12:37:11.000Z
2022-02-23T07:28:22.000Z
tests/test_evolutionary_forest.py
zhenlingcn/EvolutionaryForest
0228dfed46401efd0d87ec37a527f127cd3bad78
[ "BSD-3-Clause" ]
26
2021-05-24T06:50:43.000Z
2022-02-07T08:35:47.000Z
tests/test_evolutionary_forest.py
zhenlingcn/EvolutionaryForest
0228dfed46401efd0d87ec37a527f127cd3bad78
[ "BSD-3-Clause" ]
4
2021-06-08T12:36:51.000Z
2021-12-31T05:17:17.000Z
#!/usr/bin/env python """Tests for `evolutionary_forest` package.""" from numpy.testing import assert_almost_equal from sklearn.datasets import make_regression from sklearn.metrics import mean_squared_error from evolutionary_forest.forest import EvolutionaryForestRegressor
35.85
118
0.728033
#!/usr/bin/env python """Tests for `evolutionary_forest` package.""" from numpy.testing import assert_almost_equal from sklearn.datasets import make_regression from sklearn.metrics import mean_squared_error from evolutionary_forest.forest import EvolutionaryForestRegressor def test_simple_data(): X, y = make_r...
416
0
23
d1701d0e8a556c6fcf3a14d67d1959acc4711cec
6,343
py
Python
train_predict.py
yihshe/CIL_Road_Segmentation
8133484ddace1e3ec25b96e9c890d8815133a1fc
[ "MIT" ]
3
2021-11-16T10:12:04.000Z
2021-11-22T01:45:58.000Z
train_predict.py
yihshe/CIL_Road_Segmentation
8133484ddace1e3ec25b96e9c890d8815133a1fc
[ "MIT" ]
null
null
null
train_predict.py
yihshe/CIL_Road_Segmentation
8133484ddace1e3ec25b96e9c890d8815133a1fc
[ "MIT" ]
2
2021-11-16T10:12:55.000Z
2021-11-21T08:33:00.000Z
#!/usr/bin/env python3 import numpy as np np.random.seed(1) import random random.seed(1) import os import glob import re import skimage.io as io import tensorflow as tf from tensorflow.keras.losses import binary_crossentropy tf.set_random_seed(1) from tensorflow.keras.callbacks import ReduceLROnPlateau, ModelCheckpoi...
38.91411
139
0.682169
#!/usr/bin/env python3 import numpy as np np.random.seed(1) import random random.seed(1) import os import glob import re import skimage.io as io import tensorflow as tf from tensorflow.keras.losses import binary_crossentropy tf.set_random_seed(1) from tensorflow.keras.callbacks import ReduceLROnPlateau, ModelCheckpoi...
173
0
23
860c7d4dcb4df0c0e5a0feacec48196e91a016f8
4,038
py
Python
homeassistant/components/ombi/__init__.py
petewill/home-assistant
5859dba4344f05fb8774aa1207e47ac28f627a67
[ "Apache-2.0" ]
3
2020-05-18T10:18:16.000Z
2020-12-08T11:27:55.000Z
homeassistant/components/ombi/__init__.py
petewill/home-assistant
5859dba4344f05fb8774aa1207e47ac28f627a67
[ "Apache-2.0" ]
3
2018-01-23T20:41:55.000Z
2018-01-23T20:42:12.000Z
homeassistant/components/ombi/__init__.py
petewill/home-assistant
5859dba4344f05fb8774aa1207e47ac28f627a67
[ "Apache-2.0" ]
6
2020-04-10T06:21:11.000Z
2021-07-01T08:53:38.000Z
"""Support for Ombi.""" import logging import pyombi import voluptuous as vol from homeassistant.const import ( CONF_API_KEY, CONF_HOST, CONF_PORT, CONF_SSL, CONF_USERNAME, ) import homeassistant.helpers.config_validation as cv from .const import ( ATTR_NAME, ATTR_SEASON, CONF_URLBASE...
26.92
86
0.616147
"""Support for Ombi.""" import logging import pyombi import voluptuous as vol from homeassistant.const import ( CONF_API_KEY, CONF_HOST, CONF_PORT, CONF_SSL, CONF_USERNAME, ) import homeassistant.helpers.config_validation as cv from .const import ( ATTR_NAME, ATTR_SEASON, CONF_URLBASE...
0
0
0
cb82de359db4f2ea487b7e7cec22d48c3fb58eba
2,307
py
Python
src/graphs/tests/test_synonyms.py
seahrh/coding-interview
517d19e7e88c02acec4aa6336bc20206ce3f1897
[ "MIT" ]
null
null
null
src/graphs/tests/test_synonyms.py
seahrh/coding-interview
517d19e7e88c02acec4aa6336bc20206ce3f1897
[ "MIT" ]
null
null
null
src/graphs/tests/test_synonyms.py
seahrh/coding-interview
517d19e7e88c02acec4aa6336bc20206ce3f1897
[ "MIT" ]
null
null
null
from graphs.synonyms import *
30.76
74
0.4443
from graphs.synonyms import * class TestSynonyms: def test_given_empty_names_and_synonyms_then_return_empty_list(self): names = [] synonyms = [] assert merge(names, synonyms) == set() def test_given_empty_synonyms(self): names = [("John", 15)] synonyms = [] ...
2,108
-2
168
9c89fe83e9025be71bfceb5b61bde27d5106c302
3,180
py
Python
aiven_mysql_migrate/main.py
aiven/aiven-mysql-migrate
88e2a12836cfcc4859652ec382eba41fdad43b03
[ "Apache-2.0" ]
7
2021-02-09T10:48:37.000Z
2022-02-18T00:12:17.000Z
aiven_mysql_migrate/main.py
aiven/aiven-mysql-migrate
88e2a12836cfcc4859652ec382eba41fdad43b03
[ "Apache-2.0" ]
4
2021-08-05T10:47:02.000Z
2022-02-10T13:43:56.000Z
aiven_mysql_migrate/main.py
aiven/aiven-mysql-migrate
88e2a12836cfcc4859652ec382eba41fdad43b03
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020 Aiven, Helsinki, Finland. https://aiven.io/ from aiven_mysql_migrate import config from aiven_mysql_migrate.migration import MySQLMigrateMethod, MySQLMigration import logging LOGGER = logging.getLogger(__name__) def main(args=None, *, app="mysql_migrate"): """Migrate MySQL database from so...
37.857143
117
0.713522
# Copyright (c) 2020 Aiven, Helsinki, Finland. https://aiven.io/ from aiven_mysql_migrate import config from aiven_mysql_migrate.migration import MySQLMigrateMethod, MySQLMigration import logging LOGGER = logging.getLogger(__name__) def setup_logging(*, debug=False): log_format = "%(asctime)s\t%(name)s\t%(level...
199
0
23
1e947bc2f08b8d59380343fda354c8cc133a71c3
2,066
py
Python
Content_SMH.py
anthonyeden/SMH.com.au-Command-Line-Interface
60b2ea978c5003d89c8e6f53e5102028b8f9b07b
[ "MIT" ]
null
null
null
Content_SMH.py
anthonyeden/SMH.com.au-Command-Line-Interface
60b2ea978c5003d89c8e6f53e5102028b8f9b07b
[ "MIT" ]
null
null
null
Content_SMH.py
anthonyeden/SMH.com.au-Command-Line-Interface
60b2ea978c5003d89c8e6f53e5102028b8f9b07b
[ "MIT" ]
null
null
null
################################################## # Basic HTML fetching and parsing for SMH.com.au # ################################################## import urllib2 from bs4 import BeautifulSoup
27.184211
118
0.53243
################################################## # Basic HTML fetching and parsing for SMH.com.au # ################################################## import urllib2 from bs4 import BeautifulSoup def fetchArticleIndex(): opener = urllib2.build_opener() opener.addheaders = [('User-agent', 'SMH-Termina...
1,818
0
46
3b2e7ae71cfe2e8fe096ca8367381bbc0e2df941
399
py
Python
ABC/abc151-abc200/abc155/c.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
2
2020-06-12T09:54:23.000Z
2021-05-04T01:34:07.000Z
ABC/abc151-abc200/abc155/c.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
961
2020-06-23T07:26:22.000Z
2022-03-31T21:34:52.000Z
ABC/abc151-abc200/abc155/c.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
null
null
null
# -*- coding: utf-8 -*- if __name__ == '__main__': main()
17.347826
36
0.493734
# -*- coding: utf-8 -*- def main(): from collections import Counter n = int(input()) s = [input() for _ in range(n)] c = Counter(s) max_value = max(c.values()) ans = list() for key, value in c.items(): if value == max_value: ans.append(key) for a ...
303
0
25
73498c49f12e4e5e3a30b7cac8793500e6ca895d
467
py
Python
PythonExe/ex066.py
ScnMatheus/my-python-projects
9cc3511dd6e25d9b16429347598c105f15bd6916
[ "MIT" ]
null
null
null
PythonExe/ex066.py
ScnMatheus/my-python-projects
9cc3511dd6e25d9b16429347598c105f15bd6916
[ "MIT" ]
null
null
null
PythonExe/ex066.py
ScnMatheus/my-python-projects
9cc3511dd6e25d9b16429347598c105f15bd6916
[ "MIT" ]
null
null
null
#Crie um programa que leia varios numerios inteiros #so ira parar quando digitar o valor 999, que é a condição final #mostre quantos numeros foram digitados, e qual foi a soma entre eles. soma = quantidade = 0 while True: n1 = int(input('Digite um número: [999] PARA PARAR')) if n1 != 999: soma = soma + ...
38.916667
84
0.685225
#Crie um programa que leia varios numerios inteiros #so ira parar quando digitar o valor 999, que é a condição final #mostre quantos numeros foram digitados, e qual foi a soma entre eles. soma = quantidade = 0 while True: n1 = int(input('Digite um número: [999] PARA PARAR')) if n1 != 999: soma = soma + ...
0
0
0
700a1dfb43d6c4c7598f8e1afca9f0b3d432ea93
409
py
Python
setup.py
thecubic/objection
4937f4b577847c1c00987bc0f9e820bdad3c4c53
[ "Apache-2.0" ]
1
2021-12-10T20:14:56.000Z
2021-12-10T20:14:56.000Z
setup.py
thecubic/objection
4937f4b577847c1c00987bc0f9e820bdad3c4c53
[ "Apache-2.0" ]
null
null
null
setup.py
thecubic/objection
4937f4b577847c1c00987bc0f9e820bdad3c4c53
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python from distutils.core import setup setup( name="objection", version="1.0", description="AndroidAPS preference editor", author="Dave Carlson", author_email="thecubic@thecubic.net", url="https://github.com/thecubic/objection/", packages=["objection"], scripts=["object...
27.266667
106
0.687042
#!/usr/bin/env python from distutils.core import setup setup( name="objection", version="1.0", description="AndroidAPS preference editor", author="Dave Carlson", author_email="thecubic@thecubic.net", url="https://github.com/thecubic/objection/", packages=["objection"], scripts=["object...
0
0
0
9aea2ea6f2d471c9eddc93f20e4efea59ebf26d1
570
py
Python
Hackerrank/CountingValley.py
venkyvt7/CompetitiveCodingSolutions
1813ae388c301a4a2c234eacdcabb135295806a1
[ "MIT" ]
null
null
null
Hackerrank/CountingValley.py
venkyvt7/CompetitiveCodingSolutions
1813ae388c301a4a2c234eacdcabb135295806a1
[ "MIT" ]
null
null
null
Hackerrank/CountingValley.py
venkyvt7/CompetitiveCodingSolutions
1813ae388c301a4a2c234eacdcabb135295806a1
[ "MIT" ]
1
2020-10-03T09:53:37.000Z
2020-10-03T09:53:37.000Z
#!/bin/python3 import math import os import random import re import sys # Complete the countingValleys function below. if __name__ == '__main__': fptr = open(os.environ['OUTPUT_PATH'], 'w') n = int(input()) s = input() result = countingValleys(n, s) fptr.write(str(result) + '\n') fptr.c...
15.833333
47
0.533333
#!/bin/python3 import math import os import random import re import sys # Complete the countingValleys function below. def countingValleys(n, s): level = 0 counter = 0 for x in s: if level == 0 and x == 'D': counter +=1 if x == 'D': level -=1 if x == 'U': ...
221
0
22
f9306d6410bbc35b8eecc7622623781c97cc4bd2
1,665
py
Python
app/co2_chart/co2_chart.py
Ayshnoor/GA_CO2_forecasting
9dbac5c0c421ba400f0d273951c62493b4a63405
[ "BSD-4-Clause-UC" ]
1
2022-03-30T21:04:59.000Z
2022-03-30T21:04:59.000Z
app/co2_chart/co2_chart.py
Ayshnoor/GA_CO2_forecasting
9dbac5c0c421ba400f0d273951c62493b4a63405
[ "BSD-4-Clause-UC" ]
null
null
null
app/co2_chart/co2_chart.py
Ayshnoor/GA_CO2_forecasting
9dbac5c0c421ba400f0d273951c62493b4a63405
[ "BSD-4-Clause-UC" ]
null
null
null
import pandas as pd import numpy as np import matplotlib.pyplot as plt import plotly import plotly.offline as offline from plotly.graph_objs import * from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
36.195652
122
0.536937
import pandas as pd import numpy as np import matplotlib.pyplot as plt import plotly import plotly.offline as offline from plotly.graph_objs import * from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot def CO2_graph(): df_CO2 = pd.read_csv('data/CO2_Emissions_to_Plot.csv') df_CO2.dro...
1,414
0
23
01ffc4be0fce4607c1290ac16da0c365bcdab95b
472
py
Python
api/tests/integration/tests/formats/incorrect_smiles.py
tsingdao-Tp/Indigo
b2d73faebb6a450e9b3d34fed553fad4f9d0012f
[ "Apache-2.0" ]
204
2015-11-06T21:34:34.000Z
2022-03-30T16:17:01.000Z
api/tests/integration/tests/formats/incorrect_smiles.py
tsingdao-Tp/Indigo
b2d73faebb6a450e9b3d34fed553fad4f9d0012f
[ "Apache-2.0" ]
509
2015-11-05T13:54:43.000Z
2022-03-30T22:15:30.000Z
api/tests/integration/tests/formats/incorrect_smiles.py
tsingdao-Tp/Indigo
b2d73faebb6a450e9b3d34fed553fad4f9d0012f
[ "Apache-2.0" ]
89
2015-11-17T08:22:54.000Z
2022-03-17T04:26:28.000Z
import os import sys sys.path.append(os.path.normpath(os.path.join(os.path.abspath(__file__), '..', '..', '..', "common"))) from env_indigo import * indigo = Indigo() loadSMILES('O[C@H](N)C |&1:0|') loadSMILES('O[C@H](N)C |o1:0|') loadSMILES('O[C@H](N)C |a:3|')
26.222222
102
0.603814
import os import sys sys.path.append(os.path.normpath(os.path.join(os.path.abspath(__file__), '..', '..', '..', "common"))) from env_indigo import * indigo = Indigo() def loadSMILES (smiles): try: mol = indigo.loadMolecule(smiles) print(smiles + ' : OK') except IndigoException as e: pr...
175
0
23
9c68d5ee138c6568a61ac981cf3a5e8869c32d45
3,863
py
Python
docs/conf.py
Minyus/smalldict
51262bf5c45e7457690eba26060a71b57aa3f2a7
[ "Apache-2.0" ]
null
null
null
docs/conf.py
Minyus/smalldict
51262bf5c45e7457690eba26060a71b57aa3f2a7
[ "Apache-2.0" ]
null
null
null
docs/conf.py
Minyus/smalldict
51262bf5c45e7457690eba26060a71b57aa3f2a7
[ "Apache-2.0" ]
null
null
null
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
31.663934
81
0.674346
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
544
0
92
14a4833a5052b371f1f81fdcfd690da01364e9d6
2,630
py
Python
24. MachineLearning_Projects/2. Movie-Rating-Prediction/DataPreprocessor.py
sgeek28/Data-Science
ea0bfd6eeb78f534ab89fc9d4c306adb0087e07e
[ "MIT" ]
null
null
null
24. MachineLearning_Projects/2. Movie-Rating-Prediction/DataPreprocessor.py
sgeek28/Data-Science
ea0bfd6eeb78f534ab89fc9d4c306adb0087e07e
[ "MIT" ]
null
null
null
24. MachineLearning_Projects/2. Movie-Rating-Prediction/DataPreprocessor.py
sgeek28/Data-Science
ea0bfd6eeb78f534ab89fc9d4c306adb0087e07e
[ "MIT" ]
null
null
null
from __future__ import absolute_import, division, print_function import numpy as np import pandas as pd from sklearn.model_selection import train_test_split from sklearn.preprocessing import (Imputer, LabelEncoder,StandardScaler) from sklearn import metrics from sklearn.feature_selection import RFE from sklearn.ensemb...
31.309524
96
0.760456
from __future__ import absolute_import, division, print_function import numpy as np import pandas as pd from sklearn.model_selection import train_test_split from sklearn.preprocessing import (Imputer, LabelEncoder,StandardScaler) from sklearn import metrics from sklearn.feature_selection import RFE from sklearn.ensemb...
0
0
0
cbb3e796210e04f4f92983ed61582f03d5e0252a
2,352
py
Python
pyscf/prop/nsr/rks.py
pavanell/pyscf
c0d19e499685e95dbf4c879539ad3a3ceb6934e2
[ "Apache-2.0" ]
4
2021-03-01T03:46:02.000Z
2022-03-14T05:34:33.000Z
pyscf/prop/nsr/rks.py
pavanell/pyscf
c0d19e499685e95dbf4c879539ad3a3ceb6934e2
[ "Apache-2.0" ]
36
2018-08-22T19:44:03.000Z
2020-05-09T10:02:36.000Z
pyscf/prop/nsr/rks.py
pavanell/pyscf
c0d19e499685e95dbf4c879539ad3a3ceb6934e2
[ "Apache-2.0" ]
4
2018-02-14T16:28:28.000Z
2019-08-12T16:40:30.000Z
#!/usr/bin/env python # Copyright 2014-2019 The PySCF Developers. 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 # # U...
28
74
0.607143
#!/usr/bin/env python # Copyright 2014-2019 The PySCF Developers. 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 # # U...
0
0
0
6d86532dda06fc12ba1312d48c88d955e7a6cb00
60,819
py
Python
src/redfish/ris/rmc.py
skunkie/python-ilorest-library
3904c539e8ec8973c98bcbff5fb6a659d095c41f
[ "Apache-2.0" ]
null
null
null
src/redfish/ris/rmc.py
skunkie/python-ilorest-library
3904c539e8ec8973c98bcbff5fb6a659d095c41f
[ "Apache-2.0" ]
null
null
null
src/redfish/ris/rmc.py
skunkie/python-ilorest-library
3904c539e8ec8973c98bcbff5fb6a659d095c41f
[ "Apache-2.0" ]
null
null
null
### # Copyright 2019 Hewlett Packard Enterprise, Inc. 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 ...
43.380171
101
0.575445
### # Copyright 2019 Hewlett Packard Enterprise, Inc. 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 ...
0
0
0
7829ce8effc93ca5a9a970bb68a619b0b759143e
4,799
py
Python
cs15211/SmallestSubtreewithalltheDeepestNodes.py
JulyKikuAkita/PythonPrac
0ba027d9b8bc7c80bc89ce2da3543ce7a49a403c
[ "Apache-2.0" ]
1
2021-07-05T01:53:30.000Z
2021-07-05T01:53:30.000Z
cs15211/SmallestSubtreewithalltheDeepestNodes.py
JulyKikuAkita/PythonPrac
0ba027d9b8bc7c80bc89ce2da3543ce7a49a403c
[ "Apache-2.0" ]
null
null
null
cs15211/SmallestSubtreewithalltheDeepestNodes.py
JulyKikuAkita/PythonPrac
0ba027d9b8bc7c80bc89ce2da3543ce7a49a403c
[ "Apache-2.0" ]
1
2018-01-08T07:14:08.000Z
2018-01-08T07:14:08.000Z
__source__ = 'https://leetcode.com/problems/smallest-subtree-with-all-the-deepest-nodes/' # Time: O(N) # Space: O(N) # # Description: Leetcode # 865. Smallest Subtree with all the Deepest Nodes # # Given a binary tree rooted at root, the depth of each node is the shortest distance to the root. # # A node is deepest if...
30.373418
100
0.600959
__source__ = 'https://leetcode.com/problems/smallest-subtree-with-all-the-deepest-nodes/' # Time: O(N) # Space: O(N) # # Description: Leetcode # 865. Smallest Subtree with all the Deepest Nodes # # Given a binary tree rooted at root, the depth of each node is the shortest distance to the root. # # A node is deepest if...
634
250
71
92eca9792e56b2e4b65f8809292639465bab0b19
13,314
py
Python
glue_vispy_viewers/isosurface/multi_iso_visual.py
jzuhone/glue-vispy-viewers
d940705f4ba95f8d7a9a74d37fb68c71080b490a
[ "BSD-2-Clause" ]
null
null
null
glue_vispy_viewers/isosurface/multi_iso_visual.py
jzuhone/glue-vispy-viewers
d940705f4ba95f8d7a9a74d37fb68c71080b490a
[ "BSD-2-Clause" ]
null
null
null
glue_vispy_viewers/isosurface/multi_iso_visual.py
jzuhone/glue-vispy-viewers
d940705f4ba95f8d7a9a74d37fb68c71080b490a
[ "BSD-2-Clause" ]
1
2017-09-29T01:24:47.000Z
2017-09-29T01:24:47.000Z
# This file implements a MultiIsoVisual class that can be used to show # multiple layers of isosurface simultaneously. It is derived from the original # VolumeVisual class in vispy.visuals.volume, which is releaed under a BSD license # included here: # # =================================================================...
37.086351
99
0.626108
# This file implements a MultiIsoVisual class that can be used to show # multiple layers of isosurface simultaneously. It is derived from the original # VolumeVisual class in vispy.visuals.volume, which is releaed under a BSD license # included here: # # =================================================================...
2,139
0
78
344ac879b56b01b5877ee80aa1fec6db31cff0f4
4,076
py
Python
main/schema/get_frame.py
kristianmk/tator
0eb75ee9333316b06f773de2b75e8e797a98ffdb
[ "MIT" ]
50
2019-09-18T14:32:18.000Z
2022-03-31T16:26:07.000Z
main/schema/get_frame.py
kristianmk/tator
0eb75ee9333316b06f773de2b75e8e797a98ffdb
[ "MIT" ]
566
2019-09-18T16:33:40.000Z
2022-03-31T20:01:38.000Z
main/schema/get_frame.py
kristianmk/tator
0eb75ee9333316b06f773de2b75e8e797a98ffdb
[ "MIT" ]
19
2019-09-21T20:08:12.000Z
2022-03-17T14:53:11.000Z
from textwrap import dedent from rest_framework.schemas.openapi import AutoSchema
34.252101
96
0.379539
from textwrap import dedent from rest_framework.schemas.openapi import AutoSchema class GetFrameSchema(AutoSchema): def get_operation(self, path, method): operation = super().get_operation(path, method) if method == 'GET': operation['operationId'] = 'GetFrame' operation['tags']...
3,796
12
184
161d98dd7e893f42ba3e669d74b4559ac9418ef4
8,168
py
Python
picoCTF-shell/hacksport/status.py
jingjiey/picoCTF
45112c52b33a44305e3c8210cf7c23a0b1d695ea
[ "MIT" ]
null
null
null
picoCTF-shell/hacksport/status.py
jingjiey/picoCTF
45112c52b33a44305e3c8210cf7c23a0b1d695ea
[ "MIT" ]
null
null
null
picoCTF-shell/hacksport/status.py
jingjiey/picoCTF
45112c52b33a44305e3c8210cf7c23a0b1d695ea
[ "MIT" ]
null
null
null
import json import logging import os import shutil import socket from os.path import join from hacksport.operations import execute from shell_manager.bundle import get_bundle, get_bundle_root from shell_manager.util import (BUNDLE_ROOT, DEPLOYED_ROOT, get_problem, get_problem_root, HACK...
33.203252
95
0.57407
import json import logging import os import shutil import socket from os.path import join from hacksport.operations import execute from shell_manager.bundle import get_bundle, get_bundle_root from shell_manager.util import (BUNDLE_ROOT, DEPLOYED_ROOT, get_problem, get_problem_root, HACK...
2,792
0
135
753ccafba73ef8222766f7e2ae01fcad16ec398d
146
py
Python
src/my_blog/blog/views.py
qoraraf/django-project-ar
01e90fd3c35da8238899f2a03ce759545c8c38d4
[ "bzip2-1.0.6" ]
null
null
null
src/my_blog/blog/views.py
qoraraf/django-project-ar
01e90fd3c35da8238899f2a03ce759545c8c38d4
[ "bzip2-1.0.6" ]
null
null
null
src/my_blog/blog/views.py
qoraraf/django-project-ar
01e90fd3c35da8238899f2a03ce759545c8c38d4
[ "bzip2-1.0.6" ]
null
null
null
from django.shortcuts import render # Create your views here.
24.333333
63
0.719178
from django.shortcuts import render # Create your views here. def home(request): return render(request, 'blog/index.html',{'title':'Home' })
61
0
22
c5401f9d394057390e43429e9777f208ca0b2f97
8,214
py
Python
Management software-yule8/dataBase.py
Afdrif-K/py
f685370236f211b9c09b8593c823dfc9a43d42ce
[ "MIT" ]
null
null
null
Management software-yule8/dataBase.py
Afdrif-K/py
f685370236f211b9c09b8593c823dfc9a43d42ce
[ "MIT" ]
null
null
null
Management software-yule8/dataBase.py
Afdrif-K/py
f685370236f211b9c09b8593c823dfc9a43d42ce
[ "MIT" ]
null
null
null
#encoding=utf-8 import pymysql from time import sleep import datetime import tkinter.messagebox
39.490385
338
0.462503
#encoding=utf-8 import pymysql from time import sleep import datetime import tkinter.messagebox class mysql: def __init__(self, username='root', passname='12345678', ip='localhost', datebasename='yule'): """ :param username: 连接数据库的用户名 :param passname: 连接数据库的密码 :param ip...
0
8,924
24
b2e08fa4ae20d22d80a4fb4be21852caff8d7afa
6,148
py
Python
notebooks/plots.py
igorfratel/MAC0460-1
07b6b93d30684724b0e183d6efe25e89496b04e4
[ "MIT" ]
null
null
null
notebooks/plots.py
igorfratel/MAC0460-1
07b6b93d30684724b0e183d6efe25e89496b04e4
[ "MIT" ]
1
2018-09-16T16:31:36.000Z
2018-09-16T16:31:36.000Z
SecondAssigment/plots.py
PaiZuZe/MAC0460-machineLearning
98031412d8835afad0fde318b5c57a613bfb4fc8
[ "Apache-2.0" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D def plot_points_regression(x, y, title, xlabel, ylabel, prediction=None, ...
33.232432
86
0.519356
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D def plot_points_regression(x, y, title, xlabel, ylabel, prediction=None, ...
0
0
0
4c469f05b737e95be7e425137efa749b31865311
692
py
Python
jinete/storers/formatters/hashcode.py
PhilippeGalvan/jinete
b7b22f8265935bc41b42ad8c4bf7464dc21ab424
[ "MIT" ]
null
null
null
jinete/storers/formatters/hashcode.py
PhilippeGalvan/jinete
b7b22f8265935bc41b42ad8c4bf7464dc21ab424
[ "MIT" ]
null
null
null
jinete/storers/formatters/hashcode.py
PhilippeGalvan/jinete
b7b22f8265935bc41b42ad8c4bf7464dc21ab424
[ "MIT" ]
null
null
null
from __future__ import annotations from .abc import StorerFormatter
30.086957
76
0.654624
from __future__ import annotations from .abc import StorerFormatter class HashCodeStorerFormatter(StorerFormatter): def __init__(self, remove_empty_routes: bool = True, *args, **kwargs): kwargs['remove_empty_routes'] = remove_empty_routes super().__init__( *args, **kwargs, ) ...
475
124
23
44e43d6f5653859b69eac5563e3ed3a41076c04e
1,296
py
Python
sanic_crudvue/crud/__init__.py
truexin1292/SanicCRUD-vue
0601f9ee6785542dbf72ae7ecacbf12a0bd271ae
[ "MIT" ]
393
2017-06-16T13:39:29.000Z
2022-03-17T04:18:10.000Z
sanic_crudvue/crud/__init__.py
truexin1292/SanicCRUD-vue
0601f9ee6785542dbf72ae7ecacbf12a0bd271ae
[ "MIT" ]
34
2017-05-23T01:44:25.000Z
2020-08-13T03:56:50.000Z
sanic_crudvue/crud/__init__.py
truexin1292/SanicCRUD-vue
0601f9ee6785542dbf72ae7ecacbf12a0bd271ae
[ "MIT" ]
117
2017-06-19T02:56:05.000Z
2021-12-21T01:15:06.000Z
from .views import crud_bp from .models import db, ShanghaiPersonInfo __all__ = ['crud_bp', 'db', 'ShanghaiPersonInfo'] LOGO = """ ▄▄▄▄▄ ▀▀▀██████▄▄▄ _______________ ▄▄▄▄▄ █████████▄ / \\ ▀▀▀▀█████▌ ▀▐▄ ▀▐█ | Gotta go fast! | ▀▀███...
38.117647
77
0.19213
from .views import crud_bp from .models import db, ShanghaiPersonInfo __all__ = ['crud_bp', 'db', 'ShanghaiPersonInfo'] LOGO = """ ▄▄▄▄▄ ▀▀▀██████▄▄▄ _______________ ▄▄▄▄▄ █████████▄ / \\ ▀▀▀▀█████▌ ▀▐▄ ▀▐█ | Gotta go fast! | ▀▀███...
0
0
0
9a3315026b9579852128cf0dfa98198d9887a185
308
py
Python
decode.py
rezwanshubh/translator_en_et
4529acfae78064a594025dd92d443e2cc4470743
[ "MIT" ]
null
null
null
decode.py
rezwanshubh/translator_en_et
4529acfae78064a594025dd92d443e2cc4470743
[ "MIT" ]
null
null
null
decode.py
rezwanshubh/translator_en_et
4529acfae78064a594025dd92d443e2cc4470743
[ "MIT" ]
null
null
null
import sentencepiece as spm from gtts import gTTS sp = spm.SentencePieceProcessor() sp.Load("./dataset/sp.et.model") message = open("pred.txt", "r", encoding="utf8").read() message_decoded = sp.DecodePieces(message.split()) print(message_decoded) tts = gTTS(message_decoded, lang='et') tts.save('et.mp3')
23.692308
55
0.737013
import sentencepiece as spm from gtts import gTTS sp = spm.SentencePieceProcessor() sp.Load("./dataset/sp.et.model") message = open("pred.txt", "r", encoding="utf8").read() message_decoded = sp.DecodePieces(message.split()) print(message_decoded) tts = gTTS(message_decoded, lang='et') tts.save('et.mp3')
0
0
0
8be1d6c697fe29070becb6e1bd44fa5e6587a9c3
4,370
py
Python
happy/HappyDNS.py
yunhanw-google/happy
d482f1eeb188a03e3bcd1aefe54424fb2589c9e9
[ "Apache-2.0" ]
42
2017-09-20T07:09:59.000Z
2021-11-08T12:08:30.000Z
happy/HappyDNS.py
yunhanw-google/happy
d482f1eeb188a03e3bcd1aefe54424fb2589c9e9
[ "Apache-2.0" ]
30
2018-06-16T14:48:14.000Z
2020-10-13T04:02:35.000Z
happy/HappyDNS.py
yunhanw-google/happy
d482f1eeb188a03e3bcd1aefe54424fb2589c9e9
[ "Apache-2.0" ]
17
2017-09-20T10:37:56.000Z
2021-02-09T06:27:44.000Z
#!/usr/bin/env python3 # # Copyright (c) 2016-2017 Nest Labs, Inc. # 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/lice...
27.484277
77
0.575286
#!/usr/bin/env python3 # # Copyright (c) 2016-2017 Nest Labs, Inc. # 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/lice...
2,513
0
212
0e80fc5d90b31441212d57a7e16ffb6bee0b7994
6,428
py
Python
ios_device/util/utils.py
Itaybre/py-ios-device
d1fe5d0dc6b5288ac9a5e65b49d08e924ff9901e
[ "MIT" ]
null
null
null
ios_device/util/utils.py
Itaybre/py-ios-device
d1fe5d0dc6b5288ac9a5e65b49d08e924ff9901e
[ "MIT" ]
null
null
null
ios_device/util/utils.py
Itaybre/py-ios-device
d1fe5d0dc6b5288ac9a5e65b49d08e924ff9901e
[ "MIT" ]
null
null
null
""" Utils """ from ios_device.util.service_info import MyServiceInfo __all__ = ['DictAttrProperty', 'DictAttrFieldNotFoundError'] import socket import struct import threading from zeroconf import Zeroconf, ServiceBrowser, ServiceInfo _NotSet = object()
39.195122
120
0.628967
""" Utils """ from ios_device.util.service_info import MyServiceInfo __all__ = ['DictAttrProperty', 'DictAttrFieldNotFoundError'] import socket import struct import threading from zeroconf import Zeroconf, ServiceBrowser, ServiceInfo _NotSet = object() class cached_property(object): def __init__(self, func): ...
3,451
2,494
221
f4b5530760837db610da0a77ea931d9c304e6baa
5,320
py
Python
mailing/migrations/0003_auto_20170213_1640.py
salazarpardo/redinnovacion
3f7c13af0af1887112a0492aea7782871fba0129
[ "CC-BY-3.0" ]
null
null
null
mailing/migrations/0003_auto_20170213_1640.py
salazarpardo/redinnovacion
3f7c13af0af1887112a0492aea7782871fba0129
[ "CC-BY-3.0" ]
null
null
null
mailing/migrations/0003_auto_20170213_1640.py
salazarpardo/redinnovacion
3f7c13af0af1887112a0492aea7782871fba0129
[ "CC-BY-3.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import mailing.models import ckeditor_uploader.fields from django.conf import settings
41.889764
150
0.568421
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import mailing.models import ckeditor_uploader.fields from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL...
0
5,103
23
988f931e36ed51ef5241d50ca86574206eb243b0
1,065
py
Python
distruct/tests/test_Distructure.py
KIT-MBS/distruct
c8633f4c90bbac8669efae43bda765dfa8b7348a
[ "MIT" ]
2
2019-07-23T23:32:42.000Z
2021-07-19T11:08:00.000Z
distruct/tests/test_Distructure.py
KIT-MBS/distruct
c8633f4c90bbac8669efae43bda765dfa8b7348a
[ "MIT" ]
1
2020-12-21T20:11:38.000Z
2021-01-18T18:28:32.000Z
distruct/tests/test_Distructure.py
KIT-MBS/distruct
c8633f4c90bbac8669efae43bda765dfa8b7348a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 ##################################### # # Filename : test_Distructure.py # # Projectname : diSTruct # # Author : Oskar Taubert # # Creation Date : Mon 11 Jun 2018 04:04:59 PM CEST # # Last Modified : Thu 28 Mar 2019 11:14:02 AM CET # ##################################### from Bio import SeqIO fr...
20.882353
65
0.6
#!/usr/bin/env python3 ##################################### # # Filename : test_Distructure.py # # Projectname : diSTruct # # Author : Oskar Taubert # # Creation Date : Mon 11 Jun 2018 04:04:59 PM CEST # # Last Modified : Thu 28 Mar 2019 11:14:02 AM CET # ##################################### from Bio import SeqIO fr...
525
0
23
24682ec490e9b96e8887c35ef87b3b218632a56a
969
py
Python
tests/tests_frankDataset.py
gcramerb/TransferLearning-Sensors
44d7847d28ac8ae66e74bd458c612f76a1725946
[ "MIT" ]
null
null
null
tests/tests_frankDataset.py
gcramerb/TransferLearning-Sensors
44d7847d28ac8ae66e74bd458c612f76a1725946
[ "MIT" ]
null
null
null
tests/tests_frankDataset.py
gcramerb/TransferLearning-Sensors
44d7847d28ac8ae66e74bd458c612f76a1725946
[ "MIT" ]
null
null
null
from Dataset import Datasets import numpy as np import csv, sys, glob, os import pandas as pd from enum import Enum from Dataset.Ucihar import UCIHAR,SignalsUCIHAR from Dataset.Dsads import DSADS ,SignalsDsads from Dataset.Uschad import USCHAD,SignalsUschad from Dataset.Pamap2 import PAMAP2,SignalsPAMAP2 from Process...
32.3
107
0.769866
from Dataset import Datasets import numpy as np import csv, sys, glob, os import pandas as pd from enum import Enum from Dataset.Ucihar import UCIHAR,SignalsUCIHAR from Dataset.Dsads import DSADS ,SignalsDsads from Dataset.Uschad import USCHAD,SignalsUschad from Dataset.Pamap2 import PAMAP2,SignalsPAMAP2 from Process...
0
0
0
f822b0f7c6adb8dccad24143541d43823b7800d5
4,355
py
Python
chebi/inchi-ref-from-chebi.py
rwst/wikidata-molbio
198587fda16f81cf241c398650f79594c07cbdee
[ "CC0-1.0" ]
2
2021-05-16T09:42:59.000Z
2022-03-14T11:17:15.000Z
chebi/inchi-ref-from-chebi.py
rwst/wikidata-molbio
198587fda16f81cf241c398650f79594c07cbdee
[ "CC0-1.0" ]
null
null
null
chebi/inchi-ref-from-chebi.py
rwst/wikidata-molbio
198587fda16f81cf241c398650f79594c07cbdee
[ "CC0-1.0" ]
1
2021-05-16T09:54:14.000Z
2021-05-16T09:54:14.000Z
import os, json, argparse, sys, datetime, time import pronto, six """ Check all existing ChEBI items have their InChi keys and the current ChEBI release as source. """ script = os.path.basename(sys.argv[0])[:-3] write_line_to._hdl = {} # Initiate the parser parser = argparse.ArgumentParser() parser.add_argument("-r...
27.916667
98
0.574971
import os, json, argparse, sys, datetime, time import pronto, six """ Check all existing ChEBI items have their InChi keys and the current ChEBI release as source. """ script = os.path.basename(sys.argv[0])[:-3] def write_line_to(name, string): f = write_line_to._hdl.get(name) if f is None: f = open(...
602
0
123
0ff32409c5e774ae8889fc901ad44667a327295d
232
py
Python
ksink/html.py
sitebolts/ksink
ecb3cfc3bc4d8306101e4a09011e43650fb60cb4
[ "MIT" ]
1
2021-04-07T17:14:17.000Z
2021-04-07T17:14:17.000Z
ksink/html.py
sitebolts/ksink
ecb3cfc3bc4d8306101e4a09011e43650fb60cb4
[ "MIT" ]
null
null
null
ksink/html.py
sitebolts/ksink
ecb3cfc3bc4d8306101e4a09011e43650fb60cb4
[ "MIT" ]
null
null
null
#Sanitize HTML output #Example: htmlspecialchars('I love the <b> tag') == 'I love the &lt;b&gt; tag'
46.4
102
0.607759
#Sanitize HTML output #Example: htmlspecialchars('I love the <b> tag') == 'I love the &lt;b&gt; tag' def htmlspecialchars(text): return text.replace("&", "&amp;").replace('"', "&quot;").replace("<", "&lt;").replace(">", "&gt;")
109
0
22
76f76a9d3ff89958230f4a6f6feb8b023efdfd7d
4,978
py
Python
imagespace_weapons/server/__init__.py
amirhosf/image_space
f935ad0db2e575473e089ebb2d6a8b74b0353323
[ "Apache-2.0" ]
null
null
null
imagespace_weapons/server/__init__.py
amirhosf/image_space
f935ad0db2e575473e089ebb2d6a8b74b0353323
[ "Apache-2.0" ]
null
null
null
imagespace_weapons/server/__init__.py
amirhosf/image_space
f935ad0db2e575473e089ebb2d6a8b74b0353323
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware 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 ...
34.811189
90
0.597228
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware 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 ...
2,707
272
92
c1ef0b98ca81329022bdfc1e47eececa148dfa46
340
py
Python
src/core/search_index.py
atul94/similarity-search-service
5e1f915f82f4ec74145cf1ef4d9a3021d46818ea
[ "Apache-2.0" ]
null
null
null
src/core/search_index.py
atul94/similarity-search-service
5e1f915f82f4ec74145cf1ef4d9a3021d46818ea
[ "Apache-2.0" ]
null
null
null
src/core/search_index.py
atul94/similarity-search-service
5e1f915f82f4ec74145cf1ef4d9a3021d46818ea
[ "Apache-2.0" ]
null
null
null
""" Define the abstract class for Search Index""" class SearchIndex: """Search Index handles creation of various search index, getting values, destroying search index"""
22.666667
104
0.691176
""" Define the abstract class for Search Index""" class SearchIndex: """Search Index handles creation of various search index, getting values, destroying search index""" def create_search_index(self): pass def clear_search_index(self): pass def get_similar_vectors(self, query_vec, t...
83
0
81
560a336a1800ba309203dfbbb84e7783721fd041
26,887
py
Python
data_loader.py
PAI-SmallIsAllYourNeed/Mixup-AMP
55ba0ebd9573d0a0f7aaa225f07b280900fb2431
[ "MIT" ]
5
2021-09-13T02:59:57.000Z
2021-09-20T03:20:08.000Z
data_loader.py
PAI-SmallIsAllYourNeed/Mixup-AMP
55ba0ebd9573d0a0f7aaa225f07b280900fb2431
[ "MIT" ]
null
null
null
data_loader.py
PAI-SmallIsAllYourNeed/Mixup-AMP
55ba0ebd9573d0a0f7aaa225f07b280900fb2431
[ "MIT" ]
null
null
null
import csv import random import re import sys import tqdm import numpy as np import torch from torch.utils.data import TensorDataset from transformers.tokenization_bert import BertTokenizer def _convert_examples_to_features(examples, label_list, max_seq_length, tokenizer,...
34.648196
111
0.568379
import csv import random import re import sys import tqdm import numpy as np import torch from torch.utils.data import TensorDataset from transformers.tokenization_bert import BertTokenizer def load_glove_txt(file_path="glove.840B.300d.txt"): results = {} num_file = sum([1 for i in open(file_path, "r", encodi...
16,367
2
699
65cafdb65b9ed7cb49e3240a7dd50f0a8d1b6d87
2,482
py
Python
main.py
UrMBCMRabbont/Covid_prediction_ML
8103daacf82a4816a9cbd9705ce8a0914149dd0d
[ "MIT" ]
null
null
null
main.py
UrMBCMRabbont/Covid_prediction_ML
8103daacf82a4816a9cbd9705ce8a0914149dd0d
[ "MIT" ]
null
null
null
main.py
UrMBCMRabbont/Covid_prediction_ML
8103daacf82a4816a9cbd9705ce8a0914149dd0d
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt import torch import torch.nn as nn from torch.utils.data import Dataset, DataLoader import pandas as pd import os from MyModule import MyModel from MyDataset import MyDataset lr = 0.001 batch_size = 10 epochs = 30 device = "cpu" result = pd.read_csv("covid.train.csv"...
23.196262
89
0.658743
import numpy as np import matplotlib.pyplot as plt import torch import torch.nn as nn from torch.utils.data import Dataset, DataLoader import pandas as pd import os from MyModule import MyModel from MyDataset import MyDataset lr = 0.001 batch_size = 10 epochs = 30 device = "cpu" result = pd.read_csv("covid.train.csv"...
0
0
0
64ce1f2667a0dac2ea1861b7b66cd3ed80e120b5
2,758
py
Python
openprocurement/audit/api/tests/base.py
ProzorroUKR/openprocurement.audit.api
a17836e29bca28d9151c091e1d2e42de9f70b949
[ "Apache-2.0" ]
1
2018-05-21T08:14:55.000Z
2018-05-21T08:14:55.000Z
openprocurement/audit/api/tests/base.py
ProzorroUKR/openprocurement.audit.api
a17836e29bca28d9151c091e1d2e42de9f70b949
[ "Apache-2.0" ]
59
2018-05-18T02:09:47.000Z
2019-05-29T12:10:06.000Z
openprocurement/audit/api/tests/base.py
ProzorroUKR/openprocurement.audit.api
a17836e29bca28d9151c091e1d2e42de9f70b949
[ "Apache-2.0" ]
1
2020-06-15T11:04:25.000Z
2020-06-15T11:04:25.000Z
# -*- coding: utf-8 -*- import os import unittest from types import FunctionType import webtest from paste.deploy.loadwsgi import loadapp from openprocurement.audit.api.constants import VERSION from openprocurement.audit.api.design import sync_design COUCHBD_NAME_SETTING = 'couchdb.db_name' def snitch(func): "...
30.988764
93
0.683466
# -*- coding: utf-8 -*- import os import unittest from types import FunctionType import webtest from paste.deploy.loadwsgi import loadapp from openprocurement.audit.api.constants import VERSION from openprocurement.audit.api.design import sync_design COUCHBD_NAME_SETTING = 'couchdb.db_name' def snitch(func): "...
1,119
262
126
8cc1a636ce154ac0b30f8dc4f9148e794cbee7d4
569
py
Python
shot_detector/filters/dsl/filter_tuple.py
w495/shot_detector
617ff45c9c3c96bbd9a975aef15f1b2697282b9c
[ "BSD-3-Clause" ]
18
2015-09-27T21:34:18.000Z
2022-03-24T12:14:51.000Z
shot_detector/filters/dsl/filter_tuple.py
w495/shot_detector
617ff45c9c3c96bbd9a975aef15f1b2697282b9c
[ "BSD-3-Clause" ]
6
2021-03-18T21:21:35.000Z
2022-03-11T23:32:55.000Z
shot_detector/filters/dsl/filter_tuple.py
w495/shot_detector
617ff45c9c3c96bbd9a975aef15f1b2697282b9c
[ "BSD-3-Clause" ]
3
2017-09-14T20:53:26.000Z
2021-12-18T19:18:18.000Z
# -*- coding: utf8 -*- """ This is part of shot detector. Produced by w495 at 2017.05.04 04:18:27 """ from __future__ import absolute_import, division, print_function from .filter_operator import FilterOperator class FilterTuple(FilterOperator): """ ... """ def reduce_with_op_func(self,...
20.321429
64
0.622144
# -*- coding: utf8 -*- """ This is part of shot detector. Produced by w495 at 2017.05.04 04:18:27 """ from __future__ import absolute_import, division, print_function from .filter_operator import FilterOperator class FilterTuple(FilterOperator): """ ... """ def reduce_with_op_func(self,...
0
0
0
18e045c80c7d1d2feefe4b8cd171ccb35c1ee094
5,487
py
Python
tests/core_tensor_product_test copy.py
yilunliao/e3nn-jax
dfe472eb3dcc58abb07ae91eedc39f6fa6926bc8
[ "Apache-2.0" ]
null
null
null
tests/core_tensor_product_test copy.py
yilunliao/e3nn-jax
dfe472eb3dcc58abb07ae91eedc39f6fa6926bc8
[ "Apache-2.0" ]
null
null
null
tests/core_tensor_product_test copy.py
yilunliao/e3nn-jax
dfe472eb3dcc58abb07ae91eedc39f6fa6926bc8
[ "Apache-2.0" ]
null
null
null
import jax import jax.numpy as jnp import pytest from e3nn_jax import (FunctionalFullyConnectedTensorProduct, FunctionalTensorProduct, FunctionalTensorSquare, Irreps) from e3nn_jax.util import prod @pytest.mark.parametrize('connection_mode', ['uvw', 'uvu', 'uvv']) @pytest.mark.parametrize('jitte...
33.254545
103
0.60944
import jax import jax.numpy as jnp import pytest from e3nn_jax import (FunctionalFullyConnectedTensorProduct, FunctionalTensorProduct, FunctionalTensorSquare, Irreps) from e3nn_jax.util import prod @pytest.mark.parametrize('connection_mode', ['uvw', 'uvu', 'uvv']) @pytest.mark.parametrize('jitte...
4,652
0
159
0545c1def3b56d917ea1307e094448e3467ec2d9
2,997
py
Python
scraper.py
jhamrick/cogsci-proceedings-analysis
c3c8b0abd8b9ce639f6de0aea52aec46c2c8abca
[ "MIT" ]
null
null
null
scraper.py
jhamrick/cogsci-proceedings-analysis
c3c8b0abd8b9ce639f6de0aea52aec46c2c8abca
[ "MIT" ]
null
null
null
scraper.py
jhamrick/cogsci-proceedings-analysis
c3c8b0abd8b9ce639f6de0aea52aec46c2c8abca
[ "MIT" ]
1
2020-05-11T10:38:38.000Z
2020-05-11T10:38:38.000Z
import urllib2 import pandas as pd from bs4 import BeautifulSoup, element if __name__ == "__main__": pathname = "cogsci_proceedings_raw.csv" papers = get_papers() papers.to_csv(pathname, encoding='utf-8')
26.06087
69
0.561895
import urllib2 import pandas as pd from bs4 import BeautifulSoup, element def load_html(url): response = urllib2.urlopen(url) html = response.read().replace("&nbsp;", "") return html def get_papers_table(year): url = "https://mindmodeling.org/cogsci{}/".format(year) soup = BeautifulSoup(load_htm...
2,682
0
92
dbd9e6ba1b71ff55185c2c579288b26c93d77ff8
2,393
py
Python
netbox/circuits/tables.py
BrnoPCmaniak/netbox
7b517abdb68a6324950dfd0375861163c7bfff00
[ "Apache-2.0" ]
null
null
null
netbox/circuits/tables.py
BrnoPCmaniak/netbox
7b517abdb68a6324950dfd0375861163c7bfff00
[ "Apache-2.0" ]
null
null
null
netbox/circuits/tables.py
BrnoPCmaniak/netbox
7b517abdb68a6324950dfd0375861163c7bfff00
[ "Apache-2.0" ]
null
null
null
import django_tables2 as tables from django_tables2.utils import Accessor from tenancy.tables import COL_TENANT from utilities.tables import BaseTable, ToggleColumn from .models import Circuit, CircuitType, Provider CIRCUITTYPE_ACTIONS = """ <a href="{% url 'circuits:circuittype_changelog' slug=record.slug %}" class=...
28.831325
119
0.672378
import django_tables2 as tables from django_tables2.utils import Accessor from tenancy.tables import COL_TENANT from utilities.tables import BaseTable, ToggleColumn from .models import Circuit, CircuitType, Provider CIRCUITTYPE_ACTIONS = """ <a href="{% url 'circuits:circuittype_changelog' slug=record.slug %}" class=...
0
1,461
92
a3f5c6f18f6506d05b910d0cae6b785bbb12ef0d
1,608
py
Python
core/entities/paintballgun.py
TheArchives/Nexus
5482def8b50562fdbae980cda9b1708bfad8bffb
[ "BSD-2-Clause" ]
1
2021-04-06T18:54:31.000Z
2021-04-06T18:54:31.000Z
core/entities/paintballgun.py
TheArchives/Nexus
5482def8b50562fdbae980cda9b1708bfad8bffb
[ "BSD-2-Clause" ]
null
null
null
core/entities/paintballgun.py
TheArchives/Nexus
5482def8b50562fdbae980cda9b1708bfad8bffb
[ "BSD-2-Clause" ]
1
2021-12-20T18:11:25.000Z
2021-12-20T18:11:25.000Z
# The Nexus software is licensed under the BSD 2-Clause license. # # You should have recieved a copy of this license with the software. # If you did not, you can find one at the following link. # # http://opensource.org/licenses/bsd-license.php if world.blockstore.raw_blocks[world.blockstore.get_offset(x,y+1,z)] != '...
50.25
152
0.626866
# The Nexus software is licensed under the BSD 2-Clause license. # # You should have recieved a copy of this license with the software. # If you did not, you can find one at the following link. # # http://opensource.org/licenses/bsd-license.php if world.blockstore.raw_blocks[world.blockstore.get_offset(x,y+1,z)] != '...
0
0
0
2764d602a3d2bfe05b03c87ea1896beeeb95d1a7
985
py
Python
code/sets_with_a_given_least_common_multiple/sol_590.py
bhavinjawade/project-euler-solutions
56bf6a282730ed4b9b875fa081cf4509d9939d98
[ "Apache-2.0" ]
2
2020-07-16T08:16:32.000Z
2020-10-01T07:16:48.000Z
code/sets_with_a_given_least_common_multiple/sol_590.py
Psingh12354/project-euler-solutions
56bf6a282730ed4b9b875fa081cf4509d9939d98
[ "Apache-2.0" ]
null
null
null
code/sets_with_a_given_least_common_multiple/sol_590.py
Psingh12354/project-euler-solutions
56bf6a282730ed4b9b875fa081cf4509d9939d98
[ "Apache-2.0" ]
1
2021-05-07T18:06:08.000Z
2021-05-07T18:06:08.000Z
# -*- coding: utf-8 -*- ''' File name: code\sets_with_a_given_least_common_multiple\sol_590.py Author: Vaidic Joshi Date created: Oct 20, 2018 Python Version: 3.x ''' # Solution to Project Euler Problem #590 :: Sets with a given Least Common Multiple # # For more information see: # https://projecteul...
24.625
128
0.671066
# -*- coding: utf-8 -*- ''' File name: code\sets_with_a_given_least_common_multiple\sol_590.py Author: Vaidic Joshi Date created: Oct 20, 2018 Python Version: 3.x ''' # Solution to Project Euler Problem #590 :: Sets with a given Least Common Multiple # # For more information see: # https://projecteul...
0
0
0
a4d113860081847c877804f370ea139336a96f75
714
py
Python
Controller/vehicle_control/controller_simulator.py
Ernstsen/RC-car
eda8ec6ae28686380c06f442c889ea89a077315b
[ "MIT" ]
null
null
null
Controller/vehicle_control/controller_simulator.py
Ernstsen/RC-car
eda8ec6ae28686380c06f442c889ea89a077315b
[ "MIT" ]
3
2021-03-23T15:13:14.000Z
2021-03-23T16:15:20.000Z
Controller/vehicle_control/controller_simulator.py
Ernstsen/RC-car
eda8ec6ae28686380c06f442c889ea89a077315b
[ "MIT" ]
null
null
null
from .vehicle_controller_interface import VehicleControllerI class ControllerSimulator(VehicleControllerI): """ Controller implementation with """
23.8
60
0.55042
from .vehicle_controller_interface import VehicleControllerI class ControllerSimulator(VehicleControllerI): """ Controller implementation with """ def __init__(self): self.drive: int = 0 self.gear: int = 1 self.throttle: int = 0 self.direction: int = 5 def set_dri...
418
0
135
b16cbc4f436f336fab55b5a32175ff8a722ade95
543
py
Python
tests/test_ext_duration.py
supyrow/sphinx
680417a10df7e5c35c0ff65979bd22906b9a5f1e
[ "BSD-2-Clause" ]
1
2022-01-25T17:11:03.000Z
2022-01-25T17:11:03.000Z
tests/test_ext_duration.py
supyrow/sphinx
680417a10df7e5c35c0ff65979bd22906b9a5f1e
[ "BSD-2-Clause" ]
4
2022-01-23T07:54:28.000Z
2022-03-02T14:35:14.000Z
tests/test_ext_duration.py
supyrow/sphinx
680417a10df7e5c35c0ff65979bd22906b9a5f1e
[ "BSD-2-Clause" ]
null
null
null
""" test_ext_duration ~~~~~~~~~~~~~~~~~ Test sphinx.ext.duration extension. :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import pytest @pytest.mark.sphinx('dummy', testroot='basic', confoverrides={'ex...
23.608696
74
0.639042
""" test_ext_duration ~~~~~~~~~~~~~~~~~ Test sphinx.ext.duration extension. :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import pytest @pytest.mark.sphinx('dummy', testroot='basic', confoverrides={'ex...
164
0
22
bec806cc985bc42f3d5dfc7367b1b10442fda53a
4,692
py
Python
racer-rl.py
webdizz/self-driving-car-pytorch
491cdc54221df079d558bd95aade0608dfd8d3df
[ "Apache-2.0" ]
7
2017-12-28T02:03:42.000Z
2020-11-02T12:12:49.000Z
racer-rl.py
webdizz/self-driving-car-pytorch
491cdc54221df079d558bd95aade0608dfd8d3df
[ "Apache-2.0" ]
null
null
null
racer-rl.py
webdizz/self-driving-car-pytorch
491cdc54221df079d558bd95aade0608dfd8d3df
[ "Apache-2.0" ]
1
2021-08-04T06:08:17.000Z
2021-08-04T06:08:17.000Z
import argparse import logging import gym import universe import numpy as np from itertools import count import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torch.autograd as autograd from torch.autograd import Variable from reframe import resize_frame parser = arg...
34.248175
116
0.620205
import argparse import logging import gym import universe import numpy as np from itertools import count import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torch.autograd as autograd from torch.autograd import Variable from reframe import resize_frame parser = arg...
2,757
3
122
605e64f1de9a893be5fe7eb7977eada43e7f4212
1,348
py
Python
tools/validators/instance_validator/validate/field_translation.py
ljulliar/digitalbuildings
5b5be8db9e00d967911065f5247a8d39512e6504
[ "Apache-2.0" ]
1
2021-01-02T19:02:52.000Z
2021-01-02T19:02:52.000Z
tools/validators/instance_validator/validate/field_translation.py
ljulliar/digitalbuildings
5b5be8db9e00d967911065f5247a8d39512e6504
[ "Apache-2.0" ]
1
2021-01-06T18:45:30.000Z
2021-01-06T18:45:30.000Z
tools/validators/instance_validator/validate/field_translation.py
ljulliar/digitalbuildings
5b5be8db9e00d967911065f5247a8d39512e6504
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the License); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, sof...
40.848485
75
0.75816
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the License); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, sof...
198
0
24
9d40404e9db5c16df45100f0445a0ce6f009524b
4,854
py
Python
BitTorrent-5.2.2/torrentinfo-console.py
jpabb7/p2pScrapper
0fd57049606864223eb45f956a58adda1231af88
[ "MIT" ]
4
2016-04-26T03:43:54.000Z
2016-11-17T08:09:04.000Z
BitTorrent-5.2.2/torrentinfo-console.py
jpabb7/p2pScrapper
0fd57049606864223eb45f956a58adda1231af88
[ "MIT" ]
17
2015-01-05T21:06:22.000Z
2015-12-07T20:45:44.000Z
BitTorrent-5.2.2/torrentinfo-console.py
jpabb7/p2pScrapper
0fd57049606864223eb45f956a58adda1231af88
[ "MIT" ]
7
2015-07-28T09:17:17.000Z
2021-11-07T02:29:41.000Z
#!/usr/bin/env python # The contents of this file are subject to the BitTorrent Open Source License # Version 1.1 (the License). You may not copy or use this file, in either # source code or executable form, except in compliance with the License. You # may obtain a copy of the License at http://www.bittorrent.com/li...
37.627907
78
0.561393
#!/usr/bin/env python # The contents of this file are subject to the BitTorrent Open Source License # Version 1.1 (the License). You may not copy or use this file, in either # source code or executable form, except in compliance with the License. You # may obtain a copy of the License at http://www.bittorrent.com/li...
0
0
0
787a606c676269a99903652bf8012db39d6d96ef
330
py
Python
website/article/migrations/0005_remove_article_preface.py
Bigpop/Vue3-Django-drf
899fca9fed3a7d51a0e39a5ac4ec2103596eedef
[ "MIT" ]
1
2021-12-10T14:11:06.000Z
2021-12-10T14:11:06.000Z
article/migrations/0005_remove_article_preface.py
Bigpop/django-blog-template
96f015024521c3d7c2d0ff409202940d7ffbfcec
[ "MIT" ]
null
null
null
article/migrations/0005_remove_article_preface.py
Bigpop/django-blog-template
96f015024521c3d7c2d0ff409202940d7ffbfcec
[ "MIT" ]
null
null
null
# Generated by Django 2.2.1 on 2021-10-24 19:38 from django.db import migrations
18.333333
47
0.593939
# Generated by Django 2.2.1 on 2021-10-24 19:38 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('article', '0004_auto_20211024_1742'), ] operations = [ migrations.RemoveField( model_name='article', name='preface', ...
0
224
23
8211211687538c1d6495ab9d1a7d5b510fb89062
559
py
Python
core/tasks.py
SM2015/orchid
41ec024a6faaa52a7568f4430b52173a3eb98667
[ "MIT" ]
null
null
null
core/tasks.py
SM2015/orchid
41ec024a6faaa52a7568f4430b52173a3eb98667
[ "MIT" ]
null
null
null
core/tasks.py
SM2015/orchid
41ec024a6faaa52a7568f4430b52173a3eb98667
[ "MIT" ]
null
null
null
from __future__ import absolute_import from celery import shared_task from actstream import action import core.models as cm import time @shared_task @shared_task import boto import logging logging.basicConfig() from boto.elastictranscoder.exceptions import ( InternalServiceException, LimitExceededException,...
19.964286
47
0.781753
from __future__ import absolute_import from celery import shared_task from actstream import action import core.models as cm import time @shared_task def experimental(numbers): print "experiment occuring" time.sleep(30) return True @shared_task def update_cache(): print "updating cache" time.sleep...
132
0
44
98ec5f88ad934bdc52d219f4b0d284b21a48a09b
352
py
Python
paint.py
SeanLi-OI/ICM-2019-Code
5b63cccfd67e4ee1730d5937d9e0697a33b25f9b
[ "MIT" ]
1
2019-01-25T07:48:47.000Z
2019-01-25T07:48:47.000Z
paint.py
SeanLi-OI/ICM-2019-Code
5b63cccfd67e4ee1730d5937d9e0697a33b25f9b
[ "MIT" ]
null
null
null
paint.py
SeanLi-OI/ICM-2019-Code
5b63cccfd67e4ee1730d5937d9e0697a33b25f9b
[ "MIT" ]
null
null
null
import numpy as np import pylab as pl times=np.arange(3,6,0.01) #times为x的值,0为起点,5为终点,0,01为步长 fun=lambda x:(x-5.4)**2+24.24#np.cos(20*x)*np.exp(-pl.absolute(x)) #fun为关于x的函数,也就是对应于x的y的值 pl.plot(times,fun(times)) #画图 pl.xlabel("time period length") #x轴的标记 pl.ylabel("evacuation time") #y轴的标记 #pl.title("damped oscill...
32
92
0.704545
import numpy as np import pylab as pl times=np.arange(3,6,0.01) #times为x的值,0为起点,5为终点,0,01为步长 fun=lambda x:(x-5.4)**2+24.24#np.cos(20*x)*np.exp(-pl.absolute(x)) #fun为关于x的函数,也就是对应于x的y的值 pl.plot(times,fun(times)) #画图 pl.xlabel("time period length") #x轴的标记 pl.ylabel("evacuation time") #y轴的标记 #pl.title("damped oscill...
0
0
0
3fe73d595a0bfe5f700a289b6e5dd9a5fe782ac2
30,016
py
Python
code/synchronization/osgameclones_synchronization.py
pazkero/opensourcegames
6cde84b7a1fc893338174a66c142ff423f87e9ea
[ "CC0-1.0" ]
null
null
null
code/synchronization/osgameclones_synchronization.py
pazkero/opensourcegames
6cde84b7a1fc893338174a66c142ff423f87e9ea
[ "CC0-1.0" ]
null
null
null
code/synchronization/osgameclones_synchronization.py
pazkero/opensourcegames
6cde84b7a1fc893338174a66c142ff423f87e9ea
[ "CC0-1.0" ]
null
null
null
""" osgameclones has the following fields: 'updated', 'video', 'repo', 'license', 'originals', 'status', 'multiplayer', 'info', 'lang', 'feed', 'content', 'images', 'url', 'name', 'framework', 'type', 'development' mandatory fields are: 'name', 'license', 'type', 'originals' possible values: osgc-development: activ...
50.447059
313
0.578025
""" osgameclones has the following fields: 'updated', 'video', 'repo', 'license', 'originals', 'status', 'multiplayer', 'info', 'lang', 'feed', 'content', 'images', 'url', 'name', 'framework', 'type', 'development' mandatory fields are: 'name', 'license', 'type', 'originals' possible values: osgc-development: activ...
0
0
0
138d146e97f7b4623f8fd3deecf15906b9477507
152
py
Python
cryocon/debugging_file.py
AlexanderPollak/Cryocon-Control
1f112f99ed94e0605de0af043e90e90fcebb78b7
[ "MIT" ]
null
null
null
cryocon/debugging_file.py
AlexanderPollak/Cryocon-Control
1f112f99ed94e0605de0af043e90e90fcebb78b7
[ "MIT" ]
null
null
null
cryocon/debugging_file.py
AlexanderPollak/Cryocon-Control
1f112f99ed94e0605de0af043e90e90fcebb78b7
[ "MIT" ]
null
null
null
from connection import com h = com() print h.open() print h.sensor.compressor_motor_temperature() print h.sensor.compressor_supply_temperature()
12.666667
46
0.776316
from connection import com h = com() print h.open() print h.sensor.compressor_motor_temperature() print h.sensor.compressor_supply_temperature()
0
0
0
3897c37ff4e53e89c8ce47e790707ca6226b4fc0
5,029
py
Python
django_simple_api/views.py
Django-Simple-API/django-simple-api
cbda3b9667b4b00cd01a85a54f2f5b17926dfef6
[ "MIT" ]
35
2021-02-25T09:57:05.000Z
2022-02-18T09:12:45.000Z
django_simple_api/views.py
AberSheeran/django-simple-api
52c5efbbce930378178625511c7a3d39a1004d79
[ "MIT" ]
3
2021-01-21T09:38:27.000Z
2021-02-05T03:12:01.000Z
django_simple_api/views.py
AberSheeran/django-simple-api
52c5efbbce930378178625511c7a3d39a1004d79
[ "MIT" ]
7
2020-12-15T12:44:48.000Z
2021-02-01T06:34:30.000Z
import operator import warnings from copy import deepcopy from functools import reduce from typing import Any, Dict, Tuple from django.http.response import JsonResponse from django.shortcuts import render from .exceptions import RequestValidationError from .extras import merge_openapi_info from .schema import schema_...
34.210884
92
0.584609
import operator import warnings from copy import deepcopy from functools import reduce from typing import Any, Dict, Tuple from django.http.response import JsonResponse from django.shortcuts import render from .exceptions import RequestValidationError from .extras import merge_openapi_info from .schema import schema_...
4,518
0
92
ffcee6681f954873f29f7c1887e34bd41b2f176b
4,243
py
Python
improved_permissions/getters.py
gabrielbiasi/django-improved-permissions
9cf6d0ddb8a4dcfa2e58d3adbf1357e56a64ce71
[ "MIT" ]
12
2018-03-22T00:30:32.000Z
2021-04-24T16:26:08.000Z
improved_permissions/getters.py
s-sys/django-improved-permissions
9cf6d0ddb8a4dcfa2e58d3adbf1357e56a64ce71
[ "MIT" ]
27
2018-03-18T00:43:37.000Z
2020-06-05T18:09:18.000Z
improved_permissions/getters.py
gabrielbiasi/django-improved-permissions
9cf6d0ddb8a4dcfa2e58d3adbf1357e56a64ce71
[ "MIT" ]
2
2018-03-28T17:54:43.000Z
2021-01-11T21:17:08.000Z
"""getters functions""" from django.contrib.auth import get_user_model from django.contrib.contenttypes.models import ContentType from improved_permissions.exceptions import NotAllowed from improved_permissions.models import UserRole from improved_permissions.utils import check_my_model, get_roleclass def get_user(r...
28.47651
70
0.666745
"""getters functions""" from django.contrib.auth import get_user_model from django.contrib.contenttypes.models import ContentType from improved_permissions.exceptions import NotAllowed from improved_permissions.models import UserRole from improved_permissions.utils import check_my_model, get_roleclass def get_user(r...
0
0
0
be44a5302268fad641a68236ca9c12b8e9613542
1,301
py
Python
retangulo3.py
abnermuxah/opengl-escala-translacao-rotacao-python
ad3b90c40a346afaa8bbf72696d0a8d4027eb14d
[ "MIT" ]
null
null
null
retangulo3.py
abnermuxah/opengl-escala-translacao-rotacao-python
ad3b90c40a346afaa8bbf72696d0a8d4027eb14d
[ "MIT" ]
null
null
null
retangulo3.py
abnermuxah/opengl-escala-translacao-rotacao-python
ad3b90c40a346afaa8bbf72696d0a8d4027eb14d
[ "MIT" ]
null
null
null
from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.GLUT import * scale = 1 transx = transy = 1 rota = 1 if __name__ == "__main__": glutInit() glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB) glutInitWindowSize(800, 600) glutCreateWindow('Window') glClearColor(0.2,0.2,0.2,0) glutKeyboardFunc...
21.327869
64
0.564181
from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.GLUT import * scale = 1 transx = transy = 1 rota = 1 def draw1(): glClear(GL_COLOR_BUFFER_BIT) glMatrixMode(GL_PROJECTION) glLoadIdentity() gluOrtho2D(10,-10,10,-10) glScale(scale,scale,0) glTranslate(transx, transy, 0) glRotate(r...
880
0
44
173c14a6371e3c14cc52f0459477c04667d591d9
923
py
Python
accounts/tests/test_models.py
iliadmitriev/taskcamp
f0da4aa5694bd1f2235cddcf0e3026b07d957e2d
[ "MIT" ]
4
2021-11-30T10:28:17.000Z
2022-01-31T07:44:08.000Z
accounts/tests/test_models.py
iliadmitriev/taskcamp
f0da4aa5694bd1f2235cddcf0e3026b07d957e2d
[ "MIT" ]
66
2021-08-17T08:20:20.000Z
2022-03-31T02:20:53.000Z
accounts/tests/test_models.py
iliadmitriev/taskcamp
f0da4aa5694bd1f2235cddcf0e3026b07d957e2d
[ "MIT" ]
null
null
null
from django.test import TestCase from django.contrib.auth import get_user_model
30.766667
61
0.60455
from django.test import TestCase from django.contrib.auth import get_user_model class UserManagerTest(TestCase): def setUp(self) -> None: self.user_model = get_user_model() def test_create_user_without_email_raise(self): with self.assertRaises(ValueError): self.user_model.objects....
728
11
103
98e11a561720e47c6164c567df85d15c7a842bc1
5,367
py
Python
src/pybiblia/pybiblia.py
dennislwm/pybiblia
0212a419065668fee79ee2b085074e75cc26d375
[ "MIT" ]
null
null
null
src/pybiblia/pybiblia.py
dennislwm/pybiblia
0212a419065668fee79ee2b085074e75cc26d375
[ "MIT" ]
null
null
null
src/pybiblia/pybiblia.py
dennislwm/pybiblia
0212a419065668fee79ee2b085074e75cc26d375
[ "MIT" ]
null
null
null
#------------ # Web request import requests #------------ # Html parser from bs4 import BeautifulSoup import lxml #----------------- # Standard library import json import re """--------+---------+---------+---------+---------+---------+---------+---------+---------| | M A I N C L A...
37.795775
107
0.422582
#------------ # Web request import requests #------------ # Html parser from bs4 import BeautifulSoup import lxml #----------------- # Standard library import json import re """--------+---------+---------+---------+---------+---------+---------+---------+---------| | M A I N C L A...
458
0
48
d5ccf4bc57cf4385e299e90637d5820859589af2
1,794
bzl
Python
packages/typescript/test/ts_project/swc/tests.bzl
jakebiesinger-storyhealth/rules_nodejs
8df86ccb799e4f9f3c4b26174f09b58a89ef3639
[ "Apache-2.0" ]
1
2020-03-29T21:45:58.000Z
2020-03-29T21:45:58.000Z
packages/typescript/test/ts_project/swc/tests.bzl
jakebiesinger-storyhealth/rules_nodejs
8df86ccb799e4f9f3c4b26174f09b58a89ef3639
[ "Apache-2.0" ]
null
null
null
packages/typescript/test/ts_project/swc/tests.bzl
jakebiesinger-storyhealth/rules_nodejs
8df86ccb799e4f9f3c4b26174f09b58a89ef3639
[ "Apache-2.0" ]
1
2022-02-02T20:42:16.000Z
2022-02-02T20:42:16.000Z
"Unit tests for starlark API of ts_project with custom transpiler" load("@bazel_skylib//lib:unittest.bzl", "asserts", "unittest") load("@rules_nodejs//nodejs:providers.bzl", "DeclarationInfo", "JSModuleInfo") transitive_declarations_test = unittest.make(_impl0, attrs = { "lib": attr.label(default = "transpile_wit...
32.618182
84
0.709588
"Unit tests for starlark API of ts_project with custom transpiler" load("@bazel_skylib//lib:unittest.bzl", "asserts", "unittest") load("@rules_nodejs//nodejs:providers.bzl", "DeclarationInfo", "JSModuleInfo") def _impl0(ctx): env = unittest.begin(ctx) decls = [] for decl in ctx.attr.lib[DeclarationInfo]....
883
0
92
e06c15017cf5dda18851749ed8d0487668672756
1,647
py
Python
faceR/util/image_helper.py
hritools/faceR
8f701ea68515927163d5904d58262d1b480a9a97
[ "MIT" ]
null
null
null
faceR/util/image_helper.py
hritools/faceR
8f701ea68515927163d5904d58262d1b480a9a97
[ "MIT" ]
null
null
null
faceR/util/image_helper.py
hritools/faceR
8f701ea68515927163d5904d58262d1b480a9a97
[ "MIT" ]
null
null
null
import threading import numpy as np from PIL import ImageFont, ImageDraw, Image class ThreadsafeIter: """ Takes an iterator/generator and makes it thread-safe by serializing call to the `next` method of given iterator/generator. """ def threadsafe_generator(f): """ A decorator that takes a ...
27.45
104
0.581664
import threading import numpy as np from PIL import ImageFont, ImageDraw, Image class ThreadsafeIter: """ Takes an iterator/generator and makes it thread-safe by serializing call to the `next` method of given iterator/generator. """ def __init__(self, it): self.it = it self.lock ...
172
0
108
d9e1c1da43fb9929e7fbc48da94113ad0810002e
4,543
py
Python
model-optimizer/mo/moc_frontend/pipeline.py
evgeniya-egupova/openvino
4b8d6c59e3444ecdc549bfdf357d19d625479b89
[ "Apache-2.0" ]
null
null
null
model-optimizer/mo/moc_frontend/pipeline.py
evgeniya-egupova/openvino
4b8d6c59e3444ecdc549bfdf357d19d625479b89
[ "Apache-2.0" ]
8
2021-12-02T20:59:44.000Z
2022-02-21T13:17:56.000Z
model-optimizer/mo/moc_frontend/pipeline.py
rkazants/openvino
a9a583eb42d43322b39b95b164b5b22c4f341111
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import argparse import logging as log from typing import List from mo.moc_frontend.extractor import fe_user_data_repack from mo.middle.passes.infer import validate_batch_in_shape from openvino.runtime import Dimension, PartialShape ...
45.43
108
0.690293
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import argparse import logging as log from typing import List from mo.moc_frontend.extractor import fe_user_data_repack from mo.middle.passes.infer import validate_batch_in_shape from openvino.runtime import Dimension, PartialShape ...
99
0
27
a59cd73a8d6f0d3c33127fe3d4a8247ce65ddc58
1,308
py
Python
serial_formatter.py
Varigarble/serial-number-format-validator
5094db55e360288c0572b5f7e22ae46b06f853b8
[ "Apache-2.0" ]
2
2021-08-12T11:48:17.000Z
2021-12-23T08:26:58.000Z
serial_formatter.py
Varigarble/serial-number-format-validator
5094db55e360288c0572b5f7e22ae46b06f853b8
[ "Apache-2.0" ]
null
null
null
serial_formatter.py
Varigarble/serial-number-format-validator
5094db55e360288c0572b5f7e22ae46b06f853b8
[ "Apache-2.0" ]
null
null
null
import re # RegEx search strings for certain software vendors oauth_sn = re.compile(r'\b(\d{3}-\d{8}\b)') oauth_key = re.compile(r'\b([a-zA-Z]|\d)\d([a-zA-Z]|\d)[a-zA-Z]\d\b') abalo_sn = re.compile(r'(\b(\d{4}-){5}\d{4}\b)') serial_number_restrictions = {'OAuthDex': oauth_sn, 'Abalobadiah': abalo_sn} product_key_res...
31.142857
80
0.62156
import re # RegEx search strings for certain software vendors oauth_sn = re.compile(r'\b(\d{3}-\d{8}\b)') oauth_key = re.compile(r'\b([a-zA-Z]|\d)\d([a-zA-Z]|\d)[a-zA-Z]\d\b') abalo_sn = re.compile(r'(\b(\d{4}-){5}\d{4}\b)') serial_number_restrictions = {'OAuthDex': oauth_sn, 'Abalobadiah': abalo_sn} product_key_res...
904
0
46
8b470a14e790b32a2b6bdc88c022ec8cf05ebd54
942
py
Python
setup.py
FurkanArslan/rl_algorithms
f6c61e02e181510c212a6ef7b4598338205e4bf7
[ "MIT" ]
null
null
null
setup.py
FurkanArslan/rl_algorithms
f6c61e02e181510c212a6ef7b4598338205e4bf7
[ "MIT" ]
null
null
null
setup.py
FurkanArslan/rl_algorithms
f6c61e02e181510c212a6ef7b4598338205e4bf7
[ "MIT" ]
null
null
null
from setuptools import find_packages, setup with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() # pylint: disable=line-too-long setup( name="rl_algorithms", version="0.0.1", author="medipixel", author_email="kh.kim@medipixel.io", description="RL algorithms which a...
33.642857
77
0.679406
from setuptools import find_packages, setup with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() # pylint: disable=line-too-long setup( name="rl_algorithms", version="0.0.1", author="medipixel", author_email="kh.kim@medipixel.io", description="RL algorithms which a...
0
0
0