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
f70f0ccfe19d98fa8a0385a18e2bb067db61ce6e
252
py
Python
texar/utils/exceptions.py
Holmeswww/Text_Infilling
f63cd24bee5c62d7dedd8fb35c4e52aee20c39f3
[ "Apache-2.0" ]
25
2019-01-03T09:15:20.000Z
2022-02-12T04:20:59.000Z
texar/utils/exceptions.py
Holmeswww/Text_Infilling
f63cd24bee5c62d7dedd8fb35c4e52aee20c39f3
[ "Apache-2.0" ]
4
2019-03-28T11:02:20.000Z
2022-02-15T04:57:33.000Z
texar/utils/exceptions.py
Holmeswww/Text_Infilling
f63cd24bee5c62d7dedd8fb35c4e52aee20c39f3
[ "Apache-2.0" ]
9
2019-01-03T02:20:37.000Z
2022-02-12T04:20:50.000Z
# """ Texar defined exceptions. """ from __future__ import absolute_import from __future__ import print_function from __future__ import division __all__ = [ "TexarError" ] class TexarError(Exception): """ Texar error. """ pass
12
38
0.690476
from __future__ import absolute_import from __future__ import print_function from __future__ import division __all__ = [ "TexarError" ] class TexarError(Exception): pass
true
true
f70f0db28b86eda5c789b0a6396d94cc6bd56a59
1,781
py
Python
problems/EE/auto/problem149_EE.py
sunandita/ICAPS_Summer_School_RAE_2020
a496b62185bcfdd2c76eb7986ae99cfa85708d28
[ "BSD-3-Clause" ]
5
2020-10-15T14:40:03.000Z
2021-08-20T17:45:41.000Z
problems/EE/auto/problem149_EE.py
sunandita/ICAPS_Summer_School_RAE_2020
a496b62185bcfdd2c76eb7986ae99cfa85708d28
[ "BSD-3-Clause" ]
null
null
null
problems/EE/auto/problem149_EE.py
sunandita/ICAPS_Summer_School_RAE_2020
a496b62185bcfdd2c76eb7986ae99cfa85708d28
[ "BSD-3-Clause" ]
2
2020-10-15T07:06:14.000Z
2020-10-15T17:33:01.000Z
__author__ = 'patras' from domain_exploreEnv import * from timer import DURATION from state import state, rv DURATION.TIME = { 'survey': 5, 'monitor': 5, 'screen': 5, 'sample': 5, 'process': 5, 'fly': 3, 'deposit': 1, 'transferData': 1, 'take': 2, 'put': 2, 'move': 10, '...
29.196721
221
0.485121
__author__ = 'patras' from domain_exploreEnv import * from timer import DURATION from state import state, rv DURATION.TIME = { 'survey': 5, 'monitor': 5, 'screen': 5, 'sample': 5, 'process': 5, 'fly': 3, 'deposit': 1, 'transferData': 1, 'take': 2, 'put': 2, 'move': 10, '...
true
true
f70f0eaeb83c3a6275f22f288f61376329b14e9c
2,132
py
Python
google/cloud/managedidentities/v1beta1/managedidentities-v1beta1-py/google/cloud/managedidentities_v1beta1/__init__.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
7
2021-02-21T10:39:41.000Z
2021-12-07T07:31:28.000Z
google/cloud/managedidentities/v1/managedidentities-v1-py/google/cloud/managedidentities_v1/__init__.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
6
2021-02-02T23:46:11.000Z
2021-11-15T01:46:02.000Z
google/cloud/managedidentities/v1beta1/managedidentities-v1beta1-py/google/cloud/managedidentities_v1beta1/__init__.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
4
2021-01-28T23:25:45.000Z
2021-08-30T01:55:16.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
38.763636
84
0.842402
from .services.managed_identities_service import ManagedIdentitiesServiceClient from .services.managed_identities_service import ManagedIdentitiesServiceAsyncClient from .types.managed_identities_service import AttachTrustRequest from .types.managed_identities_service import CreateMicrosoftAdDomainRequ...
true
true
f70f0ef293c12a1c4bf47d9eeda991b5c840f5d7
20,689
py
Python
sr/data_loader.py
sentinel-hub/multi-temporal-super-resolution
5ef642304a980db87bdb935a7a7450bd649f8912
[ "MIT" ]
34
2021-05-18T09:04:17.000Z
2022-02-17T09:34:20.000Z
sr/data_loader.py
kurkutesa/multi-temporal-super-resolution
5ef642304a980db87bdb935a7a7450bd649f8912
[ "MIT" ]
1
2021-05-24T13:44:54.000Z
2021-05-25T13:04:02.000Z
sr/data_loader.py
kurkutesa/multi-temporal-super-resolution
5ef642304a980db87bdb935a7a7450bd649f8912
[ "MIT" ]
4
2021-05-25T18:51:57.000Z
2021-06-28T15:57:21.000Z
import os from collections import OrderedDict from typing import Tuple, List, Callable from fs_s3fs import S3FS import numpy as np import pandas as pd import torch from torch.utils.data import Dataset from skimage.exposure import match_histograms from datetime import datetime from eolearn.core import EOPatch def a...
42.657732
120
0.64353
import os from collections import OrderedDict from typing import Tuple, List, Callable from fs_s3fs import S3FS import numpy as np import pandas as pd import torch from torch.utils.data import Dataset from skimage.exposure import match_histograms from datetime import datetime from eolearn.core import EOPatch def a...
true
true
f70f10e88059a23ec5dc7d82b780582041e1ec1f
5,119
py
Python
cost.py
Inspirateur/PitchAssignment
a79f830ea91ef51cb2c8fd59f99ae66c6ba0df08
[ "MIT" ]
null
null
null
cost.py
Inspirateur/PitchAssignment
a79f830ea91ef51cb2c8fd59f99ae66c6ba0df08
[ "MIT" ]
null
null
null
cost.py
Inspirateur/PitchAssignment
a79f830ea91ef51cb2c8fd59f99ae66c6ba0df08
[ "MIT" ]
1
2021-09-20T07:48:36.000Z
2021-09-20T07:48:36.000Z
from collections import defaultdict from itertools import product MULTITASK_PENALTY = 1 AUTHOR_PENALTY = 2 RELATION_COST = .05 DEFAULT_FLEXIBILITY = .1 OVERREQ_PENALTY = 0.5 def workload_diff(target, proposed): """ Helper for pitches_cost :param target: <role, load> :param proposed: <role, load> :...
35.797203
104
0.586247
from collections import defaultdict from itertools import product MULTITASK_PENALTY = 1 AUTHOR_PENALTY = 2 RELATION_COST = .05 DEFAULT_FLEXIBILITY = .1 OVERREQ_PENALTY = 0.5 def workload_diff(target, proposed): total = 0 for role in target: diff = target[role] - (proposed[role] if role in pro...
true
true
f70f1152cc44929634c97df0c7fa4576d6daf8fb
590
py
Python
DynamicProgramming/MaximumTradingProfit.py
kopok2/algorithms
efb6a423a8447d99584335e9fef8d9b3c74e2ad8
[ "MIT" ]
null
null
null
DynamicProgramming/MaximumTradingProfit.py
kopok2/algorithms
efb6a423a8447d99584335e9fef8d9b3c74e2ad8
[ "MIT" ]
null
null
null
DynamicProgramming/MaximumTradingProfit.py
kopok2/algorithms
efb6a423a8447d99584335e9fef8d9b3c74e2ad8
[ "MIT" ]
null
null
null
# coding=utf-8 """Maximum trade profit problem dynamic programming solution Python implementation.""" def mx_profit(prices): n = len(prices) profit = [0] * n mxp = prices[n - 1] for i in range(n - 2, -1, -1): mxp = max(mxp, prices[i]) profit[i] = max(profit[i + 1], mxp - prices[i]) ...
26.818182
86
0.561017
def mx_profit(prices): n = len(prices) profit = [0] * n mxp = prices[n - 1] for i in range(n - 2, -1, -1): mxp = max(mxp, prices[i]) profit[i] = max(profit[i + 1], mxp - prices[i]) mnp = prices[0] for i in range(1, n): mnp = min(mnp, prices[i]) profit[i] = max(...
true
true
f70f116ad6d2403ad613a608d5c4ed8b8378c8de
9,419
py
Python
tests/end_to_end/test_target_redshift.py
danielerapati/pipelinewise
d36d93c504e40d101e0af61f2aa6a827c3c267b8
[ "Apache-2.0" ]
2
2020-10-05T07:41:36.000Z
2020-10-05T07:41:37.000Z
tests/end_to_end/test_target_redshift.py
danielerapati/pipelinewise
d36d93c504e40d101e0af61f2aa6a827c3c267b8
[ "Apache-2.0" ]
37
2021-06-07T07:12:23.000Z
2022-03-28T23:08:04.000Z
tests/end_to_end/test_target_redshift.py
danielerapati/pipelinewise
d36d93c504e40d101e0af61f2aa6a827c3c267b8
[ "Apache-2.0" ]
1
2020-11-13T20:43:50.000Z
2020-11-13T20:43:50.000Z
import os from datetime import datetime import pytest from .helpers import tasks from .helpers import assertions from .helpers.env import E2EEnv DIR = os.path.dirname(__file__) TAP_MARIADB_ID = 'mariadb_to_rs' TAP_MARIADB_BUFFERED_STREAM_ID = 'mariadb_to_rs_buffered_stream' TAP_POSTGRES_ID = 'postgres_to_rs' TAP_S3_...
56.740964
120
0.664826
import os from datetime import datetime import pytest from .helpers import tasks from .helpers import assertions from .helpers.env import E2EEnv DIR = os.path.dirname(__file__) TAP_MARIADB_ID = 'mariadb_to_rs' TAP_MARIADB_BUFFERED_STREAM_ID = 'mariadb_to_rs_buffered_stream' TAP_POSTGRES_ID = 'postgres_to_rs' TAP_S3_...
true
true
f70f1229ac982d4465e3e0c25a3cb3c70769c75a
15,135
py
Python
load_sqldump.py
furyutei/load_sqldump
836887a2a15f418031b12213a477dd712ce595be
[ "MIT" ]
1
2019-04-10T18:48:23.000Z
2019-04-10T18:48:23.000Z
load_sqldump.py
furyutei/load_sqldump
836887a2a15f418031b12213a477dd712ce595be
[ "MIT" ]
null
null
null
load_sqldump.py
furyutei/load_sqldump
836887a2a15f418031b12213a477dd712ce595be
[ "MIT" ]
null
null
null
#! /usr/bin/env python # -*- coding: utf-8 -*- ''' Download SQL file of MySQL database by phpMyAdmin ''' import re import os import sys import base64 import urllib import urllib2 import traceback from cookielib import CookieJar, DefaultCookiePolicy from pprint import pprint __author__ = 'furyu (furyutei@gmail.com...
31.53125
189
0.631913
''' Download SQL file of MySQL database by phpMyAdmin ''' import re import os import sys import base64 import urllib import urllib2 import traceback from cookielib import CookieJar, DefaultCookiePolicy from pprint import pprint __author__ = 'furyu (furyutei@gmail.com)' __version__ = '0.0.1e' __copyright__ = '...
false
true
f70f126e896590c2b01b095451c40ff7f2026770
2,737
py
Python
donkeycar/templates/config_defaults.py
samvorg/donkey
156f0fcf9a752c9930e2ce5832454e5c5ad4ea87
[ "MIT" ]
null
null
null
donkeycar/templates/config_defaults.py
samvorg/donkey
156f0fcf9a752c9930e2ce5832454e5c5ad4ea87
[ "MIT" ]
null
null
null
donkeycar/templates/config_defaults.py
samvorg/donkey
156f0fcf9a752c9930e2ce5832454e5c5ad4ea87
[ "MIT" ]
1
2018-05-24T17:01:36.000Z
2018-05-24T17:01:36.000Z
""" CAR CONFIG This file is read by your car application's manage.py script to change the car performance. EXMAPLE ----------- import dk cfg = dk.load_config(config_path='~/d2/config.py') print(cfg.CAMERA_RESOLUTION) """ import os #pi information PI_USERNAME = "pi" PI_PASSWD = "raspberry" PI_HOSTNAME = "raspbe...
22.252033
96
0.756303
import os PI_USERNAME = "pi" PI_PASSWD = "raspberry" PI_HOSTNAME = "raspberrypi.local" PI_DONKEY_ROOT = "/home/pi/d2" CAR_PATH = PACKAGE_PATH = os.path.dirname(os.path.realpath(__file__)) DATA_PATH = os.path.join(CAR_PATH, 'data') MODELS_PATH = os.path.join(CAR_PATH, 'models') DRIVE_LOOP_HZ = 20 MAX_LOOPS = 100...
true
true
f70f13d73c9188fa81bf8e7e7ab80aefc3027697
14,758
py
Python
fugue/execution/factory.py
fugue-project/fugue
838fdaa794c62e8bdc7f1474818d9491d5d39ed7
[ "Apache-2.0" ]
547
2020-09-22T08:30:14.000Z
2022-03-30T23:11:05.000Z
fugue/execution/factory.py
fugue-project/fugue
838fdaa794c62e8bdc7f1474818d9491d5d39ed7
[ "Apache-2.0" ]
196
2020-09-22T23:08:26.000Z
2022-03-26T21:22:48.000Z
fugue/execution/factory.py
fugue-project/fugue
838fdaa794c62e8bdc7f1474818d9491d5d39ed7
[ "Apache-2.0" ]
37
2020-09-23T17:05:00.000Z
2022-03-29T18:26:52.000Z
from typing import Any, Callable, Dict, Optional, Type, Union from fugue.execution.execution_engine import ExecutionEngine, SQLEngine from fugue.execution.native_execution_engine import NativeExecutionEngine from triad.utils.convert import to_instance from triad import assert_or_throw class _ExecutionEngineFactory(o...
36.529703
88
0.629896
from typing import Any, Callable, Dict, Optional, Type, Union from fugue.execution.execution_engine import ExecutionEngine, SQLEngine from fugue.execution.native_execution_engine import NativeExecutionEngine from triad.utils.convert import to_instance from triad import assert_or_throw class _ExecutionEngineFactory(o...
true
true
f70f145ef2c19e088ccd87983f09b8c3f766eba4
2,907
py
Python
Alert_mar2016_Hysplit_all_BTs.py
annahs/atmos_research
b5853c9b12e327492f8f8ba5069bca3fd2e981c8
[ "MIT" ]
2
2018-08-17T15:25:26.000Z
2019-04-17T16:50:00.000Z
Alert_mar2016_Hysplit_all_BTs.py
annahs/atmos_research
b5853c9b12e327492f8f8ba5069bca3fd2e981c8
[ "MIT" ]
null
null
null
Alert_mar2016_Hysplit_all_BTs.py
annahs/atmos_research
b5853c9b12e327492f8f8ba5069bca3fd2e981c8
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import matplotlib.lines as mlines import numpy as np import os import sys from pprint import pprint from datetime import datetime from datetime import timedelta import pickle import copy from mpl_toolkits.basemap import Basemap import matplotlib.colors timezone = 1 endpointsPARIS = []...
24.225
110
0.68937
import matplotlib.pyplot as plt import matplotlib.lines as mlines import numpy as np import os import sys from pprint import pprint from datetime import datetime from datetime import timedelta import pickle import copy from mpl_toolkits.basemap import Basemap import matplotlib.colors timezone = 1 endpointsPARIS = []...
false
true
f70f158e9a7b259d04251a187e3972e2d88d6610
2,151
py
Python
ranndom_m.py
aaparikh/Intermediate-Python-Practice
6f49bea8f677e7ed500cd1ec91df4c8531832abb
[ "Apache-2.0" ]
1
2022-03-08T16:35:51.000Z
2022-03-08T16:35:51.000Z
ranndom_m.py
aaparikh/Intermediate-Python-Practice
6f49bea8f677e7ed500cd1ec91df4c8531832abb
[ "Apache-2.0" ]
null
null
null
ranndom_m.py
aaparikh/Intermediate-Python-Practice
6f49bea8f677e7ed500cd1ec91df4c8531832abb
[ "Apache-2.0" ]
null
null
null
#there are many ways we can do random numbers #1. import random #used to produce pseudo-random numbers. # They are called pseudo-random because they are not truly random and can be reproduced. import random a = random.random() #random float between 0 and 1 b = random.uniform(1,10) #random float between 1 and 10 c = ...
53.775
127
0.748024
import random a = random.random() b = random.uniform(1,10) c = random.randrange(1,10) d = random.randint(1,10) e = random.choice(['a','b','c']) f = random.sample(range(1,10),3) g = random.choices(range(1,10),k=3) h = random.normalvariate(0,1) random.shuffle(['a','b','c']) random.seed(10) import secre...
true
true
f70f16405f2a7091f370917811545289d3bd69fa
2,873
py
Python
core/migrations/0001_initial.py
uadson/django-consumindo-api
21213205d9dfb816f729a15ba3623724d97fd4ce
[ "MIT" ]
1
2021-11-17T02:41:38.000Z
2021-11-17T02:41:38.000Z
core/migrations/0001_initial.py
uadson/django-consumindo-api
21213205d9dfb816f729a15ba3623724d97fd4ce
[ "MIT" ]
1
2021-11-16T15:38:06.000Z
2021-11-16T15:38:06.000Z
core/migrations/0001_initial.py
uadson/django-consumindo-api
21213205d9dfb816f729a15ba3623724d97fd4ce
[ "MIT" ]
null
null
null
# Generated by Django 3.2.9 on 2021-11-16 11:37 import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0012_alter_user_first_name_m...
63.844444
329
0.663766
import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0012_alter_user_first_name_max_length'), ] operations = [ ...
true
true
f70f16af7eacc72139cb3aa69abab59899a7fc3b
1,183
py
Python
tests/aa_pbs_exporter/test_aa_pbs_exporter.py
DonalChilde/aa_pbs_exporter
a627cd9fbd76f4cf27e83e0867074e9d2091dbd9
[ "MIT" ]
null
null
null
tests/aa_pbs_exporter/test_aa_pbs_exporter.py
DonalChilde/aa_pbs_exporter
a627cd9fbd76f4cf27e83e0867074e9d2091dbd9
[ "MIT" ]
null
null
null
tests/aa_pbs_exporter/test_aa_pbs_exporter.py
DonalChilde/aa_pbs_exporter
a627cd9fbd76f4cf27e83e0867074e9d2091dbd9
[ "MIT" ]
null
null
null
# #!/usr/bin/env python # """Tests for `aa_pbs_exporter` package.""" # from click.testing import CliRunner # from aa_pbs_exporter.cli import aa_pbs_exporter_cli as cli # def test_content(response): # """Sample pytest test function with the pytest fixture as an argument.""" # # from bs4 import BeautifulSoup...
32.861111
79
0.67033
true
true
f70f18cff050b3c4ad8472311641f95c9352b029
3,185
py
Python
test_runner.py
dbulka/pytests
d2658cff3832293cb1b8abcd970f7df83a2b5035
[ "MIT" ]
null
null
null
test_runner.py
dbulka/pytests
d2658cff3832293cb1b8abcd970f7df83a2b5035
[ "MIT" ]
null
null
null
test_runner.py
dbulka/pytests
d2658cff3832293cb1b8abcd970f7df83a2b5035
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import json import os import sys import time from echopy import Echo from project import RESOURCES_DIR, BLOCK_RELEASE_INTERVAL if "BASE_URL" not in os.environ: BASE_URL = json.load(open(os.path.join(RESOURCES_DIR, "urls.json")))["BASE_URL"] else: BASE_URL = os.environ["BASE_URL"] cat...
26.322314
115
0.69325
import json import os import sys import time from echopy import Echo from project import RESOURCES_DIR, BLOCK_RELEASE_INTERVAL if "BASE_URL" not in os.environ: BASE_URL = json.load(open(os.path.join(RESOURCES_DIR, "urls.json")))["BASE_URL"] else: BASE_URL = os.environ["BASE_URL"] categories = [ 'a...
true
true
f70f18eeacb3c3fae5ec19e1b27bd08dc0f7eaac
1,014
py
Python
perf-eval/gen-flows.py
Nic30/ovs-cls
7e142831fc7e6ead0b9cf081c624276272b15bb9
[ "Apache-2.0" ]
1
2020-07-14T17:34:35.000Z
2020-07-14T17:34:35.000Z
perf-eval/gen-flows.py
williamtu/ovs-cls
7e142831fc7e6ead0b9cf081c624276272b15bb9
[ "Apache-2.0" ]
3
2019-02-01T11:22:09.000Z
2019-02-08T17:47:57.000Z
perf-eval/gen-flows.py
Nic30/ovs-cls
7e142831fc7e6ead0b9cf081c624276272b15bb9
[ "Apache-2.0" ]
1
2019-02-01T11:09:25.000Z
2019-02-01T11:09:25.000Z
#!/usr/bin/python import sys MIN_UDP_SPORT = 2048 if __name__ == "__main__": N_SUBTABLES = int(sys.argv[1]) N_RULES = int(sys.argv[2]) assert N_RULES >= N_SUBTABLES rules_per_subtable = N_RULES / N_SUBTABLES if rules_per_subtable > 100: udp_port_range = 100 ip_dst_range = rules_p...
30.727273
99
0.524655
import sys MIN_UDP_SPORT = 2048 if __name__ == "__main__": N_SUBTABLES = int(sys.argv[1]) N_RULES = int(sys.argv[2]) assert N_RULES >= N_SUBTABLES rules_per_subtable = N_RULES / N_SUBTABLES if rules_per_subtable > 100: udp_port_range = 100 ip_dst_range = rules_per_subtable /100 ...
false
true
f70f19d000d6f8359c77e2784b7e70d5352e4de1
11,800
py
Python
pythainlp/transliterate/thai2rom.py
Subarna578/pythainlp
9650a40396719284add17bb09f50e948dea41053
[ "Apache-2.0" ]
null
null
null
pythainlp/transliterate/thai2rom.py
Subarna578/pythainlp
9650a40396719284add17bb09f50e948dea41053
[ "Apache-2.0" ]
null
null
null
pythainlp/transliterate/thai2rom.py
Subarna578/pythainlp
9650a40396719284add17bb09f50e948dea41053
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Romanization of Thai words based on machine-learnt engine ("thai2rom") """ import random import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from pythainlp.corpus import download, get_corpus_path device = torch.device("cuda:0" if torch.cuda.is_available()...
33.810888
79
0.592373
import random import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from pythainlp.corpus import download, get_corpus_path device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") class ThaiTransliterator: def __init__(self): self.__filemodel = g...
true
true
f70f1afff68e5a2398c858fe97997b9eef497a0d
19,508
py
Python
sphinxcontrib/doxylink/doxylink.py
sphinx-contrib/doxylink
0c8bda7504e483b527bd8f516a240547caa01646
[ "BSD-2-Clause" ]
9
2017-12-04T14:05:55.000Z
2021-08-04T12:28:36.000Z
sphinxcontrib/doxylink/doxylink.py
sphinx-contrib/doxylink
0c8bda7504e483b527bd8f516a240547caa01646
[ "BSD-2-Clause" ]
27
2017-12-02T13:39:17.000Z
2021-09-10T09:57:57.000Z
sphinxcontrib/doxylink/doxylink.py
sphinx-contrib/doxylink
0c8bda7504e483b527bd8f516a240547caa01646
[ "BSD-2-Clause" ]
14
2017-11-27T08:41:14.000Z
2022-02-02T08:35:55.000Z
# -*- coding: utf-8 -*- import os import re import requests import shutil import time import xml.etree.ElementTree as ET import urllib.parse from collections import namedtuple from dateutil.parser import parse as parsedate from docutils import nodes, utils from sphinx.util.nodes import split_explicit_title from sphin...
43.544643
219
0.629947
import os import re import requests import shutil import time import xml.etree.ElementTree as ET import urllib.parse from collections import namedtuple from dateutil.parser import parse as parsedate from docutils import nodes, utils from sphinx.util.nodes import split_explicit_title from sphinx.util.console import b...
true
true
f70f1b00fd0ae86be320e4714bb9c7b34baf8028
15,022
py
Python
speechbrain/lobes/models/huggingface_wav2vec.py
RaphaelOlivier/speechbrain
142dc6caa4b46ca4c9341b0cd39627f489808749
[ "Apache-2.0" ]
null
null
null
speechbrain/lobes/models/huggingface_wav2vec.py
RaphaelOlivier/speechbrain
142dc6caa4b46ca4c9341b0cd39627f489808749
[ "Apache-2.0" ]
null
null
null
speechbrain/lobes/models/huggingface_wav2vec.py
RaphaelOlivier/speechbrain
142dc6caa4b46ca4c9341b0cd39627f489808749
[ "Apache-2.0" ]
null
null
null
"""This lobe enables the integration of huggingface pretrained wav2vec2/hubert/wavlm models. Reference: https://arxiv.org/abs/2006.11477 Reference: https://arxiv.org/abs/1904.05862 Reference: https://arxiv.org/abs/2110.13900 Transformer from HuggingFace needs to be installed: https://huggingface.co/transformers/instal...
36.19759
123
0.637598
import os import torch import logging import pathlib import numpy as np import torch.nn.functional as F from torch import nn from huggingface_hub import model_info from speechbrain.pretrained.fetching import fetch try: import transformers from transformers import Wav2Vec2Model, HubertModel, WavLMModel, Data2...
true
true
f70f1b1d9f8febeb246974b7a40d95a388399f2c
318
py
Python
Python/Whatsapp_Sms_Bomber/xpath.py
CharvyJain/Rotten-Scripts
c9b8f7dde378620e4a82eae7aacec53f1eeea3c5
[ "MIT" ]
3
2021-08-19T08:38:10.000Z
2022-01-03T14:37:50.000Z
Python/Whatsapp_Sms_Bomber/xpath.py
SKAUL05/Rotten-Scripts
c44e69754bbecb8a547fe2cc3a29be5acf97c46a
[ "MIT" ]
3
2022-01-15T07:33:28.000Z
2022-03-24T04:23:03.000Z
Python/Whatsapp_Sms_Bomber/xpath.py
SKAUL05/Rotten-Scripts
c44e69754bbecb8a547fe2cc3a29be5acf97c46a
[ "MIT" ]
1
2020-12-25T18:42:30.000Z
2020-12-25T18:42:30.000Z
newchat_xpath= "//*[@id='side']/header/div[2]/div/span/div[2]" search_xpath= "//*[@id='app']/div/div/div[2]/div[1]/span/div/span/div/div[1]/div/label/div/div[2]" #user_xpath= "//span[@title='{}']" message_xpath= "//*[@id='main']/footer/div[1]/div[2]/div/div[2]" sendbutton_xpath= "//*[@id='main']/footer/div[1]/div[3]"
63.6
98
0.625786
newchat_xpath= "//*[@id='side']/header/div[2]/div/span/div[2]" search_xpath= "//*[@id='app']/div/div/div[2]/div[1]/span/div/span/div/div[1]/div/label/div/div[2]" message_xpath= "//*[@id='main']/footer/div[1]/div[2]/div/div[2]" sendbutton_xpath= "//*[@id='main']/footer/div[1]/div[3]"
true
true
f70f1b4158f8ca00b905ad9334de0f38c58821fd
15,602
py
Python
vrchatapi/model/create_world_request.py
vrchatapi/vrchatapi-python
afe5ec9fda298723e7408358473aafe343e27d18
[ "MIT" ]
8
2021-08-25T02:35:30.000Z
2022-03-28T18:11:58.000Z
vrchatapi/model/create_world_request.py
vrchatapi/vrchatapi-python
afe5ec9fda298723e7408358473aafe343e27d18
[ "MIT" ]
1
2022-03-18T20:29:30.000Z
2022-03-18T20:35:05.000Z
vrchatapi/model/create_world_request.py
vrchatapi/vrchatapi-python
afe5ec9fda298723e7408358473aafe343e27d18
[ "MIT" ]
1
2022-01-11T10:49:12.000Z
2022-01-11T10:49:12.000Z
""" VRChat API Documentation The version of the OpenAPI document: 1.6.8 Contact: me@ruby.js.org Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from vrchatapi.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ...
44.1983
236
0.563966
import re import sys from vrchatapi.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 ..m...
true
true
f70f1b515751dfaf4638ec73883e1665c80bf12e
67,139
py
Python
poky/bitbake/lib/bb/fetch2/__init__.py
buildlinux/unityos
dcbe232d0589013d77a62c33959d6a69f9bfbc5e
[ "Apache-2.0" ]
null
null
null
poky/bitbake/lib/bb/fetch2/__init__.py
buildlinux/unityos
dcbe232d0589013d77a62c33959d6a69f9bfbc5e
[ "Apache-2.0" ]
null
null
null
poky/bitbake/lib/bb/fetch2/__init__.py
buildlinux/unityos
dcbe232d0589013d77a62c33959d6a69f9bfbc5e
[ "Apache-2.0" ]
null
null
null
# ex:ts=4:sw=4:sts=4:et # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- """ BitBake 'Fetch' implementations Classes for obtaining upstream sources for the BitBake build tools. """ # Copyright (C) 2003, 2004 Chris Larson # Copyright (C) 2012 Intel Corporation # # This program is free software; you c...
36.038111
416
0.579574
import os, re import signal import logging import urllib.request, urllib.parse, urllib.error if 'git' not in urllib.parse.uses_netloc: urllib.parse.uses_netloc.append('git') import operator import collections import subprocess import pickle import errno import bb.persist_data, bb.utils import b...
true
true
f70f1b99f377edef719842ceaad9281b62f33dae
1,801
py
Python
src/summ/rank_sent.py
yumoxu/querysum
924c3a0789a50d82f23bcc8faf95407739c0b171
[ "MIT" ]
18
2020-11-20T03:11:42.000Z
2021-11-02T10:42:15.000Z
src/summ/rank_sent.py
yumoxu/querysum
924c3a0789a50d82f23bcc8faf95407739c0b171
[ "MIT" ]
15
2020-12-28T16:41:12.000Z
2021-12-16T16:56:24.000Z
src/summ/rank_sent.py
yumoxu/querysum
924c3a0789a50d82f23bcc8faf95407739c0b171
[ "MIT" ]
2
2021-01-05T13:24:43.000Z
2021-06-07T10:54:19.000Z
# -*- coding: utf-8 -*- from os.path import dirname, abspath import sys sys.path.insert(0, dirname(dirname(abspath(__file__)))) import utils.config_loader as config import utils.config_loader as config import utils.tools as tools import torch import shutil versions = ['sl', 'alpha'] para_org = True for vv in versio...
26.880597
106
0.642976
from os.path import dirname, abspath import sys sys.path.insert(0, dirname(dirname(abspath(__file__)))) import utils.config_loader as config import utils.config_loader as config import utils.tools as tools import torch import shutil versions = ['sl', 'alpha'] para_org = True for vv in versions: if config.meta_...
true
true
f70f1c03d635f43dee9281507f189ddd0c443a45
2,237
py
Python
mars/web/dashboard.py
HarshCasper/mars
4c12c968414d666c7a10f497bc22de90376b1932
[ "Apache-2.0" ]
2
2019-03-29T04:11:10.000Z
2020-07-08T10:19:54.000Z
mars/web/dashboard.py
HarshCasper/mars
4c12c968414d666c7a10f497bc22de90376b1932
[ "Apache-2.0" ]
null
null
null
mars/web/dashboard.py
HarshCasper/mars
4c12c968414d666c7a10f497bc22de90376b1932
[ "Apache-2.0" ]
null
null
null
# Copyright 1999-2020 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
43.019231
96
0.673223
from .server import MarsWebAPI, MarsRequestHandler, register_web_handler, get_jinja_env _jinja_env = get_jinja_env() class DashboardHandler(MarsRequestHandler): def get(self): web_api = MarsWebAPI(self._scheduler) scheduler_infos = web_api.get_schedulers_info() worker_infos ...
true
true
f70f1e3812bc6ff84fd875a359dea536690df0d9
5,576
py
Python
pilco/environments/custom/continuous_mountaincar.py
sbrml/pilco
77b6d8b9033ffdb23cae4936b028f42144f37846
[ "MIT" ]
null
null
null
pilco/environments/custom/continuous_mountaincar.py
sbrml/pilco
77b6d8b9033ffdb23cae4936b028f42144f37846
[ "MIT" ]
4
2020-11-13T18:43:28.000Z
2022-02-10T01:17:03.000Z
pilco/environments/custom/continuous_mountaincar.py
sbrml/pilco
77b6d8b9033ffdb23cae4936b028f42144f37846
[ "MIT" ]
1
2020-03-22T10:14:21.000Z
2020-03-22T10:14:21.000Z
""" Our modification of the OpenAI Gym Continuous Mountain Car by Olivier Sigaud: https://github.com/openai/gym/blob/master/gym/envs/classic_control/continuous_mountain_car.py which was (ultimately) based on Sutton's implementation: http://incompleteideas.net/sutton/MountainCar/MountainCar1.cp """ from pilco.errors i...
31.862857
93
0.565638
from pilco.errors import EnvironmentError import gym from gym import spaces from gym.utils import seeding import numpy as np class MountainCar(gym.Env): metadata = {'render.modes': ['human', 'rgb_array'], 'video.frames_per_second': 30} def __init__(self): self.min_action...
true
true
f70f1eaceada771991938b17b192bade1dc91d80
14,849
py
Python
release/scripts/modules/bpy_extras/mesh_utils.py
rbabari/blender
6daa85f14b2974abfc3d0f654c5547f487bb3b74
[ "Naumen", "Condor-1.1", "MS-PL" ]
116
2015-11-02T16:36:53.000Z
2021-06-08T20:36:18.000Z
release/scripts/modules/bpy_extras/mesh_utils.py
rbabari/blender
6daa85f14b2974abfc3d0f654c5547f487bb3b74
[ "Naumen", "Condor-1.1", "MS-PL" ]
39
2016-04-25T12:18:34.000Z
2021-03-01T19:06:36.000Z
release/scripts/modules/bpy_extras/mesh_utils.py
rbabari/blender
6daa85f14b2974abfc3d0f654c5547f487bb3b74
[ "Naumen", "Condor-1.1", "MS-PL" ]
19
2016-01-24T14:24:00.000Z
2020-07-19T05:26:24.000Z
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
31.393235
80
0.536534
loop_indices for poly in mesh.polygons] luv_hash = {} luv_hash_get = luv_hash.get luv_hash_ls = [None] * len(uv_loops) for pi, poly_indices in enumerate(poly_loops): for li in poly_indices: uv = uv_loops[li] uv_hub = luv_hash_get(uv) if uv_hub is None: ...
true
true
f70f1f28974c7dca57cac919fb7d82881164e5fb
983
py
Python
src/notif/urls.py
triump0870/notif
ccc36ce85b3721ea85bf22038541d375c2ff5996
[ "MIT" ]
null
null
null
src/notif/urls.py
triump0870/notif
ccc36ce85b3721ea85bf22038541d375c2ff5996
[ "MIT" ]
null
null
null
src/notif/urls.py
triump0870/notif
ccc36ce85b3721ea85bf22038541d375c2ff5996
[ "MIT" ]
null
null
null
from django.conf.urls import include, url from django.contrib import admin from django.conf import settings from django.conf.urls.static import static import profiles.urls import accounts.urls from . import views urlpatterns = [ url(r'^$', views.HomePage.as_view(), name='home'), url(r'^about/$', views.AboutPag...
32.766667
76
0.708037
from django.conf.urls import include, url from django.contrib import admin from django.conf import settings from django.conf.urls.static import static import profiles.urls import accounts.urls from . import views urlpatterns = [ url(r'^$', views.HomePage.as_view(), name='home'), url(r'^about/$', views.AboutPag...
true
true
f70f1fa11ff388ced5d59e8a7ef2a1be228de8c6
516
py
Python
vunit/verilog/check/run.py
ThomasWismer/vunit
3dd2d34e72c21d7a5b23cbf5a775ea28923a7718
[ "Artistic-2.0", "Apache-2.0" ]
2
2021-09-24T01:44:27.000Z
2022-01-18T19:42:16.000Z
vunit/verilog/check/run.py
ThomasWismer/vunit
3dd2d34e72c21d7a5b23cbf5a775ea28923a7718
[ "Artistic-2.0", "Apache-2.0" ]
1
2021-09-12T01:03:44.000Z
2021-09-19T15:28:12.000Z
vunit/verilog/check/run.py
ThomasWismer/vunit
3dd2d34e72c21d7a5b23cbf5a775ea28923a7718
[ "Artistic-2.0", "Apache-2.0" ]
null
null
null
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (c) 2014-2021, Lars Asplund lars.anders.asplund@gmail.com from pathlib import Path from vunit.verilog impo...
28.666667
75
0.728682
from pathlib import Path from vunit.verilog import VUnit ROOT = Path(__file__).parent VU = VUnit.from_argv() VU.add_library("lib").add_source_files(ROOT / "test" / "*.sv") VU.set_sim_option("modelsim.vsim_flags.gui", ["-novopt"]) VU.main()
true
true
f70f1fee1810154c5a52377ec53945a73677dcdc
1,294
py
Python
stubs/System/Drawing/Configuration.py
ricardyn/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
1
2021-02-02T13:39:16.000Z
2021-02-02T13:39:16.000Z
stubs/System/Drawing/Configuration.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
stubs/System/Drawing/Configuration.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
# encoding: utf-8 # module System.Drawing.Configuration calls itself Configuration # from System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a # by generator 1.145 # no doc # no imports # no functions # classes class SystemDrawingSection(ConfigurationSection): """ SystemDra...
36.971429
151
0.719474
class SystemDrawingSection(ConfigurationSection): BitmapSuffix = property(lambda self: object(), lambda self, v: None, lambda self: None) """ HasContext = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
true
true
f70f210275c45c6bc3b24ff9b6183cf804f8307c
411
py
Python
18_greatest.py
hritxvij/python-basic-practise
42f55320ff55346558ecc164967cbe399060247c
[ "Apache-2.0" ]
null
null
null
18_greatest.py
hritxvij/python-basic-practise
42f55320ff55346558ecc164967cbe399060247c
[ "Apache-2.0" ]
null
null
null
18_greatest.py
hritxvij/python-basic-practise
42f55320ff55346558ecc164967cbe399060247c
[ "Apache-2.0" ]
null
null
null
num1 = input("Enter the first number:\n ") num2 = input("Enter the second number:\n ") num3 = input("Enter the third number:\n ") num4 = input("Enter the fourth number:\n ") if (num1>num2) and (num2>num3): print("The greatest number is:", num1) elif (num2>num1) and (num1>num3): ...
31.615385
55
0.608273
num1 = input("Enter the first number:\n ") num2 = input("Enter the second number:\n ") num3 = input("Enter the third number:\n ") num4 = input("Enter the fourth number:\n ") if (num1>num2) and (num2>num3): print("The greatest number is:", num1) elif (num2>num1) and (num1>num3): ...
true
true
f70f2224b7c29a2a61b7f2a64979a1761e77d84f
11,600
py
Python
code/python/IRNContacts/v1/fds/sdk/IRNContacts/model/operation_type.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
6
2022-02-07T16:34:18.000Z
2022-03-30T08:04:57.000Z
code/python/IRNContacts/v1/fds/sdk/IRNContacts/model/operation_type.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
2
2022-02-07T05:25:57.000Z
2022-03-07T14:18:04.000Z
code/python/IRNContacts/v1/fds/sdk/IRNContacts/model/operation_type.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
null
null
null
""" IRN API v1 Allows users to extract, create, update and configure IRN data. # noqa: E501 The version of the OpenAPI document: 1 Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from fds.sdk.IRNContacts.model_utils import ( # noqa: F401 ApiTy...
40.277778
110
0.547845
import re import sys from fds.sdk.IRNContacts.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, ...
true
true
f70f2240675cbbff5008d275512cd6a5bb90088b
2,087
py
Python
dvc/dependency/repo.py
drorata/dvc
b6bc65fcbf269b94b7c1ce2d9dff641dedb039b0
[ "Apache-2.0" ]
null
null
null
dvc/dependency/repo.py
drorata/dvc
b6bc65fcbf269b94b7c1ce2d9dff641dedb039b0
[ "Apache-2.0" ]
null
null
null
dvc/dependency/repo.py
drorata/dvc
b6bc65fcbf269b94b7c1ce2d9dff641dedb039b0
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals import copy from funcy import merge from schema import Optional from contextlib import contextmanager from dvc.external_repo import external_repo from dvc.utils.compat import str from .local import DependencyLOCAL class DependencyREPO(DependencyLOCAL): PARAM_REPO = "rep...
26.75641
79
0.643987
from __future__ import unicode_literals import copy from funcy import merge from schema import Optional from contextlib import contextmanager from dvc.external_repo import external_repo from dvc.utils.compat import str from .local import DependencyLOCAL class DependencyREPO(DependencyLOCAL): PARAM_REPO = "rep...
true
true
f70f22e7a983dcb07f28f40547898d34230c6980
843
py
Python
examples/custom_problem.py
eltociear/NiaPy
7884aefec8f013d9f8db5c1af7080a61dd19a31d
[ "MIT" ]
null
null
null
examples/custom_problem.py
eltociear/NiaPy
7884aefec8f013d9f8db5c1af7080a61dd19a31d
[ "MIT" ]
null
null
null
examples/custom_problem.py
eltociear/NiaPy
7884aefec8f013d9f8db5c1af7080a61dd19a31d
[ "MIT" ]
null
null
null
# encoding=utf8 # This is temporary fix to import module from parent folder # It will be removed when package is published on PyPI import sys sys.path.append('../') import numpy as np from niapy.task import StoppingTask from niapy.problems import Problem from niapy.algorithms.basic import ParticleSwarmAlgorithm cla...
31.222222
105
0.725979
import sys sys.path.append('../') import numpy as np from niapy.task import StoppingTask from niapy.problems import Problem from niapy.algorithms.basic import ParticleSwarmAlgorithm class MyProblem(Problem): def __init__(self, dimension, lower=-10, upper=10, *args, **kwargs): super().__init__(dimensi...
true
true
f70f2304c5bc68c201e9756c24ea51014e1794d0
8,831
py
Python
datahub/search/elasticsearch.py
Staberinde/data-hub-api
3d0467dbceaf62a47158eea412a3dba827073300
[ "MIT" ]
6
2019-12-02T16:11:24.000Z
2022-03-18T10:02:02.000Z
datahub/search/elasticsearch.py
Staberinde/data-hub-api
3d0467dbceaf62a47158eea412a3dba827073300
[ "MIT" ]
1,696
2019-10-31T14:08:37.000Z
2022-03-29T12:35:57.000Z
datahub/search/elasticsearch.py
Staberinde/data-hub-api
3d0467dbceaf62a47158eea412a3dba827073300
[ "MIT" ]
9
2019-11-22T12:42:03.000Z
2021-09-03T14:25:05.000Z
from contextlib import contextmanager from logging import getLogger from django.conf import settings from elasticsearch.helpers import bulk as es_bulk from elasticsearch_dsl import analysis, Index from elasticsearch_dsl.connections import connections logger = getLogger(__name__) # Normalises values to improve sort...
29.049342
98
0.674895
from contextlib import contextmanager from logging import getLogger from django.conf import settings from elasticsearch.helpers import bulk as es_bulk from elasticsearch_dsl import analysis, Index from elasticsearch_dsl.connections import connections logger = getLogger(__name__) lowercase_asciifolding_normalizer ...
true
true
f70f24eb6dbeb6161cf2786c9b1c55687bbbf46f
3,707
py
Python
lux_ai/lux_gym/multi_subtask.py
mrzhuzhe/Kaggle_Lux_AI_2021
f00954d328467ce24f5535d3878d305c6d1f3acb
[ "MIT" ]
44
2021-12-13T22:49:26.000Z
2022-03-22T03:31:34.000Z
lux_ai/lux_gym/multi_subtask.py
L16H7/Kaggle_Lux_AI_2021
08b795e71e78c768d28c648290a15d58ca718776
[ "MIT" ]
1
2022-03-10T04:05:04.000Z
2022-03-10T04:05:04.000Z
lux_ai/lux_gym/multi_subtask.py
L16H7/Kaggle_Lux_AI_2021
08b795e71e78c768d28c648290a15d58ca718776
[ "MIT" ]
10
2021-12-13T21:23:57.000Z
2022-02-03T09:50:27.000Z
from abc import ABC, abstractmethod import numpy as np import random from typing import Callable, Dict, Optional, Tuple, Sequence from .reward_spaces import Subtask from ..lux.game import Game class SubtaskSampler(ABC): def __init__(self, subtask_constructors: Sequence[Callable[..., Subtask]]): self.subt...
40.736264
107
0.688427
from abc import ABC, abstractmethod import numpy as np import random from typing import Callable, Dict, Optional, Tuple, Sequence from .reward_spaces import Subtask from ..lux.game import Game class SubtaskSampler(ABC): def __init__(self, subtask_constructors: Sequence[Callable[..., Subtask]]): self.subt...
true
true
f70f256cd59a3311b34f386e6564bde3e61f621a
41,982
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_10_01/aio/operations/_public_ip_addresses_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
8
2021-01-13T23:44:08.000Z
2021-03-17T10:13:36.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_10_01/aio/operations/_public_ip_addresses_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
null
null
null
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_10_01/aio/operations/_public_ip_addresses_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
50.949029
395
0.673027
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure....
true
true
f70f25c06081abbe813159ebbb0ac18fae2c2425
23,673
py
Python
grr/server/grr_response_server/gui/selenium_tests/hunt_create_test.py
acidburn0zzz/grr
44e1a5b1630e8101610faaaebe15b19b5ad30cb1
[ "Apache-2.0" ]
1
2019-08-28T23:48:20.000Z
2019-08-28T23:48:20.000Z
grr/server/grr_response_server/gui/selenium_tests/hunt_create_test.py
AjitNair2/grr
2a2ea891b3927775872904cdd402a18e7bb3d143
[ "Apache-2.0" ]
2
2022-01-15T03:18:12.000Z
2022-02-13T22:02:43.000Z
grr/server/grr_response_server/gui/selenium_tests/hunt_create_test.py
acidburn0zzz/grr
44e1a5b1630e8101610faaaebe15b19b5ad30cb1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """Test of "New Hunt" wizard.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from absl import app from selenium.webdriver.common import keys from grr_response_core.lib import rdfvalue from grr_response_core.lib.rdfvalues import p...
39.719799
80
0.669032
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from absl import app from selenium.webdriver.common import keys from grr_response_core.lib import rdfvalue from grr_response_core.lib.rdfvalues import paths as rdf_paths from grr_response_server import data...
true
true
f70f26a0d985579cf884d6fe98e9714972271079
9,486
py
Python
gcloud/datastore/batch.py
scrapinghub/gcloud-python
1ec6d636ebf2c4d618aca6b2485fbbfa5f0fde29
[ "Apache-2.0" ]
null
null
null
gcloud/datastore/batch.py
scrapinghub/gcloud-python
1ec6d636ebf2c4d618aca6b2485fbbfa5f0fde29
[ "Apache-2.0" ]
null
null
null
gcloud/datastore/batch.py
scrapinghub/gcloud-python
1ec6d636ebf2c4d618aca6b2485fbbfa5f0fde29
[ "Apache-2.0" ]
2
2017-07-30T16:18:23.000Z
2020-10-14T11:24:18.000Z
# Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
35.931818
84
0.650538
from gcloud.datastore import helpers from gcloud.datastore.key import _dataset_ids_equal from gcloud.datastore._generated import datastore_pb2 as _datastore_pb2 class Batch(object): _id = None def __init__(self, client): self._client = client self._commit_request = _datastor...
true
true
f70f27ed025a93603507b3a8a8661a661342efc9
5,888
py
Python
interkamen_career/modules/mechanics_economic.py
Acetonen/Interkamen_career
75cc0a5832b7c1e303967cc337bb001e3383eb9e
[ "MIT" ]
null
null
null
interkamen_career/modules/mechanics_economic.py
Acetonen/Interkamen_career
75cc0a5832b7c1e303967cc337bb001e3383eb9e
[ "MIT" ]
null
null
null
interkamen_career/modules/mechanics_economic.py
Acetonen/Interkamen_career
75cc0a5832b7c1e303967cc337bb001e3383eb9e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """Visualise statistic by machine economic.""" from __future__ import annotations import pandas as pd from matplotlib import pyplot as plt from typing import Dict from .mechanic_report import MechReports from .administration.logger_cfg import Logs from .support_modules.custom_exceptions impor...
32.351648
78
0.589504
from __future__ import annotations import pandas as pd from matplotlib import pyplot as plt from typing import Dict from .mechanic_report import MechReports from .administration.logger_cfg import Logs from .support_modules.custom_exceptions import MainMenu from .support_modules.standart_functions import ( Basi...
true
true
f70f2913154b4f910fa56969655595ca01f7413a
3,464
py
Python
multiagent/scenarios/simple_speaker_listener.py
robbycostales/multiagent-particle-envs
22a00b18e13b629a206a8ffc8d8319d06dd5d7b0
[ "MIT" ]
null
null
null
multiagent/scenarios/simple_speaker_listener.py
robbycostales/multiagent-particle-envs
22a00b18e13b629a206a8ffc8d8319d06dd5d7b0
[ "MIT" ]
null
null
null
multiagent/scenarios/simple_speaker_listener.py
robbycostales/multiagent-particle-envs
22a00b18e13b629a206a8ffc8d8319d06dd5d7b0
[ "MIT" ]
null
null
null
import numpy as np from multiagent.core import World, Agent, Landmark from multiagent.scenario import BaseScenario class Scenario(BaseScenario): def make_world(self, dim_c=3): world = World() # set any world properties first world.dim_c = dim_c num_landmarks = 3 # add agents...
37.652174
98
0.601905
import numpy as np from multiagent.core import World, Agent, Landmark from multiagent.scenario import BaseScenario class Scenario(BaseScenario): def make_world(self, dim_c=3): world = World() world.dim_c = dim_c num_landmarks = 3 world.agents = [Agent() for i in ra...
true
true
f70f295307fb04fa6988031adb26ba2c95760a41
14,052
py
Python
nicos_mlz/sans1/gui/monitorwidgets.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
null
null
null
nicos_mlz/sans1/gui/monitorwidgets.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
null
null
null
nicos_mlz/sans1/gui/monitorwidgets.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
null
null
null
# -*- coding: utf-8 -*- # ***************************************************************************** # NICOS, the Networked Instrument Control System of the MLZ # Copyright (c) 2009-2022 by the NICOS contributors (see AUTHORS) # # This program is free software; you can redistribute it and/or modify it under # the t...
38.604396
95
0.570951
from nicos.core.status import BUSY, DISABLED, ERROR, NOTREACHED, OK, UNKNOWN, \ WARN from nicos.guisupport.qt import QBrush, QColor, QLineF, QPainter, QPen, \ QRectF, QSize, Qt, QTextOption, QWidget from nicos.guisupport.widget import NicosWidget, PropDef _magenta = QBrush(QColor('#A1...
true
true
f70f29ce05e826594240a5a93ef2677dfb4bec9b
5,738
py
Python
cloudmarker/manager.py
nishitm/cloudmarker
98f9d228abe3cf01fb4a6d631d31aadec47e759a
[ "MIT" ]
null
null
null
cloudmarker/manager.py
nishitm/cloudmarker
98f9d228abe3cf01fb4a6d631d31aadec47e759a
[ "MIT" ]
null
null
null
cloudmarker/manager.py
nishitm/cloudmarker
98f9d228abe3cf01fb4a6d631d31aadec47e759a
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Manager of worker subprocesses. This module invokes the worker subprocesses that perform the cloud security monitoring tasks. Each worker subprocess wraps around a cloud, store, event, or alert plugin and executes the plugin in a separate subprocess. """ import logging.config import multip...
32.235955
78
0.600732
import logging.config import multiprocessing as mp import time import schedule from cloudmarker import util, workers _log = logging.getLogger(__name__) def main(): args = util.parse_cli() config = util.load_config(args.config) logging.config.dictConfig(config['logger']) if args.fo...
true
true
f70f2a201509a04db04816c2ba900f5ce7cb680b
447
py
Python
tests/utils/test_retriever.py
duketemon/pyuplift
33daa0768ff333387cb8223ebfaedaffa57de335
[ "MIT" ]
26
2019-02-24T07:41:59.000Z
2022-01-03T05:07:26.000Z
tests/utils/test_retriever.py
duketemon/pyuplift
33daa0768ff333387cb8223ebfaedaffa57de335
[ "MIT" ]
8
2019-03-17T07:57:16.000Z
2019-08-02T19:55:49.000Z
tests/utils/test_retriever.py
duketemon/pyuplift
33daa0768ff333387cb8223ebfaedaffa57de335
[ "MIT" ]
4
2019-07-17T12:36:37.000Z
2020-07-16T11:36:35.000Z
import os import shutil import pytest from pyuplift.utils import retrieve_from_gz data_home = os.path.join(os.sep.join(__file__.split(os.sep)[:-1]), 'data') def test_retrieve_from_gz(): output_path = os.path.join(data_home, 'test.test') archive_path = output_path + '.gz' retrieve_from_gz(archive_path, o...
24.833333
74
0.700224
import os import shutil import pytest from pyuplift.utils import retrieve_from_gz data_home = os.path.join(os.sep.join(__file__.split(os.sep)[:-1]), 'data') def test_retrieve_from_gz(): output_path = os.path.join(data_home, 'test.test') archive_path = output_path + '.gz' retrieve_from_gz(archive_path, o...
true
true
f70f2adaa945474149079545ea89047b44947487
10,636
py
Python
carla_python_api_recorder.py
t27/carla-scenic-data-collector
3f38fa0e23a9f0ed85726292c5703c8505330870
[ "MIT" ]
1
2022-03-30T07:30:51.000Z
2022-03-30T07:30:51.000Z
carla_python_api_recorder.py
t27/carla-scenic-data-collector
3f38fa0e23a9f0ed85726292c5703c8505330870
[ "MIT" ]
1
2021-03-15T03:48:28.000Z
2021-03-15T03:48:28.000Z
carla_python_api_recorder.py
t27/carla-scenic-data-collector
3f38fa0e23a9f0ed85726292c5703c8505330870
[ "MIT" ]
5
2021-03-14T22:19:53.000Z
2021-11-11T15:28:05.000Z
# Recorder that records agent states as dataframes and also stores a carla recording, in synchronous mode #!/usr/bin/env python # Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. # For a copy, see <https://...
32.036145
105
0.615269
import glob import os import sys import pandas as pd from tqdm import tqdm import math CARLA_VERSION = "0.9.11" try: if CARLA_VERSION == "0.9.9": sys.path.append("./libs/carla-0.9.9-py3.7-linux-x86_64.egg") elif CARLA_VERSION == "0.9.11": sys.path.append("./libs/carla-0.9.11-py...
true
true
f70f2c01e48108b120549634668375635de05a9a
1,236
py
Python
Project Files/app/models/Lead.py
s3llsw0rd/demo_ajax_db_search
00a7e470f094f2941733abc529994d0be575c749
[ "Unlicense" ]
null
null
null
Project Files/app/models/Lead.py
s3llsw0rd/demo_ajax_db_search
00a7e470f094f2941733abc529994d0be575c749
[ "Unlicense" ]
null
null
null
Project Files/app/models/Lead.py
s3llsw0rd/demo_ajax_db_search
00a7e470f094f2941733abc529994d0be575c749
[ "Unlicense" ]
null
null
null
from system.core.model import Model from flask import jsonify class Lead(Model): def __init__(self): super(Lead, self).__init__() def get_leads(self, name, early, late, page, sort, order): query = 'SELECT * FROM leads' data = {} prev = False if name != '': query += ' WHERE CONCAT(first_name, " ", last...
26.869565
76
0.60356
from system.core.model import Model from flask import jsonify class Lead(Model): def __init__(self): super(Lead, self).__init__() def get_leads(self, name, early, late, page, sort, order): query = 'SELECT * FROM leads' data = {} prev = False if name != '': query += ' WHERE CONCAT(first_name, " ", last...
true
true
f70f2c2710810b2f835f58ec1ad1d0d901f82c75
3,566
py
Python
harmony/harmony_checker/views.py
ecxia/harmony-checker
78b198fa091bd8175a8ad8f233053b34654c3a09
[ "MIT" ]
null
null
null
harmony/harmony_checker/views.py
ecxia/harmony-checker
78b198fa091bd8175a8ad8f233053b34654c3a09
[ "MIT" ]
null
null
null
harmony/harmony_checker/views.py
ecxia/harmony-checker
78b198fa091bd8175a8ad8f233053b34654c3a09
[ "MIT" ]
null
null
null
from django.conf import settings from django.contrib.auth import get_user, views as auth_views from django.contrib.auth.decorators import login_required from django.core.files import File from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import render, get_object_or_404 from django.urls i...
34.288462
104
0.652271
from django.conf import settings from django.contrib.auth import get_user, views as auth_views from django.contrib.auth.decorators import login_required from django.core.files import File from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import render, get_object_or_404 from django.urls i...
true
true
f70f2cf6ecbeb0ea1040a6f84e5170d04a4bfaa5
736
py
Python
test/test_to_json.py
testinggg-art/Cyberbrain
e38c74c174e23aa386d005b03f09b30aa1b3a0ae
[ "MIT" ]
null
null
null
test/test_to_json.py
testinggg-art/Cyberbrain
e38c74c174e23aa386d005b03f09b30aa1b3a0ae
[ "MIT" ]
null
null
null
test/test_to_json.py
testinggg-art/Cyberbrain
e38c74c174e23aa386d005b03f09b30aa1b3a0ae
[ "MIT" ]
null
null
null
import re def test_repr(tracer, rpc_stub): class A: pass tracer.start() match = re.match("foo", "foobar") a = A() tracer.stop() from utils import return_GetFrame frame_proto = return_GetFrame(rpc_stub, "test_repr") binding_match_event = frame_proto.events[0] assert ( ...
24.533333
87
0.626359
import re def test_repr(tracer, rpc_stub): class A: pass tracer.start() match = re.match("foo", "foobar") a = A() tracer.stop() from utils import return_GetFrame frame_proto = return_GetFrame(rpc_stub, "test_repr") binding_match_event = frame_proto.events[0] assert ( ...
true
true
f70f2d49a80dc28577e28b248c5d806981f90827
50,619
py
Python
spectrochempy/core/dataset/nddataset.py
dcambie/spectrochempy
e376082d66be7a4c528b7d83be076d77534e39bd
[ "CECILL-B" ]
null
null
null
spectrochempy/core/dataset/nddataset.py
dcambie/spectrochempy
e376082d66be7a4c528b7d83be076d77534e39bd
[ "CECILL-B" ]
null
null
null
spectrochempy/core/dataset/nddataset.py
dcambie/spectrochempy
e376082d66be7a4c528b7d83be076d77534e39bd
[ "CECILL-B" ]
null
null
null
# -*- coding: utf-8 -*- # # ====================================================================================================================== # Copyright (©) 2015-2019 LCS # Laboratoire Catalyse et Spectrochimie, Caen, France. # CeCILL-B FREE SOFTWARE LICENSE AGREEMENT # See full LICENSE agreement in the root dir...
40.398244
120
0.481776
__all__ = ['NDDataset'] import textwrap import warnings import sys import numpy as np from traitlets import HasTraits, Instance, Bool, Float, validate, default, Dict, Union from traittypes import Array from spectrochempy.core.project.baseproject import AbstractProject from spectrochempy.core.dataset.ndarra...
true
true
f70f2e57c996f7c9bfa084739916de3701ff157b
4,564
py
Python
kensu/client/models/process_lineage.py
vidma/kensu-py
aae1e04373f03c988d55772fde6563de3ca9f375
[ "Apache-2.0" ]
16
2021-04-28T13:22:41.000Z
2022-03-02T10:45:19.000Z
kensu/client/models/process_lineage.py
vidma/kensu-py
aae1e04373f03c988d55772fde6563de3ca9f375
[ "Apache-2.0" ]
12
2021-05-17T08:06:42.000Z
2022-02-28T22:43:04.000Z
kensu/client/models/process_lineage.py
vidma/kensu-py
aae1e04373f03c988d55772fde6563de3ca9f375
[ "Apache-2.0" ]
5
2021-04-27T15:02:16.000Z
2021-10-15T16:07:21.000Z
# coding: utf-8 """ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: beta Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems class ProcessLineag...
25.355556
105
0.548861
from pprint import pformat from six import iteritems class ProcessLineage(object): swagger_types = { 'name': 'str', 'operation_logic': 'str', 'pk': 'ProcessLineagePK' } attribute_map = { 'name': 'name', 'operation_logic': 'operationLogic', 'pk': 'pk'...
true
true
f70f2eb5e2fcbf95fe6be450017498f13c7cccf9
14,369
py
Python
year_2018/day_15.py
gchazot/aoc
1926114b1060a927be3f87732ba0a399afd98ae4
[ "MIT" ]
1
2020-04-12T16:14:29.000Z
2020-04-12T16:14:29.000Z
year_2018/day_15.py
gchazot/aoc
1926114b1060a927be3f87732ba0a399afd98ae4
[ "MIT" ]
null
null
null
year_2018/day_15.py
gchazot/aoc
1926114b1060a927be3f87732ba0a399afd98ae4
[ "MIT" ]
null
null
null
import collections import itertools import math import unittest import aoc_utils.geometry from aoc_utils import char_map, data class TestCoordinatesUtils(unittest.TestCase): def test_solve_tie(self): self.assertEqual(None, solve_tie([])) self.assertEqual((12, 34), solve_tie([(12, 34)])) s...
33.184758
98
0.538799
import collections import itertools import math import unittest import aoc_utils.geometry from aoc_utils import char_map, data class TestCoordinatesUtils(unittest.TestCase): def test_solve_tie(self): self.assertEqual(None, solve_tie([])) self.assertEqual((12, 34), solve_tie([(12, 34)])) s...
true
true
f70f2f001c4560b8e119ed16ee80328954ef2789
1,133
py
Python
app/__init__.py
tailorv/pitchapp
892bae820f60f810a37059ec2513780781845fae
[ "Unlicense" ]
null
null
null
app/__init__.py
tailorv/pitchapp
892bae820f60f810a37059ec2513780781845fae
[ "Unlicense" ]
null
null
null
app/__init__.py
tailorv/pitchapp
892bae820f60f810a37059ec2513780781845fae
[ "Unlicense" ]
null
null
null
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_uploads import UploadSet, configure_uploads, IMAGES from flask_mail import Mail from flask_bootstrap import Bootstrap from config import config_options db = SQLAlchemy() login_manager = LoginManager() login_...
27.634146
72
0.767873
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_uploads import UploadSet, configure_uploads, IMAGES from flask_mail import Mail from flask_bootstrap import Bootstrap from config import config_options db = SQLAlchemy() login_manager = LoginManager() login_...
true
true
f70f2f9abb45df82814e56f9b8abfc7d851be613
3,740
py
Python
osf/models/__init__.py
gaybro8777/osf.io
30408511510a40bc393565817b343ef5fd76ab14
[ "Apache-2.0" ]
628
2015-01-15T04:33:22.000Z
2022-03-30T06:40:10.000Z
osf/models/__init__.py
gaybro8777/osf.io
30408511510a40bc393565817b343ef5fd76ab14
[ "Apache-2.0" ]
4,712
2015-01-02T01:41:53.000Z
2022-03-30T14:18:40.000Z
osf/models/__init__.py
gaybro8777/osf.io
30408511510a40bc393565817b343ef5fd76ab14
[ "Apache-2.0" ]
371
2015-01-12T16:14:08.000Z
2022-03-31T18:58:29.000Z
from osf.models.metaschema import RegistrationSchemaBlock, RegistrationSchema, FileMetadataSchema # noqa from osf.models.base import Guid, BlackListGuid # noqa from osf.models.user import OSFUser, Email # noqa from osf.models.contributor import Contributor, RecentlyAddedContributor, PreprintContributor, DraftRegistr...
64.482759
150
0.82861
from osf.models.metaschema import RegistrationSchemaBlock, RegistrationSchema, FileMetadataSchema from osf.models.base import Guid, BlackListGuid from osf.models.user import OSFUser, Email from osf.models.contributor import Contributor, RecentlyAddedContributor, PreprintContributor, DraftRegistrationContributor ...
true
true
f70f2faea328f7cea269e5d6f994b8b853dc0094
12,669
py
Python
cogs/twitter.py
tuna2134/rt-backend-1
71c48f56f21720b05a76dc0cdbdcb18a80d16afb
[ "BSD-4-Clause" ]
null
null
null
cogs/twitter.py
tuna2134/rt-backend-1
71c48f56f21720b05a76dc0cdbdcb18a80d16afb
[ "BSD-4-Clause" ]
null
null
null
cogs/twitter.py
tuna2134/rt-backend-1
71c48f56f21720b05a76dc0cdbdcb18a80d16afb
[ "BSD-4-Clause" ]
null
null
null
# RT - Twitter from typing import TYPE_CHECKING, Union, Dict, Tuple, List from discord.ext import commands import discord from tweepy.asynchronous import AsyncStream from tweepy import API, OAuthHandler from tweepy.errors import NotFound from tweepy.models import Status from jishaku.functools import executor_functi...
34.056452
155
0.535559
from typing import TYPE_CHECKING, Union, Dict, Tuple, List from discord.ext import commands import discord from tweepy.asynchronous import AsyncStream from tweepy import API, OAuthHandler from tweepy.errors import NotFound from tweepy.models import Status from jishaku.functools import executor_function from asynci...
true
true
f70f30b292a9125f52cf94cdfafc942140fe13d7
8,341
py
Python
test/test_all.py
egils-consulting/WikibaseIntegrator
461ef958f94e18c74122ee276e8e183d16a816e1
[ "MIT" ]
2
2020-07-11T23:29:35.000Z
2020-08-08T06:12:15.000Z
test/test_all.py
egils-consulting/WikibaseIntegrator
461ef958f94e18c74122ee276e8e183d16a816e1
[ "MIT" ]
3
2020-02-03T21:42:36.000Z
2020-08-09T00:05:09.000Z
test/test_all.py
Mystou/WikibaseIntegrator
33858e04ce242e9d2aa6ab458b48eaefb35fd1b1
[ "MIT" ]
null
null
null
import copy import pprint import unittest import requests from wikibaseintegrator import wbi_core, wbi_fastrun, wbi_functions, wbi_datatype from wikibaseintegrator.wbi_core import MWApiError __author__ = 'Sebastian Burgstaller-Muehlbacher' __license__ = 'AGPLv3' class TestMediawikiApiCall(unittest.TestCase): d...
39.530806
169
0.650042
import copy import pprint import unittest import requests from wikibaseintegrator import wbi_core, wbi_fastrun, wbi_functions, wbi_datatype from wikibaseintegrator.wbi_core import MWApiError __author__ = 'Sebastian Burgstaller-Muehlbacher' __license__ = 'AGPLv3' class TestMediawikiApiCall(unittest.TestCase): d...
true
true
f70f31d09bf0f21bb87ebb9f084519abac916626
19,238
py
Python
lib/global_utils.py
bicepjai/Deep-Survey-on-Text-Classification
d935f0d4fc09213644d0291a0d64873912b2e331
[ "MIT" ]
197
2017-10-29T14:35:50.000Z
2022-02-08T10:22:41.000Z
lib/global_utils.py
zhaohongbao/Deep-Survey-Text-Classification
d935f0d4fc09213644d0291a0d64873912b2e331
[ "MIT" ]
1
2018-09-14T16:46:06.000Z
2018-09-21T16:03:36.000Z
lib/global_utils.py
zhaohongbao/Deep-Survey-Text-Classification
d935f0d4fc09213644d0291a0d64873912b2e331
[ "MIT" ]
71
2018-01-25T10:59:12.000Z
2021-02-10T16:02:28.000Z
import sys import os import re import collections import itertools import bcolz import pickle import numpy as np import pandas as pd import gc import random import smart_open import h5py import csv import tensorflow as tf import gensim import datetime as dt from tqdm import tqdm_notebook as tqdm # import multiproce...
39.261224
198
0.596684
import sys import os import re import collections import itertools import bcolz import pickle import numpy as np import pandas as pd import gc import random import smart_open import h5py import csv import tensorflow as tf import gensim import datetime as dt from tqdm import tqdm_notebook as tqdm def _instanc...
true
true
f70f31e6aadbc7b104ba4e54290b9266aae9e56b
4,090
py
Python
YoutubeDownloader.py
rpant1728/Youtube-Downloader
6e64ecdf520c748dc5019cf07107d0622597971f
[ "MIT" ]
null
null
null
YoutubeDownloader.py
rpant1728/Youtube-Downloader
6e64ecdf520c748dc5019cf07107d0622597971f
[ "MIT" ]
null
null
null
YoutubeDownloader.py
rpant1728/Youtube-Downloader
6e64ecdf520c748dc5019cf07107d0622597971f
[ "MIT" ]
null
null
null
import sys, re, os, selenium, time, argparse from time import sleep from bs4 import BeautifulSoup from selenium import webdriver from selenium.webdriver.firefox.options import Options from selenium.webdriver.common.by import By from urllib.request import urlopen, urlretrieve class YoutubeDownloader(object): def __...
39.708738
142
0.582885
import sys, re, os, selenium, time, argparse from time import sleep from bs4 import BeautifulSoup from selenium import webdriver from selenium.webdriver.firefox.options import Options from selenium.webdriver.common.by import By from urllib.request import urlopen, urlretrieve class YoutubeDownloader(object): def __...
true
true
f70f32553a67b014ff81b6d4f591997937121e03
2,407
py
Python
rs/Database/mackinac/test/test_reconstruct.py
stevenirby/RetSynth
89cd62221959fd2dc2952c30de6ecbe2d511479a
[ "BSD-2-Clause" ]
3
2018-08-24T23:45:11.000Z
2021-09-08T19:57:22.000Z
rs/Database/mackinac/test/test_reconstruct.py
stevenirby/RetSynth
89cd62221959fd2dc2952c30de6ecbe2d511479a
[ "BSD-2-Clause" ]
1
2019-10-11T12:08:25.000Z
2019-10-14T16:36:14.000Z
rs/Database/mackinac/test/test_reconstruct.py
stevenirby/RetSynth
89cd62221959fd2dc2952c30de6ecbe2d511479a
[ "BSD-2-Clause" ]
2
2021-08-21T19:52:43.000Z
2021-09-25T12:39:03.000Z
import pytest from os.path import join import mackinac @pytest.mark.fixtures('download_data') class TestReconstruct: def test_reconstruct_features(self, universal_folder, bacteria_folder, b_theta_features, b_theta_summary, b_theta_id): template = mackinac.create_template...
41.5
103
0.630245
import pytest from os.path import join import mackinac @pytest.mark.fixtures('download_data') class TestReconstruct: def test_reconstruct_features(self, universal_folder, bacteria_folder, b_theta_features, b_theta_summary, b_theta_id): template = mackinac.create_template...
true
true
f70f32820aaba13f43601a29ab5f2eaee2d8740b
2,016
py
Python
tests/mock/spi_checks_lsbmode.py
nazeer22/mraa
0a12c5a0177f9fa8e7c4c564e70a65c4a0bb81af
[ "MIT" ]
3
2017-04-21T02:26:06.000Z
2017-12-27T01:37:35.000Z
tests/mock/spi_checks_lsbmode.py
nazeer22/mraa
0a12c5a0177f9fa8e7c4c564e70a65c4a0bb81af
[ "MIT" ]
1
2018-11-01T14:54:06.000Z
2018-11-01T14:54:06.000Z
tests/mock/spi_checks_lsbmode.py
nazeer22/mraa
0a12c5a0177f9fa8e7c4c564e70a65c4a0bb81af
[ "MIT" ]
3
2019-04-20T07:24:48.000Z
2020-11-05T00:27:43.000Z
#!/usr/bin/env python # Author: Alex Tereschenko <alext.mkrs@gmail.com> # Copyright (c) 2016 Alex Tereschenko. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, includin...
36
83
0.731151
import mraa as m import unittest as u from spi_checks_shared import * class SpiChecksLsbmode(u.TestCase): def setUp(self): self.spi = m.Spi(MRAA_SPI_BUS_NUM) def tearDown(self): del self.spi def test_spi_set_lsbmode_false(self): TEST_LSBMODE = False self.assertEqual(sel...
true
true
f70f333c177f5f6e3822f30ebcfacbfd14cf1385
115
py
Python
modules/2.79/bpy/types/ThemeSpaceListGeneric.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
modules/2.79/bpy/types/ThemeSpaceListGeneric.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
modules/2.79/bpy/types/ThemeSpaceListGeneric.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
class ThemeSpaceListGeneric: list = None list_text = None list_text_hi = None list_title = None
12.777778
28
0.669565
class ThemeSpaceListGeneric: list = None list_text = None list_text_hi = None list_title = None
true
true
f70f3389abfeefcf28c6e221bd594d807d6b386b
1,810
py
Python
mirage/core/loader.py
epablosensei/mirage
3c0d2fb0f0e570356e7126c999e83e0256920420
[ "MIT" ]
null
null
null
mirage/core/loader.py
epablosensei/mirage
3c0d2fb0f0e570356e7126c999e83e0256920420
[ "MIT" ]
null
null
null
mirage/core/loader.py
epablosensei/mirage
3c0d2fb0f0e570356e7126c999e83e0256920420
[ "MIT" ]
1
2020-06-08T15:50:31.000Z
2020-06-08T15:50:31.000Z
from mirage.libs import io class Loader: ''' This class permits to dynamically load the modules. ''' def __init__(self): ''' This constructor generates the modules list. ''' import mirage.modules as modules self.modulesList = {} for moduleName,module in modules.__modules__.items(): current = module#...
26.617647
102
0.691713
from mirage.libs import io class Loader: def __init__(self): import mirage.modules as modules self.modulesList = {} for moduleName,module in modules.__modules__.items(): current = module moduleClass = getattr(current,moduleName) self.modulesList[moduleName] = moduleClass def getModulesNames(self): ...
true
true
f70f33d05cc3dc8df24f43cf22b1baf7ccc96e5c
427
py
Python
terraform/modules/ecs/files/find_task_def.py
readevalprint/sift
3015a2f704816a687a7c0f1974b873d7cda43444
[ "Apache-2.0" ]
1
2020-02-04T04:28:09.000Z
2020-02-04T04:28:09.000Z
terraform/modules/ecs/files/find_task_def.py
readevalprint/sift
3015a2f704816a687a7c0f1974b873d7cda43444
[ "Apache-2.0" ]
3
2020-06-05T17:34:59.000Z
2021-06-10T22:45:45.000Z
terraform/modules/ecs/files/find_task_def.py
readevalprint/sift
3015a2f704816a687a7c0f1974b873d7cda43444
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import boto3 import json import sys client = boto3.client('ecs') data = json.load(sys.stdin) family_prefix = data['family_prefix'] task_def = client.list_task_definitions(familyPrefix=family_prefix, status="ACTIVE", sort="DESC", maxResults=1) task_arn =...
23.722222
83
0.676815
import boto3 import json import sys client = boto3.client('ecs') data = json.load(sys.stdin) family_prefix = data['family_prefix'] task_def = client.list_task_definitions(familyPrefix=family_prefix, status="ACTIVE", sort="DESC", maxResults=1) task_arn = task_def["taskDefini...
true
true
f70f34aa6054d5c7cfa28a06d14022ed6f21afe4
3,447
py
Python
src/loader/load_opportunity_dataset.py
Sensors-in-Paradise/OpportunityML
a123b4842de45f735d517be6bcd96ca35171db91
[ "MIT" ]
1
2022-03-25T16:00:36.000Z
2022-03-25T16:00:36.000Z
src/loader/load_opportunity_dataset.py
Sensors-in-Paradise/OpportunityML
a123b4842de45f735d517be6bcd96ca35171db91
[ "MIT" ]
1
2022-03-28T13:50:28.000Z
2022-03-28T13:50:28.000Z
src/loader/load_opportunity_dataset.py
Sensors-in-Paradise/OpportunityML
a123b4842de45f735d517be6bcd96ca35171db91
[ "MIT" ]
null
null
null
import itertools import os import numpy as np import pandas as pd from utils.Recording import Recording import utils.settings as settings def load_opportunity_dataset(opportunity_dataset_path: str) -> "list[Recording]": """ Returns a list of Recordings from the opportunity dataset """ print("Will re...
32.828571
160
0.596171
import itertools import os import numpy as np import pandas as pd from utils.Recording import Recording import utils.settings as settings def load_opportunity_dataset(opportunity_dataset_path: str) -> "list[Recording]": print("Will read the opportunity dataset") opportunity_dataset_path += "/dataset" su...
true
true
f70f36f9beef6000a030d08e92f17bdd06f49fa2
5,002
py
Python
sdk/python/pulumi_azure_nextgen/recoveryservices/v20190513/get_protected_item.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/recoveryservices/v20190513/get_protected_item.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/recoveryservices/v20190513/get_protected_item.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "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 from...
34.979021
151
0.638545
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs __all__ = [ 'GetProtectedItemResult', 'AwaitableGetProtectedItemResult', 'get_protected_item', ] @pulumi.output_type class GetProtect...
true
true
f70f378ef04c13ea6496cf8ff11091ce7230a8c8
262
py
Python
Part_2_intermediate/mod_2/lesson_7/ex_1_cls/main.py
Mikma03/InfoShareacademy_Python_Courses
3df1008c8c92831bebf1625f960f25b39d6987e6
[ "MIT" ]
null
null
null
Part_2_intermediate/mod_2/lesson_7/ex_1_cls/main.py
Mikma03/InfoShareacademy_Python_Courses
3df1008c8c92831bebf1625f960f25b39d6987e6
[ "MIT" ]
null
null
null
Part_2_intermediate/mod_2/lesson_7/ex_1_cls/main.py
Mikma03/InfoShareacademy_Python_Courses
3df1008c8c92831bebf1625f960f25b39d6987e6
[ "MIT" ]
null
null
null
from estudent.school import School def run_example(): school = School.create_school_with_students("Hogwart") print(school) print(f"W szkole może być maksymalnie {school.MAX_STUDENTS_NUMBER} uczniów") if __name__ == '__main__': run_example()
20.153846
80
0.736641
from estudent.school import School def run_example(): school = School.create_school_with_students("Hogwart") print(school) print(f"W szkole może być maksymalnie {school.MAX_STUDENTS_NUMBER} uczniów") if __name__ == '__main__': run_example()
true
true
f70f38918d4f1074b2011fa76e4171317554d533
3,855
py
Python
HD_BET/utils.py
evertdeman/HD-BET
817a50d2fe9b8663646cc74652cb50e26f343a3b
[ "Apache-2.0" ]
115
2019-01-31T15:58:13.000Z
2022-03-31T18:59:07.000Z
HD_BET/utils.py
evertdeman/HD-BET
817a50d2fe9b8663646cc74652cb50e26f343a3b
[ "Apache-2.0" ]
25
2019-02-05T16:12:28.000Z
2022-03-23T06:12:09.000Z
HD_BET/utils.py
evertdeman/HD-BET
817a50d2fe9b8663646cc74652cb50e26f343a3b
[ "Apache-2.0" ]
40
2019-01-31T16:08:25.000Z
2022-03-25T06:45:06.000Z
from urllib.request import urlopen import torch from torch import nn import numpy as np from skimage.morphology import label import os from HD_BET.paths import folder_with_parameter_files def get_params_fname(fold): return os.path.join(folder_with_parameter_files, "%d.model" % fold) def maybe_download_parameter...
33.521739
114
0.659144
from urllib.request import urlopen import torch from torch import nn import numpy as np from skimage.morphology import label import os from HD_BET.paths import folder_with_parameter_files def get_params_fname(fold): return os.path.join(folder_with_parameter_files, "%d.model" % fold) def maybe_download_parameter...
true
true
f70f3a764a276710af7c757c3c63f045ee99d167
5,677
py
Python
automationassets/automationassets.py
ben-garside/python_emulated_assets
9df700db8f29579e9135a6107b3a7b490c4a68ce
[ "MIT" ]
9
2018-02-05T18:44:34.000Z
2021-08-25T12:20:05.000Z
automationassets/automationassets.py
ben-garside/python_emulated_assets
9df700db8f29579e9135a6107b3a7b490c4a68ce
[ "MIT" ]
2
2018-02-12T23:45:19.000Z
2018-09-25T19:48:23.000Z
automationassets/automationassets.py
ben-garside/python_emulated_assets
9df700db8f29579e9135a6107b3a7b490c4a68ce
[ "MIT" ]
13
2018-02-08T22:55:17.000Z
2022-03-14T21:36:10.000Z
""" Azure Automation assets module to be used with Azure Automation during offline development """ #!/usr/bin/env python2 # ---------------------------------------------------------------------------------- # # MIT License # Permission is hereby granted, free of charge, to any person obtaining a copy # of this softwar...
38.358108
98
0.692443
_KEY_NAME = "Name" _KEY_VALUE = "Value" _KEY_USERNAME = "Username" _KEY_PASSWORD = "Password" _KEY_CERTPATH = "CertPath" _KEY_CONNECTION_FIELDS = "ValueFields" _KEY_VARIABLE = "Variable" _KEY_CERTIFICATE = "Certificate" _KEY_CREDENTIAL = "Credential" _KEY_CONNECTION = "Connection" def _get_...
true
true
f70f3b45752881894252cff7a788451d568e330f
889
py
Python
backoffice/transactions/migrations/0008_auto_20210323_1912.py
AlejandroUPC/pythonmicroservices
9d42bd6dfd9847ad4a8e6029e808de927292c251
[ "MIT" ]
null
null
null
backoffice/transactions/migrations/0008_auto_20210323_1912.py
AlejandroUPC/pythonmicroservices
9d42bd6dfd9847ad4a8e6029e808de927292c251
[ "MIT" ]
null
null
null
backoffice/transactions/migrations/0008_auto_20210323_1912.py
AlejandroUPC/pythonmicroservices
9d42bd6dfd9847ad4a8e6029e808de927292c251
[ "MIT" ]
null
null
null
# Generated by Django 3.1.7 on 2021-03-23 19:12 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('transactions', '0007_auto_20210323_1910'), ] operations = [ migrations.AlterField( model_name='customer', name='cust...
30.655172
103
0.629921
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('transactions', '0007_auto_20210323_1910'), ] operations = [ migrations.AlterField( model_name='customer', name='customer_id', field=models.BigIntegerFi...
true
true
f70f3ba8a6408ce64c89b41a346b915bd784f0d9
1,759
py
Python
lists/gaz50k/map.py
openregister/local-authority-data
68f499152ba799feae602e67c6e30ae0914f2230
[ "MIT" ]
8
2016-07-05T14:46:48.000Z
2018-11-07T17:31:33.000Z
lists/gaz50k/map.py
psd/local-authority-data
68f499152ba799feae602e67c6e30ae0914f2230
[ "MIT" ]
10
2016-10-04T15:58:14.000Z
2018-04-30T11:39:00.000Z
lists/gaz50k/map.py
psd/local-authority-data
68f499152ba799feae602e67c6e30ae0914f2230
[ "MIT" ]
5
2016-06-03T13:02:21.000Z
2021-04-11T08:27:38.000Z
#!/usr/bin/env python3 import sys import csv """ Field Name Full name Format Example 1 SEQ Sequence number Int (6) 86415 2 KM_REF Kilometre reference Char (6) ST5265 3 DEF_NAM Definitive name Char (60) Felton 4 ...
39.977273
73
0.489483
import sys import csv county = {} for row in csv.reader(sys.stdin, delimiter=':', quoting=csv.QUOTE_NONE): county[row[11]] = { 'gaz50k': row[11], 'county': row[12], 'name': row[13], } fields = [ 'gaz50k', 'county', 'name' ] print("\t".join(fields)) for code in county: print("\...
true
true
f70f3bf39f608a55e8c1b01d43760cd70a34aa3d
3,014
py
Python
setup.py
Legogris/electrum-zcl
fcffa73f944c1ee8f89b0a40f3dabc5c5bbfd4ec
[ "MIT" ]
null
null
null
setup.py
Legogris/electrum-zcl
fcffa73f944c1ee8f89b0a40f3dabc5c5bbfd4ec
[ "MIT" ]
null
null
null
setup.py
Legogris/electrum-zcl
fcffa73f944c1ee8f89b0a40f3dabc5c5bbfd4ec
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # python setup.py sdist --format=zip,gztar from setuptools import setup import os import sys import platform import imp import argparse version = imp.load_source('version', 'lib/version.py') def readhere(path): here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(...
30.14
80
0.626742
from setuptools import setup import os import sys import platform import imp import argparse version = imp.load_source('version', 'lib/version.py') def readhere(path): here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, path), 'r') as fd: return fd.read() def readreqs...
true
true
f70f3ec667d100f339d203021a68fd599082e6c4
4,607
py
Python
Neural_Network_Tensorflow.py
mdhasan8/Machine-Learning-in-Python
d66607d3003e8279e35cf176851f506aa833a9fe
[ "MIT" ]
null
null
null
Neural_Network_Tensorflow.py
mdhasan8/Machine-Learning-in-Python
d66607d3003e8279e35cf176851f506aa833a9fe
[ "MIT" ]
null
null
null
Neural_Network_Tensorflow.py
mdhasan8/Machine-Learning-in-Python
d66607d3003e8279e35cf176851f506aa833a9fe
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sat Dec 16 22:30:11 2020 @author: Easin """ from __future__ import absolute_import, division, print_function import tensorflow as tf from tensorflow.keras import Model, layers import numpy as np import matplotlib.pyplot as plt # MNIST dataset parameters. num_class...
33.875
90
0.676362
from __future__ import absolute_import, division, print_function import tensorflow as tf from tensorflow.keras import Model, layers import numpy as np import matplotlib.pyplot as plt num_classes = 10 num_features = 784 learning_rate = 0.1 training_steps = 2000 batch_size = 256 display_step = 100 ...
true
true
f70f3ec9882d3b23e9f039de32639f2defccb7a5
18,141
py
Python
python/ELASTICSEARCH_IN_VPC_ONLY/ELASTICSEARCH_IN_VPC_ONLY.py
docebo/aws-config-rules
75f92bcad644bd71f19bbc15cf99e6d6de6b8227
[ "CC0-1.0" ]
1,295
2016-03-01T23:06:33.000Z
2022-03-31T07:17:53.000Z
python/ELASTICSEARCH_IN_VPC_ONLY/ELASTICSEARCH_IN_VPC_ONLY.py
tied/aws-config-rules
7c66e109c1225111d2ab8d1811d6e80dea0affcb
[ "CC0-1.0" ]
287
2016-03-01T19:51:43.000Z
2022-01-06T04:59:55.000Z
python/ELASTICSEARCH_IN_VPC_ONLY/ELASTICSEARCH_IN_VPC_ONLY.py
tied/aws-config-rules
7c66e109c1225111d2ab8d1811d6e80dea0affcb
[ "CC0-1.0" ]
744
2016-03-01T18:33:00.000Z
2022-03-31T18:46:44.000Z
# Copyright 2017-2019 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fi...
43.295943
178
0.72179
import json import sys import time import datetime import boto3 import botocore try: import liblogging except ImportError: pass pend(es_domain['DomainName']) while es_domains_names_only: time.sleep(PAUSE_TO_AVOID_THROTTLE_SECONDS) domain_details = es_client.describe_elasticsear...
true
true
f70f3ed795d311d796b3c5c3ebf880041a890b8c
3,232
py
Python
fuse_examples/tests/test_classification_knight.py
alexgo1/fuse-med-ml
928375828ff321d2bf7b2084389e34e1db0682e9
[ "Apache-2.0" ]
null
null
null
fuse_examples/tests/test_classification_knight.py
alexgo1/fuse-med-ml
928375828ff321d2bf7b2084389e34e1db0682e9
[ "Apache-2.0" ]
null
null
null
fuse_examples/tests/test_classification_knight.py
alexgo1/fuse-med-ml
928375828ff321d2bf7b2084389e34e1db0682e9
[ "Apache-2.0" ]
null
null
null
""" (C) Copyright 2021 IBM Corp. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software d...
43.675676
173
0.740718
import pathlib import shutil import tempfile import unittest import os from fuse.utils.file_io.file_io import create_dir import wget from fuse_examples.classification.knight.eval.eval import eval from fuse_examples.classification.knight.make_targets_file import make_targets_file import fuse_examples.classification.kn...
true
true
f70f40aab05c3c3b88ea6a9589c157f02f828ff7
5,922
py
Python
libs/DatabaseConnection.py
hackerthinktank/RootTheBox
59d1ee0088b95214702efc47be437b6e770b50a2
[ "Apache-2.0" ]
2
2021-05-18T12:20:27.000Z
2021-05-18T13:33:58.000Z
libs/DatabaseConnection.py
hackerthinktank/RootTheBox
59d1ee0088b95214702efc47be437b6e770b50a2
[ "Apache-2.0" ]
null
null
null
libs/DatabaseConnection.py
hackerthinktank/RootTheBox
59d1ee0088b95214702efc47be437b6e770b50a2
[ "Apache-2.0" ]
1
2021-05-18T12:20:29.000Z
2021-05-18T12:20:29.000Z
# -*- coding: utf-8 -*- """ Created on Sep 20, 2012 @author: moloch Copyright 2012 Root the Box 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/licen...
33.083799
144
0.599797
import os import logging import sys import getpass import codecs from builtins import object from libs.ConsoleColors import * try: from urllib.parse import quote, quote_plus except ImportError: from urllib import quote, quote_plus from sqlalchemy import create_engine from tornado.options import options ...
true
true
f70f41653ba4836a1f0e9437fabd0b3d59b9213c
2,625
py
Python
schedules/tests/test_forms.py
mennonitengemeinde/church_site
ae9ef5f0f78811cecd734705339511dc0efb8340
[ "MIT" ]
null
null
null
schedules/tests/test_forms.py
mennonitengemeinde/church_site
ae9ef5f0f78811cecd734705339511dc0efb8340
[ "MIT" ]
44
2020-05-13T20:15:26.000Z
2022-03-04T02:58:58.000Z
schedules/tests/test_forms.py
mennonitengemeinde/church_site
ae9ef5f0f78811cecd734705339511dc0efb8340
[ "MIT" ]
4
2020-06-05T17:59:52.000Z
2021-02-06T19:09:43.000Z
from datetime import timedelta from django.contrib.auth import get_user_model from django.utils import timezone from churches.models import Church from schedules.forms import EventForm, AttendantAdminForm, AttendantForm from schedules.models import Event, Attendant from schedules.tests._setup import EventSetupTestCas...
39.179104
101
0.664381
from datetime import timedelta from django.contrib.auth import get_user_model from django.utils import timezone from churches.models import Church from schedules.forms import EventForm, AttendantAdminForm, AttendantForm from schedules.models import Event, Attendant from schedules.tests._setup import EventSetupTestCas...
true
true
f70f422ca39290a91d8641eadeef0839ff5a9c19
3,128
py
Python
aizynthfinder/mcts/config.py
robertburbidgedata/aizynthfinder
c05be3ce2eb3773dbdd2c52345f49543ca5b5b1e
[ "MIT" ]
null
null
null
aizynthfinder/mcts/config.py
robertburbidgedata/aizynthfinder
c05be3ce2eb3773dbdd2c52345f49543ca5b5b1e
[ "MIT" ]
null
null
null
aizynthfinder/mcts/config.py
robertburbidgedata/aizynthfinder
c05be3ce2eb3773dbdd2c52345f49543ca5b5b1e
[ "MIT" ]
null
null
null
""" Module containing a class for encapsulating the settings of the tree search """ import os import yaml from aizynthfinder.utils.logging import logger from aizynthfinder.utils.paths import data_path from aizynthfinder.mcts.policy import Policy from aizynthfinder.mcts.stock import Stock, MongoDbInchiKeyQuery class...
35.545455
83
0.656969
import os import yaml from aizynthfinder.utils.logging import logger from aizynthfinder.utils.paths import data_path from aizynthfinder.mcts.policy import Policy from aizynthfinder.mcts.stock import Stock, MongoDbInchiKeyQuery class Configuration: def __init__(self): self._properties = {} filen...
true
true
f70f42676fb42ff2e24a3774a95fa3284dddc61f
9,770
py
Python
hata/ext/command_utils/bases.py
Multiface24111/hata
cd28f9ef158e347363669cc8d1d49db0ff41aba0
[ "0BSD" ]
173
2019-06-14T20:25:00.000Z
2022-03-21T19:36:10.000Z
hata/ext/command_utils/bases.py
Tari-dev/hata
a5c3199c845858f997af3b0b2c18770fdc691897
[ "0BSD" ]
52
2020-01-03T17:05:14.000Z
2022-03-31T11:39:50.000Z
hata/ext/command_utils/bases.py
Tari-dev/hata
a5c3199c845858f997af3b0b2c18770fdc691897
[ "0BSD" ]
47
2019-11-09T08:46:45.000Z
2022-03-31T14:33:34.000Z
__all__ = ('GUI_STATE_CANCELLED', 'GUI_STATE_CANCELLING', 'GUI_STATE_READY', 'GUI_STATE_SWITCHING_CTX', 'GUI_STATE_SWITCHING_PAGE', 'PaginationBase') from ...backend.futures import Task, CancelledError from ...discord.core import KOKORO from ...discord.exceptions import DiscordException, ERROR_CODES GUI_STATE_REA...
37.148289
117
0.487513
__all__ = ('GUI_STATE_CANCELLED', 'GUI_STATE_CANCELLING', 'GUI_STATE_READY', 'GUI_STATE_SWITCHING_CTX', 'GUI_STATE_SWITCHING_PAGE', 'PaginationBase') from ...backend.futures import Task, CancelledError from ...discord.core import KOKORO from ...discord.exceptions import DiscordException, ERROR_CODES GUI_STATE_REA...
true
true
f70f42c642bcd5f1c7503962ab9976885292a0cd
277
py
Python
tests/test_0242.py
delirious-lettuce/LeetCode
4fbf2627f86cbaf1054c3df59bb9ffe72096d405
[ "MIT" ]
3
2018-02-14T23:50:07.000Z
2022-01-20T11:34:42.000Z
tests/test_0242.py
delirious-lettuce/LeetCode
4fbf2627f86cbaf1054c3df59bb9ffe72096d405
[ "MIT" ]
null
null
null
tests/test_0242.py
delirious-lettuce/LeetCode
4fbf2627f86cbaf1054c3df59bb9ffe72096d405
[ "MIT" ]
null
null
null
import pytest from problems.problem_0242 import Solution @pytest.mark.parametrize('test_input, expected', ( (('anagram', 'nagaram'), True), (('rat', 'car'), False), )) def test_is_anagram(test_input, expected): assert Solution.isAnagram(*test_input) == expected
23.083333
54
0.703971
import pytest from problems.problem_0242 import Solution @pytest.mark.parametrize('test_input, expected', ( (('anagram', 'nagaram'), True), (('rat', 'car'), False), )) def test_is_anagram(test_input, expected): assert Solution.isAnagram(*test_input) == expected
true
true
f70f42d0b880c0ab80731f4f8d628378224e54c4
7,587
py
Python
oneflow/python/test/ops/test_binary_elementwise_ops.py
wanghongsheng01/framework_enflame
debf613e05e3f5ea8084c3e79b60d0dd9e349526
[ "Apache-2.0" ]
1
2021-04-14T03:19:35.000Z
2021-04-14T03:19:35.000Z
oneflow/python/test/ops/test_binary_elementwise_ops.py
wanghongsheng01/framework_enflame
debf613e05e3f5ea8084c3e79b60d0dd9e349526
[ "Apache-2.0" ]
1
2021-06-16T08:37:50.000Z
2021-06-16T08:37:50.000Z
oneflow/python/test/ops/test_binary_elementwise_ops.py
wanghongsheng01/framework_enflame
debf613e05e3f5ea8084c3e79b60d0dd9e349526
[ "Apache-2.0" ]
null
null
null
""" Copyright 2020 The OneFlow 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 law or agr...
32.012658
84
0.596283
import unittest import os import numpy as np import tensorflow as tf import oneflow as flow from collections import OrderedDict import oneflow.typing as oft import test_global_storage from test_util import ( GenArgDict, GenArgList, type_name_to_flow_type, type_name_to_np_type, ) gpus = tf.config.exper...
true
true
f70f42d336559c1f4e453214becd60439e47c812
1,534
py
Python
samples/generated_samples/dialogflow_generated_dialogflowcx_v3_deployments_list_deployments_async.py
nicain/python-dialogflow-cx
2292ff540aea24c3c831a5ffe1604c2c022ccb82
[ "Apache-2.0" ]
null
null
null
samples/generated_samples/dialogflow_generated_dialogflowcx_v3_deployments_list_deployments_async.py
nicain/python-dialogflow-cx
2292ff540aea24c3c831a5ffe1604c2c022ccb82
[ "Apache-2.0" ]
null
null
null
samples/generated_samples/dialogflow_generated_dialogflowcx_v3_deployments_list_deployments_async.py
nicain/python-dialogflow-cx
2292ff540aea24c3c831a5ffe1604c2c022ccb82
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
34.088889
85
0.769231
from google.cloud import dialogflowcx_v3 async def sample_list_deployments(): client = dialogflowcx_v3.DeploymentsAsyncClient() request = dialogflowcx_v3.ListDeploymentsRequest( parent="parent_value", ) page_result = client.list_deployments(request=re...
true
true
f70f44300f3740ebdbf6b9adc5ad84b625f4771e
9,080
py
Python
core/domain/rte_component_registry_test.py
Panda2498/oppia
fccfd7e89c6904c244deaccdee80cc5658f2520a
[ "Apache-2.0" ]
1
2021-12-09T10:37:09.000Z
2021-12-09T10:37:09.000Z
core/domain/rte_component_registry_test.py
Panda2498/oppia
fccfd7e89c6904c244deaccdee80cc5658f2520a
[ "Apache-2.0" ]
1
2020-01-26T14:02:43.000Z
2020-01-26T14:02:43.000Z
core/domain/rte_component_registry_test.py
ryanboris/oppia
bc39e54e00d53ea2f00bca906fe02162d0c422ac
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
44.07767
95
0.651432
import os import re import string import struct from core.domain import obj_services from core.domain import rte_component_registry from core.tests import test_utils import feconf import schema_utils import schema_utils_test import utils IGNORED_FILE_SUFFIXES = ['.pyc', '.DS_Store'] RTE_THUMBNAIL_HE...
true
true
f70f444915b3432c8906c8cf40a5ebbacc9d4f46
15,039
py
Python
wo/cli/plugins/info.py
cdk-comp/WordOps
d1f0ccc7202d43c90ee7640f7acd4b7c3c158ee1
[ "MIT" ]
null
null
null
wo/cli/plugins/info.py
cdk-comp/WordOps
d1f0ccc7202d43c90ee7640f7acd4b7c3c158ee1
[ "MIT" ]
null
null
null
wo/cli/plugins/info.py
cdk-comp/WordOps
d1f0ccc7202d43c90ee7640f7acd4b7c3c158ee1
[ "MIT" ]
2
2021-01-02T07:49:51.000Z
2022-03-26T15:58:50.000Z
"""WOInfo Plugin for WordOps""" from cement.core.controller import CementBaseController, expose from cement.core import handler, hook from wo.core.variables import WOVariables from pynginxconfig import NginxConfig from wo.core.aptget import WOAptGet from wo.core.shellexec import WOShellExec from wo.core.logging import...
51.858621
252
0.583416
from cement.core.controller import CementBaseController, expose from cement.core import handler, hook from wo.core.variables import WOVariables from pynginxconfig import NginxConfig from wo.core.aptget import WOAptGet from wo.core.shellexec import WOShellExec from wo.core.logging import Log import os import configpars...
true
true
f70f445b5ea4447aaf2b1b379dd71f3f6cb58149
1,874
py
Python
setup.py
aalcock/ledtheatre
6de1193c13b930f8650280d9153713055a1eef7e
[ "MIT" ]
2
2018-01-29T19:56:02.000Z
2018-02-05T16:29:03.000Z
setup.py
aalcock/ledtheatre
6de1193c13b930f8650280d9153713055a1eef7e
[ "MIT" ]
null
null
null
setup.py
aalcock/ledtheatre
6de1193c13b930f8650280d9153713055a1eef7e
[ "MIT" ]
null
null
null
# ledtheatre is Licensed under the MIT License # Copyright 2017 Andrew Alcock # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # ...
39.87234
80
0.704376
from setuptools import setup def readme(): with open('README.rst') as f: return f.read() setup(name='ledtheatre', version='0.1.3', description='Control LED lights on the Adafruit PCA9685 PWM card', long_description=readme(), classifiers=[ 'Development...
true
true
f70f45557504faf15ed7f0658f2ee3c35b2a0eb7
63
py
Python
built-in/TensorFlow/Research/cv/image_classification/Cars_for_TensorFlow/automl/vega/search_space/networks/pytorch/roi_extractors/__init__.py
Huawei-Ascend/modelzoo
df51ed9c1d6dbde1deef63f2a037a369f8554406
[ "Apache-2.0" ]
12
2020-12-13T08:34:24.000Z
2022-03-20T15:17:17.000Z
built-in/TensorFlow/Research/cv/image_classification/Cars_for_TensorFlow/automl/vega/search_space/networks/pytorch/roi_extractors/__init__.py
Huawei-Ascend/modelzoo
df51ed9c1d6dbde1deef63f2a037a369f8554406
[ "Apache-2.0" ]
3
2021-03-31T20:15:40.000Z
2022-02-09T23:50:46.000Z
built-in/TensorFlow/Research/cv/image_classification/Darts_for_TensorFlow/automl/vega/search_space/networks/pytorch/roi_extractors/__init__.py
Huawei-Ascend/modelzoo
df51ed9c1d6dbde1deef63f2a037a369f8554406
[ "Apache-2.0" ]
2
2021-07-10T12:40:46.000Z
2021-12-17T07:55:15.000Z
from .single_level import * from .multi_roi_extractor import *
21
34
0.809524
from .single_level import * from .multi_roi_extractor import *
true
true
f70f457996a102881d83cdcf904a912167be83c4
207
py
Python
transmission_bot/cfg.py
brunojhovany/Telegram-bot-torrent
8de3b212648b23ef038dbf3b7434d1148a392783
[ "MIT" ]
null
null
null
transmission_bot/cfg.py
brunojhovany/Telegram-bot-torrent
8de3b212648b23ef038dbf3b7434d1148a392783
[ "MIT" ]
null
null
null
transmission_bot/cfg.py
brunojhovany/Telegram-bot-torrent
8de3b212648b23ef038dbf3b7434d1148a392783
[ "MIT" ]
null
null
null
from decouple import config ADDRESS = config("ADDRESS") PORT = config("PORT") TS_USER = config("TS_USER") PASSWORD = config("PASSWORD") TOKEN = config("TOKEN") PERSISTENCE_FILE = config("PERSISTENCE_FILE")
23
45
0.743961
from decouple import config ADDRESS = config("ADDRESS") PORT = config("PORT") TS_USER = config("TS_USER") PASSWORD = config("PASSWORD") TOKEN = config("TOKEN") PERSISTENCE_FILE = config("PERSISTENCE_FILE")
true
true
f70f47e5875cffd5c637602aaf3a405f860c3495
2,297
py
Python
python/testData/refactoring/pullup/presenter/file.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/refactoring/pullup/presenter/file.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/refactoring/pullup/presenter/file.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
from datetime import datetime from datetime import date class MainParent(object): pass class SubParent1(MainParent): def foo(self): pass pass class SubParent2(MainParent): pass class Child(SubParent1, SubParent2): def spam(self): pass pass class NoParentsAllowed(datetime, ob...
21.669811
127
0.657815
from datetime import datetime from datetime import date class MainParent(object): pass class SubParent1(MainParent): def foo(self): pass pass class SubParent2(MainParent): pass class Child(SubParent1, SubParent2): def spam(self): pass pass class NoParentsAllowed(datetime, ob...
false
true
f70f48c501100e45d4611665ec2ffdc842a3c49f
1,704
py
Python
nnvm/tvm/topi/tests/python/test_topi_relu.py
rah9eu/p3
530628be7b7a8dd3e6199c3bebebdbf104005e5f
[ "Apache-2.0" ]
22
2019-02-20T12:42:20.000Z
2021-12-25T06:09:46.000Z
nnvm/tvm/topi/tests/python/test_topi_relu.py
rah9eu/p3
530628be7b7a8dd3e6199c3bebebdbf104005e5f
[ "Apache-2.0" ]
4
2019-04-01T07:36:04.000Z
2022-03-24T03:11:26.000Z
nnvm/tvm/topi/tests/python/test_topi_relu.py
rah9eu/p3
530628be7b7a8dd3e6199c3bebebdbf104005e5f
[ "Apache-2.0" ]
7
2019-03-20T16:04:37.000Z
2021-04-28T18:40:11.000Z
"""Test code for relu activation""" import os import numpy as np import tvm import topi from topi.util import get_const_tuple def verify_relu(m, n): A = tvm.placeholder((m, n), name='A') B = topi.nn.relu(A) a_np = np.random.uniform(size=get_const_tuple(A.shape)).astype(A.dtype) b_np = a_np * (a_np > 0...
29.37931
80
0.616784
import os import numpy as np import tvm import topi from topi.util import get_const_tuple def verify_relu(m, n): A = tvm.placeholder((m, n), name='A') B = topi.nn.relu(A) a_np = np.random.uniform(size=get_const_tuple(A.shape)).astype(A.dtype) b_np = a_np * (a_np > 0) def check_device(device): ...
true
true
f70f495f7639c90049b126928377ce133e1f4381
1,578
py
Python
inst/python/rpytools/test.py
bjungbogati/reticulate
e650515a8418ce7732bf89132b0c7a3dc29a7383
[ "Apache-2.0" ]
1
2018-10-21T18:41:05.000Z
2018-10-21T18:41:05.000Z
inst/python/rpytools/test.py
bjungbogati/reticulate
e650515a8418ce7732bf89132b0c7a3dc29a7383
[ "Apache-2.0" ]
35
2019-08-20T16:59:55.000Z
2022-02-12T19:22:46.000Z
inst/python/rpytools/test.py
bjungbogati/reticulate
e650515a8418ce7732bf89132b0c7a3dc29a7383
[ "Apache-2.0" ]
1
2020-02-14T02:54:52.000Z
2020-02-14T02:54:52.000Z
import threading import sys is_py2 = sys.version[0] == '2' if is_py2: import Queue as queue else: import queue as queue def isScalar(x): return not isinstance(x, (list, tuple)) def isList(x): return isinstance(x, (list)) def asString(x): return str(x) def makeDict(): return {'a': 1.0, 'c': 3.0, 'b': ...
16.268041
56
0.647655
import threading import sys is_py2 = sys.version[0] == '2' if is_py2: import Queue as queue else: import queue as queue def isScalar(x): return not isinstance(x, (list, tuple)) def isList(x): return isinstance(x, (list)) def asString(x): return str(x) def makeDict(): return {'a': 1.0, 'c': 3.0, 'b': ...
true
true
f70f499b3938d65a8dec688ff8e18592b5f6b4c1
32,683
py
Python
python/ray/data/dataset_pipeline.py
mgelbart/ray
4cec2286572e368a4bd64aae467751a384eff62d
[ "Apache-2.0" ]
22
2018-05-08T05:52:34.000Z
2020-04-01T10:09:55.000Z
python/ray/data/dataset_pipeline.py
mgelbart/ray
4cec2286572e368a4bd64aae467751a384eff62d
[ "Apache-2.0" ]
51
2018-05-17T05:55:28.000Z
2020-03-18T06:49:49.000Z
python/ray/data/dataset_pipeline.py
mgelbart/ray
4cec2286572e368a4bd64aae467751a384eff62d
[ "Apache-2.0" ]
10
2018-04-27T10:50:59.000Z
2020-02-24T02:41:43.000Z
import inspect import itertools import logging import time from typing import ( Any, Callable, List, Iterator, Iterable, Generic, Union, Optional, TYPE_CHECKING, ) import ray from ray.data.context import DatasetContext from ray.data.dataset import Dataset, T, U from ray.data.impl.pi...
37.055556
88
0.572775
import inspect import itertools import logging import time from typing import ( Any, Callable, List, Iterator, Iterable, Generic, Union, Optional, TYPE_CHECKING, ) import ray from ray.data.context import DatasetContext from ray.data.dataset import Dataset, T, U from ray.data.impl.pi...
true
true
f70f4a4cadff4f4dbb2f9dedfaac54e51efae86e
2,329
py
Python
alipay/aop/api/domain/AlipayEcoMycarMaintainServiceproductUpdateModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/AlipayEcoMycarMaintainServiceproductUpdateModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/AlipayEcoMycarMaintainServiceproductUpdateModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.MaitainShopProduct import MaitainShopProduct class AlipayEcoMycarMaintainServiceproductUpdateModel(object): def __init__(self): self._operation_type = N...
31.053333
79
0.640618
import simplejson as json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.MaitainShopProduct import MaitainShopProduct class AlipayEcoMycarMaintainServiceproductUpdateModel(object): def __init__(self): self._operation_type = None self._out_product_id = None ...
true
true
f70f4a707f33e1e9b61bd480f17e84e9551a9632
6,795
py
Python
lazy/io/pathz/_flavours.py
trisongz/lazycls
701bad1a358ed3bb136347d0c5eb81de3201f6a3
[ "MIT" ]
2
2021-12-02T00:13:16.000Z
2022-02-26T11:18:33.000Z
lazy/io/pathz/_flavours.py
trisongz/lazycls
701bad1a358ed3bb136347d0c5eb81de3201f6a3
[ "MIT" ]
null
null
null
lazy/io/pathz/_flavours.py
trisongz/lazycls
701bad1a358ed3bb136347d0c5eb81de3201f6a3
[ "MIT" ]
null
null
null
from __future__ import annotations from pathlib import _PosixFlavour, _WindowsFlavour from typing import Optional, Callable, Awaitable, Dict, List, TYPE_CHECKING from errno import EINVAL import os import sys from aiopath.wrap import func_to_async_func as wrap_async try: from pathlib import _getfinalpathname _a...
37.75
96
0.569536
from __future__ import annotations from pathlib import _PosixFlavour, _WindowsFlavour from typing import Optional, Callable, Awaitable, Dict, List, TYPE_CHECKING from errno import EINVAL import os import sys from aiopath.wrap import func_to_async_func as wrap_async try: from pathlib import _getfinalpathname _a...
true
true
f70f4a9ec79445bf614842937d279938a47f9b30
2,796
py
Python
pocovidnet/scripts/eval_vid_classifier.py
983632847/covid19_pocus_ultrasound
3625e95bbf189926dbd12966ef59ee71ed10e453
[ "MIT" ]
1
2020-11-24T07:40:40.000Z
2020-11-24T07:40:40.000Z
pocovidnet/scripts/eval_vid_classifier.py
983632847/covid19_pocus_ultrasound
3625e95bbf189926dbd12966ef59ee71ed10e453
[ "MIT" ]
null
null
null
pocovidnet/scripts/eval_vid_classifier.py
983632847/covid19_pocus_ultrasound
3625e95bbf189926dbd12966ef59ee71ed10e453
[ "MIT" ]
null
null
null
import argparse import json import os import pickle import numpy as np from pocovidnet.evaluate_genesis import GenesisEvaluator from pocovidnet.evaluate_video import VideoEvaluator from tensorflow.keras import backend as K from pocovidnet.videoto3d import Videoto3D def main(): parser = argparse.ArgumentParser(des...
34.518519
77
0.594063
import argparse import json import os import pickle import numpy as np from pocovidnet.evaluate_genesis import GenesisEvaluator from pocovidnet.evaluate_video import VideoEvaluator from tensorflow.keras import backend as K from pocovidnet.videoto3d import Videoto3D def main(): parser = argparse.ArgumentParser(des...
true
true
f70f4aaaa09628c56d20528c22d3cd194f64d284
542
py
Python
atlas/skills/serializers.py
Kayra/atlas
63db74fd66c8f8a874c5352248ea7b6fc4dc0c6f
[ "BSD-3-Clause" ]
1
2015-12-16T06:20:14.000Z
2015-12-16T06:20:14.000Z
atlas/skills/serializers.py
Kayra/atlas
63db74fd66c8f8a874c5352248ea7b6fc4dc0c6f
[ "BSD-3-Clause" ]
null
null
null
atlas/skills/serializers.py
Kayra/atlas
63db74fd66c8f8a874c5352248ea7b6fc4dc0c6f
[ "BSD-3-Clause" ]
null
null
null
from rest_framework import serializers from .models import Skill, Task, Days class SkillSerializer(serializers.ModelSerializer): class Meta: model = Skill fields = ('name', 'user') class TaskSerializer(serializers.ModelSerializer): class Meta: model = Task fields = ('name', ...
24.636364
103
0.662362
from rest_framework import serializers from .models import Skill, Task, Days class SkillSerializer(serializers.ModelSerializer): class Meta: model = Skill fields = ('name', 'user') class TaskSerializer(serializers.ModelSerializer): class Meta: model = Task fields = ('name', ...
true
true
f70f4b9ac58896fac91046fbf000439679cf8a27
1,211
py
Python
test/functional/rpc_named_arguments.py
wizz13150/gapcoin-core
424b36ac0f232583e51bbef0ba87f4b1a53fde70
[ "MIT" ]
2
2020-11-07T01:18:24.000Z
2021-04-25T15:49:28.000Z
test/functional/rpc_named_arguments.py
wizz13150/gapcoin-core
424b36ac0f232583e51bbef0ba87f4b1a53fde70
[ "MIT" ]
2
2021-03-27T14:19:47.000Z
2021-04-30T12:57:11.000Z
test/functional/rpc_named_arguments.py
wizz13150/gapcoin-core
424b36ac0f232583e51bbef0ba87f4b1a53fde70
[ "MIT" ]
3
2021-02-03T14:39:29.000Z
2022-01-05T11:56:21.000Z
#!/usr/bin/env python3 # Copyright (c) 2016-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test using named arguments for RPCs.""" from test_framework.test_framework import AltcoinTestFramework...
34.6
101
0.679604
from test_framework.test_framework import AltcoinTestFramework from test_framework.util import ( assert_equal, assert_raises_rpc_error, ) class NamedArgumentTest(AltcoinTestFramework): def set_test_params(self): self.num_nodes = 1 def run_test(self): node = self.nodes[0] h...
true
true
f70f4b9c17d9141ff1eea0eec43d47d91b593441
14,098
py
Python
test/geometry/transform/crop/test_crop2d.py
pworinger/kornia
a8bddbc5412694d778b1a7338e0d001910bb8024
[ "ECL-2.0", "Apache-2.0" ]
1
2021-06-25T18:10:22.000Z
2021-06-25T18:10:22.000Z
test/geometry/transform/crop/test_crop2d.py
pworinger/kornia
a8bddbc5412694d778b1a7338e0d001910bb8024
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
test/geometry/transform/crop/test_crop2d.py
pworinger/kornia
a8bddbc5412694d778b1a7338e0d001910bb8024
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
from typing import Tuple import pytest import kornia as kornia import kornia.testing as utils # test utils import torch from torch.testing import assert_allclose from torch.autograd import gradcheck class TestBoundingBoxInferring: def test_bounding_boxes_dim_inferring(self, device, dtype): boxes = tor...
30.849015
94
0.452901
from typing import Tuple import pytest import kornia as kornia import kornia.testing as utils import torch from torch.testing import assert_allclose from torch.autograd import gradcheck class TestBoundingBoxInferring: def test_bounding_boxes_dim_inferring(self, device, dtype): boxes = torch.tensor([[...
true
true
f70f4bcb38a6805d80e29b9d93b8b14c0b0a2adf
782
py
Python
Dynamic Programming/213. House Robber II.py
beckswu/Leetcode
480e8dc276b1f65961166d66efa5497d7ff0bdfd
[ "MIT" ]
138
2020-02-08T05:25:26.000Z
2021-11-04T11:59:28.000Z
Dynamic Programming/213. House Robber II.py
beckswu/Leetcode
480e8dc276b1f65961166d66efa5497d7ff0bdfd
[ "MIT" ]
null
null
null
Dynamic Programming/213. House Robber II.py
beckswu/Leetcode
480e8dc276b1f65961166d66efa5497d7ff0bdfd
[ "MIT" ]
24
2021-01-02T07:18:43.000Z
2022-03-20T08:17:54.000Z
class Solution: def rob(self, nums): """ :type nums: List[int] :rtype: int """ if(len(nums)==1): return nums[0] # 1的时候不work 两个dp,一个从第一位开始,一个从倒数第二位结束 last, now = 0, 0 last1, now1 = 0, 0 for i, n in enumerate(nums): if i<len(nums...
28.962963
78
0.446292
class Solution: def rob(self, nums): if(len(nums)==1): return nums[0] last, now = 0, 0 last1, now1 = 0, 0 for i, n in enumerate(nums): if i<len(nums)-1: last, now = now, max(n+last,now) print(now, last) if i>0: ...
true
true
f70f4bf8220077d2a182387cb01ae41173d9d9fa
1,026
py
Python
awacs/aps.py
mtrspringer/awacs
a5d2fe37c2a468a977536c4d6e66dda7da69717f
[ "BSD-2-Clause" ]
null
null
null
awacs/aps.py
mtrspringer/awacs
a5d2fe37c2a468a977536c4d6e66dda7da69717f
[ "BSD-2-Clause" ]
19
2020-11-30T06:43:54.000Z
2022-02-21T09:02:54.000Z
awacs/aps.py
mtrspringer/awacs
a5d2fe37c2a468a977536c4d6e66dda7da69717f
[ "BSD-2-Clause" ]
null
null
null
# Copyright (c) 2012-2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from aws import Action as BaseAction from aws import BaseARN service_name = 'Amazon Managed Service for Prometheus' prefix = 'aps' class Action(BaseAction): def __init__(self, action=None): ...
28.5
70
0.725146
from aws import Action as BaseAction from aws import BaseARN service_name = 'Amazon Managed Service for Prometheus' prefix = 'aps' class Action(BaseAction): def __init__(self, action=None): sup = super(Action, self) sup.__init__(prefix, action) class ARN(BaseARN): def __init__(self, re...
true
true
f70f4cea7dfe68ebcc562953c631258be61fcee2
7,789
py
Python
kerasify.py
anmalara/kerasify
a32a2715d379ad58ef318b545acbaa6ea5983cda
[ "MIT" ]
185
2016-11-08T11:45:35.000Z
2022-03-30T12:53:30.000Z
kerasify.py
anmalara/kerasify
a32a2715d379ad58ef318b545acbaa6ea5983cda
[ "MIT" ]
12
2016-12-25T00:25:52.000Z
2021-05-07T04:02:26.000Z
kerasify.py
Krypton0001/KerasToCpp
01924c857ee46d7c0380a3d3ceac9ff8de6c8bf4
[ "MIT" ]
61
2016-11-16T19:15:34.000Z
2021-11-05T19:33:59.000Z
import numpy as np import struct LAYER_DENSE = 1 LAYER_CONVOLUTION2D = 2 LAYER_FLATTEN = 3 LAYER_ELU = 4 LAYER_ACTIVATION = 5 LAYER_MAXPOOLING2D = 6 LAYER_LSTM = 7 LAYER_EMBEDDING = 8 ACTIVATION_LINEAR = 1 ACTIVATION_RELU = 2 ACTIVATION_SOFTPLUS = 3 ACTIVATION_SIGMOID = 4 ACTIVATION_TANH = 5 ACTIVATION_HARD_SIGMOID =...
35.894009
92
0.5147
import numpy as np import struct LAYER_DENSE = 1 LAYER_CONVOLUTION2D = 2 LAYER_FLATTEN = 3 LAYER_ELU = 4 LAYER_ACTIVATION = 5 LAYER_MAXPOOLING2D = 6 LAYER_LSTM = 7 LAYER_EMBEDDING = 8 ACTIVATION_LINEAR = 1 ACTIVATION_RELU = 2 ACTIVATION_SOFTPLUS = 3 ACTIVATION_SIGMOID = 4 ACTIVATION_TANH = 5 ACTIVATION_HARD_SIGMOID =...
true
true
f70f4d074c2ce70c7edb9ce44b7c84467d1ab3f9
1,084
py
Python
aiodata/db/connection.py
jan-mue/aiodata
f1016d98520c8785e5c0c3db0485f04fa34257ce
[ "MIT" ]
null
null
null
aiodata/db/connection.py
jan-mue/aiodata
f1016d98520c8785e5c0c3db0485f04fa34257ce
[ "MIT" ]
null
null
null
aiodata/db/connection.py
jan-mue/aiodata
f1016d98520c8785e5c0c3db0485f04fa34257ce
[ "MIT" ]
null
null
null
import sqlalchemy from functools import partial async def create_engine(*args, **kwargs): engine = sqlalchemy.create_engine(*args, **kwargs) if engine.driver == "psycopg2": import asyncpg p = await asyncpg.create_pool(str(engine.url)) elif engine.driver == "pyodbc": imp...
28.526316
77
0.619926
import sqlalchemy from functools import partial async def create_engine(*args, **kwargs): engine = sqlalchemy.create_engine(*args, **kwargs) if engine.driver == "psycopg2": import asyncpg p = await asyncpg.create_pool(str(engine.url)) elif engine.driver == "pyodbc": imp...
true
true
f70f4e13a5bf144e945fcaa58230dc35850c07e2
1,273
py
Python
example-timeboard.py
hmain/cfn-datadog
7c7bbcc63e6490e7c0d3ffcf07a546b71d222950
[ "Apache-2.0" ]
11
2018-01-15T15:00:53.000Z
2019-08-07T01:44:59.000Z
example-timeboard.py
hmain/cfn-datadog
7c7bbcc63e6490e7c0d3ffcf07a546b71d222950
[ "Apache-2.0" ]
3
2018-01-31T11:40:58.000Z
2018-08-10T13:52:14.000Z
example-timeboard.py
hmain/cfn-datadog
7c7bbcc63e6490e7c0d3ffcf07a546b71d222950
[ "Apache-2.0" ]
6
2018-01-16T12:38:11.000Z
2019-04-18T11:33:09.000Z
from cfn_datadog import Timeboard, Graph, TemplateVariable, Definition, Request from troposphere import Parameter, Template, Join, ImportValue, Sub t = Template() datadog_lambda_stackname = t.add_parameter(Parameter( "DatadogLambdaStackname", Type="String", Description="Stack name of cfn-datadog" )) time...
26.520833
88
0.616654
from cfn_datadog import Timeboard, Graph, TemplateVariable, Definition, Request from troposphere import Parameter, Template, Join, ImportValue, Sub t = Template() datadog_lambda_stackname = t.add_parameter(Parameter( "DatadogLambdaStackname", Type="String", Description="Stack name of cfn-datadog" )) time...
true
true
f70f4e7e24e09490ba7a9712796660d2ae2860e2
17,884
py
Python
vivisect/qt/memory.py
bat-serjo/vivisect
f60934a2c8c51c7acdba52a65756e717a108a440
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
vivisect/qt/memory.py
bat-serjo/vivisect
f60934a2c8c51c7acdba52a65756e717a108a440
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
vivisect/qt/memory.py
bat-serjo/vivisect
f60934a2c8c51c7acdba52a65756e717a108a440
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
import logging from PyQt5.QtWidgets import * import envi.qt.memory as e_mem_qt import envi.qt.memcanvas as e_mem_canvas import vqt.hotkeys as vq_hotkey import vivisect.base as viv_base import vivisect.renderers as viv_rend import vivisect.qt.views as viv_q_views import vivisect.qt.ctxmenu as viv_q_ctxmenu from vqt...
33.679849
118
0.61323
import logging from PyQt5.QtWidgets import * import envi.qt.memory as e_mem_qt import envi.qt.memcanvas as e_mem_canvas import vqt.hotkeys as vq_hotkey import vivisect.base as viv_base import vivisect.renderers as viv_rend import vivisect.qt.views as viv_q_views import vivisect.qt.ctxmenu as viv_q_ctxmenu from vqt...
true
true