hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
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
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c12c6d9b9c94ab95825a79251d12e0eb31d120b
5,042
py
Python
scripts/import_services.py
jlin/inventory
c098c98e570c3bf9fadfd811eb75e1213f6ea428
[ "BSD-3-Clause" ]
22
2015-01-16T01:36:32.000Z
2020-06-08T00:46:18.000Z
scripts/import_services.py
jlin/inventory
c098c98e570c3bf9fadfd811eb75e1213f6ea428
[ "BSD-3-Clause" ]
9
2019-03-15T11:39:32.000Z
2019-04-30T00:59:50.000Z
scripts/import_services.py
jlin/inventory
c098c98e570c3bf9fadfd811eb75e1213f6ea428
[ "BSD-3-Clause" ]
13
2015-01-13T20:56:22.000Z
2022-02-23T06:01:17.000Z
__import__('inventory_context') from core.service.models import Service from core.site.models import Site from systems.models import Allocation import csv import sys def simport(reader): for row in reader: od = row['Owner - Department'].strip() if od: a, created = Allocation.objects...
32.954248
88
0.515073
__import__('inventory_context') from core.service.models import Service from core.site.models import Site from systems.models import Allocation import csv import sys def simport(reader): for row in reader: od = row['Owner - Department'].strip() if od: a, created = Allocation.objects...
false
true
1c12c6ee420b30609b763025c0bb1c26618c4a59
6,255
py
Python
acq4/analysis/atlas/AuditoryCortex/CortexROI.py
campagnola/acq4
09699c07d8949950f6df149cf17892aaa3a37402
[ "MIT" ]
47
2015-01-05T16:18:10.000Z
2022-03-16T13:09:30.000Z
acq4/analysis/atlas/AuditoryCortex/CortexROI.py
acq4/acq4
c77636a76d68ffa1bc7dbd41edc522e523b909b8
[ "MIT" ]
48
2015-04-19T16:51:41.000Z
2022-03-31T14:48:16.000Z
acq4/analysis/atlas/AuditoryCortex/CortexROI.py
acq4/acq4
c77636a76d68ffa1bc7dbd41edc522e523b909b8
[ "MIT" ]
32
2015-01-15T14:11:49.000Z
2021-07-15T13:44:52.000Z
from __future__ import print_function import pyqtgraph as pg from pyqtgraph.graphicsItems import ROI from pyqtgraph.Point import Point from acq4.util import Qt import math from six.moves import range class CortexROI(ROI.PolyLineROI): def __init__(self, pos, state=None): ROI.PolyLineROI.__init__(self,...
46.333333
200
0.584333
from __future__ import print_function import pyqtgraph as pg from pyqtgraph.graphicsItems import ROI from pyqtgraph.Point import Point from acq4.util import Qt import math from six.moves import range class CortexROI(ROI.PolyLineROI): def __init__(self, pos, state=None): ROI.PolyLineROI.__init__(self,...
true
true
1c12c6f5441eb0362596719b6717c4ca038da640
519
py
Python
gimmebio/pji/setup.py
Chandrima-04/gimmebio
cb3e66380006d5c5c00ff70bfb87317dd252c312
[ "MIT" ]
3
2020-01-21T23:49:55.000Z
2020-07-29T17:02:30.000Z
gimmebio/pji/setup.py
Chandrima-04/gimmebio
cb3e66380006d5c5c00ff70bfb87317dd252c312
[ "MIT" ]
null
null
null
gimmebio/pji/setup.py
Chandrima-04/gimmebio
cb3e66380006d5c5c00ff70bfb87317dd252c312
[ "MIT" ]
4
2020-01-21T16:48:17.000Z
2020-03-13T15:34:52.000Z
from setuptools import setup microlib_name = 'gimmebio.pji' requirements = [ 'pandas', 'numpy', ] setup( name=microlib_name, version='0.2.1', author='David Danko', author_email='dcdanko@gmail.com', license='MIT license', classifiers=[ 'License :: OSI Approved :: MIT License', ...
20.76
49
0.630058
from setuptools import setup microlib_name = 'gimmebio.pji' requirements = [ 'pandas', 'numpy', ] setup( name=microlib_name, version='0.2.1', author='David Danko', author_email='dcdanko@gmail.com', license='MIT license', classifiers=[ 'License :: OSI Approved :: MIT License', ...
true
true
1c12c8864b88308ea71d2a4868806e781920ed3c
631
py
Python
src/file_upload/services/validators.py
JackCX777/file_upload_api
0bc3726f94e26d94f4f3e202d9f91b879d940d97
[ "BSD-3-Clause" ]
null
null
null
src/file_upload/services/validators.py
JackCX777/file_upload_api
0bc3726f94e26d94f4f3e202d9f91b879d940d97
[ "BSD-3-Clause" ]
null
null
null
src/file_upload/services/validators.py
JackCX777/file_upload_api
0bc3726f94e26d94f4f3e202d9f91b879d940d97
[ "BSD-3-Clause" ]
null
null
null
from pathlib import Path, PosixPath from django.core.files.uploadedfile import InMemoryUploadedFile from rest_framework import serializers class UniqueFileValidator: """ Custom validator checks if the file has already been uploaded. """ def __init__(self, uploads_dir_path: PosixPath): self.u...
30.047619
76
0.716323
from pathlib import Path, PosixPath from django.core.files.uploadedfile import InMemoryUploadedFile from rest_framework import serializers class UniqueFileValidator: def __init__(self, uploads_dir_path: PosixPath): self.uploads_dir_path = uploads_dir_path def __call__(self, file: InMemoryUploadedFi...
true
true
1c12c8916287c5118e23ae6517b72877a8034e72
807
py
Python
meidoo/manage.py
amourbrus/meiduo_mall
965b3d4685d1a8fe18a3177cc864f27eeb516081
[ "MIT" ]
null
null
null
meidoo/manage.py
amourbrus/meiduo_mall
965b3d4685d1a8fe18a3177cc864f27eeb516081
[ "MIT" ]
null
null
null
meidoo/manage.py
amourbrus/meiduo_mall
965b3d4685d1a8fe18a3177cc864f27eeb516081
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "meidoo.setting.dev") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure that th...
35.086957
77
0.641884
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "meidoo.setting.dev") try: from django.core.management import execute_from_command_line except ImportError: try: import django except ImportError: ...
true
true
1c12c9db47c5e9dbc84cc185134c02b22a1d7411
148
py
Python
src/accounts/admin.py
iraihankabir/friends
31c9bbc226d9fdf8eac0d195cea2fd178a9b295d
[ "MIT" ]
null
null
null
src/accounts/admin.py
iraihankabir/friends
31c9bbc226d9fdf8eac0d195cea2fd178a9b295d
[ "MIT" ]
2
2019-08-06T02:13:36.000Z
2020-06-05T18:54:51.000Z
src/accounts/admin.py
rk4bir/friends
31c9bbc226d9fdf8eac0d195cea2fd178a9b295d
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Account class AccountAdmin(admin.ModelAdmin): pass admin.site.register(Account, AccountAdmin)
24.666667
42
0.831081
from django.contrib import admin from .models import Account class AccountAdmin(admin.ModelAdmin): pass admin.site.register(Account, AccountAdmin)
true
true
1c12cb16f6ab7805ab1b1485432e333db1121115
1,933
py
Python
office365/directory/directory_object.py
juguerre/Office365-REST-Python-Client
dbadaddb14e7bad199499c898cdef1ada9694fc9
[ "MIT" ]
544
2016-08-04T17:10:16.000Z
2022-03-31T07:17:20.000Z
office365/directory/directory_object.py
juguerre/Office365-REST-Python-Client
dbadaddb14e7bad199499c898cdef1ada9694fc9
[ "MIT" ]
438
2016-10-11T12:24:22.000Z
2022-03-31T19:30:35.000Z
office365/directory/directory_object.py
juguerre/Office365-REST-Python-Client
dbadaddb14e7bad199499c898cdef1ada9694fc9
[ "MIT" ]
202
2016-08-22T19:29:40.000Z
2022-03-30T20:26:15.000Z
from office365.entity import Entity from office365.runtime.client_result import ClientResult from office365.runtime.client_value_collection import ClientValueCollection from office365.runtime.queries.service_operation_query import ServiceOperationQuery class DirectoryObject(Entity): """Represents an Azure Active ...
39.44898
117
0.706156
from office365.entity import Entity from office365.runtime.client_result import ClientResult from office365.runtime.client_value_collection import ClientValueCollection from office365.runtime.queries.service_operation_query import ServiceOperationQuery class DirectoryObject(Entity): def get_member_objects(self, ...
true
true
1c12cca4e08ace740d87991fcdcafcb73db0397d
3,528
py
Python
server/meta_data.py
onebadman/NKSP
3aaaf1a2e9fe0cdaf46b143fe6d4190dc628e140
[ "MIT" ]
null
null
null
server/meta_data.py
onebadman/NKSP
3aaaf1a2e9fe0cdaf46b143fe6d4190dc628e140
[ "MIT" ]
null
null
null
server/meta_data.py
onebadman/NKSP
3aaaf1a2e9fe0cdaf46b143fe6d4190dc628e140
[ "MIT" ]
1
2022-02-07T12:31:03.000Z
2022-02-07T12:31:03.000Z
import enum import json class MenuTypes(enum.Enum): MAIN = 'MAIN' LOAD = 'LOAD' DATA = 'DATA' ANSWER = 'ANSWER' class MetaData: """ Сущность для хранения и взаимодействия с клиентскими метаданными. Используется как хранилище состояний клиента. """ menu_active_main: bool menu...
32.072727
99
0.630385
import enum import json class MenuTypes(enum.Enum): MAIN = 'MAIN' LOAD = 'LOAD' DATA = 'DATA' ANSWER = 'ANSWER' class MetaData: menu_active_main: bool menu_active_load: bool menu_active_data: bool menu_active_answer: bool load_data: list free_chlen: bool r: float ...
true
true
1c12cd2699194016a554a4f5a485ab0bc11fa716
3,152
py
Python
nfldata/spiders/draft.py
pkukkapalli/nfldata
17eb6f932d3b9d3f24914dbe0d7a23b41932ef85
[ "MIT" ]
null
null
null
nfldata/spiders/draft.py
pkukkapalli/nfldata
17eb6f932d3b9d3f24914dbe0d7a23b41932ef85
[ "MIT" ]
9
2020-11-18T00:43:57.000Z
2022-01-26T03:49:23.000Z
nfldata/spiders/draft.py
pkukkapalli/nfldata
17eb6f932d3b9d3f24914dbe0d7a23b41932ef85
[ "MIT" ]
null
null
null
""" Defines spiders related to the NFL draft.""" import scrapy from nfldata.common.pfr import pfr_request, PRO_FOOTBALL_REFERENCE_DOMAIN from nfldata.items.draft import DraftPick, DraftType class DraftPicksSpider(scrapy.Spider): """The spider that crawls and stores the draft selections of all teams across NFL...
37.52381
80
0.632614
import scrapy from nfldata.common.pfr import pfr_request, PRO_FOOTBALL_REFERENCE_DOMAIN from nfldata.items.draft import DraftPick, DraftType class DraftPicksSpider(scrapy.Spider): name = 'draft_picks' allowed_domains = [PRO_FOOTBALL_REFERENCE_DOMAIN] @classmethod def create_table(cls, database): ...
true
true
1c12ce3ae1946237f24a3e55ee821bb728c0be21
81
py
Python
test/python/WMCore_t/Database_t/__init__.py
hufnagel/WMCore
b150cc725b68fc1cf8e6e0fa07c826226a4421fa
[ "Apache-2.0" ]
21
2015-11-19T16:18:45.000Z
2021-12-02T18:20:39.000Z
test/python/WMCore_t/Database_t/__init__.py
hufnagel/WMCore
b150cc725b68fc1cf8e6e0fa07c826226a4421fa
[ "Apache-2.0" ]
5,671
2015-01-06T14:38:52.000Z
2022-03-31T22:11:14.000Z
test/python/WMCore_t/Database_t/__init__.py
hufnagel/WMCore
b150cc725b68fc1cf8e6e0fa07c826226a4421fa
[ "Apache-2.0" ]
67
2015-01-21T15:55:38.000Z
2022-02-03T19:53:13.000Z
#!/usr/bin/env python """ _Database_t_ Database test methods """ __all__ = []
8.1
21
0.654321
__all__ = []
true
true
1c12ce51a7f60b7769c1ca81198ec66d3cdc1aa0
5,681
py
Python
src/handlers/interactivities.py
Zencrazycat/serverless-slack-bot
c6cee038d07405b238a6e84bbb104615b0a43ca1
[ "MIT" ]
null
null
null
src/handlers/interactivities.py
Zencrazycat/serverless-slack-bot
c6cee038d07405b238a6e84bbb104615b0a43ca1
[ "MIT" ]
null
null
null
src/handlers/interactivities.py
Zencrazycat/serverless-slack-bot
c6cee038d07405b238a6e84bbb104615b0a43ca1
[ "MIT" ]
null
null
null
import datetime import json from urllib import parse from aws_lambda_powertools import Logger import holidays from . import uncaught_exceptions_handler from .exceptions import ValidationError from .messages import send_markdown_message from .modals.api_calls import open_modal from .modals.templates import render_book...
39.451389
119
0.705334
import datetime import json from urllib import parse from aws_lambda_powertools import Logger import holidays from . import uncaught_exceptions_handler from .exceptions import ValidationError from .messages import send_markdown_message from .modals.api_calls import open_modal from .modals.templates import render_book...
true
true
1c12d05e7c6df05ea2e5bebd355819ab056f6585
5,769
py
Python
modules/greeting.py
apertium/phenny
77f302bac05e50cd7d19bc5cc2737bb98fec0cc7
[ "EFL-2.0" ]
7
2018-10-29T18:01:47.000Z
2022-01-21T04:13:46.000Z
modules/greeting.py
apertium/phenny
77f302bac05e50cd7d19bc5cc2737bb98fec0cc7
[ "EFL-2.0" ]
225
2018-03-08T10:41:50.000Z
2021-11-01T19:51:17.000Z
modules/greeting.py
apertium/phenny
77f302bac05e50cd7d19bc5cc2737bb98fec0cc7
[ "EFL-2.0" ]
44
2018-03-19T15:30:15.000Z
2020-07-29T08:47:45.000Z
#!/usr/bin/python3 import math import os import sqlite3 import time from threading import Lock, Thread from tools import DatabaseCursor, db_path lock = Lock() users = set() def setup(self): self.greeting_count = {} self.greeting_db = db_path(self, 'greeting') connection = sqlite3.connect(self.greeting_d...
31.697802
219
0.632865
import math import os import sqlite3 import time from threading import Lock, Thread from tools import DatabaseCursor, db_path lock = Lock() users = set() def setup(self): self.greeting_count = {} self.greeting_db = db_path(self, 'greeting') connection = sqlite3.connect(self.greeting_db) cursor = con...
true
true
1c12d11a76729b36f0fc7ff461d3da8a6fab031e
2,013
py
Python
scripts/calculate_metric.py
HPI-Information-Systems/TimeEval
9b2717b89decd57dd09e04ad94c120f13132d7b8
[ "MIT" ]
2
2022-01-29T03:46:31.000Z
2022-02-14T14:06:35.000Z
scripts/calculate_metric.py
HPI-Information-Systems/TimeEval
9b2717b89decd57dd09e04ad94c120f13132d7b8
[ "MIT" ]
null
null
null
scripts/calculate_metric.py
HPI-Information-Systems/TimeEval
9b2717b89decd57dd09e04ad94c120f13132d7b8
[ "MIT" ]
null
null
null
import argparse import numpy as np import pandas as pd from timeeval import Metric def _create_arg_parser(): parser = argparse.ArgumentParser(description=f"Metric calculation and plotting") parser.add_argument("input_file", type=str, help="Path to input file with the anomaly scores (point-based)") pars...
41.081633
112
0.653254
import argparse import numpy as np import pandas as pd from timeeval import Metric def _create_arg_parser(): parser = argparse.ArgumentParser(description=f"Metric calculation and plotting") parser.add_argument("input_file", type=str, help="Path to input file with the anomaly scores (point-based)") pars...
true
true
1c12d1c127f9ff390a940007b124bd427948d8cd
1,990
py
Python
services/jobs/jobs/dependencies/process.py
bgoesswein/implementation_backend
546018eb5dba79b823e3cfb20472271e02045789
[ "Apache-2.0" ]
null
null
null
services/jobs/jobs/dependencies/process.py
bgoesswein/implementation_backend
546018eb5dba79b823e3cfb20472271e02045789
[ "Apache-2.0" ]
5
2021-02-08T20:29:22.000Z
2022-03-11T23:44:17.000Z
services/jobs/jobs/dependencies/process.py
bgoesswe/implementation_backend
546018eb5dba79b823e3cfb20472271e02045789
[ "Apache-2.0" ]
null
null
null
from ..models import Job import numpy as np from datetime import datetime coords = [(10.288696, 45.935871), (12.189331, 46.905246)] FACTOR_RESOLUTION = 1000 def reproject(latitude, longitude): """Returns the x & y coordinates in meters using a sinusoidal projection""" from math import pi, cos, radians ea...
25.189873
94
0.630653
from ..models import Job import numpy as np from datetime import datetime coords = [(10.288696, 45.935871), (12.189331, 46.905246)] FACTOR_RESOLUTION = 1000 def reproject(latitude, longitude): from math import pi, cos, radians earth_radius = 6371009 lat_dist = pi * earth_radius / 180.0 y = [lat * la...
true
true
1c12d1e6f0c709b2dfa00a9be9aec6e074c46197
6,695
py
Python
experiments/run_state_of_the_art.py
ChristoferNal/multi-nilm
0ec1d1a834b04da121963bf82eb0f540d76a8409
[ "MIT" ]
32
2020-04-29T07:03:08.000Z
2021-12-21T02:24:43.000Z
experiments/run_state_of_the_art.py
qiu-2020/multi-nilm
0ec1d1a834b04da121963bf82eb0f540d76a8409
[ "MIT" ]
3
2020-10-23T07:26:42.000Z
2021-09-30T11:07:10.000Z
experiments/run_state_of_the_art.py
qiu-2020/multi-nilm
0ec1d1a834b04da121963bf82eb0f540d76a8409
[ "MIT" ]
10
2020-05-31T02:02:32.000Z
2022-02-10T01:42:37.000Z
""" Model selection environment parameters - UKDALE Building 1 1/1/2014 - 30/6/2014 - REDD Building 1,3 1/4/2011 - 30/5/2011 Train-test environment parameters - UKDALE Building 1 Train: 1/3/2013 - 30/6/2014 Test : 1/7/2014 - 31/12/2014 - REDD Building 1 Train: 18/4/2011 - 17/5/2011 Test : 18/5/2011 - 25/...
41.84375
116
0.779238
import os import traceback from datasources.datasource import DatasourceFactory from experiments.experiments import GenericExperiment from nilmlab import exp_model_list from nilmlab.factories import EnvironmentFactory from nilmlab.lab import TimeSeriesLength from nilmlab.exp_model_list import CLF_MODELS, TRANSFORMER_...
true
true
1c12d3753209537d64099991631f1377406a4189
4,002
py
Python
tests/test_parsing.py
USDA-ARS-NWRC/inicheck
283c4cb5e49cbc0301dbcba8e622d1ad7537d7bb
[ "CC0-1.0" ]
1
2018-08-10T20:41:20.000Z
2018-08-10T20:41:20.000Z
tests/test_parsing.py
USDA-ARS-NWRC/inicheck
283c4cb5e49cbc0301dbcba8e622d1ad7537d7bb
[ "CC0-1.0" ]
64
2018-05-09T15:20:02.000Z
2022-01-03T17:46:05.000Z
tests/test_parsing.py
USDA-ARS-NWRC/inicheck
283c4cb5e49cbc0301dbcba8e622d1ad7537d7bb
[ "CC0-1.0" ]
5
2020-01-03T02:47:16.000Z
2020-09-23T03:02:41.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_iniparse ---------------------------------- Tests for `inicheck.iniparse` module. """ import unittest from inicheck.iniparse import * class TestIniparse(unittest.TestCase): def test_parse_sections(self): """ Tests our base function used to...
30.784615
87
0.551724
import unittest from inicheck.iniparse import * class TestIniparse(unittest.TestCase): def test_parse_sections(self): info = ["# Test our line comments", "; Test our other line comments", ";[old section I am not interested in] test line comments on sections", ...
true
true
1c12d57adcf669b8d9a1101893de44f2eb7534dc
6,069
py
Python
package_control/bootstrap.py
zjzh/package_control
cfaaeb57612023e3679ecb7f8cd7ceac9f57990d
[ "Unlicense", "MIT" ]
3,373
2015-01-01T01:19:59.000Z
2022-03-30T13:18:47.000Z
package_control/bootstrap.py
zjzh/package_control
cfaaeb57612023e3679ecb7f8cd7ceac9f57990d
[ "Unlicense", "MIT" ]
815
2015-01-01T01:21:43.000Z
2022-03-23T21:46:29.000Z
package_control/bootstrap.py
zjzh/package_control
cfaaeb57612023e3679ecb7f8cd7ceac9f57990d
[ "Unlicense", "MIT" ]
791
2015-01-01T01:20:00.000Z
2022-03-23T21:10:49.000Z
import zipfile import os import hashlib import json from os import path try: from urlparse import urlparse str_cls = unicode # noqa from cStringIO import StringIO as BytesIO package_control_dir = os.getcwd() except (ImportError): from urllib.parse import urlparse str_cls = str from io impor...
30.964286
105
0.628604
import zipfile import os import hashlib import json from os import path try: from urlparse import urlparse str_cls = unicode from cStringIO import StringIO as BytesIO package_control_dir = os.getcwd() except (ImportError): from urllib.parse import urlparse str_cls = str from io import Bytes...
true
true
1c12d5f81609a6220431f4021d39b32840b1ebc3
6,341
py
Python
ppci/wasm/execution/_native_instance.py
tstreiff/ppci-mirror
881cbd199dbdb233899c28487be8e5f07b8958b7
[ "BSD-2-Clause" ]
null
null
null
ppci/wasm/execution/_native_instance.py
tstreiff/ppci-mirror
881cbd199dbdb233899c28487be8e5f07b8958b7
[ "BSD-2-Clause" ]
null
null
null
ppci/wasm/execution/_native_instance.py
tstreiff/ppci-mirror
881cbd199dbdb233899c28487be8e5f07b8958b7
[ "BSD-2-Clause" ]
null
null
null
""" Instantiate wasm as native code. """ import logging import os import shelve import struct from ...utils.codepage import load_obj, MemoryPage from ...irutils import verify_module from .. import wasm_to_ir from ..components import Table from ..util import PAGE_SIZE from ._base_instance import ModuleInstance, WasmM...
32.854922
78
0.639174
import logging import os import shelve import struct from ...utils.codepage import load_obj, MemoryPage from ...irutils import verify_module from .. import wasm_to_ir from ..components import Table from ..util import PAGE_SIZE from ._base_instance import ModuleInstance, WasmMemory, WasmGlobal logger = logging.getLo...
true
true
1c12d78e4cc2bca30d54a8c41bc19dae8b8de50e
639
py
Python
raspberry-code/kaffee.py
maschnetwork/raspberry-alexa-iot
e75d1f1363010beacc105536cf6866e4f9fe9f7f
[ "MIT" ]
null
null
null
raspberry-code/kaffee.py
maschnetwork/raspberry-alexa-iot
e75d1f1363010beacc105536cf6866e4f9fe9f7f
[ "MIT" ]
null
null
null
raspberry-code/kaffee.py
maschnetwork/raspberry-alexa-iot
e75d1f1363010beacc105536cf6866e4f9fe9f7f
[ "MIT" ]
null
null
null
from gpiozero import LED from cloud import Cloud from time import sleep def make_coffee(): i = 0 while(i < 200): s.on() sleep(0.0019) s.off() sleep(0.0015) i += 1 sleep(1) while(i > 0): s.on() sleep(0.0023) s.off() sleep(0.0015) ...
17.75
42
0.525822
from gpiozero import LED from cloud import Cloud from time import sleep def make_coffee(): i = 0 while(i < 200): s.on() sleep(0.0019) s.off() sleep(0.0015) i += 1 sleep(1) while(i > 0): s.on() sleep(0.0023) s.off() sleep(0.0015) ...
true
true
1c12d798661d51235f917b49b445d5ab5d94af26
4,122
py
Python
synbiochemdev/datascience/ch7.py
neilswainston/development-py
47041c8059cf4d617b9ca26c16b4a691ce68aa2c
[ "MIT" ]
null
null
null
synbiochemdev/datascience/ch7.py
neilswainston/development-py
47041c8059cf4d617b9ca26c16b4a691ce68aa2c
[ "MIT" ]
null
null
null
synbiochemdev/datascience/ch7.py
neilswainston/development-py
47041c8059cf4d617b9ca26c16b4a691ce68aa2c
[ "MIT" ]
null
null
null
''' synbiochem (c) University of Manchester 2016 synbiochem is licensed under the MIT License. To view a copy of this license, visit <http://opensource.org/licenses/MIT/>. @author: neilswainston ''' # pylint: disable=invalid-name # pylint: disable=too-many-locals import math import matplotlib.pyplot as plt from sy...
27.48
78
0.663755
''' synbiochem (c) University of Manchester 2016 synbiochem is licensed under the MIT License. To view a copy of this license, visit <http://opensource.org/licenses/MIT/>. @author: neilswainston ''' import math import matplotlib.pyplot as plt from synbiochemdev.datascience.ch6 import inverse_normal_cdf, normal_cdf...
false
true
1c12d83419454ab2c10dfcaaef8bb78015747d7c
19,295
py
Python
EasyDeep/datasets/image_dataset.py
strawsyz/straw
db313c78c2e3c0355cd10c70ac25a15bb5632d41
[ "MIT" ]
2
2020-04-06T09:09:19.000Z
2020-07-24T03:59:55.000Z
EasyDeep/datasets/image_dataset.py
strawsyz/straw
db313c78c2e3c0355cd10c70ac25a15bb5632d41
[ "MIT" ]
null
null
null
EasyDeep/datasets/image_dataset.py
strawsyz/straw
db313c78c2e3c0355cd10c70ac25a15bb5632d41
[ "MIT" ]
null
null
null
import os import random import torch from PIL import Image from torch.utils.data import DataLoader from base.base_dataset import BaseDataSet from configs.dataset_config import ImageDataSetConfig from utils.common_utils import copy_attr from utils.common_utils import copy_need_attr """ mask图像和原图像两个文件夹 根据文件名判断是否是同一个文件...
45.293427
116
0.613112
import os import random import torch from PIL import Image from torch.utils.data import DataLoader from base.base_dataset import BaseDataSet from configs.dataset_config import ImageDataSetConfig from utils.common_utils import copy_attr from utils.common_utils import copy_need_attr class MyImageDataSet(ImageDataSet...
true
true
1c12d85e6d494ae341ad85721d76ccd4b28abf62
3,128
py
Python
test/test_zenodo.py
cokelaer/ngstools
53c4682a017d346b079f2127c2d747132d2bf4b9
[ "BSD-3-Clause" ]
8
2021-09-02T09:18:39.000Z
2021-12-20T22:24:15.000Z
test/test_zenodo.py
cokelaer/ngstools
53c4682a017d346b079f2127c2d747132d2bf4b9
[ "BSD-3-Clause" ]
18
2020-08-04T12:42:16.000Z
2022-01-19T17:40:41.000Z
test/test_zenodo.py
cokelaer/ngstools
53c4682a017d346b079f2127c2d747132d2bf4b9
[ "BSD-3-Clause" ]
null
null
null
import damona from damona import zenodo from . import test_dir deposit = { "conceptdoi": "10.5072/zenodo.960007", "conceptrecid": "960007", "created": "2021-11-13T20:15:42.926938+00:00", "doi": "10.5072/zenodo.960008", "doi_url": "https://doi.org/10.5072/zenodo.960008", "files": [ { ...
36.8
225
0.616368
import damona from damona import zenodo from . import test_dir deposit = { "conceptdoi": "10.5072/zenodo.960007", "conceptrecid": "960007", "created": "2021-11-13T20:15:42.926938+00:00", "doi": "10.5072/zenodo.960008", "doi_url": "https://doi.org/10.5072/zenodo.960008", "files": [ { ...
true
true
1c12d8d3788a27abccc127491f6c51e3d24f8fee
67
py
Python
blitzdb/fields/text.py
marcinguy/blitzdb3
8b8bca02b205d7ff33d3902e5abb166e10a7b624
[ "MIT" ]
252
2015-01-02T13:05:12.000Z
2021-12-29T13:36:47.000Z
blitzdb/fields/text.py
epatters/blitzdb
4b459e0bcde9e1f6224dd4e3bea74194586864b0
[ "MIT" ]
33
2015-01-09T20:05:10.000Z
2019-11-08T15:48:34.000Z
blitzdb/fields/text.py
epatters/blitzdb
4b459e0bcde9e1f6224dd4e3bea74194586864b0
[ "MIT" ]
39
2015-01-20T01:15:04.000Z
2022-03-26T01:01:15.000Z
from .base import BaseField class TextField(BaseField): pass
11.166667
27
0.746269
from .base import BaseField class TextField(BaseField): pass
true
true
1c12d8f9a1694fad5ce4e66611042f55996f2c78
3,692
py
Python
tweetbot/twitter_followers.py
zloether/tweetbot
f8a5e5b7c1ec671508d738301b8a6ff48509714a
[ "MIT" ]
null
null
null
tweetbot/twitter_followers.py
zloether/tweetbot
f8a5e5b7c1ec671508d738301b8a6ff48509714a
[ "MIT" ]
9
2019-03-07T03:21:38.000Z
2019-03-21T01:42:58.000Z
tweetbot/twitter_followers.py
zloether/tweetbot.py
f8a5e5b7c1ec671508d738301b8a6ff48509714a
[ "MIT" ]
null
null
null
#!/usr/bin/env python # twitter_followers.py # ----------------------------------------------------------------------------- # imports # ----------------------------------------------------------------------------- from twitter_connector import twitter_connector import json import time def twitter_followers(twitter_c...
38.863158
80
0.384886
from twitter_connector import twitter_connector import json import time def twitter_followers(twitter_connector): follow_new_users = False debug = True requested_list = 'requested_friends.txt' update_requested_list = True check_already_requested = True # ------------------...
true
true
1c12db682ff1788e81de9092aba5354f474234c2
25,837
py
Python
gym_minigrid/wrappers.py
HindsightInstructionFollowing/gym-minigrid
e01c561634ae4c91717444ca86b338aba2ff4ac4
[ "BSD-3-Clause" ]
null
null
null
gym_minigrid/wrappers.py
HindsightInstructionFollowing/gym-minigrid
e01c561634ae4c91717444ca86b338aba2ff4ac4
[ "BSD-3-Clause" ]
null
null
null
gym_minigrid/wrappers.py
HindsightInstructionFollowing/gym-minigrid
e01c561634ae4c91717444ca86b338aba2ff4ac4
[ "BSD-3-Clause" ]
null
null
null
import math import operator from functools import reduce import numpy as np import gym from gym import error, spaces, utils from gym_minigrid.minigrid import OBJECT_TO_IDX, COLOR_TO_IDX, STATE_TO_IDX, \ SHADE_TO_IDX, SIZE_TO_IDX from gym_minigrid.minigrid import CELL_PIXELS import json import torch class ReseedW...
32.540302
130
0.607772
import math import operator from functools import reduce import numpy as np import gym from gym import error, spaces, utils from gym_minigrid.minigrid import OBJECT_TO_IDX, COLOR_TO_IDX, STATE_TO_IDX, \ SHADE_TO_IDX, SIZE_TO_IDX from gym_minigrid.minigrid import CELL_PIXELS import json import torch class ReseedW...
true
true
1c12dc25f8b84241f7f751cfa3bddafd23e7b36a
1,103
py
Python
cogs/glass.py
Ana-gram/Amanager
5ceef312125b1c73dea59d37f8f06e22293c8960
[ "Apache-2.0" ]
12
2021-04-23T18:10:24.000Z
2021-05-03T13:08:54.000Z
cogs/glass.py
Ana-gram/Amanager
5ceef312125b1c73dea59d37f8f06e22293c8960
[ "Apache-2.0" ]
3
2021-04-04T17:47:02.000Z
2021-11-20T10:59:46.000Z
cogs/glass.py
Margana314/Amanager
87e241d942ca07f3ed8dfc5e1aebfde6f58bbdac
[ "Apache-2.0" ]
3
2021-04-30T11:07:28.000Z
2021-05-01T11:35:27.000Z
import discord from discord.ext import commands from discord_slash import cog_ext from discord_slash.utils.manage_commands import create_option class Slash(commands.Cog): def __init__(self, bot): self.bot = bot @cog_ext.cog_slash(name="glass", description="Afficher une photo de profil avec un filtre d...
38.034483
114
0.648232
import discord from discord.ext import commands from discord_slash import cog_ext from discord_slash.utils.manage_commands import create_option class Slash(commands.Cog): def __init__(self, bot): self.bot = bot @cog_ext.cog_slash(name="glass", description="Afficher une photo de profil avec un filtre d...
true
true
1c12dc6eb4d4fe26ebc2cd3067e3be65c9199b83
4,062
py
Python
nnunet_ext/training/model_restore.py
camgbus/Lifelong-nnUNet
2325d74047db354cf8b6d6d8241c52678a538eaa
[ "Apache-2.0" ]
2
2021-11-22T09:16:05.000Z
2022-02-17T07:06:57.000Z
nnunet_ext/training/model_restore.py
camgbus/nnUNet_extensions
2325d74047db354cf8b6d6d8241c52678a538eaa
[ "Apache-2.0" ]
null
null
null
nnunet_ext/training/model_restore.py
camgbus/nnUNet_extensions
2325d74047db354cf8b6d6d8241c52678a538eaa
[ "Apache-2.0" ]
null
null
null
######################################################################################################### #----------This class represents the model_restore module for the nnUNet extension. Implementation------# #----------inspired by original implementation (--> model_restore), copied code is marked as such.------# ##...
58.028571
153
0.621369
import nnunet, nnunet_ext from batchgenerators.utilities.file_and_folder_operations import * from nnunet.training.model_restore import recursive_find_python_class from nnunet.training.network_training.nnUNetTrainer import nnUNetTrainer def restore_model(pkl_file, checkpoint=None, train=False, fp16=True, use_extension...
true
true
1c12dc938063a2b7aadeabd62e3a49588bfa2cb6
507
py
Python
gsflow/__init__.py
pygsflow/pygsflow
83860cd58078017a65e1633b1192469777f1ce15
[ "CC0-1.0", "BSD-3-Clause" ]
17
2019-11-11T02:49:29.000Z
2022-02-17T03:45:19.000Z
gsflow/__init__.py
pygsflow/pygsflow
83860cd58078017a65e1633b1192469777f1ce15
[ "CC0-1.0", "BSD-3-Clause" ]
21
2019-07-10T21:45:11.000Z
2022-02-22T17:57:20.000Z
gsflow/__init__.py
pygsflow/pygsflow
83860cd58078017a65e1633b1192469777f1ce15
[ "CC0-1.0", "BSD-3-Clause" ]
8
2019-11-11T02:49:36.000Z
2021-09-30T18:43:45.000Z
# -*- coding: utf-8 -*- __author__ = """Ayman Alzraiee, Josh Larsen, Rich Niswonger""" __email__ = """aalzraiee@usgs.gov, jlarsen@usgs.gov, rniswon@usgs.gov""" __version__ = "1.0.0" from .control import ControlFile, ControlRecord from .prms.prms_model import PrmsModel from .prms.prms_parameter import PrmsParameters, P...
31.6875
72
0.769231
__author__ = """Ayman Alzraiee, Josh Larsen, Rich Niswonger""" __email__ = """aalzraiee@usgs.gov, jlarsen@usgs.gov, rniswon@usgs.gov""" __version__ = "1.0.0" from .control import ControlFile, ControlRecord from .prms.prms_model import PrmsModel from .prms.prms_parameter import PrmsParameters, ParameterRecord from .prm...
true
true
1c12dcda3c2c953d206757cc9a7f2e80ea0497d7
49,222
py
Python
capstone/fabfile.py
truthiswill/capstone
61b17611ebee17a5f5e4f64ae4ccaa67ac357478
[ "MIT" ]
null
null
null
capstone/fabfile.py
truthiswill/capstone
61b17611ebee17a5f5e4f64ae4ccaa67ac357478
[ "MIT" ]
4
2021-09-02T20:54:31.000Z
2022-02-27T14:04:06.000Z
capstone/fabfile.py
whitemike889/capstone
61b17611ebee17a5f5e4f64ae4ccaa67ac357478
[ "MIT" ]
null
null
null
import csv import glob import gzip import hashlib import os import pathlib from datetime import datetime import django import json from random import randrange, randint from pathlib import Path from celery import shared_task, group from tqdm import tqdm # set up Django os.environ.setdefault('DJANGO_SETTINGS_MODULE', ...
40.478618
210
0.676344
import csv import glob import gzip import hashlib import os import pathlib from datetime import datetime import django import json from random import randrange, randint from pathlib import Path from celery import shared_task, group from tqdm import tqdm os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings...
true
true
1c12dda2db3c73e81840628073f22fe60c68b85b
1,821
py
Python
rlkit/envs/contextual/latent_distributions.py
jcoreyes/erl
43f4e8407967749f5364106163f3c5335eb7dc83
[ "MIT" ]
1
2020-10-23T14:40:09.000Z
2020-10-23T14:40:09.000Z
rlkit/envs/contextual/latent_distributions.py
jcoreyes/erl
43f4e8407967749f5364106163f3c5335eb7dc83
[ "MIT" ]
null
null
null
rlkit/envs/contextual/latent_distributions.py
jcoreyes/erl
43f4e8407967749f5364106163f3c5335eb7dc83
[ "MIT" ]
1
2021-05-27T20:38:45.000Z
2021-05-27T20:38:45.000Z
import numpy as np from gym.spaces import Box, Dict from rlkit.core.distribution import DictDistribution class AddLatentDistribution(DictDistribution): def __init__( self, dist, input_key, output_key, model, ): self.dist = dist self....
27.590909
68
0.590884
import numpy as np from gym.spaces import Box, Dict from rlkit.core.distribution import DictDistribution class AddLatentDistribution(DictDistribution): def __init__( self, dist, input_key, output_key, model, ): self.dist = dist self....
true
true
1c12ddabec5329bce5c585ad6b2f0c77aa58d31d
516
py
Python
interview/code/valid_parentheses.py
bigfoolliu/liu_aistuff
aa661d37c05c257ee293285dd0868fb7e8227628
[ "MIT" ]
1
2019-11-25T07:23:42.000Z
2019-11-25T07:23:42.000Z
interview/code/valid_parentheses.py
bigfoolliu/liu_aistuff
aa661d37c05c257ee293285dd0868fb7e8227628
[ "MIT" ]
13
2020-01-07T16:09:47.000Z
2022-03-02T12:51:44.000Z
interview/code/valid_parentheses.py
bigfoolliu/liu_aistuff
aa661d37c05c257ee293285dd0868fb7e8227628
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # author: bigfoolliu """ ({}) 括号的合法性 """ def valid(strs): """左括号进栈,右括号出栈,为空则为正常""" hash_map = {"(": ")", "[": "]", "{": "}"} stack = [] for i in strs: if i in hash_map: stack.append(i) else: if len(stack) == 0 or i...
17.793103
59
0.424419
def valid(strs): hash_map = {"(": ")", "[": "]", "{": "}"} stack = [] for i in strs: if i in hash_map: stack.append(i) else: if len(stack) == 0 or i != hash_map[stack[-1]]: return False else: stack.pop() return len(s...
true
true
1c12de63c4440de9e5435354228363d82556c08f
1,971
py
Python
backend/lbd_backend/settings.py
XC-/OpenGeoREST
f5abde855bbcb7fabae69a21df93c4aadf132feb
[ "MIT" ]
null
null
null
backend/lbd_backend/settings.py
XC-/OpenGeoREST
f5abde855bbcb7fabae69a21df93c4aadf132feb
[ "MIT" ]
null
null
null
backend/lbd_backend/settings.py
XC-/OpenGeoREST
f5abde855bbcb7fabae69a21df93c4aadf132feb
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import mongoengine BASE_DIR = os.path.dirname(os.path.dirname(__file__)) # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = ')_7av^!cy(wfx=k#3*7x+(=j^fzv+ot^1@sh9s9t=8$bu@r(z$' TESTING_URLS = True DEBUG = True TEMPLATE_DEBUG = DEBUG ALLOWED_HOSTS =...
23.464286
76
0.731608
import os import mongoengine BASE_DIR = os.path.dirname(os.path.dirname(__file__)) SECRET_KEY = ')_7av^!cy(wfx=k#3*7x+(=j^fzv+ot^1@sh9s9t=8$bu@r(z$' TESTING_URLS = True DEBUG = True TEMPLATE_DEBUG = DEBUG ALLOWED_HOSTS = ["*"] INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'djan...
true
true
1c12e00b3c3a08ba707b81f78d35dfc82abdaac7
4,311
py
Python
test/toolset-mock/src/darwin-4.2.1.py
loongson-zn/build
d4bedebfa046b763c316e31c98b48ed2779741b9
[ "BSL-1.0" ]
215
2015-01-10T17:16:34.000Z
2022-02-23T15:22:08.000Z
test/toolset-mock/src/darwin-4.2.1.py
loongson-zn/build
d4bedebfa046b763c316e31c98b48ed2779741b9
[ "BSL-1.0" ]
594
2015-01-22T16:17:55.000Z
2022-02-26T22:11:01.000Z
test/toolset-mock/src/darwin-4.2.1.py
loongson-zn/build
d4bedebfa046b763c316e31c98b48ed2779741b9
[ "BSL-1.0" ]
302
2015-02-03T01:20:29.000Z
2022-02-12T07:01:28.000Z
#!/usr/bin/python # # Copyright 2017 Steven Watanabe # # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE.txt or copy at # https://www.bfgroup.xyz/b2/LICENSE.txt) from MockProgram import * script("libtool.py") command('g++', '-dumpversion', stdout='4.2.1') # all builds are...
110.538462
431
0.673858
from MockProgram import * script("libtool.py") command('g++', '-dumpversion', stdout='4.2.1') if allow_properties("variant=debug", "link=shared", "runtime-link=shared"): command('g++', unordered('-O0', '-fno-inline', '-Wall', '-g', '-dynamic', '-gdwarf-2', '-fexceptions', '-fPIC'), '-c', '-o', output_file('bin/...
true
true
1c12e06f2f5c6f290f6611df151a9a86c21fc6ce
1,072
py
Python
cluster/old-cdk-cluster-0.96/cdk/cdk_vpc_stack.py
JoeShi/amazon-s3-resumable-upload
d3e2d2b6536fb44888a64156577987b4d0606644
[ "MIT-0" ]
117
2020-02-06T09:48:28.000Z
2022-03-04T02:43:19.000Z
cluster/old-cdk-cluster-0.96/cdk/cdk_vpc_stack.py
JoeShi/amazon-s3-resumable-upload
d3e2d2b6536fb44888a64156577987b4d0606644
[ "MIT-0" ]
19
2020-02-13T13:06:26.000Z
2020-11-03T08:59:29.000Z
cluster/old-cdk-cluster-0.96/cdk/cdk_vpc_stack.py
JoeShi/amazon-s3-resumable-upload
d3e2d2b6536fb44888a64156577987b4d0606644
[ "MIT-0" ]
72
2020-02-06T09:48:26.000Z
2022-03-10T11:42:24.000Z
from aws_cdk import core import aws_cdk.aws_ec2 as ec2 class CdkVpcStack(core.Stack): def __init__(self, scope: core.Construct, _id: str, **kwargs) -> None: super().__init__(scope, _id, **kwargs) self.vpc = ec2.Vpc(self, "VPC", max_azs=2, cid...
39.703704
99
0.472015
from aws_cdk import core import aws_cdk.aws_ec2 as ec2 class CdkVpcStack(core.Stack): def __init__(self, scope: core.Construct, _id: str, **kwargs) -> None: super().__init__(scope, _id, **kwargs) self.vpc = ec2.Vpc(self, "VPC", max_azs=2, cid...
true
true
1c12e252a031b0deb58c17503b7819923c2ff339
4,585
py
Python
desktop/core/ext-py/Django-1.11/tests/template_tests/filter_tests/test_chaining.py
kokosing/hue
2307f5379a35aae9be871e836432e6f45138b3d9
[ "Apache-2.0" ]
5,079
2015-01-01T03:39:46.000Z
2022-03-31T07:38:22.000Z
tests/template_tests/filter_tests/test_chaining.py
287977288/test
142e3626ab3c676574631383ae6b5a4eced5a10e
[ "PSF-2.0", "BSD-3-Clause" ]
1,623
2015-01-01T08:06:24.000Z
2022-03-30T19:48:52.000Z
tests/template_tests/filter_tests/test_chaining.py
287977288/test
142e3626ab3c676574631383ae6b5a4eced5a10e
[ "PSF-2.0", "BSD-3-Clause" ]
2,033
2015-01-04T07:18:02.000Z
2022-03-28T19:55:47.000Z
import warnings from django.test import SimpleTestCase, ignore_warnings from django.test.utils import reset_warning_registry from django.utils.deprecation import RemovedInDjango20Warning from django.utils.safestring import mark_safe from ..utils import setup class ChainingTests(SimpleTestCase): """ Chaining...
43.666667
112
0.608724
import warnings from django.test import SimpleTestCase, ignore_warnings from django.test.utils import reset_warning_registry from django.utils.deprecation import RemovedInDjango20Warning from django.utils.safestring import mark_safe from ..utils import setup class ChainingTests(SimpleTestCase): @setup({'chaini...
true
true
1c12e350ded7905d57ea407e9347a397612469a1
203
py
Python
celery/project/app/urls.py
idrissabanli/celery_project_deploy
e74c975d27523d7e20235393179164ee21ed7c12
[ "MIT" ]
null
null
null
celery/project/app/urls.py
idrissabanli/celery_project_deploy
e74c975d27523d7e20235393179164ee21ed7c12
[ "MIT" ]
11
2020-06-06T00:58:18.000Z
2022-03-12T00:03:41.000Z
celery/project/app/urls.py
idrissabanli/celery_project_deploy
e74c975d27523d7e20235393179164ee21ed7c12
[ "MIT" ]
null
null
null
from django.urls import path from .views import send_mail_view, set_date urlpatterns = [ path('send-mail/', send_mail_view, name='send_mail'), path('create-task/', set_date, name='send_mail'), ]
29
57
0.719212
from django.urls import path from .views import send_mail_view, set_date urlpatterns = [ path('send-mail/', send_mail_view, name='send_mail'), path('create-task/', set_date, name='send_mail'), ]
true
true
1c12e3d3c9e14385d9c876fc1039b71a2f83aabc
1,346
py
Python
app/app.py
TravisJRCain/spotify
c87481d90e09667b9f96a9ef8b2df049b6918684
[ "MIT" ]
null
null
null
app/app.py
TravisJRCain/spotify
c87481d90e09667b9f96a9ef8b2df049b6918684
[ "MIT" ]
null
null
null
app/app.py
TravisJRCain/spotify
c87481d90e09667b9f96a9ef8b2df049b6918684
[ "MIT" ]
null
null
null
from flask import Flask, jsonify, request import sqlite3 import pandas as pd from flask_sqlalchemy import SQLAlchemy from sqlalchemy import create_engine import numpy as np from sklearn import preprocessing from sklearn.neighbors import NearestNeighbors from sklearn.model_selection import train_test_split from sklearn....
28.638298
113
0.710253
from flask import Flask, jsonify, request import sqlite3 import pandas as pd from flask_sqlalchemy import SQLAlchemy from sqlalchemy import create_engine import numpy as np from sklearn import preprocessing from sklearn.neighbors import NearestNeighbors from sklearn.model_selection import train_test_split from sklearn....
true
true
1c12e4208b6c1ca5d6932a4aa29932e50877cf33
7,924
py
Python
app/models/product_review.py
AlexEpstein1/316Amazon
75820b3cdd2d511826ade78b6c5739ac93c04a62
[ "MIT" ]
null
null
null
app/models/product_review.py
AlexEpstein1/316Amazon
75820b3cdd2d511826ade78b6c5739ac93c04a62
[ "MIT" ]
null
null
null
app/models/product_review.py
AlexEpstein1/316Amazon
75820b3cdd2d511826ade78b6c5739ac93c04a62
[ "MIT" ]
1
2022-03-22T00:22:16.000Z
2022-03-22T00:22:16.000Z
from flask import current_app as app, flash, redirect, render_template, request, url_for from flask_login import current_user from sqlalchemy import exc import datetime # Reviews of Products # CREATE TABLE ProductReview ( # user_id INT NOT NULL REFERENCES Users(id), # product_id INT NOT NULL REFERENCES Products(id),...
40.635897
101
0.549596
from flask import current_app as app, flash, redirect, render_template, request, url_for from flask_login import current_user from sqlalchemy import exc import datetime class ProductReview: def __init__(self, **kwargs): self.user_id = kwargs.get('user_id') self.product_id = kwargs.get('product_id'...
true
true
1c12e4273a52dd329c2d3780d08a1afe8c6e5453
664
py
Python
tago/services/notification.py
tago-io/tago-sdk-python
c55c86a002bb5f48dd08a9c2b270d0dee4b1b6d1
[ "Apache-2.0" ]
4
2017-05-01T01:55:29.000Z
2022-02-14T12:55:42.000Z
tago/services/notification.py
tago-io/tago-python
203b489aa5bcdbb116423049c62d90a7cce9b9a0
[ "Apache-2.0" ]
10
2017-03-20T14:54:46.000Z
2021-12-14T21:52:08.000Z
tago/services/notification.py
tago-io/tago-python
203b489aa5bcdbb116423049c62d90a7cce9b9a0
[ "Apache-2.0" ]
5
2017-04-04T21:59:06.000Z
2022-02-11T08:35:35.000Z
import requests import json import os API_TAGO = os.environ.get('TAGOIO_API') or 'https://api.tago.io' REALTIME = os.environ.get('TAGOIO_REALTIME') or 'https://realtime.tago.io' class Notification: def __init__(self, analysis_token): self.token = analysis_token self.default_headers = { 'content-type'...
30.181818
156
0.704819
import requests import json import os API_TAGO = os.environ.get('TAGOIO_API') or 'https://api.tago.io' REALTIME = os.environ.get('TAGOIO_REALTIME') or 'https://realtime.tago.io' class Notification: def __init__(self, analysis_token): self.token = analysis_token self.default_headers = { 'content-type'...
true
true
1c12e577d59dfc4773e0beb4b54270deca3a633e
747
py
Python
asmpatch.py
robertkirkman/WW_Hacking_API
39dae37bde0b3684a2dfe221f7faae177a676e44
[ "MIT" ]
5
2020-05-09T22:35:35.000Z
2021-04-13T02:26:52.000Z
asmpatch.py
robertkirkman/WW_Hacking_API
39dae37bde0b3684a2dfe221f7faae177a676e44
[ "MIT" ]
null
null
null
asmpatch.py
robertkirkman/WW_Hacking_API
39dae37bde0b3684a2dfe221f7faae177a676e44
[ "MIT" ]
4
2020-12-26T15:37:53.000Z
2021-10-05T08:20:46.000Z
import sys import glob import os from gc_filesystem import GameCubeFilesystem from asm_api import patcher if len(sys.argv) != 3: print("Invalid arguments. Format should be as follows:") print(" py asmpatch.py [path to clean WW ISO file] [path to modified output extracted ISO folder]") sys.exit(1) clean_iso_...
26.678571
102
0.7751
import sys import glob import os from gc_filesystem import GameCubeFilesystem from asm_api import patcher if len(sys.argv) != 3: print("Invalid arguments. Format should be as follows:") print(" py asmpatch.py [path to clean WW ISO file] [path to modified output extracted ISO folder]") sys.exit(1) clean_iso_...
true
true
1c12e6b728863bb14591fb7a2cf741b861294ce2
1,619
py
Python
benchmarks/german/facet_plots.py
vsahil/influence-duplicate
ae5bc77be6dcb7d69054a520733c373d833552da
[ "MIT" ]
null
null
null
benchmarks/german/facet_plots.py
vsahil/influence-duplicate
ae5bc77be6dcb7d69054a520733c373d833552da
[ "MIT" ]
null
null
null
benchmarks/german/facet_plots.py
vsahil/influence-duplicate
ae5bc77be6dcb7d69054a520733c373d833552da
[ "MIT" ]
1
2021-11-03T06:53:18.000Z
2021-11-03T06:53:18.000Z
from plotnine import * # from plotnine import ggplot, geom_point, geom_line, aes, stat_smooth, facet_wrap # from plotnine.data import mtcars # from plotnine import positions # from plotnine import xlab, ylab, ggtitle, geom_boxplot, geom_path, geom_ribbon, geom_arrow import pandas as pd # df = pd.read_csv("all_german_...
34.446809
119
0.686844
from plotnine import * import pandas as pd df = pd.read_csv("german_credit_mega_results0.csv") x = (ggplot(aes(x='Removed-points', y='Discm-percent', color='Data-Split'), data=df) +\ geom_point(size=1.5) +\ facet_wrap(['H1Units','H2Units','Batch'], nrow=3, ncol=4,scales = 'fixed', labeller='label_...
true
true
1c12e823412262a6e81fbfc855388ddb2c91b7e2
468
py
Python
hdp-images/main.py
Open-Health-Data-Project/hdp-images
d70b5cc2d0046e05513cca3a519da70b38edf90b
[ "BSD-3-Clause" ]
1
2020-07-03T07:49:36.000Z
2020-07-03T07:49:36.000Z
hdp-images/main.py
Open-Health-Data-Project/hdp-images
d70b5cc2d0046e05513cca3a519da70b38edf90b
[ "BSD-3-Clause" ]
5
2020-06-30T16:54:54.000Z
2020-10-26T16:41:34.000Z
hdp-images/main.py
Open-Health-Data-Project/hdp-images
d70b5cc2d0046e05513cca3a519da70b38edf90b
[ "BSD-3-Clause" ]
1
2020-07-01T22:13:29.000Z
2020-07-01T22:13:29.000Z
from loading_images import * from recognition import * from modification import * from animation import * import os import pathlib test_list = [] path = pathlib.Path(r"") for file in os.listdir(path): test_list.append(path.joinpath(file)) if len(test_list) > 10: break loaded = load_jpg(test_list) # rec...
23.4
41
0.747863
from loading_images import * from recognition import * from modification import * from animation import * import os import pathlib test_list = [] path = pathlib.Path(r"") for file in os.listdir(path): test_list.append(path.joinpath(file)) if len(test_list) > 10: break loaded = load_jpg(test_list) for i...
true
true
1c12e87a6f8863c39c4d9943f7b47cbbf669d9b7
863
py
Python
st2tests/st2tests/policies/mock_exception.py
saucetray/st2
8f507d6c8d9483c8371e386fe2b7998596856fd7
[ "Apache-2.0" ]
2
2021-08-04T01:04:06.000Z
2021-08-04T01:04:08.000Z
st2tests/st2tests/policies/mock_exception.py
saucetray/st2
8f507d6c8d9483c8371e386fe2b7998596856fd7
[ "Apache-2.0" ]
1
2022-03-31T03:53:22.000Z
2022-03-31T03:53:22.000Z
st2tests/st2tests/policies/mock_exception.py
saucetray/st2
8f507d6c8d9483c8371e386fe2b7998596856fd7
[ "Apache-2.0" ]
1
2019-10-11T14:42:28.000Z
2019-10-11T14:42:28.000Z
# Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
33.192308
74
0.756663
from __future__ import absolute_import from st2common.policies import base class RaiseExceptionApplicator(base.ResourcePolicyApplicator): def apply_before(self, target): raise Exception('For honor!!!!') def apply_after(self, target): return target
true
true
1c12e8ca4b08b88372a675679a1512e5b3562c4a
2,600
py
Python
code_search/src/code_search/do_fns/github_files.py
AlexRogalskiy/kubeflow-examples
2d6a784b6206cb9d692de622b91f23f6f965d44c
[ "Apache-2.0" ]
8
2018-05-28T02:13:40.000Z
2022-01-15T05:06:49.000Z
code_search/src/code_search/do_fns/github_files.py
katacoda/kubeflow-examples
2d6a784b6206cb9d692de622b91f23f6f965d44c
[ "Apache-2.0" ]
2
2022-01-06T13:28:33.000Z
2022-01-06T13:28:51.000Z
code_search/src/code_search/do_fns/github_files.py
AlexRogalskiy/kubeflow-examples
2d6a784b6206cb9d692de622b91f23f6f965d44c
[ "Apache-2.0" ]
6
2018-11-05T14:12:54.000Z
2022-02-22T10:56:06.000Z
"""Beam DoFns for Github related tasks""" import time import logging import apache_beam as beam from apache_beam import pvalue from apache_beam.metrics import Metrics class SplitRepoPath(beam.DoFn): # pylint: disable=abstract-method """Split the space-delimited file `repo_path` into owner repository (`nwo`) and...
32.5
87
0.711923
import time import logging import apache_beam as beam from apache_beam import pvalue from apache_beam.metrics import Metrics class SplitRepoPath(beam.DoFn): def process(self, element): nwo, path = element.pop('repo_path').split(' ', 1) element['nwo'] = nwo element['path'] = path yield element c...
true
true
1c12e92bfd51c230757f5707c7ce213f6f95b875
4,080
py
Python
losses/regression.py
kilsenp/person-multi-task-dataset
2f186cafa3db2c77d8c6c4309b2cadc13d4f92ab
[ "MIT" ]
4
2020-10-08T03:31:36.000Z
2021-03-06T08:06:23.000Z
losses/regression.py
kilianyp/person-multi-task-dataset
2f186cafa3db2c77d8c6c4309b2cadc13d4f92ab
[ "MIT" ]
7
2021-06-08T20:55:10.000Z
2022-02-10T00:38:32.000Z
losses/regression.py
kilsenp/person-multi-task-dataset
2f186cafa3db2c77d8c6c4309b2cadc13d4f92ab
[ "MIT" ]
null
null
null
from torch import nn import torch from logger import get_logger, get_tensorboard_logger from utils import var2num class MSELoss(nn.Module): """MSE loss. Calculates the l2 norm for the matrix target-input. """ def __init__(self, endpoint_name, target_name): super().__init__() self.mse_lo...
39.230769
86
0.658824
from torch import nn import torch from logger import get_logger, get_tensorboard_logger from utils import var2num class MSELoss(nn.Module): def __init__(self, endpoint_name, target_name): super().__init__() self.mse_loss = nn.MSELoss(reduction='none') self.endpoint_name = endpoint_name ...
true
true
1c12ea6bb11d123affe6518b1a537f1080970374
3,454
py
Python
discriminators.py
GorskiBartosz/MusAE
4812b0e314a40662738f3ad5c0be9dcd3837f684
[ "MIT" ]
22
2019-03-03T17:32:17.000Z
2022-02-23T07:39:57.000Z
discriminators.py
GorskiBartosz/MusAE
4812b0e314a40662738f3ad5c0be9dcd3837f684
[ "MIT" ]
2
2020-01-20T06:54:55.000Z
2021-09-27T09:52:26.000Z
discriminators.py
GorskiBartosz/MusAE
4812b0e314a40662738f3ad5c0be9dcd3837f684
[ "MIT" ]
5
2020-12-25T09:44:14.000Z
2021-09-26T22:03:36.000Z
from keras.layers import Input, Dense, Concatenate, Reshape, Bidirectional, CuDNNLSTM from keras.models import Model import config def build_gaussian_discriminator(): fc_depth = config.model_params["z_discriminator_params"]["fc_depth"] fc_size = config.model_params["z_discriminator_params"]["fc_size"] z_length = c...
34.888889
85
0.730747
from keras.layers import Input, Dense, Concatenate, Reshape, Bidirectional, CuDNNLSTM from keras.models import Model import config def build_gaussian_discriminator(): fc_depth = config.model_params["z_discriminator_params"]["fc_depth"] fc_size = config.model_params["z_discriminator_params"]["fc_size"] z_length = c...
true
true
1c12ea8adc13df4ca20c4cb4a3c4a9af6debbc49
918
py
Python
group/apps.py
sdediego/django-group
1517a07eed2b1b34c23fd82208e81e38ed225608
[ "BSD-3-Clause" ]
3
2017-04-25T10:19:08.000Z
2019-01-26T17:57:19.000Z
group/apps.py
sdediego/django-group
1517a07eed2b1b34c23fd82208e81e38ed225608
[ "BSD-3-Clause" ]
null
null
null
group/apps.py
sdediego/django-group
1517a07eed2b1b34c23fd82208e81e38ed225608
[ "BSD-3-Clause" ]
2
2019-01-26T17:57:21.000Z
2020-10-19T14:17:57.000Z
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ from .signals import (group_created, group_removed, group_and_membership_remove, membership_request_accepted, membership_request_rejected, membership_request_viewed, membership_request_...
38.25
96
0.722222
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ from .signals import (group_created, group_removed, group_and_membership_remove, membership_request_accepted, membership_request_rejected, membership_request_viewed, membership_request_...
true
true
1c12ea8d568ef0f694b54c12d1e44bc5a63ca376
1,219
py
Python
addons/Verify.py
EmreTech/EmreTech-Bot
55fe998509d3547f9b6eedc263a91c7016ce52a3
[ "MIT" ]
null
null
null
addons/Verify.py
EmreTech/EmreTech-Bot
55fe998509d3547f9b6eedc263a91c7016ce52a3
[ "MIT" ]
1
2021-04-26T01:02:12.000Z
2021-05-07T20:16:43.000Z
addons/Verify.py
EmreTech/EmreTech-Bot
55fe998509d3547f9b6eedc263a91c7016ce52a3
[ "MIT" ]
null
null
null
import discord from discord.ext import commands from .Helper import handle_verify_msg, hashes class Verify(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command() async def verify(self, ctx: commands.Context, *, user_hash: str): """Verifies new members. Do not use if you...
43.535714
149
0.669401
import discord from discord.ext import commands from .Helper import handle_verify_msg, hashes class Verify(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command() async def verify(self, ctx: commands.Context, *, user_hash: str): if not ctx.channel == self.bot.verify_chan...
true
true
1c12eafaf881a94a75c106b1d6070f870b117cb2
541
py
Python
pyleecan/Methods/Machine/FrameBar/comp_surface_gap.py
tobsen2code/pyleecan
5b1ded9e389e0c79ed7b7c878b6e939f2d9962e9
[ "Apache-2.0" ]
95
2019-01-23T04:19:45.000Z
2022-03-17T18:22:10.000Z
pyleecan/Methods/Machine/FrameBar/comp_surface_gap.py
Eomys/Pyleecan
4d7f0cbabf0311006963e7a2f435db2ecd901118
[ "Apache-2.0" ]
366
2019-02-20T07:15:08.000Z
2022-03-31T13:37:23.000Z
pyleecan/Methods/Machine/FrameBar/comp_surface_gap.py
Eomys/Pyleecan
4d7f0cbabf0311006963e7a2f435db2ecd901118
[ "Apache-2.0" ]
74
2019-01-24T01:47:31.000Z
2022-02-25T05:44:42.000Z
from numpy import pi def comp_surface_gap(self): """Compute the surface of the Gap between the Frame and outer Lamination Parameters ---------- self : FrameBar A FrameBar object Returns ------- Sgap: float Surface of the Gap [m**2] """ # Surface of the external ...
18.655172
76
0.5878
from numpy import pi def comp_surface_gap(self): S_ext = (self.Rext ** 2) * pi S_int = (self.Rint ** 2) * pi S_bar = self.comp_surface_bar() Sgap = S_ext - S_int - S_bar return Sgap
true
true
1c12eb449e765892a25a7e7a1014e5f17edeea29
3,145
py
Python
Waterfall/training_main.py
DerXter/Waterfall-AI_Traffic-Signal-Control
8867fdd363c79d44100c67587da85574d673d147
[ "MIT" ]
6
2020-04-27T21:19:24.000Z
2021-03-24T11:41:16.000Z
Waterfall/training_main.py
DerXter/Waterfall-AI_Traffic-Signal-Control
8867fdd363c79d44100c67587da85574d673d147
[ "MIT" ]
null
null
null
Waterfall/training_main.py
DerXter/Waterfall-AI_Traffic-Signal-Control
8867fdd363c79d44100c67587da85574d673d147
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import print_function import os import datetime from shutil import copyfile from training_simulation import Simulation from generator import TrafficGenerator from memory import Memory from model import TrainModel from visualization import Visualization from util...
37
154
0.690302
from __future__ import absolute_import from __future__ import print_function import os import datetime from shutil import copyfile from training_simulation import Simulation from generator import TrafficGenerator from memory import Memory from model import TrainModel from visualization import Visualization from util...
true
true
1c12eb72b957a807ce5688e024cf15ee45589047
1,256
py
Python
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/GLES2/OES/fbo_render_mipmap.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/GLES2/OES/fbo_render_mipmap.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/GLES2/OES/fbo_render_mipmap.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
'''OpenGL extension OES.fbo_render_mipmap This module customises the behaviour of the OpenGL.raw.GLES2.OES.fbo_render_mipmap to provide a more Python-friendly API Overview (from the spec) OES_framebuffer_object allows rendering to the base level of a texture only. This extension removes this limitati...
36.941176
72
0.786624
from OpenGL import platform, constant, arrays from OpenGL import extensions, wrapper import ctypes from OpenGL.raw.GLES2 import _types, _glgets from OpenGL.raw.GLES2.OES.fbo_render_mipmap import * from OpenGL.raw.GLES2.OES.fbo_render_mipmap import _EXTENSION_NAME def glInitFboRenderMipmapOES(): from OpenGL...
true
true
1c12ebaaa0b1b11afa5cc5423812f8bc3697026d
2,887
py
Python
Practice&test files/TableObjects.py
rval002/Air-Hockey-Table-Project-UCR
babc11637d0db89c012205e0c2ad1a608d1c54e3
[ "MIT" ]
1
2021-06-08T05:22:55.000Z
2021-06-08T05:22:55.000Z
Practice&test files/TableObjects.py
rval002/Air-Hockey-Table-Project-UCR
babc11637d0db89c012205e0c2ad1a608d1c54e3
[ "MIT" ]
null
null
null
Practice&test files/TableObjects.py
rval002/Air-Hockey-Table-Project-UCR
babc11637d0db89c012205e0c2ad1a608d1c54e3
[ "MIT" ]
1
2021-01-11T04:48:08.000Z
2021-01-11T04:48:08.000Z
# **************************************************************************** # # Air Hockey Table Project # Author: Ricardo Valverde # ------------------------- #This Code is Created for UCR's EE175 Senior Design Project # This Code contains The Objects #For Pygame Documentation please see: #https://www.pygame.or...
24.058333
91
0.517839
# This Code contains The Objects #For Pygame Documentation please see: #https://www.pygame.org/docs/index.html # **************************************************************************** # import pygame import math wScreen = 1200 hScreen = 500 win = pygame.display.set_mode((wScreen,hScreen)) pygame.display.se...
true
true
1c12ebf0508cfa50f0cd899ae687468e683fc402
1,598
py
Python
hc/api/tests/test_notify_trello.py
gdepeyrot/healthchecks
148894bd9ee028d32ab2032441f6746bc7e794e4
[ "BSD-3-Clause" ]
4,813
2015-07-27T11:44:52.000Z
2022-03-31T14:24:07.000Z
hc/api/tests/test_notify_trello.py
gdepeyrot/healthchecks
148894bd9ee028d32ab2032441f6746bc7e794e4
[ "BSD-3-Clause" ]
579
2015-07-20T11:49:19.000Z
2022-03-31T18:20:11.000Z
hc/api/tests/test_notify_trello.py
gdepeyrot/healthchecks
148894bd9ee028d32ab2032441f6746bc7e794e4
[ "BSD-3-Clause" ]
644
2015-09-11T16:14:26.000Z
2022-03-31T13:20:20.000Z
from datetime import timedelta as td import json from unittest.mock import patch from django.utils.timezone import now from django.test.utils import override_settings from hc.api.models import Channel, Check, Notification from hc.test import BaseTestCase @override_settings(TRELLO_APP_KEY="fake-trello-app-key") class...
32.612245
62
0.626408
from datetime import timedelta as td import json from unittest.mock import patch from django.utils.timezone import now from django.test.utils import override_settings from hc.api.models import Channel, Check, Notification from hc.test import BaseTestCase @override_settings(TRELLO_APP_KEY="fake-trello-app-key") class...
true
true
1c12ece344fde58f303e11d3ddabfe9c7b732d10
996
py
Python
app/core/tests/test_commands.py
csukel/recipe-app-api
208d0fdbda2478f10f390a56eaaeff9c3a7eea54
[ "MIT" ]
null
null
null
app/core/tests/test_commands.py
csukel/recipe-app-api
208d0fdbda2478f10f390a56eaaeff9c3a7eea54
[ "MIT" ]
null
null
null
app/core/tests/test_commands.py
csukel/recipe-app-api
208d0fdbda2478f10f390a56eaaeff9c3a7eea54
[ "MIT" ]
null
null
null
from unittest.mock import patch from django.core.management import call_command from django.db.utils import OperationalError from django.test import TestCase class CommandTests(TestCase): def test_wait_for_db_ready(self): """Test waiting for db when db is availabel""" # we are mocking the behavi...
36.888889
77
0.673695
from unittest.mock import patch from django.core.management import call_command from django.db.utils import OperationalError from django.test import TestCase class CommandTests(TestCase): def test_wait_for_db_ready(self): with patch('django.db.utils.ConnectionHandler.__getitem__') as gi:...
true
true
1c12ed058d81697cd27a90256215535223b74593
3,913
py
Python
orbit/utils/common.py
62theories/tf-flask
c6954f0f3c4082165c92c77bb06d2fec6e75a8c4
[ "Apache-2.0" ]
null
null
null
orbit/utils/common.py
62theories/tf-flask
c6954f0f3c4082165c92c77bb06d2fec6e75a8c4
[ "Apache-2.0" ]
null
null
null
orbit/utils/common.py
62theories/tf-flask
c6954f0f3c4082165c92c77bb06d2fec6e75a8c4
[ "Apache-2.0" ]
1
2020-12-31T17:31:21.000Z
2020-12-31T17:31:21.000Z
# Copyright 2021 The Orbit Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
36.915094
80
0.726553
import inspect import tensorflow as tf def create_global_step() -> tf.Variable: return tf.Variable( 0, dtype=tf.int64, name="global_step", trainable=False, aggregation=tf.VariableAggregation.ONLY_FIRST_REPLICA) def make_distributed_dataset(strategy, dataset_or_fn, *args, **kwargs)...
true
true
1c12edddab6f3b2415d72bc5f50f128a90beec5a
555
py
Python
Bees/intelligence.py
kushkamisha/BeesAlgorithm
262bac9106542dba50f922c191f84d83436c68c8
[ "ISC" ]
1
2019-11-20T07:49:03.000Z
2019-11-20T07:49:03.000Z
Bees/intelligence.py
kushkamisha/BeesAlgorithm
262bac9106542dba50f922c191f84d83436c68c8
[ "ISC" ]
null
null
null
Bees/intelligence.py
kushkamisha/BeesAlgorithm
262bac9106542dba50f922c191f84d83436c68c8
[ "ISC" ]
1
2019-12-09T19:42:30.000Z
2019-12-09T19:42:30.000Z
class sw(): def __init__(self): self.__Positions = [] self.__Gbest = [] def _set_Gbest(self, Gbest): self.__Gbest = Gbest def _points(self, agents): self.__Positions.append([list(i) for i in agents]) def get_agents(self): """Returns a history of...
23.125
74
0.574775
class sw(): def __init__(self): self.__Positions = [] self.__Gbest = [] def _set_Gbest(self, Gbest): self.__Gbest = Gbest def _points(self, agents): self.__Positions.append([list(i) for i in agents]) def get_agents(self): return self.__Positio...
true
true
1c12efc9a0bfd9c6aa8b01ac7e6df9d7dd2d8135
9,434
py
Python
tests/contracts/KT1V29tWwy8B4FBZT2aVpyrzMtBntwj6Hxs4/test_michelson_coding_KT1V29.py
juztin/pytezos-1
7e608ff599d934bdcf129e47db43dbdb8fef9027
[ "MIT" ]
1
2021-05-20T16:52:08.000Z
2021-05-20T16:52:08.000Z
tests/contracts/KT1V29tWwy8B4FBZT2aVpyrzMtBntwj6Hxs4/test_michelson_coding_KT1V29.py
juztin/pytezos-1
7e608ff599d934bdcf129e47db43dbdb8fef9027
[ "MIT" ]
1
2020-12-30T16:44:56.000Z
2020-12-30T16:44:56.000Z
tests/contracts/KT1V29tWwy8B4FBZT2aVpyrzMtBntwj6Hxs4/test_michelson_coding_KT1V29.py
tqtezos/pytezos
a4ac0b022d35d4c9f3062609d8ce09d584b5faa8
[ "MIT" ]
1
2022-03-20T19:01:00.000Z
2022-03-20T19:01:00.000Z
from unittest import TestCase from tests import get_data from pytezos.michelson.micheline import michelson_to_micheline from pytezos.michelson.formatter import micheline_to_michelson class MichelsonCodingTestKT1V29(TestCase): def setUp(self): self.maxDiff = None def test_michelson_parse_code_KT...
46.935323
89
0.734683
from unittest import TestCase from tests import get_data from pytezos.michelson.micheline import michelson_to_micheline from pytezos.michelson.formatter import micheline_to_michelson class MichelsonCodingTestKT1V29(TestCase): def setUp(self): self.maxDiff = None def test_michelson_parse_code_KT...
true
true
1c12efd7cfd5c0bf9951f569283c1475e63cd83e
1,990
py
Python
test/v1/test_messages.py
niconoe/pyinaturalist
981d0a2f350c86e3b6d89e8927f0a1919aaa2b7b
[ "MIT" ]
47
2019-07-23T08:18:02.000Z
2022-03-17T16:32:17.000Z
test/v1/test_messages.py
niconoe/pyinaturalist
981d0a2f350c86e3b6d89e8927f0a1919aaa2b7b
[ "MIT" ]
219
2019-08-22T14:45:20.000Z
2022-03-30T02:39:35.000Z
test/v1/test_messages.py
JWCook/pyinaturalist
981d0a2f350c86e3b6d89e8927f0a1919aaa2b7b
[ "MIT" ]
9
2020-02-28T04:29:13.000Z
2022-02-23T03:02:32.000Z
from datetime import datetime from dateutil.tz import tzoffset from pyinaturalist.constants import API_V1_BASE_URL from pyinaturalist.v1 import get_message_by_id, get_messages, get_unread_meassage_count from test.sample_data import SAMPLE_DATA def test_get_message_by_id(requests_mock): message_id = 12345 re...
27.638889
87
0.675377
from datetime import datetime from dateutil.tz import tzoffset from pyinaturalist.constants import API_V1_BASE_URL from pyinaturalist.v1 import get_message_by_id, get_messages, get_unread_meassage_count from test.sample_data import SAMPLE_DATA def test_get_message_by_id(requests_mock): message_id = 12345 re...
true
true
1c12efeebaf2bdc7b875755283cd9451e9846567
431
py
Python
Backend/NEW/venv/Scripts/pip3.8-script.py
chehansivaruban/Cyber---SDGP
6676c284c34c4c15279bf3e5cfb73fd4e5b7391a
[ "CC0-1.0" ]
1
2021-05-18T10:55:32.000Z
2021-05-18T10:55:32.000Z
Backend/NEW/venv/Scripts/pip3.8-script.py
chehansivaruban/Cyber---SDGP
6676c284c34c4c15279bf3e5cfb73fd4e5b7391a
[ "CC0-1.0" ]
null
null
null
Backend/NEW/venv/Scripts/pip3.8-script.py
chehansivaruban/Cyber---SDGP
6676c284c34c4c15279bf3e5cfb73fd4e5b7391a
[ "CC0-1.0" ]
2
2021-03-29T19:00:55.000Z
2021-04-02T13:18:07.000Z
#!C:\Users\dulan\Desktop\SDGP\Cyber---SDGP\Backend\NEW\venv\Scripts\python.exe # EASY-INSTALL-ENTRY-SCRIPT: 'pip==19.0.3','console_scripts','pip3.8' __requires__ = 'pip==19.0.3' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$...
33.153846
78
0.665893
__requires__ = 'pip==19.0.3' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) sys.exit( load_entry_point('pip==19.0.3', 'console_scripts', 'pip3.8')() )
true
true
1c12f0203fc167e4f5655acd9709f24a83df0400
160
py
Python
tests/model_control/detailed/transf_RelativeDifference/model_control_one_enabled_RelativeDifference_Lag1Trend_NoCycle_LSTM.py
shaido987/pyaf
b9afd089557bed6b90b246d3712c481ae26a1957
[ "BSD-3-Clause" ]
377
2016-10-13T20:52:44.000Z
2022-03-29T18:04:14.000Z
tests/model_control/detailed/transf_RelativeDifference/model_control_one_enabled_RelativeDifference_Lag1Trend_NoCycle_LSTM.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
160
2016-10-13T16:11:53.000Z
2022-03-28T04:21:34.000Z
tests/model_control/detailed/transf_RelativeDifference/model_control_one_enabled_RelativeDifference_Lag1Trend_NoCycle_LSTM.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
63
2017-03-09T14:51:18.000Z
2022-03-27T20:52:57.000Z
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['RelativeDifference'] , ['Lag1Trend'] , ['NoCycle'] , ['LSTM'] );
40
87
0.75625
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['RelativeDifference'] , ['Lag1Trend'] , ['NoCycle'] , ['LSTM'] );
true
true
1c12f0370009edb3b51051c2a4c5fdb3dce85c90
768
py
Python
atok/feed/models.py
infinity-project/are-they-ok
e12f5a3be4011aeaf5b1330f5b83f9cefbe19e1d
[ "MIT" ]
null
null
null
atok/feed/models.py
infinity-project/are-they-ok
e12f5a3be4011aeaf5b1330f5b83f9cefbe19e1d
[ "MIT" ]
null
null
null
atok/feed/models.py
infinity-project/are-they-ok
e12f5a3be4011aeaf5b1330f5b83f9cefbe19e1d
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django.db import models from django.utils import timezone from django.contrib.auth.models import User from django.utils.encoding import python_2_unicode_compatible # Create your models here. class Update(models.Model): update_text = models.CharField(max_length=10) user ...
32
69
0.796875
from __future__ import unicode_literals from django.db import models from django.utils import timezone from django.contrib.auth.models import User from django.utils.encoding import python_2_unicode_compatible class Update(models.Model): update_text = models.CharField(max_length=10) user = models.ForeignKey(User) ...
true
true
1c12f0ea82e458df4d77ed531f602f9ba1103e0c
1,463
py
Python
sysinv/sysinv/sysinv/sysinv/db/sqlalchemy/migrate_repo/versions/032_system_capabilities.py
etaivan/stx-config
281e1f110973f96e077645fb01f67b646fc253cc
[ "Apache-2.0" ]
10
2020-02-07T18:57:44.000Z
2021-09-11T10:29:34.000Z
sysinv/sysinv/sysinv/sysinv/db/sqlalchemy/migrate_repo/versions/032_system_capabilities.py
etaivan/stx-config
281e1f110973f96e077645fb01f67b646fc253cc
[ "Apache-2.0" ]
1
2021-01-14T12:01:55.000Z
2021-01-14T12:01:55.000Z
sysinv/sysinv/sysinv/sysinv/db/sqlalchemy/migrate_repo/versions/032_system_capabilities.py
etaivan/stx-config
281e1f110973f96e077645fb01f67b646fc253cc
[ "Apache-2.0" ]
10
2020-10-13T08:37:46.000Z
2022-02-09T00:21:25.000Z
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (c) 2016 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # import json from sqlalchemy import MetaData from sqlalchemy import Table def _populate_shared_services_capabilities(system_table): hp_shared_services = ['identity', ...
34.023256
75
0.663021
import json from sqlalchemy import MetaData from sqlalchemy import Table def _populate_shared_services_capabilities(system_table): hp_shared_services = ['identity', 'image', 'volume'] sys = list(system_table.select().where( system_table.c.uuid is not...
true
true
1c12f1c9ae33d32c14e1b7807ea9bbfc9da4b55b
1,298
py
Python
mysite/recipe/models.py
Shruti-codes236/Nutri_Bucket
efc7f73ce7473d6bf3158bd1c9aa29e50ea30708
[ "MIT" ]
null
null
null
mysite/recipe/models.py
Shruti-codes236/Nutri_Bucket
efc7f73ce7473d6bf3158bd1c9aa29e50ea30708
[ "MIT" ]
null
null
null
mysite/recipe/models.py
Shruti-codes236/Nutri_Bucket
efc7f73ce7473d6bf3158bd1c9aa29e50ea30708
[ "MIT" ]
1
2021-10-31T14:16:30.000Z
2021-10-31T14:16:30.000Z
from django.db import connections from django.db import models from django.contrib.auth.models import User class Recipe(models.Model): Recipe_id = models.AutoField(primary_key=True) Recipe_name = models.CharField(max_length=100) Recipe_description = models.TextField() Recipe_type = models.CharField(max_length=100)...
30.904762
82
0.798921
from django.db import connections from django.db import models from django.contrib.auth.models import User class Recipe(models.Model): Recipe_id = models.AutoField(primary_key=True) Recipe_name = models.CharField(max_length=100) Recipe_description = models.TextField() Recipe_type = models.CharField(max_length=100)...
true
true
1c12f3637fd4875430365a277fc62802d34c6fd5
1,062
py
Python
gesund_projekt/calories/migrations/0003_caloriefooddetail.py
asis2016/gesund-projekt
cb3828b69cd6a86deeab16943e38b6ebffd86abb
[ "MIT" ]
null
null
null
gesund_projekt/calories/migrations/0003_caloriefooddetail.py
asis2016/gesund-projekt
cb3828b69cd6a86deeab16943e38b6ebffd86abb
[ "MIT" ]
null
null
null
gesund_projekt/calories/migrations/0003_caloriefooddetail.py
asis2016/gesund-projekt
cb3828b69cd6a86deeab16943e38b6ebffd86abb
[ "MIT" ]
null
null
null
# Generated by Django 4.0.1 on 2022-03-24 10:12 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('calories', '0002_caloriecategory_alter_calorieintake_id'), ] operations = [ migrations.CreateModel( ...
34.258065
124
0.55838
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('calories', '0002_caloriecategory_alter_calorieintake_id'), ] operations = [ migrations.CreateModel( name='CalorieFoodDetail', field...
true
true
1c12f4f346d6151c689f6804bb99a7c37d1249a6
567
py
Python
model/Property.py
sharkoz/PackageControl-Server
73e45aa8cdc7179904496f95706dec52abe62914
[ "MIT" ]
null
null
null
model/Property.py
sharkoz/PackageControl-Server
73e45aa8cdc7179904496f95706dec52abe62914
[ "MIT" ]
2
2021-03-28T17:00:26.000Z
2021-06-27T18:35:07.000Z
model/Property.py
sharkoz/PackageControl-Server
73e45aa8cdc7179904496f95706dec52abe62914
[ "MIT" ]
1
2021-03-27T17:39:16.000Z
2021-03-27T17:39:16.000Z
from sqlalchemy import Column, Integer, String, DateTime from model.DB import Base class Property(Base): __tablename__ = "properties" identifier = Column(String(50), primary_key=True) int_val = Column(Integer, nullable=True) text_val = Column(String(500), nullable=True) date_val = Column(...
33.352941
80
0.687831
from sqlalchemy import Column, Integer, String, DateTime from model.DB import Base class Property(Base): __tablename__ = "properties" identifier = Column(String(50), primary_key=True) int_val = Column(Integer, nullable=True) text_val = Column(String(500), nullable=True) date_val = Column(...
true
true
1c12f5859957172744a7c3351e77eca5407266b4
4,662
py
Python
salt/states/environ.py
dr4Ke/salt
8ffa4903c9ed10c81e1a6c7b967dc9532f320c0b
[ "Apache-2.0" ]
9
2015-03-15T17:57:00.000Z
2016-01-15T14:06:13.000Z
salt/states/environ.py
dr4Ke/salt
8ffa4903c9ed10c81e1a6c7b967dc9532f320c0b
[ "Apache-2.0" ]
null
null
null
salt/states/environ.py
dr4Ke/salt
8ffa4903c9ed10c81e1a6c7b967dc9532f320c0b
[ "Apache-2.0" ]
4
2015-04-15T23:07:18.000Z
2015-12-04T18:27:51.000Z
# -*- coding: utf-8 -*- ''' Support for getting and setting the environment variables of the current salt process. ''' # Import python libs import os # Import salt libs from salt._compat import string_types def __virtual__(): ''' No dependency checks, and not renaming, just return True ''' return Tr...
31.5
85
0.54526
import os from salt._compat import string_types def __virtual__(): return True def setenv(name, value, false_unsets=False, clear_all=False, update_minion=False): ret = {'name': name, 'changes': {}, 'result': True, 'comment': ''}...
true
true
1c12f6fdee5a8e304b9c808fe3f3b8bd67520045
2,153
py
Python
yolo/darknet.py
WiseDoge/YOLO-v3-PyTorch
2bf37705f745c85152ac46fd0e6465f083c82181
[ "MIT" ]
4
2019-01-23T01:42:58.000Z
2019-02-27T13:41:51.000Z
yolo/darknet.py
liuslnlp/YOLO-v3-PyTorch
2bf37705f745c85152ac46fd0e6465f083c82181
[ "MIT" ]
null
null
null
yolo/darknet.py
liuslnlp/YOLO-v3-PyTorch
2bf37705f745c85152ac46fd0e6465f083c82181
[ "MIT" ]
2
2019-05-18T18:29:11.000Z
2019-07-19T00:27:49.000Z
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import numpy as np import cv2 from .helper import create_modules from .util import predict_transform from .io import load_cfg, load_darknet_model class Darknet(nn.Module): def __init__(self, cfg_filename, height...
33.123077
79
0.566187
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import numpy as np import cv2 from .helper import create_modules from .util import predict_transform from .io import load_cfg, load_darknet_model class Darknet(nn.Module): def __init__(self, cfg_filename, height...
true
true
1c12f7b8dc5844c43d21da5c8ee55e9685a738cb
248
py
Python
tadacode/manage.py
ahmad88me/cat
5791749bf1683c93476f05d90afb3a1477f74d8b
[ "MIT" ]
1
2020-02-05T14:59:58.000Z
2020-02-05T14:59:58.000Z
tadacode/manage.py
ahmad88me/cat
5791749bf1683c93476f05d90afb3a1477f74d8b
[ "MIT" ]
1
2018-01-30T08:56:38.000Z
2018-01-30T18:49:57.000Z
tadacode/manage.py
ahmad88me/cat
5791749bf1683c93476f05d90afb3a1477f74d8b
[ "MIT" ]
3
2017-05-10T17:48:42.000Z
2020-10-09T10:27:18.000Z
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tadaa.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
22.545455
69
0.770161
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tadaa.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
true
true
1c12f7df4b6d2144169dc05b61bcefcde2ae644c
2,001
py
Python
archived_lectures/Fall_2019/common_python/common_python/statistics/density.py
ModelEngineering/topics-course
cd0d73e4056663d170465669ecd699e8e74e35a0
[ "MIT" ]
2
2018-10-24T21:31:30.000Z
2019-10-23T20:29:22.000Z
archived_lectures/Fall_2019/common_python/common_python/statistics/density.py
ModelEngineering/topics-course
cd0d73e4056663d170465669ecd699e8e74e35a0
[ "MIT" ]
1
2019-05-31T21:59:30.000Z
2019-05-31T21:59:30.000Z
archived_lectures/Fall_2019/common_python/common_python/statistics/density.py
ModelEngineering/topics-course
cd0d73e4056663d170465669ecd699e8e74e35a0
[ "MIT" ]
9
2018-10-31T20:48:42.000Z
2019-11-20T21:47:43.000Z
"""Creation, Analysis, and Manipulation of Discrete Distributions.""" """ TODO 1. Bar plot of density """ import common_python.constants as cn from common_python.plots import util_plots import collections import pandas as pd import matplotlib.pyplot as plt import numpy as np INDEX_MULT = 100 class Density(objec...
24.108434
70
0.648176
import common_python.constants as cn from common_python.plots import util_plots import collections import pandas as pd import matplotlib.pyplot as plt import numpy as np INDEX_MULT = 100 class Density(object): def __init__(self, ser, variates=None): if variates is None: variates = ser.unique().toli...
true
true
1c12f7f485b2eb769ae2451ee759ebfb4ef1d795
875
py
Python
pre_info_list.py
XingguangZhang/ConvLSTM
3b33f511211b6e87d12bd475e5bef4b084d179a7
[ "MIT" ]
21
2019-05-31T13:41:43.000Z
2021-11-08T19:22:48.000Z
pre_info_list.py
xg416/ConvLSTM
3b33f511211b6e87d12bd475e5bef4b084d179a7
[ "MIT" ]
3
2019-11-09T07:31:13.000Z
2019-12-23T07:51:14.000Z
pre_info_list.py
xg416/ConvLSTM
3b33f511211b6e87d12bd475e5bef4b084d179a7
[ "MIT" ]
13
2019-07-13T02:35:12.000Z
2022-01-15T09:12:18.000Z
import numpy as np import cv2 import os images_path = r'/home/isat-deep/Documents/isoGD/valid_images/Depth' info_path = r'/home/isat-deep/Documents/isoGD/isoGD/IsoGD_phase_2/IsoGD_phase_2/valid_list_with_label.txt' #path = r'/home/isat-deep/Documents/isoGD/isoGD/IsoGD_phase_2/IsoGD_phase_2/test' w_path = r'/hom...
30.172414
107
0.704
import numpy as np import cv2 import os images_path = r'/home/isat-deep/Documents/isoGD/valid_images/Depth' info_path = r'/home/isat-deep/Documents/isoGD/isoGD/IsoGD_phase_2/IsoGD_phase_2/valid_list_with_label.txt' w_path = r'/home/isat-deep/Documents/isoGD/valid_depth_list.txt' v_list = os.listdir(images_pat...
true
true
1c12f946c2e45f400e8759f6f7722ed4a6201120
4,367
py
Python
preprocess/funcs.py
EmreHakguder/SL_VSMs
5f44ea4a760407465d0966e73f54961dfff3f715
[ "MIT" ]
null
null
null
preprocess/funcs.py
EmreHakguder/SL_VSMs
5f44ea4a760407465d0966e73f54961dfff3f715
[ "MIT" ]
null
null
null
preprocess/funcs.py
EmreHakguder/SL_VSMs
5f44ea4a760407465d0966e73f54961dfff3f715
[ "MIT" ]
null
null
null
import csv import pandas as pd import os def clear_phonology_df(somePhonDF_Path): intersect = intersect_phon_sem(somePhonDF_Path) #Identifying the language language = somePhonDF_Path.split("/")[-1].split("_")[0] phon_df = pd.read_csv(somePhonDF_Path).set_index("video") phon_df = phon_df[p...
36.090909
177
0.698191
import csv import pandas as pd import os def clear_phonology_df(somePhonDF_Path): intersect = intersect_phon_sem(somePhonDF_Path) language = somePhonDF_Path.split("/")[-1].split("_")[0] phon_df = pd.read_csv(somePhonDF_Path).set_index("video") phon_df = phon_df[phon_df.index.isin(intersec...
true
true
1c12f97227b0f99f144e3f31a0b4eb7451ea1bf0
88
py
Python
tests/packagetest.py
austingriffith94/qcfoptions
163bd16af0bbbb84dc20f25fb95680431c1dfe2c
[ "MIT" ]
null
null
null
tests/packagetest.py
austingriffith94/qcfoptions
163bd16af0bbbb84dc20f25fb95680431c1dfe2c
[ "MIT" ]
1
2020-05-17T13:45:02.000Z
2020-05-17T13:45:02.000Z
tests/packagetest.py
austingriffith94/qcfoptions
163bd16af0bbbb84dc20f25fb95680431c1dfe2c
[ "MIT" ]
1
2020-04-28T15:26:11.000Z
2020-04-28T15:26:11.000Z
import numpy as np import qcfoptions #%% help(qcfoptions.bsoptions.AsianArithmetic)
17.6
42
0.784091
import numpy as np import qcfoptions help(qcfoptions.bsoptions.AsianArithmetic)
true
true
1c12fa4c5a11c5f1647bc9f489ceb37c1022f12e
1,680
py
Python
String/696. Count Binary Substrings.py
beckswu/Leetcode
480e8dc276b1f65961166d66efa5497d7ff0bdfd
[ "MIT" ]
138
2020-02-08T05:25:26.000Z
2021-11-04T11:59:28.000Z
String/696. Count Binary Substrings.py
beckswu/Leetcode
480e8dc276b1f65961166d66efa5497d7ff0bdfd
[ "MIT" ]
null
null
null
String/696. Count Binary Substrings.py
beckswu/Leetcode
480e8dc276b1f65961166d66efa5497d7ff0bdfd
[ "MIT" ]
24
2021-01-02T07:18:43.000Z
2022-03-20T08:17:54.000Z
""" 696. Count Binary Substrings Example 1: Input: "00110011" Output: 6 Explanation: There are 6 substrings that have equal number of consecutive 1's and 0's: "0011", "01", "1100", "10", "0011", and "01". Notice that some of these substrings repeat and are counted the number of times they occur. Also, "001...
28.474576
133
0.496429
class Solution: def countBinarySubstrings(self, s): i = res = 0 while i < len(s): j = 0 while i+j < len(s) and i - j - 1>=0 and s[i-1] != s[i] and s[i+j] == s[i] and s[i-1-j] == s[i-1]: j+=1 res += j i += j if j> 0 else 1 ...
true
true
1c12fabc911b40128c9529ad8076c77a0b92d673
13,873
py
Python
direwatch.py
w4mhi/digipi
1fb00450cf9ed14a30c293e744848a7cad09f489
[ "MIT" ]
null
null
null
direwatch.py
w4mhi/digipi
1fb00450cf9ed14a30c293e744848a7cad09f489
[ "MIT" ]
null
null
null
direwatch.py
w4mhi/digipi
1fb00450cf9ed14a30c293e744848a7cad09f489
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # direwatch """ Craig Lamparter KM6LYW, 2021, MIT Licnese modified by W4MHI February 2022 - see the init_display.py module for display settings """ import sys import argparse import time import subprocess import re import pyinotify import RPi.GPIO as GPIO import threading import signal import os ...
38.112637
162
0.645571
import sys import argparse import time import subprocess import re import pyinotify import RPi.GPIO as GPIO import threading import signal import os import aprslib sys.path.insert(0, '/home/pi/common') from display_util import * padding = 4 title_bar_height = 34 def signal_handler(signal, frame): print("Got ", ...
true
true
1c12fc907b9f4e63c60428d3c5484ec41f556db5
287
py
Python
setup.py
hitochan777/svector
e719b1538cdf223fa853c9786ab6f7eb043b0cf7
[ "Unlicense" ]
null
null
null
setup.py
hitochan777/svector
e719b1538cdf223fa853c9786ab6f7eb043b0cf7
[ "Unlicense" ]
null
null
null
setup.py
hitochan777/svector
e719b1538cdf223fa853c9786ab6f7eb043b0cf7
[ "Unlicense" ]
null
null
null
from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext setup(name="svector", version="1.0.2", cmdclass = {'build_ext': build_ext}, ext_modules = [Extension("svector", ["svector.pyx"], language="c++")] )
28.7
75
0.686411
from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext setup(name="svector", version="1.0.2", cmdclass = {'build_ext': build_ext}, ext_modules = [Extension("svector", ["svector.pyx"], language="c++")] )
true
true
1c12fc920de4839df0c711f84e4a0186aa1809ac
818
py
Python
models.py
kdorichev/sova-tts
3cacf029afd08a37bf9c9e6be382a655525b7d9e
[ "Apache-2.0" ]
118
2020-08-18T18:37:13.000Z
2022-02-12T16:00:33.000Z
models.py
kdorichev/sova-tts
3cacf029afd08a37bf9c9e6be382a655525b7d9e
[ "Apache-2.0" ]
10
2020-11-19T17:07:05.000Z
2021-12-16T09:26:51.000Z
models.py
kdorichev/sova-tts
3cacf029afd08a37bf9c9e6be382a655525b7d9e
[ "Apache-2.0" ]
16
2020-11-27T01:45:00.000Z
2022-01-20T06:57:33.000Z
from tts.synthesizer import Synthesizer, set_logger ALL_MODELS = "all" config = Synthesizer.load_config("config.yaml") set_logger(**config["general"].pop("logging")) natasha = Synthesizer.from_config(config, name="natasha") ruslan_config = config["ruslan"] ruslan = Synthesizer( name="ruslan", text_handler=...
28.206897
97
0.745721
from tts.synthesizer import Synthesizer, set_logger ALL_MODELS = "all" config = Synthesizer.load_config("config.yaml") set_logger(**config["general"].pop("logging")) natasha = Synthesizer.from_config(config, name="natasha") ruslan_config = config["ruslan"] ruslan = Synthesizer( name="ruslan", text_handler=...
true
true
1c12fda1f81f31cde8425fd4d5a9f59ff565fac5
220
py
Python
setup.py
mr337/navio2_ros
5b85709d4e6b6704292e1837163fe70deb432c9a
[ "BSD-2-Clause" ]
6
2017-06-21T10:36:03.000Z
2020-03-17T08:18:32.000Z
setup.py
mr337/navio2_ros
5b85709d4e6b6704292e1837163fe70deb432c9a
[ "BSD-2-Clause" ]
null
null
null
setup.py
mr337/navio2_ros
5b85709d4e6b6704292e1837163fe70deb432c9a
[ "BSD-2-Clause" ]
4
2018-01-15T16:55:31.000Z
2020-03-07T22:08:50.000Z
from distutils.core import setup from catkin_pkg.python_setup import generate_distutils_setup d = generate_distutils_setup( packages=['navio2_ros'], package_dir={'': 'src'}, requires=['rospy'] ) setup(**d)
20
60
0.727273
from distutils.core import setup from catkin_pkg.python_setup import generate_distutils_setup d = generate_distutils_setup( packages=['navio2_ros'], package_dir={'': 'src'}, requires=['rospy'] ) setup(**d)
true
true
1c12ff4aca372f47471f0521a2fc7acd5faf172b
24,367
py
Python
setup.py
arkiv2/pandas
257ac884d61a74990d1cb4d72c48b1c9003298d5
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause" ]
null
null
null
setup.py
arkiv2/pandas
257ac884d61a74990d1cb4d72c48b1c9003298d5
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause" ]
null
null
null
setup.py
arkiv2/pandas
257ac884d61a74990d1cb4d72c48b1c9003298d5
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python """ Parts of this file were taken from the pyzmq project (https://github.com/zeromq/pyzmq) which have been permitted for use under the BSD license. Parts are from lxml (https://github.com/lxml/lxml) """ import os import sys import shutil import warnings import re import platform from distutils.v...
36.642105
83
0.557927
import os import sys import shutil import warnings import re import platform from distutils.version import LooseVersion def is_platform_windows(): return sys.platform == 'win32' or sys.platform == 'cygwin' def is_platform_linux(): return sys.platform == 'linux2' def is_platform_mac(): return sys.platfo...
true
true
1c1300132830a8f9fc420a99365537a87a4ce961
1,420
py
Python
tests/components/goalzero/test_binary_sensor.py
GuyKh/core
859bcb6eb4dbb9a8b87b6e4e888e074502db5df1
[ "Apache-2.0" ]
6
2017-11-15T09:56:41.000Z
2021-01-24T15:12:09.000Z
tests/components/goalzero/test_binary_sensor.py
GuyKh/core
859bcb6eb4dbb9a8b87b6e4e888e074502db5df1
[ "Apache-2.0" ]
100
2020-06-17T22:22:41.000Z
2022-03-31T06:24:19.000Z
tests/components/goalzero/test_binary_sensor.py
marecabo/home-assistant
e33774a61e7fcc88aff752dfa4618dd26a746872
[ "Apache-2.0" ]
8
2020-09-15T02:33:39.000Z
2021-09-25T20:25:30.000Z
"""Binary sensor tests for the Goalzero integration.""" from homeassistant.components.binary_sensor import ( DEVICE_CLASS_BATTERY_CHARGING, DEVICE_CLASS_CONNECTIVITY, DOMAIN, ) from homeassistant.components.goalzero.const import DEFAULT_NAME from homeassistant.const import ( ATTR_DEVICE_CLASS, DEVIC...
38.378378
88
0.783803
from homeassistant.components.binary_sensor import ( DEVICE_CLASS_BATTERY_CHARGING, DEVICE_CLASS_CONNECTIVITY, DOMAIN, ) from homeassistant.components.goalzero.const import DEFAULT_NAME from homeassistant.const import ( ATTR_DEVICE_CLASS, DEVICE_CLASS_POWER, STATE_OFF, STATE_ON, ) from homea...
true
true
1c13003f9a38f9ea48d48de5e91368a2375b5d69
4,115
py
Python
VPlanetRuns/run03/makeplot.py
jxcbecker/trappist1
cf99216928c92ffa308ecf9482d3cdf91db37d43
[ "MIT" ]
null
null
null
VPlanetRuns/run03/makeplot.py
jxcbecker/trappist1
cf99216928c92ffa308ecf9482d3cdf91db37d43
[ "MIT" ]
null
null
null
VPlanetRuns/run03/makeplot.py
jxcbecker/trappist1
cf99216928c92ffa308ecf9482d3cdf91db37d43
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import matplotlib as mpl import numpy as np import sys try: import vplot as vpl except: print('Cannot import vplot. Please install vplot.') # Check correct number of arguments if (len(sys.argv) != 3): print('ERROR: Incorrect number of arguments.') print('Usage: '+sys.arg...
33.185484
93
0.695261
import matplotlib.pyplot as plt import matplotlib as mpl import numpy as np import sys try: import vplot as vpl except: print('Cannot import vplot. Please install vplot.') if (len(sys.argv) != 3): print('ERROR: Incorrect number of arguments.') print('Usage: '+sys.argv[0]+' <pdf | png>') exit(1) if ...
true
true
1c1302436cd34fa848a01b85e458eb225167919b
1,993
py
Python
ex017.py
sosmarcos/TKInter
204fecff8807d75353392722f531d607c991b717
[ "MIT" ]
null
null
null
ex017.py
sosmarcos/TKInter
204fecff8807d75353392722f531d607c991b717
[ "MIT" ]
null
null
null
ex017.py
sosmarcos/TKInter
204fecff8807d75353392722f531d607c991b717
[ "MIT" ]
null
null
null
from tkinter import * def teste(): print(check_variavel.get()) label["text"] = nome.get() entrada.delete(0, len(nome.get())) if check_variavel.get(): check['text'] = 'Ativado' else: check['text'] = 'Desativado' window = Tk() window.geometry('640x480+100+100') button = Button(win...
33.216667
97
0.652283
from tkinter import * def teste(): print(check_variavel.get()) label["text"] = nome.get() entrada.delete(0, len(nome.get())) if check_variavel.get(): check['text'] = 'Ativado' else: check['text'] = 'Desativado' window = Tk() window.geometry('640x480+100+100') button = Button(win...
true
true
1c1302889806bc6cad647486804f6899a4644feb
166
py
Python
opdracht/parsing.py
yomaxx/PXL-NP
1430608dadafb588afb8964b688f74a8b0325063
[ "Unlicense" ]
null
null
null
opdracht/parsing.py
yomaxx/PXL-NP
1430608dadafb588afb8964b688f74a8b0325063
[ "Unlicense" ]
1
2020-05-24T18:27:52.000Z
2020-05-24T18:28:00.000Z
opdracht/parsing.py
yomaxx/PXL-NP
1430608dadafb588afb8964b688f74a8b0325063
[ "Unlicense" ]
1
2021-05-28T12:48:55.000Z
2021-05-28T12:48:55.000Z
txt = "hello>test>max>".encode('ascii') parse = txt.decode('utf8').split('>')[2] #begint bij 0, dus 2 #['hello', 'test', 'max', ''] is uitkomst zonder 2 print(parse)
27.666667
50
0.620482
txt = "hello>test>max>".encode('ascii') parse = txt.decode('utf8').split('>')[2] print(parse)
true
true
1c1302e01a16e2aa03e892e348f281b65e4e252d
5,042
py
Python
autotest/utilities/test_gdaladdo.py
tbonfort/gdal
173e0659bc3f2e6b97c2c07332a3066478afb821
[ "MIT" ]
1
2015-04-21T19:52:03.000Z
2015-04-21T19:52:03.000Z
autotest/utilities/test_gdaladdo.py
tbonfort/gdal
173e0659bc3f2e6b97c2c07332a3066478afb821
[ "MIT" ]
1
2016-04-04T09:14:19.000Z
2016-04-14T19:17:10.000Z
autotest/utilities/test_gdaladdo.py
pramsey/gdal
965421b79fe4d3332b0f2f633b072fdcab2b700a
[ "MIT" ]
2
2018-05-08T01:51:34.000Z
2019-06-26T05:08:56.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # $Id$ # # Project: GDAL/OGR Test Suite # Purpose: gdaladdo testing # Author: Even Rouault <even dot rouault @ mines-paris dot org> # ########################################################...
28.811429
115
0.609679
import sys import os import shutil sys.path.append( '../pymod' ) sys.path.append( '../gcore' ) from osgeo import gdal import gdaltest import test_cli_utilities import tiff_ovr def test_gdaladdo_1(): if test_cli_utilities.get_gdaladdo_path() is None: return 'skip' shutil.copy('../gcore/data/mfloat3...
true
true
1c1303345c49a7b4664b12ad821d78e52ed084bb
4,669
py
Python
logicmonitor_sdk/models/macro.py
JeremyTangCD/lm-sdk-python
2a15e055e5a3f72d2f2e4fb43bdbed203c5a9983
[ "Apache-2.0" ]
null
null
null
logicmonitor_sdk/models/macro.py
JeremyTangCD/lm-sdk-python
2a15e055e5a3f72d2f2e4fb43bdbed203c5a9983
[ "Apache-2.0" ]
null
null
null
logicmonitor_sdk/models/macro.py
JeremyTangCD/lm-sdk-python
2a15e055e5a3f72d2f2e4fb43bdbed203c5a9983
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ LogicMonitor REST API LogicMonitor is a SaaS-based performance monitoring platform that provides full visibility into complex, hybrid infrastructures, offering granular performance monitoring and actionable data and insights. logicmonitor_sdk enables you to manage your LogicMonitor account...
27.464706
304
0.567788
import pprint import re import six class Macro(object): swagger_types = { 'variable': 'str', 'description': 'str', 'value': 'str' } attribute_map = { 'variable': 'variable', 'description': 'description', 'value': 'value' } def __init__(self, ...
true
true
1c13052c3b953681d46552cdfa4495dfac491460
14,133
py
Python
sdks/python/client/argo_workflows/model/io_argoproj_workflow_v1alpha1_git_artifact.py
roofurmston/argo-workflows
79a95f223396ecab408d831781ab2d38d1fa6de0
[ "Apache-2.0" ]
7,643
2017-08-22T22:10:45.000Z
2021-02-09T17:13:12.000Z
sdks/python/client/argo_workflows/model/io_argoproj_workflow_v1alpha1_git_artifact.py
roofurmston/argo-workflows
79a95f223396ecab408d831781ab2d38d1fa6de0
[ "Apache-2.0" ]
4,183
2017-08-22T22:45:29.000Z
2021-02-09T17:41:29.000Z
sdks/python/client/argo_workflows/model/io_argoproj_workflow_v1alpha1_git_artifact.py
isubasinghe/argo-workflows
1a6e94f1d490e2265c977514d698a1ca70e14fe3
[ "Apache-2.0" ]
1,524
2017-08-22T22:10:53.000Z
2021-02-09T16:26:16.000Z
""" Argo Server API You can get examples of requests and responses by using the CLI with `--gloglevel=9`, e.g. `argo list --gloglevel=9` # noqa: E501 The version of the OpenAPI document: VERSION Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from ...
47.11
159
0.589401
import re import sys from argo_workflows.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, ) from ....
true
true
1c130541477fdb6e8957be1c63c4c6619930419d
163
py
Python
Python/04.Sets/010.Check Subset.py
kimchangkyu/HackerrankPractice
84c8a7a73c06f608ba845b35eeb34ce7879abb07
[ "MIT" ]
null
null
null
Python/04.Sets/010.Check Subset.py
kimchangkyu/HackerrankPractice
84c8a7a73c06f608ba845b35eeb34ce7879abb07
[ "MIT" ]
null
null
null
Python/04.Sets/010.Check Subset.py
kimchangkyu/HackerrankPractice
84c8a7a73c06f608ba845b35eeb34ce7879abb07
[ "MIT" ]
null
null
null
for i in range(int(input())): _, a = input(), set(map(int, input().split(" "))) _, b = input(), set(map(int, input().split(" "))) print(a.issubset(b))
32.6
53
0.527607
for i in range(int(input())): _, a = input(), set(map(int, input().split(" "))) _, b = input(), set(map(int, input().split(" "))) print(a.issubset(b))
true
true
1c13055f74b8f24b7df077bf51e9d6cc220a50a3
3,698
py
Python
Pyext/test/py_u_test_late.py
mpartio/ecflow
ea4b89399d1e7b897ff48c59b1e885e6d53cc8d6
[ "Apache-2.0" ]
null
null
null
Pyext/test/py_u_test_late.py
mpartio/ecflow
ea4b89399d1e7b897ff48c59b1e885e6d53cc8d6
[ "Apache-2.0" ]
null
null
null
Pyext/test/py_u_test_late.py
mpartio/ecflow
ea4b89399d1e7b897ff48c59b1e885e6d53cc8d6
[ "Apache-2.0" ]
null
null
null
#////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 # Name : # Author : Avi # Revision : $Revision: #10 $ # # Copyright 2009- ECMWF. # This software is licensed under the terms of the Apache Licence version 2.0 # which can be obtained at http://www.apache.org/licenses/LICENSE...
42.505747
128
0.595998
from ecflow import Alias, AttrType, Autocancel, CheckPt, ChildCmdType, Client, Clock, Cron, DState, Date, Day, Days, \ Defs, Ecf, Event, Expression, Family, FamilyVec, File, Flag, FlagType, FlagTypeVec, InLimit, \ JobCreationCtrl, Label, Late, Limit, Meter, Node, NodeContainer, Node...
true
true
1c13058695cb7b32fccf68110f35489e9e828148
7,934
py
Python
google/cloud/forseti/notifier/notifier.py
ugoenyioha/forseti-security
78cae4ddb6aa1d3b8c521a15adcbd24c08e2e5e7
[ "Apache-2.0" ]
null
null
null
google/cloud/forseti/notifier/notifier.py
ugoenyioha/forseti-security
78cae4ddb6aa1d3b8c521a15adcbd24c08e2e5e7
[ "Apache-2.0" ]
null
null
null
google/cloud/forseti/notifier/notifier.py
ugoenyioha/forseti-security
78cae4ddb6aa1d3b8c521a15adcbd24c08e2e5e7
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The Forseti Security 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 ap...
40.274112
86
0.60663
import importlib import inspect from google.cloud.forseti.common.util import logger from google.cloud.forseti.common.util import string_formats from google.cloud.forseti.notifier.notifiers.base_notification import BaseNotification from google.cloud.forseti.notifier.notifiers import cscc_notifier from google.cloud.for...
true
true
1c1305a49b54b063f254dcd97347eac86ba2c106
24,065
py
Python
compressor/tests/test_offline.py
nikolas/django-compressor
94755c5aa62d0e659c863bbe75968f51c094be6e
[ "Apache-2.0" ]
null
null
null
compressor/tests/test_offline.py
nikolas/django-compressor
94755c5aa62d0e659c863bbe75968f51c094be6e
[ "Apache-2.0" ]
2
2021-03-31T19:52:08.000Z
2021-12-13T20:44:19.000Z
compressor/tests/test_offline.py
rocketrip/django-compressor
94755c5aa62d0e659c863bbe75968f51c094be6e
[ "Apache-2.0" ]
null
null
null
from __future__ import with_statement, unicode_literals import io import os import sys import unittest from importlib import import_module from mock import patch import django from django.core.management.base import CommandError from django.template import Template, Context from django.test import TestCase from djang...
38.442492
89
0.662082
from __future__ import with_statement, unicode_literals import io import os import sys import unittest from importlib import import_module from mock import patch import django from django.core.management.base import CommandError from django.template import Template, Context from django.test import TestCase from djang...
true
true
1c1305d0ff682fe561a56db6a3ed537b34296921
7,077
py
Python
01_week4_exceptions_testing_debugging/test_ps4a.py
shellytang/intro-cs-python
dc8ce90f7e0323a4956a7a9ecd8b888b21ae748f
[ "MIT" ]
null
null
null
01_week4_exceptions_testing_debugging/test_ps4a.py
shellytang/intro-cs-python
dc8ce90f7e0323a4956a7a9ecd8b888b21ae748f
[ "MIT" ]
null
null
null
01_week4_exceptions_testing_debugging/test_ps4a.py
shellytang/intro-cs-python
dc8ce90f7e0323a4956a7a9ecd8b888b21ae748f
[ "MIT" ]
null
null
null
from ps4a import * # # Test code # You don't need to understand how this test code works (but feel free to look it over!) # To run these tests, simply run this file (open up in your IDE, then run the file as normal) def test_getWordScore(): """ Unit test for getWordScore """ failure = False # di...
32.612903
99
0.531157
from ps4a import * # To run these tests, simply run this file (open up in your IDE, then run the file as normal) def test_getWordScore(): failure = False # dictionary of words and scores words = {("", 7): 0, ("it", 7): 4, ("was", 7): 18, ("scored", 7): 54, ("waybill", 7): 155, ("outgnaw", 7...
true
true
1c1307134304069685af0d50cc1f35f6c5892302
22,386
py
Python
rotkehlchen/tests/api/test_manually_tracked_balances.py
snario/rotki
83a0fef973419a5eded6682c9b8957ccb45b2f44
[ "BSD-3-Clause" ]
1
2020-11-14T12:20:37.000Z
2020-11-14T12:20:37.000Z
rotkehlchen/tests/api/test_manually_tracked_balances.py
snario/rotki
83a0fef973419a5eded6682c9b8957ccb45b2f44
[ "BSD-3-Clause" ]
2
2022-02-14T06:50:02.000Z
2022-03-25T19:19:35.000Z
rotkehlchen/tests/api/test_manually_tracked_balances.py
snario/rotki
83a0fef973419a5eded6682c9b8957ccb45b2f44
[ "BSD-3-Clause" ]
null
null
null
import random from contextlib import ExitStack from copy import deepcopy from http import HTTPStatus from typing import Any, Dict, List import pytest import requests from rotkehlchen.constants.misc import ZERO from rotkehlchen.fval import FVal from rotkehlchen.tests.utils.api import ( api_url_for, assert_erro...
31.98
99
0.638569
import random from contextlib import ExitStack from copy import deepcopy from http import HTTPStatus from typing import Any, Dict, List import pytest import requests from rotkehlchen.constants.misc import ZERO from rotkehlchen.fval import FVal from rotkehlchen.tests.utils.api import ( api_url_for, assert_erro...
true
true
1c130767cb7931ce78174dee02ab597da8ff8e3f
42,469
py
Python
great_expectations/execution_engine/sqlalchemy_execution_engine.py
ryanaustincarlson/great_expectations
0af627e763d9dd17be7e548b767aba0d7af0e670
[ "Apache-2.0" ]
null
null
null
great_expectations/execution_engine/sqlalchemy_execution_engine.py
ryanaustincarlson/great_expectations
0af627e763d9dd17be7e548b767aba0d7af0e670
[ "Apache-2.0" ]
null
null
null
great_expectations/execution_engine/sqlalchemy_execution_engine.py
ryanaustincarlson/great_expectations
0af627e763d9dd17be7e548b767aba0d7af0e670
[ "Apache-2.0" ]
null
null
null
import copy import datetime import logging import uuid from pathlib import Path from typing import Any, Dict, Iterable, List, Optional, Tuple, Union from urllib.parse import urlparse import pandas as pd from great_expectations.core import IDDict from great_expectations.core.batch import Batch, BatchMarkers from great...
41.965415
198
0.60324
import copy import datetime import logging import uuid from pathlib import Path from typing import Any, Dict, Iterable, List, Optional, Tuple, Union from urllib.parse import urlparse import pandas as pd from great_expectations.core import IDDict from great_expectations.core.batch import Batch, BatchMarkers from great...
true
true
1c1307cb7dfe6dab8b9e8dd20516064fa6cb0227
2,030
py
Python
riak/tests/test_server_test.py
dcramer/riak-python-client
15effbbcf02c035d32d4149dbaae1ec325f89450
[ "Apache-2.0" ]
2
2015-09-24T19:52:53.000Z
2015-11-06T10:22:30.000Z
riak/tests/test_server_test.py
ghuntley/riak-python-client
f101f6e8d291d716621cd51112a33f9ce07e33da
[ "Apache-2.0" ]
null
null
null
riak/tests/test_server_test.py
ghuntley/riak-python-client
f101f6e8d291d716621cd51112a33f9ce07e33da
[ "Apache-2.0" ]
null
null
null
from riak.test_server import TestServer import unittest class TestServerTestCase(unittest.TestCase): def setUp(self): self.test_server = TestServer() def tearDown(self): pass def test_options_defaults(self): self.assertEquals(self.test_server.app_config["riak_core"]["handoff_port"...
37.592593
92
0.7
from riak.test_server import TestServer import unittest class TestServerTestCase(unittest.TestCase): def setUp(self): self.test_server = TestServer() def tearDown(self): pass def test_options_defaults(self): self.assertEquals(self.test_server.app_config["riak_core"]["handoff_port"...
true
true
1c13085d92990a200f0374f0eb1b87f99cb26c3b
4,958
py
Python
sdk/python/pulumi_azure_native/servicebus/v20150801/list_namespace_keys.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/servicebus/v20150801/list_namespace_keys.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/servicebus/v20150801/list_namespace_keys.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __a...
40.975207
146
0.702299
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __all__ = [ 'ListNamespaceKeysResult', 'AwaitableListNamespaceKeysResult', 'list_namespace_keys', ] @pulumi.output_type class ListNamespaceKeysResult: def...
true
true
1c13088f03af4ed39ea5ab6e8ea213792c02dbe7
586
py
Python
test_retring_async.py
Quarticai/retrying-async
8d075133b85df6e01e4a7b1d7878734b714f31c0
[ "MIT" ]
6
2021-03-06T00:24:08.000Z
2022-01-04T05:16:47.000Z
test_retring_async.py
lxl0928/retrying-async
54eec24e4183b4ea31c0e133ed11ec0f0535a194
[ "MIT" ]
2
2021-03-16T13:27:49.000Z
2022-01-04T07:15:52.000Z
test_retring_async.py
Quarticai/retrying-async
8d075133b85df6e01e4a7b1d7878734b714f31c0
[ "MIT" ]
3
2021-05-07T04:59:51.000Z
2021-07-11T17:37:05.000Z
# coding: utf-8 import asyncio import requests from retrying_async import retry def request_api_sync(): print('正在获取') response = requests.get(url="http://www.baidu.com") print(response.status_code, response.content) raise Exception("异常") @retry(attempts=3, delay=3) async def request_api_async(): ...
19.533333
55
0.706485
import asyncio import requests from retrying_async import retry def request_api_sync(): print('正在获取') response = requests.get(url="http://www.baidu.com") print(response.status_code, response.content) raise Exception("异常") @retry(attempts=3, delay=3) async def request_api_async(): print('正在获取'...
true
true
1c1309801aa84168442dd61a78f0c08c966ce8be
21,393
py
Python
src/pretalx/orga/views/submission.py
MEschenbacher/pretalx
3a21d445bf8683581b3ff9b4a9b8236cb68a8dda
[ "Apache-2.0" ]
null
null
null
src/pretalx/orga/views/submission.py
MEschenbacher/pretalx
3a21d445bf8683581b3ff9b4a9b8236cb68a8dda
[ "Apache-2.0" ]
null
null
null
src/pretalx/orga/views/submission.py
MEschenbacher/pretalx
3a21d445bf8683581b3ff9b4a9b8236cb68a8dda
[ "Apache-2.0" ]
null
null
null
import json from collections import Counter from contextlib import suppress from datetime import timedelta from operator import itemgetter from dateutil import rrule from django.contrib import messages from django.contrib.syndication.views import Feed from django.db import transaction from django.forms.models import B...
36.631849
181
0.623522
import json from collections import Counter from contextlib import suppress from datetime import timedelta from operator import itemgetter from dateutil import rrule from django.contrib import messages from django.contrib.syndication.views import Feed from django.db import transaction from django.forms.models import B...
true
true
1c130b2568be3941b51935ad6c85d6fbec4e0a36
13,789
py
Python
kolibri/core/tasks/api.py
techZM/kolibri
617e4c382e446b16a968e8add7f1766f8cd7c54a
[ "MIT" ]
null
null
null
kolibri/core/tasks/api.py
techZM/kolibri
617e4c382e446b16a968e8add7f1766f8cd7c54a
[ "MIT" ]
null
null
null
kolibri/core/tasks/api.py
techZM/kolibri
617e4c382e446b16a968e8add7f1766f8cd7c54a
[ "MIT" ]
1
2021-07-26T11:38:29.000Z
2021-07-26T11:38:29.000Z
import os from django.apps.registry import AppRegistryNotReady from django.core.management import call_command from django.http.response import Http404 from django.utils.translation import gettext_lazy as _ from iceqube.common.classes import State from iceqube.exceptions import UserCancelledError from rest_framework i...
31.338636
121
0.613387
import os from django.apps.registry import AppRegistryNotReady from django.core.management import call_command from django.http.response import Http404 from django.utils.translation import gettext_lazy as _ from iceqube.common.classes import State from iceqube.exceptions import UserCancelledError from rest_framework i...
true
true
1c130b3d0b4954c6dfee0c79c02fb34602781e84
10,370
py
Python
qube_ppo_balancing.py
dohyeoklee/Control-Furuta-Pendulum
00fbcfdf43c517f8d76ca7e664cbc3598e744af4
[ "MIT" ]
1
2021-05-28T16:17:02.000Z
2021-05-28T16:17:02.000Z
qube_ppo_balancing.py
dohyeoklee/Control-Furuta-Pendulum
00fbcfdf43c517f8d76ca7e664cbc3598e744af4
[ "MIT" ]
null
null
null
qube_ppo_balancing.py
dohyeoklee/Control-Furuta-Pendulum
00fbcfdf43c517f8d76ca7e664cbc3598e744af4
[ "MIT" ]
1
2021-12-30T18:26:42.000Z
2021-12-30T18:26:42.000Z
import os import torch import numpy as np import torch.optim as optim from collections import deque import torch import torch.nn as nn import torch.nn.functional as F import math import matplotlib.pyplot as plt import pickle import time import gym from gym_brt.envs import QubeBeginDownEnv from gym_brt.envs import Qu...
30.863095
144
0.584282
import os import torch import numpy as np import torch.optim as optim from collections import deque import torch import torch.nn as nn import torch.nn.functional as F import math import matplotlib.pyplot as plt import pickle import time import gym from gym_brt.envs import QubeBeginDownEnv from gym_brt.envs import Qu...
true
true
1c130c3a7f72004a7c82b65e9a09081c33017bce
2,257
py
Python
98.py
whoophee/DCP
ea023dc7c01a13ee17f7e9445c7a70a092025254
[ "MIT" ]
2
2018-07-29T18:39:15.000Z
2020-09-02T16:28:36.000Z
98.py
whoophee/DCP
ea023dc7c01a13ee17f7e9445c7a70a092025254
[ "MIT" ]
null
null
null
98.py
whoophee/DCP
ea023dc7c01a13ee17f7e9445c7a70a092025254
[ "MIT" ]
null
null
null
# This problem was asked by Coursera. # Given a 2D board of characters and a word, find if the word exists in the grid. # The word can be constructed from letters of sequentially adjacent cell, where "adjacent" # cells are those horizontally or vertically neighboring. The same letter cell may not be used more than once...
33.191176
111
0.525919
class LetterBoard: def _exists(self, s, i, cur, visited): if i == len(s): return True x, y = cur ret = False for x1, y1 in self.adj[x][y]: if self.board[x1][y1] == s[i] and not (x1, y1) in visited: ret |= self._exists(s, i+1, (x1, y1), visited ...
true
true
1c130c4592917e2dd9094d36caeb188acc56f60c
6,159
py
Python
model.py
Kaushal28/FOTS-PyTorch
30f6180754899c7f5fb35845ab5d6f108eb1b4a8
[ "BSD-3-Clause" ]
7
2021-02-25T17:33:19.000Z
2022-02-25T08:11:12.000Z
model.py
Kaushal28/FOTS-PyTorch
30f6180754899c7f5fb35845ab5d6f108eb1b4a8
[ "BSD-3-Clause" ]
3
2021-03-09T08:36:42.000Z
2021-12-08T02:45:07.000Z
model.py
Kaushal28/FOTS-PyTorch
30f6180754899c7f5fb35845ab5d6f108eb1b4a8
[ "BSD-3-Clause" ]
1
2022-02-10T07:30:20.000Z
2022-02-10T07:30:20.000Z
import numpy as np import torch from torch import nn, optim import math import pretrainedmodels from components.shared_convolutions import SharedConvolutions from components.roi_rotate import ROIRotate from components.crnn import CRNN from utils import classes from bbox import Toolbox class FOTSModel(nn.Module):...
32.935829
106
0.608053
import numpy as np import torch from torch import nn, optim import math import pretrainedmodels from components.shared_convolutions import SharedConvolutions from components.roi_rotate import ROIRotate from components.crnn import CRNN from utils import classes from bbox import Toolbox class FOTSModel(nn.Module):...
true
true