hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c4086c300846640ff43fa76f34d9aae7872760c
68
py
Python
7 kyu/Exes and Ohs/Exes and Ohs.py
anthonyjatoba/codewars
76b0d66dd1ba76a4d136b658920cdf85fd5c4b06
[ "MIT" ]
null
null
null
7 kyu/Exes and Ohs/Exes and Ohs.py
anthonyjatoba/codewars
76b0d66dd1ba76a4d136b658920cdf85fd5c4b06
[ "MIT" ]
null
null
null
7 kyu/Exes and Ohs/Exes and Ohs.py
anthonyjatoba/codewars
76b0d66dd1ba76a4d136b658920cdf85fd5c4b06
[ "MIT" ]
null
null
null
def xo(s): s = s.lower() return s.count('x') == s.count('o')
22.666667
39
0.485294
def xo(s): s = s.lower() return s.count('x') == s.count('o')
true
true
1c4087d8a8fde9d7ae8bc928220890c1cc009ddf
8,421
py
Python
tools/data_converter/image_classification/image_classification_data.py
matarof/tpu
d2e3b810134b200214f42cb004f20fe6b8e2cab4
[ "Apache-2.0" ]
5,098
2018-02-09T16:56:49.000Z
2022-03-31T13:50:40.000Z
tools/data_converter/image_classification/image_classification_data.py
matarof/tpu
d2e3b810134b200214f42cb004f20fe6b8e2cab4
[ "Apache-2.0" ]
550
2018-02-07T05:30:06.000Z
2022-03-13T22:00:09.000Z
tools/data_converter/image_classification/image_classification_data.py
matarof/tpu
d2e3b810134b200214f42cb004f20fe6b8e2cab4
[ "Apache-2.0" ]
1,920
2018-02-07T23:44:49.000Z
2022-03-29T03:11:08.000Z
# Copyright 2019 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...
30.400722
80
0.641135
import abc import os import six import tensorflow.compat.v1 as tf import tensorflow_datasets.public_api as tfds import image_utils as image _REQUIRED_INPUTS = [ 'image_fobj', 'label', ] _VERSION = '0.1.0' class ImageClassificationBuilder(tfds.core.GeneratorBasedBuilder): VERSION = tfds.core....
true
true
1c4089e21b7947affd5d4e0335cbd83bde92af9f
10,435
py
Python
blueoil/generate_lmnet_config.py
msakai/blueoil
0c9160b524b17482d59ae48a0c11384f1d26dccc
[ "Apache-2.0" ]
248
2018-10-19T01:48:42.000Z
2022-01-31T02:34:24.000Z
blueoil/generate_lmnet_config.py
oatawa1/blueoil
6a5f1cc1fb78c86423338f99cb9dbf506a76f3d6
[ "Apache-2.0" ]
1,102
2018-10-19T04:50:34.000Z
2021-08-02T04:22:10.000Z
blueoil/generate_lmnet_config.py
oatawa1/blueoil
6a5f1cc1fb78c86423338f99cb9dbf506a76f3d6
[ "Apache-2.0" ]
110
2018-10-19T01:49:02.000Z
2022-01-31T02:34:26.000Z
# -*- coding: utf-8 -*- # Copyright 2018 The Blueoil 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 # # Unles...
34.438944
101
0.653378
import importlib import os from tempfile import NamedTemporaryFile from jinja2 import Environment, FileSystemLoader _TASK_TYPE_TEMPLATE_FILE = { "classification": "classification.tpl.py", "object_detection": "object_detection.tpl.py", "semantic_segmentation": "semantic_segmentation.tpl.py"...
true
true
1c408a451ce19687080e53396a1ce9bc991b7b7d
8,822
py
Python
batchgenerators/examples/brats2017/brats2017_dataloader_2D.py
ramesh152/batchgenerators
709a46a96333fd1b36205feb74059781b730b18b
[ "Apache-2.0" ]
null
null
null
batchgenerators/examples/brats2017/brats2017_dataloader_2D.py
ramesh152/batchgenerators
709a46a96333fd1b36205feb74059781b730b18b
[ "Apache-2.0" ]
null
null
null
batchgenerators/examples/brats2017/brats2017_dataloader_2D.py
ramesh152/batchgenerators
709a46a96333fd1b36205feb74059781b730b18b
[ "Apache-2.0" ]
1
2019-10-19T02:20:16.000Z
2019-10-19T02:20:16.000Z
from time import time from batchgenerators.augmentations.crop_and_pad_augmentations import crop from batchgenerators.dataloading import MultiThreadedAugmenter from batchgenerators.examples.brats2017.brats2017_dataloader_3D import get_list_of_patients, BraTS2017DataLoader3D, \ get_train_transform from batchgenerator...
51.590643
131
0.710383
from time import time from batchgenerators.augmentations.crop_and_pad_augmentations import crop from batchgenerators.dataloading import MultiThreadedAugmenter from batchgenerators.examples.brats2017.brats2017_dataloader_3D import get_list_of_patients, BraTS2017DataLoader3D, \ get_train_transform from batchgenerator...
true
true
1c408a9aee927765791ec0f8397a13865a1b4e1a
599
py
Python
jaxlib/version.py
tomhennigan/jax
fb6c9f64e49880e3c3d0ff9a2ef7345fc9bbe717
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
jaxlib/version.py
tomhennigan/jax
fb6c9f64e49880e3c3d0ff9a2ef7345fc9bbe717
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
jaxlib/version.py
tomhennigan/jax
fb6c9f64e49880e3c3d0ff9a2ef7345fc9bbe717
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright 2019 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
37.4375
74
0.75793
__version__ = "0.1.36"
true
true
1c408b947d5026f58a30e2878874e81d9390a574
20,386
py
Python
waymo_open_dataset/utils/range_image_utils.py
kprohith/waymo-open-dataset
9c519584cb95c6e2d3c909722298978668075542
[ "Apache-2.0" ]
3
2019-09-19T02:09:09.000Z
2019-10-05T11:50:47.000Z
waymo_open_dataset/utils/range_image_utils.py
kprohith/waymo-open-dataset
9c519584cb95c6e2d3c909722298978668075542
[ "Apache-2.0" ]
null
null
null
waymo_open_dataset/utils/range_image_utils.py
kprohith/waymo-open-dataset
9c519584cb95c6e2d3c909722298978668075542
[ "Apache-2.0" ]
1
2020-03-28T16:50:05.000Z
2020-03-28T16:50:05.000Z
# Copyright 2019 The Waymo Open Dataset 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...
39.128599
80
0.629304
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf __all__ = [ 'compute_range_image_polar', 'compute_range_image_cartesian', 'build_range_image_from_point_cloud', 'build_camera_depth_image', ...
true
true
1c408bf453d235e6774b1819db465cf99a3624f6
1,053
py
Python
qa/rpc-tests/reindex.py
mirzaei-ce/core-goldbit
cc957d795f7af032967943208171acee8a527441
[ "MIT" ]
null
null
null
qa/rpc-tests/reindex.py
mirzaei-ce/core-goldbit
cc957d795f7af032967943208171acee8a527441
[ "MIT" ]
null
null
null
qa/rpc-tests/reindex.py
mirzaei-ce/core-goldbit
cc957d795f7af032967943208171acee8a527441
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test -reindex with CheckBlockIndex # from test_framework.test_framework import GoldbitTestFramework f...
31.909091
102
0.698955
from test_framework.test_framework import GoldbitTestFramework from test_framework.util import * class ReindexTest(GoldbitTestFramework): def setup_chain(self): print("Initializing test directory "+self.options.tmpdir) initialize_chain_clean(self.options.tmpdir, 1) def setup_network(s...
false
true
1c408c36b6bdfcbced5d5fa89616a441e1a3f104
417
py
Python
Semester2/ShapeTester/Box.py
ConstantineLinardakis/Programming1Portfolio
9062590de87e495ecf19b759a5d7a132a6982e3b
[ "MIT" ]
1
2020-11-23T19:02:21.000Z
2020-11-23T19:02:21.000Z
Semester2/ShapeTester/Box.py
ConstantineLinardakis/Programming1Portfolio
9062590de87e495ecf19b759a5d7a132a6982e3b
[ "MIT" ]
null
null
null
Semester2/ShapeTester/Box.py
ConstantineLinardakis/Programming1Portfolio
9062590de87e495ecf19b759a5d7a132a6982e3b
[ "MIT" ]
null
null
null
class Box: l = 0 w = 0 h = 0 def __init__(self,l,w,h): self.l = l self.w = w self.h = h def calcvolume(self): l = self.l w = self.w h = self.h print("The volume equals:", str(w*l*h)) def calcsurface(self): l = self.l w ...
18.130435
68
0.441247
class Box: l = 0 w = 0 h = 0 def __init__(self,l,w,h): self.l = l self.w = w self.h = h def calcvolume(self): l = self.l w = self.w h = self.h print("The volume equals:", str(w*l*h)) def calcsurface(self): l = self.l w ...
true
true
1c408c442e1e807f5d4ecb8193daa5b1f4184032
6,167
py
Python
IO/radiation.py
storage4grid/PROFESS-PROFEV
adf4e26488225206c249938c9eecc394a06f9677
[ "Apache-2.0" ]
null
null
null
IO/radiation.py
storage4grid/PROFESS-PROFEV
adf4e26488225206c249938c9eecc394a06f9677
[ "Apache-2.0" ]
null
null
null
IO/radiation.py
storage4grid/PROFESS-PROFEV
adf4e26488225206c249938c9eecc394a06f9677
[ "Apache-2.0" ]
null
null
null
import configparser import datetime import json from math import floor, ceil import requests from IO.locationData import LocationData from utils_intern.messageLogger import MessageLogger logger = MessageLogger.get_logger_parent() # Date = Date & time (UTC) # EPV = PV power output if requested (W) # Bi = In-pl...
41.113333
118
0.574185
import configparser import datetime import json from math import floor, ceil import requests from IO.locationData import LocationData from utils_intern.messageLogger import MessageLogger logger = MessageLogger.get_logger_parent() class RadiationData: def __init__(self, date=datetime.datetime.now(), pv_...
true
true
1c408e8e8f9bc32650dab15d276e34f5c4975c7f
5,268
py
Python
sscutils/validation_functions.py
papsebestyen/sscutils
dff8b62ab31c9dfe1494264f9319e287945762bc
[ "MIT" ]
null
null
null
sscutils/validation_functions.py
papsebestyen/sscutils
dff8b62ab31c9dfe1494264f9319e287945762bc
[ "MIT" ]
21
2021-09-15T15:31:22.000Z
2022-03-20T17:10:50.000Z
sscutils/validation_functions.py
papsebestyen/sscutils
dff8b62ab31c9dfe1494264f9319e287945762bc
[ "MIT" ]
2
2021-09-08T14:12:00.000Z
2021-09-29T10:58:08.000Z
import re from functools import partial from pathlib import Path from dvc.repo import Repo from structlog import get_logger from .artifact_context import ArtifactContext from .config_loading import DataEnvSpecification, DatasetConfig, ProjectConfig from .exceptions import DatasetSetupException from .helpers import im...
29.104972
78
0.699696
import re from functools import partial from pathlib import Path from dvc.repo import Repo from structlog import get_logger from .artifact_context import ArtifactContext from .config_loading import DataEnvSpecification, DatasetConfig, ProjectConfig from .exceptions import DatasetSetupException from .helpers import im...
true
true
1c40908184a82d7860927bce9404708df87a428f
3,111
py
Python
cctbx/maptbx/resolution_from_map_and_model.py
rimmartin/cctbx_project
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
[ "BSD-3-Clause-LBNL" ]
null
null
null
cctbx/maptbx/resolution_from_map_and_model.py
rimmartin/cctbx_project
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
[ "BSD-3-Clause-LBNL" ]
null
null
null
cctbx/maptbx/resolution_from_map_and_model.py
rimmartin/cctbx_project
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
[ "BSD-3-Clause-LBNL" ]
null
null
null
from __future__ import division from cctbx.array_family import flex from cctbx import maptbx from libtbx import group_args from cctbx import miller class run_loop(object): def __init__(self, fc, f_obs, b_iso, d_mins, d_spacings, ss): result = maptbx.cc_complex_complex( f_1 = f_obs.data(), f_2 ...
33.095745
77
0.660881
from __future__ import division from cctbx.array_family import flex from cctbx import maptbx from libtbx import group_args from cctbx import miller class run_loop(object): def __init__(self, fc, f_obs, b_iso, d_mins, d_spacings, ss): result = maptbx.cc_complex_complex( f_1 = f_obs.data(), f_2 ...
false
true
1c4090dcb2015b0c5a4cc7088154f7ca9e7c6fc2
27,882
py
Python
gedl/RPCGenerator.py
gaps-closure/capo
894d2f6d291ff79e18c77e0ca7073531147cbee8
[ "BSD-3-Clause" ]
1
2021-04-20T18:43:44.000Z
2021-04-20T18:43:44.000Z
gedl/RPCGenerator.py
gaps-closure/capo
894d2f6d291ff79e18c77e0ca7073531147cbee8
[ "BSD-3-Clause" ]
1
2021-09-23T14:55:43.000Z
2021-09-23T18:09:35.000Z
gedl/RPCGenerator.py
gaps-closure/capo
894d2f6d291ff79e18c77e0ca7073531147cbee8
[ "BSD-3-Clause" ]
1
2020-05-21T03:12:16.000Z
2020-05-21T03:12:16.000Z
import json import sys import copy import os from argparse import ArgumentParser def argparser(enclaveList, enclaveMap): parser = ArgumentParser(description='CLOSURE RPC File and Wrapper Generator') parser.add_argument('-o','--odir', required=True, type=str, help='Output Directory') parser.add_argument('-g...
75.560976
238
0.551718
import json import sys import copy import os from argparse import ArgumentParser def argparser(enclaveList, enclaveMap): parser = ArgumentParser(description='CLOSURE RPC File and Wrapper Generator') parser.add_argument('-o','--odir', required=True, type=str, help='Output Directory') parser.add_argument('-g...
true
true
1c40916eb433571c4cd4fc33eb695f5113d7ecfa
9,370
py
Python
snips_nlu/dataset.py
ddorian/snips-nlu
0934d386bb138ebb34764446416856cfac664e65
[ "Apache-2.0" ]
null
null
null
snips_nlu/dataset.py
ddorian/snips-nlu
0934d386bb138ebb34764446416856cfac664e65
[ "Apache-2.0" ]
null
null
null
snips_nlu/dataset.py
ddorian/snips-nlu
0934d386bb138ebb34764446416856cfac664e65
[ "Apache-2.0" ]
null
null
null
from __future__ import division, unicode_literals import json from builtins import str from collections import Counter from copy import deepcopy from future.utils import iteritems, itervalues from snips_nlu_ontology import get_all_languages from snips_nlu.constants import (AUTOMATICALLY_EXTENSIBLE, CAPITALIZE, DATA,...
39.369748
79
0.673212
from __future__ import division, unicode_literals import json from builtins import str from collections import Counter from copy import deepcopy from future.utils import iteritems, itervalues from snips_nlu_ontology import get_all_languages from snips_nlu.constants import (AUTOMATICALLY_EXTENSIBLE, CAPITALIZE, DATA,...
true
true
1c409292ee3ecf1d4fccae874588048198c4f948
3,185
py
Python
b_stage_deployment_test/testing_infrastructure.py
ignaloidas/B.StageDeployment
951af38e675e7d469e70d3460836d1e70bc1f63b
[ "Apache-2.0" ]
null
null
null
b_stage_deployment_test/testing_infrastructure.py
ignaloidas/B.StageDeployment
951af38e675e7d469e70d3460836d1e70bc1f63b
[ "Apache-2.0" ]
null
null
null
b_stage_deployment_test/testing_infrastructure.py
ignaloidas/B.StageDeployment
951af38e675e7d469e70d3460836d1e70bc1f63b
[ "Apache-2.0" ]
1
2021-02-01T10:28:32.000Z
2021-02-01T10:28:32.000Z
from aws_cdk.aws_apigatewayv2 import CfnApi, CfnStage, CfnRoute, CfnIntegration from aws_cdk.aws_lambda import Function, Code, Runtime from aws_cdk.core import Construct from b_aws_testing_framework.tools.cdk_testing.testing_manager import TestingManager from b_aws_testing_framework.tools.cdk_testing.testing_stack impo...
36.609195
108
0.595918
from aws_cdk.aws_apigatewayv2 import CfnApi, CfnStage, CfnRoute, CfnIntegration from aws_cdk.aws_lambda import Function, Code, Runtime from aws_cdk.core import Construct from b_aws_testing_framework.tools.cdk_testing.testing_manager import TestingManager from b_aws_testing_framework.tools.cdk_testing.testing_stack impo...
true
true
1c4093d7d9b58530b9b92d6b80208734e55bb251
2,498
py
Python
CircleciScripts/framework_list.py
code-surf/aws-sdk-ios
7d2d99691419e8aaaf70911cd9c34eece79c0a02
[ "Apache-2.0" ]
null
null
null
CircleciScripts/framework_list.py
code-surf/aws-sdk-ios
7d2d99691419e8aaaf70911cd9c34eece79c0a02
[ "Apache-2.0" ]
null
null
null
CircleciScripts/framework_list.py
code-surf/aws-sdk-ios
7d2d99691419e8aaaf70911cd9c34eece79c0a02
[ "Apache-2.0" ]
null
null
null
# A list of frameworks/packages for the AWS iOS SDK. As of now, order on these # packages is important, since we don't model dependencies in code that we # consume for the release process. Packages toward the bottom of the list # depend on packages toward the top of the list. # Note that this list isn't a comprehensiv...
26.860215
83
0.618094
# consume for the release process. Packages toward the bottom of the list # depend on packages toward the top of the list. # Note that this list isn't a comprehensive list of Xcode schemas or targets grouped_frameworks = [ [ 'AWSCore', 'AWSCognitoIdentityProviderASF', ], [ ...
true
true
1c4094387a9d3f0cd170326eb874c55e90798d9e
9,919
py
Python
tests/components/modbus/test_modbus_sensor.py
jlvaillant/core
ae37f9a1d9c5067957854b3c25dcc73fe9a10bee
[ "Apache-2.0" ]
2
2019-11-20T20:56:59.000Z
2021-01-03T08:52:18.000Z
tests/components/modbus/test_modbus_sensor.py
jlvaillant/core
ae37f9a1d9c5067957854b3c25dcc73fe9a10bee
[ "Apache-2.0" ]
5
2020-04-26T10:50:01.000Z
2021-03-16T21:19:46.000Z
tests/components/modbus/test_modbus_sensor.py
winterscar/core
5a55d508791aae65f16396691d014c73fb2095f0
[ "Apache-2.0" ]
1
2021-04-18T19:36:34.000Z
2021-04-18T19:36:34.000Z
"""The tests for the Modbus sensor component.""" from datetime import timedelta from unittest import mock import pytest from homeassistant.components.modbus.const import ( CALL_TYPE_REGISTER_HOLDING, CALL_TYPE_REGISTER_INPUT, CONF_COUNT, CONF_DATA_TYPE, CONF_OFFSET, CONF_PRECISION, CONF_RE...
27.940845
92
0.654401
from datetime import timedelta from unittest import mock import pytest from homeassistant.components.modbus.const import ( CALL_TYPE_REGISTER_HOLDING, CALL_TYPE_REGISTER_INPUT, CONF_COUNT, CONF_DATA_TYPE, CONF_OFFSET, CONF_PRECISION, CONF_REGISTER, CONF_REGISTER_TYPE, CONF_REGISTER...
true
true
1c40946627caba4610fd0f0f0091de2790b9ccf1
1,018
py
Python
tests/rules/test_cp_create_destination.py
HiteshMah-Jan/thefuck
132c62262246824470934c2c6f46919ef6f00203
[ "MIT" ]
75,504
2015-04-08T18:22:19.000Z
2022-03-31T23:59:52.000Z
tests/rules/test_cp_create_destination.py
HiteshMah-Jan/thefuck
132c62262246824470934c2c6f46919ef6f00203
[ "MIT" ]
1,160
2015-04-17T18:47:12.000Z
2022-03-30T20:42:26.000Z
tests/rules/test_cp_create_destination.py
HiteshMah-Jan/thefuck
132c62262246824470934c2c6f46919ef6f00203
[ "MIT" ]
4,399
2015-04-17T18:36:04.000Z
2022-03-31T07:01:03.000Z
import pytest from thefuck.rules.cp_create_destination import match, get_new_command from thefuck.types import Command @pytest.mark.parametrize( "script, output", [("cp", "cp: directory foo does not exist\n"), ("mv", "No such file or directory")], ) def test_match(script, output): assert match(Command(scr...
32.83871
106
0.654224
import pytest from thefuck.rules.cp_create_destination import match, get_new_command from thefuck.types import Command @pytest.mark.parametrize( "script, output", [("cp", "cp: directory foo does not exist\n"), ("mv", "No such file or directory")], ) def test_match(script, output): assert match(Command(scr...
true
true
1c409472d8cb1e03d6991c52aa165e63f057563c
505
py
Python
week2/scripts/publisher2.py
manasdesai/Robotics-Automation-QSTP-2021
a51e01dd9fcbae106f618d82737e01e279ba0ff2
[ "MIT" ]
1
2021-09-19T03:34:35.000Z
2021-09-19T03:34:35.000Z
week2/scripts/publisher2.py
manasdesai/Robotics-Automation-QSTP-2021
a51e01dd9fcbae106f618d82737e01e279ba0ff2
[ "MIT" ]
null
null
null
week2/scripts/publisher2.py
manasdesai/Robotics-Automation-QSTP-2021
a51e01dd9fcbae106f618d82737e01e279ba0ff2
[ "MIT" ]
null
null
null
#!/usr/bin/env python import rospy from std_msgs.msg import String def publisher(): pub=rospy.Publisher('World',String,queue_size=10) rospy.init_node('publish2',anonymous=True) rate=rospy.Rate(10) while not rospy.is_shutdown(): pub.publish('World') publishstring='World is being pub...
25.25
53
0.649505
import rospy from std_msgs.msg import String def publisher(): pub=rospy.Publisher('World',String,queue_size=10) rospy.init_node('publish2',anonymous=True) rate=rospy.Rate(10) while not rospy.is_shutdown(): pub.publish('World') publishstring='World is being published' rospy...
true
true
1c409484510aab17d13a436173f168f6acfe19e1
889
py
Python
api/responders/grafana/__init__.py
korenlev/calipso-cvim
39278a5cf09c40b26a8a143ccc0c8d437961abc2
[ "Apache-2.0" ]
null
null
null
api/responders/grafana/__init__.py
korenlev/calipso-cvim
39278a5cf09c40b26a8a143ccc0c8d437961abc2
[ "Apache-2.0" ]
null
null
null
api/responders/grafana/__init__.py
korenlev/calipso-cvim
39278a5cf09c40b26a8a143ccc0c8d437961abc2
[ "Apache-2.0" ]
null
null
null
############################################################################### # Copyright (c) 2017-2020 Koren Lev (Cisco Systems), # # Yaron Yogev (Cisco Systems), Ilia Abashin (Cisco Systems) and others # # # ...
55.5625
79
0.460067
true
true
1c4095e149b03c67d4661ad4fca4684d6028a5e9
318
py
Python
rastervision/evaluation/api.py
carderne/raster-vision
915fbcd3263d8f2193e65c2cd0eb53e050a47a01
[ "Apache-2.0" ]
4
2019-03-11T12:38:15.000Z
2021-04-06T14:57:52.000Z
rastervision/evaluation/api.py
carderne/raster-vision
915fbcd3263d8f2193e65c2cd0eb53e050a47a01
[ "Apache-2.0" ]
null
null
null
rastervision/evaluation/api.py
carderne/raster-vision
915fbcd3263d8f2193e65c2cd0eb53e050a47a01
[ "Apache-2.0" ]
1
2021-12-02T08:07:21.000Z
2021-12-02T08:07:21.000Z
# flake8: noqa # Registry keys EVALUATOR = 'EVALUATOR' OBJECT_DETECTION_EVALUATOR = 'OBJECT_DETECTION_EVALUATOR' CHIP_CLASSIFICATION_EVALUATOR = 'CHIP_CLASSIFICATION_EVALUATOR' SEMANTIC_SEGMENTATION_EVALUATOR = 'SEMANTIC_SEGMENTATION_EVALUATOR' from rastervision.evaluation.evaluator_config import EvaluatorConfig
26.5
68
0.86478
EVALUATOR = 'EVALUATOR' OBJECT_DETECTION_EVALUATOR = 'OBJECT_DETECTION_EVALUATOR' CHIP_CLASSIFICATION_EVALUATOR = 'CHIP_CLASSIFICATION_EVALUATOR' SEMANTIC_SEGMENTATION_EVALUATOR = 'SEMANTIC_SEGMENTATION_EVALUATOR' from rastervision.evaluation.evaluator_config import EvaluatorConfig
true
true
1c40969107ea62c91965c9ee8aec48640843570c
1,251
py
Python
tests.py
MasterOdin/LogicalEquivalency
c1f4e053c4c18b8fc23a5842944bbd9ef9f37843
[ "MIT" ]
1
2018-02-02T17:11:24.000Z
2018-02-02T17:11:24.000Z
tests.py
MasterOdin/LogicalEquivalency
c1f4e053c4c18b8fc23a5842944bbd9ef9f37843
[ "MIT" ]
null
null
null
tests.py
MasterOdin/LogicalEquivalency
c1f4e053c4c18b8fc23a5842944bbd9ef9f37843
[ "MIT" ]
1
2019-01-16T21:11:52.000Z
2019-01-16T21:11:52.000Z
import copy from forseti.formula import Symbol, Or, And, Not from nose import runmodule from nose.tools import assert_equal, assert_true import util from extra_formulas import GeneralizedAnd, GeneralizedOr def test_helper(): statement = Or(Or(Symbol("B"), Symbol("C")), Symbol("A")) new_statement, change = uti...
37.909091
98
0.677058
import copy from forseti.formula import Symbol, Or, And, Not from nose import runmodule from nose.tools import assert_equal, assert_true import util from extra_formulas import GeneralizedAnd, GeneralizedOr def test_helper(): statement = Or(Or(Symbol("B"), Symbol("C")), Symbol("A")) new_statement, change = uti...
true
true
1c40979d9fa04f5d63f1a60a08cb903ed94e2d4b
1,652
py
Python
exe/load_spiketimes_subsampled.py
Priesemann-Group/historydependence
e1adc5eea8cb05cc686bfda0b979244b34d63bb4
[ "BSD-3-Clause" ]
1
2022-03-25T21:56:53.000Z
2022-03-25T21:56:53.000Z
exe/load_spiketimes_subsampled.py
Priesemann-Group/historydependence
e1adc5eea8cb05cc686bfda0b979244b34d63bb4
[ "BSD-3-Clause" ]
null
null
null
exe/load_spiketimes_subsampled.py
Priesemann-Group/historydependence
e1adc5eea8cb05cc686bfda0b979244b34d63bb4
[ "BSD-3-Clause" ]
null
null
null
from sys import stderr, exit, argv from os.path import isfile, isdir, realpath, dirname, exists import numpy as np from scipy.io import loadmat # Loading spiketimes for entorhinal cortex recording recorded_system = argv[1] run_index = int(argv[2]) rec_length = argv[3] if len(argv) > 4: data_path = argv[4] else: ...
31.169811
108
0.710048
from sys import stderr, exit, argv from os.path import isfile, isdir, realpath, dirname, exists import numpy as np from scipy.io import loadmat recorded_system = argv[1] run_index = int(argv[2]) rec_length = argv[3] if len(argv) > 4: data_path = argv[4] else: CODE_DIR = '{}/..'.format(dirname(realpath(__file...
true
true
1c4097f0c6e4c010cfebeb8ec84a06cd6e86692b
42,266
py
Python
util/genIncJS.py
ahmedmrefaat/lang
68e962ada2ab3d81398cb2651fead30205f01c20
[ "Apache-2.0" ]
null
null
null
util/genIncJS.py
ahmedmrefaat/lang
68e962ada2ab3d81398cb2651fead30205f01c20
[ "Apache-2.0" ]
null
null
null
util/genIncJS.py
ahmedmrefaat/lang
68e962ada2ab3d81398cb2651fead30205f01c20
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2017 Yoav Seginer, Theo Vosse, Gil Harari, and Uri Kolodny. # 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...
32.738962
139
0.654403
# javascript files. Changes to the run-time javascript files take affect # with but a reload of the browser, while changes to typescript files require # compiling typescript to javascript (but not cdl recompilation or # re-generation of the .html file by this ...
true
true
1c40984042dd5944e2952e5085793718543a185e
464
py
Python
setup.py
rohansurve212/Black_Friday_Data_Hack
83e536db35383b7e5266cf8370405b20aa4641b0
[ "MIT" ]
null
null
null
setup.py
rohansurve212/Black_Friday_Data_Hack
83e536db35383b7e5266cf8370405b20aa4641b0
[ "MIT" ]
null
null
null
setup.py
rohansurve212/Black_Friday_Data_Hack
83e536db35383b7e5266cf8370405b20aa4641b0
[ "MIT" ]
1
2019-11-20T20:52:32.000Z
2019-11-20T20:52:32.000Z
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='A retail company "ABC Private Limited" wants to understand the customer purchase behaviour (specifically, purchase amount) against various products of different categories. They have s...
42.181818
297
0.760776
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='A retail company "ABC Private Limited" wants to understand the customer purchase behaviour (specifically, purchase amount) against various products of different categories. They have s...
true
true
1c4098c795f2d81b7286028374fdf10586f51fe0
149
py
Python
application/rustLab/src/saySMTH.py
pianoft/subStringSearchUsingRust
722ec006d54614b61708a804ed0f658d1b64841d
[ "MIT" ]
null
null
null
application/rustLab/src/saySMTH.py
pianoft/subStringSearchUsingRust
722ec006d54614b61708a804ed0f658d1b64841d
[ "MIT" ]
null
null
null
application/rustLab/src/saySMTH.py
pianoft/subStringSearchUsingRust
722ec006d54614b61708a804ed0f658d1b64841d
[ "MIT" ]
null
null
null
import subprocess import sys def say(files): subprocess.run(['spd-say -w -r 50 -i 100 "'+files+'";'], shell=True) return say(sys.argv[1])
14.9
72
0.630872
import subprocess import sys def say(files): subprocess.run(['spd-say -w -r 50 -i 100 "'+files+'";'], shell=True) return say(sys.argv[1])
true
true
1c4098d9a3e1c3fcf7b89358aabcf4cc56825e04
417
py
Python
src/dataset/dataset_factory.py
lupvasile/keypoint-mot
e185f150e5ea5f234c06402b8ea5db30487d16cc
[ "Apache-2.0" ]
null
null
null
src/dataset/dataset_factory.py
lupvasile/keypoint-mot
e185f150e5ea5f234c06402b8ea5db30487d16cc
[ "Apache-2.0" ]
1
2020-10-06T13:17:41.000Z
2020-10-06T17:38:47.000Z
src/dataset/dataset_factory.py
lupvasile/keypoint-mot
e185f150e5ea5f234c06402b8ea5db30487d16cc
[ "Apache-2.0" ]
2
2020-09-01T05:48:25.000Z
2021-12-27T18:34:51.000Z
from config import config from dataset import generic_dataset, nuscenes_dataset DATASETS = {'nuscenes': nuscenes_dataset.NuscenesDataset} def get_dataset(dataset_name: str, subset: str, opts: generic_dataset.DatasetOptions, mini_version: bool): return DATASETS[dataset_name](subset=subset, dataset_root=config.get...
41.7
107
0.757794
from config import config from dataset import generic_dataset, nuscenes_dataset DATASETS = {'nuscenes': nuscenes_dataset.NuscenesDataset} def get_dataset(dataset_name: str, subset: str, opts: generic_dataset.DatasetOptions, mini_version: bool): return DATASETS[dataset_name](subset=subset, dataset_root=config.get...
true
true
1c40996853a1bb6f37c0af088d55832404461e76
1,232
py
Python
external/workload-automation/wa/workloads/homescreen/__init__.py
qais-yousef/lisa
8343e26bf0565589928a69ccbe67b1be03403db7
[ "Apache-2.0" ]
159
2016-01-25T11:08:39.000Z
2022-03-28T05:20:41.000Z
external/workload-automation/wa/workloads/homescreen/__init__.py
qais-yousef/lisa
8343e26bf0565589928a69ccbe67b1be03403db7
[ "Apache-2.0" ]
656
2016-01-25T11:16:56.000Z
2022-03-23T16:03:28.000Z
external/workload-automation/wa/workloads/homescreen/__init__.py
qais-yousef/lisa
8343e26bf0565589928a69ccbe67b1be03403db7
[ "Apache-2.0" ]
127
2015-03-11T16:36:17.000Z
2022-02-15T02:26:43.000Z
# Copyright 2013-2017 ARM Limited # # 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 w...
29.333333
87
0.696429
from wa import Workload, Parameter class HomeScreen(Workload): name = 'homescreen' description = """ A workload that goes to the home screen and idles for the the specified duration. """ supported_platforms = ['android'] parameters = [ Parameter('duration', kind...
true
true
1c409a06ca2bbf206d7c22c10aa1a7a8e7d67207
715
py
Python
eeggan/pytorch/modules/modify/noise.py
kahartma/eeggan
1fd5b45938ea6f1033f301430a5c7fb3b9bf4fb4
[ "BSD-3-Clause" ]
3
2020-08-04T08:54:55.000Z
2021-02-19T14:17:46.000Z
eeggan/pytorch/modules/modify/noise.py
kahartma/eeggan
1fd5b45938ea6f1033f301430a5c7fb3b9bf4fb4
[ "BSD-3-Clause" ]
2
2020-10-08T14:14:20.000Z
2021-06-11T07:08:42.000Z
eeggan/pytorch/modules/modify/noise.py
kahartma/eeggan
1fd5b45938ea6f1033f301430a5c7fb3b9bf4fb4
[ "BSD-3-Clause" ]
2
2020-07-06T11:00:36.000Z
2020-08-10T20:48:43.000Z
# Author: Kay Hartmann <kg.hartma@gmail.com> import torch from torch import nn from eeggan.pytorch.modules.module import Module from eeggan.pytorch.utils.weights import fill_weights_normal class WeightedNoise(Module): def __init__(self, n_features, n_time): super().__init__() self.weight_conv =...
28.6
68
0.667133
import torch from torch import nn from eeggan.pytorch.modules.module import Module from eeggan.pytorch.utils.weights import fill_weights_normal class WeightedNoise(Module): def __init__(self, n_features, n_time): super().__init__() self.weight_conv = nn.Conv1d(1, n_features, 1, bias=False) ...
true
true
1c409ab22a09222efa40721215f153389109b31f
2,408
py
Python
python/docs/file_handling.py
caleberi/LeetCode
fa170244648f73e76d316a6d7fc0e813adccaa82
[ "MIT" ]
1
2021-08-10T20:00:24.000Z
2021-08-10T20:00:24.000Z
python/docs/file_handling.py
caleberi/LeetCode
fa170244648f73e76d316a6d7fc0e813adccaa82
[ "MIT" ]
null
null
null
python/docs/file_handling.py
caleberi/LeetCode
fa170244648f73e76d316a6d7fc0e813adccaa82
[ "MIT" ]
3
2021-06-11T11:56:39.000Z
2021-08-10T08:50:49.000Z
import sys from random import randint import pickle _file_object = None def count_file_lines(path): file = open("input.txt","r") count = 0 # while file.readline()!='': # count+=1 #OR for line in file: count+=1 file.close(); return count def set_stdout(path,mode): ...
21.122807
65
0.656977
import sys from random import randint import pickle _file_object = None def count_file_lines(path): file = open("input.txt","r") count = 0 for line in file: count+=1 file.close(); return count def set_stdout(path,mode): global _file_object _file_object = open(...
true
true
1c409ad508c1eae122b7a06a9bacbc2b829b4b63
1,283
py
Python
homework/hw07/editor/primitives.py
zltshadow/CS61A-2019-summer
0f5dd0be5f51927364aec1bc974526837328b695
[ "MIT" ]
3
2021-11-21T06:09:39.000Z
2022-03-12T08:05:27.000Z
project/pro4-scheme/editor/primitives.py
zltshadow/CS61A-2019-summer
0f5dd0be5f51927364aec1bc974526837328b695
[ "MIT" ]
null
null
null
project/pro4-scheme/editor/primitives.py
zltshadow/CS61A-2019-summer
0f5dd0be5f51927364aec1bc974526837328b695
[ "MIT" ]
null
null
null
from typing import List from helper import verify_exact_callable_length from log import Holder from datamodel import Expression from evaluate_apply import Frame, evaluate_all, Applicable class BuiltIn(Applicable): def execute(self, operands: List[Expression], frame: Frame, gui_holder: Holder, eval_operands=True...
32.075
118
0.718628
from typing import List from helper import verify_exact_callable_length from log import Holder from datamodel import Expression from evaluate_apply import Frame, evaluate_all, Applicable class BuiltIn(Applicable): def execute(self, operands: List[Expression], frame: Frame, gui_holder: Holder, eval_operands=True...
true
true
1c409b1d5977d47078785e85a8ed5dcc6bda98ef
17,700
py
Python
azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/local_network_gateways_operations.py
v-Ajnava/azure-sdk-for-python
a1f6f80eb5869c5b710e8bfb66146546697e2a6f
[ "MIT" ]
4
2016-06-17T23:25:29.000Z
2022-03-30T22:37:45.000Z
azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/local_network_gateways_operations.py
v-Ajnava/azure-sdk-for-python
a1f6f80eb5869c5b710e8bfb66146546697e2a6f
[ "MIT" ]
2
2016-09-30T21:40:24.000Z
2017-11-10T18:16:18.000Z
azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/local_network_gateways_operations.py
v-Ajnava/azure-sdk-for-python
a1f6f80eb5869c5b710e8bfb66146546697e2a6f
[ "MIT" ]
3
2016-05-03T20:49:46.000Z
2017-10-05T21:05:27.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
45.153061
157
0.669096
import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from msrest.exceptions import DeserializationError from msrestazure.azure_operation import AzureOperationPoller from .. import models class LocalNetworkGatewaysOperations(object): models = mo...
true
true
1c409d645821398acbf2c2725c69932ce4d91f2b
5,431
py
Python
data/external/repositories_2to3/137656/blundercheck-master/combine/contest_20150303a/modeling/fit_errorchunk_models.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
null
null
null
data/external/repositories_2to3/137656/blundercheck-master/combine/contest_20150303a/modeling/fit_errorchunk_models.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
null
null
null
data/external/repositories_2to3/137656/blundercheck-master/combine/contest_20150303a/modeling/fit_errorchunk_models.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
1
2019-12-04T08:23:33.000Z
2019-12-04T08:23:33.000Z
#!/usr/bin/env python import os, code import pickle as pickle from djeval import * import numpy as np from pandas import read_pickle, cut, concat, Series, get_dummies from sklearn.ensemble import GradientBoostingClassifier, RandomForestClassifier, ExtraTreesClassifier from sklearn.cross_validation import Strat...
42.100775
226
0.669674
import os, code import pickle as pickle from djeval import * import numpy as np from pandas import read_pickle, cut, concat, Series, get_dummies from sklearn.ensemble import GradientBoostingClassifier, RandomForestClassifier, ExtraTreesClassifier from sklearn.cross_validation import StratifiedKFold, cross_val_...
true
true
1c409e3d1e5473d1df3c2d6d1260a8eddbe059ab
30,300
py
Python
framework/JobHandler.py
bonifak/raven
666978e8546d1f948b2ad55a4c3b0fce5cc8533c
[ "Apache-2.0" ]
null
null
null
framework/JobHandler.py
bonifak/raven
666978e8546d1f948b2ad55a4c3b0fce5cc8533c
[ "Apache-2.0" ]
null
null
null
framework/JobHandler.py
bonifak/raven
666978e8546d1f948b2ad55a4c3b0fce5cc8533c
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Battelle Energy Alliance, 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 agreed t...
41.678129
226
0.651518
from __future__ import division, print_function, unicode_literals, absolute_import import warnings warnings.simplefilter('default',DeprecationWarning) import time import collections import subprocess import os import copy import sys import abc import threading import random import socket from utils...
true
true
1c409e9156c0eb16b725cac2a4f067e9d329c65f
2,047
py
Python
chia/server/start_full_node.py
ForestCrazy/chia-blockchain-remote-plot
0ba838b7a8ea2b5410d438ac70295df699a30dae
[ "Apache-2.0" ]
11,902
2019-12-05T00:14:29.000Z
2022-03-31T23:25:37.000Z
chia/server/start_full_node.py
ForestCrazy/chia-blockchain-remote-plot
0ba838b7a8ea2b5410d438ac70295df699a30dae
[ "Apache-2.0" ]
5,246
2019-12-05T04:00:03.000Z
2022-03-31T21:33:30.000Z
chia/server/start_full_node.py
Devh4ox4d/silishitcoin
4372d06aa4a54220f2bde29c8081410503679a82
[ "Apache-2.0" ]
2,149
2019-12-05T11:12:53.000Z
2022-03-31T06:08:34.000Z
import logging import pathlib from multiprocessing import freeze_support from typing import Dict from chia.consensus.constants import ConsensusConstants from chia.consensus.default_constants import DEFAULT_CONSTANTS from chia.full_node.full_node import FullNode from chia.full_node.full_node_api import FullNodeAPI from...
31.015152
87
0.741085
import logging import pathlib from multiprocessing import freeze_support from typing import Dict from chia.consensus.constants import ConsensusConstants from chia.consensus.default_constants import DEFAULT_CONSTANTS from chia.full_node.full_node import FullNode from chia.full_node.full_node_api import FullNodeAPI from...
true
true
1c409eb65c6a92e583e1f42208d95c66824f1c7f
449
py
Python
env/Lib/site-packages/plotly/validators/scattergl/marker/colorbar/title/_text.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
11,750
2015-10-12T07:03:39.000Z
2022-03-31T20:43:15.000Z
venv/Lib/site-packages/plotly/validators/scattergl/marker/colorbar/title/_text.py
wakisalvador/constructed-misdirection
74779e9ec640a11bc08d5d1967c85ac4fa44ea5e
[ "Unlicense" ]
2,951
2015-10-12T00:41:25.000Z
2022-03-31T22:19:26.000Z
venv/Lib/site-packages/plotly/validators/scattergl/marker/colorbar/title/_text.py
wakisalvador/constructed-misdirection
74779e9ec640a11bc08d5d1967c85ac4fa44ea5e
[ "Unlicense" ]
2,623
2015-10-15T14:40:27.000Z
2022-03-28T16:05:50.000Z
import _plotly_utils.basevalidators class TextValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="text", parent_name="scattergl.marker.colorbar.title", **kwargs ): super(TextValidator, self).__init__( plotly_name=plotly_...
26.411765
66
0.621381
import _plotly_utils.basevalidators class TextValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="text", parent_name="scattergl.marker.colorbar.title", **kwargs ): super(TextValidator, self).__init__( plotly_name=plotly_...
true
true
1c409f00899ab1c7539a27e717468362b2df8d14
2,500
py
Python
demos/person_detect.py
altest-com/dnfal
d1fb15508c5583aeaa0957fcc3e37634d36bf237
[ "MIT" ]
null
null
null
demos/person_detect.py
altest-com/dnfal
d1fb15508c5583aeaa0957fcc3e37634d36bf237
[ "MIT" ]
1
2020-03-31T17:04:09.000Z
2020-03-31T17:04:09.000Z
demos/person_detect.py
altest-com/dnfal
d1fb15508c5583aeaa0957fcc3e37634d36bf237
[ "MIT" ]
null
null
null
import argparse import sys from os import path from time import time import cv2 as cv from cvtlib.drawing import Drawer from cvtlib.image import resize from utils import list_images, DEMOS_DIR, MODELS_DIR from dnfal.persons import BodyDetector from dnfal.loggers import logger, config_logger def run(image_path: str,...
26.041667
79
0.6248
import argparse import sys from os import path from time import time import cv2 as cv from cvtlib.drawing import Drawer from cvtlib.image import resize from utils import list_images, DEMOS_DIR, MODELS_DIR from dnfal.persons import BodyDetector from dnfal.loggers import logger, config_logger def run(image_path: str,...
true
true
1c409f237c768935f49616c6f9bf5539055aaee2
19,269
py
Python
datasets/siam_rpn_dataset.py
ywang-37/EnhancedSiamShipTracking
0b25cf02b6088268a6c374cb20a7f0355bc65b2e
[ "Apache-2.0" ]
3
2022-03-03T09:14:50.000Z
2022-03-28T13:46:29.000Z
datasets/siam_rpn_dataset.py
ywang-37/EnhancedSiamShipTracking
0b25cf02b6088268a6c374cb20a7f0355bc65b2e
[ "Apache-2.0" ]
null
null
null
datasets/siam_rpn_dataset.py
ywang-37/EnhancedSiamShipTracking
0b25cf02b6088268a6c374cb20a7f0355bc65b2e
[ "Apache-2.0" ]
null
null
null
from __future__ import division from torch.utils.data import Dataset import numpy as np import json import random import logging from os.path import join from utils.bbox_helper import * from utils.anchors import Anchors import math import sys pyv = sys.version[0] import cv2 if pyv[0] == '3': cv2.ocl.setUseOpenCL(Fa...
33.165232
117
0.539104
from __future__ import division from torch.utils.data import Dataset import numpy as np import json import random import logging from os.path import join from utils.bbox_helper import * from utils.anchors import Anchors import math import sys pyv = sys.version[0] import cv2 if pyv[0] == '3': cv2.ocl.setUseOpenCL(Fa...
true
true
1c409f3486947fc3583859ea467e7541e363dce0
1,873
py
Python
classifier.py
adithyasunil26/LID-Excitation-Features
ae15e3f24016723ddbb832421746d2c0ef64fd03
[ "MIT" ]
null
null
null
classifier.py
adithyasunil26/LID-Excitation-Features
ae15e3f24016723ddbb832421746d2c0ef64fd03
[ "MIT" ]
null
null
null
classifier.py
adithyasunil26/LID-Excitation-Features
ae15e3f24016723ddbb832421746d2c0ef64fd03
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd from sklearn.model_selection import train_test_split from sklearn.tree import DecisionTreeClassifier from sklearn.ensemble import RandomForestClassifier from sklearn import preprocessing from sklearn.metrics import classification_report print("Loading data...") df=pd.read_csv('ge...
40.717391
118
0.744794
import numpy as np import pandas as pd from sklearn.model_selection import train_test_split from sklearn.tree import DecisionTreeClassifier from sklearn.ensemble import RandomForestClassifier from sklearn import preprocessing from sklearn.metrics import classification_report print("Loading data...") df=pd.read_csv('ge...
true
true
1c40a0eadbf9d3c24d1cbe180d9dda2ca9e5488c
249
py
Python
molmodmt/lib/__init__.py
LMMV/MolModMT
5725d6d5627b07edcbbd5e55318345a136b28c35
[ "MIT" ]
null
null
null
molmodmt/lib/__init__.py
LMMV/MolModMT
5725d6d5627b07edcbbd5e55318345a136b28c35
[ "MIT" ]
null
null
null
molmodmt/lib/__init__.py
LMMV/MolModMT
5725d6d5627b07edcbbd5e55318345a136b28c35
[ "MIT" ]
null
null
null
from .libbox import module_box as box from .libgeometry import module_geometry as geometry from .libmath import module_math as math from .libcom import module_com as com from .libpbc import module_pbc as pbc from .librmsd import module_rmsd as rmsd
35.571429
52
0.831325
from .libbox import module_box as box from .libgeometry import module_geometry as geometry from .libmath import module_math as math from .libcom import module_com as com from .libpbc import module_pbc as pbc from .librmsd import module_rmsd as rmsd
true
true
1c40a12cbe2a34082679b984edcde861e85f515c
2,167
py
Python
clinicadl/train/tasks/reconstruction_cli.py
sophieloiz/clinicadl
d26a1c6ce4f6da9de59e3d15c27ae3be2d33bc9d
[ "MIT" ]
null
null
null
clinicadl/train/tasks/reconstruction_cli.py
sophieloiz/clinicadl
d26a1c6ce4f6da9de59e3d15c27ae3be2d33bc9d
[ "MIT" ]
null
null
null
clinicadl/train/tasks/reconstruction_cli.py
sophieloiz/clinicadl
d26a1c6ce4f6da9de59e3d15c27ae3be2d33bc9d
[ "MIT" ]
null
null
null
import click from .. import train_option from .task_utils import task_launcher @click.command(name="reconstruction", no_args_is_help=True) # Mandatory arguments @train_option.caps_directory @train_option.preprocessing_json @train_option.tsv_directory @train_option.output_maps # Options @train_option.config_file # Co...
30.521127
101
0.820951
import click from .. import train_option from .task_utils import task_launcher @click.command(name="reconstruction", no_args_is_help=True) @train_option.caps_directory @train_option.preprocessing_json @train_option.tsv_directory @train_option.output_maps @train_option.config_file @train_option.gpu @train_option.n...
true
true
1c40a1338382a36ef22891301005bcea31b2b08f
644
py
Python
src/apis/text/text/similarities/all-MiniLM-L6-v2/all-MiniLM-L6-v2.py
theunifai/unifai-apis-core
1f2a9051c1e3df1bd19a96f22e4a07767ef3973a
[ "MIT" ]
2
2021-11-09T07:18:06.000Z
2022-01-04T19:37:17.000Z
src/apis/text/text/similarities/all-MiniLM-L6-v2/all-MiniLM-L6-v2.py
theunifai/unifai-apis-core
1f2a9051c1e3df1bd19a96f22e4a07767ef3973a
[ "MIT" ]
4
2021-11-04T08:28:59.000Z
2021-11-07T05:59:59.000Z
src/apis/text/text/similarities/all-MiniLM-L6-v2/all-MiniLM-L6-v2.py
theunifai/unifai-apis-core
1f2a9051c1e3df1bd19a96f22e4a07767ef3973a
[ "MIT" ]
1
2022-01-07T09:12:22.000Z
2022-01-07T09:12:22.000Z
def predict(sentence_1: str, sentence_2: str) -> str: """ For two given sentences, say whether they are similar or not. :param sentence_1: first sentence to compare :param sentence_2: second sentence to compare :return: similarity score (between 0 and 1) """ from sentence_transformers imp...
30.666667
65
0.728261
def predict(sentence_1: str, sentence_2: str) -> str: from sentence_transformers import SentenceTransformer, util model = SentenceTransformer('all-MiniLM-L6-v2') embedding1 = model.encode(sentence_1, convert_to_tensor=True) embedding2 = model.encode(sentence_2, convert_to_tensor=True) cosin...
true
true
1c40a179b5c9b26cca7c57dde90dfa09fa7626b7
13,221
py
Python
newsletter/tests/test_admin.py
vikrantsingh-vs53/Final-Senior-Year-Project-
94f2786956ebaad08711701ef03071d1051e368c
[ "MIT" ]
68
2019-05-02T06:54:59.000Z
2022-03-08T07:54:06.000Z
newsletter/tests/test_admin.py
arjunkr123/Final-Senior-Year-Project-
12b65915dbd9bf5a4a2ae7e3c56c7eaedcb8646b
[ "MIT" ]
4
2019-12-26T16:41:30.000Z
2022-01-18T22:02:03.000Z
newsletter/tests/test_admin.py
arjunkr123/Final-Senior-Year-Project-
12b65915dbd9bf5a4a2ae7e3c56c7eaedcb8646b
[ "MIT" ]
40
2019-03-08T20:21:05.000Z
2022-03-15T03:48:46.000Z
import os from django.contrib.auth import get_user_model from django.contrib.auth.models import Permission from django.core.urlresolvers import reverse from django.test import TestCase from django.test.utils import patch_logger from newsletter import admin # Triggers model admin registration from newsletter.admin_ut...
35.540323
110
0.625596
import os from django.contrib.auth import get_user_model from django.contrib.auth.models import Permission from django.core.urlresolvers import reverse from django.test import TestCase from django.test.utils import patch_logger from newsletter import admin from newsletter.admin_utils import make_subscription from n...
true
true
1c40a1b821d8871c7412044d06a39c3001541806
7,979
py
Python
azure/train_landcover.py
mjevans26/Satellite_ComputerVision
013c69c5cf6f86126e6ad2d715f8b13b300e29a8
[ "BSD-2-Clause" ]
10
2020-04-06T04:51:27.000Z
2022-02-23T16:00:43.000Z
azure/train_landcover.py
mjevans26/Satellite_ComputerVision
013c69c5cf6f86126e6ad2d715f8b13b300e29a8
[ "BSD-2-Clause" ]
2
2020-04-06T06:25:35.000Z
2021-03-22T21:55:41.000Z
azure/train_landcover.py
mjevans26/Satellite_ComputerVision
013c69c5cf6f86126e6ad2d715f8b13b300e29a8
[ "BSD-2-Clause" ]
5
2020-04-18T16:44:44.000Z
2021-08-31T00:10:08.000Z
# -*- coding: utf-8 -*- """ Created on Tue Sep 21 12:13:11 2021 @author: MEvans """ from utils import model_tools, processing from utils.prediction_tools import makePredDataset, callback_predictions, plot_to_image from matplotlib import pyplot as plt import argparse import os import glob import json import math impor...
37.995238
404
0.691816
from utils import model_tools, processing from utils.prediction_tools import makePredDataset, callback_predictions, plot_to_image from matplotlib import pyplot as plt import argparse import os import glob import json import math import tensorflow as tf from datetime import datetime from azureml.core import Run, Works...
true
true
1c40a1ea96587cb8301d06fdf671f5dd84c4a694
2,219
py
Python
config/_base_/models/retinanet_mydartsnet_fpn.py
automlresearch/autodetector
e959baf589fb329509cd25edcab11c7d22ea5e7e
[ "Apache-2.0" ]
null
null
null
config/_base_/models/retinanet_mydartsnet_fpn.py
automlresearch/autodetector
e959baf589fb329509cd25edcab11c7d22ea5e7e
[ "Apache-2.0" ]
null
null
null
config/_base_/models/retinanet_mydartsnet_fpn.py
automlresearch/autodetector
e959baf589fb329509cd25edcab11c7d22ea5e7e
[ "Apache-2.0" ]
1
2021-12-08T08:28:16.000Z
2021-12-08T08:28:16.000Z
# model settings model = dict( type='RetinaNet', # pretrained='torchvision://resnet50', # backbone=dict( # type='ResNet', # depth=50, # num_stages=4, # out_indices=(0, 1, 2, 3), # frozen_stages=1, # norm_cfg=dict(type='BN', requires_grad=True), # norm_...
29.986486
124
0.566021
model = dict( type='RetinaNet', pretrained="/home/p/Documents/experiment/experiment/Classification/PC-DARTS/pretained/0608_selected/model_best.pth.tar", backbone=dict( type='MyNetworkImageNet_FPN', C=48, n...
true
true
1c40a20e9676da219f65a2279c95dfe0c266c1d7
1,009
py
Python
FaceRecog/LiveFaceJudge.py
lnblanke/DL
4d2631e27a1a5c6de1f7239c2979af63c4019e34
[ "MIT" ]
null
null
null
FaceRecog/LiveFaceJudge.py
lnblanke/DL
4d2631e27a1a5c6de1f7239c2979af63c4019e34
[ "MIT" ]
null
null
null
FaceRecog/LiveFaceJudge.py
lnblanke/DL
4d2631e27a1a5c6de1f7239c2979af63c4019e34
[ "MIT" ]
null
null
null
# Judge whether the face in the camera is the person in the dataset # @Time: 8/17/2020 # @Author: lnblanke # @Email: fjh314.84@gmail.com # @File: LiveFaceJudge.py import cv2, dlib, numpy, time detector = dlib.get_frontal_face_detector() predictor = dlib.shape_predictor("shape_predictor_68_face_landmarks.dat") model =...
22.422222
83
0.704658
import cv2, dlib, numpy, time detector = dlib.get_frontal_face_detector() predictor = dlib.shape_predictor("shape_predictor_68_face_landmarks.dat") model = dlib.face_recognition_model_v1("dlib_face_recognition_resnet_model_v1.dat") global desp pic = cv2.imread("Dataset/obama.jpg") faces = detector(pic, 1) for...
true
true
1c40a2125b76ad4cc2545126d2abffb8b1786211
9,525
py
Python
Time_Series/mainTestOfTSModels.py
ZGChung/P2E_FreqPred
79544e9547a94b0d492d14af43ccf271cb175c47
[ "MIT" ]
2
2021-06-12T10:29:44.000Z
2022-01-01T13:01:34.000Z
Time_Series/mainTestOfTSModels.py
ZGChung/P2E_FreqPred
79544e9547a94b0d492d14af43ccf271cb175c47
[ "MIT" ]
null
null
null
Time_Series/mainTestOfTSModels.py
ZGChung/P2E_FreqPred
79544e9547a94b0d492d14af43ccf271cb175c47
[ "MIT" ]
null
null
null
from warnings import simplefilter import warnings from statsmodels.tools.sm_exceptions import ConvergenceWarning import pandas as pd import numpy as np from datetime import datetime import matplotlib.pyplot as plt import matplotlib.image as mpimg import time import sklearn as sk import sklearn.metrics as metrics from s...
35.943396
118
0.758215
from warnings import simplefilter import warnings from statsmodels.tools.sm_exceptions import ConvergenceWarning import pandas as pd import numpy as np from datetime import datetime import matplotlib.pyplot as plt import matplotlib.image as mpimg import time import sklearn as sk import sklearn.metrics as metrics from s...
true
true
1c40a23989ae80e4473f4505e19980540d22119f
621
py
Python
samples/websocket/web/app.py
Algorab/examples
c89c24876ac329ebdf2caef578a283a1249546bc
[ "Apache-2.0" ]
17
2018-08-16T09:55:03.000Z
2021-03-29T00:49:39.000Z
samples/websocket/web/app.py
Algorab/examples
c89c24876ac329ebdf2caef578a283a1249546bc
[ "Apache-2.0" ]
14
2018-09-18T10:52:10.000Z
2021-12-09T22:38:09.000Z
samples/websocket/web/app.py
Algorab/examples
c89c24876ac329ebdf2caef578a283a1249546bc
[ "Apache-2.0" ]
17
2020-09-21T07:40:08.000Z
2022-03-25T16:36:59.000Z
import os.path import logging from flask import request def root_dir(): # pragma: no cover return os.path.abspath(os.path.dirname(__file__)) def get_file(filename): # pragma: no cover try: src = os.path.join(root_dir(), filename) # Figure out how flask returns static files # Tried: ...
25.875
61
0.639291
import os.path import logging from flask import request def root_dir(): return os.path.abspath(os.path.dirname(__file__)) def get_file(filename): try: src = os.path.join(root_dir(), filename) return open(src).read() except IOError as exc: ...
true
true
1c40a30f099c634f5772a9978641a432fdc3189e
6,661
py
Python
networkx_mod/generators/tests/test_threshold.py
movingpictures83/MATria
d3dbd0d15e00dbc26db39ace0663868180fdc471
[ "BSD-3-Clause", "MIT" ]
null
null
null
networkx_mod/generators/tests/test_threshold.py
movingpictures83/MATria
d3dbd0d15e00dbc26db39ace0663868180fdc471
[ "BSD-3-Clause", "MIT" ]
null
null
null
networkx_mod/generators/tests/test_threshold.py
movingpictures83/MATria
d3dbd0d15e00dbc26db39ace0663868180fdc471
[ "BSD-3-Clause", "MIT" ]
null
null
null
#!/usr/bin/env python """Threshold Graphs ================ """ from nose.tools import * from nose import SkipTest from nose.plugins.attrib import attr import networkx_mod as nx import networkx_mod.generators.threshold as nxt from networkx_mod.algorithms.isomorphism.isomorph import graph_could_be_isomorphic cnlti = n...
36.005405
82
0.607717
from nose.tools import * from nose import SkipTest from nose.plugins.attrib import attr import networkx_mod as nx import networkx_mod.generators.threshold as nxt from networkx_mod.algorithms.isomorphism.isomorph import graph_could_be_isomorphic cnlti = nx.convert_node_labels_to_integers class TestGeneratorThresho...
true
true
1c40a31df74207678516ba146b07306ed68ed2cb
10,511
py
Python
tx/tx_builder/bitcoin_v3_cpfp/merch_close_with_cpfp.py
fakecoinbase/boltlabs-incslashlibzkchannels
c0b43790c637f4ffd2956193b16f9ddcea94a3a4
[ "MIT" ]
68
2020-01-18T22:07:57.000Z
2022-02-03T02:30:55.000Z
tx/tx_builder/bitcoin_v3_cpfp/merch_close_with_cpfp.py
fakecoinbase/boltlabs-incslashlibzkchannels
c0b43790c637f4ffd2956193b16f9ddcea94a3a4
[ "MIT" ]
2
2020-04-29T02:02:49.000Z
2021-04-08T11:23:48.000Z
tx/tx_builder/bitcoin_v3_cpfp/merch_close_with_cpfp.py
fakecoinbase/boltlabs-incslashlibzkchannels
c0b43790c637f4ffd2956193b16f9ddcea94a3a4
[ "MIT" ]
3
2021-04-04T05:04:16.000Z
2022-01-26T10:14:46.000Z
# Based on tutorial from: # https://github.com/zeltsi/segwit_tutorial/tree/master/transactions import argparse import hashlib import ecdsa import sys def dSHA256(data): hash_1 = hashlib.sha256(data).digest() hash_2 = hashlib.sha256(hash_1).digest() return hash_2 def hash160(s): '''sha256 followed by ...
33.368254
122
0.694035
import argparse import hashlib import ecdsa import sys def dSHA256(data): hash_1 = hashlib.sha256(data).digest() hash_2 = hashlib.sha256(hash_1).digest() return hash_2 def hash160(s): return hashlib.new('ripemd160', hashlib.sha256(s).digest()).digest() def privkey_to_pubkey(privkey): signing_k...
true
true
1c40a342679a1eaa8322cfbd8ecbc8309bb09213
390
py
Python
openstack_dashboard/enabled/_1720_project_databases_panel.py
xinwu/horizon
0e984a2c75d253dd35ab92e7926021b82d730b26
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/enabled/_1720_project_databases_panel.py
xinwu/horizon
0e984a2c75d253dd35ab92e7926021b82d730b26
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/enabled/_1720_project_databases_panel.py
xinwu/horizon
0e984a2c75d253dd35ab92e7926021b82d730b26
[ "Apache-2.0" ]
null
null
null
# The slug of the panel to be added to HORIZON_CONFIG. Required. PANEL = 'databases' # The slug of the dashboard the PANEL associated with. Required. PANEL_DASHBOARD = 'project' # The slug of the panel group the PANEL is associated with. PANEL_GROUP = 'database' # Python panel class of the PANEL to be added. ADD_PANEL...
39
78
0.782051
PANEL = 'databases' PANEL_DASHBOARD = 'project' PANEL_GROUP = 'database' ADD_PANEL = 'openstack_dashboard.dashboards.project.databases.panel.Databases'
true
true
1c40a48e830b627ca1d05cdbf1fc61968e871c4a
22,637
py
Python
tensorflow/python/keras/distribute/keras_correctness_test_base.py
leike666666/tensorflow
a3fd0ddfcb716be124e95b51e96e6c1e4507ef64
[ "Apache-2.0" ]
12
2020-12-28T18:42:10.000Z
2022-03-24T17:34:21.000Z
tensorflow/python/keras/distribute/keras_correctness_test_base.py
leike666666/tensorflow
a3fd0ddfcb716be124e95b51e96e6c1e4507ef64
[ "Apache-2.0" ]
2
2021-08-25T15:58:11.000Z
2022-02-10T01:47:24.000Z
tensorflow/python/keras/distribute/keras_correctness_test_base.py
leike666666/tensorflow
a3fd0ddfcb716be124e95b51e96e6c1e4507ef64
[ "Apache-2.0" ]
3
2020-03-09T19:17:02.000Z
2020-06-26T23:14:31.000Z
# Copyright 2018 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...
35.481191
105
0.688342
from __future__ import absolute_import from __future__ import division from __future__ import print_function import functools from absl.testing import parameterized import numpy as np import six from tensorflow.python import keras from tensorflow.python.data.ops import dataset_ops from tensorflow.python...
true
true
1c40a6eb8a3fb152356c57421c00424f19f98a0a
8,302
py
Python
gym-link/gym_link/envs/link_env.py
ivukotic/rl_examples
b6ca1a01429934cc936baa94753b3e08677e0fae
[ "MIT" ]
null
null
null
gym-link/gym_link/envs/link_env.py
ivukotic/rl_examples
b6ca1a01429934cc936baa94753b3e08677e0fae
[ "MIT" ]
null
null
null
gym-link/gym_link/envs/link_env.py
ivukotic/rl_examples
b6ca1a01429934cc936baa94753b3e08677e0fae
[ "MIT" ]
null
null
null
""" One network link environment. Link has changing base load. Actions: start 0 to 4 more transfers Reward: percentage of free rate used. Gets negative if link fully saturated Files sizes are normally distributed (absolute values). """ import math from collections import deque import gym from gym import error, spaces...
38.258065
114
0.593471
import math from collections import deque import gym from gym import error, spaces, utils from gym.utils import seeding from gym.envs.classic_control import rendering import numpy as np class LinkEnv(gym.Env): metadata = { 'render.modes': ['human', 'rgb_array'], 'video.frames_per_second': 50 ...
true
true
1c40a712b217d3224d9cbc01756f60232fa675ad
691
py
Python
web/news/migrations/0001_initial.py
NeumannSven/pyshb_web
e4df67dd2550fc8dccf84f26c28894eb86ffc31f
[ "MIT" ]
null
null
null
web/news/migrations/0001_initial.py
NeumannSven/pyshb_web
e4df67dd2550fc8dccf84f26c28894eb86ffc31f
[ "MIT" ]
null
null
null
web/news/migrations/0001_initial.py
NeumannSven/pyshb_web
e4df67dd2550fc8dccf84f26c28894eb86ffc31f
[ "MIT" ]
null
null
null
# Generated by Django 4.0.3 on 2022-03-15 19:28 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='news', fields=[ ('newsid', models.IntegerFi...
26.576923
102
0.54848
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='news', fields=[ ('newsid', models.IntegerField(auto_created=True, primary_key=True, serial...
true
true
1c40a7fc94e37aa860e57e22b861ba268c37050c
1,392
py
Python
Python Fundamentals/P2M5MatthewLane.py
mlane52/pythonteachingcode
46f007a94dfc6afcc22b41952f9c486d5c4c145e
[ "MIT" ]
null
null
null
Python Fundamentals/P2M5MatthewLane.py
mlane52/pythonteachingcode
46f007a94dfc6afcc22b41952f9c486d5c4c145e
[ "MIT" ]
null
null
null
Python Fundamentals/P2M5MatthewLane.py
mlane52/pythonteachingcode
46f007a94dfc6afcc22b41952f9c486d5c4c145e
[ "MIT" ]
null
null
null
#MatthewLaneP2M5Final import os os.system ("curl https://raw.githubusercontent.com/MicrosoftLearning/intropython/master/elements1_20.txt -o ""elements1_20.txt") def get_names() : while True : if(len(ele_list) < 5): ele_input = input("Enter the name of an element: ").strip().lower() ...
29.617021
129
0.635776
import os os.system ("curl https://raw.githubusercontent.com/MicrosoftLearning/intropython/master/elements1_20.txt -o ""elements1_20.txt") def get_names() : while True : if(len(ele_list) < 5): ele_input = input("Enter the name of an element: ").strip().lower() if not ele_input :...
true
true
1c40a8057efc4770ba41bb544ae07945fc992d08
203
py
Python
penerimaan_biji/penerimaan_biji/doctype/id_alat/test_id_alat.py
bobzz-zone/Biji
02bf9001c7bd505041de57c4b952733421b80815
[ "MIT" ]
null
null
null
penerimaan_biji/penerimaan_biji/doctype/id_alat/test_id_alat.py
bobzz-zone/Biji
02bf9001c7bd505041de57c4b952733421b80815
[ "MIT" ]
null
null
null
penerimaan_biji/penerimaan_biji/doctype/id_alat/test_id_alat.py
bobzz-zone/Biji
02bf9001c7bd505041de57c4b952733421b80815
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2018, PT DAS and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest class TestIDAlat(unittest.TestCase): pass
18.454545
45
0.758621
from __future__ import unicode_literals import frappe import unittest class TestIDAlat(unittest.TestCase): pass
true
true
1c40a8a592ca0b34897e5b34e6106314ee52f7fb
3,039
py
Python
6.006 Introduction to Algorithms MIT OCW/Lecture Notes/lec06_code/avl.py
SiyuIsaacParkerTian/self_learning
662b27c60cbfad94d80bd40f46e9f2d0f4270826
[ "MIT" ]
2
2020-02-09T18:06:02.000Z
2020-04-19T07:30:58.000Z
6.006 Introduction to Algorithms MIT OCW/Lecture Notes/lec06_code/avl.py
SiyuIsaacParkerTian/self_learning
662b27c60cbfad94d80bd40f46e9f2d0f4270826
[ "MIT" ]
null
null
null
6.006 Introduction to Algorithms MIT OCW/Lecture Notes/lec06_code/avl.py
SiyuIsaacParkerTian/self_learning
662b27c60cbfad94d80bd40f46e9f2d0f4270826
[ "MIT" ]
null
null
null
#!/usr/bin/env python import bst def height(node): if node is None: return -1 else: return node.height def update_height(node): node.height = max(height(node.left), height(node.right)) + 1 class AVL(bst.BST): """ AVL binary search tree implementation. Supports insert, delete, find, f...
29.504854
75
0.529121
import bst def height(node): if node is None: return -1 else: return node.height def update_height(node): node.height = max(height(node.left), height(node.right)) + 1 class AVL(bst.BST): def left_rotate(self, x): y = x.right y.parent = x.parent if y.parent is...
true
true
1c40a9449567adf10ec4b9ff383c65fec24d5def
326
py
Python
bioluigi/tasks/samtools.py
PavlidisLab/luigi-biotasks
fec1c247752278518b2906a2ce968477349fee45
[ "Apache-2.0" ]
5
2019-11-14T18:41:46.000Z
2020-03-21T17:56:32.000Z
bioluigi/tasks/samtools.py
PavlidisLab/luigi-biotasks
fec1c247752278518b2906a2ce968477349fee45
[ "Apache-2.0" ]
8
2019-11-13T21:40:32.000Z
2022-03-04T20:31:37.000Z
bioluigi/tasks/samtools.py
PavlidisLab/luigi-biotasks
fec1c247752278518b2906a2ce968477349fee45
[ "Apache-2.0" ]
null
null
null
import luigi from luigi.contrib.external_program import ExternalProgramTask import os class IndexBam(ExternalProgramTask): bam_file = luigi.Parameter() def program_args(self): return ['samtools', 'index', self.bam_file] def output(self): return luigi.LocalTarget('{}.bai'.format(self.bam_f...
25.076923
64
0.723926
import luigi from luigi.contrib.external_program import ExternalProgramTask import os class IndexBam(ExternalProgramTask): bam_file = luigi.Parameter() def program_args(self): return ['samtools', 'index', self.bam_file] def output(self): return luigi.LocalTarget('{}.bai'.format(self.bam_f...
true
true
1c40a9c5cbc74726c8fb2a338490323f64adc489
700
py
Python
C/Matcher.py
aleksandr-gordeiko/mathlogic-itmo
824b8942d487c0c112304fe7fa8e43f2a8aefa13
[ "MIT" ]
null
null
null
C/Matcher.py
aleksandr-gordeiko/mathlogic-itmo
824b8942d487c0c112304fe7fa8e43f2a8aefa13
[ "MIT" ]
null
null
null
C/Matcher.py
aleksandr-gordeiko/mathlogic-itmo
824b8942d487c0c112304fe7fa8e43f2a8aefa13
[ "MIT" ]
null
null
null
# Copyright: Aleksandr Gordeiko 2020 from A.Node import Node class Matcher: def __init__(self): self.node_schema_expressions = {} def matches(self, node: Node, schema: Node): if schema.sign is None: try: ex = self.node_schema_expressions[schema.expr] except KeyError: self.node_schema_expression...
21.875
57
0.682857
from A.Node import Node class Matcher: def __init__(self): self.node_schema_expressions = {} def matches(self, node: Node, schema: Node): if schema.sign is None: try: ex = self.node_schema_expressions[schema.expr] except KeyError: self.node_schema_expressions[schema.expr] = node.expr retur...
true
true
1c40aa2e8d5ea536a91163f1c124b06a75adf8d9
1,541
py
Python
stdlib/time_qs.py
bpuderer/python-snippets27
8d51ff34c48bee1247575536d8ed506eafde8631
[ "MIT" ]
3
2015-11-20T14:30:53.000Z
2015-12-19T05:55:19.000Z
stdlib/time_qs.py
bpuderer/python-snippets27
8d51ff34c48bee1247575536d8ed506eafde8631
[ "MIT" ]
null
null
null
stdlib/time_qs.py
bpuderer/python-snippets27
8d51ff34c48bee1247575536d8ed506eafde8631
[ "MIT" ]
1
2016-01-05T20:54:49.000Z
2016-01-05T20:54:49.000Z
import time print "snoozing 300 ms...zzzzzzz" time.sleep(0.3) # precision is platform dependent but a float is always returned print "seconds since epoch as a float:", time.time() # returns string for a tuple/struct_time in format "%a %b %d %H:%M:%S %Y" # if no arg is provided it uses localtime() print "current loc...
39.512821
96
0.717067
import time print "snoozing 300 ms...zzzzzzz" time.sleep(0.3) print "seconds since epoch as a float:", time.time() print "current local time string:", time.asctime() print "when is epoch?", time.asctime(time.gmtime(0)) print "current local time string:", time.ctime() print "10 minutes ago from current local t...
false
true
1c40aaa4ea80053d21168df03ff0c474bffc67b9
20,317
py
Python
cinder/volume/drivers/hitachi/hbsd_fc.py
alexpilotti/cinder-ci-fixes
c0ed2ab8cc6b1197e426cd6c58c3b582624d1cfd
[ "Apache-2.0" ]
null
null
null
cinder/volume/drivers/hitachi/hbsd_fc.py
alexpilotti/cinder-ci-fixes
c0ed2ab8cc6b1197e426cd6c58c3b582624d1cfd
[ "Apache-2.0" ]
null
null
null
cinder/volume/drivers/hitachi/hbsd_fc.py
alexpilotti/cinder-ci-fixes
c0ed2ab8cc6b1197e426cd6c58c3b582624d1cfd
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2014, Hitachi, Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
38.18985
79
0.592361
import os import threading from oslo_config import cfg from oslo_log import log as logging from oslo_utils import excutils import six from cinder import exception from cinder.i18n import _LW from cinder import utils import cinder.volume.driver from cinder.volume.drivers.hitachi import hbsd_basiclib as b...
true
true
1c40ab0516aea0f0690c56eb78806e7e66a6259f
1,098
py
Python
sdk/python/pulumi_azure_native/dbforpostgresql/v20200214preview/_enums.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_native/dbforpostgresql/v20200214preview/_enums.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_native/dbforpostgresql/v20200214preview/_enums.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# 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! *** from enum import Enum __all__ = [ 'CreateMode', 'HAEnabledEnum', 'ResourceIdentityType', 'ServerVersion', 'SkuTier', ] class Cre...
20.333333
80
0.644809
from enum import Enum __all__ = [ 'CreateMode', 'HAEnabledEnum', 'ResourceIdentityType', 'ServerVersion', 'SkuTier', ] class CreateMode(str, Enum): DEFAULT = "Default" POINT_IN_TIME_RESTORE = "PointInTimeRestore" class HAEnabledEnum(str, Enum): ENABLED = "Enabled" DISABLED =...
true
true
1c40adf6a5577fca192d80e8d7e46f9de991112e
46,384
py
Python
hummingbot/strategy/perpetual_market_making/perpetual_market_making.py
BGTCapital/hummingbot
2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242
[ "Apache-2.0" ]
2
2022-03-03T10:00:27.000Z
2022-03-08T13:57:56.000Z
hummingbot/strategy/perpetual_market_making/perpetual_market_making.py
BGTCapital/hummingbot
2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242
[ "Apache-2.0" ]
6
2022-01-31T15:44:54.000Z
2022-03-06T04:27:12.000Z
hummingbot/strategy/perpetual_market_making/perpetual_market_making.py
BGTCapital/hummingbot
2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242
[ "Apache-2.0" ]
1
2022-02-03T19:51:26.000Z
2022-02-03T19:51:26.000Z
import logging import time from decimal import Decimal from itertools import chain from math import ceil, floor from typing import Dict, List import numpy as np import pandas as pd from hummingbot.connector.derivative.position import Position from hummingbot.connector.exchange_base import ExchangeBase from hummingbot...
46.570281
144
0.623491
import logging import time from decimal import Decimal from itertools import chain from math import ceil, floor from typing import Dict, List import numpy as np import pandas as pd from hummingbot.connector.derivative.position import Position from hummingbot.connector.exchange_base import ExchangeBase from hummingbot...
true
true
1c40aeff2a010938c435dea825268ce34f9171c9
3,317
py
Python
tensorflow_datasets/scripts/documentation/document_datasets_test.py
harsh020/datasets
b4ad3617b279ec65356e696c4c860458621976f6
[ "Apache-2.0" ]
1
2020-12-10T06:37:27.000Z
2020-12-10T06:37:27.000Z
tensorflow_datasets/scripts/documentation/document_datasets_test.py
Jinwook-shim/datasets
815037e87150e3c8a557d91a68b07e8ffb6a2a86
[ "Apache-2.0" ]
null
null
null
tensorflow_datasets/scripts/documentation/document_datasets_test.py
Jinwook-shim/datasets
815037e87150e3c8a557d91a68b07e8ffb6a2a86
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2020 The TensorFlow Datasets Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
34.915789
104
0.737112
import functools import pytest import tensorflow_datasets as tfds from tensorflow_datasets.scripts.documentation import doc_utils from tensorflow_datasets.scripts.documentation import document_datasets class DummyDatasetConfigs(tfds.testing.DummyDataset): MANUAL_DOWNLOAD_INSTRUCTIONS = """Some man...
true
true
1c40af161c7b42ead2f0f09971dbedcc1442595c
6,044
py
Python
pysnmp-with-texts/Chromatis-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/Chromatis-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/Chromatis-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module Chromatis-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Chromatis-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:34:31 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 201...
97.483871
1,308
0.741727
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, ValueRangeConstraint, ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection = mibBuild...
true
true
1c40afb51f9b020b46acfa7b2254c38faade74bb
660
py
Python
app/src/short_urls/tasks.py
gustavodsf/blue-code-be-test
26b14639ab12fdccb840b8cdaf2f4386ec965bc6
[ "Apache-2.0" ]
1
2022-02-10T01:57:31.000Z
2022-02-10T01:57:31.000Z
app/src/short_urls/tasks.py
gustavodsf/blue-code-be-test
26b14639ab12fdccb840b8cdaf2f4386ec965bc6
[ "Apache-2.0" ]
null
null
null
app/src/short_urls/tasks.py
gustavodsf/blue-code-be-test
26b14639ab12fdccb840b8cdaf2f4386ec965bc6
[ "Apache-2.0" ]
null
null
null
import time import sqlite3 import requests from bs4 import BeautifulSoup def threaded_task(shorterObj): title = get_title_from_page(shorterObj.original_url) add_title_to_database(shorterObj.id, title) def add_title_to_database(id, title): con = sqlite3.connect('app/src/core/flask_boilerplate_main.db') cur...
27.5
101
0.719697
import time import sqlite3 import requests from bs4 import BeautifulSoup def threaded_task(shorterObj): title = get_title_from_page(shorterObj.original_url) add_title_to_database(shorterObj.id, title) def add_title_to_database(id, title): con = sqlite3.connect('app/src/core/flask_boilerplate_main.db') cur...
true
true
1c40afca3bc43ba6bb32c9ef1a343d7db2bc9737
4,390
py
Python
contrib/seeds/generate-seeds.py
genteshare-project/genteshare
b1407e7977c52bac52326cec9c7243877d0b273d
[ "MIT" ]
3
2018-05-04T01:33:30.000Z
2018-08-08T14:54:21.000Z
contrib/seeds/generate-seeds.py
genteshare-project/genteshare
b1407e7977c52bac52326cec9c7243877d0b273d
[ "MIT" ]
null
null
null
contrib/seeds/generate-seeds.py
genteshare-project/genteshare
b1407e7977c52bac52326cec9c7243877d0b273d
[ "MIT" ]
1
2019-08-18T00:42:19.000Z
2019-08-18T00:42:19.000Z
#!/usr/bin/python # Copyright (c) 2014 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Script to generate list of seed nodes for chainparams.cpp. This script expects two text files in the directory tha...
31.582734
98
0.583599
from __future__ import print_function, division from base64 import b32decode from binascii import a2b_hex import sys, os import re pchIPv4 = bytearray([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff]) pchOnionCat = bytearray([0xFD,0x87,0xD8,0x7E,0xEB,0x43]) def name_to_ipv6(addr): if len(addr)>6 and addr.endswith...
true
true
1c40b03a78b4dd52d0c701603722180fc0d2466c
568
py
Python
esphomeflasher/const.py
mozzwald/esphome-flasher
419b180845352cce92b94766c8af777d0ddf9d0b
[ "MIT" ]
null
null
null
esphomeflasher/const.py
mozzwald/esphome-flasher
419b180845352cce92b94766c8af777d0ddf9d0b
[ "MIT" ]
null
null
null
esphomeflasher/const.py
mozzwald/esphome-flasher
419b180845352cce92b94766c8af777d0ddf9d0b
[ "MIT" ]
1
2020-07-05T13:40:52.000Z
2020-07-05T13:40:52.000Z
import re __version__ = "1.2.0" ESP32_DEFAULT_BOOTLOADER_FORMAT = 'https://fujinet.online/firmware/bootloader.bin' ESP32_DEFAULT_OTA_DATA = 'https://fujinet.online/firmware/boot_app0.bin' ESP32_DEFAULT_PARTITIONS = 'https://fujinet.online/firmware/partitions.bin' ESP32_DEFAULT_FIRMWARE = 'https://fujinet.online/firmw...
43.692308
114
0.732394
import re __version__ = "1.2.0" ESP32_DEFAULT_BOOTLOADER_FORMAT = 'https://fujinet.online/firmware/bootloader.bin' ESP32_DEFAULT_OTA_DATA = 'https://fujinet.online/firmware/boot_app0.bin' ESP32_DEFAULT_PARTITIONS = 'https://fujinet.online/firmware/partitions.bin' ESP32_DEFAULT_FIRMWARE = 'https://fujinet.online/firmw...
true
true
1c40b043448434c4bb46287fef9905573f19eb92
13,765
py
Python
mycroft/enclosure/api.py
chrisveilleux/mycroft-core
32557365daf69d6a5a3cb6fcf3d748abe58b6261
[ "Apache-2.0" ]
1
2020-09-03T22:33:42.000Z
2020-09-03T22:33:42.000Z
mycroft/enclosure/api.py
xeddmc/mycroft-core
d6cbccc0cbfbf6b540830aab4c15a32adf67b9bf
[ "Apache-2.0" ]
2
2021-09-08T01:43:29.000Z
2022-01-13T02:20:19.000Z
mycroft/enclosure/api.py
felipehmsilveira/mycroft-ai
8b1997e9444d0d672eded29de63bee54c7933b08
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Mycroft AI 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 writin...
42.094801
79
0.532655
from .display_manager import DisplayManager from mycroft.messagebus.message import Message class EnclosureAPI: def __init__(self, bus, name=""): self.bus = bus self.name = name self.display_manager = DisplayManager(self.name) def register(self, skill_name=""): ...
true
true
1c40b10981b4e2f7eb853180abe5bc8bdf77cde1
416
py
Python
Project Πολυδιάστατες Δομές Δεδομένων/KD_Tree/rebalance.py
DimosthenisMich/UndergraduateCeidProjects
9f99f2c44e41d06020f3a5e9aacc0cd4357ee833
[ "MIT" ]
6
2021-02-10T18:31:22.000Z
2022-03-03T17:49:30.000Z
Project Πολυδιάστατες Δομές Δεδομένων/KD_Tree/rebalance.py
DimosthenisMich/UndergraduateCeidProjects
9f99f2c44e41d06020f3a5e9aacc0cd4357ee833
[ "MIT" ]
1
2020-09-30T19:16:39.000Z
2020-09-30T19:16:39.000Z
Project Πολυδιάστατες Δομές Δεδομένων/KD_Tree/rebalance.py
DimitrisKostorrizos/UndergraduateCeidProjects
9f99f2c44e41d06020f3a5e9aacc0cd4357ee833
[ "MIT" ]
5
2021-11-24T21:34:15.000Z
2022-01-23T22:37:35.000Z
import medianBuild rebuildPoints = [] dimensions = 2 def gatherTreeNodes(node): if node is None: return False rebuildPoints.append(node.node) return gatherTreeNodes(node.leftChild), gatherTreeNodes(node.rightChild) def balanceKdTree(node): gatherTreeNodes(node) # Gather all the nodes of th...
23.111111
76
0.733173
import medianBuild rebuildPoints = [] dimensions = 2 def gatherTreeNodes(node): if node is None: return False rebuildPoints.append(node.node) return gatherTreeNodes(node.leftChild), gatherTreeNodes(node.rightChild) def balanceKdTree(node): gatherTreeNodes(node) root = medianBuild.kdTr...
true
true
1c40b10c25701cd181b5ae1f090d71667f6b3c12
9,289
py
Python
f5_cccl/service/test/test_service_manager.py
f5yacobucci/f5-cccl
64e7fa0a6d4ead9b5209b5b46bf4ed1b6cef036a
[ "Apache-2.0" ]
null
null
null
f5_cccl/service/test/test_service_manager.py
f5yacobucci/f5-cccl
64e7fa0a6d4ead9b5209b5b46bf4ed1b6cef036a
[ "Apache-2.0" ]
null
null
null
f5_cccl/service/test/test_service_manager.py
f5yacobucci/f5-cccl
64e7fa0a6d4ead9b5209b5b46bf4ed1b6cef036a
[ "Apache-2.0" ]
1
2019-11-02T05:22:48.000Z
2019-11-02T05:22:48.000Z
#!/usr/bin/env python # Copyright 2017 F5 Networks Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
37.156
76
0.668533
import json import pickle import pytest from f5_cccl.test.conftest import bigip_proxy from f5_cccl.resource.ltm.app_service import ApplicationService from f5_cccl.resource.ltm.virtual import VirtualServer from f5_cccl.resource.ltm.pool import Pool from f5_cccl.resource.ltm.monitor.http_monitor impor...
true
true
1c40b187ffe264ce102883fdd6f745650f5432a9
549
py
Python
tests/functional_tests/to_constant_tests/test_definition.py
lycantropos/lz
632baaffc1c62cd644f6e67f0bcd7971ae6580da
[ "MIT" ]
7
2019-05-26T15:30:03.000Z
2022-03-07T16:00:31.000Z
tests/functional_tests/to_constant_tests/test_definition.py
lycantropos/lz
632baaffc1c62cd644f6e67f0bcd7971ae6580da
[ "MIT" ]
29
2018-11-12T11:45:56.000Z
2021-05-04T17:24:45.000Z
tests/functional_tests/to_constant_tests/test_definition.py
lycantropos/lz
632baaffc1c62cd644f6e67f0bcd7971ae6580da
[ "MIT" ]
null
null
null
from typing import (Any, Dict, Tuple) from hypothesis import given from lz.functional import to_constant from tests import strategies @given(strategies.scalars, strategies.positionals_arguments, strategies.keywords_arguments) def test_basic(object_: Any, ...
24.954545
65
0.672131
from typing import (Any, Dict, Tuple) from hypothesis import given from lz.functional import to_constant from tests import strategies @given(strategies.scalars, strategies.positionals_arguments, strategies.keywords_arguments) def test_basic(object_: Any, ...
true
true
1c40b19329458681621f933a54d265735457c0f6
863
py
Python
metecho/api/management/commands/tests/truncate_data.py
VaccineCloud/Metecho-Vax
48762a2b5bb53d0d5633d1871e4f1451f5e3e91c
[ "BSD-3-Clause" ]
1
2021-12-09T20:39:01.000Z
2021-12-09T20:39:01.000Z
metecho/api/management/commands/tests/truncate_data.py
VaccineCloud/Metecho-Vax
48762a2b5bb53d0d5633d1871e4f1451f5e3e91c
[ "BSD-3-Clause" ]
1,613
2020-03-26T16:39:57.000Z
2022-03-07T14:54:16.000Z
metecho/api/management/commands/tests/truncate_data.py
VaccineCloud/Metecho-Vax
48762a2b5bb53d0d5633d1871e4f1451f5e3e91c
[ "BSD-3-Clause" ]
2
2021-04-09T18:51:10.000Z
2022-01-04T20:32:48.000Z
import pytest from django.core.management import call_command from ....models import Epic, Project, ProjectSlug, Task @pytest.mark.django_db def test_truncate_data(project_factory, epic_factory, task_factory): project_factory(repo_owner="test", repo_name="repo") project_factory(repo_owner="test", repo_name="...
31.962963
68
0.735805
import pytest from django.core.management import call_command from ....models import Epic, Project, ProjectSlug, Task @pytest.mark.django_db def test_truncate_data(project_factory, epic_factory, task_factory): project_factory(repo_owner="test", repo_name="repo") project_factory(repo_owner="test", repo_name="...
true
true
1c40b1a24e52abaf9b0af9bee3f8f61e57faf9fb
965
py
Python
setup.py
kaniak274/pytest_django_dotenv
fb79ccd0ea2228ebdfeddca942fb2827cd5ebdc8
[ "MIT" ]
1
2021-02-16T09:21:20.000Z
2021-02-16T09:21:20.000Z
setup.py
kaniak274/pytest_django_dotenv
fb79ccd0ea2228ebdfeddca942fb2827cd5ebdc8
[ "MIT" ]
null
null
null
setup.py
kaniak274/pytest_django_dotenv
fb79ccd0ea2228ebdfeddca942fb2827cd5ebdc8
[ "MIT" ]
null
null
null
from setuptools import setup from os import path this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name='pytest-django-dotenv', version='0.1.2', author='Kamil Kucharski', author_email...
33.275862
87
0.687047
from setuptools import setup from os import path this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name='pytest-django-dotenv', version='0.1.2', author='Kamil Kucharski', author_email...
true
true
1c40b28275563c9bcc37a95e98c3c5e5403a8490
3,226
py
Python
src/express-route-cross-connection/azext_expressroutecrossconnection/vendored_sdks/v2018_04_01/models/hub_virtual_network_connection.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
207
2017-11-29T06:59:41.000Z
2022-03-31T10:00:53.000Z
src/express-route-cross-connection/azext_expressroutecrossconnection/vendored_sdks/v2018_04_01/models/hub_virtual_network_connection.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
4,061
2017-10-27T23:19:56.000Z
2022-03-31T23:18:30.000Z
src/express-route-cross-connection/azext_expressroutecrossconnection/vendored_sdks/v2018_04_01/models/hub_virtual_network_connection.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
802
2017-10-11T17:36:26.000Z
2022-03-31T22:24:32.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
43.013333
128
0.657161
from .resource import Resource class HubVirtualNetworkConnection(Resource): _validation = { 'name': {'readonly': True}, 'type': {'readonly': True}, 'etag': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'nam...
true
true
1c40b2b1cacdd7a0bd6c256ff4ba3c37fa555251
618
py
Python
var/spack/repos/builtin/packages/py-portalocker/package.py
player1537-forks/spack
822b7632222ec5a91dc7b7cda5fc0e08715bd47c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
11
2015-10-04T02:17:46.000Z
2018-02-07T18:23:00.000Z
var/spack/repos/builtin/packages/py-portalocker/package.py
player1537-forks/spack
822b7632222ec5a91dc7b7cda5fc0e08715bd47c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
22
2017-08-01T22:45:10.000Z
2022-03-10T07:46:31.000Z
var/spack/repos/builtin/packages/py-portalocker/package.py
player1537-forks/spack
822b7632222ec5a91dc7b7cda5fc0e08715bd47c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
4
2016-06-10T17:57:39.000Z
2018-09-11T04:59:38.000Z
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyPortalocker(PythonPackage): """Portalocker is a library to provide an easy API to file ...
32.526316
95
0.734628
from spack import * class PyPortalocker(PythonPackage): homepage = "https://github.com/WoLpH/portalocker" url = "https://github.com/WoLpH/portalocker/archive/v1.6.0.tar.gz" version('1.6.0', sha256='084ff315ccb9fb38a7c06155d409da5df29647da7c6d2bc2b24637f9f79001ff') depends_on('py-setuptool...
true
true
1c40b4cc87f97cf71ca30d992fb54a0db8b1047d
1,095
py
Python
wildlifecompliance/migrations/0561_wildcarespeciestype.py
mintcoding/wildlifecompliance
28f5bb4ce3116fb62d836a39612c72a052e54ae1
[ "Apache-2.0" ]
null
null
null
wildlifecompliance/migrations/0561_wildcarespeciestype.py
mintcoding/wildlifecompliance
28f5bb4ce3116fb62d836a39612c72a052e54ae1
[ "Apache-2.0" ]
3
2020-03-12T00:45:31.000Z
2022-03-02T10:37:23.000Z
wildlifecompliance/migrations/0561_wildcarespeciestype.py
mintcoding/wildlifecompliance
28f5bb4ce3116fb62d836a39612c72a052e54ae1
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2021-11-25 02:33 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('wildlifecompliance', '0560_callemail_baby_kangaroo'), ...
36.5
186
0.6
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('wildlifecompliance', '0560_callemail_baby_kangaroo'), ] operations = [ migrations.CreateModel( name='...
true
true
1c40b56d028600725c2cf60e6f97d08757f6e869
265
py
Python
networking/packet_capture.py
ddubson/code-dojo-py
31a1f6289672c45dc45a49a45ccc1a4326410b4b
[ "MIT" ]
1
2017-03-27T00:21:01.000Z
2017-03-27T00:21:01.000Z
networking/packet_capture.py
ddubson/code-dojo-py
31a1f6289672c45dc45a49a45ccc1a4326410b4b
[ "MIT" ]
null
null
null
networking/packet_capture.py
ddubson/code-dojo-py
31a1f6289672c45dc45a49a45ccc1a4326410b4b
[ "MIT" ]
null
null
null
import pcapy devs = pcapy.findalldevs() print(devs) try: cap = pcapy.open_live("en0", 65536, 1, 0) count = 1 while count: (header, payload) = cap.next() print(count) count += 1 except KeyboardInterrupt: print("Exiting.")
15.588235
45
0.592453
import pcapy devs = pcapy.findalldevs() print(devs) try: cap = pcapy.open_live("en0", 65536, 1, 0) count = 1 while count: (header, payload) = cap.next() print(count) count += 1 except KeyboardInterrupt: print("Exiting.")
true
true
1c40b647a9ebb9057beb8c754620f9cd633a69da
2,418
py
Python
uflow/data/dataset_size_test.py
egonrian/google-research
8177adbe9ca0d7e5a9463b54581fe6dd27be0974
[ "Apache-2.0" ]
3
2021-01-18T04:46:49.000Z
2021-03-05T09:21:40.000Z
uflow/data/dataset_size_test.py
Alfaxad/google-research
2c0043ecd507e75e2df9973a3015daf9253e1467
[ "Apache-2.0" ]
25
2020-07-25T08:53:09.000Z
2022-03-12T00:43:02.000Z
uflow/data/dataset_size_test.py
Alfaxad/google-research
2c0043ecd507e75e2df9973a3015daf9253e1467
[ "Apache-2.0" ]
4
2021-02-08T10:25:45.000Z
2021-04-17T14:46:26.000Z
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
33.123288
79
0.707196
from absl.testing import absltest from uflow.data import generic_flow_dataset from uflow.data import kitti from uflow.data import sintel from uflow.data.dataset_locations import dataset_locations DATASETS_AND_SIZE = { 'sintel-test-clean': 552, 'sintel-test-final': 552, ...
true
true
1c40b8c8b43cf840740df919cace841d79a604e2
2,398
py
Python
Stereo-Vision-System/farzad/Project/Cameras/StereoCameras.py
tonybeltramelli/Graphics-And-Vision
a1dbeada8e907b119ecce1fe421ae91e64ff3371
[ "Apache-2.0" ]
12
2017-05-26T12:04:38.000Z
2021-07-11T04:42:19.000Z
Stereo-Vision-System/farzad/Project/Cameras/StereoCameras.py
tonybeltramelli/Graphics-And-Vision
a1dbeada8e907b119ecce1fe421ae91e64ff3371
[ "Apache-2.0" ]
null
null
null
Stereo-Vision-System/farzad/Project/Cameras/StereoCameras.py
tonybeltramelli/Graphics-And-Vision
a1dbeada8e907b119ecce1fe421ae91e64ff3371
[ "Apache-2.0" ]
4
2017-05-09T08:26:44.000Z
2018-04-23T03:16:01.000Z
#<!---------------------------------------------------------------------------> #<!-- ITU - IT University of Copenhagen --> #<!-- SSS - Software and Systems Section --> #<!-- File : StereoCameras.py -...
55.767442
80
0.330275
__version__ = '$Revision: 2015040501 $'
true
true
1c40b91e04029a84ae33cbabeb5831f5f3e1d38e
9,216
py
Python
scripts/ased_search_inversion1_cifar100.py
anton-muravev/ased
16ddb70ac3e46556cf49569915df0165a6fb7d16
[ "Apache-2.0" ]
null
null
null
scripts/ased_search_inversion1_cifar100.py
anton-muravev/ased
16ddb70ac3e46556cf49569915df0165a6fb7d16
[ "Apache-2.0" ]
null
null
null
scripts/ased_search_inversion1_cifar100.py
anton-muravev/ased
16ddb70ac3e46556cf49569915df0165a6fb7d16
[ "Apache-2.0" ]
1
2021-12-06T08:42:59.000Z
2021-12-06T08:42:59.000Z
# -*- coding: utf-8 -*- ## INVERSION1 EXPERIMENT ON CIFAR100 import utorch import ased import ased_util import sys import time import numpy as np from astore import Astore from sklearn.model_selection import StratifiedShuffleSplit import argparse import torch import torch.multiprocessing as mp import torch.nn as nn i...
39.384615
91
0.604601
ased_util import sys import time import numpy as np from astore import Astore from sklearn.model_selection import StratifiedShuffleSplit import argparse import torch import torch.multiprocessing as mp import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.optim import torch.u...
true
true
1c40b93725b4401b90eeef6d41c467d228a3c3e7
21
py
Python
damCalculator/force/__init__.py
YingnanXuUCB/damCalculator
c2c7d1b57d87033f41e24fad1cececd96ec7c388
[ "MIT" ]
null
null
null
damCalculator/force/__init__.py
YingnanXuUCB/damCalculator
c2c7d1b57d87033f41e24fad1cececd96ec7c388
[ "MIT" ]
null
null
null
damCalculator/force/__init__.py
YingnanXuUCB/damCalculator
c2c7d1b57d87033f41e24fad1cececd96ec7c388
[ "MIT" ]
null
null
null
from .forces import *
21
21
0.761905
from .forces import *
true
true
1c40b967e9798ce772656204f94ecfee89c38b0e
2,947
py
Python
djangosaml2/cache.py
chander/djangosaml2
edeef7e529769e5f7f99801a6a78c53ea7067198
[ "Apache-2.0" ]
5,079
2015-01-01T03:39:46.000Z
2022-03-31T07:38:22.000Z
djangosaml2/cache.py
chander/djangosaml2
edeef7e529769e5f7f99801a6a78c53ea7067198
[ "Apache-2.0" ]
1,623
2015-01-01T08:06:24.000Z
2022-03-30T19:48:52.000Z
djangosaml2/cache.py
chander/djangosaml2
edeef7e529769e5f7f99801a6a78c53ea7067198
[ "Apache-2.0" ]
2,033
2015-01-04T07:18:02.000Z
2022-03-28T19:55:47.000Z
# Copyright (C) 2011-2012 Yaco Sistemas (http://www.yaco.es) # Copyright (C) 2010 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> # # 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 # # ...
32.744444
93
0.695283
from saml2.cache import Cache class DjangoSessionCacheAdapter(dict): key_prefix = '_saml2' def __init__(self, django_session, key_suffix): self.session = django_session self.key = self.key_prefix + key_suffix super(DjangoSessionCacheAdapter, self).__init__(self._get_o...
true
true
1c40b99599236f6163dc5f14cd48f334f09c239c
1,891
py
Python
tutorials/tunable_xception_cifar10/tunable_xception_cifar10.py
Gonaz/keras-tuner
f8264811d4744abb4f0fdab480e8a4e6ddf91c4e
[ "Apache-2.0" ]
1
2020-11-08T17:04:21.000Z
2020-11-08T17:04:21.000Z
tutorials/tunable_xception_cifar10/tunable_xception_cifar10.py
Gonaz/keras-tuner
f8264811d4744abb4f0fdab480e8a4e6ddf91c4e
[ "Apache-2.0" ]
null
null
null
tutorials/tunable_xception_cifar10/tunable_xception_cifar10.py
Gonaz/keras-tuner
f8264811d4744abb4f0fdab480e8a4e6ddf91c4e
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The Keras Tuner Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
32.603448
74
0.773665
from tensorflow.keras.utils import to_categorical from tensorflow.keras.datasets import cifar10 from kerastuner.applications import HyperXception from kerastuner import RandomSearch NUM_CLASSES = 10 (x_train, y_train), (x_test, y_test) = cifar10.load_data() y_train = to_categorical(y_train, NUM_CLASSES...
true
true
1c40b9c3406064309f1ba271b8940f616aec18fa
1,936
py
Python
scripts/pipeline_main.py
rnk/llvm-premerge-checks
859df4066fc06d9151e22530fce3309174cb5470
[ "Apache-2.0" ]
null
null
null
scripts/pipeline_main.py
rnk/llvm-premerge-checks
859df4066fc06d9151e22530fce3309174cb5470
[ "Apache-2.0" ]
null
null
null
scripts/pipeline_main.py
rnk/llvm-premerge-checks
859df4066fc06d9151e22530fce3309174cb5470
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright 2020 Google LLC # # Licensed under the the Apache License v2.0 with LLVM Exceptions (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://llvm.org/LICENSE.txt # # Unless required by applicable law ...
39.510204
120
0.722107
import os from steps import generic_linux, generic_windows, from_shell_output import yaml steps_generators = [ '${BUILDKITE_BUILD_CHECKOUT_PATH}/libcxx/utils/ci/buildkite-pipeline-snapshot.sh', ] if __name__ == '__main__': scripts_refspec = os.getenv("ph_scripts_refspec", "main") no_cache ...
true
true
1c40b9fa431618695234cae3495c1fe3816040dd
7,589
py
Python
losantrest/instance_member.py
Losant/losant-rest-python
50a6ce13dfef7acefb930fe45893c7bae862f784
[ "MIT" ]
5
2016-06-16T20:18:11.000Z
2022-03-09T11:41:59.000Z
losantrest/instance_member.py
Losant/losant-rest-python
50a6ce13dfef7acefb930fe45893c7bae862f784
[ "MIT" ]
4
2021-07-13T06:09:16.000Z
2022-03-07T14:24:49.000Z
losantrest/instance_member.py
Losant/losant-rest-python
50a6ce13dfef7acefb930fe45893c7bae862f784
[ "MIT" ]
6
2016-11-18T03:19:17.000Z
2022-03-09T11:41:47.000Z
""" The MIT License (MIT) Copyright (c) 2021 Losant IoT, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, me...
41.244565
119
0.646594
import json class InstanceMember(object): def __init__(self, client): self.client = client def delete(self, **kwargs): query_params = {"_actions": "false", "_links": "true", "_embedded": "true"} path_params = {} headers = {} body = None if "instanceId" in...
true
true
1c40ba4a9a02a64d3a26fef8c84e71080aba1669
3,894
py
Python
similarity/eval_iter.py
jtraviesor/alfred-tf-trainer
9747d24bef418415a31abfe0c9982d2f1d9d8298
[ "MIT" ]
3
2017-11-18T11:41:46.000Z
2020-02-13T19:22:28.000Z
similarity/eval_iter.py
jtraviesor/alfred-tf-trainer
9747d24bef418415a31abfe0c9982d2f1d9d8298
[ "MIT" ]
4
2017-09-01T05:28:49.000Z
2017-11-20T05:27:49.000Z
similarity/eval_iter.py
jtraviesor/alfred-tf-trainer
9747d24bef418415a31abfe0c9982d2f1d9d8298
[ "MIT" ]
1
2018-06-08T03:55:32.000Z
2018-06-08T03:55:32.000Z
#! /usr/bin/env python import tensorflow as tf import numpy as np from input_helpers import InputHelper from time import sleep # Parameters # ================================================== run_id = 'runs/1503723018' model_file = run_id + "/checkpoints/model-72000" # Eval Parameters tf.flags.DEFINE_integer("batch...
40.14433
120
0.638418
import tensorflow as tf import numpy as np from input_helpers import InputHelper from time import sleep run_id = 'runs/1503723018' model_file = run_id + "/checkpoints/model-72000" tf.flags.DEFINE_integer("batch_size", 64, "Batch Size (default: 64)") tf.flags.DEFINE_string("checkpoint_dir", "", "Checkpoint direct...
true
true
1c40bb05eba11a640cfaf481908902a09ba25371
4,534
py
Python
tests/unit_tests/test_core/test_pin_node.py
henzh/piniverse
77dce494cefc9e8051bb32298a5b32e2397c1634
[ "MIT" ]
null
null
null
tests/unit_tests/test_core/test_pin_node.py
henzh/piniverse
77dce494cefc9e8051bb32298a5b32e2397c1634
[ "MIT" ]
1
2019-11-11T00:25:44.000Z
2019-11-11T00:25:44.000Z
tests/unit_tests/test_core/test_pin_node.py
henzh/piniverse
77dce494cefc9e8051bb32298a5b32e2397c1634
[ "MIT" ]
null
null
null
# The MIT License (MIT) # # Copyright (c) 2019 Henry Zhao # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify...
42.373832
113
0.671592
import pytest import inspect from piniverse.core.pin_node import PinNode, PinGraph from piniverse.common.exceptions.pin_exception import PinException from tests.unit_tests.test_core.my_package.my_file import foo, another_foo def test_pin_node(): pin_node_1 = PinNode('1', '2', arguments={'ar...
true
true
1c40bb46c037ce1e6e7e93b3825f8451e5627eab
7,024
py
Python
examples/pwr_run/checkpointing/nonpc_short/knn/job12.py
boringlee24/keras_old
1e1176c45c4952ba1b9b9e58e9cc4df027ab111d
[ "MIT" ]
null
null
null
examples/pwr_run/checkpointing/nonpc_short/knn/job12.py
boringlee24/keras_old
1e1176c45c4952ba1b9b9e58e9cc4df027ab111d
[ "MIT" ]
null
null
null
examples/pwr_run/checkpointing/nonpc_short/knn/job12.py
boringlee24/keras_old
1e1176c45c4952ba1b9b9e58e9cc4df027ab111d
[ "MIT" ]
null
null
null
""" #Trains a ResNet on the CIFAR10 dataset. """ from __future__ import print_function import keras from keras.layers import Dense, Conv2D, BatchNormalization, Activation from keras.layers import AveragePooling2D, Input, Flatten from keras.optimizers import Adam from keras.callbacks import ModelCheckpoint, LearningRa...
31.217778
118
0.703303
from __future__ import print_function import keras from keras.layers import Dense, Conv2D, BatchNormalization, Activation from keras.layers import AveragePooling2D, Input, Flatten from keras.optimizers import Adam from keras.callbacks import ModelCheckpoint, LearningRateScheduler from keras.callbacks import ReduceLROn...
true
true
1c40bbef9d0c743ca08be761b688558d1d2052cb
294
py
Python
zadanie5.py
djdanto/Python100
524188233a966b12cf6bdfb9c14cf6bf25bf5205
[ "MIT" ]
null
null
null
zadanie5.py
djdanto/Python100
524188233a966b12cf6bdfb9c14cf6bf25bf5205
[ "MIT" ]
null
null
null
zadanie5.py
djdanto/Python100
524188233a966b12cf6bdfb9c14cf6bf25bf5205
[ "MIT" ]
null
null
null
celsiusz = float(input('Wprowadz temeperature w stopniach celsiusza: ')) fahrenheit = (celsiusz * 1.8) + 32 print('%0.1f Celsiusz = %0.1f Fahrenheit'%(celsiusz,fahrenheit)) kw = float(input('Wprowadz ilość koni mechanicznych: ')) kM = (kw * 1,36) print(' kw = kM'%(kw,kM))
26.727273
74
0.639456
celsiusz = float(input('Wprowadz temeperature w stopniach celsiusza: ')) fahrenheit = (celsiusz * 1.8) + 32 print('%0.1f Celsiusz = %0.1f Fahrenheit'%(celsiusz,fahrenheit)) kw = float(input('Wprowadz ilość koni mechanicznych: ')) kM = (kw * 1,36) print(' kw = kM'%(kw,kM))
true
true
1c40bcbda0e67afd5b32077d733c0afca144bac1
6,871
py
Python
pytorch_lightning/accelerators/ddp2_backend.py
willprice/pytorch-lightning
94bba4059ce3dc13799d0fd59592f3bcfbbf19c4
[ "Apache-2.0" ]
null
null
null
pytorch_lightning/accelerators/ddp2_backend.py
willprice/pytorch-lightning
94bba4059ce3dc13799d0fd59592f3bcfbbf19c4
[ "Apache-2.0" ]
null
null
null
pytorch_lightning/accelerators/ddp2_backend.py
willprice/pytorch-lightning
94bba4059ce3dc13799d0fd59592f3bcfbbf19c4
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
34.70202
116
0.666715
import os import torch from pytorch_lightning import _logger as log from pytorch_lightning.utilities import AMPType from pytorch_lightning.utilities.distributed import rank_zero_only from pytorch_lightning.utilities.exceptions import MisconfigurationException from pytorch_lightning.core.step_result impo...
true
true
1c40bcbdb7fedbbc9fe9758b4d3e9afb831d15ce
279
py
Python
tests/bkprecision_test.py
mrkmedvedev/python-bkprecision2831e
01961db620d9c26650b655ff6ba70b82da57c7d9
[ "Apache-2.0" ]
2
2017-03-06T07:46:28.000Z
2021-04-07T23:30:37.000Z
tests/bkprecision_test.py
mrkmedvedev/python-bkprecision2831e
01961db620d9c26650b655ff6ba70b82da57c7d9
[ "Apache-2.0" ]
null
null
null
tests/bkprecision_test.py
mrkmedvedev/python-bkprecision2831e
01961db620d9c26650b655ff6ba70b82da57c7d9
[ "Apache-2.0" ]
1
2018-10-08T20:54:31.000Z
2018-10-08T20:54:31.000Z
from bkprecision.bkprecision import BKPrecisionMultimeter import time mult = BKPrecisionMultimeter(serial_port='COM10') mult.configure_connection() try: while True: print mult.measure() time.sleep(0.1) except KeyboardInterrupt: mult.close_connection()
19.928571
57
0.752688
from bkprecision.bkprecision import BKPrecisionMultimeter import time mult = BKPrecisionMultimeter(serial_port='COM10') mult.configure_connection() try: while True: print mult.measure() time.sleep(0.1) except KeyboardInterrupt: mult.close_connection()
false
true
1c40bd1f8437ddf4868c4190e8316bf496f69d27
520
py
Python
src/flaskFormRequest/validators/float.py
edcilo/flaskFormRequest
5d346ab8821bdc6653dab9607f8a5d3d992b59d9
[ "MIT" ]
null
null
null
src/flaskFormRequest/validators/float.py
edcilo/flaskFormRequest
5d346ab8821bdc6653dab9607f8a5d3d992b59d9
[ "MIT" ]
null
null
null
src/flaskFormRequest/validators/float.py
edcilo/flaskFormRequest
5d346ab8821bdc6653dab9607f8a5d3d992b59d9
[ "MIT" ]
null
null
null
from typing import Union from .validator import Validator, ValidationError, StopValidation class Float(Validator): def __init__(self, message: Union[str, None] = None, parse: bool = True) -> None: self.parse = parse self.message = message or 'This field must be an float number.' def parse_dat...
28.888889
85
0.648077
from typing import Union from .validator import Validator, ValidationError, StopValidation class Float(Validator): def __init__(self, message: Union[str, None] = None, parse: bool = True) -> None: self.parse = parse self.message = message or 'This field must be an float number.' def parse_dat...
true
true
1c40be8ea064575dc414f4074b3d5a872bc46e73
243
py
Python
chainer_mask_rcnn/functions/__init__.py
m3at/chainer-mask-rcnn
fa491663675cdc97974008becc99454d5e6e1d09
[ "MIT" ]
61
2018-04-04T07:09:32.000Z
2021-11-12T19:54:23.000Z
chainer_mask_rcnn/functions/__init__.py
Swall0w/chainer-mask-rcnn
83366fc77e52aa6a29cfac4caa697d8b45dcffc6
[ "MIT" ]
15
2018-04-10T10:48:47.000Z
2021-05-20T10:00:42.000Z
chainer_mask_rcnn/functions/__init__.py
Swall0w/chainer-mask-rcnn
83366fc77e52aa6a29cfac4caa697d8b45dcffc6
[ "MIT" ]
18
2018-07-06T10:13:56.000Z
2022-03-02T12:25:31.000Z
# flake8: noqa from .affine_channel_2d import affine_channel_2d from .affine_channel_2d import AffineChannel2DFunction from .crop_and_resize import crop_and_resize from .roi_align_2d import roi_align_2d from .roi_align_2d import ROIAlign2D
24.3
54
0.864198
from .affine_channel_2d import affine_channel_2d from .affine_channel_2d import AffineChannel2DFunction from .crop_and_resize import crop_and_resize from .roi_align_2d import roi_align_2d from .roi_align_2d import ROIAlign2D
true
true
1c40beeed5dbae5ac4bcf3d3ba9bff6de8b12127
3,988
py
Python
examples/ad_manager/v202011/forecast_service/get_traffic_data.py
siilats/googleads-python-lib
d82a9cb75a4b2d602d02039536443f5b30157a43
[ "Apache-2.0" ]
null
null
null
examples/ad_manager/v202011/forecast_service/get_traffic_data.py
siilats/googleads-python-lib
d82a9cb75a4b2d602d02039536443f5b30157a43
[ "Apache-2.0" ]
null
null
null
examples/ad_manager/v202011/forecast_service/get_traffic_data.py
siilats/googleads-python-lib
d82a9cb75a4b2d602d02039536443f5b30157a43
[ "Apache-2.0" ]
1
2021-06-23T09:15:34.000Z
2021-06-23T09:15:34.000Z
#!/usr/bin/env python # # 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 ...
32.16129
80
0.701354
import datetime from googleads import ad_manager def main(client): forecast_service = client.GetService('ForecastService', version='v202011') network_service = client.GetService('NetworkService', version='v202011') root_ad_unit_id = network_service.getCurrentNetwork()['effectiveRootAd...
true
true
1c40bf9d2019a68825eb40f035446d1a2fc35654
35,667
py
Python
tests/translator/test_translator.py
Buffer0x7cd/serverless-application-model
805cc85bc26cfda16e9611c047e38f78560ad6e6
[ "Apache-2.0" ]
2
2019-04-13T16:57:10.000Z
2019-12-13T08:32:16.000Z
tests/translator/test_translator.py
Buffer0x7cd/serverless-application-model
805cc85bc26cfda16e9611c047e38f78560ad6e6
[ "Apache-2.0" ]
3
2021-06-08T22:29:43.000Z
2022-01-13T03:21:16.000Z
tests/translator/test_translator.py
Buffer0x7cd/serverless-application-model
805cc85bc26cfda16e9611c047e38f78560ad6e6
[ "Apache-2.0" ]
1
2021-08-05T13:35:20.000Z
2021-08-05T13:35:20.000Z
import json import itertools import os.path import hashlib import sys from functools import reduce, cmp_to_key from samtranslator.translator.translator import Translator, prepare_plugins, make_policy_template_for_function_plugin from samtranslator.parser.parser import Parser from samtranslator.model.exceptions import ...
40.530682
131
0.672386
import json import itertools import os.path import hashlib import sys from functools import reduce, cmp_to_key from samtranslator.translator.translator import Translator, prepare_plugins, make_policy_template_for_function_plugin from samtranslator.parser.parser import Parser from samtranslator.model.exceptions import ...
true
true
1c40c09085b1619ad3fd24e72cfb2121973620e9
21,060
py
Python
pypy/module/micronumpy/ctors.py
wdv4758h/mu-client-pypy
d2fcc01f0b4fe3ffa232762124e3e6d38ed3a0cf
[ "Apache-2.0", "OpenSSL" ]
null
null
null
pypy/module/micronumpy/ctors.py
wdv4758h/mu-client-pypy
d2fcc01f0b4fe3ffa232762124e3e6d38ed3a0cf
[ "Apache-2.0", "OpenSSL" ]
null
null
null
pypy/module/micronumpy/ctors.py
wdv4758h/mu-client-pypy
d2fcc01f0b4fe3ffa232762124e3e6d38ed3a0cf
[ "Apache-2.0", "OpenSSL" ]
null
null
null
from pypy.interpreter.error import OperationError, oefmt from pypy.interpreter.gateway import unwrap_spec, WrappedDefault from rpython.rlib.buffer import SubBuffer from rpython.rlib.rstring import strip_spaces from rpython.rlib.rawstorage import RAW_STORAGE_PTR from rpython.rtyper.lltypesystem import lltype, rffi from...
41.538462
122
0.627493
from pypy.interpreter.error import OperationError, oefmt from pypy.interpreter.gateway import unwrap_spec, WrappedDefault from rpython.rlib.buffer import SubBuffer from rpython.rlib.rstring import strip_spaces from rpython.rlib.rawstorage import RAW_STORAGE_PTR from rpython.rtyper.lltypesystem import lltype, rffi from...
false
true
1c40c0d4965fe7922c46178338e7efc5b2a3a77c
7,754
py
Python
class_nn/embeddings_google.py
jmhernan/NIreland_NLP
c360c4978452e80575db2e0eed9ef540ed83b5c6
[ "MIT" ]
null
null
null
class_nn/embeddings_google.py
jmhernan/NIreland_NLP
c360c4978452e80575db2e0eed9ef540ed83b5c6
[ "MIT" ]
null
null
null
class_nn/embeddings_google.py
jmhernan/NIreland_NLP
c360c4978452e80575db2e0eed9ef540ed83b5c6
[ "MIT" ]
null
null
null
###################################################### ### Builds NN using google embeddings, parameters ### ### Uses: justifications_clean_text_ohe.csv ### ###### Collapses justifications to 6 categories. ### ###### Stems and tokenizes words ### ### Next step: Sarah needs to talk through w ...
34.7713
173
0.716404
true
true
1c40c13ce9a777a4ab812a86483389edbb71d4ec
867
py
Python
myapp/urls.py
srikar7777/Malicious-Urlv5
a3a231d60cb6ffc44fdc297bf73683872decd435
[ "MIT" ]
33
2020-02-16T08:08:36.000Z
2022-03-31T01:01:45.000Z
myapp/urls.py
Kabeer-Ahmed11/Malicious-Urlv5
617b319bfd9a7ed6320abd9e7b90c518064b66cb
[ "MIT" ]
6
2020-02-12T06:24:55.000Z
2022-02-10T08:21:55.000Z
myapp/urls.py
Kabeer-Ahmed11/Malicious-Urlv5
617b319bfd9a7ed6320abd9e7b90c518064b66cb
[ "MIT" ]
22
2020-04-11T07:19:46.000Z
2022-03-02T16:59:53.000Z
from django.urls import path from . import views urlpatterns = [ path('',views.index,name='index'), path('getuserfeedbackform',views.getuserfeedbackform,name="getuserfeedbackform"), path('saveuserfeedbackform',views.saveuserfeedbackform,name="saveuserfeedbackform"), path('api',views.api,name='api'), ...
39.409091
88
0.71511
from django.urls import path from . import views urlpatterns = [ path('',views.index,name='index'), path('getuserfeedbackform',views.getuserfeedbackform,name="getuserfeedbackform"), path('saveuserfeedbackform',views.saveuserfeedbackform,name="saveuserfeedbackform"), path('api',views.api,name='api'), ...
true
true
1c40c470aff28eeaa8d9b1f7fa0b8a20f0302121
10,796
py
Python
gpiozero/pins/local.py
NotBobTheBuilder/gpiozero
aeb9d30056ec97e6bf896152e71a870bd0099b4e
[ "BSD-3-Clause" ]
1
2021-01-27T21:46:52.000Z
2021-01-27T21:46:52.000Z
gpiozero/pins/local.py
NotBobTheBuilder/gpiozero
aeb9d30056ec97e6bf896152e71a870bd0099b4e
[ "BSD-3-Clause" ]
null
null
null
gpiozero/pins/local.py
NotBobTheBuilder/gpiozero
aeb9d30056ec97e6bf896152e71a870bd0099b4e
[ "BSD-3-Clause" ]
null
null
null
# GPIO Zero: a library for controlling the Raspberry Pi's GPIO pins # Copyright (c) 2016-2019 Dave Jones <dave@waveform.org.uk> # Copyright (c) 2019 Andrew Scheller <github@loowis.durge.org> # Copyright (c) 2018 Martchus <martchus@gmx.net> # # Redistribution and use in source and binary forms, with or without # modific...
34.602564
96
0.648388
# Copyright (c) 2016-2019 Dave Jones <dave@waveform.org.uk> # Copyright (c) 2019 Andrew Scheller <github@loowis.durge.org> # Copyright (c) 2018 Martchus <martchus@gmx.net> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met...
true
true
1c40c520d6f4c68d536b05f273f32c0e7d73d9c8
2,265
py
Python
hatsploit/modules/exploit/linux/dlink/dcs_credentials_disclosure.py
enty8080/HatSplo
57ea81c2bc73838cbf7d7062d7e665eda1143d18
[ "MIT" ]
139
2021-02-17T15:52:30.000Z
2022-03-30T14:50:42.000Z
hatsploit/modules/exploit/linux/dlink/dcs_credentials_disclosure.py
enty8080/HatSplo
57ea81c2bc73838cbf7d7062d7e665eda1143d18
[ "MIT" ]
27
2021-03-24T17:14:30.000Z
2022-03-02T18:50:43.000Z
hatsploit/modules/exploit/linux/dlink/dcs_credentials_disclosure.py
enty8080/HatSplo
57ea81c2bc73838cbf7d7062d7e665eda1143d18
[ "MIT" ]
85
2021-02-17T15:39:03.000Z
2022-03-07T09:08:58.000Z
#!/usr/bin/env python3 # # This module requires HatSploit: https://hatsploit.netlify.app # Current source: https://github.com/EntySec/HatSploit # from hatsploit.lib.module import Module from hatsploit.utils.http import HTTPClient class HatSploitModule(Module, HTTPClient): details = { 'Name': "D-Link DCS...
29.415584
106
0.568212
from hatsploit.lib.module import Module from hatsploit.utils.http import HTTPClient class HatSploitModule(Module, HTTPClient): details = { 'Name': "D-Link DCS Credentials Disclosure", 'Module': "exploit/linux/dlink/dcs_credentials_disclosure", 'Authors': [ 'Ivan Nikolsky...
true
true