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
f751624874fae9e8e53975e7e250a89232e54aed
364
py
Python
examples/project_2/celery_conf.py
debonzi/celery_crossover
2da97fe527a357d5c85dfd29b04424d08dbe9b93
[ "MIT" ]
10
2018-04-06T18:58:18.000Z
2021-11-05T19:19:03.000Z
examples/project_2/celery_conf.py
debonzi/celery_crossover
2da97fe527a357d5c85dfd29b04424d08dbe9b93
[ "MIT" ]
2
2018-08-15T18:15:54.000Z
2021-03-26T06:58:02.000Z
examples/project_2/celery_conf.py
debonzi/celery_crossover
2da97fe527a357d5c85dfd29b04424d08dbe9b93
[ "MIT" ]
3
2018-04-09T03:06:12.000Z
2019-11-08T17:35:57.000Z
# -*- coding: utf-8 -*- from kombu import Exchange, Queue BROKER_URL = "redis://localhost:6379/1" CELERY_RESULT_BACKEND = "redis://localhost:6379/11" CELERYD_PREFETCH_MULTIPLIER = 1 CELERYD_CONCURRENCY = 1 CELERY_QUEUES = [ Queue("project_2", Exchange("project_2"), routing_key="project_2"), Queue("celery", E...
26
71
0.71978
from kombu import Exchange, Queue BROKER_URL = "redis://localhost:6379/1" CELERY_RESULT_BACKEND = "redis://localhost:6379/11" CELERYD_PREFETCH_MULTIPLIER = 1 CELERYD_CONCURRENCY = 1 CELERY_QUEUES = [ Queue("project_2", Exchange("project_2"), routing_key="project_2"), Queue("celery", Exchange("celery"), routi...
true
true
f75164dc104d2f059ea762c3e4d9242471b09730
5,252
py
Python
SourceRepositoryTools/ActivateAndExecute.py
davidbrownell/Common_Environment
4015872aeac8d5da30a6aa7940e1035a6aa6a75d
[ "BSL-1.0" ]
1
2017-04-25T13:15:10.000Z
2017-04-25T13:15:10.000Z
SourceRepositoryTools/ActivateAndExecute.py
davidbrownell/Common_Environment
4015872aeac8d5da30a6aa7940e1035a6aa6a75d
[ "BSL-1.0" ]
null
null
null
SourceRepositoryTools/ActivateAndExecute.py
davidbrownell/Common_Environment
4015872aeac8d5da30a6aa7940e1035a6aa6a75d
[ "BSL-1.0" ]
null
null
null
# ---------------------------------------------------------------------- # | # | ActivateAndExecute.py # | # | David Brownell <db@DavidBrownell.com> # | 2018-02-19 09:15:08 # | # ---------------------------------------------------------------------- # | # | Copyright David Brownell 2018. # | ...
46.070175
151
0.529703
import json import os import sys import six from SourceRepositoryTools.Impl import Utilities from SourceRepositoryTools.Impl import Constants from SourceRepositoryTools.Impl.EnvironmentBootstrap import EnvironmentBootstrap _script_fullpath = os.path.abspath(__file__) if "python" in sys.executable.lower() e...
true
true
f75165843317ae1bf1756c75d899a183c5eb5a83
6,675
py
Python
archieve/2021/day19b.py
jabra98/aoc
eee632e3bf7917f71e58f8e87a96753d6a11cc64
[ "MIT" ]
null
null
null
archieve/2021/day19b.py
jabra98/aoc
eee632e3bf7917f71e58f8e87a96753d6a11cc64
[ "MIT" ]
null
null
null
archieve/2021/day19b.py
jabra98/aoc
eee632e3bf7917f71e58f8e87a96753d6a11cc64
[ "MIT" ]
null
null
null
import sys; datafilepath = sys.argv[1] raw_data = open(datafilepath).read().splitlines() import math scanners = list() tmp = list() for i in raw_data: if len(i) == 0: scanners.append(tmp.copy()) tmp.clear() elif i[0:2] == '--': continue else: (a,b,c) = i.split(',') ...
29.148472
83
0.425318
import sys; datafilepath = sys.argv[1] raw_data = open(datafilepath).read().splitlines() import math scanners = list() tmp = list() for i in raw_data: if len(i) == 0: scanners.append(tmp.copy()) tmp.clear() elif i[0:2] == '--': continue else: (a,b,c) = i.split(',') ...
true
true
f75165bb504fa3a5286a066a180a07ece1b9d7ab
1,210
py
Python
tests/core/test_marklogic_utils.py
overstory/ml-monitoring-plugin
c79e04ff0654d3739585d261dfd83a7c5f867923
[ "Apache-2.0" ]
5
2017-01-05T13:16:55.000Z
2020-06-13T07:51:37.000Z
tests/core/test_marklogic_utils.py
overstory/ml-monitoring-plugin
c79e04ff0654d3739585d261dfd83a7c5f867923
[ "Apache-2.0" ]
30
2016-11-30T16:45:12.000Z
2017-05-25T14:57:49.000Z
tests/core/test_marklogic_utils.py
overstory/ml-monitoring-plugin
c79e04ff0654d3739585d261dfd83a7c5f867923
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2016 MarkLogic Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0# # # U...
30.25
116
0.743802
from __future__ import absolute_import import logging import unittest from mlmonitor.core import MarkLogicStatus log = logging.getLogger() logging.basicConfig(level=logging.DEBUG) class MarkLogicUtilsTests(unittest.TestCase): def testRest(self): status = MarkLogicStatus(scheme="http",user="admin",pas...
true
true
f75165cbbe86ac2563739a485b9c87b4bc2621f9
2,480
py
Python
data/cirq_new/cirq_program/startCirq_noisy917.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/cirq_new/cirq_program/startCirq_noisy917.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/cirq_new/cirq_program/startCirq_noisy917.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 5/15/20 4:49 PM # @File : grover.py # qubit number=4 # total number=23 import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np #thatsNoCode def make_circuit(n: int, input_qubit): c = cirq.Ci...
34.444444
77
0.688306
import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np def make_circuit(n: int, input_qubit): c = cirq.Circuit() c.append(cirq.H.on(input_qubit[0])) c.append(cirq.H.on(input_qubit[1])) c.append(cirq.H.on(input_qubit[1])) c.append(ci...
true
true
f75165cda84438163a129fa0bef0dd311a2e575b
3,653
py
Python
src/Iowa.py
DRyanMiller/JobSpecs
fba885fec4cc3e268afe5c5898c5e00bba759794
[ "RSA-MD" ]
null
null
null
src/Iowa.py
DRyanMiller/JobSpecs
fba885fec4cc3e268afe5c5898c5e00bba759794
[ "RSA-MD" ]
null
null
null
src/Iowa.py
DRyanMiller/JobSpecs
fba885fec4cc3e268afe5c5898c5e00bba759794
[ "RSA-MD" ]
null
null
null
!pip install PyPDF2 import PyPDF2 import re import json from datetime import datetime import boto3 pdf = '/Users/dryanmiller/Desktop/Rehabilitation Counselor.pdf' dynamodb = boto3.resource(‘dynamodb’) table = dynamodb.Table('JobSpecs') response = s3.get_object(Bucket=bucket, Key=key) class Iowa(): def __ini...
34.790476
121
0.627703
!pip install PyPDF2 import PyPDF2 import re import json from datetime import datetime import boto3 pdf = '/Users/dryanmiller/Desktop/Rehabilitation Counselor.pdf' dynamodb = boto3.resource(‘dynamodb’) table = dynamodb.Table('JobSpecs') response = s3.get_object(Bucket=bucket, Key=key) class Iowa(): def __ini...
false
true
f751664fbca40199ac6f3d250e10f039a1ee4dc3
937
py
Python
exp/run_scale_lx.py
nla-group/classix
8584162e4c89ba05a62faf1e20104768cf5bb43c
[ "MIT" ]
56
2022-02-04T08:51:12.000Z
2022-03-30T10:54:18.000Z
exp/run_scale_lx.py
nla-group/classix
8584162e4c89ba05a62faf1e20104768cf5bb43c
[ "MIT" ]
5
2022-03-02T14:28:30.000Z
2022-03-19T21:03:17.000Z
exp/run_scale_lx.py
nla-group/classix
8584162e4c89ba05a62faf1e20104768cf5bb43c
[ "MIT" ]
5
2022-03-04T15:34:26.000Z
2022-03-28T09:44:03.000Z
import sklearn.datasets as data from classix import CLASSIX import matplotlib.pyplot as plt def rn_scale_explore(): plt.style.use('bmh') TOL = 0.1 random_state = 1 moons, _ = data.make_moons(n_samples=1000, noise=0.05, random_state=random_state) blobs, _ = data.make_blobs(n_samples=1500, centers=...
37.48
127
0.667022
import sklearn.datasets as data from classix import CLASSIX import matplotlib.pyplot as plt def rn_scale_explore(): plt.style.use('bmh') TOL = 0.1 random_state = 1 moons, _ = data.make_moons(n_samples=1000, noise=0.05, random_state=random_state) blobs, _ = data.make_blobs(n_samples=1500, centers=...
true
true
f75166b27c01c7fe2d00d9a53242ee90d7b54bd2
7,342
py
Python
data/p3BR/R2/benchmark/startQiskit_Class364.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p3BR/R2/benchmark/startQiskit_Class364.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p3BR/R2/benchmark/startQiskit_Class364.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=3 # total number=73 import numpy as np from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ from qiskit.visualization import plot_histogram from typing import * from pprint import pprint from math import log2 from collections import Counter from...
32.201754
140
0.639335
import numpy as np from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ from qiskit.visualization import plot_histogram from typing import * from pprint import pprint from math import log2 from collections import Counter from qiskit.test.mock import FakeVigo, ...
true
true
f75166e1db0088a12e37baa7c00ade5398b544c7
1,071
py
Python
merge_geo_with collocates.py
RSLancs/Extracting_plant_names_and_collocates_from_historical_texts
c8d6746978786ca4b83dc550114700530077c543
[ "Apache-2.0" ]
null
null
null
merge_geo_with collocates.py
RSLancs/Extracting_plant_names_and_collocates_from_historical_texts
c8d6746978786ca4b83dc550114700530077c543
[ "Apache-2.0" ]
null
null
null
merge_geo_with collocates.py
RSLancs/Extracting_plant_names_and_collocates_from_historical_texts
c8d6746978786ca4b83dc550114700530077c543
[ "Apache-2.0" ]
null
null
null
##python27 from pprint import pprint import pandas as pd ##..............open manually merged geoparsed results geo = pd.read_csv('./data/merger_xml_extracted_geoparsed_collocates.csv') geo = [tuple(x) for x in geo.values] # df to list print(geo[1]) ##..........open collocate results.... collocate = p...
26.121951
96
0.606909
from pprint import pprint import pandas as pd geo = pd.read_csv('./data/merger_xml_extracted_geoparsed_collocates.csv') geo = [tuple(x) for x in geo.values] print(geo[1]) collocate = pd.read_csv('./data/INDEXED_no_overlaps-abrev-dups_collocate_results_15.01.19.csv') collocate = [tuple(x) for x in colloca...
true
true
f75167552634278481eed400c90ddd4d62354e93
154
py
Python
venv/bin/django-admin.py
khadija-bit/pro-awwwards
998b3366833444f1963ecc551a07c845c952c98f
[ "Unlicense" ]
null
null
null
venv/bin/django-admin.py
khadija-bit/pro-awwwards
998b3366833444f1963ecc551a07c845c952c98f
[ "Unlicense" ]
3
2021-06-08T21:44:51.000Z
2021-09-08T02:08:22.000Z
venv/bin/django-admin.py
khadija-bit/pro-awwwards
998b3366833444f1963ecc551a07c845c952c98f
[ "Unlicense" ]
null
null
null
#!/home/khadija/pro-awwwards/venv/bin/python3.6 from django.core import management if __name__ == "__main__": management.execute_from_command_line()
25.666667
47
0.779221
from django.core import management if __name__ == "__main__": management.execute_from_command_line()
true
true
f7516817499973e6dc87fbcb4243b5afd25d915a
828
py
Python
gamePS.py
robinankele/privacy-games
3a12194bbfb511ba4303d5cd1d37a7c1982622fa
[ "MIT" ]
null
null
null
gamePS.py
robinankele/privacy-games
3a12194bbfb511ba4303d5cd1d37a7c1982622fa
[ "MIT" ]
null
null
null
gamePS.py
robinankele/privacy-games
3a12194bbfb511ba4303d5cd1d37a7c1982622fa
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ Author: Robin Ankele <robin.ankele@cs.ox.ac.uk> http://users.ox.ac.uk/~kell4062 Copyright (c) 2017, University of Oxford All rights reserved. """ from gameBasic import G class G_PS(G): def __init__(self): G.__init__(self) def __finialize__(self): G.__finia...
19.714286
80
0.628019
from gameBasic import G class G_PS(G): def __init__(self): G.__init__(self) def __finialize__(self): G.__finialize__(self) def oracle_P_f(self): return G._P_f(self) def PS(self, u_x, a_x, p_x): G.input(self, u_x, a_x, p_x) e_x_, b_x = G.view(self) e_u_x = [] u_x = u_x ...
true
true
f751691ebc5286840092f3d825a863d3a5bd3520
17,366
py
Python
grr/gui/api_plugins/hunt_regression_test.py
ethicalhackeragnidhra/Grr
9ff9178396d9d16575e42dded33627cb09ac3af1
[ "Apache-2.0" ]
1
2020-12-18T00:47:19.000Z
2020-12-18T00:47:19.000Z
grr/gui/api_plugins/hunt_regression_test.py
ethicalhackeragnidhra/Grr
9ff9178396d9d16575e42dded33627cb09ac3af1
[ "Apache-2.0" ]
null
null
null
grr/gui/api_plugins/hunt_regression_test.py
ethicalhackeragnidhra/Grr
9ff9178396d9d16575e42dded33627cb09ac3af1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """This modules contains regression tests for hunts API handlers.""" import pdb from grr.gui import api_regression_test_lib from grr.gui.api_plugins import hunt as hunt_plugin from grr.lib import aff4 from grr.lib import flags from grr.lib import output_plugin from grr.lib import rdfvalue fr...
33.396154
80
0.697915
import pdb from grr.gui import api_regression_test_lib from grr.gui.api_plugins import hunt as hunt_plugin from grr.lib import aff4 from grr.lib import flags from grr.lib import output_plugin from grr.lib import rdfvalue from grr.lib import test_lib from grr.lib.hunts import implementation from grr.lib.hunts impo...
true
true
f75169b47cd07a13c6858dbae36bd448d43d61e1
3,681
py
Python
sympy/abc.py
nickcotton89/sympy
a22f40463cba702b4a3d2c55bb9dee32ce5a45fa
[ "BSD-3-Clause" ]
1
2021-02-04T16:08:07.000Z
2021-02-04T16:08:07.000Z
sympy/abc.py
nickcotton89/sympy
a22f40463cba702b4a3d2c55bb9dee32ce5a45fa
[ "BSD-3-Clause" ]
null
null
null
sympy/abc.py
nickcotton89/sympy
a22f40463cba702b4a3d2c55bb9dee32ce5a45fa
[ "BSD-3-Clause" ]
null
null
null
""" This module exports all latin and greek letters as Symbols, so you can conveniently do >>> from sympy.abc import x, y instead of the slightly more clunky-looking >>> from sympy import symbols >>> x, y = symbols('x y') Caveats ======= 1. As of the time of writing this, the names ``C``, ``O``, ``S``,...
33.162162
80
0.663678
from typing import Any, Dict import string from .core import Symbol, symbols from .core.alphabets import greeks a, b, c, d, e, f, g, h, i, j = symbols('a, b, c, d, e, f, g, h, i, j') k, l, m, n, o, p, q, r, s, t = symbols('k, l, m, n, o, p, q, r, s, t') u, v, w, x, y, z = symbols('u, v, w, x, y, z') A, B, C, D, ...
true
true
f75169b59ea18e0bf1cfe1c33194a0011302c048
627
py
Python
Labs/6/RaceConditions/RemoteRace/Exploit.py
Opty-MISCE/SS
2010a7f93fdcaa50f835d827e531dc636abfe299
[ "MIT" ]
null
null
null
Labs/6/RaceConditions/RemoteRace/Exploit.py
Opty-MISCE/SS
2010a7f93fdcaa50f835d827e531dc636abfe299
[ "MIT" ]
null
null
null
Labs/6/RaceConditions/RemoteRace/Exploit.py
Opty-MISCE/SS
2010a7f93fdcaa50f835d827e531dc636abfe299
[ "MIT" ]
null
null
null
from requests import session from threading import Thread from re import findall SERVER = "http://mustard.stt.rnl.tecnico.ulisboa.pt:12202" s = session() f = None def doLogin(): data = { "username": "admin", "password": "admin" } s.post(SERVER + "/login", data=data) def doJackpot(): ...
17.914286
58
0.570973
from requests import session from threading import Thread from re import findall SERVER = "http://mustard.stt.rnl.tecnico.ulisboa.pt:12202" s = session() f = None def doLogin(): data = { "username": "admin", "password": "admin" } s.post(SERVER + "/login", data=data) def doJackpot(): ...
true
true
f7516a8ba5d4fdec7e6491d91a0c7e4093686318
2,676
py
Python
egs/voxceleb/sre/backend/tools/s-norm-get-enroll.py
ishine/tf-kaldi-speaker-master
4b93110c4aa54f4764c58d9ffef3aec2efce39db
[ "Apache-2.0" ]
18
2019-09-11T13:34:03.000Z
2021-07-19T14:54:49.000Z
egs/voxceleb/sre/backend/tools/s-norm-get-enroll.py
ishine/tf-kaldi-speaker-master
4b93110c4aa54f4764c58d9ffef3aec2efce39db
[ "Apache-2.0" ]
null
null
null
egs/voxceleb/sre/backend/tools/s-norm-get-enroll.py
ishine/tf-kaldi-speaker-master
4b93110c4aa54f4764c58d9ffef3aec2efce39db
[ "Apache-2.0" ]
5
2019-09-18T07:51:17.000Z
2020-05-27T07:40:09.000Z
import os import numpy as np import logging import argparse import sys logger = logging.getLogger('s-norm score.') logger.setLevel(logging.INFO) handler = logging.StreamHandler(sys.stdout) handler.setLevel(logging.INFO) formatter = logging.Formatter("%(asctime)s [%(pathname)s:%(lineno)s - " ...
26.235294
121
0.60725
import os import numpy as np import logging import argparse import sys logger = logging.getLogger('s-norm score.') logger.setLevel(logging.INFO) handler = logging.StreamHandler(sys.stdout) handler.setLevel(logging.INFO) formatter = logging.Formatter("%(asctime)s [%(pathname)s:%(lineno)s - " ...
true
true
f7516b5d9c8d88148ef08dc3f70539e05fac7d0d
305
py
Python
Lesson7/vzlom.py
shinkai-tester/python_beginner
a934328c9a50241cc3f02a423060e16aab53b425
[ "Apache-2.0" ]
2
2021-06-01T13:24:04.000Z
2021-06-01T13:27:47.000Z
Lesson7/vzlom.py
shinkai-tester/python_beginner
a934328c9a50241cc3f02a423060e16aab53b425
[ "Apache-2.0" ]
null
null
null
Lesson7/vzlom.py
shinkai-tester/python_beginner
a934328c9a50241cc3f02a423060e16aab53b425
[ "Apache-2.0" ]
null
null
null
string = input() string = string.lower() for sdv in range(1, 32): s = '' for c in string: if 'а' <= c <= 'я': ot_sm = ord(c) - ord('а') new_ot_sm = (ot_sm - sdv) % 32 abs_sm = ord('а') + new_ot_sm c = chr(abs_sm) s += c print(s)
23.461538
42
0.429508
string = input() string = string.lower() for sdv in range(1, 32): s = '' for c in string: if 'а' <= c <= 'я': ot_sm = ord(c) - ord('а') new_ot_sm = (ot_sm - sdv) % 32 abs_sm = ord('а') + new_ot_sm c = chr(abs_sm) s += c print(s)
true
true
f7516ba1d0c47cbe735e41e9676e6402c84a6a01
5,058
py
Python
osxphotos/compare_exif.py
oPromessa/osxphotos
0d7e324f0262093727147b9f22ed275e962e8725
[ "MIT" ]
null
null
null
osxphotos/compare_exif.py
oPromessa/osxphotos
0d7e324f0262093727147b9f22ed275e962e8725
[ "MIT" ]
null
null
null
osxphotos/compare_exif.py
oPromessa/osxphotos
0d7e324f0262093727147b9f22ed275e962e8725
[ "MIT" ]
null
null
null
""" PhotoCompare class to compare date/time/timezone in Photos to the exif data """ from collections import namedtuple from typing import Callable, List, Optional, Tuple from osxphotos import PhotosDB from osxphotos.exiftool import ExifTool from photoscript import Photo from .datetime_utils import datetime_naive_to_...
30.107143
100
0.591538
from collections import namedtuple from typing import Callable, List, Optional, Tuple from osxphotos import PhotosDB from osxphotos.exiftool import ExifTool from photoscript import Photo from .datetime_utils import datetime_naive_to_local, datetime_to_new_tz from .exif_datetime_updater import get_exif_date_time_offs...
true
true
f7516ca3cd01b3ed0c5dbf99d708f6624187fd72
925
py
Python
decimate_citations.py
raroes/scientific-silos
89c56fcadfe7a520e413596543a15b606e4ea08c
[ "MIT" ]
null
null
null
decimate_citations.py
raroes/scientific-silos
89c56fcadfe7a520e413596543a15b606e4ea08c
[ "MIT" ]
null
null
null
decimate_citations.py
raroes/scientific-silos
89c56fcadfe7a520e413596543a15b606e4ea08c
[ "MIT" ]
1
2021-08-31T02:08:59.000Z
2021-08-31T02:08:59.000Z
#!/usr/bin/python3 # this script eliminates randomly a percentage of citations from the citation data from random import randrange input_file = "pmid_citations.txt" # percentage of citation that will be left after the process percentage_left = 80 output_file = "pmid_citations_" + str(percentage_left) + ".txt" f_in ...
25
82
0.675676
from random import randrange input_file = "pmid_citations.txt" percentage_left = 80 output_file = "pmid_citations_" + str(percentage_left) + ".txt" f_in = open(input_file, "r") f_out = open(output_file, "w") output_pmid = False current_pmid = "" input_count = 0 output_count = 0 for line in f_in: data = line.s...
true
true
f7516d2b369e223890d98999ed7972c6adac962e
25,956
py
Python
electroncash_gui/qt/contact_list.py
christroutner/Electron-Cash
d5217ed3e878bd56977181f022f9e5c43f449241
[ "MIT" ]
174
2018-09-30T12:47:10.000Z
2022-03-05T15:03:38.000Z
electroncash_gui/qt/contact_list.py
christroutner/Electron-Cash
d5217ed3e878bd56977181f022f9e5c43f449241
[ "MIT" ]
1,478
2018-09-24T09:30:13.000Z
2022-03-29T15:48:17.000Z
electroncash_gui/qt/contact_list.py
christroutner/Electron-Cash
d5217ed3e878bd56977181f022f9e5c43f449241
[ "MIT" ]
159
2018-09-24T12:56:47.000Z
2022-03-28T23:52:17.000Z
#!/usr/bin/env python3 # # Electrum - lightweight Bitcoin client # Copyright (C) 2015 Thomas Voegtlin # # 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 withou...
50.108108
166
0.612036
from electroncash.i18n import _, ngettext import electroncash.web as web from electroncash.address import Address from electroncash.contacts import Contact, contact_types from electroncash.plugins import run_hook from electroncash.util import FileImportFailed, PrintError, finalization_print_error from PyQt5.QtGui impo...
true
true
f7516d5472ecfbb4ee9b68791c5713b42ef58537
4,783
py
Python
sparse_ho/implicit_forward.py
QB3/sparse-ho-qbe
73358caeff2ff08ca4e88af419e7dae753d43ea9
[ "BSD-3-Clause" ]
null
null
null
sparse_ho/implicit_forward.py
QB3/sparse-ho-qbe
73358caeff2ff08ca4e88af419e7dae753d43ea9
[ "BSD-3-Clause" ]
null
null
null
sparse_ho/implicit_forward.py
QB3/sparse-ho-qbe
73358caeff2ff08ca4e88af419e7dae753d43ea9
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from scipy.sparse import issparse from sparse_ho.forward import get_beta_jac_iterdiff class ImplicitForward(): def __init__( self, criterion, tol_jac=1e-3, n_iter=100, n_iter_jac=100, use_sk=False, verbose=False): self.criterion = criterion self.n_iter = ...
37.661417
173
0.606105
import numpy as np from scipy.sparse import issparse from sparse_ho.forward import get_beta_jac_iterdiff class ImplicitForward(): def __init__( self, criterion, tol_jac=1e-3, n_iter=100, n_iter_jac=100, use_sk=False, verbose=False): self.criterion = criterion self.n_iter = ...
true
true
f7516d72cf57a5045a31b1bc07961010f578dc55
5,009
py
Python
q2_longitudinal/_vega_specs/volatility/data.py
sterrettJD/q2-longitudinal
d9edd427c9668c8b95d708fc3c4d2722204c9ce0
[ "BSD-3-Clause" ]
10
2017-09-13T03:16:34.000Z
2022-01-31T06:07:00.000Z
q2_longitudinal/_vega_specs/volatility/data.py
sterrettJD/q2-longitudinal
d9edd427c9668c8b95d708fc3c4d2722204c9ce0
[ "BSD-3-Clause" ]
114
2017-08-10T00:19:09.000Z
2022-03-03T06:48:07.000Z
q2_longitudinal/_vega_specs/volatility/data.py
sterrettJD/q2-longitudinal
d9edd427c9668c8b95d708fc3c4d2722204c9ce0
[ "BSD-3-Clause" ]
16
2017-08-23T21:33:57.000Z
2022-01-28T16:26:44.000Z
# ---------------------------------------------------------------------------- # Copyright (c) 2017-2021, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
46.813084
79
0.508884
from .const import ( DAT_INDIVIDUAL, FLD_GROUP_BY, FLD_METRIC, DAT_GLOBAL_VALS, FLD_CTRL_CL3, DAT_SELECTED, FLD_CTRL_MEAN, FLD_CTRL_STDEV, SIG_METRIC, SIG_GROUP, DAT_STATS, DAT_STATS_CUME_EXT, DAT_STATS_GLOB_EXT_LEFT, FLD_CTRL_CL2, FLD_CTRL_EXT, DAT_AGG_BY, FLD_CTRL_CI0, FLD_CTRL_CI1, FLD_CTRL_COUNT, ...
true
true
f7516de201442d5bf511ad8d7897e5d4a57cf466
4,088
py
Python
yt/geometry/oct_geometry_handler.py
saethlin/yt
992ae71974dca933346e91008c5a50f43a0a350e
[ "BSD-3-Clause-Clear" ]
1
2020-06-22T10:17:01.000Z
2020-06-22T10:17:01.000Z
yt/geometry/oct_geometry_handler.py
saethlin/yt
992ae71974dca933346e91008c5a50f43a0a350e
[ "BSD-3-Clause-Clear" ]
2
2020-02-10T22:55:35.000Z
2020-02-19T21:01:20.000Z
yt/geometry/oct_geometry_handler.py
saethlin/yt
992ae71974dca933346e91008c5a50f43a0a350e
[ "BSD-3-Clause-Clear" ]
2
2020-05-16T15:29:37.000Z
2020-06-22T10:17:08.000Z
""" Octree geometry handler """ #----------------------------------------------------------------------------- # Copyright (c) 2013, yt Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #------------------...
34.066667
94
0.568249
import numpy as np from yt.utilities.logger import ytLogger as mylog from yt.geometry.geometry_handler import Index from yt.fields.field_detector import FieldDetector class OctreeIndex(Index): def _setup_geometry(self): mylog.debug("Initializing Octree Geometry Handler.") self._initialize_oct_h...
true
true
f7516f315d7ba508c3b1422d64a8297477a81de3
46,302
py
Python
research/object_detection/core/box_list_ops.py
TUDelftHao/models
faf0c2dc442ceaa8425aff73abd00f92f3137b7b
[ "Apache-2.0" ]
1
2020-09-28T13:07:19.000Z
2020-09-28T13:07:19.000Z
research/object_detection/core/box_list_ops.py
TUDelftHao/models
faf0c2dc442ceaa8425aff73abd00f92f3137b7b
[ "Apache-2.0" ]
1
2020-08-07T19:52:14.000Z
2020-08-07T19:54:27.000Z
research/object_detection/core/box_list_ops.py
TUDelftHao/models
faf0c2dc442ceaa8425aff73abd00f92f3137b7b
[ "Apache-2.0" ]
1
2020-08-31T19:12:34.000Z
2020-08-31T19:12:34.000Z
# Copyright 2017 The TensorFlow 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 applica...
38.234517
80
0.69578
from __future__ import absolute_import from __future__ import division from __future__ import print_function from six.moves import range import tensorflow.compat.v1 as tf from object_detection.core import box_list from object_detection.utils import ops from object_detection.utils import shape_utils class SortOrder...
true
true
f7516f9909eb2f8b7d54d281701ef0e4f635c8cb
2,865
py
Python
aalpy/oracles/RandomWordEqOracle.py
MDrey101/AALpy
bd8a4994db6c27438db61a3247ae404fc6e4074b
[ "MIT" ]
61
2021-04-01T10:38:52.000Z
2022-03-28T13:44:23.000Z
aalpy/oracles/RandomWordEqOracle.py
MDrey101/AALpy
bd8a4994db6c27438db61a3247ae404fc6e4074b
[ "MIT" ]
16
2021-04-03T20:14:08.000Z
2022-02-16T10:21:48.000Z
aalpy/oracles/RandomWordEqOracle.py
haubitzer/AALpy
e5b51742d886d5c5c72ab3e9c20eb349c56e2469
[ "MIT" ]
9
2021-04-05T13:43:17.000Z
2022-03-09T14:06:17.000Z
from aalpy.automata import Onfsm, Mdp, StochasticMealyMachine from aalpy.base import Oracle, SUL from random import randint, choice automaton_dict = {Onfsm: 'onfsm', Mdp: 'mdp', StochasticMealyMachine: 'smm'} class RandomWordEqOracle(Oracle): """ Equivalence oracle where queries are of random length in a pre...
34.107143
116
0.561955
from aalpy.automata import Onfsm, Mdp, StochasticMealyMachine from aalpy.base import Oracle, SUL from random import randint, choice automaton_dict = {Onfsm: 'onfsm', Mdp: 'mdp', StochasticMealyMachine: 'smm'} class RandomWordEqOracle(Oracle): def __init__(self, alphabet: list, sul: SUL, num_walks=100, min_walk_...
true
true
f7516fb2553bd67331becda7e53de5e86ad8797b
89
py
Python
gbm-noticeboard/project/noticeboard/apps.py
yannhowe/gbm
ecd2a363050e9fc3997fc1ac08ecc94efffdd9be
[ "MIT" ]
null
null
null
gbm-noticeboard/project/noticeboard/apps.py
yannhowe/gbm
ecd2a363050e9fc3997fc1ac08ecc94efffdd9be
[ "MIT" ]
null
null
null
gbm-noticeboard/project/noticeboard/apps.py
yannhowe/gbm
ecd2a363050e9fc3997fc1ac08ecc94efffdd9be
[ "MIT" ]
null
null
null
from django.apps import AppConfig class ApiConfig(AppConfig): name = 'noticeboard'
14.833333
33
0.752809
from django.apps import AppConfig class ApiConfig(AppConfig): name = 'noticeboard'
true
true
f751701d599becf4a6fcf92a75f363a20f867ced
82
py
Python
hon/renderers/ebook/__init__.py
swquinn/hon
333332029ee884a8822d38024659d5d7da64ff1a
[ "MIT" ]
null
null
null
hon/renderers/ebook/__init__.py
swquinn/hon
333332029ee884a8822d38024659d5d7da64ff1a
[ "MIT" ]
14
2019-06-23T01:49:55.000Z
2021-02-22T01:26:51.000Z
hon/renderers/ebook/__init__.py
swquinn/hon
333332029ee884a8822d38024659d5d7da64ff1a
[ "MIT" ]
null
null
null
from .ebook_renderer import EbookRenderer from .epub_renderer import EpubRenderer
27.333333
41
0.878049
from .ebook_renderer import EbookRenderer from .epub_renderer import EpubRenderer
true
true
f751715f45f357efb79292ed1c4867a696629b9d
47,867
py
Python
wemake_python_styleguide/violations/best_practices.py
n1kolasM/wemake-python-styleguide
f39e87897de89bea1c49d410beb5b1cbaf930807
[ "MIT" ]
1
2020-02-08T12:04:39.000Z
2020-02-08T12:04:39.000Z
wemake_python_styleguide/violations/best_practices.py
n1kolasM/wemake-python-styleguide
f39e87897de89bea1c49d410beb5b1cbaf930807
[ "MIT" ]
null
null
null
wemake_python_styleguide/violations/best_practices.py
n1kolasM/wemake-python-styleguide
f39e87897de89bea1c49d410beb5b1cbaf930807
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ These checks ensure that you follow the best practices. The source for these best practices is hidden inside countless hours we have spent debugging software or reviewing it. How do we find inspiration for new rules? We find some ugly code during code reviews and audits. Then we forbid to...
24.622942
86
0.641486
from typing_extensions import final from wemake_python_styleguide.violations.base import ( ASTViolation, SimpleViolation, TokenizeViolation, ) @final class WrongMagicCommentViolation(SimpleViolation): code = 400 error_template = 'Found wrong magic comment: {0}' @final class WrongDocCommentVi...
true
true
f7517195317b4cd8b2ff94fe72615b9d256bbfe0
15,700
py
Python
modules/mono/build_scripts/mono_configure.py
abmyii/godot
24e1039eb6fe32115e8d1a62a84965e9be19a2ed
[ "CC-BY-3.0", "Apache-2.0", "MIT" ]
5
2019-07-02T19:30:58.000Z
2021-01-19T03:31:17.000Z
modules/mono/build_scripts/mono_configure.py
abmyii/godot
24e1039eb6fe32115e8d1a62a84965e9be19a2ed
[ "CC-BY-3.0", "Apache-2.0", "MIT" ]
5
2019-11-05T19:15:53.000Z
2019-12-09T01:31:26.000Z
modules/mono/build_scripts/mono_configure.py
abmyii/godot
24e1039eb6fe32115e8d1a62a84965e9be19a2ed
[ "CC-BY-3.0", "Apache-2.0", "MIT" ]
1
2019-10-24T19:44:44.000Z
2019-10-24T19:44:44.000Z
import os import os.path import sys import subprocess from SCons.Script import Dir, Environment if os.name == 'nt': from . import mono_reg_utils as monoreg android_arch_dirs = { 'armv7': 'armeabi-v7a', 'arm64v8': 'arm64-v8a', 'x86': 'x86', 'x86_64': 'x86_64' } def get_android_out_dir(env): ...
38.480392
154
0.646624
import os import os.path import sys import subprocess from SCons.Script import Dir, Environment if os.name == 'nt': from . import mono_reg_utils as monoreg android_arch_dirs = { 'armv7': 'armeabi-v7a', 'arm64v8': 'arm64-v8a', 'x86': 'x86', 'x86_64': 'x86_64' } def get_android_out_dir(env): ...
true
true
f751742d1ab7963435084b07f279b9f9d0a36b14
1,887
py
Python
forte/pipeline_component.py
atif93/forte
2b70531abfb54fc5c2429ee26a501ad5c9094f3c
[ "Apache-2.0" ]
null
null
null
forte/pipeline_component.py
atif93/forte
2b70531abfb54fc5c2429ee26a501ad5c9094f3c
[ "Apache-2.0" ]
13
2019-12-01T04:51:38.000Z
2020-02-11T23:55:11.000Z
forte/pipeline_component.py
gpengzhi/forte
2b70531abfb54fc5c2429ee26a501ad5c9094f3c
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The Forte 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 ...
37
79
0.702703
from typing import Generic from texar.torch import HParams from forte.common.resources import Resources from forte.data.base_pack import PackType class PipelineComponent(Generic[PackType]): def initialize(self, resource: Resources, configs: HParams): pass def finish(self, resource: Resources): ...
true
true
f75176940202e76f8338ed5fd86bc72ce1de620e
28,826
py
Python
retrobiocat_web/retro/rdchiral/main.py
ihayhurst/RetroBioCat
d674897459c0ab65faad5ed3017c55cf51bcc020
[ "MIT" ]
9
2020-12-01T16:33:02.000Z
2022-01-19T20:02:42.000Z
retrobiocat_web/retro/rdchiral/main.py
ihayhurst/RetroBioCat
d674897459c0ab65faad5ed3017c55cf51bcc020
[ "MIT" ]
4
2020-10-02T14:38:32.000Z
2021-08-02T09:23:58.000Z
retrobiocat_web/retro/rdchiral/main.py
ihayhurst/RetroBioCat
d674897459c0ab65faad5ed3017c55cf51bcc020
[ "MIT" ]
6
2021-01-14T07:48:36.000Z
2022-03-20T17:34:27.000Z
from __future__ import print_function import sys import os import re import copy import rdkit.Chem as Chem import rdkit.Chem.AllChem as AllChem from rdkit.Chem.rdchem import ChiralType, BondType, BondDir from retrobiocat_web.retro.rdchiral.utils import vprint, PLEVEL, atoms_are_different from retrobiocat_web.retro.r...
52.410909
144
0.575869
from __future__ import print_function import sys import os import re import copy import rdkit.Chem as Chem import rdkit.Chem.AllChem as AllChem from rdkit.Chem.rdchem import ChiralType, BondType, BondDir from retrobiocat_web.retro.rdchiral.utils import vprint, PLEVEL, atoms_are_different from retrobiocat_web.retro.r...
true
true
f751769f9515630371f5c3aa09dec814eded5388
3,144
py
Python
plantcv/plantcv/auto_crop.py
stiphyMT/plantcv
b51b545f3aef0742a2d250c75cc998ba6c9e57b2
[ "MIT" ]
1
2022-02-03T12:08:59.000Z
2022-02-03T12:08:59.000Z
plantcv/plantcv/auto_crop.py
stiphyMT/plantcv
b51b545f3aef0742a2d250c75cc998ba6c9e57b2
[ "MIT" ]
null
null
null
plantcv/plantcv/auto_crop.py
stiphyMT/plantcv
b51b545f3aef0742a2d250c75cc998ba6c9e57b2
[ "MIT" ]
null
null
null
# Resize image import os import cv2 import numpy as np from plantcv.plantcv._debug import _debug from plantcv.plantcv import params from plantcv.plantcv import fatal_error def auto_crop(img, obj, padding_x=0, padding_y=0, color='black'): """ Resize image. Inputs: img = RGB or grayscale image d...
34.549451
124
0.625636
import os import cv2 import numpy as np from plantcv.plantcv._debug import _debug from plantcv.plantcv import params from plantcv.plantcv import fatal_error def auto_crop(img, obj, padding_x=0, padding_y=0, color='black'): params.device += 1 img_copy = np.copy(img) img_copy2 = np.copy(img) heig...
true
true
f7517778d9d6d519bb34ac7dd505e2aecf1cabf1
4,596
py
Python
tests/Cpl/TShell/_0test/test1/linux/gcc/mytoolchain.py
johnttaylor/foxtail
86e4e1d19d5e8f9c1d1064cf0939f4bf62615400
[ "BSD-3-Clause" ]
null
null
null
tests/Cpl/TShell/_0test/test1/linux/gcc/mytoolchain.py
johnttaylor/foxtail
86e4e1d19d5e8f9c1d1064cf0939f4bf62615400
[ "BSD-3-Clause" ]
null
null
null
tests/Cpl/TShell/_0test/test1/linux/gcc/mytoolchain.py
johnttaylor/foxtail
86e4e1d19d5e8f9c1d1064cf0939f4bf62615400
[ "BSD-3-Clause" ]
null
null
null
#--------------------------------------------------------------------------- # This python module is used to customize a supported toolchain for your # project specific settings. # # Notes: # - ONLY edit/add statements in the sections marked by BEGIN/END EDITS # markers. # - Maintain indentation level and u...
31.265306
94
0.604656
# - rvalues must be enclosed in quotes (single ' ' or double " ") # - The structure/class 'BuildValues' contains (at a minimum the # following data members. Any member not specifically set defaults # to null/empty string # .inc # .asminc # .cflags # .cppflag...
true
true
f75177a17cbef1d9fe56b023606d54e7cbc6597d
11,679
py
Python
api/tacticalrmm/logs/models.py
HighTech-Grace-Solutions/tacticalrmm
37c5f94c66e978c542fd01becae69438523ec5d5
[ "MIT" ]
2
2021-04-29T13:34:07.000Z
2021-04-29T13:34:11.000Z
api/tacticalrmm/logs/models.py
HighTech-Grace-Solutions/tacticalrmm
37c5f94c66e978c542fd01becae69438523ec5d5
[ "MIT" ]
null
null
null
api/tacticalrmm/logs/models.py
HighTech-Grace-Solutions/tacticalrmm
37c5f94c66e978c542fd01becae69438523ec5d5
[ "MIT" ]
2
2021-05-01T22:40:47.000Z
2022-03-07T16:16:14.000Z
import datetime as dt from abc import abstractmethod from django.db import models from tacticalrmm.middleware import get_debug_info, get_username ACTION_TYPE_CHOICES = [ ("schedreboot", "Scheduled Reboot"), ("taskaction", "Scheduled Task Action"), ("agentupdate", "Agent Update"), ("chocoinstall", "Ch...
32.991525
96
0.587122
import datetime as dt from abc import abstractmethod from django.db import models from tacticalrmm.middleware import get_debug_info, get_username ACTION_TYPE_CHOICES = [ ("schedreboot", "Scheduled Reboot"), ("taskaction", "Scheduled Task Action"), ("agentupdate", "Agent Update"), ("chocoinstall", "Ch...
true
true
f75178b6afa0d6b3a9043e9fcd3a602978189a07
1,944
py
Python
python/setup.py
da-tubi/rikai
f97669b5cf7d527bcfb3cde77c97f37431add7a6
[ "Apache-2.0" ]
null
null
null
python/setup.py
da-tubi/rikai
f97669b5cf7d527bcfb3cde77c97f37431add7a6
[ "Apache-2.0" ]
null
null
null
python/setup.py
da-tubi/rikai
f97669b5cf7d527bcfb3cde77c97f37431add7a6
[ "Apache-2.0" ]
null
null
null
import pathlib from setuptools import find_packages, setup about = {} with open(pathlib.Path("rikai") / "__version__.py", "r") as fh: exec(fh.read(), about) with open( pathlib.Path(__file__).absolute().parent.parent / "README.md", "r" ) as fh: long_description = fh.read() # extras dev = [ "black", ...
23.707317
70
0.566872
import pathlib from setuptools import find_packages, setup about = {} with open(pathlib.Path("rikai") / "__version__.py", "r") as fh: exec(fh.read(), about) with open( pathlib.Path(__file__).absolute().parent.parent / "README.md", "r" ) as fh: long_description = fh.read() dev = [ "black", "bump2...
true
true
f751792884889b072124d3a16665a165f5ae32b8
5,290
py
Python
clients/bbg/blpapi-python/examples/unittests/market-data-notifier/src/appconfig.py
vegabook/dstreams
9a2919b36ba2901522a61737a593fea28a655777
[ "MIT" ]
228
2017-06-20T16:14:06.000Z
2022-03-30T02:04:47.000Z
clients/bbg/blpapi-python/examples/unittests/market-data-notifier/src/appconfig.py
vegabook/dstreams
9a2919b36ba2901522a61737a593fea28a655777
[ "MIT" ]
3
2017-05-04T02:48:36.000Z
2018-02-01T13:59:46.000Z
clients/bbg/blpapi-python/examples/unittests/market-data-notifier/src/appconfig.py
vegabook/dstreams
9a2919b36ba2901522a61737a593fea28a655777
[ "MIT" ]
84
2017-11-21T14:56:20.000Z
2022-03-31T15:22:22.000Z
"""Sample command line parser.""" from argparse import ArgumentParser, Action class AuthOptionsAction(Action): # pylint: disable=too-few-public-methods """Parse authorization args from user input.""" def __call__(self, parser, args, values, option_string=None): value = values vals = value.s...
41.007752
79
0.530057
from argparse import ArgumentParser, Action class AuthOptionsAction(Action): def __call__(self, parser, args, values, option_string=None): value = values vals = value.split("=", 1) auth = None if value == "user": auth = {"option" : "AuthenticationType=OS_LOGON"} ...
true
true
f751792d9c9f0f5c8ac6d956c75885dee2179dbb
2,384
py
Python
plot_all_variables_big_a.py
Yurlungur/FLRW
15424d2304e44d0e38110b655c5c28a6aeb34147
[ "MIT" ]
null
null
null
plot_all_variables_big_a.py
Yurlungur/FLRW
15424d2304e44d0e38110b655c5c28a6aeb34147
[ "MIT" ]
null
null
null
plot_all_variables_big_a.py
Yurlungur/FLRW
15424d2304e44d0e38110b655c5c28a6aeb34147
[ "MIT" ]
2
2017-11-23T20:58:13.000Z
2021-12-27T20:48:24.000Z
#!/usr/bin/env python2 # Author: Jonah Miller (jonah.maxwell.miller@gmail.com) # Time-stamp: <2013-12-14 16:50:20 (jonah)> # This is a companion program to my FLRW simulator. It takes a data # file and generates a plot of the scale factor, its derivative, the # density, and the pressure of the matter. # Call the prog...
32.657534
77
0.60948
import numpy as np import scipy as sp import matplotlib as mpl import matplotlib.pyplot as plt import sys, os xlabel = "Cosmological time. (geometrized units)" my_linewidth = 5 fontsize = 20 a_rescaling = 7000 def load_data(filename): with open(filename,'r') as f: data = np.loadtxt(filename).transpos...
true
true
f751793fc5ae6205c9bdb853255ef7654ffaeaaf
1,873
py
Python
examples/funcfit/__main__.py
MaxXSoft/ZexGP
c01d68d134990c0d18f30f12d93855ba5ffcbe29
[ "MIT" ]
1
2021-12-19T00:47:28.000Z
2021-12-19T00:47:28.000Z
examples/funcfit/__main__.py
MaxXSoft/ZexGP
c01d68d134990c0d18f30f12d93855ba5ffcbe29
[ "MIT" ]
null
null
null
examples/funcfit/__main__.py
MaxXSoft/ZexGP
c01d68d134990c0d18f30f12d93855ba5ffcbe29
[ "MIT" ]
1
2020-01-19T13:45:25.000Z
2020-01-19T13:45:25.000Z
''' An example of fitting a function with ZexGP. ''' from zexgp.kernel import Kernel from os import path from sys import float_info as fi from matplotlib import pyplot as plt # some necessary global variables func_val = [] domain = [] def init_func_val(): ''' Initialize function value. ''' def func(x): ret...
19.309278
56
0.63481
from zexgp.kernel import Kernel from os import path from sys import float_info as fi from matplotlib import pyplot as plt func_val = [] domain = [] def init_func_val(): def func(x): return 1 / (1 + 25 * x ** 2) for i in range(100): x = (i - 50) / 50 func_val.append(func(x)) domain.append(x) def g...
true
true
f7517984659598c362a67232aee8e0911840dc3a
5,071
py
Python
gncpy/simulator.py
drjdlarson/gncpy
02c83e110ba1efca08e2c80f42b09be6af078a6f
[ "MIT" ]
4
2021-01-12T02:44:36.000Z
2022-02-15T19:04:59.000Z
gncpy/simulator.py
drjdlarson/gncpy
02c83e110ba1efca08e2c80f42b09be6af078a6f
[ "MIT" ]
null
null
null
gncpy/simulator.py
drjdlarson/gncpy
02c83e110ba1efca08e2c80f42b09be6af078a6f
[ "MIT" ]
null
null
null
import yaml import io import abc from warnings import warn class Parameters: """ Defines basic functionality for loading/saving configuration files. Handles loading, and saving of YAML configuration files. Also, generically, initializes classes based on the loaded configuration. Attributes: ...
35.711268
82
0.531848
import yaml import io import abc from warnings import warn class Parameters: def __init__(self): self.dict = {} def load_files(self, files): def parse_file(self, f): with io.open(f, 'r') as fin: cfg = yaml.safe_load(fin) self.dict = merge(self.dict, cf...
true
true
f75179b59c068966c178bf0589d9cd5408c222ad
1,786
py
Python
getMitoLength.py
ClaudiaPaetzold/MitoHiFi
c06ed3e872e44b41d809cb8b715da670db31be10
[ "MIT" ]
47
2020-08-27T14:40:39.000Z
2022-03-31T06:05:59.000Z
getMitoLength.py
ClaudiaPaetzold/MitoHiFi
c06ed3e872e44b41d809cb8b715da670db31be10
[ "MIT" ]
10
2021-02-25T20:08:01.000Z
2022-01-28T17:35:22.000Z
getMitoLength.py
ClaudiaPaetzold/MitoHiFi
c06ed3e872e44b41d809cb8b715da670db31be10
[ "MIT" ]
12
2020-08-28T04:34:04.000Z
2022-02-03T16:16:00.000Z
#!/usr/bin/env python ''' Copyright 2021 Joāo Ferreira Nunes This script 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 3 of the License, or (at your option) any later version...
35.019608
136
0.708287
def get_mito_length(mito_file): from Bio import SeqIO num_sequences = len(list(SeqIO.parse(mito_file, "fasta"))) if num_sequences > 1: raise Exception("failed because mitogenome file has more than one sequence. {} sequences were found".format(str(num_sequences))) for index, record in enumer...
true
true
f7517b9fb942d12e87445ba204c950ca731bb0c7
939
py
Python
jinja2tool.py
sborgeson/building-data-analysis
867cdae158817d70ea29f0b69b6ff2073a3d0d12
[ "BSD-3-Clause" ]
6
2015-05-10T20:24:06.000Z
2020-05-22T13:48:11.000Z
jinja2tool.py
sborgeson/building-data-analysis
867cdae158817d70ea29f0b69b6ff2073a3d0d12
[ "BSD-3-Clause" ]
null
null
null
jinja2tool.py
sborgeson/building-data-analysis
867cdae158817d70ea29f0b69b6ff2073a3d0d12
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import cherrypy __all__ = ['Jinja2Tool'] class Jinja2Tool(cherrypy.Tool): def __init__(self): cherrypy.Tool.__init__(self, 'before_finalize', self._render, priority=10) def _render(self, template=None, debug...
34.777778
77
0.605964
import cherrypy __all__ = ['Jinja2Tool'] class Jinja2Tool(cherrypy.Tool): def __init__(self): cherrypy.Tool.__init__(self, 'before_finalize', self._render, priority=10) def _render(self, template=None, debug=False): if cher...
true
true
f7517c19d2bc8810a331a4e16b59d5a60182ecd2
6,088
py
Python
orchestra/cli.py
christophbrgr/brats-orchestra
c1cd8ae0fba6311c731eaaabe0151709426b63b9
[ "MIT" ]
8
2018-12-17T14:21:48.000Z
2021-08-02T13:18:48.000Z
orchestra/cli.py
christophbrgr/brats-orchestra
c1cd8ae0fba6311c731eaaabe0151709426b63b9
[ "MIT" ]
1
2021-09-14T13:08:04.000Z
2021-09-17T13:00:55.000Z
orchestra/cli.py
christophbrgr/brats-orchestra
c1cd8ae0fba6311c731eaaabe0151709426b63b9
[ "MIT" ]
2
2019-01-01T15:05:56.000Z
2021-02-23T07:03:52.000Z
# -*- coding: utf-8 -*- # Author: Christoph Berger # Script for evaluation and bulk segmentation of Brain Tumor Scans # using the MICCAI BRATS algorithmic repository # # Please refer to README.md and LICENSE.md for further documentation # This software is not certified for clinical use. import sys import subprocess im...
45.432836
153
0.59412
import sys import subprocess import pprint import argparse from orchestra import segmentor from orchestra import fusionator def list_dockers(): seg = segmentor.Segmentor() pp = pprint.PrettyPrinter(indent=4) pp.pprint(seg.config) def list_docker_ids(): seg = segmentor.Segmentor() pp = pprint.Pr...
true
true
f7517d78b6851fb6b0a2ad741c86fa2bcf613d1b
8,422
py
Python
DQM/Integration/python/clients/l1tstage2_dqm_sourceclient-live_cfg.py
SWuchterl/cmssw
769b4a7ef81796579af7d626da6039dfa0347b8e
[ "Apache-2.0" ]
1
2020-05-27T10:52:33.000Z
2020-05-27T10:52:33.000Z
DQM/Integration/python/clients/l1tstage2_dqm_sourceclient-live_cfg.py
SWuchterl/cmssw
769b4a7ef81796579af7d626da6039dfa0347b8e
[ "Apache-2.0" ]
28
2019-08-15T15:21:11.000Z
2021-12-29T14:13:18.000Z
DQM/Integration/python/clients/l1tstage2_dqm_sourceclient-live_cfg.py
SWuchterl/cmssw
769b4a7ef81796579af7d626da6039dfa0347b8e
[ "Apache-2.0" ]
1
2020-08-18T10:29:49.000Z
2020-08-18T10:29:49.000Z
import FWCore.ParameterSet.Config as cms import sys from Configuration.Eras.Era_Run2_2018_cff import Run2_2018 process = cms.Process("L1TStage2DQM", Run2_2018) unitTest = False if 'unitTest=True' in sys.argv: unitTest=True #-------------------------------------------------- # Event Source and Condition if unitT...
45.037433
99
0.76597
import FWCore.ParameterSet.Config as cms import sys from Configuration.Eras.Era_Run2_2018_cff import Run2_2018 process = cms.Process("L1TStage2DQM", Run2_2018) unitTest = False if 'unitTest=True' in sys.argv: unitTest=True if unitTest: process.load("DQM.Integration.config.unittestinputsource_cfi") from ...
true
true
f7517d8bf6d782380ac48af93f27d749ba4fc19c
3,387
py
Python
script/model/model.py
algebra2k/terrier
8b6f4b0b0c30dc94411f197e610f634ce0ab5b0b
[ "MIT" ]
1
2020-05-27T03:54:36.000Z
2020-05-27T03:54:36.000Z
script/model/model.py
algebra2k/terrier
8b6f4b0b0c30dc94411f197e610f634ce0ab5b0b
[ "MIT" ]
7
2020-04-06T19:31:12.000Z
2020-05-12T23:05:09.000Z
script/model/model.py
algebra2k/terrier
8b6f4b0b0c30dc94411f197e610f634ce0ab5b0b
[ "MIT" ]
3
2020-11-10T11:06:20.000Z
2022-03-26T15:30:55.000Z
#!/usr/bin/env python3 import numpy as np import lightgbm as lgb from sklearn import linear_model from sklearn import kernel_ridge from sklearn import ensemble from sklearn import preprocessing from sklearn import neural_network from sklearn import multioutput # import warnings filter from warnings import simplefil...
32.567308
117
0.653085
import numpy as np import lightgbm as lgb from sklearn import linear_model from sklearn import kernel_ridge from sklearn import ensemble from sklearn import preprocessing from sklearn import neural_network from sklearn import multioutput from warnings import simplefilter simplefilter(action='ignore', category=Futu...
true
true
f7517df6a42f689fbe3d3858c91f574508c8a616
260
py
Python
translate/__init__.py
trumoose/OB13-Cogs
07d37bd93e03fc66f044a5083475eafe397cbd2f
[ "MIT" ]
10
2021-02-18T18:15:16.000Z
2022-02-26T01:49:10.000Z
translate/__init__.py
trumoose/OB13-Cogs
07d37bd93e03fc66f044a5083475eafe397cbd2f
[ "MIT" ]
37
2021-01-22T17:23:16.000Z
2022-03-21T14:39:55.000Z
translate/__init__.py
trumoose/OB13-Cogs
07d37bd93e03fc66f044a5083475eafe397cbd2f
[ "MIT" ]
27
2021-01-22T13:25:17.000Z
2022-03-28T20:49:39.000Z
import json from pathlib import Path from .translate import Translate with open(Path(__file__).parent / "info.json") as fp: __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] async def setup(bot): bot.add_cog(Translate(bot))
23.636364
78
0.765385
import json from pathlib import Path from .translate import Translate with open(Path(__file__).parent / "info.json") as fp: __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] async def setup(bot): bot.add_cog(Translate(bot))
true
true
f7517e207248ce7ede34d60ea98b18b850196ac5
6,171
py
Python
test_morris_api.py
govtmirror/MorrisDataDecorator
a148b579082772c9e43f1aad484e5f8a3520ecc1
[ "CC0-1.0" ]
1
2020-07-23T01:57:58.000Z
2020-07-23T01:57:58.000Z
test_morris_api.py
govtmirror/MorrisDataDecorator
a148b579082772c9e43f1aad484e5f8a3520ecc1
[ "CC0-1.0" ]
null
null
null
test_morris_api.py
govtmirror/MorrisDataDecorator
a148b579082772c9e43f1aad484e5f8a3520ecc1
[ "CC0-1.0" ]
6
2016-12-17T21:53:26.000Z
2021-02-18T11:07:31.000Z
# I'm going to test through an actual web call, so there is no actuall # importation of the morris_api file. Instead, we will rely on Requests. # You need to have Bottle already running on Port 8080 and answering on # localhost for these tests to run. # The set up fixture below starts up the Bottle server on port 80...
37.4
93
0.639118
# importation of the morris_api file. Instead, we will rely on Requests. # You need to have Bottle already running on Port 8080 and answering on # localhost for these tests to run. # The set up fixture below starts up the Bottle server on port 8080. # You could coneivably have a port collision, in which case change ...
false
true
f7517ebb49513bbccd04a3711951b9223ce8a1b7
30,787
py
Python
sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-01-24T08:54:57.000Z
2022-01-24T08:54:57.000Z
sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import os import pytest import platform import functools import json from azure.core.exceptions import HttpResponseError, ClientAuthenticationError from azure.core.crede...
41.324832
152
0.64563
import os import pytest import platform import functools import json from azure.core.exceptions import HttpResponseError, ClientAuthenticationError from azure.core.credentials import AzureKeyCredential from testcase import TextAnalyticsTest, TextAnalyticsPreparer from testcase import TextAnalyticsClientPreparer as _Tex...
true
true
f7518036346d7dd3eca5625a6e764e507f6a048e
58,105
py
Python
Lib/site-packages/tensorflow_core/python/ops/gen_functional_ops.py
shivammaniharsahu/django_api
6ffb3d9f70f30f5fd3ae06ec00a6dd7c7783a797
[ "bzip2-1.0.6" ]
null
null
null
Lib/site-packages/tensorflow_core/python/ops/gen_functional_ops.py
shivammaniharsahu/django_api
6ffb3d9f70f30f5fd3ae06ec00a6dd7c7783a797
[ "bzip2-1.0.6" ]
null
null
null
Lib/site-packages/tensorflow_core/python/ops/gen_functional_ops.py
shivammaniharsahu/django_api
6ffb3d9f70f30f5fd3ae06ec00a6dd7c7783a797
[ "bzip2-1.0.6" ]
null
null
null
"""Python wrappers around TensorFlow ops. This file is MACHINE GENERATED! Do not edit. """ import collections as _collections import six as _six from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow from tensorflow.python.eager import context as _context from tensorflow.python.eager import core as _c...
38.201841
2,841
0.663248
import collections as _collections import six as _six from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow from tensorflow.python.eager import context as _context from tensorflow.python.eager import core as _core from tensorflow.python.eager import execute as _execute from tensorflow.python.framework...
true
true
f7518122a2c461b4c609bfa5c466774175d58100
5,043
py
Python
solutions/networks.py
linusidom/rl-workshop
dbb2ca8b9a5330042a30655ee64c3a4be241d692
[ "MIT" ]
null
null
null
solutions/networks.py
linusidom/rl-workshop
dbb2ca8b9a5330042a30655ee64c3a4be241d692
[ "MIT" ]
null
null
null
solutions/networks.py
linusidom/rl-workshop
dbb2ca8b9a5330042a30655ee64c3a4be241d692
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F from torch import optim from torch.autograd.variable import Variable class QNetwork(nn.Module): def __init__(self, state_size, action_size, nb_hidden, seed=1412): super(QNetwork, self).__init__() self.seed = torch.manual_seed(seed) ...
33.397351
87
0.573666
import torch import torch.nn as nn import torch.nn.functional as F from torch import optim from torch.autograd.variable import Variable class QNetwork(nn.Module): def __init__(self, state_size, action_size, nb_hidden, seed=1412): super(QNetwork, self).__init__() self.seed = torch.manual_seed(seed) ...
true
true
f751818caa2d6291b185da6032fc3f2061e15b31
683
py
Python
var/spack/repos/builtin/packages/py-counter/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
9
2018-04-18T07:51:40.000Z
2021-09-10T03:56:57.000Z
var/spack/repos/builtin/packages/py-counter/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
907
2018-04-18T11:17:57.000Z
2022-03-31T13:20:25.000Z
var/spack/repos/builtin/packages/py-counter/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
29
2018-11-05T16:14:23.000Z
2022-02-03T16:07:09.000Z
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyCounter(PythonPackage): """Counter package defines the "counter.Counter" class similar t...
32.52381
95
0.732064
from spack import * class PyCounter(PythonPackage): import_modules = ['counter'] homepage = "https://github.com/KelSolaar/Counter" url = "https://pypi.io/packages/source/C/Counter/Counter-1.0.0.tar.gz" version('1.0.0', sha256='9e008590e360936a66c98e1a01e7a9a0ecf6af19cc588107121f5fb4613bb60c')...
true
true
f75181c5d63098985a14eea16b0f232ae354fe91
780
py
Python
test/unit/test_keygen.py
nklapste/deadSFS
d63a88d1be51d083a1e59c2d4428f9ce85213fec
[ "MIT" ]
null
null
null
test/unit/test_keygen.py
nklapste/deadSFS
d63a88d1be51d083a1e59c2d4428f9ce85213fec
[ "MIT" ]
null
null
null
test/unit/test_keygen.py
nklapste/deadSFS
d63a88d1be51d083a1e59c2d4428f9ce85213fec
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """pytests for :class:`dead_sfs.keygen`""" import argparse import os from tempfile import TemporaryDirectory import nacl.secret import pytest from dead_sfs.keygen import get_parser, main def test_get_argparser(): parser = get_parser() assert parser assert ...
21.666667
57
0.671795
import argparse import os from tempfile import TemporaryDirectory import nacl.secret import pytest from dead_sfs.keygen import get_parser, main def test_get_argparser(): parser = get_parser() assert parser assert isinstance(parser, argparse.ArgumentParser) def test_gen_key(): with TemporaryDirec...
true
true
f7518216642b83cae785ec244c93a417bf7c6ec7
2,020
py
Python
plot/plot_folder.py
ky-zhang/utils
f1c9d2580db5ef0f0291ae77312b3d538f292a12
[ "Apache-2.0" ]
null
null
null
plot/plot_folder.py
ky-zhang/utils
f1c9d2580db5ef0f0291ae77312b3d538f292a12
[ "Apache-2.0" ]
null
null
null
plot/plot_folder.py
ky-zhang/utils
f1c9d2580db5ef0f0291ae77312b3d538f292a12
[ "Apache-2.0" ]
null
null
null
import os import numpy import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import argparse from PIL import Image parser = argparse.ArgumentParser() parser.add_argument('-input', default = '', help = 'input file folder') parser.add_argument('-label', default = '', help = 'label file') parser.add_ar...
29.275362
88
0.571287
import os import numpy import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import argparse from PIL import Image parser = argparse.ArgumentParser() parser.add_argument('-input', default = '', help = 'input file folder') parser.add_argument('-label', default = '', help = 'label file') parser.add_ar...
true
true
f75182d46dfa5055d5d7433f6a16fc23a6f44749
3,264
py
Python
train_inception_resnet.py
HHcola/nima-image
8364462ff2d59fcb75326782e15df119ebf51c7e
[ "MIT" ]
726
2018-01-02T08:53:19.000Z
2022-03-28T03:51:53.000Z
train_inception_resnet.py
yhtbyr/neural-image-assessment
60e7777a70a97c3ce06323453481c5c284ac43ab
[ "MIT" ]
66
2018-01-03T23:33:41.000Z
2021-11-24T02:56:16.000Z
train_inception_resnet.py
yhtbyr/neural-image-assessment
60e7777a70a97c3ce06323453481c5c284ac43ab
[ "MIT" ]
222
2018-01-02T19:14:40.000Z
2022-02-25T01:10:21.000Z
import os from keras.models import Model from keras.layers import Dense, Dropout from keras.applications.inception_resnet_v2 import InceptionResNetV2 from keras.callbacks import ModelCheckpoint, TensorBoard from keras.optimizers import Adam from keras import backend as K from utils.data_loader import train_generator,...
35.478261
143
0.689338
import os from keras.models import Model from keras.layers import Dense, Dropout from keras.applications.inception_resnet_v2 import InceptionResNetV2 from keras.callbacks import ModelCheckpoint, TensorBoard from keras.optimizers import Adam from keras import backend as K from utils.data_loader import train_generator,...
true
true
f75182e5b0bd8e8eaa9cdbefbadfa2dbcff65645
2,550
py
Python
examples/keras_parikh_entailment/spacy_hook.py
algteam/spacy_zh_model
0b0cba1a3964aa426e5f96087849c90e69e2a89d
[ "MIT" ]
5
2019-04-19T06:27:29.000Z
2019-12-02T13:30:47.000Z
examples/keras_parikh_entailment/spacy_hook.py
algteam/spacy_zh_model
0b0cba1a3964aa426e5f96087849c90e69e2a89d
[ "MIT" ]
null
null
null
examples/keras_parikh_entailment/spacy_hook.py
algteam/spacy_zh_model
0b0cba1a3964aa426e5f96087849c90e69e2a89d
[ "MIT" ]
2
2019-04-19T06:27:18.000Z
2019-10-04T12:39:15.000Z
import numpy as np from keras.models import model_from_json try: import cPickle as pickle except ImportError: import pickle class KerasSimilarityShim(object): entailment_types = ["entailment", "contradiction", "neutral"] @classmethod def load(cls, path, nlp, max_length=100, get_feat...
32.692308
86
0.606667
import numpy as np from keras.models import model_from_json try: import cPickle as pickle except ImportError: import pickle class KerasSimilarityShim(object): entailment_types = ["entailment", "contradiction", "neutral"] @classmethod def load(cls, path, nlp, max_length=100, get_feat...
true
true
f7518416fbf0023780685b2c7e8d36c38502b97c
3,884
py
Python
Python38/Lib/site-packages/libfuturize/fixes/fix_raise.py
AXFS-H/Windows10Debloater
ab5f8a8a8fb065bb40b7ddbd1df75563d8b8d13e
[ "MIT" ]
908
2015-01-01T21:20:45.000Z
2022-03-29T20:47:16.000Z
Python38/Lib/site-packages/libfuturize/fixes/fix_raise.py
AXFS-H/Windows10Debloater
ab5f8a8a8fb065bb40b7ddbd1df75563d8b8d13e
[ "MIT" ]
402
2015-01-04T01:30:19.000Z
2022-03-24T11:56:38.000Z
env/lib/python3.9/site-packages/libfuturize/fixes/fix_raise.py
simotwo/AbileneParadox-ddd
c85961efb37aba43c0d99ed1c36d083507e2b2d3
[ "MIT" ]
305
2015-01-18T19:29:37.000Z
2022-03-24T09:40:09.000Z
"""Fixer for 'raise E, V' From Armin Ronacher's ``python-modernize``. raise -> raise raise E -> raise E raise E, 5 -> raise E(5) raise E, 5, T -> raise E(5).with_traceback(T) raise E, None, T -> raise E.with_traceback(T) raise (((E, E'), E''), E'''), 5 -> raise E(5) raise "foo", V, T -...
35.962963
80
0.538105
from lib2to3 import pytree, fixer_base from lib2to3.pgen2 import token from lib2to3.fixer_util import Name, Call, is_tuple, Comma, Attr, ArgList from libfuturize.fixer_util import touch_import_top class FixRaise(fixer_base.BaseFix): BM_compatible = True PATTERN = """ raise_stmt< 'raise' exc=any [',' va...
true
true
f751843c5b910d43262d503ee3432fc7dfc706a3
696
py
Python
34.py
goldsborough/euler
d0674ac9e9f71318d719c42f91351d40a36acecd
[ "MIT" ]
null
null
null
34.py
goldsborough/euler
d0674ac9e9f71318d719c42f91351d40a36acecd
[ "MIT" ]
null
null
null
34.py
goldsborough/euler
d0674ac9e9f71318d719c42f91351d40a36acecd
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import math def get_factorials(n): f = lambda x: x * f(x - 1) if x else 1 return [f(i) for i in range(n)] def sum_factorial_digits(limit): factorial = get_factorials(10) total = 0 digit_sum = 0 order = int(math.log10(limit)) for n in range(3, int(limit)): digi...
17.846154
39
0.623563
import math def get_factorials(n): f = lambda x: x * f(x - 1) if x else 1 return [f(i) for i in range(n)] def sum_factorial_digits(limit): factorial = get_factorials(10) total = 0 digit_sum = 0 order = int(math.log10(limit)) for n in range(3, int(limit)): digit = n % 10 if digit == 0: digit_sum = 0 ...
true
true
f751848313820964a8833b5fe9ef26d616fea781
383
py
Python
algoexpert/easy/BinarySearch.py
dawar-s/algo-ds-sol-python
c455bb43dd68e177e5c744383c2d17888f4efe1b
[ "MIT" ]
null
null
null
algoexpert/easy/BinarySearch.py
dawar-s/algo-ds-sol-python
c455bb43dd68e177e5c744383c2d17888f4efe1b
[ "MIT" ]
null
null
null
algoexpert/easy/BinarySearch.py
dawar-s/algo-ds-sol-python
c455bb43dd68e177e5c744383c2d17888f4efe1b
[ "MIT" ]
null
null
null
def binarySearch(array, target): return binary_search_helper(array, target, 0, len(array) - 1) def binary_search_helper(array, target, start, end): while start <= end: mid = (start + end) // 2 if array[mid] == target: return mid elif array[mid] > target: end = mi...
25.533333
65
0.548303
def binarySearch(array, target): return binary_search_helper(array, target, 0, len(array) - 1) def binary_search_helper(array, target, start, end): while start <= end: mid = (start + end) // 2 if array[mid] == target: return mid elif array[mid] > target: end = mi...
true
true
f75184e8ca477fdec63b6912526505231a962056
621
py
Python
habrpars/tests/conftest.py
mitrofun/habrpars
c789b1a0a60601258488583d1954ad9a11e03917
[ "MIT" ]
null
null
null
habrpars/tests/conftest.py
mitrofun/habrpars
c789b1a0a60601258488583d1954ad9a11e03917
[ "MIT" ]
null
null
null
habrpars/tests/conftest.py
mitrofun/habrpars
c789b1a0a60601258488583d1954ad9a11e03917
[ "MIT" ]
null
null
null
import os import sys import pytest from bs4 import BeautifulSoup sys.path.insert(0, os.path.abspath('.')) sys.path.append(os.path.join(os.path.abspath('.'), 'habrpars')) @pytest.fixture def page(): path = os.path.abspath('.') filename = os.path.join(path, 'habrpars', 'fixtures', 'page.html') return fil...
20.7
70
0.694042
import os import sys import pytest from bs4 import BeautifulSoup sys.path.insert(0, os.path.abspath('.')) sys.path.append(os.path.join(os.path.abspath('.'), 'habrpars')) @pytest.fixture def page(): path = os.path.abspath('.') filename = os.path.join(path, 'habrpars', 'fixtures', 'page.html') return fil...
true
true
f75185192e9b0da93260c001de06b2f1b828f095
5,159
py
Python
test/python/docker/__init__.py
fredr/podman
2c510146aa03c74fb00a15bcf81c62b14df9c7ea
[ "Apache-2.0" ]
8,575
2020-07-07T20:13:34.000Z
2022-03-31T23:54:14.000Z
test/python/docker/__init__.py
fredr/podman
2c510146aa03c74fb00a15bcf81c62b14df9c7ea
[ "Apache-2.0" ]
6,911
2020-07-07T19:20:47.000Z
2022-03-31T21:28:02.000Z
test/python/docker/__init__.py
fredr/podman
2c510146aa03c74fb00a15bcf81c62b14df9c7ea
[ "Apache-2.0" ]
1,066
2020-07-08T10:03:02.000Z
2022-03-31T20:31:01.000Z
import configparser import json import os import pathlib import shutil import subprocess import tempfile from docker import DockerClient from .compat import constant class Podman(object): """ Instances hold the configuration and setup for running podman commands """ def __init__(self): """I...
32.446541
87
0.542159
import configparser import json import os import pathlib import shutil import subprocess import tempfile from docker import DockerClient from .compat import constant class Podman(object): def __init__(self): binary = os.getenv("PODMAN", "bin/podman") self.cmd = [binary, "--storage-driver=vfs"] ...
true
true
f7518529d74c4a9b256a5e6fcbeb5d2ae51be081
822
py
Python
venv/Lib/site-packages/stevedore/example/load_as_extension.py
dhina016/OnCV
2429ba7bc8589e92b2c273af6e8763487e1e05a8
[ "Unlicense", "MIT" ]
null
null
null
venv/Lib/site-packages/stevedore/example/load_as_extension.py
dhina016/OnCV
2429ba7bc8589e92b2c273af6e8763487e1e05a8
[ "Unlicense", "MIT" ]
4
2021-03-31T20:05:34.000Z
2022-01-13T03:08:13.000Z
virtual/lib/python3.6/site-packages/stevedore/example/load_as_extension.py
Mercy-Njoroge/blog
404336fb0fc8d172ddde8b744042cb3f37d89c65
[ "MIT" ]
null
null
null
import argparse from stevedore import extension if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument( '--width', default=60, type=int, help='maximum output width for text', ) parsed_args = parser.parse_args() data = { 'a': 'A',...
21.631579
48
0.568127
import argparse from stevedore import extension if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument( '--width', default=60, type=int, help='maximum output width for text', ) parsed_args = parser.parse_args() data = { 'a': 'A',...
true
true
f75186a97bc67da8842edfb0c9171a8aad3347f4
310
py
Python
src/logger.py
neilchristanto/ValDashboard
d62d04020081c114c67d80e52726ad827a180ba0
[ "MIT" ]
null
null
null
src/logger.py
neilchristanto/ValDashboard
d62d04020081c114c67d80e52726ad827a180ba0
[ "MIT" ]
null
null
null
src/logger.py
neilchristanto/ValDashboard
d62d04020081c114c67d80e52726ad827a180ba0
[ "MIT" ]
null
null
null
import logging def setup(): formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') handler = logging.StreamHandler() handler.setFormatter(formatter) logger = logging.getLogger('root') logger.setLevel(logging.INFO) logger.addHandler(handler)
25.833333
90
0.664516
import logging def setup(): formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') handler = logging.StreamHandler() handler.setFormatter(formatter) logger = logging.getLogger('root') logger.setLevel(logging.INFO) logger.addHandler(handler)
true
true
f75187331ff8fce8d8a8124268b486adfe91c051
39,373
py
Python
ParseCellInfo.py
husensofteng/pancancer_analysis
d250e3c7bcd153378c8d729e4f40ec2366e2e059
[ "MIT" ]
null
null
null
ParseCellInfo.py
husensofteng/pancancer_analysis
d250e3c7bcd153378c8d729e4f40ec2366e2e059
[ "MIT" ]
4
2020-02-12T12:48:49.000Z
2020-03-12T16:19:56.000Z
ParseCellInfo.py
husensofteng/pancancer_analysis
d250e3c7bcd153378c8d729e4f40ec2366e2e059
[ "MIT" ]
null
null
null
''' Created on Mar 23, 2016 @author: Husen M. Umer ''' import os, sys import urllib2 import gzip import pybedtools from pybedtools import BedTool import shutil def generate_list_of_accession_info(encode_metadata_inputfile, biosample_name_to_extract, assay_type, accepted_file_formats=[], default_target_name="Unknown"...
77.966337
552
0.608158
''' Created on Mar 23, 2016 @author: Husen M. Umer ''' import os, sys import urllib2 import gzip import pybedtools from pybedtools import BedTool import shutil def generate_list_of_accession_info(encode_metadata_inputfile, biosample_name_to_extract, assay_type, accepted_file_formats=[], default_target_name="Unknown"...
false
true
f7518891c4978b63a0940978ed6e938a41560e6a
403
py
Python
lesson15/template_test/template_test/wsgi.py
drednout/letspython
9747442d63873b5f71e2c15ed5528bd98ad5ac31
[ "BSD-2-Clause" ]
1
2015-11-26T15:53:58.000Z
2015-11-26T15:53:58.000Z
lesson15/template_test/template_test/wsgi.py
drednout/letspython
9747442d63873b5f71e2c15ed5528bd98ad5ac31
[ "BSD-2-Clause" ]
null
null
null
lesson15/template_test/template_test/wsgi.py
drednout/letspython
9747442d63873b5f71e2c15ed5528bd98ad5ac31
[ "BSD-2-Clause" ]
null
null
null
""" WSGI config for template_test project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO...
23.705882
78
0.791563
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "template_test.settings") application = get_wsgi_application()
true
true
f7518939fa39f6b97f5ad00f5a33b2e60c21bb89
5,578
py
Python
train.py
nabeelyousfi/MyoEmg
c819712d93bfb58828b36669e55cd4d77453c1cf
[ "MIT" ]
3
2019-10-22T01:58:42.000Z
2021-04-22T07:47:55.000Z
train.py
nabeelyousfi/MyoEmg
c819712d93bfb58828b36669e55cd4d77453c1cf
[ "MIT" ]
null
null
null
train.py
nabeelyousfi/MyoEmg
c819712d93bfb58828b36669e55cd4d77453c1cf
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Wed Aug 29 13:39:13 2018 @author: Hassan Yousuf & Nabeel Hussain """ from __future__ import print_function import sklearn.ensemble from sklearn import metrics from myo import init, Hub, DeviceListener, StreamEmg from time import sleep import numpy as np import threading import co...
22.954733
114
0.571352
from __future__ import print_function import sklearn.ensemble from sklearn import metrics from myo import init, Hub, DeviceListener, StreamEmg from time import sleep import numpy as np import threading import collections import _pickle as cPickle def unison_shuffled_copies(a, b): assert len(a) == len(b) p = n...
true
true
f7518acc9b376aa822bc44150a21860b8a8e798b
1,245
py
Python
EmailSender.py
VirajVShetty/Coronavirus-Update
d3fd6fca4046ccf3c4943e1fda4b1ed2c7dfca49
[ "MIT" ]
1
2022-02-03T05:14:22.000Z
2022-02-03T05:14:22.000Z
EmailSender.py
VirajVShetty/Coronavirus-Update
d3fd6fca4046ccf3c4943e1fda4b1ed2c7dfca49
[ "MIT" ]
null
null
null
EmailSender.py
VirajVShetty/Coronavirus-Update
d3fd6fca4046ccf3c4943e1fda4b1ed2c7dfca49
[ "MIT" ]
null
null
null
#!/usr/bin/python """ Authors - Akshay Sonawane and Viraj Shetty """ import smtplib from Corona_Updates import update sender = 'corona.updates.av.2020@gmail.com' receivers = ['akshaysonawane10526@gmail.com', 'virajshetty1@hotmail.com'] pwd = 'sakecboys-akvi' if __name__ == "__main__": india_list, india_percent...
28.295455
141
0.615261
import smtplib from Corona_Updates import update sender = 'corona.updates.av.2020@gmail.com' receivers = ['akshaysonawane10526@gmail.com', 'virajshetty1@hotmail.com'] pwd = 'sakecboys-akvi' if __name__ == "__main__": india_list, india_percent, maha_list, maha_percent = update() message = """From: From Per...
true
true
f7518ad37eb1105e798d11095b8112277a779307
92
py
Python
{{ cookiecutter.repo_name }}/virtualenv/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/context_processors.py
pspierce/django-docker-virtualenv-mezzanine-coookiecutter
a9889793e4d3d20b374ca9c56ac069d3f31b0b22
[ "BSD-2-Clause" ]
35
2015-03-23T10:47:51.000Z
2021-08-30T15:55:27.000Z
backend/configuration/context_processors.py
victor-42/pws-secrets
108aa442801e2133a954a3e55054c0a12e7f563b
[ "MIT" ]
4
2015-03-21T23:33:25.000Z
2021-06-10T21:05:41.000Z
backend/configuration/context_processors.py
victor-42/pws-secrets
108aa442801e2133a954a3e55054c0a12e7f563b
[ "MIT" ]
12
2015-04-03T01:49:52.000Z
2018-08-27T22:19:52.000Z
from django.conf import settings def debug(context): return {'DEBUG': settings.DEBUG}
15.333333
36
0.728261
from django.conf import settings def debug(context): return {'DEBUG': settings.DEBUG}
true
true
f7518ae6919374a255c89e9e3e873d7f90284af0
25,493
py
Python
sherlock.py
alwakri3333/sherlock
e4d4224893a2d1f3c28e8cf6dd6c20dd3b2e1a8c
[ "MIT" ]
null
null
null
sherlock.py
alwakri3333/sherlock
e4d4224893a2d1f3c28e8cf6dd6c20dd3b2e1a8c
[ "MIT" ]
null
null
null
sherlock.py
alwakri3333/sherlock
e4d4224893a2d1f3c28e8cf6dd6c20dd3b2e1a8c
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 """ Sherlock: Find Usernames Across Social Networks Module This module contains the main logic to search for usernames at social networks. """ import csv import json import os import platform import re import sys import random from argparse import ArgumentParser, RawDescriptionHelpFormatter f...
41.929276
163
0.57961
import csv import json import os import platform import re import sys import random from argparse import ArgumentParser, RawDescriptionHelpFormatter from concurrent.futures import ThreadPoolExecutor from time import time import requests from colorama import Fore, Style, init from requests_futures.sessions import Fu...
true
true
f7518bc3e51cdac9aa17ba4625c6ff93e24d276b
222
py
Python
scripts/init.py
nullzero/wprobot
1677d09e11e51a0200e54778dd0071770bfa6a51
[ "MIT" ]
1
2021-04-15T06:25:03.000Z
2021-04-15T06:25:03.000Z
scripts/init.py
nullzero/wprobot
1677d09e11e51a0200e54778dd0071770bfa6a51
[ "MIT" ]
null
null
null
scripts/init.py
nullzero/wprobot
1677d09e11e51a0200e54778dd0071770bfa6a51
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- import os if "WPROBOT_DIR" not in os.environ: import sys sys.path.append(os.path.abspath( os.path.join(os.path.dirname(__file__), ".."))) import wprobot
20.181818
59
0.612613
import os if "WPROBOT_DIR" not in os.environ: import sys sys.path.append(os.path.abspath( os.path.join(os.path.dirname(__file__), ".."))) import wprobot
true
true
f7518d0f0d57f9546b44e6bd0d9697b7fa8e3056
33,147
py
Python
dev/tasks/crossbow.py
DavisVaughan/arrow
0568544531437366d3b6ded87f6f9ced8d749d72
[ "Apache-2.0" ]
null
null
null
dev/tasks/crossbow.py
DavisVaughan/arrow
0568544531437366d3b6ded87f6f9ced8d749d72
[ "Apache-2.0" ]
null
null
null
dev/tasks/crossbow.py
DavisVaughan/arrow
0568544531437366d3b6ded87f6f9ced8d749d72
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "L...
35.337953
79
0.600537
import os import re import time import click import hashlib import gnupg import toolz import pygit2 import github3 import jira.client from io import StringIO from pathlib import Path from textwrap import dedent from datetime import datetime from jinja2 import Template, StrictUndefined from setuptools_scm.git import ...
true
true
f7518d15c29b584de3322bff7a21ec5d09f86d6f
87
py
Python
contests_atcoder/abc156/abc156_b.py
takelifetime/competitive-programming
e7cf8ef923ccefad39a1727ca94c610d650fcb76
[ "BSD-2-Clause" ]
null
null
null
contests_atcoder/abc156/abc156_b.py
takelifetime/competitive-programming
e7cf8ef923ccefad39a1727ca94c610d650fcb76
[ "BSD-2-Clause" ]
1
2021-01-02T06:36:51.000Z
2021-01-02T06:36:51.000Z
contests_atcoder/abc156/abc156_b.py
takelifetime/competitive-programming
e7cf8ef923ccefad39a1727ca94c610d650fcb76
[ "BSD-2-Clause" ]
null
null
null
n, k = map(int, input().split()) ans = 0 while n: n //= k ans += 1 print(ans)
10.875
32
0.482759
n, k = map(int, input().split()) ans = 0 while n: n //= k ans += 1 print(ans)
true
true
f7518d1c1514c0957629ca60d8170a36f9d3e6cc
854
py
Python
tests/test_api.py
mcstro/natural-neighbor-interpolation
76ba7bb50c84aef35e993902c46824e5991df45d
[ "MIT" ]
64
2017-09-17T00:37:20.000Z
2022-02-03T20:16:54.000Z
tests/test_api.py
mcstro/natural-neighbor-interpolation
76ba7bb50c84aef35e993902c46824e5991df45d
[ "MIT" ]
5
2018-07-27T16:31:35.000Z
2020-06-15T02:53:48.000Z
tests/test_api.py
mcstro/natural-neighbor-interpolation
76ba7bb50c84aef35e993902c46824e5991df45d
[ "MIT" ]
13
2018-06-06T18:51:50.000Z
2021-12-26T02:47:05.000Z
import scipy.interpolate import numpy as np import pytest import naturalneighbor @pytest.mark.parametrize("grid_ranges", [ [[0, 4, 0.6], [-3, 3, 1.0], [0, 1, 3]], [[0, 2, 1], [0, 2, 1j], [0, 2, 2j]], [[0, 2, 1 + 1j], [0, 2, -10j], [0, 2, 2j]], [[0, 2, 1 + 1j], [0, 2, -0.9j], [0, 2, 2.1j]], ]) def tes...
30.5
73
0.617096
import scipy.interpolate import numpy as np import pytest import naturalneighbor @pytest.mark.parametrize("grid_ranges", [ [[0, 4, 0.6], [-3, 3, 1.0], [0, 1, 3]], [[0, 2, 1], [0, 2, 1j], [0, 2, 2j]], [[0, 2, 1 + 1j], [0, 2, -10j], [0, 2, 2j]], [[0, 2, 1 + 1j], [0, 2, -0.9j], [0, 2, 2.1j]], ]) def tes...
true
true
f7518d47bcf3dcd5f5aece5e69810c7101d8cd0f
841
py
Python
setup.py
pangbo13/HeadersFormatter
e4fac6ab0b9d7973447c36b0fff23832f2954f3d
[ "MIT" ]
null
null
null
setup.py
pangbo13/HeadersFormatter
e4fac6ab0b9d7973447c36b0fff23832f2954f3d
[ "MIT" ]
null
null
null
setup.py
pangbo13/HeadersFormatter
e4fac6ab0b9d7973447c36b0fff23832f2954f3d
[ "MIT" ]
null
null
null
import setuptools with open('README.md','r',encoding='utf-8') as fh: long_description = fh.read() setuptools.setup( name = 'HeadersFormatter', version = '0.0.2', author = 'pangbo', author_email = '373108669@qq.com', description = 'Format headers in clipboard to <dict>.', long_de...
32.346154
60
0.636147
import setuptools with open('README.md','r',encoding='utf-8') as fh: long_description = fh.read() setuptools.setup( name = 'HeadersFormatter', version = '0.0.2', author = 'pangbo', author_email = '373108669@qq.com', description = 'Format headers in clipboard to <dict>.', long_de...
true
true
f7518e0211a460f0f8b0f92f85a83a01e8b7d2cd
876
py
Python
manager/subsite_urls.py
willArrive/brand-manager
8fc9b07921b970e88c2e2abd2a69c0e8a27ad212
[ "MIT" ]
3
2016-11-17T14:21:25.000Z
2019-11-15T16:25:11.000Z
manager/subsite_urls.py
willArrive/brand-manager
8fc9b07921b970e88c2e2abd2a69c0e8a27ad212
[ "MIT" ]
null
null
null
manager/subsite_urls.py
willArrive/brand-manager
8fc9b07921b970e88c2e2abd2a69c0e8a27ad212
[ "MIT" ]
1
2016-12-19T23:32:48.000Z
2016-12-19T23:32:48.000Z
from django.conf.urls import patterns, include, url from django.contrib import admin from tastypie.api import Api from manager.apps.brand.api import BrandResource # [#58] , BrandOwnerResource from django.conf import settings admin.autodiscover() v1_api = Api(api_name='v1') v1_api.register(BrandResource()) # Postpone...
27.375
78
0.676941
from django.conf.urls import patterns, include, url from django.contrib import admin from tastypie.api import Api from manager.apps.brand.api import BrandResource from django.conf import settings admin.autodiscover() v1_api = Api(api_name='v1') v1_api.register(BrandResource()) urlpatterns = patterns( '', u...
true
true
f7518e2b854edd0868e8c9548138cbabff19c73b
1,484
py
Python
2021_1/sql_principle/prac_1/src/upload_geodata.py
Ahtkom/hello-world
3a81bd25713513836c9242fe943b171ff731cfce
[ "MIT" ]
null
null
null
2021_1/sql_principle/prac_1/src/upload_geodata.py
Ahtkom/hello-world
3a81bd25713513836c9242fe943b171ff731cfce
[ "MIT" ]
null
null
null
2021_1/sql_principle/prac_1/src/upload_geodata.py
Ahtkom/hello-world
3a81bd25713513836c9242fe943b171ff731cfce
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd import psycopg2, sys hostname, user, dbname, passward = sys.argv[1:5] def load_data(): lon0, lat0 = 115.8, 29.4 x = pd.read_excel('../data/x.xlsx', header=0, index_col=0).values y = pd.read_excel('../data/y.xlsx', header=0, index_col=0).values lon = lon0 + ...
31.574468
87
0.565364
import numpy as np import pandas as pd import psycopg2, sys hostname, user, dbname, passward = sys.argv[1:5] def load_data(): lon0, lat0 = 115.8, 29.4 x = pd.read_excel('../data/x.xlsx', header=0, index_col=0).values y = pd.read_excel('../data/y.xlsx', header=0, index_col=0).values lon = lon0 + ...
true
true
f7518e49f4844baf09d5ced73c81065ff636825e
565
py
Python
PythonCursoEmVideo/Cores.py
FlavioGalera/pythonProject
73a5f99d9bfa3ebed6f02dc41e534d1ab6b8bb10
[ "MIT" ]
null
null
null
PythonCursoEmVideo/Cores.py
FlavioGalera/pythonProject
73a5f99d9bfa3ebed6f02dc41e534d1ab6b8bb10
[ "MIT" ]
null
null
null
PythonCursoEmVideo/Cores.py
FlavioGalera/pythonProject
73a5f99d9bfa3ebed6f02dc41e534d1ab6b8bb10
[ "MIT" ]
null
null
null
''' style text background(fundo) 0 = sem estilo 30 =branco 40 =branco 1 = negrito 31 =vermelho 41 =vermelho 4 = sublinhado 32 =verde 42 =verde 7 = iverte cores 33 =amarelo 43 =amarelo ...
43.461538
61
0.384071
print('\033[1;37;46mOlá, mundo!\033[m')
true
true
f7518ee64b9f9f3755d18eb2c751c6f6f0c78cff
1,215
py
Python
django_messages_framework/storage/session.py
none-da/zeshare
6c13cd3bd9d82d89f53d4a8b287fe2c30f1d3779
[ "BSD-3-Clause" ]
null
null
null
django_messages_framework/storage/session.py
none-da/zeshare
6c13cd3bd9d82d89f53d4a8b287fe2c30f1d3779
[ "BSD-3-Clause" ]
null
null
null
django_messages_framework/storage/session.py
none-da/zeshare
6c13cd3bd9d82d89f53d4a8b287fe2c30f1d3779
[ "BSD-3-Clause" ]
1
2021-04-12T11:43:38.000Z
2021-04-12T11:43:38.000Z
from django_messages_framework.storage.base import BaseStorage class SessionStorage(BaseStorage): """ Stores messages in the session (that is, django.contrib.sessions). """ session_key = '_messages' def __init__(self, request, *args, **kwargs): assert hasattr(request, 'session'), "The ses...
35.735294
78
0.637037
from django_messages_framework.storage.base import BaseStorage class SessionStorage(BaseStorage): session_key = '_messages' def __init__(self, request, *args, **kwargs): assert hasattr(request, 'session'), "The session-based temporary "\ "message storage requires session middleware to be ...
true
true
f7518f7d50829efa1812bffb6ba6b29ea11fdebd
14,340
py
Python
applications/incompressible_fluid_application/python_scripts/edgebased_levelset_substep_solver.py
lcirrott/Kratos
8406e73e0ad214c4f89df4e75e9b29d0eb4a47ea
[ "BSD-4-Clause" ]
2
2019-10-25T09:28:10.000Z
2019-11-21T12:51:46.000Z
applications/incompressible_fluid_application/python_scripts/edgebased_levelset_substep_solver.py
lcirrott/Kratos
8406e73e0ad214c4f89df4e75e9b29d0eb4a47ea
[ "BSD-4-Clause" ]
13
2019-10-07T12:06:51.000Z
2020-02-18T08:48:33.000Z
applications/incompressible_fluid_application/python_scripts/edgebased_levelset_substep_solver.py
lcirrott/Kratos
8406e73e0ad214c4f89df4e75e9b29d0eb4a47ea
[ "BSD-4-Clause" ]
null
null
null
from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7 # importing the Kratos Library from KratosMultiphysics import * from KratosMultiphysics.IncompressibleFluidApplication import * from KratosMultiphysics.MeshingApplication import * def ...
36.675192
134
0.628033
from __future__ import print_function, absolute_import, division from KratosMultiphysics import * from KratosMultiphysics.IncompressibleFluidApplication import * from KratosMultiphysics.MeshingApplication import * def AddVariables(model_part): model_part.AddNodalSolutionStepVariable(VELOCITY) model_part.AddNod...
true
true
f751902f3e982ffd5695a5a2b355aef7e5d3c349
21,485
py
Python
google/cloud/compute_v1/services/firewalls/transports/rest.py
Ctfbuster/python-compute
7a9e8324e08c46a93050908760b2b5aca054a863
[ "Apache-2.0" ]
19
2021-02-10T21:17:20.000Z
2022-02-20T03:16:36.000Z
google/cloud/compute_v1/services/firewalls/transports/rest.py
Ctfbuster/python-compute
7a9e8324e08c46a93050908760b2b5aca054a863
[ "Apache-2.0" ]
121
2021-01-08T23:46:58.000Z
2022-03-26T04:34:36.000Z
google/cloud/compute_v1/services/firewalls/transports/rest.py
Ctfbuster/python-compute
7a9e8324e08c46a93050908760b2b5aca054a863
[ "Apache-2.0" ]
20
2021-01-08T23:14:16.000Z
2022-02-25T01:27:20.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...
40.158879
96
0.611915
import warnings from typing import Callable, Dict, Optional, Sequence, Tuple from google.api_core import gapic_v1 from google.api_core import exceptions as core_exceptions from google.auth import credentials as ga_credentials from google.auth.transport.grpc import SslCredentials import grpc from google.auth.tra...
true
true
f7519096be759c1b15b7d0e4ae610b0c5c3ec70b
785
py
Python
deploy/aws.py
Austin-Schmidli/Image-Metadata-API
73e7f9cbcd397d6aefe53a75dbb9ff4e6a924f7d
[ "MIT" ]
null
null
null
deploy/aws.py
Austin-Schmidli/Image-Metadata-API
73e7f9cbcd397d6aefe53a75dbb9ff4e6a924f7d
[ "MIT" ]
null
null
null
deploy/aws.py
Austin-Schmidli/Image-Metadata-API
73e7f9cbcd397d6aefe53a75dbb9ff4e6a924f7d
[ "MIT" ]
null
null
null
import argparse import boto3 """Helper module to assist in AWS deployments""" def get_lambda_client( aws_access_key_id: str, aws_secret_access_key: str, aws_region: str ) -> boto3.client: return boto3.client( "lambda", aws_access_key_id=aws_access_key_id, aws_secret_access_key=aws_se...
26.166667
82
0.703185
import argparse import boto3 def get_lambda_client( aws_access_key_id: str, aws_secret_access_key: str, aws_region: str ) -> boto3.client: return boto3.client( "lambda", aws_access_key_id=aws_access_key_id, aws_secret_access_key=aws_secret_access_key, region_name=aws_region, ...
true
true
f75190f721a7a771cdf499fe8d13b52923007344
57,459
py
Python
electrum/network.py
mgrychow/electrum-vault
a15b0fc5db4e83801cd7f1ba3defd56daa0b058a
[ "MIT" ]
8
2020-03-18T21:55:38.000Z
2021-03-01T12:54:47.000Z
electrum/network.py
mgrychow/electrum-vault
a15b0fc5db4e83801cd7f1ba3defd56daa0b058a
[ "MIT" ]
6
2020-07-10T13:17:21.000Z
2021-04-26T11:47:22.000Z
electrum/network.py
mgrychow/electrum-vault
a15b0fc5db4e83801cd7f1ba3defd56daa0b058a
[ "MIT" ]
8
2020-05-10T11:04:15.000Z
2021-05-06T14:51:46.000Z
# Electrum - Lightweight Bitcoin Client # Copyright (c) 2011-2016 Thomas Voegtlin # # 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 rig...
43.202256
130
0.629005
import time import queue import os import random import re from collections import defaultdict import threading import socket import json import sys import ipaddress import asyncio from typing import NamedTuple, Optional, Sequence, List, Dict, Tuple, TYPE_CHECKING import traceback import dns import dns.resolver import...
true
true
f751910b42c511e6b4134312b98a5f1af4855a59
4,020
py
Python
server/__init__.py
weizhongtan/spotify-playlist-tools
92e151343bb0953ef9f6149d4591c16d146895d7
[ "MIT" ]
null
null
null
server/__init__.py
weizhongtan/spotify-playlist-tools
92e151343bb0953ef9f6149d4591c16d146895d7
[ "MIT" ]
null
null
null
server/__init__.py
weizhongtan/spotify-playlist-tools
92e151343bb0953ef9f6149d4591c16d146895d7
[ "MIT" ]
null
null
null
from flask import Flask, url_for, redirect, render_template, request, make_response, session, jsonify from flask_session import Session from flask_caching import Cache from dotenv import load_dotenv import os import spotipy from spotipy.oauth2 import SpotifyOAuth from spotipy.cache_handler import CacheFileHandler impor...
30.454545
101
0.664428
from flask import Flask, url_for, redirect, render_template, request, make_response, session, jsonify from flask_session import Session from flask_caching import Cache from dotenv import load_dotenv import os import spotipy from spotipy.oauth2 import SpotifyOAuth from spotipy.cache_handler import CacheFileHandler impor...
true
true
f7519313e60b035c69184fe1fd027f49357ac3d8
7,266
py
Python
jcvi/assembly/pbjelly.py
fossabot/jcvi
86948affd63e94c8327cf117c47d36940b508b68
[ "BSD-2-Clause" ]
1
2020-10-04T13:21:24.000Z
2020-10-04T13:21:24.000Z
jcvi/assembly/pbjelly.py
Wangjien/jcvi
6732285f62dcbd7f3878e5017c3350124530c796
[ "BSD-2-Clause" ]
null
null
null
jcvi/assembly/pbjelly.py
Wangjien/jcvi
6732285f62dcbd7f3878e5017c3350124530c796
[ "BSD-2-Clause" ]
1
2020-11-16T19:25:30.000Z
2020-11-16T19:25:30.000Z
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ Run PBJelly on reference FASTA and a set of patching reads. Sometimes patching 'reads' can also be contigs, which require setting the blasr criteria to be higher in `Protocol.xml`. """ from __future__ import print_function import os import os.path as op import sys imp...
29.064
90
0.601018
from __future__ import print_function import os import os.path as op import sys import logging from collections import defaultdict from jcvi.formats.base import must_open from jcvi.utils.cbook import percentage from jcvi.apps.base import OptionParser, ActionDispatcher, sh, which class Protocol (object): def ...
true
true
f7519424f74fd80733985e44f57945b738f91814
3,215
py
Python
metroverse/metroblocks/pages/boost.py
ipince/nftools
8a011884c4a257952ec32b8f13e3fd3bd6bbaaa5
[ "MIT" ]
2
2022-01-26T22:42:09.000Z
2022-01-27T20:20:06.000Z
metroverse/metroblocks/pages/boost.py
ipince/nftools
8a011884c4a257952ec32b8f13e3fd3bd6bbaaa5
[ "MIT" ]
null
null
null
metroverse/metroblocks/pages/boost.py
ipince/nftools
8a011884c4a257952ec32b8f13e3fd3bd6bbaaa5
[ "MIT" ]
null
null
null
from . import util from engine import metroverse as mv def render_boosts(blocks=None, highlight=False, render_stacked=False): active_boosts = mv.active_boosts(blocks) names = set() if blocks is not None: for block in blocks: names.update(block['buildings']['all'].keys()) large_ho...
37.383721
133
0.536858
from . import util from engine import metroverse as mv def render_boosts(blocks=None, highlight=False, render_stacked=False): active_boosts = mv.active_boosts(blocks) names = set() if blocks is not None: for block in blocks: names.update(block['buildings']['all'].keys()) large_ho...
true
true
f75194687283cbcb8abc63a41333e55cc7b31303
978
py
Python
notes-n-resources/Data-Structures-N-Algo/_DS-n-Algos/_Another-One/sorts/topological_sort.py
side-projects-42/INTERVIEW-PREP-COMPLETE
627a3315cee4bbc38a0e81c256f27f928eac2d63
[ "MIT" ]
13
2021-03-11T00:25:22.000Z
2022-03-19T00:19:23.000Z
notes-n-resources/Data-Structures-N-Algo/_DS-n-Algos/_Another-One/sorts/topological_sort.py
side-projects-42/INTERVIEW-PREP-COMPLETE
627a3315cee4bbc38a0e81c256f27f928eac2d63
[ "MIT" ]
160
2021-04-26T19:04:15.000Z
2022-03-26T20:18:37.000Z
notes-n-resources/Data-Structures-N-Algo/_DS-n-Algos/_Another-One/sorts/topological_sort.py
side-projects-42/INTERVIEW-PREP-COMPLETE
627a3315cee4bbc38a0e81c256f27f928eac2d63
[ "MIT" ]
12
2021-04-26T19:43:01.000Z
2022-01-31T08:36:29.000Z
from __future__ import print_function # a # / \ # b c # / \ # d e edges = {"a": ["c", "b"], "b": ["d", "e"], "c": [], "d": [], "e": []} vertices = ["a", "b", "c", "d", "e"] def topological_sort(start, visited, sort): """Perform topolical sort on a directed acyclic graph.""" current = start # ...
27.942857
69
0.595092
from __future__ import print_function edges = {"a": ["c", "b"], "b": ["d", "e"], "c": [], "d": [], "e": []} vertices = ["a", "b", "c", "d", "e"] def topological_sort(start, visited, sort): current = start visited.append(current) neighbors = edges[current] for neighbor in neighbors: ...
true
true
f751965f7bee401402b19d6a219dbf201b2763c0
3,398
py
Python
configs/ttfnet/ttfnet_r18_ciou_wh1_1x.py
mrsempress/mmdetection
cb650560c97a2fe56a9b369a1abc8ec17e06583a
[ "Apache-2.0" ]
null
null
null
configs/ttfnet/ttfnet_r18_ciou_wh1_1x.py
mrsempress/mmdetection
cb650560c97a2fe56a9b369a1abc8ec17e06583a
[ "Apache-2.0" ]
null
null
null
configs/ttfnet/ttfnet_r18_ciou_wh1_1x.py
mrsempress/mmdetection
cb650560c97a2fe56a9b369a1abc8ec17e06583a
[ "Apache-2.0" ]
null
null
null
# model settings model = dict( type='TTFNet', pretrained='modelzoo://resnet18', backbone=dict( type='ResNet', depth=18, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, norm_eval=False, style='pytorch'), neck=None, bbox_head=dict( ...
29.807018
77
0.630959
model = dict( type='TTFNet', pretrained='modelzoo://resnet18', backbone=dict( type='ResNet', depth=18, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, norm_eval=False, style='pytorch'), neck=None, bbox_head=dict( type='TTFHead'...
true
true
f7519752096720b558cc48482e85bc955853e1bc
6,340
py
Python
planet/splice.py
xaviershay/reader
7c713c90ff546032e4723a232a32107ebae88278
[ "CNRI-Python-GPL-Compatible" ]
1
2016-05-09T10:18:18.000Z
2016-05-09T10:18:18.000Z
planet/splice.py
xaviershay/reader
7c713c90ff546032e4723a232a32107ebae88278
[ "CNRI-Python-GPL-Compatible" ]
4
2015-09-04T06:26:22.000Z
2021-09-04T12:33:32.000Z
planet/splice.py
xaviershay/reader
7c713c90ff546032e4723a232a32107ebae88278
[ "CNRI-Python-GPL-Compatible" ]
3
2015-09-04T05:44:12.000Z
2018-05-11T13:06:03.000Z
""" Splice together a planet from a cache of feed entries """ import glob, os, time, shutil from xml.dom import minidom import planet, config, feedparser, reconstitute, shell from reconstitute import createTextElement, date from spider import filename from planet import idindex def splice(): """ Splice together a ...
37.738095
79
0.586751
""" Splice together a planet from a cache of feed entries """ import glob, os, time, shutil from xml.dom import minidom import planet, config, feedparser, reconstitute, shell from reconstitute import createTextElement, date from spider import filename from planet import idindex def splice(): """ Splice together a ...
false
true
f75197db0d5043fe351ad2be154d400c859209b0
965
py
Python
setup.py
refnode/spartakiade-2021-session-effective-python
6b1a25c4ec79261de4ed6385a81b6a31a06d6b58
[ "Apache-2.0" ]
1
2021-06-04T14:05:31.000Z
2021-06-04T14:05:31.000Z
setup.py
refnode/spartakiade-2021-session-effective-python
6b1a25c4ec79261de4ed6385a81b6a31a06d6b58
[ "Apache-2.0" ]
null
null
null
setup.py
refnode/spartakiade-2021-session-effective-python
6b1a25c4ec79261de4ed6385a81b6a31a06d6b58
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """The setup script.""" from setuptools import setup, find_packages with open("README.adoc") as fh_readme: readme = fh_readme.read() install_reqs = [] setup( author="Sven Wilhelm", author_email='refnode@gmail.com', python_requires='>=3.8', classifiers=[ 'Developmen...
28.382353
79
0.675648
from setuptools import setup, find_packages with open("README.adoc") as fh_readme: readme = fh_readme.read() install_reqs = [] setup( author="Sven Wilhelm", author_email='refnode@gmail.com', python_requires='>=3.8', classifiers=[ 'Development Status :: 2 - Pre-Alpha', 'Intended ...
true
true
f75198e7da17193e4c057e3b1054add8fc28cf8d
3,947
py
Python
app/core/tests/test_user_api.py
rishitapotluri/recipe-app-api
a65484f02c30b4c7250f074f4bcee76677785099
[ "MIT" ]
null
null
null
app/core/tests/test_user_api.py
rishitapotluri/recipe-app-api
a65484f02c30b4c7250f074f4bcee76677785099
[ "MIT" ]
null
null
null
app/core/tests/test_user_api.py
rishitapotluri/recipe-app-api
a65484f02c30b4c7250f074f4bcee76677785099
[ "MIT" ]
null
null
null
from django.test import TestCase from django.contrib.auth import get_user_model from django.urls import reverse from rest_framework.test import APIClient from rest_framework import status CREATE_USER_URL = reverse('user:create') TOKEN_URL = reverse('user:token') def create_user(**params): return get_user_model()...
37.590476
77
0.633899
from django.test import TestCase from django.contrib.auth import get_user_model from django.urls import reverse from rest_framework.test import APIClient from rest_framework import status CREATE_USER_URL = reverse('user:create') TOKEN_URL = reverse('user:token') def create_user(**params): return get_user_model()...
true
true
f7519957122972e97f97fa77a4d8fe66642b4371
2,009
py
Python
TimeWrapper_JE/venv/Lib/site-packages/pygments/filter.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
TimeWrapper_JE/venv/Lib/site-packages/pygments/filter.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
TimeWrapper_JE/venv/Lib/site-packages/pygments/filter.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
""" pygments.filter ~~~~~~~~~~~~~~~ Module that implements the default filter. :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ def apply_filters(stream, filters, lexer=None): """ Use this method to apply an itera...
27.902778
71
0.605276
def apply_filters(stream, filters, lexer=None): def _apply(filter_, stream): yield from filter_.filter(lexer, stream) for filter_ in filters: stream = _apply(filter_, stream) return stream def simplefilter(f): return type(f.__name__, (FunctionFilter,), { '__module...
true
true
f75199dee264bbd9684b8c372ddf97bb6e2be2ba
492
py
Python
exercises/es/solution_01_08_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/es/solution_01_08_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/es/solution_01_08_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
import spacy nlp = spacy.load("es_core_news_sm") text = ( "De acuerdo con la revista Fortune, Apple fue la empresa " "más admirada en el mundo entre 2008 y 2012." ) # Procesa el texto doc = nlp(text) for token in doc: # Obtén el texto del token, el part-of-speech tag y el dependency label token_text...
24.6
75
0.676829
import spacy nlp = spacy.load("es_core_news_sm") text = ( "De acuerdo con la revista Fortune, Apple fue la empresa " "más admirada en el mundo entre 2008 y 2012." ) doc = nlp(text) for token in doc: token_text = token.text token_pos = token.pos_ token_dep = token.dep_ print("{:<12}{:...
true
true
f7519a0ffb4a8006e01f0a3e5817cebfc9655aa4
34,537
py
Python
lib/cgi_tweaked.py
notbryant/eyebrows
7fec17b50f1b4838559d66138603c96dcb03bb23
[ "MIT" ]
null
null
null
lib/cgi_tweaked.py
notbryant/eyebrows
7fec17b50f1b4838559d66138603c96dcb03bb23
[ "MIT" ]
null
null
null
lib/cgi_tweaked.py
notbryant/eyebrows
7fec17b50f1b4838559d66138603c96dcb03bb23
[ "MIT" ]
null
null
null
#! /usr/local/bin/python # NOTE: the above "/usr/local/bin/python" is NOT a mistake. It is # intentionally NOT "/usr/bin/env python". On many systems # (e.g. Solaris), /usr/local/bin is not in $PATH as passed to CGI # scripts, and /usr/local/bin is the default directory where Python is # installed, so /usr/bin/env w...
33.563654
79
0.579813
__version__ = "2.6" from io import StringIO, BytesIO, TextIOWrapper import sys import os import urllib.parse from email.parser import FeedParser from warnings import warn import html import locale import tempfile __all__ = ["MiniFieldStorage", "FieldStorage", "parse", "parse_qs", "parse_qsl", "parse_...
true
true
f7519bd3f02c358f80ede1ddeb4536e43ac1a99b
3,578
py
Python
webcraft/apiview.py
fossabot/webcraft
364da90f1742bfc36b6d65f6dc888f3e448cfcda
[ "BSD-3-Clause" ]
3
2018-10-29T23:00:04.000Z
2020-09-30T00:50:42.000Z
webcraft/apiview.py
fossabot/webcraft
364da90f1742bfc36b6d65f6dc888f3e448cfcda
[ "BSD-3-Clause" ]
30
2018-11-17T05:44:26.000Z
2021-06-25T15:21:58.000Z
webcraft/apiview.py
fossabot/webcraft
364da90f1742bfc36b6d65f6dc888f3e448cfcda
[ "BSD-3-Clause" ]
2
2018-11-17T05:41:41.000Z
2019-07-23T13:29:48.000Z
import datetime import decimal from json import dumps from aiohttp import web from sqlalchemy import select, delete, update, insert from sqlalchemy import desc def alchemyencoder(obj): """JSON encoder function for SQLAlchemy special classes.""" if isinstance(obj, datetime.date): return obj.isoformat(...
31.113043
75
0.542761
import datetime import decimal from json import dumps from aiohttp import web from sqlalchemy import select, delete, update, insert from sqlalchemy import desc def alchemyencoder(obj): if isinstance(obj, datetime.date): return obj.isoformat() elif isinstance(obj, decimal.Decimal): return floa...
true
true
f7519c8dfa18c9dc0cbcca005004dfcf97480390
4,212
py
Python
pyshard/shard/shard.py
la9ran9e/pyshard
99a345e01c9e949720c345ed142cae9c7d2839f7
[ "MIT" ]
6
2019-07-11T14:08:41.000Z
2021-04-11T03:33:10.000Z
pyshard/shard/shard.py
la9ran9e/pyshard
99a345e01c9e949720c345ed142cae9c7d2839f7
[ "MIT" ]
2
2019-07-19T20:07:32.000Z
2022-02-12T10:17:52.000Z
pyshard/shard/shard.py
la9ran9e/pyshard
99a345e01c9e949720c345ed142cae9c7d2839f7
[ "MIT" ]
1
2022-02-12T10:11:16.000Z
2022-02-12T10:11:16.000Z
from collections import defaultdict from ..storage import InMemoryStorage from .client import ShardClient from ..utils import get_size class Shard: def __init__(self, start, end, storage_class=InMemoryStorage, max_size=1024, bins_num=5, buffer_size=1024, **storage_kwargs): ...
24.923077
92
0.578822
from collections import defaultdict from ..storage import InMemoryStorage from .client import ShardClient from ..utils import get_size class Shard: def __init__(self, start, end, storage_class=InMemoryStorage, max_size=1024, bins_num=5, buffer_size=1024, **storage_kwargs): ...
true
true
f7519ca5f30bb14b04c36eba3f50ad111b55c774
2,815
py
Python
venv/Lib/site-packages/networkx/readwrite/gpickle.py
997Yi/Flask-web
6b5e5d274bfa25fbd3db5af02723a5671f1e901d
[ "MIT" ]
3
2020-08-04T20:29:41.000Z
2020-11-09T09:28:19.000Z
venv/Lib/site-packages/networkx/readwrite/gpickle.py
997Yi/Flask-web
6b5e5d274bfa25fbd3db5af02723a5671f1e901d
[ "MIT" ]
30
2020-04-15T19:37:40.000Z
2020-04-22T21:19:35.000Z
venv/Lib/site-packages/networkx/readwrite/gpickle.py
997Yi/Flask-web
6b5e5d274bfa25fbd3db5af02723a5671f1e901d
[ "MIT" ]
2
2020-03-12T23:20:22.000Z
2021-02-15T21:54:02.000Z
""" ************** Pickled Graphs ************** Read and write NetworkX graphs as Python pickles. "The pickle module implements a fundamental, but powerful algorithm for serializing and de-serializing a Python object structure. "Pickling" is the process whereby a Python object hierarchy is converted into a byte strea...
26.064815
84
0.668561
__author__ = """Aric Hagberg (hagberg@lanl.gov)\nDan Schult (dschult@colgate.edu)""" __all__ = ['read_gpickle', 'write_gpickle'] import networkx as nx from networkx.utils import open_file try: import cPickle as pickle except ImportError: import pickle @open_file(1, mode='wb') def write_gpickle(G, path, pro...
true
true
f7519cfbbd3512ac811cbb0200e2f934fbe4e97d
739
py
Python
Taekwon/Python/BFS_DFS/beverage_fr_sol.py
sonnysorry/codingtest
478e0168e3209eb97b6b16910027bf12ccc3ccd0
[ "MIT" ]
2
2021-09-27T19:10:36.000Z
2021-11-09T05:40:39.000Z
Taekwon/Python/BFS_DFS/beverage_fr_sol.py
sonnysorry/codingtest
478e0168e3209eb97b6b16910027bf12ccc3ccd0
[ "MIT" ]
1
2021-11-15T14:56:54.000Z
2021-11-15T14:56:54.000Z
Taekwon/Python/BFS_DFS/beverage_fr_sol.py
sonnysorry/codingtest
478e0168e3209eb97b6b16910027bf12ccc3ccd0
[ "MIT" ]
null
null
null
# DFS로 특정 노드를 방문하고 연결된 모든 노드들도 방문 def dfs(x, y): # 주어진 범위를 벗어나는 경우에는 즉시 종료 if x <= -1 or x >= n or y <= -1 or y >= m: return False # 현재 노드를 아직 방문하지 않았다면 if graph[x][y] == 0: # 해당 노드 방문 처리 graph[x][y] = 1 # 상, 하, 좌, 우의 위치들도 모두 재귀적으로 호출 dfs(x - 1, y) dfs(x, ...
20.527778
46
0.488498
def dfs(x, y): if x <= -1 or x >= n or y <= -1 or y >= m: return False if graph[x][y] == 0: graph[x][y] = 1 dfs(x - 1, y) dfs(x, y - 1) dfs(x + 1, y) dfs(x, y + 1) return True return False n, m = map(int, input().split()) grap...
true
true
f7519e2ccb92b43e366a1f6bc8ed83c3b209133c
5,030
py
Python
ORCA1/gen_process_scalar.py
julianmak/NEMO-related
c8af7d020b18fa3ae28740d8e603018e2401b5b0
[ "MIT" ]
3
2019-10-14T09:44:33.000Z
2022-02-28T05:43:13.000Z
ORCA1/gen_process_scalar.py
julianmak/NEMO-related
c8af7d020b18fa3ae28740d8e603018e2401b5b0
[ "MIT" ]
null
null
null
ORCA1/gen_process_scalar.py
julianmak/NEMO-related
c8af7d020b18fa3ae28740d8e603018e2401b5b0
[ "MIT" ]
3
2019-03-05T19:57:46.000Z
2022-02-28T05:43:14.000Z
#!/usr/bin/env python3 # JM: 30 Aug 2018 # process the *scalar.nc files (because I couldn't get XIOS to spit out just # a number for whatever reason...) import netCDF4 import glob, sys #-------------------------------------------------------- # define the argument parser import argparse parser = argparse.ArgumentPa...
42.268908
104
0.557654
# a number for whatever reason...) import netCDF4 import glob, sys #-------------------------------------------------------- # define the argument parser import argparse parser = argparse.ArgumentParser(description = "Process the scalar netcdf files and output as text") # fixed arguments parser.add_argument("data_...
true
true
f751a07d4870db622b26ff98e3fcb86644491314
60,931
py
Python
tests/unit/gapic/compute_v1/test_instance_templates.py
vam-google/python-compute
799f2f55e5e205317862a17ca7ed548ce2ca66e5
[ "Apache-2.0" ]
null
null
null
tests/unit/gapic/compute_v1/test_instance_templates.py
vam-google/python-compute
799f2f55e5e205317862a17ca7ed548ce2ca66e5
[ "Apache-2.0" ]
null
null
null
tests/unit/gapic/compute_v1/test_instance_templates.py
vam-google/python-compute
799f2f55e5e205317862a17ca7ed548ce2ca66e5
[ "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...
39.565584
122
0.690486
import os import mock import packaging.version import grpc from grpc.experimental import aio import math import pytest from proto.marshal.rules.dates import DurationRule, TimestampRule from requests import Response from requests.sessions import Session from google.api_core import client_options from google.api_core ...
true
true
f751a1b75cc6b6c8c973d740d0323c247cdc5616
8,432
py
Python
Improving_Neural_Networks/keras_tuner.py
oke-aditya/Machine_Learning
3dd40ae2b9cba1890e7060448e75c14194b27775
[ "MIT" ]
15
2019-11-16T11:09:24.000Z
2022-01-09T01:58:03.000Z
Improving_Neural_Networks/keras_tuner.py
oke-aditya/Machine_Learning
3dd40ae2b9cba1890e7060448e75c14194b27775
[ "MIT" ]
1
2021-11-10T19:46:00.000Z
2021-11-10T19:46:00.000Z
Improving_Neural_Networks/keras_tuner.py
oke-aditya/Machine_Learning
3dd40ae2b9cba1890e7060448e75c14194b27775
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """keras_tuner.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1FbSUg_-KxlihGbwBPBEBLFzCw-YtVLhE # Keras Tuner - A package to tune Keras hyperparameters """ # Commented out IPython magic to ensure Python compatibility. #...
31.580524
138
0.705052
"""keras_tuner.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1FbSUg_-KxlihGbwBPBEBLFzCw-YtVLhE # Keras Tuner - A package to tune Keras hyperparameters """ !pip install keras-tuner import tensorflow as tf from tensorflow.keras.datasets impor...
false
true
f751a2d1efa5fc50308bfa77b7127633744150c4
12,351
py
Python
Files/manage_db.py
SlaveForGluten/MyWallet
942a6be32436e48eb79beffd041e9d45c5156d97
[ "MIT" ]
null
null
null
Files/manage_db.py
SlaveForGluten/MyWallet
942a6be32436e48eb79beffd041e9d45c5156d97
[ "MIT" ]
null
null
null
Files/manage_db.py
SlaveForGluten/MyWallet
942a6be32436e48eb79beffd041e9d45c5156d97
[ "MIT" ]
null
null
null
"""create and manipulate sqlite databese""" import sqlite3 import time import datetime from Files import scrap_web def create_tables(): """create db if don't exists and fill it with tables""" connect = sqlite3.connect("db.db") conn = connect.cursor() conn.execute("""CREATE TABLE IF NOT EXISTS assets...
33.024064
79
0.56376
import sqlite3 import time import datetime from Files import scrap_web def create_tables(): connect = sqlite3.connect("db.db") conn = connect.cursor() conn.execute("""CREATE TABLE IF NOT EXISTS assets( timestamp TEXT, amount REAL, currency TEXT, ...
true
true
f751a2eae96e609d216cf8b12cd100fd8720f209
22,454
py
Python
src/datasets/commands/dummy_data.py
TezRomacH/datasets
7349b79cd76dfecd7117847a9526a1d950f69758
[ "Apache-2.0" ]
1
2021-04-08T07:52:57.000Z
2021-04-08T07:52:57.000Z
src/datasets/commands/dummy_data.py
TezRomacH/datasets
7349b79cd76dfecd7117847a9526a1d950f69758
[ "Apache-2.0" ]
null
null
null
src/datasets/commands/dummy_data.py
TezRomacH/datasets
7349b79cd76dfecd7117847a9526a1d950f69758
[ "Apache-2.0" ]
1
2022-02-23T19:09:42.000Z
2022-02-23T19:09:42.000Z
import fnmatch import json import os import shutil import tempfile import xml.etree.ElementTree as ET from argparse import ArgumentParser from pathlib import Path from typing import Optional from datasets.commands import BaseTransformersCLICommand from datasets.load import import_main_class, prepare_module from datase...
48.392241
352
0.604569
import fnmatch import json import os import shutil import tempfile import xml.etree.ElementTree as ET from argparse import ArgumentParser from pathlib import Path from typing import Optional from datasets.commands import BaseTransformersCLICommand from datasets.load import import_main_class, prepare_module from datase...
true
true
f751a31fcbe42809fe45819dac756046e1eb7d9d
230
py
Python
api/wsgi/src/devices/ecg/serializers.py
easyCZ/SLIP-A-2015
ad386df9c438d93ec89f68c63d3deda12d27d1ed
[ "MIT" ]
2
2020-06-08T19:17:10.000Z
2020-06-08T20:45:07.000Z
api/wsgi/src/devices/ecg/serializers.py
easyCZ/SLIP-A-2015
ad386df9c438d93ec89f68c63d3deda12d27d1ed
[ "MIT" ]
14
2015-10-07T09:31:50.000Z
2022-02-23T07:34:10.000Z
api/wsgi/src/devices/ecg/serializers.py
easyCZ/SLIP-A-2015
ad386df9c438d93ec89f68c63d3deda12d27d1ed
[ "MIT" ]
null
null
null
from rest_framework import serializers class BPMSerializer(serializers.Serializer): datetime_from = serializers.DateTimeField() datetime_to = serializers.DateTimeField() bpm = serializers.IntegerField(read_only=True)
32.857143
50
0.804348
from rest_framework import serializers class BPMSerializer(serializers.Serializer): datetime_from = serializers.DateTimeField() datetime_to = serializers.DateTimeField() bpm = serializers.IntegerField(read_only=True)
true
true