hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f75133c151c0513cc0c1bbb08864d1f124a4994b
9,886
py
Python
appendix/discrete_time_identification (Burgers)/Burgers_systematic.py
TianjieZhang1993/PINNs
9034ba7f4fef81c24954fa3cbf08a2d4a7fee85a
[ "MIT" ]
1,373
2018-01-24T01:47:11.000Z
2022-03-31T18:01:02.000Z
appendix/discrete_time_identification (Burgers)/Burgers_systematic.py
TianjieZhang1993/PINNs
9034ba7f4fef81c24954fa3cbf08a2d4a7fee85a
[ "MIT" ]
38
2019-04-24T14:22:17.000Z
2022-03-05T11:05:53.000Z
appendix/discrete_time_identification (Burgers)/Burgers_systematic.py
TianjieZhang1993/PINNs
9034ba7f4fef81c24954fa3cbf08a2d4a7fee85a
[ "MIT" ]
697
2018-03-05T17:23:44.000Z
2022-03-31T18:30:30.000Z
""" @author: Maziar Raissi """ import sys sys.path.insert(0, '../../Utilities/') import tensorflow as tf import numpy as np import time import scipy.io np.random.seed(1234) tf.set_random_seed(1234) class PhysicsInformedNN: # Initialize the class def __init__(self, x0, u0, x1, u1, layers, dt, lb, ub, q): ...
39.230159
132
0.539551
import sys sys.path.insert(0, '../../Utilities/') import tensorflow as tf import numpy as np import time import scipy.io np.random.seed(1234) tf.set_random_seed(1234) class PhysicsInformedNN: def __init__(self, x0, u0, x1, u1, layers, dt, lb, ub, q): self.lb = lb self.ub = ub ...
true
true
f75133e05e0ef311f37ea1ed0298632b9e5b461c
3,551
py
Python
gunbot_python/system.py
dgnsrekt/gunbot.py
5a3c01a329cc67c93b65a5bd2962b3df618f8cb5
[ "MIT" ]
1
2020-01-27T19:37:45.000Z
2020-01-27T19:37:45.000Z
gunbot_python/system.py
johnjdailey/gunbot.py
5a3c01a329cc67c93b65a5bd2962b3df618f8cb5
[ "MIT" ]
null
null
null
gunbot_python/system.py
johnjdailey/gunbot.py
5a3c01a329cc67c93b65a5bd2962b3df618f8cb5
[ "MIT" ]
2
2018-12-06T05:50:12.000Z
2020-01-25T22:53:33.000Z
# SYSTEM from pathlib import Path import shutil # THIRD-PARTY import luigi import structlog import toml import wget from zipfile import ZipFile # LOCAL from paths import ( GUNBOT_DOWNLOAD_PATH, GUNBOT_DOWNLOAD_URL, GUNBOT_PATH, TEMP_GUNBOT_EXTRACTION_PATH, ) from log import config_logger logger = str...
34.813725
98
0.649676
from pathlib import Path import shutil import luigi import structlog import toml import wget from zipfile import ZipFile from paths import ( GUNBOT_DOWNLOAD_PATH, GUNBOT_DOWNLOAD_URL, GUNBOT_PATH, TEMP_GUNBOT_EXTRACTION_PATH, ) from log import config_logger logger = structlog.get_logger(__file__) ...
true
true
f75133f5846e31c55dcba9fb29b9cf0c7bd744b7
9,309
py
Python
conf.py
kampusubl/laboratorium-n250
709b4f595e1f32c8ea4340b7026d9376ba096932
[ "Apache-2.0" ]
2
2016-08-29T10:28:46.000Z
2016-08-29T17:07:30.000Z
conf.py
kampusubl/laboratorium-n250
709b4f595e1f32c8ea4340b7026d9376ba096932
[ "Apache-2.0" ]
null
null
null
conf.py
kampusubl/laboratorium-n250
709b4f595e1f32c8ea4340b7026d9376ba096932
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Yoopa documentation build configuration file, created by # sphinx-quickstart on Mon Jul 4 22:43:48 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # auto...
32.548951
79
0.718982
import sys import os import shlex extensions = [] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = 'Laboratorium N250' copyright = '2016, PSTI Universitas Bandar Lampung' author = 'PSTI Universitas Bandar Lampung' # |version| and |release|...
true
true
f75134cb976181aed7c8e137b0223c4b376f0a20
6,651
py
Python
bindings/python/ensmallen_graph/datasets/string/verticilliumdahliae.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/verticilliumdahliae.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/verticilliumdahliae.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
""" This file offers the methods to automatically retrieve the graph Verticillium dahliae. The graph is automatically retrieved from the STRING repository. Report --------------------- At the time of rendering these methods (please see datetime below), the graph had the following characteristics: Datetime: 2021-0...
35.190476
223
0.70215
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen_graph import EnsmallenGraph def VerticilliumDahliae( directed: bool = False, verbose: int = 2, cache_path: str = "graphs/string", **additional_graph_kwargs: Dict ) -> EnsmallenGraph: re...
true
true
f751353c0b0c5923e7aacece5817a028bf5b773b
379
py
Python
run_script.py
DiscombobulatedDrag/covid19-japan-web-api
a4a25998ad0c94a0ee3fc0fbae166132780e0dcd
[ "MIT" ]
1
2020-08-09T12:01:04.000Z
2020-08-09T12:01:04.000Z
run_script.py
akfurdk/covid19-japan-web-api
c55110df490376e3dfa03188c87e8dd3acf90291
[ "MIT" ]
null
null
null
run_script.py
akfurdk/covid19-japan-web-api
c55110df490376e3dfa03188c87e8dd3acf90291
[ "MIT" ]
null
null
null
from src.script import create_positive_detail from src.script import create_prefectures from src.script import create_total from src.script import create_statistics_positives if __name__ == '__main__': create_positive_detail.create_json_file() create_prefectures.create_json_file() create_total.create_json...
31.583333
50
0.833773
from src.script import create_positive_detail from src.script import create_prefectures from src.script import create_total from src.script import create_statistics_positives if __name__ == '__main__': create_positive_detail.create_json_file() create_prefectures.create_json_file() create_total.create_json...
true
true
f751360fea22cbe961784a41e49b1a154ce00bd6
176
py
Python
python2_template.py
Lgeu/snippet
02a027c6f06d21bcffb7d7585b7a4244ed20143a
[ "CC0-1.0" ]
12
2020-03-01T07:37:08.000Z
2021-06-14T02:52:45.000Z
python2_template.py
Lgeu/snippet
02a027c6f06d21bcffb7d7585b7a4244ed20143a
[ "CC0-1.0" ]
null
null
null
python2_template.py
Lgeu/snippet
02a027c6f06d21bcffb7d7585b7a4244ed20143a
[ "CC0-1.0" ]
2
2020-06-15T09:51:57.000Z
2020-06-28T05:43:32.000Z
from __future__ import division import sys PYTHON3 = sys.version_info.major == 3 if not PYTHON3: from itertools import izip as zip range = xrange input = raw_input
22
37
0.738636
from __future__ import division import sys PYTHON3 = sys.version_info.major == 3 if not PYTHON3: from itertools import izip as zip range = xrange input = raw_input
true
true
f7513652867535a7b6fb80a377a47847e2305284
8,849
py
Python
compiler_gym/envs/llvm/service/passes/extract_passes_from_llvm_source_tree.py
sahirgomez1/CompilerGym
9987fbdfcf8ac9af076baf0ffd695e48f0e804cf
[ "MIT" ]
562
2020-12-21T14:10:20.000Z
2022-03-31T21:23:55.000Z
compiler_gym/envs/llvm/service/passes/extract_passes_from_llvm_source_tree.py
sahirgomez1/CompilerGym
9987fbdfcf8ac9af076baf0ffd695e48f0e804cf
[ "MIT" ]
433
2020-12-22T03:40:41.000Z
2022-03-31T18:16:17.000Z
compiler_gym/envs/llvm/service/passes/extract_passes_from_llvm_source_tree.py
sahirgomez1/CompilerGym
9987fbdfcf8ac9af076baf0ffd695e48f0e804cf
[ "MIT" ]
88
2020-12-22T08:22:00.000Z
2022-03-20T19:00:40.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """Extract a list of passes form the LLVM source tree. Usage: $ extract_passes_from_llvm_source_tree /path/to/llvm/source/root Optionall...
33.142322
138
0.592383
import codecs import csv import logging import os import re import subprocess import sys from pathlib import Path from typing import Dict, Iterable, List, Optional, Tuple from compiler_gym.envs.llvm.service.passes.common import Pass from compiler_gym.envs.llvm.service.passes.config import CREATE_PASS_NAME_MAP log...
true
true
f751368ef874b769127854a09d1a8663a715c4c1
19,967
py
Python
tensorboardX/summary.py
justusschock/tensorboardX
1c16e127f9a737c0b45d0447c20499dec666130c
[ "MIT" ]
null
null
null
tensorboardX/summary.py
justusschock/tensorboardX
1c16e127f9a737c0b45d0447c20499dec666130c
[ "MIT" ]
null
null
null
tensorboardX/summary.py
justusschock/tensorboardX
1c16e127f9a737c0b45d0447c20499dec666130c
[ "MIT" ]
1
2019-04-08T08:41:49.000Z
2019-04-08T08:41:49.000Z
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
40.419028
119
0.645565
from __future__ import absolute_import from __future__ import division from __future__ import print_function import bisect import logging import numpy as np import os import re as _re from six import StringIO from six.moves import range from .proto.summary_pb2 import Summary from .proto.summary_pb2 i...
true
true
f75137270f2f40c4d203ac58094f4ba5163aed9a
1,191
py
Python
techminer2/collaboration_network_communities.py
jdvelasq/techminer2
ad64a49402749755798a18417c38a7ad10e83bad
[ "MIT" ]
null
null
null
techminer2/collaboration_network_communities.py
jdvelasq/techminer2
ad64a49402749755798a18417c38a7ad10e83bad
[ "MIT" ]
null
null
null
techminer2/collaboration_network_communities.py
jdvelasq/techminer2
ad64a49402749755798a18417c38a7ad10e83bad
[ "MIT" ]
null
null
null
""" Collaboration Network / Communities =============================================================================== >>> from techminer2 import * >>> directory = "data/" >>> collaboration_network_communities('authors', min_occ=2, directory=directory).head() cluster CL_00 ... CL_19 rn ...
30.538462
87
0.559194
from .co_occurrence_network_communities import co_occurrence_network_communities def collaboration_network_communities( column, min_occ=2, normalization="association", clustering_method="louvain", directory="./", ): if column not in ["authors", "institutions", "countries"]: raise Valu...
true
true
f75137542d5b7bee539ba4874326cc329e4b4334
824
py
Python
tests/test_create_table.py
alpreu/dynamodb-geo.py
1910368b020cddfe8275f94d7962cc48ca0ec9bd
[ "MIT" ]
25
2020-04-13T20:04:19.000Z
2022-03-18T12:34:06.000Z
tests/test_create_table.py
alpreu/dynamodb-geo.py
1910368b020cddfe8275f94d7962cc48ca0ec9bd
[ "MIT" ]
11
2020-04-18T10:45:39.000Z
2021-09-09T10:06:14.000Z
tests/test_create_table.py
alpreu/dynamodb-geo.py
1910368b020cddfe8275f94d7962cc48ca0ec9bd
[ "MIT" ]
14
2020-05-25T21:04:48.000Z
2021-11-08T17:37:42.000Z
import dynamodbgeo from vars import dynamodb import uuid def test_create_table(): try: table_name = str(uuid.uuid4()) config = dynamodbgeo.GeoDataManagerConfiguration( dynamodb, table_name) geoDataManager = dynamodbgeo.GeoDataManager(config) table_util = dynamodbgeo.Geo...
31.692308
76
0.669903
import dynamodbgeo from vars import dynamodb import uuid def test_create_table(): try: table_name = str(uuid.uuid4()) config = dynamodbgeo.GeoDataManagerConfiguration( dynamodb, table_name) geoDataManager = dynamodbgeo.GeoDataManager(config) table_util = dynamodbgeo.Geo...
true
true
f75137a1687a2d952b43328ed94705d40f02b126
20,601
py
Python
django/db/transaction.py
huicheese/Django-test
eb866b3c4c61eb990e68f4b6a02cb1b7d948adbd
[ "BSD-3-Clause" ]
118
2015-01-03T15:42:32.000Z
2022-02-01T02:58:38.000Z
django/db/transaction.py
huicheese/Django-test
eb866b3c4c61eb990e68f4b6a02cb1b7d948adbd
[ "BSD-3-Clause" ]
18
2015-01-14T07:51:48.000Z
2021-10-14T01:19:26.000Z
django/db/transaction.py
huicheese/Django-test
eb866b3c4c61eb990e68f4b6a02cb1b7d948adbd
[ "BSD-3-Clause" ]
70
2015-01-01T00:33:24.000Z
2021-12-10T03:43:07.000Z
""" This module implements a transaction manager that can be used to define transaction handling in a request or view function. It is used by transaction control middleware and decorators. The transaction manager can be in managed or in auto state. Auto state means the system is using a commit-on-save strategy (actual...
38.009225
80
0.638561
import warnings from functools import wraps from django.db import ( connections, DEFAULT_DB_ALIAS, DatabaseError, Error, ProgrammingError) from django.utils.decorators import available_attrs class TransactionManagementError(ProgrammingError): pass ne): warnings.warn("'commit_unless_managed...
true
true
f75138469a5021c5ac8bc51b9ca35653c708e66d
1,378
py
Python
crmapp/accounts/migrations/0001_initial.py
KristanArmstrong/CRM_Django_Project
cf446e04688b1b480fbd21a91703e524444b6753
[ "MIT" ]
1
2016-11-19T07:19:30.000Z
2016-11-19T07:19:30.000Z
crmapp/accounts/migrations/0001_initial.py
KristanArmstrong/CRM_Django_Project
cf446e04688b1b480fbd21a91703e524444b6753
[ "MIT" ]
null
null
null
crmapp/accounts/migrations/0001_initial.py
KristanArmstrong/CRM_Django_Project
cf446e04688b1b480fbd21a91703e524444b6753
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import shortuuidfield.fields from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations ...
37.243243
119
0.591437
from __future__ import unicode_literals from django.db import models, migrations import shortuuidfield.fields from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations....
true
true
f75138efebaa641115f7d19fc17de6053f336761
83
py
Python
utils.py
bmanikan/SlowFast
97cb5d55cb211c362d585857aebacbdb372496ad
[ "MIT" ]
null
null
null
utils.py
bmanikan/SlowFast
97cb5d55cb211c362d585857aebacbdb372496ad
[ "MIT" ]
null
null
null
utils.py
bmanikan/SlowFast
97cb5d55cb211c362d585857aebacbdb372496ad
[ "MIT" ]
null
null
null
import os def safedirs(path): if not os.path.exists(path): os.makedirs(path)
16.6
30
0.698795
import os def safedirs(path): if not os.path.exists(path): os.makedirs(path)
true
true
f751390b8b17889b81e62cb54932ab09baf2b135
3,978
py
Python
robotender_kinova_flexbe_states/src/robotender_kinova_flexbe_states/finger_position_state.py
dcat52/ROS-robotender-flexbe-sm
e9eb218788403f467557e1c1e97750e910f0bf64
[ "BSD-3-Clause" ]
null
null
null
robotender_kinova_flexbe_states/src/robotender_kinova_flexbe_states/finger_position_state.py
dcat52/ROS-robotender-flexbe-sm
e9eb218788403f467557e1c1e97750e910f0bf64
[ "BSD-3-Clause" ]
null
null
null
robotender_kinova_flexbe_states/src/robotender_kinova_flexbe_states/finger_position_state.py
dcat52/ROS-robotender-flexbe-sm
e9eb218788403f467557e1c1e97750e910f0bf64
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import rospy import actionlib from flexbe_core import EventState, Logger from flexbe_core.proxy import ProxyActionClient from flexbe_core.proxy import ProxySubscriberCached from moveit_msgs.msg import MoveGroupAction, MoveGroupGoal, Constraints, JointConstraint, MoveItErrorCodes from kinova...
36.495413
130
0.53645
import rospy import actionlib from flexbe_core import EventState, Logger from flexbe_core.proxy import ProxyActionClient from flexbe_core.proxy import ProxySubscriberCached from moveit_msgs.msg import MoveGroupAction, MoveGroupGoal, Constraints, JointConstraint, MoveItErrorCodes from kinova_msgs.msg import SetF...
true
true
f7513a01a5525215392c9c1f77ed8ff5b6fa5c46
2,800
py
Python
dateparser/data/date_translation_data/smn.py
Rodp63/dateparser
938a9573234679b603210bd47cc93eb258b1f1df
[ "BSD-3-Clause" ]
null
null
null
dateparser/data/date_translation_data/smn.py
Rodp63/dateparser
938a9573234679b603210bd47cc93eb258b1f1df
[ "BSD-3-Clause" ]
null
null
null
dateparser/data/date_translation_data/smn.py
Rodp63/dateparser
938a9573234679b603210bd47cc93eb258b1f1df
[ "BSD-3-Clause" ]
null
null
null
info = { "name": "smn", "date_order": "DMY", "january": [ "uđiv", "uđđâivemáánu" ], "february": [ "kuovâ", "kuovâmáánu" ], "march": [ "njuhčâ", "njuhčâmáánu" ], "april": [ "cuáŋui", "cuáŋuimáánu" ], "may": [ ...
15.819209
26
0.297143
info = { "name": "smn", "date_order": "DMY", "january": [ "uđiv", "uđđâivemáánu" ], "february": [ "kuovâ", "kuovâmáánu" ], "march": [ "njuhčâ", "njuhčâmáánu" ], "april": [ "cuáŋui", "cuáŋuimáánu" ], "may": [ ...
true
true
f7513aaa5c031812b18feaf6dc94d86cf81788f9
700
py
Python
todoist_colors/__init__.py
kquinsland/todoist-colors
dacc24503fd85c8a6a392edc3e13827ddde6c499
[ "MIT" ]
null
null
null
todoist_colors/__init__.py
kquinsland/todoist-colors
dacc24503fd85c8a6a392edc3e13827ddde6c499
[ "MIT" ]
null
null
null
todoist_colors/__init__.py
kquinsland/todoist-colors
dacc24503fd85c8a6a392edc3e13827ddde6c499
[ "MIT" ]
null
null
null
HIBISCUS = 30 RED = 31 ORANGE = 32 YELLOW = 33 EARLS_GREEN = 34 LIGHT_GREEN = 35 GREEN = 36 DOWNY = 37 EASTERN_BLUE = 38 DODGER_BLUE = 39 CORNFLOWER = 40 BLUE = 41 VIOLET = 42 PURPLE = 43 LIGHT_ROSE = 44 ROSE = 45 MONA_LISA = 46 GRAY = 47 LIGHT_GRAY = 48 SORREL_BROWN = 49 # Expressed as a map colors = { 'HIBISCUS'...
15.555556
23
0.581429
HIBISCUS = 30 RED = 31 ORANGE = 32 YELLOW = 33 EARLS_GREEN = 34 LIGHT_GREEN = 35 GREEN = 36 DOWNY = 37 EASTERN_BLUE = 38 DODGER_BLUE = 39 CORNFLOWER = 40 BLUE = 41 VIOLET = 42 PURPLE = 43 LIGHT_ROSE = 44 ROSE = 45 MONA_LISA = 46 GRAY = 47 LIGHT_GRAY = 48 SORREL_BROWN = 49 colors = { 'HIBISCUS': 30, 'RED': 31,...
true
true
f7513b38a53d8118d1cf9129192d3eb8f2de5c28
20,215
py
Python
cirq/linalg/transformations.py
kunalq/Cirq
e73c9bef672e83143ab04e7f169988149055d630
[ "Apache-2.0" ]
null
null
null
cirq/linalg/transformations.py
kunalq/Cirq
e73c9bef672e83143ab04e7f169988149055d630
[ "Apache-2.0" ]
null
null
null
cirq/linalg/transformations.py
kunalq/Cirq
e73c9bef672e83143ab04e7f169988149055d630
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
43.010638
80
0.634776
from typing import Tuple, Optional, Sequence, List, Union, TypeVar import numpy as np from cirq.protocols.approximate_equality import approx_eq from cirq.linalg import predicates # user provides a different np.array([]) value. RaiseValueErrorIfNotProvided = np.array([]) # type: np.ndarray TDefau...
true
true
f7513b61c9caba7bdb7307088c83e15113899a19
416
py
Python
eval/util.py
jeffdshen/squad
61ed2120fc06f5e33204200ac0f8d86d1da6f361
[ "MIT" ]
null
null
null
eval/util.py
jeffdshen/squad
61ed2120fc06f5e33204200ac0f8d86d1da6f361
[ "MIT" ]
null
null
null
eval/util.py
jeffdshen/squad
61ed2120fc06f5e33204200ac0f8d86d1da6f361
[ "MIT" ]
null
null
null
"""Write submission to file in csv format Author: Chris Chute (chute@stanford.edu) """ import csv def write_submission(sub_path, sub_dict): with open(sub_path, "w", newline="", encoding="utf-8") as csv_fh: csv_writer = csv.writer(csv_fh, delimiter=",") csv_writer.writerow(["Id", "Predicted"]...
26
69
0.653846
import csv def write_submission(sub_path, sub_dict): with open(sub_path, "w", newline="", encoding="utf-8") as csv_fh: csv_writer = csv.writer(csv_fh, delimiter=",") csv_writer.writerow(["Id", "Predicted"]) for uuid in sorted(sub_dict): csv_writer.writerow([uuid, sub_dict[uuid...
true
true
f7513bf4aed116eaf9f67b4ca9f798d998c7dddd
98
py
Python
pytest/02_testdiscovery/test_invalid_test_name.py
dramasamy/training
af7b9352b56c10aaa957062f24f1302a7a4c5797
[ "Apache-2.0" ]
1
2022-03-22T22:31:32.000Z
2022-03-22T22:31:32.000Z
pytest/02_testdiscovery/test_invalid_test_name.py
dramasamy/training
af7b9352b56c10aaa957062f24f1302a7a4c5797
[ "Apache-2.0" ]
null
null
null
pytest/02_testdiscovery/test_invalid_test_name.py
dramasamy/training
af7b9352b56c10aaa957062f24f1302a7a4c5797
[ "Apache-2.0" ]
null
null
null
def int(): assert type(1) == type(int()) def int_test(): assert type(1) == type(int())
16.333333
35
0.540816
def int(): assert type(1) == type(int()) def int_test(): assert type(1) == type(int())
true
true
f7513bf9b94dda89f1ffa3fe13ad4b7d3c666159
3,474
py
Python
iqrm/core.py
v-morello/iqrm
9f90e43c003af5d248d08b65d52fc88a73e12bbd
[ "MIT" ]
8
2021-07-15T08:52:10.000Z
2021-12-20T09:56:46.000Z
iqrm/core.py
v-morello/iqrm
9f90e43c003af5d248d08b65d52fc88a73e12bbd
[ "MIT" ]
null
null
null
iqrm/core.py
v-morello/iqrm
9f90e43c003af5d248d08b65d52fc88a73e12bbd
[ "MIT" ]
1
2021-08-04T06:22:34.000Z
2021-08-04T06:22:34.000Z
import itertools import numpy as np from collections import defaultdict def lagged_diff(x, k): """ Returns the sequence of x[i] - x[i - k], as an array with the same size as x. Boundary conditions are handled as follows: x[i] = x[0] if i < 0 x[i] = x[n-1] if i >= n, where n = len(x) ...
32.166667
98
0.613126
import itertools import numpy as np from collections import defaultdict def lagged_diff(x, k): s = np.roll(x, k) if k >= 0: s[:k] = x[0] else: s[k:] = x[-1] return x - s def outlier_mask(x, threshold=3.0): q1, med, q3 = np.percentile(x, [25, 50, 75]) std = (q3 - q1) / 1.349...
true
true
f7513c540ab6a081b3334c7cf48d902bd3371df4
1,037
py
Python
ahoy/model/view.py
geekflow/ahoy
4cbcceed2d20cc162fbf54527a2cdbe9681cba17
[ "MIT" ]
1
2018-03-02T06:01:28.000Z
2018-03-02T06:01:28.000Z
ahoy/model/view.py
geekflow/ahoy
4cbcceed2d20cc162fbf54527a2cdbe9681cba17
[ "MIT" ]
null
null
null
ahoy/model/view.py
geekflow/ahoy
4cbcceed2d20cc162fbf54527a2cdbe9681cba17
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ View ~~~~~~~~~ :copyright: (c) 2018 by geeksaga. :license: MIT LICENSE 2.0, see license for more details. """ from sqlalchemy import Column, Integer, String from . import Base class View(Base): __tablename__ = 'gs_view' id = Column(Integer, primary_key=True) ...
27.289474
108
0.611379
from sqlalchemy import Column, Integer, String from . import Base class View(Base): __tablename__ = 'gs_view' id = Column(Integer, primary_key=True) name = Column(String(100), unique=True) parent_id = Column(Integer, nullable=False) depth = Column(Integer, nullable=False) sequence = Column(...
true
true
f7513ce7ec5ff075bc78a63ce89e5a2f1c86f27c
1,744
py
Python
test/test_examples.py
SenneRosaer/habitat-lab
1f8fc3c8aaf2c4866fb1e063516f7730898e1cce
[ "MIT" ]
null
null
null
test/test_examples.py
SenneRosaer/habitat-lab
1f8fc3c8aaf2c4866fb1e063516f7730898e1cce
[ "MIT" ]
null
null
null
test/test_examples.py
SenneRosaer/habitat-lab
1f8fc3c8aaf2c4866fb1e063516f7730898e1cce
[ "MIT" ]
null
null
null
import itertools import multiprocessing import runpy import sys from os import path as osp import pytest def run_main(*args): # patch sys.args sys.argv = list(args) target = args[0] # run_path has one difference with invoking Python from command-line: # if the target is a file (rather than a dire...
27.68254
82
0.673165
import itertools import multiprocessing import runpy import sys from os import path as osp import pytest def run_main(*args): sys.argv = list(args) target = args[0] if osp.isfile(target): sys.path.insert(0, osp.dirname(target)) runpy.run_path(target, run_name="__main_...
true
true
f7513d3eb7083aff2e38a50fda0b52c2fcb93b4f
2,211
py
Python
tests_async/system/requests/conftest.py
renovate-bot/google-resumable-media-python
1f01b88d0ce05ca561359de1ad89b47c6c60c9b7
[ "Apache-2.0" ]
null
null
null
tests_async/system/requests/conftest.py
renovate-bot/google-resumable-media-python
1f01b88d0ce05ca561359de1ad89b47c6c60c9b7
[ "Apache-2.0" ]
null
null
null
tests_async/system/requests/conftest.py
renovate-bot/google-resumable-media-python
1f01b88d0ce05ca561359de1ad89b47c6c60c9b7
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
35.66129
83
0.735414
from tests.system import utils from google.auth._default_async import default_async import google.auth.transport._aiohttp_requests as tr_requests import pytest async def ensure_bucket(transport): get_response = await transport.request("GET", utils.BUCKET_URL) if get_response.status == 404: ...
true
true
f7513da26dac76236d0eb9a19aa70324a661ec5c
893
py
Python
config/default.py
unifispot/unifispot-free
186c906aa79e8671e03d0808469a3f27d67e34e1
[ "MIT" ]
21
2015-11-10T11:40:39.000Z
2021-12-02T22:58:45.000Z
config/default.py
unifispot/unifispot-free
186c906aa79e8671e03d0808469a3f27d67e34e1
[ "MIT" ]
null
null
null
config/default.py
unifispot/unifispot-free
186c906aa79e8671e03d0808469a3f27d67e34e1
[ "MIT" ]
10
2016-02-03T14:45:41.000Z
2019-11-08T08:21:25.000Z
import os from passlib.hash import sha256_crypt #WTF CSRF_ENABLED = True #configure blue prints BLUEPRINTS = ('guest','admin') #Configure DB basedir = os.path.join(os.path.abspath(os.path.dirname(__file__)),'..','bluespot') SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'db_repository') SECRET_KEY = 'once-a-ca...
19
109
0.74692
import os from passlib.hash import sha256_crypt CSRF_ENABLED = True BLUEPRINTS = ('guest','admin') basedir = os.path.join(os.path.abspath(os.path.dirname(__file__)),'..','bluespot') SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'db_repository') SECRET_KEY = 'once-a-cat-went-to-talk' SQLALCHEMY_DATABASE_UR...
true
true
f7513dc6424a566d349c8ee0405b1f659c900688
4,365
py
Python
examples/records_datasource.py
TheFenrisLycaon/mllaunchpad
9de65d1bee29c64f4c3dee536d036c4cfeb3f079
[ "Apache-2.0" ]
15
2019-07-20T17:23:29.000Z
2021-06-03T11:16:54.000Z
examples/records_datasource.py
TheFenrisLycaon/mllaunchpad
9de65d1bee29c64f4c3dee536d036c4cfeb3f079
[ "Apache-2.0" ]
97
2019-07-19T11:22:16.000Z
2022-03-22T14:17:25.000Z
examples/records_datasource.py
TheFenrisLycaon/mllaunchpad
9de65d1bee29c64f4c3dee536d036c4cfeb3f079
[ "Apache-2.0" ]
7
2019-07-25T09:26:25.000Z
2022-03-22T09:32:41.000Z
import logging from typing import Dict, Optional from mllaunchpad.resource import DataSource, get_user_pw logger = logging.getLogger(__name__) try: import records except ModuleNotFoundError: logger.warning("Please install the Records package to be able to use RecordsDbDataSource.") class RecordsDbDataSour...
33.837209
121
0.614891
import logging from typing import Dict, Optional from mllaunchpad.resource import DataSource, get_user_pw logger = logging.getLogger(__name__) try: import records except ModuleNotFoundError: logger.warning("Please install the Records package to be able to use RecordsDbDataSource.") class RecordsDbDataSour...
true
true
f7513dd1c1c2059e900bae5426683ca3b2dd6478
4,387
py
Python
tools/filters/uniq.py
ramezrawas/galaxy-1
c03748dd49c060a68d07bce56eae33e0ba154414
[ "CC-BY-3.0" ]
null
null
null
tools/filters/uniq.py
ramezrawas/galaxy-1
c03748dd49c060a68d07bce56eae33e0ba154414
[ "CC-BY-3.0" ]
7
2016-12-07T22:19:37.000Z
2019-01-30T15:04:26.000Z
tools/filters/uniq.py
ramezrawas/galaxy-1
c03748dd49c060a68d07bce56eae33e0ba154414
[ "CC-BY-3.0" ]
null
null
null
# Filename: uniq.py # Author: Ian N. Schenck # Version: 19/12/2005 # # This script accepts an input file, an output file, a column # delimiter, and a list of columns. The script then grabs unique # lines based on the columns, and returns those records with a count # of occurences of each unique column (ignoring traili...
31.113475
79
0.54935
from __future__ import print_function import re import subprocess import sys def getopts(argv): opts = {} while argv: if argv[0][0] == '-': opts[argv[0]] = argv[1] argv = argv[2:] else: argv = argv[1:] return opts def main(): arg...
true
true
f7513e52ecc6f93c7c2918e3ded0e42a11d3ac77
4,833
py
Python
pyggop/Tau.py
giacomov/pyggop
81f0307281d00e367ab632fa52de41a56877b048
[ "MIT" ]
1
2021-03-06T08:58:03.000Z
2021-03-06T08:58:03.000Z
pyggop/Tau.py
giacomov/pyggop
81f0307281d00e367ab632fa52de41a56877b048
[ "MIT" ]
null
null
null
pyggop/Tau.py
giacomov/pyggop
81f0307281d00e367ab632fa52de41a56877b048
[ "MIT" ]
1
2017-02-14T21:04:59.000Z
2017-02-14T21:04:59.000Z
import numpy as np from multiprocessing import Pool from grbod import * import os, sys import pickle import scipy.interpolate from math import log10 import matplotlib.pyplot as plt from pyggop.ParallelPool import ParallelPool #This is the actual computation def func(DRbar, R_0, b, m, a, xx, yy): R0_hat =...
30.018634
114
0.431616
import numpy as np from multiprocessing import Pool from grbod import * import os, sys import pickle import scipy.interpolate from math import log10 import matplotlib.pyplot as plt from pyggop.ParallelPool import ParallelPool def func(DRbar, R_0, b, m, a, xx, yy): R0_hat = 1.0 / ( 1.0 + 10**xx ) ...
true
true
f7513f85e878764983485fcadb79c03093352149
3,690
py
Python
nova/tests/functional/regressions/test_bug_1852458.py
MagnusR/nova
798b8d2d825fcf259279ba4370e734242598f76f
[ "Apache-2.0" ]
1
2021-11-05T06:26:27.000Z
2021-11-05T06:26:27.000Z
nova/tests/functional/regressions/test_bug_1852458.py
MagnusR/nova
798b8d2d825fcf259279ba4370e734242598f76f
[ "Apache-2.0" ]
3
2019-05-17T15:49:12.000Z
2019-11-21T10:49:54.000Z
nova/tests/functional/regressions/test_bug_1852458.py
MagnusR/nova
798b8d2d825fcf259279ba4370e734242598f76f
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
47.922078
78
0.685908
from nova.compute import instance_actions from nova import test from nova.tests import fixtures as nova_fixtures from nova.tests.functional import fixtures as func_fixtures from nova.tests.functional import integrated_helpers from nova import utils class TestInstanceActionBuryInCell0(test.TestCase, ...
true
true
f7514153c94db5010bc5f06508faa61b3ab1f396
633
py
Python
algorithms/code/leetcode/lc172_factorial_trailing_zeroes/lc172_factorial_trailing_zeroes.py
altermarkive/training
6a13f5b2f466156ad5db0e25da0e601d2404b4c3
[ "MIT" ]
null
null
null
algorithms/code/leetcode/lc172_factorial_trailing_zeroes/lc172_factorial_trailing_zeroes.py
altermarkive/training
6a13f5b2f466156ad5db0e25da0e601d2404b4c3
[ "MIT" ]
1
2022-02-16T11:28:56.000Z
2022-02-16T11:28:56.000Z
algorithms/code/leetcode/lc172_factorial_trailing_zeroes/lc172_factorial_trailing_zeroes.py
altermarkive/training
6a13f5b2f466156ad5db0e25da0e601d2404b4c3
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # https://leetcode.com/problems/factorial-trailing-zeroes/ import unittest class Solution: def trailingZeroes(self, n: int) -> int: step = 5 count = 0 while step <= n: count += n // step step = step * 5 return count class TestCode(u...
24.346154
74
0.64139
import unittest class Solution: def trailingZeroes(self, n: int) -> int: step = 5 count = 0 while step <= n: count += n // step step = step * 5 return count class TestCode(unittest.TestCase): def test_5(self): self.assertEqual(1, Solution()....
true
true
f7514182df3b66d5d7f9ffb03bef89a0f55795be
1,161
py
Python
Master Node Files/clear_entries.py
xuruichenn/mean-a
4b266c339f3aebf3c8598ac191a0bf51fad1bc6b
[ "MIT" ]
1
2020-07-24T21:36:56.000Z
2020-07-24T21:36:56.000Z
Master Node Files/clear_entries.py
xuruichenn/mean-a
4b266c339f3aebf3c8598ac191a0bf51fad1bc6b
[ "MIT" ]
null
null
null
Master Node Files/clear_entries.py
xuruichenn/mean-a
4b266c339f3aebf3c8598ac191a0bf51fad1bc6b
[ "MIT" ]
1
2019-04-12T20:39:00.000Z
2019-04-12T20:39:00.000Z
import argparse import requests import json REST_URL = '/api/todos' def delete_posts(website_ip, all_ids): url = 'http://' + website_ip + REST_URL + '/' for ids in all_ids: requests.delete(url + ids) return 1 def GET_from_website(website_ip): url = 'http://' + website_ip + REST_URL r = re...
25.23913
51
0.658053
import argparse import requests import json REST_URL = '/api/todos' def delete_posts(website_ip, all_ids): url = 'http://' + website_ip + REST_URL + '/' for ids in all_ids: requests.delete(url + ids) return 1 def GET_from_website(website_ip): url = 'http://' + website_ip + REST_URL r = re...
true
true
f75141c287c75968966eed782961291c7e7a7614
609
py
Python
main.py
ElJaviLuki/betty365
7a41edbd8fe363e461fc68e4a28b9e54a2ad50b3
[ "MIT" ]
1
2022-02-05T16:30:36.000Z
2022-02-05T16:30:36.000Z
main.py
ElJaviLuki/betty365
7a41edbd8fe363e461fc68e4a28b9e54a2ad50b3
[ "MIT" ]
null
null
null
main.py
ElJaviLuki/betty365
7a41edbd8fe363e461fc68e4a28b9e54a2ad50b3
[ "MIT" ]
1
2022-02-05T16:30:39.000Z
2022-02-05T16:30:39.000Z
''' Fetch session ID and D_ token and use them for the WebSocket connection. Author: @ElJaviLuki ''' # DEPENDENCIES import asyncio from betty365 import SubscriptionStreamDataProcessor from utils.web_session_manager import WebSessionManager # CONSTANTS MAIN_PAGE_HOST = 'https://www.bet365.es' USER_AGENT = 'Mo...
32.052632
129
0.781609
import asyncio from betty365 import SubscriptionStreamDataProcessor from utils.web_session_manager import WebSessionManager MAIN_PAGE_HOST = 'https://www.bet365.es' USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36' sm = WebSessionMan...
true
true
f751425b89ead7e665a16e0683a97271c02715f2
10,728
py
Python
isi_sdk_8_1_1/isi_sdk_8_1_1/models/quota_notification_create_params.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
24
2018-06-22T14:13:23.000Z
2022-03-23T01:21:26.000Z
isi_sdk_8_1_1/isi_sdk_8_1_1/models/quota_notification_create_params.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
46
2018-04-30T13:28:22.000Z
2022-03-21T21:11:07.000Z
isi_sdk_8_1_1/isi_sdk_8_1_1/models/quota_notification_create_params.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
29
2018-06-19T00:14:04.000Z
2022-02-08T17:51:19.000Z
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 6 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from isi_sdk_8_1_1.models.quota_n...
32.807339
190
0.629381
import pprint import re import six from isi_sdk_8_1_1.models.quota_notification import QuotaNotification class QuotaNotificationCreateParams(object): swagger_types = { 'action_alert': 'bool', 'action_email_address': 'str', 'action_email_owner': 'bool', 'email_template': ...
true
true
f7514529d6b58c302512ab42d70c3343efe1a145
650
py
Python
modules/qplan/task.py
fifoforlifo/pyqplan
5d4522285a1c78cecf35d92405232c3395072f4f
[ "Apache-2.0" ]
null
null
null
modules/qplan/task.py
fifoforlifo/pyqplan
5d4522285a1c78cecf35d92405232c3395072f4f
[ "Apache-2.0" ]
null
null
null
modules/qplan/task.py
fifoforlifo/pyqplan
5d4522285a1c78cecf35d92405232c3395072f4f
[ "Apache-2.0" ]
null
null
null
def _get_duration(cls): if hasattr(cls, 'estimate'): return cls.estimate else: return 0 class Task: def __init__(task, cls): task.cls = cls task.name = cls.__qualname__ task.duration = _get_duration(cls) task.children = set() # set of task.name task...
28.26087
54
0.518462
def _get_duration(cls): if hasattr(cls, 'estimate'): return cls.estimate else: return 0 class Task: def __init__(task, cls): task.cls = cls task.name = cls.__qualname__ task.duration = _get_duration(cls) task.children = set() task.deps = set() ...
true
true
f7514535271e4894bb4f7a73229a77d0c5b993cd
352
py
Python
ca_on_peterborough/people.py
djac/scrapers-ca
2e16a85ff8a05ea49031a11ede66fa452631f8da
[ "MIT" ]
null
null
null
ca_on_peterborough/people.py
djac/scrapers-ca
2e16a85ff8a05ea49031a11ede66fa452631f8da
[ "MIT" ]
null
null
null
ca_on_peterborough/people.py
djac/scrapers-ca
2e16a85ff8a05ea49031a11ede66fa452631f8da
[ "MIT" ]
null
null
null
from utils import CSVScraper from datetime import date class PeterboroughPersonScraper(CSVScraper): csv_url = 'https://docs.google.com/spreadsheets/d/146Ym9eJ624pHQLF0HAtoiCLfP2WyHVerla2rT1nbMsE/pub?gid=0&single=true&output=csv' updated_at = date(2016, 3, 16) contact_person = 'deva.nadesan@infinitom.com'...
32
132
0.784091
from utils import CSVScraper from datetime import date class PeterboroughPersonScraper(CSVScraper): csv_url = 'https://docs.google.com/spreadsheets/d/146Ym9eJ624pHQLF0HAtoiCLfP2WyHVerla2rT1nbMsE/pub?gid=0&single=true&output=csv' updated_at = date(2016, 3, 16) contact_person = 'deva.nadesan@infinitom.com'...
true
true
f75145f7802ea8fa5439c5ca6320073c022c1741
15,526
py
Python
recipes/recipe_modules/gclient/config.py
fanbojie/depot_tools
355e97e300e8baceae8353287ad59b915dbb8196
[ "BSD-3-Clause" ]
1
2019-12-03T03:03:48.000Z
2019-12-03T03:03:48.000Z
recipes/recipe_modules/gclient/config.py
fanbojie/depot_tools
355e97e300e8baceae8353287ad59b915dbb8196
[ "BSD-3-Clause" ]
null
null
null
recipes/recipe_modules/gclient/config.py
fanbojie/depot_tools
355e97e300e8baceae8353287ad59b915dbb8196
[ "BSD-3-Clause" ]
1
2020-03-07T16:07:25.000Z
2020-03-07T16:07:25.000Z
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import types from recipe_engine.config import config_item_context, ConfigGroup, BadConf from recipe_engine.config import ConfigList, Dict, Single, Static, S...
34.048246
80
0.695543
import types from recipe_engine.config import config_item_context, ConfigGroup, BadConf from recipe_engine.config import ConfigList, Dict, Single, Static, Set, List from . import api as gclient_api def BaseConfig(USE_MIRROR=True, CACHE_DIR=None, BUILDSPEC_VERSION=None, **_kwargs): cache_dir = s...
true
true
f751465d345a5f6160d76c9bcda84e467b54713a
6,322
py
Python
finsky/protos/preloads_pb2.py
mmcloughlin/finsky
f21ccdbebf86e55a542c658b6972cb1f3fb5f119
[ "MIT" ]
59
2015-07-11T18:53:59.000Z
2021-09-08T03:16:17.000Z
finsky/protos/preloads_pb2.py
mmcloughlin/finsky
f21ccdbebf86e55a542c658b6972cb1f3fb5f119
[ "MIT" ]
10
2015-07-01T08:09:29.000Z
2021-12-06T01:23:00.000Z
finsky/protos/preloads_pb2.py
mmcloughlin/finsky
f21ccdbebf86e55a542c658b6972cb1f3fb5f119
[ "MIT" ]
14
2015-08-15T22:04:02.000Z
2021-03-03T09:14:39.000Z
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: preloads.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 import reflection as _refl...
38.084337
620
0.744543
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
f75147248cbe8297b873dc60cd537544a4c45a77
672
py
Python
tests/test_validators_conditions.py
chishaku/dynaconf
f67cb3a93dfe7c7c61269b8a717f46568df27c06
[ "MIT" ]
1
2021-07-21T17:06:16.000Z
2021-07-21T17:06:16.000Z
tests/test_validators_conditions.py
chishaku/dynaconf
f67cb3a93dfe7c7c61269b8a717f46568df27c06
[ "MIT" ]
null
null
null
tests/test_validators_conditions.py
chishaku/dynaconf
f67cb3a93dfe7c7c61269b8a717f46568df27c06
[ "MIT" ]
null
null
null
import pytest from dynaconf import validator_conditions positive_conditions = [ ("eq", 1, 1), ("ne", 1, 2), ("gt", 4, 3), ("lt", 3, 4), ("gte", 5, 5), ("lte", 5, 5), ("identity", None, None), ("is_type_of", 42, int), ("is_in", 42, [42, 34]), ("is_not_in", 42, [55, 34]), ("...
24
67
0.5625
import pytest from dynaconf import validator_conditions positive_conditions = [ ("eq", 1, 1), ("ne", 1, 2), ("gt", 4, 3), ("lt", 3, 4), ("gte", 5, 5), ("lte", 5, 5), ("identity", None, None), ("is_type_of", 42, int), ("is_in", 42, [42, 34]), ("is_not_in", 42, [55, 34]), ("...
true
true
f7514886fdaf3343c779a873097b3a32378df7b5
1,015
py
Python
examples/repressilator.py
BDAthlon/2017-Salis_Lab-2
0c3f486cccdbf413ad577ab6941914589532075a
[ "MIT" ]
null
null
null
examples/repressilator.py
BDAthlon/2017-Salis_Lab-2
0c3f486cccdbf413ad577ab6941914589532075a
[ "MIT" ]
null
null
null
examples/repressilator.py
BDAthlon/2017-Salis_Lab-2
0c3f486cccdbf413ad577ab6941914589532075a
[ "MIT" ]
null
null
null
# Tackling a difficult Circuit-Glob puzzle with the repressilator import sys sys.path.append('../circuitglobs') import numpy as np import gcparser import model from animate import Puzzle, Graphics import random random.seed(12) if __name__ == "__main__": Puzzle1 = Puzzle(difficulty=6) # Puzzle1.plot() ...
22.065217
77
0.662069
import sys sys.path.append('../circuitglobs') import numpy as np import gcparser import model from animate import Puzzle, Graphics import random random.seed(12) if __name__ == "__main__": Puzzle1 = Puzzle(difficulty=6) species = ''' R1 60 10 R2 60 50 R3 60 10 GFP 120 0 ''' ...
true
true
f751494d2c685e9ea95a6ed37b3475093ce2370b
676
py
Python
cap-3/17-select-join-on.py
igoradriano/manipulacao-dados-python-bd
e3e47f15529d98e5c5887ebbb93c48924fceb665
[ "MIT" ]
null
null
null
cap-3/17-select-join-on.py
igoradriano/manipulacao-dados-python-bd
e3e47f15529d98e5c5887ebbb93c48924fceb665
[ "MIT" ]
null
null
null
cap-3/17-select-join-on.py
igoradriano/manipulacao-dados-python-bd
e3e47f15529d98e5c5887ebbb93c48924fceb665
[ "MIT" ]
null
null
null
import sqlite3 as conector from ModeloQueries import Veiculo conexao = conector.connect("./meu_banco.db") cursor = conexao.cursor() comando = '''SELECT Veiculo.placa, Veiculo.ano, Veiculo.cor, Veiculo.motor, Veiculo.proprietario, Marca.nome FROM Veiculo JOIN Marca ON (Marca.i...
25.037037
97
0.692308
import sqlite3 as conector from ModeloQueries import Veiculo conexao = conector.connect("./meu_banco.db") cursor = conexao.cursor() comando = '''SELECT Veiculo.placa, Veiculo.ano, Veiculo.cor, Veiculo.motor, Veiculo.proprietario, Marca.nome FROM Veiculo JOIN Marca ON (Marca.i...
true
true
f7514a01ba6c2d2fd7eb5b11b8515fd03d8e044c
2,129
py
Python
src/alerts.py
mamoedo/social-alerts
82d63c561c76274eb1ee7fefc7f1a5968b1b3b5f
[ "MIT" ]
7
2020-03-23T11:33:59.000Z
2021-06-03T01:56:27.000Z
src/alerts.py
mamoedo/social-alerts
82d63c561c76274eb1ee7fefc7f1a5968b1b3b5f
[ "MIT" ]
null
null
null
src/alerts.py
mamoedo/social-alerts
82d63c561c76274eb1ee7fefc7f1a5968b1b3b5f
[ "MIT" ]
null
null
null
import json import re TYPE_TWITTER = "twitter" TYPE_INSTA = "instagram" TYPES = (TYPE_INSTA, TYPE_TWITTER) __alerts_list = [] def get_alerts_list(): if not __alerts_list: load_alerts() return __alerts_list def load_alerts(): with open("alerts.json", "r") as fp: for alert in json.load(fp...
29.985915
111
0.577266
import json import re TYPE_TWITTER = "twitter" TYPE_INSTA = "instagram" TYPES = (TYPE_INSTA, TYPE_TWITTER) __alerts_list = [] def get_alerts_list(): if not __alerts_list: load_alerts() return __alerts_list def load_alerts(): with open("alerts.json", "r") as fp: for alert in json.load(fp...
true
true
f7514b5df170dbebb862a239366a6d2ee635eb68
464
py
Python
alipay/aop/api/response/AlipayOpenAppSilanApigraytwoQueryResponse.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/response/AlipayOpenAppSilanApigraytwoQueryResponse.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/response/AlipayOpenAppSilanApigraytwoQueryResponse.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse class AlipayOpenAppSilanApigraytwoQueryResponse(AlipayResponse): def __init__(self): super(AlipayOpenAppSilanApigraytwoQueryResponse, self).__init__() def parse_response_cont...
29
114
0.790948
import json from alipay.aop.api.response.AlipayResponse import AlipayResponse class AlipayOpenAppSilanApigraytwoQueryResponse(AlipayResponse): def __init__(self): super(AlipayOpenAppSilanApigraytwoQueryResponse, self).__init__() def parse_response_content(self, response_content): respons...
true
true
f7514c3a3eaf678ce7d778ca6c7f72f18d562af5
3,134
py
Python
chapter12/djangoApplication/djangoApplication/settings.py
yangwawa0323/Learning-Python-Networking-Second-Edition
5460fe4fb6acc5d0df19bf36e52ac09e9a11eb8b
[ "MIT" ]
52
2018-12-17T19:33:06.000Z
2022-03-25T18:14:02.000Z
chapter12/djangoApplication/djangoApplication/settings.py
barretthugh/Learning-Python-Networking-Second-Edition
0f00b8b20c1c85e76754e47113dff8ca9e99d5ca
[ "MIT" ]
null
null
null
chapter12/djangoApplication/djangoApplication/settings.py
barretthugh/Learning-Python-Networking-Second-Edition
0f00b8b20c1c85e76754e47113dff8ca9e99d5ca
[ "MIT" ]
38
2018-12-18T09:08:43.000Z
2022-02-06T02:53:05.000Z
""" Django settings for djangoApplication project. Generated by 'django-admin startproject' using Django 2.1.7. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ """ im...
25.688525
91
0.700064
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = ')bi66w41j_fkm*(ec+)7cckw1-rw(s5yd#ctexaz4hnhxz!5_5' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.content...
true
true
f7514c6124fb36cc8612ad92c930ce98d4181da4
9,207
py
Python
sdk/python/pulumi_azure_native/network/v20190601/get_virtual_network_peering.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20190601/get_virtual_network_peering.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20190601/get_virtual_network_peering.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
46.035
335
0.701966
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs __all__ = [ 'GetVirtualNetworkPeeringResult', 'AwaitableGetVirtualNetworkPeeringResult', 'get_virtual_network_peering', ] @pulumi.ou...
true
true
f7514cc6829a6634ff3fe3333bda352ad549608e
1,791
py
Python
samples/generated_samples/dialogflow_generated_dialogflowcx_v3beta1_security_settings_service_update_security_settings_sync.py
nicain/python-dialogflow-cx
2292ff540aea24c3c831a5ffe1604c2c022ccb82
[ "Apache-2.0" ]
null
null
null
samples/generated_samples/dialogflow_generated_dialogflowcx_v3beta1_security_settings_service_update_security_settings_sync.py
nicain/python-dialogflow-cx
2292ff540aea24c3c831a5ffe1604c2c022ccb82
[ "Apache-2.0" ]
null
null
null
samples/generated_samples/dialogflow_generated_dialogflowcx_v3beta1_security_settings_service_update_security_settings_sync.py
nicain/python-dialogflow-cx
2292ff540aea24c3c831a5ffe1604c2c022ccb82
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
35.82
103
0.788945
from google.cloud import dialogflowcx_v3beta1 def sample_update_security_settings(): client = dialogflowcx_v3beta1.SecuritySettingsServiceClient() security_settings = dialogflowcx_v3beta1.SecuritySettings() security_settings.retention_window_days = 2271 security_se...
true
true
f7514cca8e4806bcb5ece1a3dcaf5ca2a8d7b600
357
py
Python
ejercicios/ejercicio18.py
Ironwilly/python
f6d42c685b4026b018089edb4ae8cc0ca9614e86
[ "CC0-1.0" ]
null
null
null
ejercicios/ejercicio18.py
Ironwilly/python
f6d42c685b4026b018089edb4ae8cc0ca9614e86
[ "CC0-1.0" ]
null
null
null
ejercicios/ejercicio18.py
Ironwilly/python
f6d42c685b4026b018089edb4ae8cc0ca9614e86
[ "CC0-1.0" ]
null
null
null
#Pedir el nombre y los dos apellidos de una persona # y mostrar las iniciales. nombre = input("Nombre: ") apellido1 = input("Primer apellido: ") apellido2 = input("Segundo apellido: ") inicial = nombre[0] inicial = inicial + apellido1[0] inicial = inicial + apellido2[0] inicial = inicial.upper() print("Las inicial...
22.3125
53
0.711485
nombre = input("Nombre: ") apellido1 = input("Primer apellido: ") apellido2 = input("Segundo apellido: ") inicial = nombre[0] inicial = inicial + apellido1[0] inicial = inicial + apellido2[0] inicial = inicial.upper() print("Las iniciales de tu nombre son: %s"%(inicial))
true
true
f7514fce0cccc812d1c0933acbcc9b734d8a1e5f
1,997
py
Python
core/models.py
aalmobin/profiles-rest-api
50851ef1dd6959d4d8ea4832ced9e68e456b8540
[ "MIT" ]
null
null
null
core/models.py
aalmobin/profiles-rest-api
50851ef1dd6959d4d8ea4832ced9e68e456b8540
[ "MIT" ]
null
null
null
core/models.py
aalmobin/profiles-rest-api
50851ef1dd6959d4d8ea4832ced9e68e456b8540
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, PermissionsMixin from django.conf import settings class UserProfileManager(BaseUserManager): """Manager for user profiles""" def create_user(self, email, name, password=None): """Create a new user p...
29.80597
90
0.682524
from django.db import models from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, PermissionsMixin from django.conf import settings class UserProfileManager(BaseUserManager): def create_user(self, email, name, password=None): if not email: raise ValueError('User must have...
true
true
f7515029e3afa5a0ad3d0a8992f51d3cce54e091
3,936
py
Python
artview/core/variable_choose.py
savelov/artview
83c918757d6ae51cecc7589af4ab279e2c750bfe
[ "BSD-3-Clause" ]
40
2015-02-20T02:49:45.000Z
2021-09-10T09:00:49.000Z
artview/core/variable_choose.py
savelov/artview
83c918757d6ae51cecc7589af4ab279e2c750bfe
[ "BSD-3-Clause" ]
189
2015-02-20T03:21:31.000Z
2021-03-23T13:46:24.000Z
artview/core/variable_choose.py
savelov/artview
83c918757d6ae51cecc7589af4ab279e2c750bfe
[ "BSD-3-Clause" ]
19
2015-03-06T17:22:21.000Z
2022-02-08T17:30:30.000Z
""" variable_choose.py Class instance for finding and choosing shared variable from other components. """ # Load the needed packages from functools import partial from .core import componentsList, QtWidgets, QtCore from . import common class VariableChoose(QtWidgets.QDialog): ''' Class instance for fin...
32
75
0.597815
from functools import partial from .core import componentsList, QtWidgets, QtCore from . import common class VariableChoose(QtWidgets.QDialog): @classmethod def guiStart(self, parent=None): return self(parent=parent) def __init__(self, components=None, compSelect=False, varSelect=True, ...
true
true
f751527f4010db2178948021484f40185235157b
15,959
py
Python
egg/zoo/basic_games/play.py
schlevik/EGG
428d5aed3eb6fb0296f6856fb77b0a1cdceb33f1
[ "MIT" ]
null
null
null
egg/zoo/basic_games/play.py
schlevik/EGG
428d5aed3eb6fb0296f6856fb77b0a1cdceb33f1
[ "MIT" ]
null
null
null
egg/zoo/basic_games/play.py
schlevik/EGG
428d5aed3eb6fb0296f6856fb77b0a1cdceb33f1
[ "MIT" ]
1
2021-09-14T12:19:41.000Z
2021-09-14T12:19:41.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import argparse import numpy as np import torch import torch.nn.functional as F from torch.utils.data import DataLoader import egg.core as co...
48.655488
236
0.672348
import argparse import numpy as np import torch import torch.nn.functional as F from torch.utils.data import DataLoader import egg.core as core from egg.core import Callback, Interaction, PrintValidationEvents from egg.zoo.basic_games.architectures import DiscriReceiver, RecoReceiver, Sender from egg.zoo.basic_g...
true
true
f75152f7d1181f105ddb0b3362dd118a37414191
682
py
Python
youtube_podcast_gateway/util.py
Feuermurmel/youtube-podcast-gateway
41f85111a6fbdb36ab2ca2a765625a442b4fea99
[ "WTFPL" ]
39
2015-09-29T20:21:30.000Z
2022-02-02T07:14:50.000Z
youtube_podcast_gateway/util.py
Feuermurmel/youtube-podcast-gateway
41f85111a6fbdb36ab2ca2a765625a442b4fea99
[ "WTFPL" ]
25
2015-05-12T01:24:13.000Z
2021-08-02T09:58:19.000Z
youtube_podcast_gateway/util.py
Feuermurmel/youtube-podcast-gateway
41f85111a6fbdb36ab2ca2a765625a442b4fea99
[ "WTFPL" ]
9
2015-10-12T11:31:14.000Z
2021-07-29T19:19:31.000Z
import sys def freeze(obj): if isinstance(obj, dict): return frozenset(map(freeze, obj.items())) if isinstance(obj, (list, tuple)): return tuple(map(freeze, obj)) if isinstance(obj, set): return frozenset(obj) else: return obj def memorized(func): map = {} de...
18.432432
50
0.552786
import sys def freeze(obj): if isinstance(obj, dict): return frozenset(map(freeze, obj.items())) if isinstance(obj, (list, tuple)): return tuple(map(freeze, obj)) if isinstance(obj, set): return frozenset(obj) else: return obj def memorized(func): map = {} de...
true
true
f751538975ecdc8724f54492e2b4bcb0e708745b
746
py
Python
src/copyist/helpers.py
Polyconseil/copyist
ef6df5ba7296009b5fc46a69019965bb419de232
[ "MIT" ]
null
null
null
src/copyist/helpers.py
Polyconseil/copyist
ef6df5ba7296009b5fc46a69019965bb419de232
[ "MIT" ]
null
null
null
src/copyist/helpers.py
Polyconseil/copyist
ef6df5ba7296009b5fc46a69019965bb419de232
[ "MIT" ]
null
null
null
import tomlkit def fill_tool_section(previous_content, tool_name, section_text): """TOML Helper ensuring that a [tool.<tool_name>] section contains <section_text>""" current_state = tomlkit.parse(previous_content) tool_table = tomlkit.parse(section_text)["tool"][tool_name] if "tool" not in current_s...
33.909091
88
0.697051
import tomlkit def fill_tool_section(previous_content, tool_name, section_text): current_state = tomlkit.parse(previous_content) tool_table = tomlkit.parse(section_text)["tool"][tool_name] if "tool" not in current_state: tool_table = tomlkit.table() tool_table._is_super_table = ...
true
true
f75153a56539e5cd43f7d35d9a7b173414aa58e2
198
py
Python
tests/__init__.py
jonashellmann/informaticup21-team-chillow
f2e519af0a5d9a9368d62556703cfb1066ebb58f
[ "MIT" ]
3
2021-01-17T23:32:07.000Z
2022-01-30T14:49:16.000Z
tests/__init__.py
jonashellmann/informaticup21-team-chillow
f2e519af0a5d9a9368d62556703cfb1066ebb58f
[ "MIT" ]
2
2021-01-17T13:37:56.000Z
2021-04-14T12:28:49.000Z
tests/__init__.py
jonashellmann/informaticup21-team-chillow
f2e519af0a5d9a9368d62556703cfb1066ebb58f
[ "MIT" ]
2
2021-04-02T14:53:38.000Z
2021-04-20T11:10:17.000Z
import os def read_test_file(filename: str) -> str: file = open(os.path.join(os.path.dirname(__file__), 'test_data/' + filename)) content = file.read() file.close() return content
22
81
0.666667
import os def read_test_file(filename: str) -> str: file = open(os.path.join(os.path.dirname(__file__), 'test_data/' + filename)) content = file.read() file.close() return content
true
true
f75154c0f96287fe4623112f3de0cc0e61d931f4
4,357
py
Python
experiments/murtaza/multiworld/camera_ready/pusher/offline_vae2.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
experiments/murtaza/multiworld/camera_ready/pusher/offline_vae2.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
experiments/murtaza/multiworld/camera_ready/pusher/offline_vae2.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
import rlkit.misc.hyperparameter as hyp from multiworld.envs.mujoco.cameras import sawyer_pusher_camera_upright_v3 from rlkit.launchers.launcher_util import run_experiment from rlkit.torch.grill.launcher import grill_her_td3_full_experiment if __name__ == "__main__": variant = dict( imsize=84, init...
35.713115
151
0.54992
import rlkit.misc.hyperparameter as hyp from multiworld.envs.mujoco.cameras import sawyer_pusher_camera_upright_v3 from rlkit.launchers.launcher_util import run_experiment from rlkit.torch.grill.launcher import grill_her_td3_full_experiment if __name__ == "__main__": variant = dict( imsize=84, init...
true
true
f7515539dd8ed33dc88a5d9a7d0d4c31f8704b13
3,205
py
Python
mindmeld/converter/converter.py
derekmpham/mindmeld
18189f956e4e3eb92df61fde95ec82f73b9efa91
[ "Apache-2.0" ]
null
null
null
mindmeld/converter/converter.py
derekmpham/mindmeld
18189f956e4e3eb92df61fde95ec82f73b9efa91
[ "Apache-2.0" ]
null
null
null
mindmeld/converter/converter.py
derekmpham/mindmeld
18189f956e4e3eb92df61fde95ec82f73b9efa91
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (c) 2015 Cisco Systems, Inc. and others. 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...
34.836957
84
0.678315
import logging import os from abc import ABC, abstractmethod logger = logging.getLogger(__name__) class Converter(ABC): def __init__(self): pass @abstractmethod def convert_project(self): pass @abstractmethod def create_mindmeld_directory(self): pass ...
true
true
f751565273807ef64e34e16513b8f0dad828cb9d
3,246
py
Python
test/model.py
kasimte/Pytorch-pensieve
e550d9c36ed35b49592955fefbc17d1424d37b3b
[ "MIT" ]
null
null
null
test/model.py
kasimte/Pytorch-pensieve
e550d9c36ed35b49592955fefbc17d1424d37b3b
[ "MIT" ]
null
null
null
test/model.py
kasimte/Pytorch-pensieve
e550d9c36ed35b49592955fefbc17d1424d37b3b
[ "MIT" ]
null
null
null
from __future__ import division import torch import torch.nn as nn import torch.nn.functional as F from utils import norm_col_init, weights_init # class agentNET(torch.nn.Module): # def __init__(self, num_inputs = 1, num_outputs = 6): # super(agentNET, self).__init__() # # self.conv1 = nn.Conv1d(nu...
31.514563
72
0.579482
from __future__ import division import torch import torch.nn as nn import torch.nn.functional as F from utils import norm_col_init, weights_init class agentNET(torch.nn.Module): def __init__(self, num_inputs = 1, num_outputs = 6, S_LEN = 8): super(agentNET, sel...
true
true
f75156d6f2a868ad6fe03fc38ac8dd074465cf88
7,529
py
Python
app/__init__.py
BoringBuffalo/throat
23d342b8ae293ed5de4d4bbdef090308d724df7a
[ "MIT" ]
null
null
null
app/__init__.py
BoringBuffalo/throat
23d342b8ae293ed5de4d4bbdef090308d724df7a
[ "MIT" ]
null
null
null
app/__init__.py
BoringBuffalo/throat
23d342b8ae293ed5de4d4bbdef090308d724df7a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 """ Here is where all the good stuff happens """ from urllib.parse import urlparse import time import socket import datetime from bs4 import BeautifulSoup from flask import Flask, url_for, g, request, get_flashed_messages from flask_login import LoginManager, current_user from flask_webpack import ...
41.827778
118
0.679772
from urllib.parse import urlparse import time import socket import datetime from bs4 import BeautifulSoup from flask import Flask, url_for, g, request, get_flashed_messages from flask_login import LoginManager, current_user from flask_webpack import Webpack from flask_babel import Babel, _ from wheezy.html.utils impo...
true
true
f75157cd5708ffde6367a95b96d256f9053b4803
336
py
Python
5. WEB/app/external_sources/places/migrations/0002_remove_googleelement_price_level_missing.py
doyaguillo1997/Data2Gether
125e3e54060b342a473480f8cb1a913fc54f55ed
[ "MIT" ]
1
2021-10-03T10:19:14.000Z
2021-10-03T10:19:14.000Z
5. WEB/app/external_sources/places/migrations/0002_remove_googleelement_price_level_missing.py
doyaguillo1997/Data2Gether
125e3e54060b342a473480f8cb1a913fc54f55ed
[ "MIT" ]
null
null
null
5. WEB/app/external_sources/places/migrations/0002_remove_googleelement_price_level_missing.py
doyaguillo1997/Data2Gether
125e3e54060b342a473480f8cb1a913fc54f55ed
[ "MIT" ]
null
null
null
# Generated by Django 3.2.6 on 2021-08-24 10:45 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('places', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='googleelement', name='price_level_missing', ...
18.666667
47
0.60119
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('places', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='googleelement', name='price_level_missing', ), ]
true
true
f75158b499dfb05fef535b2348c00c185ed59ba4
405
py
Python
sales/migrations/0008_auto_20200912_0910.py
zhou-en/turf_portal
2424ac15248c9f1c0fa4f65ca18fe0ea71d7ff4e
[ "MIT" ]
null
null
null
sales/migrations/0008_auto_20200912_0910.py
zhou-en/turf_portal
2424ac15248c9f1c0fa4f65ca18fe0ea71d7ff4e
[ "MIT" ]
47
2020-10-14T21:54:35.000Z
2022-02-25T05:21:39.000Z
sales/migrations/0008_auto_20200912_0910.py
zhou-en/turf_portal
2424ac15248c9f1c0fa4f65ca18fe0ea71d7ff4e
[ "MIT" ]
null
null
null
# Generated by Django 3.1.1 on 2020-09-12 09:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sales', '0007_order_orderline'), ] operations = [ migrations.AlterField( model_name='orderline', name='price', ...
21.315789
72
0.6
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sales', '0007_order_orderline'), ] operations = [ migrations.AlterField( model_name='orderline', name='price', field=models.FloatField(blank=True, defa...
true
true
f75159ea5bfa07f759d0caec582a272efdb3a0aa
95
py
Python
jupyterlabpymolpysnips/MolecularRepresentation/saxsEnvelope.py
MooersLab/pymolpysnips
50a89c85adf8006d85c1d6cd3f8aad7e440a0b92
[ "MIT" ]
null
null
null
jupyterlabpymolpysnips/MolecularRepresentation/saxsEnvelope.py
MooersLab/pymolpysnips
50a89c85adf8006d85c1d6cd3f8aad7e440a0b92
[ "MIT" ]
null
null
null
jupyterlabpymolpysnips/MolecularRepresentation/saxsEnvelope.py
MooersLab/pymolpysnips
50a89c85adf8006d85c1d6cd3f8aad7e440a0b92
[ "MIT" ]
null
null
null
cmd.do('alter refine_A_Ave_SM_015_0_370-374-0r, vdw=3.0;') cmd.do('set solvent_radius = 3.0;')
31.666667
58
0.726316
cmd.do('alter refine_A_Ave_SM_015_0_370-374-0r, vdw=3.0;') cmd.do('set solvent_radius = 3.0;')
true
true
f7515a104f606d13442e2f97dc1cd61855469d4e
156
py
Python
201504/silsp3.py
conlee82/pythonstudy
c71bdd6404c0105a812043368f17b993a9d8a7c9
[ "Apache-2.0" ]
null
null
null
201504/silsp3.py
conlee82/pythonstudy
c71bdd6404c0105a812043368f17b993a9d8a7c9
[ "Apache-2.0" ]
null
null
null
201504/silsp3.py
conlee82/pythonstudy
c71bdd6404c0105a812043368f17b993a9d8a7c9
[ "Apache-2.0" ]
null
null
null
friends = ['john', 'pat', 'gary', 'michael'] for i, name in enumerate(friends): print ("no. {iteration} is {name}".format(iteration=i+1, name=name))
39
72
0.628205
friends = ['john', 'pat', 'gary', 'michael'] for i, name in enumerate(friends): print ("no. {iteration} is {name}".format(iteration=i+1, name=name))
true
true
f7515b5996d204f1739b35001a682bbd11b2cc6a
940
py
Python
src/ipcollector/setup.py
logdna/k8s-egress-networkpolicy-manager
3305ed30cbd07d1b549b743d02fde53a596780ca
[ "MIT" ]
null
null
null
src/ipcollector/setup.py
logdna/k8s-egress-networkpolicy-manager
3305ed30cbd07d1b549b743d02fde53a596780ca
[ "MIT" ]
null
null
null
src/ipcollector/setup.py
logdna/k8s-egress-networkpolicy-manager
3305ed30cbd07d1b549b743d02fde53a596780ca
[ "MIT" ]
1
2021-09-26T00:06:52.000Z
2021-09-26T00:06:52.000Z
from ipcollector import __version__ from setuptools import setup, find_packages from sys import path from os import environ path.insert(0, '.') NAME = 'ipcollector' if __name__ == '__main__': with open(environ.get('REQUIREMENTS_TXT', 'requirements.txt')) as f: requirements = f.read().splitlines() s...
29.375
162
0.669149
from ipcollector import __version__ from setuptools import setup, find_packages from sys import path from os import environ path.insert(0, '.') NAME = 'ipcollector' if __name__ == '__main__': with open(environ.get('REQUIREMENTS_TXT', 'requirements.txt')) as f: requirements = f.read().splitlines() s...
true
true
f7515bea754f9d8e8febae264558c46777f59659
6,214
py
Python
run_era5_rapid.py
BYU-Hydroinformatics/annual_era5_update
c283634891f956d02e24cc587cdfd6b196d24dc0
[ "BSD-3-Clause" ]
1
2020-07-09T16:56:40.000Z
2020-07-09T16:56:40.000Z
run_era5_rapid.py
BYU-Hydroinformatics/annual_era5_update
c283634891f956d02e24cc587cdfd6b196d24dc0
[ "BSD-3-Clause" ]
null
null
null
run_era5_rapid.py
BYU-Hydroinformatics/annual_era5_update
c283634891f956d02e24cc587cdfd6b196d24dc0
[ "BSD-3-Clause" ]
null
null
null
""" update_era5_workflow.py Author: Chris Edwards Copyright June 2020 License: BSD 3 Clause Updated: July 2020 Script to run ERA-5 RAPID simulation for one whole year of ERA-5 Runoff data. To run the script, give 6 additional arguments: 1. path to rapid executable 2. path to directory with LSM Grid (ERA-5 Run...
45.691176
115
0.683135
import os import sys from datetime import datetime, timedelta from RAPIDpy.inflow import run_lsm_rapid_process def run_era5_rapid_simulation(region, rapid_executable_location, lsm_data_location, master_input_location, master_output_location, prev_sim_end_date_str, simulation_start_dateti...
true
true
f7515c064b68faa71640151776b954a04b107cd6
2,079
py
Python
cogs/setInstructor.py
War-Keeper/TeachersPetBot
e2a730b8a97ef38323d2225ae5ada864d1c5968a
[ "MIT" ]
null
null
null
cogs/setInstructor.py
War-Keeper/TeachersPetBot
e2a730b8a97ef38323d2225ae5ada864d1c5968a
[ "MIT" ]
41
2021-10-13T03:02:40.000Z
2021-11-05T01:48:05.000Z
cogs/setInstructor.py
War-Keeper/TeachersPetBot
e2a730b8a97ef38323d2225ae5ada864d1c5968a
[ "MIT" ]
2
2021-11-12T00:03:13.000Z
2021-11-12T00:03:19.000Z
# Copyright (c) 2021 War-Keeper import discord from discord.utils import get from discord.ext import commands # ----------------------------------------------------------------------- # A basic "Hello World!" command, used to verify basic bot functionality # -----------------------------------------------------------...
39.226415
135
0.568062
import discord from discord.utils import get from discord.ext import commands class setInstructor(commands.Cog): def __init__(self, bot): self.bot = bot Instructor role!") else: await ctx.send("Could not find a member with that name") return @set_instructor....
true
true
f7515cea53e07b59c37807f607acaba745ebe88a
407
py
Python
healthier/migrations/0006_auto_20200521_1246.py
paulgirmes/P11
a686dc1d1215d2067636498ec233aaf607d6979d
[ "MIT" ]
2
2020-05-19T08:19:45.000Z
2020-06-12T08:19:51.000Z
healthier/migrations/0006_auto_20200521_1246.py
paulgirmes/P11
a686dc1d1215d2067636498ec233aaf607d6979d
[ "MIT" ]
3
2021-03-30T14:41:20.000Z
2021-06-17T07:08:33.000Z
healthier/migrations/0006_auto_20200521_1246.py
paulgirmes/P11
a686dc1d1215d2067636498ec233aaf607d6979d
[ "MIT" ]
null
null
null
# Generated by Django 3.0.6 on 2020-05-21 10:46 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("healthier", "0005_auto_20200521_1237"), ] operations = [ migrations.AlterField( model_name="food_item", name="id_ope...
21.421053
54
0.619165
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("healthier", "0005_auto_20200521_1237"), ] operations = [ migrations.AlterField( model_name="food_item", name="id_open_food_facts", field=models.BigInte...
true
true
f7515cf8176d58efa94505c67cfe9a2d56dedebb
2,440
py
Python
pysparkling/sql/internal_utils/readers/textreader.py
ptallada/pysparkling
f0e8e8d039f3313c2693b7c7576cb1b7ba5a6d78
[ "Apache-2.0" ]
260
2015-05-11T18:08:44.000Z
2022-01-15T13:19:43.000Z
pysparkling/sql/internal_utils/readers/textreader.py
ptallada/pysparkling
f0e8e8d039f3313c2693b7c7576cb1b7ba5a6d78
[ "Apache-2.0" ]
79
2015-06-02T09:53:25.000Z
2021-09-26T11:18:18.000Z
pysparkling/sql/internal_utils/readers/textreader.py
ptallada/pysparkling
f0e8e8d039f3313c2693b7c7576cb1b7ba5a6d78
[ "Apache-2.0" ]
50
2015-06-06T17:00:58.000Z
2022-01-15T13:19:18.000Z
from functools import partial import itertools from ....fileio import TextFile from ...internal_utils.options import Options from ...internal_utils.readers.utils import resolve_partitions from ...types import create_row, StringType, StructField, StructType class TextReader: default_options = dict( lineSe...
29.756098
98
0.648361
from functools import partial import itertools from ....fileio import TextFile from ...internal_utils.options import Options from ...internal_utils.readers.utils import resolve_partitions from ...types import create_row, StringType, StructField, StructType class TextReader: default_options = dict( lineSe...
true
true
f7515ed8037ab9b592049b6f3b78d2a340a9ca23
16,135
py
Python
unittests/test_cli.py
pramodk/reframe
c18cde8fc856e5711e5a0cb621fbf6339066296c
[ "BSD-3-Clause" ]
null
null
null
unittests/test_cli.py
pramodk/reframe
c18cde8fc856e5711e5a0cb621fbf6339066296c
[ "BSD-3-Clause" ]
null
null
null
unittests/test_cli.py
pramodk/reframe
c18cde8fc856e5711e5a0cb621fbf6339066296c
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2016-2020 Swiss National Supercomputing Centre (CSCS/ETH Zurich) # ReFrame Project Developers. See the top-level LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause import itertools import os import pathlib import pytest import re import sys from contextlib import redirect_stdout, redirect_...
30.616698
79
0.648404
import itertools import os import pathlib import pytest import re import sys from contextlib import redirect_stdout, redirect_stderr, suppress from io import StringIO import reframe.core.config as config import reframe.core.environments as env import reframe.core.runtime as rt import reframe.utility.os_ext as os_...
true
true
f751602415f6cc09ef81c271b8fc4cd7d7dc850e
348
py
Python
ex0077b.py
EwertonRosendo/PastaDeExercicios
68d23194b87ce1c8405c70fcceb3378955815d7d
[ "MIT" ]
null
null
null
ex0077b.py
EwertonRosendo/PastaDeExercicios
68d23194b87ce1c8405c70fcceb3378955815d7d
[ "MIT" ]
null
null
null
ex0077b.py
EwertonRosendo/PastaDeExercicios
68d23194b87ce1c8405c70fcceb3378955815d7d
[ "MIT" ]
null
null
null
palavras = ("aprender", "programar", "linguagem", "python", "python", "curso", "gratis", "estudar", "praticar", "trabalhar", "mercado", "programador", "futuro",) for p in palavras: print("\nNa palavra {} temos".format(p), end=" ") for letra in p: if letra in "aeiou": ...
38.666667
63
0.54023
palavras = ("aprender", "programar", "linguagem", "python", "python", "curso", "gratis", "estudar", "praticar", "trabalhar", "mercado", "programador", "futuro",) for p in palavras: print("\nNa palavra {} temos".format(p), end=" ") for letra in p: if letra in "aeiou": ...
true
true
f7516193dab249c0fba69e960382ce59b8ea7be3
3,733
py
Python
Challenges/chall_20.py
HKuz/PythonChallenge
e9d72616aa389483cab710bca3bccf708c0f99e0
[ "MIT" ]
null
null
null
Challenges/chall_20.py
HKuz/PythonChallenge
e9d72616aa389483cab710bca3bccf708c0f99e0
[ "MIT" ]
null
null
null
Challenges/chall_20.py
HKuz/PythonChallenge
e9d72616aa389483cab710bca3bccf708c0f99e0
[ "MIT" ]
null
null
null
#!/usr/local/bin/python3 # Python Challenge - 20 # http://www.pythonchallenge.com/pc/hex/idiot2.html # Username: butter; Password: fly # Keyword: invader, redavni import base64 import urllib.request import re def main(): ''' Hint: go away! Picture is fence with sign 'Private property beyond this fenc...
31.108333
76
0.64854
import base64 import urllib.request import re def main(): url = 'http://www.pythonchallenge.com/pc/hex/unreal.jpg' auth = base64.b64encode(b'butter:fly').decode() headers = {'Authorization': 'Basic {}'.format(auth)} request = urllib.request.Request(url, headers=headers) respo...
true
true
f751623283120cdddfbf77620a4ee5f0d3d038fa
2,628
py
Python
page_xml_draw/struct/json.py
GBN-DBP/page-xml-draw
ecf3123b385c58286649ba5b5bddc2a9d834daf8
[ "Apache-2.0" ]
6
2021-02-01T12:45:10.000Z
2021-02-03T14:14:28.000Z
page_xml_draw/struct/json.py
GBN-DBP/page-xml-draw
ecf3123b385c58286649ba5b5bddc2a9d834daf8
[ "Apache-2.0" ]
1
2021-02-17T02:02:08.000Z
2021-02-17T02:02:08.000Z
page_xml_draw/struct/json.py
GBN-DBP/page-xml-draw
ecf3123b385c58286649ba5b5bddc2a9d834daf8
[ "Apache-2.0" ]
null
null
null
from __future__ import annotations from typing import Any from copy import deepcopy from json import loads from jsonschema import RefResolver, validate from pkg_resources import resource_string class JsonSchema: data: dict resolver: RefResolver def __init__(self, data: dict, resolver: RefResolver = None...
26.28
79
0.608067
from __future__ import annotations from typing import Any from copy import deepcopy from json import loads from jsonschema import RefResolver, validate from pkg_resources import resource_string class JsonSchema: data: dict resolver: RefResolver def __init__(self, data: dict, resolver: RefResolver = None...
true
true
f751624874fae9e8e53975e7e250a89232e54aed
364
py
Python
examples/project_2/celery_conf.py
debonzi/celery_crossover
2da97fe527a357d5c85dfd29b04424d08dbe9b93
[ "MIT" ]
10
2018-04-06T18:58:18.000Z
2021-11-05T19:19:03.000Z
examples/project_2/celery_conf.py
debonzi/celery_crossover
2da97fe527a357d5c85dfd29b04424d08dbe9b93
[ "MIT" ]
2
2018-08-15T18:15:54.000Z
2021-03-26T06:58:02.000Z
examples/project_2/celery_conf.py
debonzi/celery_crossover
2da97fe527a357d5c85dfd29b04424d08dbe9b93
[ "MIT" ]
3
2018-04-09T03:06:12.000Z
2019-11-08T17:35:57.000Z
# -*- coding: utf-8 -*- from kombu import Exchange, Queue BROKER_URL = "redis://localhost:6379/1" CELERY_RESULT_BACKEND = "redis://localhost:6379/11" CELERYD_PREFETCH_MULTIPLIER = 1 CELERYD_CONCURRENCY = 1 CELERY_QUEUES = [ Queue("project_2", Exchange("project_2"), routing_key="project_2"), Queue("celery", E...
26
71
0.71978
from kombu import Exchange, Queue BROKER_URL = "redis://localhost:6379/1" CELERY_RESULT_BACKEND = "redis://localhost:6379/11" CELERYD_PREFETCH_MULTIPLIER = 1 CELERYD_CONCURRENCY = 1 CELERY_QUEUES = [ Queue("project_2", Exchange("project_2"), routing_key="project_2"), Queue("celery", Exchange("celery"), rout...
true
true
f75164dc104d2f059ea762c3e4d9242471b09730
5,252
py
Python
SourceRepositoryTools/ActivateAndExecute.py
davidbrownell/Common_Environment
4015872aeac8d5da30a6aa7940e1035a6aa6a75d
[ "BSL-1.0" ]
1
2017-04-25T13:15:10.000Z
2017-04-25T13:15:10.000Z
SourceRepositoryTools/ActivateAndExecute.py
davidbrownell/Common_Environment
4015872aeac8d5da30a6aa7940e1035a6aa6a75d
[ "BSL-1.0" ]
null
null
null
SourceRepositoryTools/ActivateAndExecute.py
davidbrownell/Common_Environment
4015872aeac8d5da30a6aa7940e1035a6aa6a75d
[ "BSL-1.0" ]
null
null
null
# ---------------------------------------------------------------------- # | # | ActivateAndExecute.py # | # | David Brownell <db@DavidBrownell.com> # | 2018-02-19 09:15:08 # | # ---------------------------------------------------------------------- # | # | Copyright David Brownell 2018. # | ...
46.070175
151
0.529703
import json import os import sys import six from SourceRepositoryTools.Impl import Utilities from SourceRepositoryTools.Impl import Constants from SourceRepositoryTools.Impl.EnvironmentBootstrap import EnvironmentBootstrap _script_fullpath = os.path.abspath(__file__) if "python" in sys.execu...
true
true
f75165843317ae1bf1756c75d899a183c5eb5a83
6,675
py
Python
archieve/2021/day19b.py
jabra98/aoc
eee632e3bf7917f71e58f8e87a96753d6a11cc64
[ "MIT" ]
null
null
null
archieve/2021/day19b.py
jabra98/aoc
eee632e3bf7917f71e58f8e87a96753d6a11cc64
[ "MIT" ]
null
null
null
archieve/2021/day19b.py
jabra98/aoc
eee632e3bf7917f71e58f8e87a96753d6a11cc64
[ "MIT" ]
null
null
null
import sys; datafilepath = sys.argv[1] raw_data = open(datafilepath).read().splitlines() import math scanners = list() tmp = list() for i in raw_data: if len(i) == 0: scanners.append(tmp.copy()) tmp.clear() elif i[0:2] == '--': continue else: (a,b,c) = i.split(',') ...
29.148472
83
0.425318
import sys; datafilepath = sys.argv[1] raw_data = open(datafilepath).read().splitlines() import math scanners = list() tmp = list() for i in raw_data: if len(i) == 0: scanners.append(tmp.copy()) tmp.clear() elif i[0:2] == '--': continue else: (a,b,c) = i.split(',') ...
true
true
f75165bb504fa3a5286a066a180a07ece1b9d7ab
1,210
py
Python
tests/core/test_marklogic_utils.py
overstory/ml-monitoring-plugin
c79e04ff0654d3739585d261dfd83a7c5f867923
[ "Apache-2.0" ]
5
2017-01-05T13:16:55.000Z
2020-06-13T07:51:37.000Z
tests/core/test_marklogic_utils.py
overstory/ml-monitoring-plugin
c79e04ff0654d3739585d261dfd83a7c5f867923
[ "Apache-2.0" ]
30
2016-11-30T16:45:12.000Z
2017-05-25T14:57:49.000Z
tests/core/test_marklogic_utils.py
overstory/ml-monitoring-plugin
c79e04ff0654d3739585d261dfd83a7c5f867923
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2016 MarkLogic Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0# # # U...
30.25
116
0.743802
from __future__ import absolute_import import logging import unittest from mlmonitor.core import MarkLogicStatus log = logging.getLogger() logging.basicConfig(level=logging.DEBUG) class MarkLogicUtilsTests(unittest.TestCase): def testRest(self): status = MarkLogicStatus(scheme="http...
true
true
f75165cbbe86ac2563739a485b9c87b4bc2621f9
2,480
py
Python
data/cirq_new/cirq_program/startCirq_noisy917.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/cirq_new/cirq_program/startCirq_noisy917.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/cirq_new/cirq_program/startCirq_noisy917.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 5/15/20 4:49 PM # @File : grover.py # qubit number=4 # total number=23 import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np #thatsNoCode def make_circuit(n: int, input_qubit): c = cirq.Ci...
34.444444
77
0.688306
import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np def make_circuit(n: int, input_qubit): c = cirq.Circuit() c.append(cirq.H.on(input_qubit[0])) c.append(cirq.H.on(input_qubit[1])) c.append(cirq.H.on(input_qubit[1])) ...
true
true
f751664fbca40199ac6f3d250e10f039a1ee4dc3
937
py
Python
exp/run_scale_lx.py
nla-group/classix
8584162e4c89ba05a62faf1e20104768cf5bb43c
[ "MIT" ]
56
2022-02-04T08:51:12.000Z
2022-03-30T10:54:18.000Z
exp/run_scale_lx.py
nla-group/classix
8584162e4c89ba05a62faf1e20104768cf5bb43c
[ "MIT" ]
5
2022-03-02T14:28:30.000Z
2022-03-19T21:03:17.000Z
exp/run_scale_lx.py
nla-group/classix
8584162e4c89ba05a62faf1e20104768cf5bb43c
[ "MIT" ]
5
2022-03-04T15:34:26.000Z
2022-03-28T09:44:03.000Z
import sklearn.datasets as data from classix import CLASSIX import matplotlib.pyplot as plt def rn_scale_explore(): plt.style.use('bmh') TOL = 0.1 random_state = 1 moons, _ = data.make_moons(n_samples=1000, noise=0.05, random_state=random_state) blobs, _ = data.make_blobs(n_samples=1500, centers=...
37.48
127
0.667022
import sklearn.datasets as data from classix import CLASSIX import matplotlib.pyplot as plt def rn_scale_explore(): plt.style.use('bmh') TOL = 0.1 random_state = 1 moons, _ = data.make_moons(n_samples=1000, noise=0.05, random_state=random_state) blobs, _ = data.make_blobs(n_samples=1500, centers=...
true
true
f75166b27c01c7fe2d00d9a53242ee90d7b54bd2
7,342
py
Python
data/p3BR/R2/benchmark/startQiskit_Class364.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p3BR/R2/benchmark/startQiskit_Class364.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p3BR/R2/benchmark/startQiskit_Class364.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=3 # total number=73 import numpy as np from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ from qiskit.visualization import plot_histogram from typing import * from pprint import pprint from math import log2 from collections import Counter from...
32.201754
140
0.639335
import numpy as np from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ from qiskit.visualization import plot_histogram from typing import * from pprint import pprint from math import log2 from collections import Counter from qiskit.test.mock import FakeVigo...
true
true
f75166e1db0088a12e37baa7c00ade5398b544c7
1,071
py
Python
merge_geo_with collocates.py
RSLancs/Extracting_plant_names_and_collocates_from_historical_texts
c8d6746978786ca4b83dc550114700530077c543
[ "Apache-2.0" ]
null
null
null
merge_geo_with collocates.py
RSLancs/Extracting_plant_names_and_collocates_from_historical_texts
c8d6746978786ca4b83dc550114700530077c543
[ "Apache-2.0" ]
null
null
null
merge_geo_with collocates.py
RSLancs/Extracting_plant_names_and_collocates_from_historical_texts
c8d6746978786ca4b83dc550114700530077c543
[ "Apache-2.0" ]
null
null
null
##python27 from pprint import pprint import pandas as pd ##..............open manually merged geoparsed results geo = pd.read_csv('./data/merger_xml_extracted_geoparsed_collocates.csv') geo = [tuple(x) for x in geo.values] # df to list print(geo[1]) ##..........open collocate results.... collocate = p...
26.121951
96
0.606909
rint import pprint import pandas as pd sed_collocates.csv') geo = [tuple(x) for x in geo.values] print(geo[1]) ED_no_overlaps-abrev-dups_collocate_results_15.01.19.csv') collocate = [tuple(x) for x in collocate.values] print(collocate[1]) merged = [] for ig in geo: for ic in collocate: if i...
true
true
f75167552634278481eed400c90ddd4d62354e93
154
py
Python
venv/bin/django-admin.py
khadija-bit/pro-awwwards
998b3366833444f1963ecc551a07c845c952c98f
[ "Unlicense" ]
null
null
null
venv/bin/django-admin.py
khadija-bit/pro-awwwards
998b3366833444f1963ecc551a07c845c952c98f
[ "Unlicense" ]
3
2021-06-08T21:44:51.000Z
2021-09-08T02:08:22.000Z
venv/bin/django-admin.py
khadija-bit/pro-awwwards
998b3366833444f1963ecc551a07c845c952c98f
[ "Unlicense" ]
null
null
null
#!/home/khadija/pro-awwwards/venv/bin/python3.6 from django.core import management if __name__ == "__main__": management.execute_from_command_line()
25.666667
47
0.779221
from django.core import management if __name__ == "__main__": management.execute_from_command_line()
true
true
f7516817499973e6dc87fbcb4243b5afd25d915a
828
py
Python
gamePS.py
robinankele/privacy-games
3a12194bbfb511ba4303d5cd1d37a7c1982622fa
[ "MIT" ]
null
null
null
gamePS.py
robinankele/privacy-games
3a12194bbfb511ba4303d5cd1d37a7c1982622fa
[ "MIT" ]
null
null
null
gamePS.py
robinankele/privacy-games
3a12194bbfb511ba4303d5cd1d37a7c1982622fa
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ Author: Robin Ankele <robin.ankele@cs.ox.ac.uk> http://users.ox.ac.uk/~kell4062 Copyright (c) 2017, University of Oxford All rights reserved. """ from gameBasic import G class G_PS(G): def __init__(self): G.__init__(self) def __finialize__(self): G.__finia...
19.714286
80
0.628019
from gameBasic import G class G_PS(G): def __init__(self): G.__init__(self) def __finialize__(self): G.__finialize__(self) def oracle_P_f(self): return G._P_f(self) def PS(self, u_x, a_x, p_x): G.input(self, u_x, a_x, p_x) e_x_, b_x = G.view(self) e_u_x = [] u_x = u_x...
true
true
f751691ebc5286840092f3d825a863d3a5bd3520
17,366
py
Python
grr/gui/api_plugins/hunt_regression_test.py
ethicalhackeragnidhra/Grr
9ff9178396d9d16575e42dded33627cb09ac3af1
[ "Apache-2.0" ]
1
2020-12-18T00:47:19.000Z
2020-12-18T00:47:19.000Z
grr/gui/api_plugins/hunt_regression_test.py
ethicalhackeragnidhra/Grr
9ff9178396d9d16575e42dded33627cb09ac3af1
[ "Apache-2.0" ]
null
null
null
grr/gui/api_plugins/hunt_regression_test.py
ethicalhackeragnidhra/Grr
9ff9178396d9d16575e42dded33627cb09ac3af1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """This modules contains regression tests for hunts API handlers.""" import pdb from grr.gui import api_regression_test_lib from grr.gui.api_plugins import hunt as hunt_plugin from grr.lib import aff4 from grr.lib import flags from grr.lib import output_plugin from grr.lib import rdfvalue fr...
33.396154
80
0.697915
import pdb from grr.gui import api_regression_test_lib from grr.gui.api_plugins import hunt as hunt_plugin from grr.lib import aff4 from grr.lib import flags from grr.lib import output_plugin from grr.lib import rdfvalue from grr.lib import test_lib from grr.lib.hunts import implementation from grr.lib.hunts imp...
true
true
f75169b47cd07a13c6858dbae36bd448d43d61e1
3,681
py
Python
sympy/abc.py
nickcotton89/sympy
a22f40463cba702b4a3d2c55bb9dee32ce5a45fa
[ "BSD-3-Clause" ]
1
2021-02-04T16:08:07.000Z
2021-02-04T16:08:07.000Z
sympy/abc.py
nickcotton89/sympy
a22f40463cba702b4a3d2c55bb9dee32ce5a45fa
[ "BSD-3-Clause" ]
null
null
null
sympy/abc.py
nickcotton89/sympy
a22f40463cba702b4a3d2c55bb9dee32ce5a45fa
[ "BSD-3-Clause" ]
null
null
null
""" This module exports all latin and greek letters as Symbols, so you can conveniently do >>> from sympy.abc import x, y instead of the slightly more clunky-looking >>> from sympy import symbols >>> x, y = symbols('x y') Caveats ======= 1. As of the time of writing this, the names ``C``, ``O``, ``S``,...
33.162162
80
0.663678
from typing import Any, Dict import string from .core import Symbol, symbols from .core.alphabets import greeks n, o, p, q, r, s, t') u, v, w, x, y, z = symbols('u, v, w, x, y, z') A, B, C, D, E, F, G, H, I, J = symbols('A, B, C, D, E, F, G, H, I, J') K, L, M, N, O, P, Q, R, S, T = symbols('K, L, M, N, O, P, Q, R,...
true
true
f75169b59ea18e0bf1cfe1c33194a0011302c048
627
py
Python
Labs/6/RaceConditions/RemoteRace/Exploit.py
Opty-MISCE/SS
2010a7f93fdcaa50f835d827e531dc636abfe299
[ "MIT" ]
null
null
null
Labs/6/RaceConditions/RemoteRace/Exploit.py
Opty-MISCE/SS
2010a7f93fdcaa50f835d827e531dc636abfe299
[ "MIT" ]
null
null
null
Labs/6/RaceConditions/RemoteRace/Exploit.py
Opty-MISCE/SS
2010a7f93fdcaa50f835d827e531dc636abfe299
[ "MIT" ]
null
null
null
from requests import session from threading import Thread from re import findall SERVER = "http://mustard.stt.rnl.tecnico.ulisboa.pt:12202" s = session() f = None def doLogin(): data = { "username": "admin", "password": "admin" } s.post(SERVER + "/login", data=data) def doJackpot(): ...
17.914286
58
0.570973
from requests import session from threading import Thread from re import findall SERVER = "http://mustard.stt.rnl.tecnico.ulisboa.pt:12202" s = session() f = None def doLogin(): data = { "username": "admin", "password": "admin" } s.post(SERVER + "/login", data=data) def doJackpot(): ...
true
true
f7516a8ba5d4fdec7e6491d91a0c7e4093686318
2,676
py
Python
egs/voxceleb/sre/backend/tools/s-norm-get-enroll.py
ishine/tf-kaldi-speaker-master
4b93110c4aa54f4764c58d9ffef3aec2efce39db
[ "Apache-2.0" ]
18
2019-09-11T13:34:03.000Z
2021-07-19T14:54:49.000Z
egs/voxceleb/sre/backend/tools/s-norm-get-enroll.py
ishine/tf-kaldi-speaker-master
4b93110c4aa54f4764c58d9ffef3aec2efce39db
[ "Apache-2.0" ]
null
null
null
egs/voxceleb/sre/backend/tools/s-norm-get-enroll.py
ishine/tf-kaldi-speaker-master
4b93110c4aa54f4764c58d9ffef3aec2efce39db
[ "Apache-2.0" ]
5
2019-09-18T07:51:17.000Z
2020-05-27T07:40:09.000Z
import os import numpy as np import logging import argparse import sys logger = logging.getLogger('s-norm score.') logger.setLevel(logging.INFO) handler = logging.StreamHandler(sys.stdout) handler.setLevel(logging.INFO) formatter = logging.Formatter("%(asctime)s [%(pathname)s:%(lineno)s - " ...
26.235294
121
0.60725
import os import numpy as np import logging import argparse import sys logger = logging.getLogger('s-norm score.') logger.setLevel(logging.INFO) handler = logging.StreamHandler(sys.stdout) handler.setLevel(logging.INFO) formatter = logging.Formatter("%(asctime)s [%(pathname)s:%(lineno)s - " ...
true
true
f7516b5d9c8d88148ef08dc3f70539e05fac7d0d
305
py
Python
Lesson7/vzlom.py
shinkai-tester/python_beginner
a934328c9a50241cc3f02a423060e16aab53b425
[ "Apache-2.0" ]
2
2021-06-01T13:24:04.000Z
2021-06-01T13:27:47.000Z
Lesson7/vzlom.py
shinkai-tester/python_beginner
a934328c9a50241cc3f02a423060e16aab53b425
[ "Apache-2.0" ]
null
null
null
Lesson7/vzlom.py
shinkai-tester/python_beginner
a934328c9a50241cc3f02a423060e16aab53b425
[ "Apache-2.0" ]
null
null
null
string = input() string = string.lower() for sdv in range(1, 32): s = '' for c in string: if 'а' <= c <= 'я': ot_sm = ord(c) - ord('а') new_ot_sm = (ot_sm - sdv) % 32 abs_sm = ord('а') + new_ot_sm c = chr(abs_sm) s += c print(s)
23.461538
42
0.429508
string = input() string = string.lower() for sdv in range(1, 32): s = '' for c in string: if 'а' <= c <= 'я': ot_sm = ord(c) - ord('а') new_ot_sm = (ot_sm - sdv) % 32 abs_sm = ord('а') + new_ot_sm c = chr(abs_sm) s += c print(s)
true
true
f7516ba1d0c47cbe735e41e9676e6402c84a6a01
5,058
py
Python
osxphotos/compare_exif.py
oPromessa/osxphotos
0d7e324f0262093727147b9f22ed275e962e8725
[ "MIT" ]
null
null
null
osxphotos/compare_exif.py
oPromessa/osxphotos
0d7e324f0262093727147b9f22ed275e962e8725
[ "MIT" ]
null
null
null
osxphotos/compare_exif.py
oPromessa/osxphotos
0d7e324f0262093727147b9f22ed275e962e8725
[ "MIT" ]
null
null
null
""" PhotoCompare class to compare date/time/timezone in Photos to the exif data """ from collections import namedtuple from typing import Callable, List, Optional, Tuple from osxphotos import PhotosDB from osxphotos.exiftool import ExifTool from photoscript import Photo from .datetime_utils import datetime_naive_to_...
30.107143
100
0.591538
from collections import namedtuple from typing import Callable, List, Optional, Tuple from osxphotos import PhotosDB from osxphotos.exiftool import ExifTool from photoscript import Photo from .datetime_utils import datetime_naive_to_local, datetime_to_new_tz from .exif_datetime_updater import get_exif_date_time_offs...
true
true
f7516ca3cd01b3ed0c5dbf99d708f6624187fd72
925
py
Python
decimate_citations.py
raroes/scientific-silos
89c56fcadfe7a520e413596543a15b606e4ea08c
[ "MIT" ]
null
null
null
decimate_citations.py
raroes/scientific-silos
89c56fcadfe7a520e413596543a15b606e4ea08c
[ "MIT" ]
null
null
null
decimate_citations.py
raroes/scientific-silos
89c56fcadfe7a520e413596543a15b606e4ea08c
[ "MIT" ]
1
2021-08-31T02:08:59.000Z
2021-08-31T02:08:59.000Z
#!/usr/bin/python3 # this script eliminates randomly a percentage of citations from the citation data from random import randrange input_file = "pmid_citations.txt" # percentage of citation that will be left after the process percentage_left = 80 output_file = "pmid_citations_" + str(percentage_left) + ".txt" f_in ...
25
82
0.675676
from random import randrange input_file = "pmid_citations.txt" percentage_left = 80 output_file = "pmid_citations_" + str(percentage_left) + ".txt" f_in = open(input_file, "r") f_out = open(output_file, "w") output_pmid = False current_pmid = "" input_count = 0 output_count = 0 for line in f_in: data = li...
true
true
f7516d2b369e223890d98999ed7972c6adac962e
25,956
py
Python
electroncash_gui/qt/contact_list.py
christroutner/Electron-Cash
d5217ed3e878bd56977181f022f9e5c43f449241
[ "MIT" ]
174
2018-09-30T12:47:10.000Z
2022-03-05T15:03:38.000Z
electroncash_gui/qt/contact_list.py
christroutner/Electron-Cash
d5217ed3e878bd56977181f022f9e5c43f449241
[ "MIT" ]
1,478
2018-09-24T09:30:13.000Z
2022-03-29T15:48:17.000Z
electroncash_gui/qt/contact_list.py
christroutner/Electron-Cash
d5217ed3e878bd56977181f022f9e5c43f449241
[ "MIT" ]
159
2018-09-24T12:56:47.000Z
2022-03-28T23:52:17.000Z
#!/usr/bin/env python3 # # Electrum - lightweight Bitcoin client # Copyright (C) 2015 Thomas Voegtlin # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including withou...
50.108108
166
0.612036
from electroncash.i18n import _, ngettext import electroncash.web as web from electroncash.address import Address from electroncash.contacts import Contact, contact_types from electroncash.plugins import run_hook from electroncash.util import FileImportFailed, PrintError, finalization_print_err...
true
true
f7516d5472ecfbb4ee9b68791c5713b42ef58537
4,783
py
Python
sparse_ho/implicit_forward.py
QB3/sparse-ho-qbe
73358caeff2ff08ca4e88af419e7dae753d43ea9
[ "BSD-3-Clause" ]
null
null
null
sparse_ho/implicit_forward.py
QB3/sparse-ho-qbe
73358caeff2ff08ca4e88af419e7dae753d43ea9
[ "BSD-3-Clause" ]
null
null
null
sparse_ho/implicit_forward.py
QB3/sparse-ho-qbe
73358caeff2ff08ca4e88af419e7dae753d43ea9
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from scipy.sparse import issparse from sparse_ho.forward import get_beta_jac_iterdiff class ImplicitForward(): def __init__( self, criterion, tol_jac=1e-3, n_iter=100, n_iter_jac=100, use_sk=False, verbose=False): self.criterion = criterion self.n_iter = ...
37.661417
173
0.606105
import numpy as np from scipy.sparse import issparse from sparse_ho.forward import get_beta_jac_iterdiff class ImplicitForward(): def __init__( self, criterion, tol_jac=1e-3, n_iter=100, n_iter_jac=100, use_sk=False, verbose=False): self.criterion = criterion self.n_iter = ...
true
true
f7516d72cf57a5045a31b1bc07961010f578dc55
5,009
py
Python
q2_longitudinal/_vega_specs/volatility/data.py
sterrettJD/q2-longitudinal
d9edd427c9668c8b95d708fc3c4d2722204c9ce0
[ "BSD-3-Clause" ]
10
2017-09-13T03:16:34.000Z
2022-01-31T06:07:00.000Z
q2_longitudinal/_vega_specs/volatility/data.py
sterrettJD/q2-longitudinal
d9edd427c9668c8b95d708fc3c4d2722204c9ce0
[ "BSD-3-Clause" ]
114
2017-08-10T00:19:09.000Z
2022-03-03T06:48:07.000Z
q2_longitudinal/_vega_specs/volatility/data.py
sterrettJD/q2-longitudinal
d9edd427c9668c8b95d708fc3c4d2722204c9ce0
[ "BSD-3-Clause" ]
16
2017-08-23T21:33:57.000Z
2022-01-28T16:26:44.000Z
# ---------------------------------------------------------------------------- # Copyright (c) 2017-2021, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
46.813084
79
0.508884
from .const import ( DAT_INDIVIDUAL, FLD_GROUP_BY, FLD_METRIC, DAT_GLOBAL_VALS, FLD_CTRL_CL3, DAT_SELECTED, FLD_CTRL_MEAN, FLD_CTRL_STDEV, SIG_METRIC, SIG_GROUP, DAT_STATS, DAT_STATS_CUME_EXT, DAT_STATS_GLOB_EXT_LEFT, FLD_CTRL_CL2, FLD_CTRL_EXT, DAT_AGG_BY, FLD_CTRL_CI0, FLD_CTRL_CI1, FLD_CTRL_C...
true
true
f7516de201442d5bf511ad8d7897e5d4a57cf466
4,088
py
Python
yt/geometry/oct_geometry_handler.py
saethlin/yt
992ae71974dca933346e91008c5a50f43a0a350e
[ "BSD-3-Clause-Clear" ]
1
2020-06-22T10:17:01.000Z
2020-06-22T10:17:01.000Z
yt/geometry/oct_geometry_handler.py
saethlin/yt
992ae71974dca933346e91008c5a50f43a0a350e
[ "BSD-3-Clause-Clear" ]
2
2020-02-10T22:55:35.000Z
2020-02-19T21:01:20.000Z
yt/geometry/oct_geometry_handler.py
saethlin/yt
992ae71974dca933346e91008c5a50f43a0a350e
[ "BSD-3-Clause-Clear" ]
2
2020-05-16T15:29:37.000Z
2020-06-22T10:17:08.000Z
""" Octree geometry handler """ #----------------------------------------------------------------------------- # Copyright (c) 2013, yt Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #------------------...
34.066667
94
0.568249
import numpy as np from yt.utilities.logger import ytLogger as mylog from yt.geometry.geometry_handler import Index from yt.fields.field_detector import FieldDetector class OctreeIndex(Index): def _setup_geometry(self): mylog.debug("Initializing Octree Geometry Handler.") self._initializ...
true
true
f7516f315d7ba508c3b1422d64a8297477a81de3
46,302
py
Python
research/object_detection/core/box_list_ops.py
TUDelftHao/models
faf0c2dc442ceaa8425aff73abd00f92f3137b7b
[ "Apache-2.0" ]
1
2020-09-28T13:07:19.000Z
2020-09-28T13:07:19.000Z
research/object_detection/core/box_list_ops.py
TUDelftHao/models
faf0c2dc442ceaa8425aff73abd00f92f3137b7b
[ "Apache-2.0" ]
1
2020-08-07T19:52:14.000Z
2020-08-07T19:54:27.000Z
research/object_detection/core/box_list_ops.py
TUDelftHao/models
faf0c2dc442ceaa8425aff73abd00f92f3137b7b
[ "Apache-2.0" ]
1
2020-08-31T19:12:34.000Z
2020-08-31T19:12:34.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
38.234517
80
0.69578
from __future__ import absolute_import from __future__ import division from __future__ import print_function from six.moves import range import tensorflow.compat.v1 as tf from object_detection.core import box_list from object_detection.utils import ops from object_detection.utils import shape_utils c...
true
true
f7516f9909eb2f8b7d54d281701ef0e4f635c8cb
2,865
py
Python
aalpy/oracles/RandomWordEqOracle.py
MDrey101/AALpy
bd8a4994db6c27438db61a3247ae404fc6e4074b
[ "MIT" ]
61
2021-04-01T10:38:52.000Z
2022-03-28T13:44:23.000Z
aalpy/oracles/RandomWordEqOracle.py
MDrey101/AALpy
bd8a4994db6c27438db61a3247ae404fc6e4074b
[ "MIT" ]
16
2021-04-03T20:14:08.000Z
2022-02-16T10:21:48.000Z
aalpy/oracles/RandomWordEqOracle.py
haubitzer/AALpy
e5b51742d886d5c5c72ab3e9c20eb349c56e2469
[ "MIT" ]
9
2021-04-05T13:43:17.000Z
2022-03-09T14:06:17.000Z
from aalpy.automata import Onfsm, Mdp, StochasticMealyMachine from aalpy.base import Oracle, SUL from random import randint, choice automaton_dict = {Onfsm: 'onfsm', Mdp: 'mdp', StochasticMealyMachine: 'smm'} class RandomWordEqOracle(Oracle): """ Equivalence oracle where queries are of random length in a pre...
34.107143
116
0.561955
from aalpy.automata import Onfsm, Mdp, StochasticMealyMachine from aalpy.base import Oracle, SUL from random import randint, choice automaton_dict = {Onfsm: 'onfsm', Mdp: 'mdp', StochasticMealyMachine: 'smm'} class RandomWordEqOracle(Oracle): def __init__(self, alphabet: list, sul: SUL, num_walks=100, min_walk_...
true
true
f7516fb2553bd67331becda7e53de5e86ad8797b
89
py
Python
gbm-noticeboard/project/noticeboard/apps.py
yannhowe/gbm
ecd2a363050e9fc3997fc1ac08ecc94efffdd9be
[ "MIT" ]
null
null
null
gbm-noticeboard/project/noticeboard/apps.py
yannhowe/gbm
ecd2a363050e9fc3997fc1ac08ecc94efffdd9be
[ "MIT" ]
null
null
null
gbm-noticeboard/project/noticeboard/apps.py
yannhowe/gbm
ecd2a363050e9fc3997fc1ac08ecc94efffdd9be
[ "MIT" ]
null
null
null
from django.apps import AppConfig class ApiConfig(AppConfig): name = 'noticeboard'
14.833333
33
0.752809
from django.apps import AppConfig class ApiConfig(AppConfig): name = 'noticeboard'
true
true
f751701d599becf4a6fcf92a75f363a20f867ced
82
py
Python
hon/renderers/ebook/__init__.py
swquinn/hon
333332029ee884a8822d38024659d5d7da64ff1a
[ "MIT" ]
null
null
null
hon/renderers/ebook/__init__.py
swquinn/hon
333332029ee884a8822d38024659d5d7da64ff1a
[ "MIT" ]
14
2019-06-23T01:49:55.000Z
2021-02-22T01:26:51.000Z
hon/renderers/ebook/__init__.py
swquinn/hon
333332029ee884a8822d38024659d5d7da64ff1a
[ "MIT" ]
null
null
null
from .ebook_renderer import EbookRenderer from .epub_renderer import EpubRenderer
27.333333
41
0.878049
from .ebook_renderer import EbookRenderer from .epub_renderer import EpubRenderer
true
true
f751715f45f357efb79292ed1c4867a696629b9d
47,867
py
Python
wemake_python_styleguide/violations/best_practices.py
n1kolasM/wemake-python-styleguide
f39e87897de89bea1c49d410beb5b1cbaf930807
[ "MIT" ]
1
2020-02-08T12:04:39.000Z
2020-02-08T12:04:39.000Z
wemake_python_styleguide/violations/best_practices.py
n1kolasM/wemake-python-styleguide
f39e87897de89bea1c49d410beb5b1cbaf930807
[ "MIT" ]
null
null
null
wemake_python_styleguide/violations/best_practices.py
n1kolasM/wemake-python-styleguide
f39e87897de89bea1c49d410beb5b1cbaf930807
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ These checks ensure that you follow the best practices. The source for these best practices is hidden inside countless hours we have spent debugging software or reviewing it. How do we find inspiration for new rules? We find some ugly code during code reviews and audits. Then we forbid to...
24.622942
86
0.641486
from typing_extensions import final from wemake_python_styleguide.violations.base import ( ASTViolation, SimpleViolation, TokenizeViolation, ) @final class WrongMagicCommentViolation(SimpleViolation): code = 400 error_template = 'Found wrong magic comment: {0}' @final class WrongDocCommentV...
true
true
f7517195317b4cd8b2ff94fe72615b9d256bbfe0
15,700
py
Python
modules/mono/build_scripts/mono_configure.py
abmyii/godot
24e1039eb6fe32115e8d1a62a84965e9be19a2ed
[ "CC-BY-3.0", "Apache-2.0", "MIT" ]
5
2019-07-02T19:30:58.000Z
2021-01-19T03:31:17.000Z
modules/mono/build_scripts/mono_configure.py
abmyii/godot
24e1039eb6fe32115e8d1a62a84965e9be19a2ed
[ "CC-BY-3.0", "Apache-2.0", "MIT" ]
5
2019-11-05T19:15:53.000Z
2019-12-09T01:31:26.000Z
modules/mono/build_scripts/mono_configure.py
abmyii/godot
24e1039eb6fe32115e8d1a62a84965e9be19a2ed
[ "CC-BY-3.0", "Apache-2.0", "MIT" ]
1
2019-10-24T19:44:44.000Z
2019-10-24T19:44:44.000Z
import os import os.path import sys import subprocess from SCons.Script import Dir, Environment if os.name == 'nt': from . import mono_reg_utils as monoreg android_arch_dirs = { 'armv7': 'armeabi-v7a', 'arm64v8': 'arm64-v8a', 'x86': 'x86', 'x86_64': 'x86_64' } def get_android_out_dir(env): ...
38.480392
154
0.646624
import os import os.path import sys import subprocess from SCons.Script import Dir, Environment if os.name == 'nt': from . import mono_reg_utils as monoreg android_arch_dirs = { 'armv7': 'armeabi-v7a', 'arm64v8': 'arm64-v8a', 'x86': 'x86', 'x86_64': 'x86_64' } def get_android_out_dir(env): ...
true
true
f751742d1ab7963435084b07f279b9f9d0a36b14
1,887
py
Python
forte/pipeline_component.py
atif93/forte
2b70531abfb54fc5c2429ee26a501ad5c9094f3c
[ "Apache-2.0" ]
null
null
null
forte/pipeline_component.py
atif93/forte
2b70531abfb54fc5c2429ee26a501ad5c9094f3c
[ "Apache-2.0" ]
13
2019-12-01T04:51:38.000Z
2020-02-11T23:55:11.000Z
forte/pipeline_component.py
gpengzhi/forte
2b70531abfb54fc5c2429ee26a501ad5c9094f3c
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The Forte Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
37
79
0.702703
from typing import Generic from texar.torch import HParams from forte.common.resources import Resources from forte.data.base_pack import PackType class PipelineComponent(Generic[PackType]): def initialize(self, resource: Resources, configs: HParams): pass def finish(self, resource: Re...
true
true
f75176940202e76f8338ed5fd86bc72ce1de620e
28,826
py
Python
retrobiocat_web/retro/rdchiral/main.py
ihayhurst/RetroBioCat
d674897459c0ab65faad5ed3017c55cf51bcc020
[ "MIT" ]
9
2020-12-01T16:33:02.000Z
2022-01-19T20:02:42.000Z
retrobiocat_web/retro/rdchiral/main.py
ihayhurst/RetroBioCat
d674897459c0ab65faad5ed3017c55cf51bcc020
[ "MIT" ]
4
2020-10-02T14:38:32.000Z
2021-08-02T09:23:58.000Z
retrobiocat_web/retro/rdchiral/main.py
ihayhurst/RetroBioCat
d674897459c0ab65faad5ed3017c55cf51bcc020
[ "MIT" ]
6
2021-01-14T07:48:36.000Z
2022-03-20T17:34:27.000Z
from __future__ import print_function import sys import os import re import copy import rdkit.Chem as Chem import rdkit.Chem.AllChem as AllChem from rdkit.Chem.rdchem import ChiralType, BondType, BondDir from retrobiocat_web.retro.rdchiral.utils import vprint, PLEVEL, atoms_are_different from retrobiocat_web.retro.r...
52.410909
144
0.575869
from __future__ import print_function import sys import os import re import copy import rdkit.Chem as Chem import rdkit.Chem.AllChem as AllChem from rdkit.Chem.rdchem import ChiralType, BondType, BondDir from retrobiocat_web.retro.rdchiral.utils import vprint, PLEVEL, atoms_are_different from retrobiocat_web.retro.r...
true
true
f751769f9515630371f5c3aa09dec814eded5388
3,144
py
Python
plantcv/plantcv/auto_crop.py
stiphyMT/plantcv
b51b545f3aef0742a2d250c75cc998ba6c9e57b2
[ "MIT" ]
1
2022-02-03T12:08:59.000Z
2022-02-03T12:08:59.000Z
plantcv/plantcv/auto_crop.py
stiphyMT/plantcv
b51b545f3aef0742a2d250c75cc998ba6c9e57b2
[ "MIT" ]
null
null
null
plantcv/plantcv/auto_crop.py
stiphyMT/plantcv
b51b545f3aef0742a2d250c75cc998ba6c9e57b2
[ "MIT" ]
null
null
null
# Resize image import os import cv2 import numpy as np from plantcv.plantcv._debug import _debug from plantcv.plantcv import params from plantcv.plantcv import fatal_error def auto_crop(img, obj, padding_x=0, padding_y=0, color='black'): """ Resize image. Inputs: img = RGB or grayscale image d...
34.549451
124
0.625636
import os import cv2 import numpy as np from plantcv.plantcv._debug import _debug from plantcv.plantcv import params from plantcv.plantcv import fatal_error def auto_crop(img, obj, padding_x=0, padding_y=0, color='black'): params.device += 1 img_copy = np.copy(img) img_copy2 = np.copy(img) he...
true
true
f7517778d9d6d519bb34ac7dd505e2aecf1cabf1
4,596
py
Python
tests/Cpl/TShell/_0test/test1/linux/gcc/mytoolchain.py
johnttaylor/foxtail
86e4e1d19d5e8f9c1d1064cf0939f4bf62615400
[ "BSD-3-Clause" ]
null
null
null
tests/Cpl/TShell/_0test/test1/linux/gcc/mytoolchain.py
johnttaylor/foxtail
86e4e1d19d5e8f9c1d1064cf0939f4bf62615400
[ "BSD-3-Clause" ]
null
null
null
tests/Cpl/TShell/_0test/test1/linux/gcc/mytoolchain.py
johnttaylor/foxtail
86e4e1d19d5e8f9c1d1064cf0939f4bf62615400
[ "BSD-3-Clause" ]
null
null
null
#--------------------------------------------------------------------------- # This python module is used to customize a supported toolchain for your # project specific settings. # # Notes: # - ONLY edit/add statements in the sections marked by BEGIN/END EDITS # markers. # - Maintain indentation level and u...
31.265306
94
0.604656
# - rvalues must be enclosed in quotes (single ' ' or double " ") # - The structure/class 'BuildValues' contains (at a minimum the # following data members. Any member not specifically set defaults # to null/empty string # .inc # .asminc # .cflags # ...
true
true
f75177a17cbef1d9fe56b023606d54e7cbc6597d
11,679
py
Python
api/tacticalrmm/logs/models.py
HighTech-Grace-Solutions/tacticalrmm
37c5f94c66e978c542fd01becae69438523ec5d5
[ "MIT" ]
2
2021-04-29T13:34:07.000Z
2021-04-29T13:34:11.000Z
api/tacticalrmm/logs/models.py
HighTech-Grace-Solutions/tacticalrmm
37c5f94c66e978c542fd01becae69438523ec5d5
[ "MIT" ]
null
null
null
api/tacticalrmm/logs/models.py
HighTech-Grace-Solutions/tacticalrmm
37c5f94c66e978c542fd01becae69438523ec5d5
[ "MIT" ]
2
2021-05-01T22:40:47.000Z
2022-03-07T16:16:14.000Z
import datetime as dt from abc import abstractmethod from django.db import models from tacticalrmm.middleware import get_debug_info, get_username ACTION_TYPE_CHOICES = [ ("schedreboot", "Scheduled Reboot"), ("taskaction", "Scheduled Task Action"), ("agentupdate", "Agent Update"), ("chocoinstall", "Ch...
32.991525
96
0.587122
import datetime as dt from abc import abstractmethod from django.db import models from tacticalrmm.middleware import get_debug_info, get_username ACTION_TYPE_CHOICES = [ ("schedreboot", "Scheduled Reboot"), ("taskaction", "Scheduled Task Action"), ("agentupdate", "Agent Update"), ("chocoinstall", "Ch...
true
true