hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f71b74e1b33e2d32c75b576cb1deaa4ac7bf5e57
10,449
py
Python
src/AuShadha/patient/models.py
GosthMan/AuShadha
3ab48825a0dba19bf880b6ac6141ab7a6adf1f3e
[ "PostgreSQL" ]
46
2015-03-04T14:19:47.000Z
2021-12-09T02:58:46.000Z
src/AuShadha/patient/models.py
aytida23/AuShadha
3ab48825a0dba19bf880b6ac6141ab7a6adf1f3e
[ "PostgreSQL" ]
2
2015-06-05T10:29:04.000Z
2015-12-06T16:54:10.000Z
src/AuShadha/patient/models.py
aytida23/AuShadha
3ab48825a0dba19bf880b6ac6141ab7a6adf1f3e
[ "PostgreSQL" ]
24
2015-03-23T01:38:11.000Z
2022-01-24T16:23:42.000Z
################################################################################ # PROJECT : AuShadha # Description : Patient Models for managing patient # Author : Dr. Easwar T R # Date : 16-09-2013 # Licence : GNU GPL V3. Please see AuShadha/LICENSE.txt ######################################...
36.28125
93
0.52072
for p in all_pat: id_list.append(p.patient_hospital_id) if hosp_id in id_list: error = "Patient is already registered" print error return False else: return True else: return True def save(self, *args, **kwargs): "...
false
true
f71b75660891063679e5531c8f4789ea15fdf36c
17,910
py
Python
skimage/transform/radon_transform.py
jjhelmus/scikit-image
b9b5fde0821fe8bcece2528b30d012c65c64ad6f
[ "BSD-3-Clause" ]
2
2017-03-30T11:22:11.000Z
2019-03-03T05:18:01.000Z
skimage/transform/radon_transform.py
jjhelmus/scikit-image
b9b5fde0821fe8bcece2528b30d012c65c64ad6f
[ "BSD-3-Clause" ]
3
2021-03-19T14:27:58.000Z
2022-03-12T00:42:39.000Z
skimage/transform/radon_transform.py
jjhelmus/scikit-image
b9b5fde0821fe8bcece2528b30d012c65c64ad6f
[ "BSD-3-Clause" ]
1
2019-12-17T14:53:28.000Z
2019-12-17T14:53:28.000Z
# -*- coding: utf-8 -*- """ radon.py - Radon and inverse radon transforms Based on code of Justin K. Romberg (http://www.clear.rice.edu/elec431/projects96/DSP/bpanalysis.html) J. Gillam and Chris Griffin. References: -B.R. Ramesh, N. Srinivasa, K. Rajgopal, "An Algorithm for Computing the Discrete Radon Trans...
42.541568
79
0.629202
from __future__ import division import numpy as np from scipy.fftpack import fft, ifft, fftfreq from scipy.interpolate import interp1d from ._warps_cy import _warp_fast from ._radon_transform import sart_projection_update from .. import util from warnings import warn __all__ = ["radon", "iradon", "iradon_sart"] de...
true
true
f71b763ae51e39e2fc92c256e70e59add5287950
12,944
py
Python
stix2/datastore/memory.py
2xyo/cti-python-stix2
cffee92c7ed18c4cdd54c4370c6a17878dfd36cd
[ "BSD-3-Clause" ]
1
2020-08-17T23:53:48.000Z
2020-08-17T23:53:48.000Z
stix2/datastore/memory.py
2xyo/cti-python-stix2
cffee92c7ed18c4cdd54c4370c6a17878dfd36cd
[ "BSD-3-Clause" ]
null
null
null
stix2/datastore/memory.py
2xyo/cti-python-stix2
cffee92c7ed18c4cdd54c4370c6a17878dfd36cd
[ "BSD-3-Clause" ]
null
null
null
"""Python STIX2 Memory Source/Sink""" import io import itertools import json import os from stix2 import v20, v21 from stix2.base import _STIXBase from stix2.datastore import DataSink, DataSource, DataStoreMixin from stix2.datastore.filters import FilterSet, apply_common_filters from stix2.parsing import parse def ...
35.56044
111
0.627704
import io import itertools import json import os from stix2 import v20, v21 from stix2.base import _STIXBase from stix2.datastore import DataSink, DataSource, DataStoreMixin from stix2.datastore.filters import FilterSet, apply_common_filters from stix2.parsing import parse def _add(store, stix_data, allow_custom=Tr...
true
true
f71b769c9bfe02547922c7632d7e21d4cba88350
6,126
py
Python
aoc/solutions/day08/solution.py
SebastiaanZ/aoc-2020
e5480be10da053a6ad382dc27fcea7890986cd8e
[ "MIT" ]
3
2020-12-08T13:36:32.000Z
2020-12-15T11:37:25.000Z
aoc/solutions/day08/solution.py
SebastiaanZ/aoc-2020
e5480be10da053a6ad382dc27fcea7890986cd8e
[ "MIT" ]
null
null
null
aoc/solutions/day08/solution.py
SebastiaanZ/aoc-2020
e5480be10da053a6ad382dc27fcea7890986cd8e
[ "MIT" ]
null
null
null
from __future__ import annotations import collections import logging import typing from aoc.helpers import Puzzle __all__ = ["part_one", "part_two", "prepare_puzzle"] log = logging.getLogger(__name__) class Instruction(typing.NamedTuple): """A ConsoleApplication instruction.""" operation: str argument...
36.464286
95
0.663728
from __future__ import annotations import collections import logging import typing from aoc.helpers import Puzzle __all__ = ["part_one", "part_two", "prepare_puzzle"] log = logging.getLogger(__name__) class Instruction(typing.NamedTuple): operation: str argument: int @classmethod def from_text(cl...
true
true
f71b78508ce2826de11a533ccf49d10b6b2ff055
25,387
py
Python
pyabc/epsilon/temperature.py
chrhck/pyABC
731cfdec26bef3898bf6e244daa5c8f83f3fe19d
[ "BSD-3-Clause" ]
null
null
null
pyabc/epsilon/temperature.py
chrhck/pyABC
731cfdec26bef3898bf6e244daa5c8f83f3fe19d
[ "BSD-3-Clause" ]
null
null
null
pyabc/epsilon/temperature.py
chrhck/pyABC
731cfdec26bef3898bf6e244daa5c8f83f3fe19d
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import scipy as sp import pandas as pd import numbers from typing import Callable, List, Union import logging from .base import Epsilon from ..distance import SCALE_LIN from ..sampler import Sampler from ..storage import save_dict_to_json logger = logging.getLogger("Epsilon") class TemperatureBas...
34.168237
79
0.612873
import numpy as np import scipy as sp import pandas as pd import numbers from typing import Callable, List, Union import logging from .base import Epsilon from ..distance import SCALE_LIN from ..sampler import Sampler from ..storage import save_dict_to_json logger = logging.getLogger("Epsilon") class TemperatureBas...
true
true
f71b787fa525196b698da70d6376942add8376c6
12,785
py
Python
tests/db_stats.py
chrisjsewell/aiida-performance
160606f07fe092a9e2bacdf62bfecec460fac642
[ "MIT" ]
null
null
null
tests/db_stats.py
chrisjsewell/aiida-performance
160606f07fe092a9e2bacdf62bfecec460fac642
[ "MIT" ]
null
null
null
tests/db_stats.py
chrisjsewell/aiida-performance
160606f07fe092a9e2bacdf62bfecec460fac642
[ "MIT" ]
null
null
null
"""Useful queries for profiling PostgreSQL databases These queries are mainly adapted from https://gist.github.com/anvk/475c22cbca1edc5ce94546c871460fdd """ from functools import wraps from pathlib import Path def execute_raw(raw): from aiida.manage.manager import get_manager backend = get_manager()._load_b...
27.67316
159
0.600078
from functools import wraps from pathlib import Path def execute_raw(raw): from aiida.manage.manager import get_manager backend = get_manager()._load_backend(schema_check=False) return backend.execute_raw(raw) def memory_db_df(): import pandas as pd result = execute_raw( r""" S...
true
true
f71b7a6ea431a910f31292019a4e71bb636c92dd
1,429
py
Python
NinjaBandSPADE/SPADE-agents/night_stand_agent.py
PaMeSa/NinjaBandSPADE
e98dda62d8c7a4559a0a45d0bab5351aa47efcfa
[ "Apache-2.0" ]
null
null
null
NinjaBandSPADE/SPADE-agents/night_stand_agent.py
PaMeSa/NinjaBandSPADE
e98dda62d8c7a4559a0a45d0bab5351aa47efcfa
[ "Apache-2.0" ]
null
null
null
NinjaBandSPADE/SPADE-agents/night_stand_agent.py
PaMeSa/NinjaBandSPADE
e98dda62d8c7a4559a0a45d0bab5351aa47efcfa
[ "Apache-2.0" ]
null
null
null
import time, sys import httplib, urllib #ip_address='192.168.0.100' ip_address='10.12.19.67' #ip_address='10.20.218.197' cost='25' l_amount='100' sys.path.append('../..') import spade in_use=False name="night_stand_agent" class MyAgent(spade.Agent.Agent): def _setup(self): template = spade.Behaviour.ACLTemplate()...
25.981818
101
0.714486
import time, sys import httplib, urllib ip_address='10.12.19.67' cost='25' l_amount='100' sys.path.append('../..') import spade in_use=False name="night_stand_agent" class MyAgent(spade.Agent.Agent): def _setup(self): template = spade.Behaviour.ACLTemplate() template.setSender(spade.AID.aid("control_agent@"+i...
false
true
f71b7bba9bd0bdbe0b8034d90c61427bb3dc3f64
16,878
py
Python
optbinning/binning/piecewise/continuous_binning.py
mnicstruwig/optbinning
6ce991e1ca75b4d41835f3b3bf8e0f294f6ba780
[ "Apache-2.0" ]
1
2021-02-09T02:49:32.000Z
2021-02-09T02:49:32.000Z
optbinning/binning/piecewise/continuous_binning.py
mnicstruwig/optbinning
6ce991e1ca75b4d41835f3b3bf8e0f294f6ba780
[ "Apache-2.0" ]
null
null
null
optbinning/binning/piecewise/continuous_binning.py
mnicstruwig/optbinning
6ce991e1ca75b4d41835f3b3bf8e0f294f6ba780
[ "Apache-2.0" ]
null
null
null
""" Optimal piecewise binning for continuous target. """ # Guillermo Navas-Palencia <g.navas.palencia@gmail.com> # Copyright (C) 2020 import time import numpy as np from .base import _check_parameters from .base import BasePWBinning from .binning_statistics import PWContinuousBinningTable from .metrics import conti...
41.266504
79
0.640656
import time import numpy as np from .base import _check_parameters from .base import BasePWBinning from .binning_statistics import PWContinuousBinningTable from .metrics import continuous_metrics from .transformations import transform_continuous_target class ContinuousOptimalPWBinning(BasePWBinning): def __...
true
true
f71b7bd3333e78e80ac35643dea7e4992006e7c1
5,065
py
Python
a3c_train.py
mmwebster/DeepRL-Grounding
aa7fa63fbc26e8b0fa3fe289a5fe5a00ef3e6278
[ "MIT" ]
null
null
null
a3c_train.py
mmwebster/DeepRL-Grounding
aa7fa63fbc26e8b0fa3fe289a5fe5a00ef3e6278
[ "MIT" ]
null
null
null
a3c_train.py
mmwebster/DeepRL-Grounding
aa7fa63fbc26e8b0fa3fe289a5fe5a00ef3e6278
[ "MIT" ]
null
null
null
import torch.optim as optim import env as grounding_env from models import * from torch.autograd import Variable import logging def ensure_shared_grads(model, shared_model): for param, shared_param in zip(model.parameters(), shared_model.parameters()): if shared_param....
32.261146
78
0.541165
import torch.optim as optim import env as grounding_env from models import * from torch.autograd import Variable import logging def ensure_shared_grads(model, shared_model): for param, shared_param in zip(model.parameters(), shared_model.parameters()): if shared_param....
true
true
f71b7c3e0333f4799644586439f574a601d048f9
942
py
Python
tema1/gym-master/gym/envs/tests/spec_list.py
oscarramos2001/Oscar-Marino-Ramos
c05e497b467aab4572f3578f1b9068d4585106d2
[ "MIT" ]
112
2018-11-19T17:23:40.000Z
2022-03-29T05:36:14.000Z
tema1/gym-master/gym/envs/tests/spec_list.py
BrujitoOz/ia-course
c05e497b467aab4572f3578f1b9068d4585106d2
[ "MIT" ]
2
2020-03-23T01:17:45.000Z
2020-07-02T07:01:06.000Z
tema1/gym-master/gym/envs/tests/spec_list.py
BrujitoOz/ia-course
c05e497b467aab4572f3578f1b9068d4585106d2
[ "MIT" ]
187
2018-11-28T11:38:02.000Z
2022-03-16T11:18:39.000Z
from gym import envs, logger import os def should_skip_env_spec_for_tests(spec): # We skip tests for envs that require dependencies or are otherwise # troublesome to run frequently ep = spec._entry_point # Skip mujoco tests for pull request CI skip_mujoco = not (os.environ.get('MUJOCO_KEY_BUNDLE') ...
44.857143
156
0.691083
from gym import envs, logger import os def should_skip_env_spec_for_tests(spec): ep = spec._entry_point skip_mujoco = not (os.environ.get('MUJOCO_KEY_BUNDLE') or os.path.exists(os.path.expanduser('~/.mujoco/mjkey.txt'))) if skip_mujoco and (ep.startswith('gym.envs.mujoco:') or ep.startswith(...
true
true
f71b7dce623850ef58b71a5f7bfbb56a6401aee0
495
py
Python
python/concurrency/async_hello.py
cbare/Etudes
8a803621f2abd20966843ccec696aec397d3c9f9
[ "Apache-2.0" ]
null
null
null
python/concurrency/async_hello.py
cbare/Etudes
8a803621f2abd20966843ccec696aec397d3c9f9
[ "Apache-2.0" ]
null
null
null
python/concurrency/async_hello.py
cbare/Etudes
8a803621f2abd20966843ccec696aec397d3c9f9
[ "Apache-2.0" ]
null
null
null
import asyncio async def upper_cased(value: str) -> str: await asyncio.sleep(1) return value.upper() coroutines = [ upper_cased("h"), upper_cased("e"), upper_cased("l"), upper_cased("l"), upper_cased("o"), upper_cased(" "), upper_cased("w"), upper_cased("o"), upper_cased("r...
19.038462
53
0.60404
import asyncio async def upper_cased(value: str) -> str: await asyncio.sleep(1) return value.upper() coroutines = [ upper_cased("h"), upper_cased("e"), upper_cased("l"), upper_cased("l"), upper_cased("o"), upper_cased(" "), upper_cased("w"), upper_cased("o"), upper_cased("r...
true
true
f71b7ec3e0cca942b7e4bde811a35de1811454fb
186
py
Python
knncommand.py
harishpichukala/Anomaly
e649fd8818826a2c29b2391c2d732a2758007f7b
[ "MIT" ]
1
2015-04-08T06:29:39.000Z
2015-04-08T06:29:39.000Z
knncommand.py
harishpichukala/Anomaly
e649fd8818826a2c29b2391c2d732a2758007f7b
[ "MIT" ]
null
null
null
knncommand.py
harishpichukala/Anomaly
e649fd8818826a2c29b2391c2d732a2758007f7b
[ "MIT" ]
null
null
null
from knn import compare from Knndisplay import display_knn import time def get_knn(): start_time=time.time() compare() display_knn() end_time=time.time() print end_time-start_time
18.6
34
0.784946
from knn import compare from Knndisplay import display_knn import time def get_knn(): start_time=time.time() compare() display_knn() end_time=time.time() print end_time-start_time
false
true
f71b7f85ca2d04fe797bbe93b9985f9eedf2ad7c
2,785
py
Python
main.py
mwojcik96/dtw-utterance-recognition
9371393dfe92abb5b85c40828d099ceca599aa89
[ "MIT" ]
null
null
null
main.py
mwojcik96/dtw-utterance-recognition
9371393dfe92abb5b85c40828d099ceca599aa89
[ "MIT" ]
null
null
null
main.py
mwojcik96/dtw-utterance-recognition
9371393dfe92abb5b85c40828d099ceca599aa89
[ "MIT" ]
null
null
null
import glob import struct import wave from collections import Counter from operator import itemgetter import librosa import numpy as np from tslearn.metrics import dtw def compute_mfcc_from_file(file): time_characteristic = create_time_characteristics_of_a_file(file) mfcc = librosa.feature.mfcc(y=time_charac...
35.705128
100
0.656732
import glob import struct import wave from collections import Counter from operator import itemgetter import librosa import numpy as np from tslearn.metrics import dtw def compute_mfcc_from_file(file): time_characteristic = create_time_characteristics_of_a_file(file) mfcc = librosa.feature.mfcc(y=time_charac...
true
true
f71b7feab878e3386680bd41b4a9588ddf08c6c1
308
py
Python
Main.py
MynorSaban1906/vacas
5ca5b483b48088a409cb75cb5d18603a09274498
[ "MIT" ]
null
null
null
Main.py
MynorSaban1906/vacas
5ca5b483b48088a409cb75cb5d18603a09274498
[ "MIT" ]
null
null
null
Main.py
MynorSaban1906/vacas
5ca5b483b48088a409cb75cb5d18603a09274498
[ "MIT" ]
null
null
null
import tkinter as tk from Windows import StorageGui, NavBar class Main: root = tk.Tk() root.geometry("1000x600") root.title(" [EDD] Fase-1" ) app = StorageGui(master=root) app.configure(bg='#2C3E50') app.place(x=200,width=200,height=200) app.mainloop() start = Main()
18.117647
41
0.636364
import tkinter as tk from Windows import StorageGui, NavBar class Main: root = tk.Tk() root.geometry("1000x600") root.title(" [EDD] Fase-1" ) app = StorageGui(master=root) app.configure(bg='#2C3E50') app.place(x=200,width=200,height=200) app.mainloop() start = Main()
true
true
f71b801eb247a574b85aeca0cc7b8ec2789deb6f
37,260
py
Python
src/azure-cli/azure/cli/command_modules/servicefabric/_help.py
zackliu/azure-cli
680f8339ac010a89d4063566fabc5991abc8a4c2
[ "MIT" ]
2
2021-03-24T21:06:25.000Z
2021-03-24T21:07:59.000Z
src/azure-cli/azure/cli/command_modules/servicefabric/_help.py
zackliu/azure-cli
680f8339ac010a89d4063566fabc5991abc8a4c2
[ "MIT" ]
null
null
null
src/azure-cli/azure/cli/command_modules/servicefabric/_help.py
zackliu/azure-cli
680f8339ac010a89d4063566fabc5991abc8a4c2
[ "MIT" ]
9
2020-02-12T22:53:00.000Z
2021-06-09T18:59:41.000Z
# coding=utf-8 # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -----------------------------------------------------...
39.892934
328
0.725819
from knack.help_files import helps helps['sf'] = """ type: group short-summary: Manage and administer Azure Service Fabric clusters. """ helps['sf application'] = """ type: group short-summary: Manage applications running on an Azure Service Fabric cluster. Only support ARM deployed applications. """ helps[...
true
true
f71b8100e2c77204d39461f764e255793c25b730
1,884
py
Python
american_gut_project_pipeline/pipeline/metrics.py
mas-dse-ringhilt/DSE-American-Gut-Project
dadb3be8d40d6fb325d26920b145c04c837a6869
[ "CC-BY-4.0" ]
1
2020-05-02T21:15:21.000Z
2020-05-02T21:15:21.000Z
american_gut_project_pipeline/pipeline/metrics.py
ringhilterra/DSE-American-Gut-Project
dadb3be8d40d6fb325d26920b145c04c837a6869
[ "CC-BY-4.0" ]
null
null
null
american_gut_project_pipeline/pipeline/metrics.py
ringhilterra/DSE-American-Gut-Project
dadb3be8d40d6fb325d26920b145c04c837a6869
[ "CC-BY-4.0" ]
2
2019-06-26T02:07:41.000Z
2019-07-15T16:28:44.000Z
import pandas as pd from sklearn.metrics import confusion_matrix, accuracy_score, precision_score, recall_score, f1_score def evaluate(clf, x_train, x_test, y_train, y_test, name, training_data_name, embedding, params=None): predictions = clf.predict(x_train) # train_tn, train_fp, train_fn, train_tp = confusi...
41.866667
102
0.684183
import pandas as pd from sklearn.metrics import confusion_matrix, accuracy_score, precision_score, recall_score, f1_score def evaluate(clf, x_train, x_test, y_train, y_test, name, training_data_name, embedding, params=None): predictions = clf.predict(x_train) train_accuracy = accuracy_score(y_train, pred...
true
true
f71b824fba4f7bb51835a6ef5657cce8b66fe369
112
py
Python
ABC183/B.py
shimomura314/AtcoderCodes
db1d62a7715f5f1b3c40eceff8d34f0f34839f41
[ "MIT" ]
null
null
null
ABC183/B.py
shimomura314/AtcoderCodes
db1d62a7715f5f1b3c40eceff8d34f0f34839f41
[ "MIT" ]
null
null
null
ABC183/B.py
shimomura314/AtcoderCodes
db1d62a7715f5f1b3c40eceff8d34f0f34839f41
[ "MIT" ]
null
null
null
sx, sy, gx, gy = map(int, input().split()) if sx == gx: print(sx) exit() print(sx + sy*(gx-sx)/(gy+sy))
18.666667
42
0.517857
sx, sy, gx, gy = map(int, input().split()) if sx == gx: print(sx) exit() print(sx + sy*(gx-sx)/(gy+sy))
true
true
f71b826b9f28eb525f8e2cb61594898e1ab461e2
685
py
Python
ted_sws/rml_to_html/resources/query_registry.py
meaningfy-ws/ted-xml-2-rdf
ac26a19f3761b7cf79d79a46be6323b658f067eb
[ "Apache-2.0" ]
1
2022-03-21T12:32:52.000Z
2022-03-21T12:32:52.000Z
ted_sws/rml_to_html/resources/query_registry.py
meaningfy-ws/ted-xml-2-rdf
ac26a19f3761b7cf79d79a46be6323b658f067eb
[ "Apache-2.0" ]
24
2022-02-10T10:43:56.000Z
2022-03-29T12:36:21.000Z
ted_sws/rml_to_html/resources/query_registry.py
meaningfy-ws/ted-sws
d1e351eacb2900f84ec7edc457e49d8202fbaff5
[ "Apache-2.0" ]
null
null
null
from ted_sws.rml_to_html.resources import get_sparql_query class QueryRegistry: @property def TRIPLE_MAP(self): return get_sparql_query(query_file_name="get_triple_maps.rq") @property def LOGICAL_SOURCE(self): return get_sparql_query(query_file_name="get_logical_source.rq") @pro...
27.4
83
0.743066
from ted_sws.rml_to_html.resources import get_sparql_query class QueryRegistry: @property def TRIPLE_MAP(self): return get_sparql_query(query_file_name="get_triple_maps.rq") @property def LOGICAL_SOURCE(self): return get_sparql_query(query_file_name="get_logical_source.rq") @pro...
true
true
f71b8275c618ced19c9930e8361174690cf06e80
10,326
py
Python
benchmarks/f3_wrong_hints/scaling_ltl_infinite_state/18-extending_bound_32.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
3
2021-04-23T23:29:26.000Z
2022-03-23T10:00:30.000Z
benchmarks/f3_wrong_hints/scaling_ltl_infinite_state/18-extending_bound_32.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
null
null
null
benchmarks/f3_wrong_hints/scaling_ltl_infinite_state/18-extending_bound_32.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
1
2021-11-17T22:02:56.000Z
2021-11-17T22:02:56.000Z
from typing import Tuple, FrozenSet from collections import Iterable from mathsat import msat_term, msat_env from mathsat import msat_make_constant, msat_declare_function from mathsat import msat_get_integer_type, msat_get_rational_type, msat_get_bool_type from mathsat import msat_make_and, msat_make_not, msat_mak...
35.242321
89
0.62454
from typing import Tuple, FrozenSet from collections import Iterable from mathsat import msat_term, msat_env from mathsat import msat_make_constant, msat_declare_function from mathsat import msat_get_integer_type, msat_get_rational_type, msat_get_bool_type from mathsat import msat_make_and, msat_make_not, msat_mak...
true
true
f71b839ea462d9355fe88e220fc9c5b89f52ab5a
827
py
Python
virtex/serial/__init__.py
chrislarson1/virtex
36eb47d1ace297951cae36edc8a00544b85fed79
[ "Apache-2.0" ]
5
2020-06-17T06:22:32.000Z
2022-03-04T09:25:31.000Z
virtex/serial/__init__.py
virtexlabs/virtex
36eb47d1ace297951cae36edc8a00544b85fed79
[ "Apache-2.0" ]
null
null
null
virtex/serial/__init__.py
virtexlabs/virtex
36eb47d1ace297951cae36edc8a00544b85fed79
[ "Apache-2.0" ]
null
null
null
# ------------------------------------------------------------------- # Copyright 2021 Virtex 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....
39.380952
69
0.629988
from .bytes import * from .pillow import * from .pickle import * from .numpy import *
true
true
f71b83f83a3906286de03127e55e5392ecaea99d
1,613
py
Python
ishuhui/__init__.py
lawnight/flask_ishuhui
be42684a4cf461aaccd691fc61548450869abc17
[ "MIT" ]
null
null
null
ishuhui/__init__.py
lawnight/flask_ishuhui
be42684a4cf461aaccd691fc61548450869abc17
[ "MIT" ]
null
null
null
ishuhui/__init__.py
lawnight/flask_ishuhui
be42684a4cf461aaccd691fc61548450869abc17
[ "MIT" ]
1
2021-05-20T10:19:19.000Z
2021-05-20T10:19:19.000Z
from flask import Flask from . import csrf import ishuhui.data as data import env from flask_assets import Environment, Bundle def create_app(config, should_register_blueprints=True): app = Flask(__name__,static_folder = env.ASSETS,static_url_path='/assets') assets = Environment(app) js = Bundle('ap...
26.016129
78
0.716677
from flask import Flask from . import csrf import ishuhui.data as data import env from flask_assets import Environment, Bundle def create_app(config, should_register_blueprints=True): app = Flask(__name__,static_folder = env.ASSETS,static_url_path='/assets') assets = Environment(app) js = Bundle('ap...
true
true
f71b8422d45790abd3999a3b0b1534cd72a75c0b
19,515
py
Python
prody/chromatin/hic.py
grandevelia/ProDy
7c725640a94c16543423c0756388998cb86a97ae
[ "MIT" ]
210
2015-01-26T08:17:56.000Z
2022-03-30T01:40:34.000Z
prody/chromatin/hic.py
grandevelia/ProDy
7c725640a94c16543423c0756388998cb86a97ae
[ "MIT" ]
555
2015-01-05T21:51:54.000Z
2022-03-31T16:51:41.000Z
prody/chromatin/hic.py
grandevelia/ProDy
7c725640a94c16543423c0756388998cb86a97ae
[ "MIT" ]
99
2015-02-09T18:00:39.000Z
2022-03-07T12:52:51.000Z
from numbers import Integral from numpy import ma import numpy as np from scipy.sparse import coo_matrix from scipy.stats import mode from prody.chromatin.norm import VCnorm, SQRTVCnorm, Filenorm from prody.chromatin.functions import div0, showDomains, _getEigvecs from prody import PY2K from prody.dynamics import GNM...
31.887255
123
0.544146
from numbers import Integral from numpy import ma import numpy as np from scipy.sparse import coo_matrix from scipy.stats import mode from prody.chromatin.norm import VCnorm, SQRTVCnorm, Filenorm from prody.chromatin.functions import div0, showDomains, _getEigvecs from prody import PY2K from prody.dynamics import GNM...
true
true
f71b8454f0e6b786481174f05b105f50d177f810
568
py
Python
tools/leetcode.125.Valid Palindrome/leetcode.125.Valid Palindrome.submission1.py
tedye/leetcode
975d7e3b8cb9b6be9e80e07febf4bcf6414acd46
[ "MIT" ]
4
2015-10-10T00:30:55.000Z
2020-07-27T19:45:54.000Z
tools/leetcode.125.Valid Palindrome/leetcode.125.Valid Palindrome.submission1.py
tedye/leetcode
975d7e3b8cb9b6be9e80e07febf4bcf6414acd46
[ "MIT" ]
null
null
null
tools/leetcode.125.Valid Palindrome/leetcode.125.Valid Palindrome.submission1.py
tedye/leetcode
975d7e3b8cb9b6be9e80e07febf4bcf6414acd46
[ "MIT" ]
null
null
null
class Solution: # @param {string} s # @return {boolean} def isPalindrome(self, s): if not s: return True start = 0 end = len(s)-1 s = s.lower() while start < end: while start < end and not s[start].isalnum(): start += 1...
568
568
0.399648
class Solution:
true
true
f71b84b71246068431940b564be47b7c900c6b87
3,164
py
Python
gamestonk_terminal/common/quantitative_analysis/rolling_model.py
minhhoang1023/GamestonkTerminal
195dc19b491052df080178c0cc6a9d535a91a704
[ "MIT" ]
1
2022-03-15T13:05:40.000Z
2022-03-15T13:05:40.000Z
gamestonk_terminal/common/quantitative_analysis/rolling_model.py
minhhoang1023/GamestonkTerminal
195dc19b491052df080178c0cc6a9d535a91a704
[ "MIT" ]
null
null
null
gamestonk_terminal/common/quantitative_analysis/rolling_model.py
minhhoang1023/GamestonkTerminal
195dc19b491052df080178c0cc6a9d535a91a704
[ "MIT" ]
null
null
null
"""Rolling Statistics""" __docformat__ = "numpy" import logging from typing import Tuple import pandas as pd import pandas_ta as ta from gamestonk_terminal.decorators import log_start_end logger = logging.getLogger(__name__) @log_start_end(log=logger) def get_rolling_avg(df: pd.DataFrame, length: int) -> Tuple[pd...
23.094891
88
0.640645
__docformat__ = "numpy" import logging from typing import Tuple import pandas as pd import pandas_ta as ta from gamestonk_terminal.decorators import log_start_end logger = logging.getLogger(__name__) @log_start_end(log=logger) def get_rolling_avg(df: pd.DataFrame, length: int) -> Tuple[pd.DataFrame, pd.DataFrame]...
true
true
f71b8506b37bb0252f9682c2fbba2ee5c82cb403
729
py
Python
utils/see.py
jack09581013/Dual-GDNet
d9d65928208caee781cbe8f8f794241d06b4bf5d
[ "MIT" ]
null
null
null
utils/see.py
jack09581013/Dual-GDNet
d9d65928208caee781cbe8f8f794241d06b4bf5d
[ "MIT" ]
null
null
null
utils/see.py
jack09581013/Dual-GDNet
d9d65928208caee781cbe8f8f794241d06b4bf5d
[ "MIT" ]
null
null
null
import tools import os from dataset import RandomCropper, sub_sampling from utils import plot_flying_things3D height = 240 width = 576 ratio = 1 height = height//ratio width = width//ratio train_files = os.listdir('/media/jack/data/Dataset/pytorch/flyingthings3d/TRAIN') test_files = os.listdir('/media/jack/data/Data...
25.137931
88
0.747599
import tools import os from dataset import RandomCropper, sub_sampling from utils import plot_flying_things3D height = 240 width = 576 ratio = 1 height = height//ratio width = width//ratio train_files = os.listdir('/media/jack/data/Dataset/pytorch/flyingthings3d/TRAIN') test_files = os.listdir('/media/jack/data/Data...
true
true
f71b86630d2154e3ec53d9c2d1bbc45428ac1669
498
py
Python
Lib/site-packages/plotly/validators/sankey/link/concentrationscales/_label.py
tytanya/my-first-blog
2b40adb0816c3546e90ad6ca1e7fb50d924c1536
[ "bzip2-1.0.6" ]
4
2020-02-05T11:26:47.000Z
2021-05-26T07:48:46.000Z
Lib/site-packages/plotly/validators/sankey/link/concentrationscales/_label.py
tytanya/my-first-blog
2b40adb0816c3546e90ad6ca1e7fb50d924c1536
[ "bzip2-1.0.6" ]
6
2021-03-18T22:27:08.000Z
2022-03-11T23:40:50.000Z
venv/lib/python3.7/site-packages/plotly/validators/sankey/link/concentrationscales/_label.py
kylenahas/180LoginV1
8f64be6e6016d47dff8febfcfa3bbd56e9042f89
[ "MIT" ]
1
2020-02-02T21:17:12.000Z
2020-02-02T21:17:12.000Z
import _plotly_utils.basevalidators class LabelValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name='label', parent_name='sankey.link.concentrationscales', **kwargs ): super(LabelValidator, self).__init__( plotly_name=plo...
26.210526
67
0.610442
import _plotly_utils.basevalidators class LabelValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name='label', parent_name='sankey.link.concentrationscales', **kwargs ): super(LabelValidator, self).__init__( plotly_name=plo...
true
true
f71b867bee311ba5e70b95ace8a6be7c624ca76a
3,503
py
Python
tensorflow_probability/python/experimental/auto_batching/numpy_backend_test.py
matthieucoquet/probability
2426f4fc4743ceedc1a638a03d19ce6654ebff76
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/experimental/auto_batching/numpy_backend_test.py
matthieucoquet/probability
2426f4fc4743ceedc1a638a03d19ce6654ebff76
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/experimental/auto_batching/numpy_backend_test.py
matthieucoquet/probability
2426f4fc4743ceedc1a638a03d19ce6654ebff76
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Probability Authors. # # 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 o...
39.806818
101
0.703968
from __future__ import absolute_import from __future__ import division from __future__ import print_function import hypothesis as hp from hypothesis import strategies as hps from hypothesis.extra import numpy as hpnp import numpy as np import tensorflow as tf from tensorflow_probability.python.experim...
true
true
f71b87f9a34ad86788ead5a5a291dfc02bf3cc77
138
py
Python
modules/2.79/bpy/types/GPENCIL_UL_brush.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
modules/2.79/bpy/types/GPENCIL_UL_brush.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
modules/2.79/bpy/types/GPENCIL_UL_brush.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
class GPENCIL_UL_brush: def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index): pass
17.25
96
0.702899
class GPENCIL_UL_brush: def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index): pass
true
true
f71b88eb5a8cae0039b8f28310d55519871da1ba
43,625
py
Python
STR.py
Kashnikov-AV/Special-Theory-of-Relativity-lab-
60a154bc357c38b097604bd21aaa810e07665104
[ "MIT" ]
null
null
null
STR.py
Kashnikov-AV/Special-Theory-of-Relativity-lab-
60a154bc357c38b097604bd21aaa810e07665104
[ "MIT" ]
null
null
null
STR.py
Kashnikov-AV/Special-Theory-of-Relativity-lab-
60a154bc357c38b097604bd21aaa810e07665104
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import pygame import math import time import os from rocket import Rocket from watch import Watch from button import Start from button import Stop from button import Pause from button import Scroll from button import Change_velocity from button import Galileo from button impor...
49.349548
134
0.525547
 import pygame import math import time import os from rocket import Rocket from watch import Watch from button import Start from button import Stop from button import Pause from button import Scroll from button import Change_velocity from button import Galileo from button import Ruseng def run_game...
false
true
f71b891108d478f5ab27a7c4e1616fd4375c19ac
5,222
py
Python
codes/test.py
dvschultz/BasicSR
69f360227f02cc86fa534a82ff969dd9084ac825
[ "Apache-2.0" ]
null
null
null
codes/test.py
dvschultz/BasicSR
69f360227f02cc86fa534a82ff969dd9084ac825
[ "Apache-2.0" ]
null
null
null
codes/test.py
dvschultz/BasicSR
69f360227f02cc86fa534a82ff969dd9084ac825
[ "Apache-2.0" ]
null
null
null
import os.path as osp import logging import time import argparse from collections import OrderedDict import options.options as option import utils.util as util from data.util import bgr2ycbcr from data import create_dataset, create_dataloader from models import create_model #### options parser = argparse.ArgumentPars...
42.803279
99
0.617771
import os.path as osp import logging import time import argparse from collections import OrderedDict import options.options as option import utils.util as util from data.util import bgr2ycbcr from data import create_dataset, create_dataloader from models import create_model ser() parser.add_argument('-opt', type=str,...
true
true
f71b8944d7cb24a8c9e0c2e8ab0e255b732516de
11,057
py
Python
script/gen_requirements_all.py
TheDatNik/home-assistant
12b451adf5e5e894cb0707b61535218260411189
[ "Apache-2.0" ]
2
2019-07-31T16:09:15.000Z
2019-09-05T08:07:12.000Z
script/gen_requirements_all.py
TheDatNik/home-assistant
12b451adf5e5e894cb0707b61535218260411189
[ "Apache-2.0" ]
2
2022-01-13T04:00:03.000Z
2022-03-12T01:02:40.000Z
script/gen_requirements_all.py
TheDatNik/home-assistant
12b451adf5e5e894cb0707b61535218260411189
[ "Apache-2.0" ]
2
2017-10-16T07:55:03.000Z
2019-10-07T21:26:20.000Z
#!/usr/bin/env python3 """Generate an updated requirements_all.txt.""" import fnmatch import importlib import os import pathlib import pkgutil import re import sys from script.hassfest.model import Integration COMMENT_REQUIREMENTS = ( 'Adafruit-DHT', 'Adafruit_BBIO', 'avion', 'beacontools', 'blink...
25.955399
78
0.617889
import fnmatch import importlib import os import pathlib import pkgutil import re import sys from script.hassfest.model import Integration COMMENT_REQUIREMENTS = ( 'Adafruit-DHT', 'Adafruit_BBIO', 'avion', 'beacontools', 'blinkt', 'bluepy', 'bme680', 'credstash', 'decora', 'en...
true
true
f71b8a631ab134a126402e2d0c05bb00449922c8
150,997
py
Python
fastkml/test_main.py
dennereed/paleocore
d6da6c39cde96050ee4b9e7213ec1200530cbeee
[ "MIT" ]
1
2021-02-05T19:50:13.000Z
2021-02-05T19:50:13.000Z
fastkml/test_main.py
dennereed/paleocore
d6da6c39cde96050ee4b9e7213ec1200530cbeee
[ "MIT" ]
59
2020-06-17T22:21:51.000Z
2022-02-10T05:00:01.000Z
fastkml/test_main.py
dennereed/paleocore
d6da6c39cde96050ee4b9e7213ec1200530cbeee
[ "MIT" ]
2
2020-07-01T14:11:09.000Z
2020-08-10T17:27:26.000Z
# -*- coding: utf-8 -*- # Copyright (C) 2012 Christian Ledermann # # This library is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later vers...
58.187669
53,811
0.602939
try: import unittest2 as unittest except: import unittest from fastkml import kml from fastkml import styles from fastkml import base from fastkml import atom from fastkml import config from fastkml import gx import datetime from dateutil.tz import tzutc, tzoffset from fastkml.config imp...
true
true
f71b8c248dafde29a7c3bf37462e5c2f5296a920
461
py
Python
pyapi/utils/db.py
dockerian/py-api
777db7d5dacf3ecf29a991f50d2ac78bb5bef66a
[ "Apache-2.0" ]
null
null
null
pyapi/utils/db.py
dockerian/py-api
777db7d5dacf3ecf29a991f50d2ac78bb5bef66a
[ "Apache-2.0" ]
6
2019-12-26T16:51:55.000Z
2022-03-21T22:16:45.000Z
pyapi/utils/db.py
dockerian/pyapi
777db7d5dacf3ecf29a991f50d2ac78bb5bef66a
[ "Apache-2.0" ]
null
null
null
""" # db module - database adapter functions """ from sqlalchemy import DateTime, TypeDecorator # pylint: disable=abstract-method class DateTimeUtc(TypeDecorator): ''' Results returned as offset-aware datetimes. ''' impl = DateTime # pylint: disable=unused-argument def process_result_value(...
20.954545
51
0.668113
from sqlalchemy import DateTime, TypeDecorator class DateTimeUtc(TypeDecorator): impl = DateTime def process_result_value(self, value, dialect): return value.replace(tzinfo=pytz.utc)
true
true
f71b8c325f2c4b1fda3cadbcc6909025b1010728
2,157
py
Python
flask_rebar/swagger_generation/swagger_words.py
jsonau/flask-rebar
22b82596e60bcb537c69dba03ed7155176a9aca1
[ "MIT" ]
null
null
null
flask_rebar/swagger_generation/swagger_words.py
jsonau/flask-rebar
22b82596e60bcb537c69dba03ed7155176a9aca1
[ "MIT" ]
null
null
null
flask_rebar/swagger_generation/swagger_words.py
jsonau/flask-rebar
22b82596e60bcb537c69dba03ed7155176a9aca1
[ "MIT" ]
null
null
null
""" Swagger Words ~~~~~~~~~~~~~ Python friendly aliases to reserved Swagger words. :copyright: Copyright 2018 PlanGrid, Inc., see AUTHORS. :license: MIT, see LICENSE for details. """ from __future__ import unicode_literals additional_properties = "additionalProperties" all_of = "allOf" allow_empt...
21.147059
59
0.710246
from __future__ import unicode_literals additional_properties = "additionalProperties" all_of = "allOf" allow_empty_value = "allowEmptyValue" any_of = "anyOf" api_key = "apiKey" array = "array" basic = "basic" binary = "binary" body = "body" boolean = "boolean" byte = "byte" collection_format = "collectionFormat" comp...
true
true
f71b8c4522567898a2c8dbed743a740b05b28ad7
1,035
py
Python
oslo_ovsdb_frontend/impl/native/helpers.py
salv-orlando/oslo_ovsdb_frontend
07845187467a9e8ad00f02f597e0e1277f28c637
[ "Apache-2.0" ]
null
null
null
oslo_ovsdb_frontend/impl/native/helpers.py
salv-orlando/oslo_ovsdb_frontend
07845187467a9e8ad00f02f597e0e1277f28c637
[ "Apache-2.0" ]
null
null
null
oslo_ovsdb_frontend/impl/native/helpers.py
salv-orlando/oslo_ovsdb_frontend
07845187467a9e8ad00f02f597e0e1277f28c637
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2015 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
36.964286
78
0.686957
def _connection_to_manager_uri(conn_uri): proto, addr = conn_uri.split(':', 1) if ':' in addr: ip, port = addr.split(':', 1) return 'p%s:%s:%s' % (proto, port, ip) else: return 'p%s:%s' % (proto, addr) def enable_connection_uri(conn_uri, execute_func): manager_ur...
true
true
f71b8d9b0f6513f05ab15b6e9fc0dbe880661dcb
940
py
Python
rapidenv/misc/set_activate_alias.py
innoviz-sw-infra/rapid-env
acc5e1e461af42b5fbb7024c0b79d4315c206fe2
[ "MIT" ]
1
2021-02-15T20:55:49.000Z
2021-02-15T20:55:49.000Z
rapidenv/misc/set_activate_alias.py
innoviz-sw-infra/rapid-env
acc5e1e461af42b5fbb7024c0b79d4315c206fe2
[ "MIT" ]
null
null
null
rapidenv/misc/set_activate_alias.py
innoviz-sw-infra/rapid-env
acc5e1e461af42b5fbb7024c0b79d4315c206fe2
[ "MIT" ]
null
null
null
import sys from pathlib import Path def mainwin32(): if len(sys.argv) < 2: print(f'to use run: python set_activate_alias.py $profile') return profile = sys.argv[1] profile = Path(profile) # makr parent directory if not exist if not profile.parent.exists(): profile.pare...
22.926829
71
0.575532
import sys from pathlib import Path def mainwin32(): if len(sys.argv) < 2: print(f'to use run: python set_activate_alias.py $profile') return profile = sys.argv[1] profile = Path(profile) if not profile.parent.exists(): profile.parent.mkdir(parents=True) ...
true
true
f71b8dec12d6719d1ccd4adbb31f7a450c33383c
1,268
py
Python
apps/accounts/forms.py
cloudartisan/dojomaster
9d5efa0345c659636f8d8b556302d0d7bb2055a8
[ "MIT" ]
1
2019-02-21T14:47:31.000Z
2019-02-21T14:47:31.000Z
apps/accounts/forms.py
cloudartisan/dojomaster
9d5efa0345c659636f8d8b556302d0d7bb2055a8
[ "MIT" ]
null
null
null
apps/accounts/forms.py
cloudartisan/dojomaster
9d5efa0345c659636f8d8b556302d0d7bb2055a8
[ "MIT" ]
null
null
null
from django import forms from .models import UserAccount class UserCreationForm(forms.ModelForm): """ A form for creating new users. Includes all the required fields, plus a repeated password. """ password1 = forms.CharField(label='Password', widget=forms.PasswordInput) password2 = forms.Cha...
29.488372
90
0.662461
from django import forms from .models import UserAccount class UserCreationForm(forms.ModelForm): password1 = forms.CharField(label='Password', widget=forms.PasswordInput) password2 = forms.CharField(label='Password confirmation', widget=forms.PasswordInput) class Meta: model = UserAccount ...
true
true
f71b8eacdcd41ec7c42144254a210d3c2c2d6f9a
568
py
Python
ahrs/filters/__init__.py
ethan-jiang-1/ahrs
e1725267b0009a8a573f99dbf8d06e8481407ab6
[ "MIT" ]
184
2019-09-06T07:58:52.000Z
2022-03-31T04:27:09.000Z
ahrs/filters/__init__.py
geoKinga/ahrs
87f9210cfcf6c545d86ae8588a93f012020164ee
[ "MIT" ]
48
2019-11-13T15:42:46.000Z
2022-03-31T23:53:53.000Z
ahrs/filters/__init__.py
geoKinga/ahrs
87f9210cfcf6c545d86ae8588a93f012020164ee
[ "MIT" ]
34
2019-12-19T16:22:00.000Z
2022-03-14T09:51:50.000Z
# -*- coding: utf-8 -*- """ Attitude Estimators =================== These are the most common attitude filters. """ from .angular import AngularRate from .aqua import AQUA from .complementary import Complementary from .davenport import Davenport from .ekf import EKF from .famc import FAMC from .flae import FLAE from...
21.037037
43
0.753521
from .angular import AngularRate from .aqua import AQUA from .complementary import Complementary from .davenport import Davenport from .ekf import EKF from .famc import FAMC from .flae import FLAE from .fourati import Fourati from .fqa import FQA from .tilt import Tilt from .madgwick import Madgwick from .mahony impo...
true
true
f71b8eb018fd43deeb30f1cc3852fc3278cb539b
1,196
py
Python
Exercicios/ex059.py
MateusBarboza99/Python-03-
9c6df88aaa8ba83d385b92722ed1df5873df3a77
[ "MIT" ]
null
null
null
Exercicios/ex059.py
MateusBarboza99/Python-03-
9c6df88aaa8ba83d385b92722ed1df5873df3a77
[ "MIT" ]
null
null
null
Exercicios/ex059.py
MateusBarboza99/Python-03-
9c6df88aaa8ba83d385b92722ed1df5873df3a77
[ "MIT" ]
null
null
null
from time import sleep valor1 = int(input('Digite Primeiro valor: ')) valor2 = int(input('Digite segundo valor: ')) opção = 0 while opção != 5: print(''' [ 1 ] SOMAR [ 2 ] MULTIPLICAR [ 3 ] MAIOR [ 4 ] NOVOS NÚMEROS [ 5 ] SAIR DO PROGRAMA''') opção = int(input('Qual opção você deseja ? ')) ...
32.324324
88
0.553512
from time import sleep valor1 = int(input('Digite Primeiro valor: ')) valor2 = int(input('Digite segundo valor: ')) opção = 0 while opção != 5: print(''' [ 1 ] SOMAR [ 2 ] MULTIPLICAR [ 3 ] MAIOR [ 4 ] NOVOS NÚMEROS [ 5 ] SAIR DO PROGRAMA''') opção = int(input('Qual opção você deseja ? ')) ...
true
true
f71b8f02bb638c288dc1d7f5c04c314106795526
2,828
py
Python
tests/providers/amazon/aws/operators/test_step_function_start_execution.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
15,947
2019-01-05T13:51:02.000Z
2022-03-31T23:33:16.000Z
tests/providers/amazon/aws/operators/test_step_function_start_execution.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
14,603
2019-01-05T09:43:19.000Z
2022-03-31T23:11:59.000Z
tests/providers/amazon/aws/operators/test_step_function_start_execution.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
8,429
2019-01-05T19:45:47.000Z
2022-03-31T22:13:01.000Z
# # 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 # "License"); you may not...
33.666667
104
0.703324
import unittest from unittest import mock from unittest.mock import MagicMock from airflow.providers.amazon.aws.operators.step_function_start_execution import ( StepFunctionStartExecutionOperator, ) TASK_ID = 'step_function_start_execution_task' STATE_MACHINE_ARN = 'arn:aws:states:us-east-1:000...
true
true
f71b8fffbe1ae2ccf4e9b4742ebf89d95ffbb7f6
39
py
Python
tfcv/modeling/modules/attention/__init__.py
xingzhaolee/tfcv
27b6a4e8e93cf9b5fecedd6c259118f64b74e263
[ "MIT" ]
null
null
null
tfcv/modeling/modules/attention/__init__.py
xingzhaolee/tfcv
27b6a4e8e93cf9b5fecedd6c259118f64b74e263
[ "MIT" ]
null
null
null
tfcv/modeling/modules/attention/__init__.py
xingzhaolee/tfcv
27b6a4e8e93cf9b5fecedd6c259118f64b74e263
[ "MIT" ]
null
null
null
from .bam import * from .cbam import *
13
19
0.692308
from .bam import * from .cbam import *
true
true
f71b90fd99c79c76b18913c0621289947d10b94f
2,923
py
Python
pkg/distro/packaging_test.py
psigen/rules_pkg
b20c45f292be6c74d2f0d829ba02c83dbe271195
[ "Apache-2.0" ]
null
null
null
pkg/distro/packaging_test.py
psigen/rules_pkg
b20c45f292be6c74d2f0d829ba02c83dbe271195
[ "Apache-2.0" ]
null
null
null
pkg/distro/packaging_test.py
psigen/rules_pkg
b20c45f292be6c74d2f0d829ba02c83dbe271195
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The Bazel 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 la...
34.797619
76
0.689702
import os import subprocess import unittest from bazel_tools.tools.python.runfiles import runfiles from releasing import release_tools from distro import release_version _VERBOSE = True class PackagingTest(unittest.TestCase): def setUp(self): self.data_files = runfiles.Create() self.repo =...
true
true
f71b9174bdbad3aa8de9187fea7cf060e68be521
277,501
py
Python
sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/models/_models.py
mtin/azure-sdk-for-python
08d7f8f76d1c9eca230cbcecb3c42eb92817bcb8
[ "MIT" ]
null
null
null
sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/models/_models.py
mtin/azure-sdk-for-python
08d7f8f76d1c9eca230cbcecb3c42eb92817bcb8
[ "MIT" ]
null
null
null
sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/models/_models.py
mtin/azure-sdk-for-python
08d7f8f76d1c9eca230cbcecb3c42eb92817bcb8
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
43.177377
276
0.671298
import msrest.serialization class AcsChatEventBaseProperties(msrest.serialization.Model): _attribute_map = { 'recipient_communication_identifier': {'key': 'recipientCommunicationIdentifier', 'type': 'CommunicationIdentifierModel'}, 'transaction_id': {'key': 'transactionId', 'type': 'str'}...
true
true
f71b922170a32d261f523c660af62772c3182168
5,687
py
Python
mjmpc/control/olgaussian_mpc.py
mohakbhardwaj/mjmpc
097e8d9bdaf0b3a15afa39030b2f53b00dfa25de
[ "Apache-2.0" ]
2
2021-08-15T22:23:50.000Z
2021-12-03T13:09:13.000Z
mjmpc/control/olgaussian_mpc.py
mohakbhardwaj/mjmpc
097e8d9bdaf0b3a15afa39030b2f53b00dfa25de
[ "Apache-2.0" ]
null
null
null
mjmpc/control/olgaussian_mpc.py
mohakbhardwaj/mjmpc
097e8d9bdaf0b3a15afa39030b2f53b00dfa25de
[ "Apache-2.0" ]
1
2022-02-18T10:22:49.000Z
2022-02-18T10:22:49.000Z
""" MPC with open-loop Gaussian policies """ from .controller import Controller from mjmpc.utils.control_utils import generate_noise, scale_ctrl import copy import numpy as np import scipy.special class OLGaussianMPC(Controller): def __init__(self, d_state, d_obs, ...
40.621429
103
0.523475
from .controller import Controller from mjmpc.utils.control_utils import generate_noise, scale_ctrl import copy import numpy as np import scipy.special class OLGaussianMPC(Controller): def __init__(self, d_state, d_obs, d_action, ...
true
true
f71b92878fc1fad9e2f4829b6b8365831bd39735
612
py
Python
combine/indicator/combination_indicator.py
cwwang15/fudan-monte-carlo-pwd
807a4d9f45112ed6520a08d14ea65ca79efe33ea
[ "Apache-2.0" ]
1
2021-08-04T09:51:55.000Z
2021-08-04T09:51:55.000Z
combine/indicator/combination_indicator.py
cwwang15/pwd-monte-carlo
807a4d9f45112ed6520a08d14ea65ca79efe33ea
[ "Apache-2.0" ]
null
null
null
combine/indicator/combination_indicator.py
cwwang15/pwd-monte-carlo
807a4d9f45112ed6520a08d14ea65ca79efe33ea
[ "Apache-2.0" ]
null
null
null
import abc class CombinationIndicator(metaclass=abc.ABCMeta): def __init__(self, threshold: float): self.__threshold: float = threshold @property def threshold(self): return self.__threshold @threshold.setter def threshold(self, new_threshold: float): self.__threshold = n...
25.5
73
0.676471
import abc class CombinationIndicator(metaclass=abc.ABCMeta): def __init__(self, threshold: float): self.__threshold: float = threshold @property def threshold(self): return self.__threshold @threshold.setter def threshold(self, new_threshold: float): self.__threshold = n...
true
true
f71b95dcc7666004de7d0b909f2b67e00806bb40
1,523
py
Python
simulation/src/simulation_evaluation/src/state_machine/state_machines/priority.py
KITcar-Team/kitcar-gazebo-simulation
8a9438b5a24c288721ae0302889fe55e26046310
[ "MIT" ]
13
2020-06-30T17:18:28.000Z
2021-07-20T16:55:35.000Z
simulation/src/simulation_evaluation/src/state_machine/state_machines/priority.py
KITcar-Team/kitcar-gazebo-simulation
8a9438b5a24c288721ae0302889fe55e26046310
[ "MIT" ]
1
2020-11-10T20:15:42.000Z
2020-12-25T18:27:56.000Z
simulation/src/simulation_evaluation/src/state_machine/state_machines/priority.py
KITcar-Team/kitcar-gazebo-simulation
8a9438b5a24c288721ae0302889fe55e26046310
[ "MIT" ]
3
2020-07-20T09:09:08.000Z
2021-07-20T17:00:37.000Z
"""PriorityStateMachine keeps track of stoping or halting in front of stop or halt lines. See :mod:`simulation.src.simulation_evaluation.src.state_machine.states.priority` for implementation details of the states used in this StateMachine. """ from typing import Callable from simulation.src.simulation_evaluation.src...
32.404255
89
0.688116
from typing import Callable from simulation.src.simulation_evaluation.src.state_machine.states.priority import ( FailureInStopZone, InHaltZone, InStopZone, Off, SuccessfullyStopped, ) from .state_machine import StateMachine __copyright__ = "KITcar" class PriorityStateMachine(StateMachine): ...
true
true
f71b962aa0b18da3f6fe8e52d30897d155ad960b
1,042
py
Python
tests/test_pitch.py
AishaSharif/Pitch-Blog
c5d8cd462246bca96aabeca05817ed41bb7f2d0c
[ "MIT" ]
null
null
null
tests/test_pitch.py
AishaSharif/Pitch-Blog
c5d8cd462246bca96aabeca05817ed41bb7f2d0c
[ "MIT" ]
null
null
null
tests/test_pitch.py
AishaSharif/Pitch-Blog
c5d8cd462246bca96aabeca05817ed41bb7f2d0c
[ "MIT" ]
null
null
null
import unittest from app.models import Pitch,User from flask_login import current_user from app import db class TestComment(unittest.TestCase): def setUp(self): self.user_Lelabo = User(username = 'Lelabo',password = '123Pass', email = 'mail@lelabo.com') self.new_pitch = Pitch(pitch_id=12345,pitch_...
28.944444
100
0.697697
import unittest from app.models import Pitch,User from flask_login import current_user from app import db class TestComment(unittest.TestCase): def setUp(self): self.user_Lelabo = User(username = 'Lelabo',password = '123Pass', email = 'mail@lelabo.com') self.new_pitch = Pitch(pitch_id=12345,pitch_...
false
true
f71b9795d1f9e2621b52a1fb8f3fffa662517f05
6,626
py
Python
wizmann-pic/18-11-19/encrypt.py
Wizmann/assets
1a34a18e65bc4c57676f9a04d6eb5c2a3806fcfc
[ "MIT" ]
null
null
null
wizmann-pic/18-11-19/encrypt.py
Wizmann/assets
1a34a18e65bc4c57676f9a04d6eb5c2a3806fcfc
[ "MIT" ]
null
null
null
wizmann-pic/18-11-19/encrypt.py
Wizmann/assets
1a34a18e65bc4c57676f9a04d6eb5c2a3806fcfc
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # Copyright 2012-2015 clowwindy # # 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 la...
27.957806
81
0.601419
from __future__ import absolute_import, division, print_function, \ with_statement import os import sys import hashlib import logging import random import string import binascii from shadowsocks import common from shadowsocks.crypto import rc4_md5, openssl, sodium, table NONCE_RANGE = (32, 512) N...
true
true
f71b97d646bf147a35345ec60a2da27de1631ea8
968
py
Python
mysite/mysite/urls.py
FullGhettoAlchemist/cepheusProduction
951c244d454fafa817b34dd37aaea28a10afa655
[ "MIT" ]
null
null
null
mysite/mysite/urls.py
FullGhettoAlchemist/cepheusProduction
951c244d454fafa817b34dd37aaea28a10afa655
[ "MIT" ]
null
null
null
mysite/mysite/urls.py
FullGhettoAlchemist/cepheusProduction
951c244d454fafa817b34dd37aaea28a10afa655
[ "MIT" ]
null
null
null
"""mysite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') C...
35.851852
80
0.670455
from django.conf.urls import url from django.contrib import admin from app import views urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^$', views.index, name='index'), url(r'^position/$', views.position, name='position'), url(r'^details/$', views.details, name='details'), ]
true
true
f71b995b9c4ad66cf9f2feb286b113ed39ca86d1
8,848
py
Python
STS_v2/compute_high_low_limit_v3.py
kite8/quant_learning
d823974cd2b5a6b8e2a20fe42d7334051fa46ea0
[ "MIT" ]
1
2019-02-22T08:12:41.000Z
2019-02-22T08:12:41.000Z
STS_v2/compute_high_low_limit_v3.py
kite8/quant_learning
d823974cd2b5a6b8e2a20fe42d7334051fa46ea0
[ "MIT" ]
null
null
null
STS_v2/compute_high_low_limit_v3.py
kite8/quant_learning
d823974cd2b5a6b8e2a20fe42d7334051fa46ea0
[ "MIT" ]
5
2019-02-22T08:14:09.000Z
2020-06-28T05:54:39.000Z
# -*- coding: utf-8 -*- """ Created on Fri Nov 2 15:19:45 2018 @author: kite """ import datetime, time from pymongo import UpdateOne, ASCENDING, UpdateMany from database import DB_CONN from stock_util import get_trading_dates, get_all_codes import tushare as ts import numpy as np import pandas as pd import requests ...
36.561983
125
0.495592
import datetime, time from pymongo import UpdateOne, ASCENDING, UpdateMany from database import DB_CONN from stock_util import get_trading_dates, get_all_codes import tushare as ts import numpy as np import pandas as pd import requests import json import datetime def fill_issueprice_and_timeToMarket(): df = pd...
true
true
f71b9a749d420870b13e967659e88b311fd71f8e
5,142
py
Python
dsw_mailer/connection/smtp.py
ds-wizard/mailer
f919cf42a413a9fa530607358900255b55fc233a
[ "Apache-2.0" ]
null
null
null
dsw_mailer/connection/smtp.py
ds-wizard/mailer
f919cf42a413a9fa530607358900255b55fc233a
[ "Apache-2.0" ]
null
null
null
dsw_mailer/connection/smtp.py
ds-wizard/mailer
f919cf42a413a9fa530607358900255b55fc233a
[ "Apache-2.0" ]
null
null
null
import logging import pathvalidate import smtplib import ssl import tenacity from email import encoders from email.mime.base import MIMEBase from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.utils import formataddr from ..config import MailConfig from ..context import Cont...
36.211268
82
0.632439
import logging import pathvalidate import smtplib import ssl import tenacity from email import encoders from email.mime.base import MIMEBase from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.utils import formataddr from ..config import MailConfig from ..context import Cont...
true
true
f71b9ac9f4d7813d05814baf5ec329e7feb1f6b6
1,576
py
Python
setup.py
JakubBlaha/python-jsonstore
9f79f17e7947fe89aea1e67483d1f8d7313ea4ab
[ "MIT" ]
2
2020-04-30T12:22:15.000Z
2020-05-15T22:40:39.000Z
setup.py
JakubBlaha/python-jsonstore
9f79f17e7947fe89aea1e67483d1f8d7313ea4ab
[ "MIT" ]
6
2018-09-05T17:46:21.000Z
2020-06-01T11:34:26.000Z
setup.py
JakubBlaha/python-jsonstore
9f79f17e7947fe89aea1e67483d1f8d7313ea4ab
[ "MIT" ]
5
2017-11-25T20:31:28.000Z
2020-09-04T00:57:07.000Z
import codecs from os import path from textwrap import dedent from setuptools import setup here = path.abspath(path.dirname(__file__)) with codecs.open(path.join(here, "README.rst"), encoding='utf-8') as f: long_description = f.read() setup( name='python-jsonstore', use_scm_version=True, description...
33.531915
71
0.645939
import codecs from os import path from textwrap import dedent from setuptools import setup here = path.abspath(path.dirname(__file__)) with codecs.open(path.join(here, "README.rst"), encoding='utf-8') as f: long_description = f.read() setup( name='python-jsonstore', use_scm_version=True, description...
true
true
f71b9b08d59205e762bc081291995a3dce88426a
778
py
Python
ws2122-lspm/Lib/site-packages/pm4py/objects/log/exporter/xes/util/__init__.py
Malekhy/ws2122-lspm
e4dc8b801d12f862b8ef536a0f125f346f085a00
[ "MIT" ]
1
2022-01-19T04:02:46.000Z
2022-01-19T04:02:46.000Z
ws2122-lspm/Lib/site-packages/pm4py/objects/log/exporter/xes/util/__init__.py
Malekhy/ws2122-lspm
e4dc8b801d12f862b8ef536a0f125f346f085a00
[ "MIT" ]
1
2021-11-19T07:21:48.000Z
2021-11-19T07:21:48.000Z
ws2122-lspm/Lib/site-packages/pm4py/objects/log/exporter/xes/util/__init__.py
Malekhy/ws2122-lspm
e4dc8b801d12f862b8ef536a0f125f346f085a00
[ "MIT" ]
1
2022-01-14T17:15:38.000Z
2022-01-14T17:15:38.000Z
''' This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de). PM4Py 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 late...
43.222222
76
0.737789
from pm4py.objects.log.exporter.xes.util import compression
true
true
f71b9c6dbdb4556fd1c62de37e6dbb97379d445f
4,113
py
Python
homeassistant/components/sensor/rtorrent.py
XRyu/home-assistant
c9c707e368be159f0138a40d21fdea7a2a650ffe
[ "Apache-2.0" ]
1
2019-07-24T09:26:57.000Z
2019-07-24T09:26:57.000Z
homeassistant/components/sensor/rtorrent.py
XRyu/home-assistant
c9c707e368be159f0138a40d21fdea7a2a650ffe
[ "Apache-2.0" ]
5
2021-02-08T20:32:11.000Z
2022-01-13T01:19:23.000Z
homeassistant/components/sensor/rtorrent.py
XRyu/home-assistant
c9c707e368be159f0138a40d21fdea7a2a650ffe
[ "Apache-2.0" ]
null
null
null
"""Support for monitoring the rtorrent BitTorrent client API.""" import logging import xmlrpc.client import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( CONF_URL, CONF_NAME, CONF_MONITORED_VARIABLES, STATE_IDLE) from homeassistant.helpers.enti...
32.132813
70
0.650863
import logging import xmlrpc.client import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( CONF_URL, CONF_NAME, CONF_MONITORED_VARIABLES, STATE_IDLE) from homeassistant.helpers.entity import Entity import homeassistant.helpers.config_validation a...
true
true
f71b9cde058636291fadd916f2bb3f983e61f130
3,694
py
Python
BM/1.Pipelines_For_Running_Tools/1.B.pipe_M2S2MH/python.MH_conc.py
hiyoothere/Benchmarking-mosaic-variant-detection
a627602276273c10bbdcf2b9cf30a634765e40f8
[ "CECILL-B" ]
2
2021-11-24T04:38:34.000Z
2022-01-21T08:38:24.000Z
BM/1.Pipelines_For_Running_Tools/1.B.pipe_M2S2MH/python.MH_conc.py
hiyoothere/Benchmarking-mosaic-variant-detection
a627602276273c10bbdcf2b9cf30a634765e40f8
[ "CECILL-B" ]
null
null
null
BM/1.Pipelines_For_Running_Tools/1.B.pipe_M2S2MH/python.MH_conc.py
hiyoothere/Benchmarking-mosaic-variant-detection
a627602276273c10bbdcf2b9cf30a634765e40f8
[ "CECILL-B" ]
null
null
null
import glob import sys ##### creatin dict that will have all control positions def con_pos(con_MH): con_dict = {} f = open(con_MH, 'r') for line in f: s = line.split() chr = s[0] pos = s[1] ref = int(s[7]) #ref depth alt = int(s[9]) #alt depth vaf = float(alt)/(ref+alt) alt_type = s[8] #alt base ...
30.278689
96
0.566594
import glob import sys if chr in con_dict: if pos in con_dict[chr]: print "ERROR: %s : %s"%(chr, pos) else: con_dict[chr][pos] = [[vaf, "NA"], alt_type] "], alt_type]} f.close() return con_dict def combine(con_dict, cas_MH): cas = open(cas_MH, 'r') for line in cas: s = line.split() chr = s[0] ...
false
true
f71b9da7eaef7e2b15246349f4b4f1045f95882f
799
py
Python
backend/scrape_amazon/update_product_db_amazon.py
jayleenli/the-legend-of-compurator
7fc747ebf6b011acec8733a394861f7fed368d73
[ "MIT" ]
null
null
null
backend/scrape_amazon/update_product_db_amazon.py
jayleenli/the-legend-of-compurator
7fc747ebf6b011acec8733a394861f7fed368d73
[ "MIT" ]
null
null
null
backend/scrape_amazon/update_product_db_amazon.py
jayleenli/the-legend-of-compurator
7fc747ebf6b011acec8733a394861f7fed368d73
[ "MIT" ]
null
null
null
from .scrape_objects_MVP import get_attributes, get_id from pymongo import MongoClient import os DB_URL = os.environ['DB_URL'] CLIENT = MongoClient(DB_URL) DB = CLIENT.compurator PRODUCTS_COLLECTION = DB["products"] def check_product_exists(url): ''' :param url: url of amazon product :return: false if pr...
24.212121
90
0.720901
from .scrape_objects_MVP import get_attributes, get_id from pymongo import MongoClient import os DB_URL = os.environ['DB_URL'] CLIENT = MongoClient(DB_URL) DB = CLIENT.compurator PRODUCTS_COLLECTION = DB["products"] def check_product_exists(url): p_id = get_id(url) if PRODUCTS_COLLECTION.count({'p_id': p_id...
true
true
f71b9e37908dd5da30752301903bfc85504aa496
728
py
Python
Examples/AcceptAllRevisions.py
aspose-words-cloud/aspose-words-cloud-python
65c7b55fa4aac69b60d41e7f54aed231df285479
[ "MIT" ]
14
2018-07-15T17:01:52.000Z
2018-11-29T06:15:33.000Z
Examples/AcceptAllRevisions.py
aspose-words-cloud/aspose-words-cloud-python
65c7b55fa4aac69b60d41e7f54aed231df285479
[ "MIT" ]
1
2018-09-28T12:59:34.000Z
2019-10-08T08:42:59.000Z
Examples/AcceptAllRevisions.py
aspose-words-cloud/aspose-words-cloud-python
65c7b55fa4aac69b60d41e7f54aed231df285479
[ "MIT" ]
2
2020-12-21T07:59:17.000Z
2022-02-16T21:41:25.000Z
import os import asposewordscloud import asposewordscloud.models.requests from asposewordscloud.rest import ApiException from shutil import copyfile words_api = WordsApi(client_id = '####-####-####-####-####', client_secret = '##################') file_name = 'test_doc.docx' # Upload original document to cloud stora...
38.315789
108
0.787088
import os import asposewordscloud import asposewordscloud.models.requests from asposewordscloud.rest import ApiException from shutil import copyfile words_api = WordsApi(client_id = '####-####-####-####-####', client_secret = '##################') file_name = 'test_doc.docx' my_var1 = open(file_name, 'rb') my_var2 ...
true
true
f71b9fe025bede004ce7e9ec58b828318f04188f
15,536
py
Python
src/api/block.py
BluCodeGH/Amulet-Map-Editor
7d1d2243fc29095b3cffe8aa4979235444ba6738
[ "MIT" ]
1
2020-08-26T22:42:16.000Z
2020-08-26T22:42:16.000Z
src/api/block.py
BluCodeGH/Amulet-Map-Editor
7d1d2243fc29095b3cffe8aa4979235444ba6738
[ "MIT" ]
null
null
null
src/api/block.py
BluCodeGH/Amulet-Map-Editor
7d1d2243fc29095b3cffe8aa4979235444ba6738
[ "MIT" ]
null
null
null
from __future__ import annotations import copy from sys import getsizeof import re from typing import Dict, Iterable, List, Tuple, Union, overload from api.errors import InvalidBlockException from utils import Int class Block: """ Class to handle data about various blockstates and allow for extra blocks to ...
35.149321
159
0.613092
from __future__ import annotations import copy from sys import getsizeof import re from typing import Dict, Iterable, List, Tuple, Union, overload from api.errors import InvalidBlockException from utils import Int class Block: __slots__ = ( "_namespace", "_base_name", "_properties", ...
true
true
f71ba01410b6baed59ee6dcd47fff57fa191f5b4
22,545
py
Python
tests/test_setup.py
PiotrMachowski/core
b9d7d0cae2ccd2d88e90e49cc09e154a27ed809b
[ "Apache-2.0" ]
3
2020-11-27T06:26:27.000Z
2020-12-09T14:55:16.000Z
tests/test_setup.py
PiotrMachowski/core
b9d7d0cae2ccd2d88e90e49cc09e154a27ed809b
[ "Apache-2.0" ]
18
2021-11-24T06:26:13.000Z
2022-03-31T06:25:15.000Z
tests/test_setup.py
PiotrMachowski/core
b9d7d0cae2ccd2d88e90e49cc09e154a27ed809b
[ "Apache-2.0" ]
3
2021-11-14T13:29:33.000Z
2021-12-27T17:05:22.000Z
"""Test component/platform setup.""" # pylint: disable=protected-access import asyncio import datetime import threading from unittest.mock import AsyncMock, Mock, patch import pytest import voluptuous as vol from homeassistant import config_entries, setup from homeassistant.const import EVENT_COMPONENT_LOADED, EVENT_...
32.485591
87
0.668751
import asyncio import datetime import threading from unittest.mock import AsyncMock, Mock, patch import pytest import voluptuous as vol from homeassistant import config_entries, setup from homeassistant.const import EVENT_COMPONENT_LOADED, EVENT_HOMEASSISTANT_START from homeassistant.core import callback from homeas...
true
true
f71ba0d3b326ae8b8647aa96334c5b3c71a2f678
865
py
Python
epycom/univariate/__init__.py
ICRC-BME/epycom
5bfa3fb9020f04536b7a08382533c8abf56ca85f
[ "Apache-2.0" ]
null
null
null
epycom/univariate/__init__.py
ICRC-BME/epycom
5bfa3fb9020f04536b7a08382533c8abf56ca85f
[ "Apache-2.0" ]
1
2020-10-22T19:10:57.000Z
2020-10-22T21:09:02.000Z
epycom/univariate/__init__.py
ICRC-BME/epycom
5bfa3fb9020f04536b7a08382533c8abf56ca85f
[ "Apache-2.0" ]
1
2021-02-24T10:07:32.000Z
2021-02-24T10:07:32.000Z
from .signal_stats import compute_signal_stats, SignalStats from .hjorth_mobility import compute_hjorth_mobility, HjorthMobility from .hjorth_complexity import compute_hjorth_complexity, HjorthComplexity from .lyapunov_exponent import compute_lyapunov_exponent, LyapunovExponent from .power_spectral_entropy import compu...
61.785714
74
0.861272
from .signal_stats import compute_signal_stats, SignalStats from .hjorth_mobility import compute_hjorth_mobility, HjorthMobility from .hjorth_complexity import compute_hjorth_complexity, HjorthComplexity from .lyapunov_exponent import compute_lyapunov_exponent, LyapunovExponent from .power_spectral_entropy import compu...
true
true
f71ba1197905e6582410e47931bec23c9ece6799
8,846
py
Python
Code/CarbonEquiv_Talmy.py
gshowalt/VirusPopModel
8d41294fa06a44e8fa22ef390d6db14fba7818a1
[ "CC0-1.0" ]
null
null
null
Code/CarbonEquiv_Talmy.py
gshowalt/VirusPopModel
8d41294fa06a44e8fa22ef390d6db14fba7818a1
[ "CC0-1.0" ]
null
null
null
Code/CarbonEquiv_Talmy.py
gshowalt/VirusPopModel
8d41294fa06a44e8fa22ef390d6db14fba7818a1
[ "CC0-1.0" ]
null
null
null
# importing all modules import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.colors as colors from matplotlib import cm import matplotlib.tri as tri from matplotlib.colors import LogNorm import matplotlib.patches as mpatches from matplotlib.ticker import LogFormatter from co...
31.592857
123
0.618698
import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.colors as colors from matplotlib import cm import matplotlib.tri as tri from matplotlib.colors import LogNorm import matplotlib.patches as mpatches from matplotlib.ticker import LogFormatter from collections import Counte...
true
true
f71ba11fdfcf3709595b11c90277b8596127a219
3,479
py
Python
WonderPy/components/wwCommandHead.py
avrabe/WonderPy
60d81340bed1085c32803b32209fbbd4c291310a
[ "MIT" ]
1
2019-05-25T16:55:32.000Z
2019-05-25T16:55:32.000Z
WonderPy/components/wwCommandHead.py
avrabe/WonderPy
60d81340bed1085c32803b32209fbbd4c291310a
[ "MIT" ]
null
null
null
WonderPy/components/wwCommandHead.py
avrabe/WonderPy
60d81340bed1085c32803b32209fbbd4c291310a
[ "MIT" ]
null
null
null
from WonderPy.core.wwConstants import WWRobotConstants from WonderPy.util import wwMath from .wwCommandBase import WWCommandBase, do_not_call_within_connect_or_sensors _rc = WWRobotConstants.RobotComponent _rcv = WWRobotConstants.RobotComponentValues _rp = WWRobotConstants.RobotProperties class WWCommandHead(WWComma...
43.4875
106
0.742167
from WonderPy.core.wwConstants import WWRobotConstants from WonderPy.util import wwMath from .wwCommandBase import WWCommandBase, do_not_call_within_connect_or_sensors _rc = WWRobotConstants.RobotComponent _rcv = WWRobotConstants.RobotComponentValues _rp = WWRobotConstants.RobotProperties class WWCommandHead(WWComma...
true
true
f71ba187051fb0b138a6e1bd429718edeada1fc7
38,002
py
Python
src/azure-cli/azure/cli/command_modules/monitor/grammar/MetricAlertConditionParser.py
psignoret/azure-cli
1a4a043750315f9a7f2894b4287126089978b615
[ "MIT" ]
1
2019-12-12T19:55:26.000Z
2019-12-12T19:55:26.000Z
src/azure-cli/azure/cli/command_modules/monitor/grammar/MetricAlertConditionParser.py
psignoret/azure-cli
1a4a043750315f9a7f2894b4287126089978b615
[ "MIT" ]
2
2021-01-15T09:24:07.000Z
2021-01-15T09:30:10.000Z
src/azure-cli/azure/cli/command_modules/monitor/grammar/MetricAlertConditionParser.py
psignoret/azure-cli
1a4a043750315f9a7f2894b4287126089978b615
[ "MIT" ]
1
2019-11-25T19:33:05.000Z
2019-11-25T19:33:05.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
36.47025
406
0.599416
from __future__ import print_function from antlr4 import * from io import StringIO import sys def serializedATN(): with StringIO() as buf: buf.write(u"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3") buf.write(u"\26~\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7") buf.writ...
true
true
f71ba26bbceace7f7efc27a67352c696968b33c7
1,513
py
Python
scripts/roseaa_nbr.py
AluruLab/alfred
ec1c4c634f0d332fac6acc9c113ca54ea42c3f7b
[ "Apache-2.0" ]
null
null
null
scripts/roseaa_nbr.py
AluruLab/alfred
ec1c4c634f0d332fac6acc9c113ca54ea42c3f7b
[ "Apache-2.0" ]
null
null
null
scripts/roseaa_nbr.py
AluruLab/alfred
ec1c4c634f0d332fac6acc9c113ca54ea42c3f7b
[ "Apache-2.0" ]
null
null
null
import sys import subprocess import os import os.path import glob import tempfile # # run as # python balibase_nbr.py in_dir out_dir nbr_exe_path # how I ran : # python balibase_nbr.py # /Users/srirampc/work/phd/research/arakawa/data/balibase/tree # /Users/srirampc/work/phd/research/arakawa/data/balibase/tree ...
29.666667
70
0.671514
import sys import subprocess import os import os.path import glob import tempfile in_dir = os.path.abspath(sys.argv[1]) out_dir = os.path.abspath(sys.argv[2]) nbr_exe = sys.argv[3] mat_pattern = os.path.join(in_dir, "rose.aa.00*.spaced.out") mat_lst = glob.glob(mat_pattern) tfname = tempfile.mktemp() tfp...
false
true
f71ba2edf1eecc10a8e2f66fde3fb97bc55e8af1
6,386
py
Python
examples/pwr_run/checkpointing/debug/ovhd_profile/job6.py
boringlee24/keras_old
1e1176c45c4952ba1b9b9e58e9cc4df027ab111d
[ "MIT" ]
null
null
null
examples/pwr_run/checkpointing/debug/ovhd_profile/job6.py
boringlee24/keras_old
1e1176c45c4952ba1b9b9e58e9cc4df027ab111d
[ "MIT" ]
null
null
null
examples/pwr_run/checkpointing/debug/ovhd_profile/job6.py
boringlee24/keras_old
1e1176c45c4952ba1b9b9e58e9cc4df027ab111d
[ "MIT" ]
null
null
null
""" #Trains a ResNet on the CIFAR10 dataset. """ from __future__ import print_function import keras from keras.layers import Dense, Conv2D, BatchNormalization, Activation from keras.layers import AveragePooling2D, Input, Flatten from keras.optimizers import Adam from keras.callbacks import ModelCheckpoint, LearningRa...
31
118
0.699812
from __future__ import print_function import keras from keras.layers import Dense, Conv2D, BatchNormalization, Activation from keras.layers import AveragePooling2D, Input, Flatten from keras.optimizers import Adam from keras.callbacks import ModelCheckpoint, LearningRateScheduler from keras.callbacks import ReduceLROn...
true
true
f71ba41051966044cb90f99889d007761687b585
1,003
py
Python
bldr/cmd/init.py
bldr-cmd/bldr-cmd
300750fbccc2987efd23f69b7b2d76d8563e2995
[ "Apache-2.0" ]
null
null
null
bldr/cmd/init.py
bldr-cmd/bldr-cmd
300750fbccc2987efd23f69b7b2d76d8563e2995
[ "Apache-2.0" ]
null
null
null
bldr/cmd/init.py
bldr-cmd/bldr-cmd
300750fbccc2987efd23f69b7b2d76d8563e2995
[ "Apache-2.0" ]
null
null
null
""" `init` Command """ import os import click import bldr import bldr.dep import bldr.gen.render from bldr.environment import Environment from bldr.gen.render import CopyTemplatesRender from bldr.cli import pass_environment, run_cmd dotbldr_path = os.path.join(os.path.abspath(os.path.dirname(bldr.__f...
29.5
88
0.694915
import os import click import bldr import bldr.dep import bldr.gen.render from bldr.environment import Environment from bldr.gen.render import CopyTemplatesRender from bldr.cli import pass_environment, run_cmd dotbldr_path = os.path.join(os.path.abspath(os.path.dirname(bldr.__file__)), "dotbldr") @clic...
true
true
f71ba50a7212de1e86d1518d29a3a1762b8ef020
1,709
py
Python
ooobuild/lo/datatransfer/x_transferable_ex.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/lo/datatransfer/x_transferable_ex.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/lo/datatransfer/x_transferable_ex.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http: // www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
37.152174
143
0.752487
import typing from abc import abstractmethod from ..uno.x_interface import XInterface as XInterface_8f010a43 if typing.TYPE_CHECKING: from .data_flavor import DataFlavor as DataFlavor_ffd30deb class XTransferableEx(XInterface_8f010a43): __ooo_ns__: str = 'com.sun.star.datatransfer' __oo...
true
true
f71ba695de947ffa31af9c54c82d879f96136684
20,681
py
Python
sdk/cdn/azure-mgmt-cdn/tests/test_cli_mgmt_cdn.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/cdn/azure-mgmt-cdn/tests/test_cli_mgmt_cdn.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/cdn/azure-mgmt-cdn/tests/test_cli_mgmt_cdn.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding: utf-8 #------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #----------------------------------------------------------------------...
36.218914
205
0.499782
import os import unittest import azure.mgmt.cdn from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer AZURE_LOCATION = 'eastus' class MgmtCdnTest(AzureMgmtTestCase): def setUp(self): super(MgmtCdnTest, self).setUp() self.mgmt_client = self.create_mgmt_client( ...
true
true
f71ba71e6fe75b165544ce78ca9d1518a8b10f31
142
py
Python
anoi/tests/test_anoitypes.py
jriehl/anoi
1a7b1759824cd4615731e8d053a4bb04d4f3fea3
[ "MIT" ]
null
null
null
anoi/tests/test_anoitypes.py
jriehl/anoi
1a7b1759824cd4615731e8d053a4bb04d4f3fea3
[ "MIT" ]
null
null
null
anoi/tests/test_anoitypes.py
jriehl/anoi
1a7b1759824cd4615731e8d053a4bb04d4f3fea3
[ "MIT" ]
null
null
null
import unittest from .. import anoitypes class TestANOITypes(unittest.TestCase): pass if __name__ == '__main__': unittest.main()
11.833333
39
0.711268
import unittest from .. import anoitypes class TestANOITypes(unittest.TestCase): pass if __name__ == '__main__': unittest.main()
true
true
f71ba7b251e9bf8b98ca35f68d542663d3b132e2
2,286
py
Python
src/main/resources/de/mpg/biochem/mars/fx/dashboard/xychart.py
imagejan/mars-fx
8e493c3c9e02aba20747598827b503c3172f949b
[ "BSD-2-Clause" ]
3
2020-03-10T18:02:09.000Z
2021-09-21T16:52:58.000Z
src/main/resources/de/mpg/biochem/mars/fx/dashboard/xychart.py
imagejan/mars-fx
8e493c3c9e02aba20747598827b503c3172f949b
[ "BSD-2-Clause" ]
51
2020-03-30T11:42:44.000Z
2022-03-16T07:09:16.000Z
src/main/resources/de/mpg/biochem/mars/fx/dashboard/xychart.py
imagejan/mars-fx
8e493c3c9e02aba20747598827b503c3172f949b
[ "BSD-2-Clause" ]
2
2021-04-20T11:51:38.000Z
2021-09-21T16:39:12.000Z
#@OUTPUT String xlabel #@OUTPUT String ylabel #@OUTPUT String title # OUTPUT Double xmin # OUTPUT Double xmax # OUTPUT Double ymin # OUTPUT Double ymax # xmin = -2.0 # xmax = 2.0 # ymin = -2.0 # ymax = 2.0 # Set global outputs xlabel = "X" ylabel = "Y" title = "XY Chart" import math from java.util import Random from...
24.319149
112
0.737533
xlabel = "X" ylabel = "Y" title = "XY Chart" import math from java.util import Random from java.lang import Double r = Random() series1_strokeColor = "rgb(" + str(r.nextInt(255)) + "," + str(r.nextInt(255)) + "," + str(r.nextInt(255)) + ")" series1_fillColor = series1_strokeColor series1_stroke...
true
true
f71ba974fcdaec851af4d51a7fedeed1954c2992
418
py
Python
homework/第 2 课/Aimee/1-Aimee.py
xrandx/-Dating-with-python-this-winter
d242faeda1598d50c3b371deeccfbbe3bbc8fb51
[ "Apache-2.0" ]
3
2021-01-03T10:10:25.000Z
2021-01-11T06:13:40.000Z
homework/第 2 课/Aimee/1-Aimee.py
xrandx/-Dating-with-python-this-winter
d242faeda1598d50c3b371deeccfbbe3bbc8fb51
[ "Apache-2.0" ]
null
null
null
homework/第 2 课/Aimee/1-Aimee.py
xrandx/-Dating-with-python-this-winter
d242faeda1598d50c3b371deeccfbbe3bbc8fb51
[ "Apache-2.0" ]
2
2021-01-08T10:12:17.000Z
2021-01-19T02:03:32.000Z
array=[2,5,8,9,3,6] a=[1,3,6] matrix=[a,[2,5,7]] array.append(1) print(matrix) print(array) new_list=array+matrix print(new_list) new_list.pop(-3) print(new_list) new_list[0]="T" print(new_list) # new_list.clear() # print(new_list) print(new_list.index(5)) table=tuple(["Monday","Tuesday"]) print(table[1]) string="1234...
17.416667
41
0.69378
array=[2,5,8,9,3,6] a=[1,3,6] matrix=[a,[2,5,7]] array.append(1) print(matrix) print(array) new_list=array+matrix print(new_list) new_list.pop(-3) print(new_list) new_list[0]="T" print(new_list) print(new_list.index(5)) table=tuple(["Monday","Tuesday"]) print(table[1]) string="123456789" print(string[1:-3]) f=open("...
true
true
f71ba98a374e556c7c9d0359e89bdb1f986ca8f0
43,300
py
Python
bin/api_connector_splunk/solnlib/packages/simpleyaml/emitter.py
CyberGRX/api-connector-splunk
7f1db1cecb7ae367c1882c3188dc9f8bcb6bc4c6
[ "MIT" ]
106
2018-03-09T13:03:05.000Z
2022-03-10T11:01:48.000Z
bin/api_connector_splunk/solnlib/packages/simpleyaml/emitter.py
CyberGRX/api-connector-splunk
7f1db1cecb7ae367c1882c3188dc9f8bcb6bc4c6
[ "MIT" ]
54
2016-08-11T14:22:30.000Z
2020-08-07T22:14:55.000Z
bin/api_connector_splunk/solnlib/packages/simpleyaml/emitter.py
CyberGRX/api-connector-splunk
7f1db1cecb7ae367c1882c3188dc9f8bcb6bc4c6
[ "MIT" ]
33
2018-04-23T20:18:11.000Z
2022-03-27T16:41:03.000Z
# Emitter expects events obeying the following grammar: # stream ::= STREAM-START document* STREAM-END # document ::= DOCUMENT-START node DOCUMENT-END # node ::= SCALAR | sequence | mapping # sequence ::= SEQUENCE-START node* SEQUENCE-END # mapping ::= MAPPING-START (node node)* MAPPING-END __all__ = ['Emitter', 'Emi...
37.949167
85
0.527737
__all__ = ['Emitter', 'EmitterError'] from .error import YAMLError from .events import * class EmitterError(YAMLError): pass class ScalarAnalysis(object): def __init__(self, scalar, empty, multiline, allow_flow_plain, allow_block_plain, allow_single_quoted, allow_double_quoted...
true
true
f71ba9b43ab52be7a53f49e34a65c47882d5164b
5,808
py
Python
check_bandwidth.py
3t8/check_bandwidth
5b2123d2e09c130ef903a63e28925058b5c35e79
[ "MIT" ]
null
null
null
check_bandwidth.py
3t8/check_bandwidth
5b2123d2e09c130ef903a63e28925058b5c35e79
[ "MIT" ]
null
null
null
check_bandwidth.py
3t8/check_bandwidth
5b2123d2e09c130ef903a63e28925058b5c35e79
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # # The MIT License (MIT) # # Copyright (c) 2016 Puru # # 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 limi...
40.055172
220
0.640668
''' Nagios (NRPE) plugin for checking bandwidth speed limit. ''' from argparse import ArgumentParser from time import sleep from sys import exit from os.path import isdir import re __description__ = 'Nagios (NRPE) plugin for checking bandwidth speed limit.' __author__ = "Puru Tuladhar <tuladh...
false
true
f71baa78a75aac20e49dcb9ac6b3ae5910b61a00
13,930
py
Python
vendor/istio.io/api/python/istio_api/mixer/v1/config/client/api_spec_pb2.py
PinZhang/istio
dce455456d77ca5af34ba5848f9704577349c6bd
[ "Apache-2.0" ]
40
2018-10-24T18:56:01.000Z
2021-12-30T22:05:33.000Z
vendor/istio.io/api/python/istio_api/mixer/v1/config/client/api_spec_pb2.py
PinZhang/istio
dce455456d77ca5af34ba5848f9704577349c6bd
[ "Apache-2.0" ]
17
2019-01-11T05:57:35.000Z
2019-08-29T05:33:38.000Z
vendor/istio.io/api/python/istio_api/mixer/v1/config/client/api_spec_pb2.py
PinZhang/istio
dce455456d77ca5af34ba5848f9704577349c6bd
[ "Apache-2.0" ]
14
2018-11-09T19:17:26.000Z
2021-12-16T16:36:24.000Z
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: mixer/v1/config/client/api_spec.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf imp...
43.26087
1,306
0.760876
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database from google...
true
true
f71baa8f160f4d36be63fb40e4502ee2b84f9a05
4,141
py
Python
pextant/solvers/SEXTANTsolver.py
norheim/pextant
f4235719279c0e6f178ae1e0f8b1ea3346533915
[ "MIT" ]
null
null
null
pextant/solvers/SEXTANTsolver.py
norheim/pextant
f4235719279c0e6f178ae1e0f8b1ea3346533915
[ "MIT" ]
1
2019-12-03T03:52:41.000Z
2019-12-04T14:50:36.000Z
pextant/solvers/SEXTANTsolver.py
norheim/pextant
f4235719279c0e6f178ae1e0f8b1ea3346533915
[ "MIT" ]
1
2019-12-03T02:37:57.000Z
2019-12-03T02:37:57.000Z
from pextant.lib.geoshapely import GeoPolygon, LONG_LAT import numpy as np import csv class SEXTANTSolver(object): def __init__(self, environmental_model, cost_function, viz): self.env_model = environmental_model self.cost_function = cost_function self.viz = viz self.searches = [] ...
34.508333
94
0.576914
from pextant.lib.geoshapely import GeoPolygon, LONG_LAT import numpy as np import csv class SEXTANTSolver(object): def __init__(self, environmental_model, cost_function, viz): self.env_model = environmental_model self.cost_function = cost_function self.viz = viz self.searches = [] ...
true
true
f71baa9da47252c881d3e4b3537037ac3e200836
3,658
py
Python
models/client.py
dssaenzml/federated_learning_nlp
b48fbeb3e78af5971885337203504c017ef1553b
[ "BSD-2-Clause" ]
2
2021-05-17T05:30:50.000Z
2021-05-18T16:20:10.000Z
models/client.py
dssaenzml/federated_learning_nlp
b48fbeb3e78af5971885337203504c017ef1553b
[ "BSD-2-Clause" ]
null
null
null
models/client.py
dssaenzml/federated_learning_nlp
b48fbeb3e78af5971885337203504c017ef1553b
[ "BSD-2-Clause" ]
1
2021-07-10T21:07:01.000Z
2021-07-10T21:07:01.000Z
import random import warnings class Client: def __init__(self, client_id, group=None, train_data={'x' : [],'y' : []}, eval_data={'x' : [],'y' : []}, model=None): self._model = model self.id = client_id self.group = group self.train_data = train_data self.eva...
34.509434
122
0.563423
import random import warnings class Client: def __init__(self, client_id, group=None, train_data={'x' : [],'y' : []}, eval_data={'x' : [],'y' : []}, model=None): self._model = model self.id = client_id self.group = group self.train_data = train_data self.eva...
true
true
f71bab718e68dcdd90ff7a41d77e7394ed89c45b
1,236
py
Python
tests/test_views.py
kingsdigitallab/django-geonames-place
2484abaee6896bafe2f86e93bffca634073a6d3b
[ "MIT" ]
3
2019-06-30T08:13:38.000Z
2020-06-09T22:30:17.000Z
tests/test_views.py
kingsdigitallab/django-geonames-place
2484abaee6896bafe2f86e93bffca634073a6d3b
[ "MIT" ]
null
null
null
tests/test_views.py
kingsdigitallab/django-geonames-place
2484abaee6896bafe2f86e93bffca634073a6d3b
[ "MIT" ]
null
null
null
""" test_django-geonames-place ------------ Tests for `django-geonames-place` views module. """ import unittest from django.conf import settings from django.test import Client, TestCase from django.urls import reverse from geonames_place.models import Place @unittest.skipUnless( settings.GEONAMES_KEY, 'No GEO...
30.146341
70
0.661812
import unittest from django.conf import settings from django.test import Client, TestCase from django.urls import reverse from geonames_place.models import Place @unittest.skipUnless( settings.GEONAMES_KEY, 'No GEONAMES_KEY environment variable set') class TestGeonamesPlaceViews(TestCase): def setUp(self)...
true
true
f71bac9cf6ccf566ff63cc6598f04ef5c0efd656
1,978
py
Python
tests/test_security_api_key_header_optional.py
jfunez/fastapi
7372f6ba11abb515a7f11814dba52a1d1c0925f0
[ "MIT" ]
2
2020-04-09T07:11:28.000Z
2020-12-12T14:04:35.000Z
tests/test_security_api_key_header_optional.py
jfunez/fastapi
7372f6ba11abb515a7f11814dba52a1d1c0925f0
[ "MIT" ]
1
2021-03-27T18:37:32.000Z
2021-05-25T15:08:24.000Z
tests/test_security_api_key_header_optional.py
jfunez/fastapi
7372f6ba11abb515a7f11814dba52a1d1c0925f0
[ "MIT" ]
1
2021-02-03T00:43:04.000Z
2021-02-03T00:43:04.000Z
from typing import Optional from fastapi import Depends, FastAPI, Security from fastapi.security import APIKeyHeader from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() api_key = APIKeyHeader(name="key", auto_error=False) class User(BaseModel): username: str def get_curre...
26.373333
80
0.592518
from typing import Optional from fastapi import Depends, FastAPI, Security from fastapi.security import APIKeyHeader from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() api_key = APIKeyHeader(name="key", auto_error=False) class User(BaseModel): username: str def get_curre...
true
true
f71bacf6ae00989a3846b6e65f0871f7161f845d
5,427
py
Python
docqa/elmo/ablate_elmo_sub_filter.py
Willyoung2017/doc-qa
7ee02218952b0b9db63bc82b3895f743cdbd8f22
[ "Apache-2.0" ]
null
null
null
docqa/elmo/ablate_elmo_sub_filter.py
Willyoung2017/doc-qa
7ee02218952b0b9db63bc82b3895f743cdbd8f22
[ "Apache-2.0" ]
null
null
null
docqa/elmo/ablate_elmo_sub_filter.py
Willyoung2017/doc-qa
7ee02218952b0b9db63bc82b3895f743cdbd8f22
[ "Apache-2.0" ]
null
null
null
import argparse from datetime import datetime from tensorflow.contrib.keras.python.keras.initializers import TruncatedNormal from docqa import trainer from docqa.data_processing.qa_training_data import ContextLenKey from docqa.dataset import ClusteredBatcher from docqa.encoder import DocumentAndQuestionEncoder, Singl...
49.336364
122
0.66206
import argparse from datetime import datetime from tensorflow.contrib.keras.python.keras.initializers import TruncatedNormal from docqa import trainer from docqa.data_processing.qa_training_data import ContextLenKey from docqa.dataset import ClusteredBatcher from docqa.encoder import DocumentAndQuestionEncoder, Singl...
true
true
f71bad585be1228c36c8e571afcf7ee1c2112342
37,542
py
Python
ckan/controllers/group.py
smth/ckan
89d52c1dfc7880f7dd020d87b862870c07005dd2
[ "Apache-2.0" ]
3
2019-07-20T14:05:48.000Z
2019-08-04T18:08:45.000Z
ckan/controllers/group.py
smth/ckan
89d52c1dfc7880f7dd020d87b862870c07005dd2
[ "Apache-2.0" ]
29
2015-10-30T23:39:14.000Z
2018-04-05T06:35:01.000Z
ckan/controllers/group.py
eawag-rdm/eawag-ckan
4016bacb3d311478211428f3c71be2582627f273
[ "Apache-2.0" ]
5
2017-04-06T21:18:38.000Z
2020-03-30T17:05:23.000Z
# encoding: utf-8 import logging import datetime from urllib import urlencode from pylons.i18n import get_lang import ckan.lib.base as base import ckan.lib.helpers as h import ckan.lib.navl.dictization_functions as dict_fns import ckan.logic as logic import ckan.lib.search as search import ckan.model as model import...
39.811241
79
0.561451
import logging import datetime from urllib import urlencode from pylons.i18n import get_lang import ckan.lib.base as base import ckan.lib.helpers as h import ckan.lib.navl.dictization_functions as dict_fns import ckan.logic as logic import ckan.lib.search as search import ckan.model as model import ckan.authz as au...
false
true
f71badae1870e808949da29b629a3e7d4dc4fa3d
4,753
py
Python
i18n/i18n.py
AshleyFires/krux
80de3ee0df5e7147dd32c10967cac7c3e6aecd09
[ "MIT" ]
null
null
null
i18n/i18n.py
AshleyFires/krux
80de3ee0df5e7147dd32c10967cac7c3e6aecd09
[ "MIT" ]
null
null
null
i18n/i18n.py
AshleyFires/krux
80de3ee0df5e7147dd32c10967cac7c3e6aecd09
[ "MIT" ]
null
null
null
# The MIT License (MIT) # Copyright (c) 2021 Tom J. Sun # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, ...
43.605505
98
0.606775
import sys import json from os import listdir, walk from os.path import isfile, join import re import shutil SRC_DIR = '../src' TRANSLATION_FILES_DIR = 'translations' def find_translation_slugs(): slugs = {} for (dirpath, _, filenames) in walk(SRC_DIR): for filename in filenames: ...
true
true
f71badc6bf833dce168ea8abc5e6eedabacd9bc3
1,205
py
Python
pari/article/urls.py
theju/pari
318a4ffba08362e78253ded100a63f5b5c6eadf9
[ "BSD-3-Clause" ]
null
null
null
pari/article/urls.py
theju/pari
318a4ffba08362e78253ded100a63f5b5c6eadf9
[ "BSD-3-Clause" ]
null
null
null
pari/article/urls.py
theju/pari
318a4ffba08362e78253ded100a63f5b5c6eadf9
[ "BSD-3-Clause" ]
null
null
null
from django.conf.urls import patterns, url from .views import (LocationDetail, CategoriesList, CategoryDetail, ArticleDetail, ArticleList, KeywordDetail, AuthorDetail, ArchiveDetail, ArticleCarouselImageDetail) urlpatterns = patterns('pari.article.views', url(r'^categories/(?P<slug>.+)/$', Cat...
66.944444
128
0.674689
from django.conf.urls import patterns, url from .views import (LocationDetail, CategoriesList, CategoryDetail, ArticleDetail, ArticleList, KeywordDetail, AuthorDetail, ArchiveDetail, ArticleCarouselImageDetail) urlpatterns = patterns('pari.article.views', url(r'^categories/(?P<slug>.+)/$', Cat...
true
true
f71bae99af72eaffd84e9a35dfa07be932c56df2
4,017
py
Python
classes/Helpers.py
alexdevmotion/UnifiedEegLogger
735b2734fc9cd5dd9e6b7148b4310a4267624e63
[ "Apache-2.0" ]
1
2018-06-07T03:47:31.000Z
2018-06-07T03:47:31.000Z
classes/Helpers.py
alexdevmotion/unified-eeg-experiment-machine
735b2734fc9cd5dd9e6b7148b4310a4267624e63
[ "Apache-2.0" ]
null
null
null
classes/Helpers.py
alexdevmotion/unified-eeg-experiment-machine
735b2734fc9cd5dd9e6b7148b4310a4267624e63
[ "Apache-2.0" ]
null
null
null
from Tkinter import * from PIL import ImageTk, Image import tkMessageBox import sys import os def getNoImagesInDirectory(dir): return len(getImagesInDirectory(dir)) def getImagesInDirectory(dir): files = os.listdir(dir) images = [] for file in files: if file.lower().endswith((".jpg", ".png",...
30.664122
108
0.61638
from Tkinter import * from PIL import ImageTk, Image import tkMessageBox import sys import os def getNoImagesInDirectory(dir): return len(getImagesInDirectory(dir)) def getImagesInDirectory(dir): files = os.listdir(dir) images = [] for file in files: if file.lower().endswith((".jpg", ".png",...
true
true
f71baee95ce425491965abf613df86bac3425409
3,126
py
Python
acm/uri/1455-icpc-finals.py
neizod/problems
180aaf7d0ecfc3d0dd5f1d4345a7a4d83b1b884a
[ "MIT" ]
1
2015-10-17T11:15:42.000Z
2015-10-17T11:15:42.000Z
acm/uri/1455-icpc-finals.py
neizod/problems
180aaf7d0ecfc3d0dd5f1d4345a7a4d83b1b884a
[ "MIT" ]
null
null
null
acm/uri/1455-icpc-finals.py
neizod/problems
180aaf7d0ecfc3d0dd5f1d4345a7a4d83b1b884a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import random from itertools import count from collections import namedtuple Point = namedtuple('Point', 'x y') Point.from_spec = lambda st: Point(*[float(si) for si in st.split()]) Circle = namedtuple('Circle', 'c r') Circle.__new__.__defaults__ = (Point(0, 0), 0) Circle.__contains__ = lambd...
28.944444
87
0.555662
import random from itertools import count from collections import namedtuple Point = namedtuple('Point', 'x y') Point.from_spec = lambda st: Point(*[float(si) for si in st.split()]) Circle = namedtuple('Circle', 'c r') Circle.__new__.__defaults__ = (Point(0, 0), 0) Circle.__contains__ = lambda s, p: s.r > 0 and sq...
true
true
f71baf805de10ecd0c891aeb9bfc3b748a4b7980
4,340
py
Python
openstack_dashboard/dashboards/project/instances/workflows/resize_instance.py
CplusShen/aurora-horizon
8df16b3b87097d5a19bae3752d4b341ac64bda75
[ "Apache-2.0" ]
1
2020-04-12T19:21:18.000Z
2020-04-12T19:21:18.000Z
openstack_dashboard/dashboards/project/instances/workflows/resize_instance.py
CplusShen/aurora-horizon
8df16b3b87097d5a19bae3752d4b341ac64bda75
[ "Apache-2.0" ]
12
2022-03-22T07:28:29.000Z
2022-03-22T07:29:55.000Z
openstack_dashboard/dashboards/project/instances/workflows/resize_instance.py
CplusShen/aurora-horizon
8df16b3b87097d5a19bae3752d4b341ac64bda75
[ "Apache-2.0" ]
2
2019-01-17T06:06:00.000Z
2019-08-07T02:21:07.000Z
# Copyright 2013 CentRin Data, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
38.75
79
0.65
import json from django.utils.translation import ugettext_lazy as _ from django.views.decorators.debug import sensitive_variables from horizon import exceptions from horizon import forms from horizon import workflows from openstack_dashboard import api from openstack_dashboard.dashboards.project.inst...
true
true
f71baf91c9ac2a1be7c1a45f7c74c72209692386
207
py
Python
tests/test_MBus_connect.py
droid4control/python-mbus
8e26c1847c06e57bc0e878ef3d6610dc9ba913b4
[ "BSD-3-Clause" ]
23
2015-05-19T15:57:40.000Z
2021-03-18T11:33:22.000Z
tests/test_MBus_connect.py
Sensenode/python-mbus
9b598ada5b3da17bb513cf78e5b4a8f2a3f9a1f1
[ "BSD-3-Clause" ]
14
2015-09-20T20:26:22.000Z
2020-05-13T16:39:15.000Z
tests/test_MBus_connect.py
neurobat/python-mbus
8e26c1847c06e57bc0e878ef3d6610dc9ba913b4
[ "BSD-3-Clause" ]
22
2015-07-27T08:50:44.000Z
2022-03-19T01:17:18.000Z
import sys sys.path.append('../python-mbus') import pytest from mbus import MBus @pytest.fixture def mbus_tcp(): return MBus.MBus(host="127.0.0.1") def test_connect(mbus_tcp): mbus_tcp.connect()
14.785714
38
0.714976
import sys sys.path.append('../python-mbus') import pytest from mbus import MBus @pytest.fixture def mbus_tcp(): return MBus.MBus(host="127.0.0.1") def test_connect(mbus_tcp): mbus_tcp.connect()
true
true
f71bafa9a01675524b1c846aa6c881e2336cfcb0
609
py
Python
utils.py
Duy-Vu/stock-network
3e84cfc581cd07001e86c20101c91c2f8910deb2
[ "MIT" ]
null
null
null
utils.py
Duy-Vu/stock-network
3e84cfc581cd07001e86c20101c91c2f8910deb2
[ "MIT" ]
null
null
null
utils.py
Duy-Vu/stock-network
3e84cfc581cd07001e86c20101c91c2f8910deb2
[ "MIT" ]
null
null
null
import numpy as np def clean_data(df, out_df_dir=""): df.dropna(axis=1, inplace=True) if out_df_dir: df.to_csv(out_df_dir) return df # Calculate log change of daily price def log_change(series): return np.log(series[1] / series[0]) # Calculate correaltion def calculate_...
20.3
48
0.62069
import numpy as np def clean_data(df, out_df_dir=""): df.dropna(axis=1, inplace=True) if out_df_dir: df.to_csv(out_df_dir) return df def log_change(series): return np.log(series[1] / series[0]) def calculate_cor(df, start, end): return df[start:end].rolling( ...
true
true
f71bb0f290045da4932989588f794fc5c7a82389
12,982
py
Python
dateparser/data/numeral_translation_data/nb.py
bazingarj/dateparser
48c4563fb7f6ce685fbd6d27e9e83257521d2203
[ "BSD-3-Clause" ]
8
2019-11-15T21:00:15.000Z
2021-12-21T22:09:42.000Z
dateparser/data/numeral_translation_data/nb.py
bazingarj/dateparser
48c4563fb7f6ce685fbd6d27e9e83257521d2203
[ "BSD-3-Clause" ]
9
2020-06-05T21:28:57.000Z
2022-02-12T12:30:39.000Z
dateparser/data/numeral_translation_data/nb.py
bazingarj/dateparser
48c4563fb7f6ce685fbd6d27e9e83257521d2203
[ "BSD-3-Clause" ]
21
2019-03-11T04:25:23.000Z
2022-02-03T08:54:33.000Z
# -*- coding: utf-8 -*- info = { "%%and-small": { "(0, 99)": "og =%%spellout-cardinal-reale=;", "(100, 'inf')": "=%%spellout-cardinal-reale=;" }, "%%and-small-f": { "(0, 99)": "og =%spellout-cardinal-feminine=;", "(100, 'inf')": "=%spellout-cardinal-feminine=;" }, "%%...
41.082278
109
0.470498
info = { "%%and-small": { "(0, 99)": "og =%%spellout-cardinal-reale=;", "(100, 'inf')": "=%%spellout-cardinal-reale=;" }, "%%and-small-f": { "(0, 99)": "og =%spellout-cardinal-feminine=;", "(100, 'inf')": "=%spellout-cardinal-feminine=;" }, "%%and-small-n": { ...
true
true
f71bb2656be1b32d52b27e3457db0d1c0fb78c7c
1,806
py
Python
networks/example_ParticleTransformer.py
jet-universe/particle_transformer
68a7fbcd7d39a64b753251064f120462400895a1
[ "MIT" ]
2
2022-03-30T12:07:17.000Z
2022-03-30T13:22:18.000Z
networks/example_ParticleTransformer.py
jet-universe/particle_transformer
68a7fbcd7d39a64b753251064f120462400895a1
[ "MIT" ]
null
null
null
networks/example_ParticleTransformer.py
jet-universe/particle_transformer
68a7fbcd7d39a64b753251064f120462400895a1
[ "MIT" ]
null
null
null
import os import torch from weaver.utils.logger import _logger from weaver.utils.import_tools import import_module ParticleTransformer = import_module( os.path.join(os.path.dirname(__file__), 'ParticleTransformer.py'), 'ParT').ParticleTransformer class ParticleTransformerWrapper(torch.nn.Module): def __init_...
30.1
127
0.640089
import os import torch from weaver.utils.logger import _logger from weaver.utils.import_tools import import_module ParticleTransformer = import_module( os.path.join(os.path.dirname(__file__), 'ParticleTransformer.py'), 'ParT').ParticleTransformer class ParticleTransformerWrapper(torch.nn.Module): def __init_...
true
true
f71bb3b612e73dc0ead31535809f8a66a642d316
35
py
Python
tests/translators/__init__.py
cancervariants/variant-normalization
e89a9f8366a659c82b2042aeb7effe339851bfb4
[ "MIT" ]
1
2022-01-19T18:17:49.000Z
2022-01-19T18:17:49.000Z
tests/translators/__init__.py
cancervariants/variation-normalization
9c8fbab1562591ae9445d82ddd15df29f1ea1f5a
[ "MIT" ]
99
2021-06-07T12:50:34.000Z
2022-03-23T13:38:29.000Z
tests/translators/__init__.py
cancervariants/variant-normalization
e89a9f8366a659c82b2042aeb7effe339851bfb4
[ "MIT" ]
null
null
null
"""The test translator package."""
17.5
34
0.685714
true
true
f71bb42f23d2dcf4e3a6c7c499095bafb5976cc2
4,781
py
Python
nicos_mlz/kws1/testscripts/counting.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
12
2019-11-06T15:40:36.000Z
2022-01-01T16:23:00.000Z
nicos_mlz/kws1/testscripts/counting.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
91
2020-08-18T09:20:26.000Z
2022-02-01T11:07:14.000Z
nicos_mlz/kws1/testscripts/counting.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
6
2020-01-11T10:52:30.000Z
2022-02-25T12:35:23.000Z
# pylint: skip-file ClearSamples() SetSample(1, 'Alu1', aperture=(1.2, 5.4, 7.0, 7.0), position={u'sam_trans_x': 208.0, u'sam_trans_y': 202.5}, timefactor=1.0, thickness=1.0, detoffset=-315.0, comment=u'') SetSample(2, 'Alu2', aperture=(1.2, 5.4, 7.0, 7.0), position={u'sam_trans_x': 235.0, u'sam_trans_y': 202.5}, ti...
116.609756
173
0.673081
ClearSamples() SetSample(1, 'Alu1', aperture=(1.2, 5.4, 7.0, 7.0), position={u'sam_trans_x': 208.0, u'sam_trans_y': 202.5}, timefactor=1.0, thickness=1.0, detoffset=-315.0, comment=u'') SetSample(2, 'Alu2', aperture=(1.2, 5.4, 7.0, 7.0), position={u'sam_trans_x': 235.0, u'sam_trans_y': 202.5}, timefactor=1.0, thick...
true
true
f71bb4a59b7a4873bb3899fb045f2a55091bf311
13,199
py
Python
sen/tui/ui.py
lachmanfrantisek/sen
a45e87bcdd60de1a246bd62dfdec32f60027bd37
[ "MIT" ]
956
2015-10-22T14:32:14.000Z
2022-03-21T02:27:28.000Z
sen/tui/ui.py
lachmanfrantisek/sen
a45e87bcdd60de1a246bd62dfdec32f60027bd37
[ "MIT" ]
146
2015-09-29T10:04:14.000Z
2022-02-22T08:28:08.000Z
sen/tui/ui.py
lachmanfrantisek/sen
a45e87bcdd60de1a246bd62dfdec32f60027bd37
[ "MIT" ]
77
2015-11-12T22:02:18.000Z
2022-01-24T10:14:46.000Z
""" This is a framework for terminal interfaces built on top of urwid.Frame. It must NOT contain any application specific code. """ import logging import threading from concurrent.futures.thread import ThreadPoolExecutor import urwid from sen.exceptions import NotifyError from sen.tui.commands.base import ( Fron...
35.197333
102
0.615577
import logging import threading from concurrent.futures.thread import ThreadPoolExecutor import urwid from sen.exceptions import NotifyError from sen.tui.commands.base import ( FrontendPriority, BackendPriority, SameThreadPriority, KeyNotMapped ) from sen.tui.constants import CLEAR_NOTIF_BAR_MESSAGE_IN from s...
true
true
f71bb74a3fd635e20003d3cfecbe5cb463ebe09a
3,783
py
Python
airbyte-integrations/connectors/source-marketo-singer/source_marketo_singer/source.py
abalustre/airbyte
e629613588620e8a4c48b155e0f414f41a005bd0
[ "MIT" ]
1
2021-11-04T07:55:40.000Z
2021-11-04T07:55:40.000Z
airbyte-integrations/connectors/source-marketo-singer/source_marketo_singer/source.py
Outoftheblue-ai/airbyte
98b18fd852ec70dafe02fb3ffe45b1ac30345cd0
[ "MIT" ]
1
2021-11-01T10:44:54.000Z
2021-11-01T10:47:42.000Z
airbyte-integrations/connectors/source-marketo-singer/source_marketo_singer/source.py
Outoftheblue-ai/airbyte
98b18fd852ec70dafe02fb3ffe45b1ac30345cd0
[ "MIT" ]
null
null
null
# # Copyright (c) 2021 Airbyte, Inc., all rights reserved. # import json from typing import Dict from airbyte_protocol import AirbyteConnectionStatus, Status, SyncMode from base_python import AirbyteLogger from base_singer import BaseSingerSource, SyncModeInfo class SourceMarketoSinger(BaseSingerSource): tap_c...
39.821053
114
0.651335
import json from typing import Dict from airbyte_protocol import AirbyteConnectionStatus, Status, SyncMode from base_python import AirbyteLogger from base_singer import BaseSingerSource, SyncModeInfo class SourceMarketoSinger(BaseSingerSource): tap_cmd = "tap-marketo" tap_name = "Marketo API" api_er...
true
true
f71bba63aef3cc3729067901106dcb6217bcab5d
24,141
py
Python
benchmarks/pipe.py
jessijzhao/fairscale
d6a8fc6dadc5d5ab4e3ee3f42f8cd570d70d30ec
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
benchmarks/pipe.py
jessijzhao/fairscale
d6a8fc6dadc5d5ab4e3ee3f42f8cd570d70d30ec
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
benchmarks/pipe.py
jessijzhao/fairscale
d6a8fc6dadc5d5ab4e3ee3f42f8cd570d70d30ec
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. import argparse import logging import math import os import time import warnings from benchmark_dataset import BenchmarkLMDataset, collate_sentences_lm import torch from torch.distributed import rpc import torch.multiprocessing as mp import torch...
34.685345
120
0.645499
import argparse import logging import math import os import time import warnings from benchmark_dataset import BenchmarkLMDataset, collate_sentences_lm import torch from torch.distributed import rpc import torch.multiprocessing as mp import torch.nn as nn from torch.nn.parallel import DistributedDataParallel as DDP ...
true
true
f71bba9186b8cf7fd34a3d76235e2705e8296209
28,432
py
Python
ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py
cas-packone/ambari-chs
68033fbd4b810b6642853f2ad9128cbbd4e0cb7b
[ "Apache-2.0" ]
3
2019-06-20T11:49:36.000Z
2020-12-11T10:44:29.000Z
ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py
cas-packone/ambari-chs
68033fbd4b810b6642853f2ad9128cbbd4e0cb7b
[ "Apache-2.0" ]
null
null
null
ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py
cas-packone/ambari-chs
68033fbd4b810b6642853f2ad9128cbbd4e0cb7b
[ "Apache-2.0" ]
1
2019-03-20T08:36:17.000Z
2019-03-20T08:36:17.000Z
#!/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 "License")...
51.414105
420
0.583708
''' 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 "License"); you may not use thi...
false
true
f71bbb4c268959f437ff99244e9ab109af82e1a0
1,774
py
Python
jina/drivers/querylang/slice.py
kaushikb11/jina
2856809cc5acb16b5a3e76e5c14af0c7b2346d09
[ "Apache-2.0" ]
null
null
null
jina/drivers/querylang/slice.py
kaushikb11/jina
2856809cc5acb16b5a3e76e5c14af0c7b2346d09
[ "Apache-2.0" ]
null
null
null
jina/drivers/querylang/slice.py
kaushikb11/jina
2856809cc5acb16b5a3e76e5c14af0c7b2346d09
[ "Apache-2.0" ]
null
null
null
__copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved." __license__ = "Apache-2.0" from typing import Iterable from .. import QuerySetReader, BaseRecursiveDriver if False: from ...proto import jina_pb2 class SliceQL(QuerySetReader, BaseRecursiveDriver): """Restrict the size of the ``docs...
32.254545
93
0.559752
__copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved." __license__ = "Apache-2.0" from typing import Iterable from .. import QuerySetReader, BaseRecursiveDriver if False: from ...proto import jina_pb2 class SliceQL(QuerySetReader, BaseRecursiveDriver): def __init__(self, start: int, en...
true
true
f71bbc336e9b9e428d917d26e1d743874331530d
9,514
py
Python
build/PureCloudPlatformClientV2/models/outbound_route_base_entity_listing.py
cjohnson-ctl/platform-client-sdk-python
38ce53bb8012b66e8a43cc8bd6ff00cf6cc99100
[ "MIT" ]
1
2021-10-08T20:46:45.000Z
2021-10-08T20:46:45.000Z
libs/PureCloudPlatformClientV2/models/outbound_route_base_entity_listing.py
rocketbot-cl/genesysCloud
dd9d9b5ebb90a82bab98c0d88b9585c22c91f333
[ "MIT" ]
null
null
null
libs/PureCloudPlatformClientV2/models/outbound_route_base_entity_listing.py
rocketbot-cl/genesysCloud
dd9d9b5ebb90a82bab98c0d88b9585c22c91f333
[ "MIT" ]
null
null
null
# coding: utf-8 """ Copyright 2016 SmartBear Software 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...
26.065753
85
0.590814
from pprint import pformat from six import iteritems import re import json from ..utils import sanitize_for_serialization class OutboundRouteBaseEntityListing(object): def __init__(self): self.swagger_types = { 'entities': 'list[OutboundRouteBase]', 'page_size': 'int', ...
true
true
f71bbce66ac31c7a95044b6cdf45b22688c6321e
10,895
py
Python
salt/transport/road/raet/behaving.py
thinkbox/salt
35c7c52a89eb98d7a1b6b2c59596d4fe19ab6db3
[ "Apache-2.0" ]
1
2019-06-27T13:03:07.000Z
2019-06-27T13:03:07.000Z
salt/transport/road/raet/behaving.py
thinkbox/salt
35c7c52a89eb98d7a1b6b2c59596d4fe19ab6db3
[ "Apache-2.0" ]
null
null
null
salt/transport/road/raet/behaving.py
thinkbox/salt
35c7c52a89eb98d7a1b6b2c59596d4fe19ab6db3
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' behaving.py raet ioflo behaviors See raeting.py for data format and packet field details. Layout in DataStore raet.udp.stack.stack value StackUdp raet.udp.stack.txmsgs value deque() raet.udp.stack.rxmsgs value deque() raet.udp.stack.local name host port sigkey prikey raet...
29.76776
80
0.536485
from collections import deque try: import simplejson as json except ImportError: import json from ioflo.base.odicting import odict from ioflo.base.globaling import * from ioflo.base import aiding from ioflo.base import storing from ioflo.base import deeding from ioflo.base.consoling import getConsole c...
true
true
f71bbd57b2470bbde34e554ff23f62fc28873ebf
2,314
py
Python
loss_functions/loss_oracle.py
konstmish/opt_methods
ae73d9bd89ae5c463e70328d73cbd190175df98c
[ "MIT" ]
13
2020-07-19T12:02:43.000Z
2022-03-02T14:34:03.000Z
loss_functions/loss_oracle.py
konstmish/opt_methods
ae73d9bd89ae5c463e70328d73cbd190175df98c
[ "MIT" ]
1
2020-12-25T02:05:00.000Z
2021-01-01T11:24:51.000Z
loss_functions/loss_oracle.py
konstmish/opt_methods
ae73d9bd89ae5c463e70328d73cbd190175df98c
[ "MIT" ]
2
2020-07-17T08:45:48.000Z
2021-12-10T03:24:57.000Z
import copy import numpy as np import warnings from .regularizer import Regularizer class Oracle(): """ Base class for all objectives. Can provide objective values, gradients and its Hessians as functions that take parameters as input. Takes as input the values of l1 and l2 regularization. ...
26.295455
92
0.583838
import copy import numpy as np import warnings from .regularizer import Regularizer class Oracle(): def __init__(self, l1=0, l2=0, l2_in_prox=False, regularizer=None, seed=42): if l1 < 0.0: raise ValueError("Invalid value for l1 regularization: {}".format(l1)) if l2 < 0.0: ...
true
true
f71bbe3d8e47628a35517152c6c8c4ac6e8bf38e
1,192
py
Python
setup.py
avictor0826/bigsuds
a4cfd622ab38a3b8fd65cccdcccc117691a7c091
[ "MIT" ]
33
2015-08-23T21:32:34.000Z
2019-07-03T16:14:26.000Z
setup.py
avictor0826/bigsuds
a4cfd622ab38a3b8fd65cccdcccc117691a7c091
[ "MIT" ]
9
2015-09-28T18:22:16.000Z
2022-03-26T00:22:51.000Z
setup.py
avictor0826/bigsuds
a4cfd622ab38a3b8fd65cccdcccc117691a7c091
[ "MIT" ]
22
2015-09-25T22:47:28.000Z
2022-03-28T12:54:59.000Z
from setuptools import setup import re def extract_version(filename): contents = open(filename).read() match = re.search('^__version__\s+=\s+[\'"](.*)[\'"]\s*$', contents, re.MULTILINE) if match is not None: return match.group(1) setup( name="bigsuds", version=extract_version('bigsuds.py'...
33.111111
86
0.618289
from setuptools import setup import re def extract_version(filename): contents = open(filename).read() match = re.search('^__version__\s+=\s+[\'"](.*)[\'"]\s*$', contents, re.MULTILINE) if match is not None: return match.group(1) setup( name="bigsuds", version=extract_version('bigsuds.py'...
true
true