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
f73ba2bc52e48cbecdb860b9404b32baf7b51f16
262
py
Python
reports/tests/__init__.py
allankellynet/mimas
10025d43bba9e84f502a266760786842e7158a05
[ "MIT" ]
null
null
null
reports/tests/__init__.py
allankellynet/mimas
10025d43bba9e84f502a266760786842e7158a05
[ "MIT" ]
1
2020-02-05T13:00:29.000Z
2020-02-05T13:00:29.000Z
tests/__init__.py
allankellynet/mimas
10025d43bba9e84f502a266760786842e7158a05
[ "MIT" ]
null
null
null
#----------------------------------------------------- # Mimas: conference submission and review system # (c) Allan Kelly 2016-2020 http://www.allankelly.net # Licensed under MIT License, see LICENSE file # -----------------------------------------------------
37.428571
55
0.442748
true
true
f73ba402bc4b622f51aa158d62543f104495ca17
3,831
py
Python
GPS_Berkley/experiments/mjc_disc_cost_pilqr_example/hyperparams.py
bvsk35/Hopping_Bot
5a8c7d4fdb4ae0a5ddf96002deb3c9ba1116c216
[ "MIT" ]
null
null
null
GPS_Berkley/experiments/mjc_disc_cost_pilqr_example/hyperparams.py
bvsk35/Hopping_Bot
5a8c7d4fdb4ae0a5ddf96002deb3c9ba1116c216
[ "MIT" ]
null
null
null
GPS_Berkley/experiments/mjc_disc_cost_pilqr_example/hyperparams.py
bvsk35/Hopping_Bot
5a8c7d4fdb4ae0a5ddf96002deb3c9ba1116c216
[ "MIT" ]
1
2020-03-02T07:27:04.000Z
2020-03-02T07:27:04.000Z
""" Hyperparameters for MJC 2D navigation with discontinous target region. """ from __future__ import division from datetime import datetime import os.path import numpy as np from gps import __file__ as gps_filepath from gps.agent.mjc.agent_mjc import AgentMuJoCo from gps.algorithm.algorithm_traj_opt_pilqr import Al...
27.364286
78
0.655181
from __future__ import division from datetime import datetime import os.path import numpy as np from gps import __file__ as gps_filepath from gps.agent.mjc.agent_mjc import AgentMuJoCo from gps.algorithm.algorithm_traj_opt_pilqr import AlgorithmTrajOptPILQR from gps.algorithm.cost.cost_state import CostState from gp...
true
true
f73ba456a8d183a22a82ba4101b9c30900c4e534
11,541
py
Python
pep425.py
brettcannon/pep425
5c9baea482ee4d643107ff2e10cd2c1996100977
[ "BSD-3-Clause" ]
null
null
null
pep425.py
brettcannon/pep425
5c9baea482ee4d643107ff2e10cd2c1996100977
[ "BSD-3-Clause" ]
2
2018-11-22T20:03:18.000Z
2018-12-16T10:14:31.000Z
pep425.py
brettcannon/pep425
5c9baea482ee4d643107ff2e10cd2c1996100977
[ "BSD-3-Clause" ]
1
2018-11-17T09:40:52.000Z
2018-11-17T09:40:52.000Z
"""Provide support for PEP 425 compatibility tags triples.""" import distutils.util import os import os.path import platform import sys import sysconfig INTERPRETER_SHORT_NAMES = { "python": "py", # Generic. "cpython": "cp", "pypy": "pp", "ironpython": "ip", "jython": "jy", } _32_BIT_INTERPRET...
31.107817
98
0.642059
import distutils.util import os import os.path import platform import sys import sysconfig INTERPRETER_SHORT_NAMES = { "python": "py", "cpython": "cp", "pypy": "pp", "ironpython": "ip", "jython": "jy", } _32_BIT_INTERPRETER = sys.maxsize <= 2 ** 32 class Tag: def __init__(self, inter...
true
true
f73ba46818a5b829e4973856551bf743bdf50939
7,575
py
Python
compilation/python/Lib/site-packages/pyflakes/messages.py
BodoMinea/blocklino
fa51a882cdf1ce3e9cbf7ef0f2b1bc0423bd051e
[ "CC0-1.0" ]
11
2019-08-31T23:40:06.000Z
2021-06-01T06:31:53.000Z
compilation/python/Lib/site-packages/pyflakes/messages.py
BodoMinea/blocklino
fa51a882cdf1ce3e9cbf7ef0f2b1bc0423bd051e
[ "CC0-1.0" ]
301
2020-10-03T10:46:31.000Z
2022-03-27T23:46:23.000Z
compilation/python/Lib/site-packages/pyflakes/messages.py
BodoMinea/blocklino
fa51a882cdf1ce3e9cbf7ef0f2b1bc0423bd051e
[ "CC0-1.0" ]
12
2019-02-24T17:42:14.000Z
2021-12-09T10:03:27.000Z
""" Provide the class Message and its subclasses. """ class Message(object): message = '' message_args = () def __init__(self, filename, loc): self.filename = filename self.lineno = loc.lineno self.col = getattr(loc, 'col_offset', 0) def __str__(self): return '%s:%s: ...
28.159851
79
0.674587
class Message(object): message = '' message_args = () def __init__(self, filename, loc): self.filename = filename self.lineno = loc.lineno self.col = getattr(loc, 'col_offset', 0) def __str__(self): return '%s:%s: %s' % (self.filename, self.lineno, ...
true
true
f73ba491c7a25490b7735db2bebda9b7c1b333c2
67,424
py
Python
dependencies/rdflib/graph.py
situx/geowebannotation
1c4f27226913ae45f8943ee5fb2cabed494f3273
[ "MIT" ]
8
2019-05-29T09:38:30.000Z
2021-01-20T03:36:59.000Z
dependencies/rdflib/graph.py
situx/geowebannotation
1c4f27226913ae45f8943ee5fb2cabed494f3273
[ "MIT" ]
12
2021-03-09T03:01:16.000Z
2022-03-11T23:59:36.000Z
dependencies/rdflib/graph.py
situx/geowebannotation
1c4f27226913ae45f8943ee5fb2cabed494f3273
[ "MIT" ]
4
2021-06-10T18:54:16.000Z
2021-10-25T00:42:22.000Z
from rdflib.term import Literal # required for doctests assert Literal # avoid warning from rdflib.namespace import Namespace # required for doctests assert Namespace # avoid warning from rdflib.py3compat import format_doctest_out __doc__ = format_doctest_out("""\ RDFLib defines the following kinds of Graphs: * :c...
34.48798
118
0.592623
from rdflib.term import Literal assert Literal from rdflib.namespace import Namespace assert Namespace from rdflib.py3compat import format_doctest_out __doc__ = format_doctest_out("""\ RDFLib defines the following kinds of Graphs: * :class:`~rdflib.graph.Graph` * :class:`~rdflib.graph.QuotedGraph` * :class:`~r...
true
true
f73ba4ba51bfdd01baa8cb1a9af3a424cb7000e1
5,836
py
Python
src/MagnumPlugins/KtxImporter/formatMapping.py
janbajana/magnum-plugins
809fc1829db8e41d52fd7d299a3bc511b7ba9d83
[ "MIT" ]
90
2015-05-13T23:57:41.000Z
2022-03-09T12:16:11.000Z
src/MagnumPlugins/KtxImporter/formatMapping.py
janbajana/magnum-plugins
809fc1829db8e41d52fd7d299a3bc511b7ba9d83
[ "MIT" ]
108
2015-08-09T16:30:44.000Z
2022-02-04T15:56:50.000Z
src/MagnumPlugins/KtxImporter/formatMapping.py
janbajana/magnum-plugins
809fc1829db8e41d52fd7d299a3bc511b7ba9d83
[ "MIT" ]
67
2015-05-12T07:36:38.000Z
2022-03-13T16:41:10.000Z
#!/usr/bin/env python3 # # This file is part of Magnum. # # Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, # 2020, 2021 Vladimír Vondruš <mosra@centrum.cz> # Copyright © 2021 Pablo Escobar <mail@rvrs.in> # # Permission is hereby granted, free of charge, to any person obta...
42.59854
133
0.705278
import argparse from collections import namedtuple import itertools import os import re parser = argparse.ArgumentParser() parser.add_argument('magnum_source') args = parser.parse_args() magnum_dir = args.magnum_source vulkan_header = os.path.join(magnum_dir, 'src/MagnumExternal/Vulkan/fle...
true
true
f73ba8c42e38717d499fd2a17864c6aa09928041
1,743
py
Python
GoogleKickstart/kickstart2021/ex1.py
XavierDELPIERRE/Competitiveprogramming
c04a6c81d26c5f44003cfec5768468e183155e65
[ "Unlicense" ]
null
null
null
GoogleKickstart/kickstart2021/ex1.py
XavierDELPIERRE/Competitiveprogramming
c04a6c81d26c5f44003cfec5768468e183155e65
[ "Unlicense" ]
null
null
null
GoogleKickstart/kickstart2021/ex1.py
XavierDELPIERRE/Competitiveprogramming
c04a6c81d26c5f44003cfec5768468e183155e65
[ "Unlicense" ]
null
null
null
# input() reads a string with a line of input, stripping the ' ' (newline) at the end. # This is all you need for most problems. import os os.system('cls') file = open('shuffled_anagrams_sample_ts1_input.txt', 'r') #overwrite input to mimic google input def input(): line = file.readline() return lin...
32.886792
87
0.481354
import os os.system('cls') file = open('shuffled_anagrams_sample_ts1_input.txt', 'r') def input(): line = file.readline() return line import math import random stringimp = 'IMPOSSIBLE' t = int(input()) for i in range(1, t + 1): n = [str(s) for s in input()] if '\n' in n : ...
true
true
f73ba8e9807ecd80a25b4141cf6f374c31a144ae
4,369
py
Python
tensorflow/python/kernel_tests/py_func_test.py
jylinman/tensorflow
5248d111c3aeaf9f560cd77bff0f183f38e31e0b
[ "Apache-2.0" ]
1
2016-02-25T06:47:21.000Z
2016-02-25T06:47:21.000Z
tensorflow/python/kernel_tests/py_func_test.py
jylinman/tensorflow
5248d111c3aeaf9f560cd77bff0f183f38e31e0b
[ "Apache-2.0" ]
null
null
null
tensorflow/python/kernel_tests/py_func_test.py
jylinman/tensorflow
5248d111c3aeaf9f560cd77bff0f183f38e31e0b
[ "Apache-2.0" ]
1
2020-10-21T09:39:19.000Z
2020-10-21T09:39:19.000Z
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
33.098485
80
0.610666
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from six.moves import xrange import tensorflow as tf from tensorflow.python.framework import errors from tensorflow.python.ops import script_ops class PyOpTest(tf.test.Test...
true
true
f73ba9e2451db3fc795a845770ccf32819862881
6,707
py
Python
mhr_api/src/mhr_api/services/payment/payment.py
cameron-freshworks/ppr
01d6f5d300c791aebad5e58bb4601e9be2ccfc46
[ "Apache-2.0" ]
null
null
null
mhr_api/src/mhr_api/services/payment/payment.py
cameron-freshworks/ppr
01d6f5d300c791aebad5e58bb4601e9be2ccfc46
[ "Apache-2.0" ]
null
null
null
mhr_api/src/mhr_api/services/payment/payment.py
cameron-freshworks/ppr
01d6f5d300c791aebad5e58bb4601e9be2ccfc46
[ "Apache-2.0" ]
null
null
null
# Copyright © 2021 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
47.907143
119
0.590726
from flask import current_app from .client import ApiRequestError, SBCPaymentClient from .exceptions import SBCPaymentException class Payment: def __init__(self, jwt=None, account_id=None, api_key=None, details=None): self.api_url = None self.jwt = jwt self.account_id = acc...
true
true
f73ba9fd2b2b6d4288c30f167c9eaab179bde683
2,746
py
Python
tests/validator12/validate_spec_test.py
stevesimmons/swagger_spec_validator
219dd57fb4480d789b3ad381f69c1e9e03f926b7
[ "Apache-2.0" ]
null
null
null
tests/validator12/validate_spec_test.py
stevesimmons/swagger_spec_validator
219dd57fb4480d789b3ad381f69c1e9e03f926b7
[ "Apache-2.0" ]
null
null
null
tests/validator12/validate_spec_test.py
stevesimmons/swagger_spec_validator
219dd57fb4480d789b3ad381f69c1e9e03f926b7
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import mock import pytest from .validate_spec_url_test import make_mock_responses from .validate_spec_url_test import read_contents fr...
31.204545
114
0.747269
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import mock import pytest from .validate_spec_url_test import make_mock_responses from .validate_spec_url_test import read_contents from swagger_spec_validat...
true
true
f73baa04cb819f5f2be842f3c1db945ca2386b7b
8,262
py
Python
pollution_A_data_maker.py
cat-astrophic/pollution_growth
3f245a8dd957bce5aebec41a8b984f0d7aab036d
[ "MIT" ]
null
null
null
pollution_A_data_maker.py
cat-astrophic/pollution_growth
3f245a8dd957bce5aebec41a8b984f0d7aab036d
[ "MIT" ]
null
null
null
pollution_A_data_maker.py
cat-astrophic/pollution_growth
3f245a8dd957bce5aebec41a8b984f0d7aab036d
[ "MIT" ]
null
null
null
# This script creates the competition intensity values for the weighted total trade networks # Importing required modules import numpy as np import pandas as pd # Reading in the data main_data = pd.read_csv('C:/Users/User/Documents/Data/Pollution/pollution_data.csv') # Creating a list of all nations ...
35.766234
104
0.618494
import numpy as np import pandas as pd main_data = pd.read_csv('C:/Users/User/Documents/Data/Pollution/pollution_data.csv') nations = sorted(main_data.Country.unique().tolist()) CO2_df = pd.DataFrame() CH4_df = pd.DataFrame() NOX_df = pd.DataFrame() GHG_df = pd.DataFrame() def emiss...
true
true
f73bab442c5d2973e3cb2f6e90739b441342cb3b
5,949
py
Python
sacred/observers/sql.py
daliasen/sacred
e7ea9422c7172818cbce3d0703556e12faf3ac8e
[ "MIT" ]
null
null
null
sacred/observers/sql.py
daliasen/sacred
e7ea9422c7172818cbce3d0703556e12faf3ac8e
[ "MIT" ]
null
null
null
sacred/observers/sql.py
daliasen/sacred
e7ea9422c7172818cbce3d0703556e12faf3ac8e
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding=utf-8 import json from threading import Lock import warnings from sacred.commandline_options import cli_option from sacred.observers.base import RunObserver from sacred.serializer import flatten DEFAULT_SQL_PRIORITY = 40 # ############################# Observer ######################...
31.310526
83
0.567827
import json from threading import Lock import warnings from sacred.commandline_options import cli_option from sacred.observers.base import RunObserver from sacred.serializer import flatten DEFAULT_SQL_PRIORITY = 40 us, **kwargs, ) self.session.add(self.run) ...
true
true
f73bab60ac3f4dec67323ba8ad64ec2ed8c7607a
9,108
py
Python
core/utils/augmentor.py
brianchung0803/GMA
5c5647ae248f77f47d5b5cf0281933635b37e631
[ "WTFPL" ]
155
2021-04-06T04:30:35.000Z
2022-03-29T10:28:41.000Z
core/utils/augmentor.py
brianchung0803/GMA
5c5647ae248f77f47d5b5cf0281933635b37e631
[ "WTFPL" ]
21
2021-04-11T09:21:15.000Z
2022-03-15T06:45:12.000Z
core/utils/augmentor.py
brianchung0803/GMA
5c5647ae248f77f47d5b5cf0281933635b37e631
[ "WTFPL" ]
26
2021-04-09T09:57:28.000Z
2022-02-28T07:49:52.000Z
import numpy as np import random import math from PIL import Image import cv2 cv2.setNumThreads(0) cv2.ocl.setUseOpenCL(False) import torch from torchvision.transforms import ColorJitter import torch.nn.functional as F class FlowAugmentor: def __init__(self, crop_size, min_scale=-0.2, max_scale=0.5, do_flip=Tru...
36.874494
97
0.582565
import numpy as np import random import math from PIL import Image import cv2 cv2.setNumThreads(0) cv2.ocl.setUseOpenCL(False) import torch from torchvision.transforms import ColorJitter import torch.nn.functional as F class FlowAugmentor: def __init__(self, crop_size, min_scale=-0.2, max_scale=0.5, do_flip=Tru...
true
true
f73bac4341781f5243e4344c4f9199468247396d
6,451
py
Python
tomatopy/reviews.py
FinTrek/tomatopy
355f41197ae48abc62496261efd39e24c5099e9b
[ "MIT" ]
5
2019-09-08T19:32:09.000Z
2021-03-05T02:15:41.000Z
tomatopy/reviews.py
FinTrek/tomatopy
355f41197ae48abc62496261efd39e24c5099e9b
[ "MIT" ]
2
2020-07-20T18:06:12.000Z
2020-09-25T13:10:09.000Z
tomatopy/reviews.py
sjmiller8182/tomatopy
355f41197ae48abc62496261efd39e24c5099e9b
[ "MIT" ]
3
2019-12-10T22:04:46.000Z
2020-10-17T23:48:17.000Z
"""main_info.py This file contains private functions for scraping the review pages This file requires no packages. This file contains the following functions: * _get_critic_reviews_from_page - scrapes info per critic page * _get_num_pages - finds number of pages to scrape * get_critic_reviews - scrapes ...
27.926407
152
0.505813
import re import time from typing import Dict, List from .util import _make_soup from .util import get_verbose_setting from .util import _build_url page_pat = re.compile(r'Page 1 of \d+') review_pat = re.compile(r'<div class=\"the_review\">[;a-zA-Z\s,-.\'\/\?\[\]\":\']*</div>') rating_pat = re.compile(r'Orig...
true
true
f73bacaf6a208aeac998313db3bbd4a178bd8fc7
12,408
py
Python
teuthology/worker.py
zhsj/teuthology
7f11a09f2b7d7406d65f21a85fc2e3db395a95a0
[ "MIT" ]
null
null
null
teuthology/worker.py
zhsj/teuthology
7f11a09f2b7d7406d65f21a85fc2e3db395a95a0
[ "MIT" ]
1
2021-02-23T19:06:55.000Z
2021-02-23T19:06:55.000Z
teuthology/worker.py
zhsj/teuthology
7f11a09f2b7d7406d65f21a85fc2e3db395a95a0
[ "MIT" ]
null
null
null
import logging import os import subprocess import sys import tempfile import time import yaml from datetime import datetime from teuthology import setup_log_file, install_except_hook from . import beanstalk from . import report from . import safepath from .config import config as teuth_config from .config import set_...
35.757925
79
0.619278
import logging import os import subprocess import sys import tempfile import time import yaml from datetime import datetime from teuthology import setup_log_file, install_except_hook from . import beanstalk from . import report from . import safepath from .config import config as teuth_config from .config import set_...
true
true
f73bacbf2d3d133eecf2150b7cc24d0d49ff0512
6,149
py
Python
driveshell.py
nygeek/drive_inspector
447510be1c10c6a7bb6d1068a9b7912544617df7
[ "Apache-2.0" ]
null
null
null
driveshell.py
nygeek/drive_inspector
447510be1c10c6a7bb6d1068a9b7912544617df7
[ "Apache-2.0" ]
null
null
null
driveshell.py
nygeek/drive_inspector
447510be1c10c6a7bb6d1068a9b7912544617df7
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 """ Implementation of the interactive DriveInspector using the DriveFile class implemented in drivefile.py Started 2018-05-12 by Marc Donner Copyright (C) 2018 Marc Donner """ import sys from drivefilecached import DriveFileCached from drivefilecached import canonicalize_path from drivefile...
30.745
75
0.617661
import sys from drivefilecached import DriveFileCached from drivefilecached import canonicalize_path from drivefileraw import TestStats from drivefileraw import handle_ls from drivefileraw import handle_stat from drivefileraw import handle_status from drivefileraw import handle_find APPLICATION_NAME = 'Drive S...
true
true
f73bade0a862f8cd1cd1a0031c91c5c0378300f4
2,720
py
Python
repstruct/features/sift.py
oscarlorentzon/repstruct
9af72e4a7e7483b5a89261d438cef4e606c67e1b
[ "BSD-3-Clause" ]
2
2017-03-26T17:53:50.000Z
2021-03-26T07:30:17.000Z
repstruct/features/sift.py
oscarlorentzon/repstruct
9af72e4a7e7483b5a89261d438cef4e606c67e1b
[ "BSD-3-Clause" ]
null
null
null
repstruct/features/sift.py
oscarlorentzon/repstruct
9af72e4a7e7483b5a89261d438cef4e606c67e1b
[ "BSD-3-Clause" ]
null
null
null
import os import cv2 import numpy as np import multiprocessing class SiftExtractor: def __init__(self, feature_data, collection_data): """ Creates a SiftExtractor. :param feature_data: Feature data set. :param collection_data: Collection data set. """ self.__feature_dat...
32.771084
101
0.677206
import os import cv2 import numpy as np import multiprocessing class SiftExtractor: def __init__(self, feature_data, collection_data): """ Creates a SiftExtractor. :param feature_data: Feature data set. :param collection_data: Collection data set. """ self.__feature_dat...
false
true
f73bae65be8304b0a061918c202a51a48be54aee
1,485
py
Python
python/calc_vg_sim_fragment_length_stats.py
jonassibbesen/hamster-project-scripts
2d470dd028be77c9d866d67d16adc0c17d5ba819
[ "MIT" ]
3
2021-03-25T08:26:18.000Z
2022-01-05T08:45:42.000Z
python/calc_vg_sim_fragment_length_stats.py
jonassibbesen/hamster-project-scripts
2d470dd028be77c9d866d67d16adc0c17d5ba819
[ "MIT" ]
null
null
null
python/calc_vg_sim_fragment_length_stats.py
jonassibbesen/hamster-project-scripts
2d470dd028be77c9d866d67d16adc0c17d5ba819
[ "MIT" ]
1
2021-05-14T21:28:42.000Z
2021-05-14T21:28:42.000Z
''' calc_vg_sim_fragment_length_stats.py Calculates fragment length mean and standard deviation from vg sim path position output. ''' import sys import gzip import numpy from utils import * printScriptHeader() if len(sys.argv) != 3: print("Usage: python calc_vg_sim_fragment_length_stats.py <input_name> <read_le...
16.141304
89
0.679461
''' calc_vg_sim_fragment_length_stats.py Calculates fragment length mean and standard deviation from vg sim path position output. ''' import sys import gzip import numpy from utils import * printScriptHeader() if len(sys.argv) != 3: print("Usage: python calc_vg_sim_fragment_length_stats.py <input_name> <read_le...
false
true
f73bb057a27de4c93726e9102287fcb9057da455
18,729
py
Python
ceasiompy/utils/WB/UncGeometry/WithFuseGeom/Wings/wingsgeom.py
jphkun/CEASIOMpy
6425cfeb786019fccfc98aaa2fd676b2de466dac
[ "Apache-2.0" ]
33
2018-11-20T16:34:40.000Z
2022-03-29T07:26:18.000Z
ceasiompy/utils/WB/UncGeometry/WithFuseGeom/Wings/wingsgeom.py
jphkun/CEASIOMpy
6425cfeb786019fccfc98aaa2fd676b2de466dac
[ "Apache-2.0" ]
54
2019-09-17T15:57:47.000Z
2022-03-30T08:12:52.000Z
ceasiompy/utils/WB/UncGeometry/WithFuseGeom/Wings/wingsgeom.py
jphkun/CEASIOMpy
6425cfeb786019fccfc98aaa2fd676b2de466dac
[ "Apache-2.0" ]
26
2018-11-30T14:33:44.000Z
2022-03-22T07:30:18.000Z
""" CEASIOMpy: Conceptual Aircraft Design Software Developed for CFS ENGINEERING, 1015 Lausanne, Switzerland The script evaluate the wings geometry from cpacs file for an unconventional aircraft with fuselage. Python version: >=3.6 | Author : Stefano Piccini | Date of creation: 2018-09-27 | Last modifiction: 2020-0...
42.565909
92
0.527738
import numpy as np import math import ceasiompy.utils.cpacsfunctions as cpsf from ceasiompy.utils.ceasiomlogger import get_logger log = get_logger(__file__.split('.')[0]) def check_segment_connection(wing_plt_area_xz, wing_plt_area_yz, awg, tigl): log.info('-------------------------------------...
true
true
f73bb09b509696101ab4faddbf949f66ebb72e15
3,046
py
Python
homeassistant/components/ebusd/sensor.py
zalke/home-assistant
a31e49c857722c0723dc5297cd83cbce0f8716f6
[ "Apache-2.0" ]
4
2019-07-03T22:36:57.000Z
2019-08-10T15:33:25.000Z
homeassistant/components/ebusd/sensor.py
zalke/home-assistant
a31e49c857722c0723dc5297cd83cbce0f8716f6
[ "Apache-2.0" ]
7
2019-08-23T05:26:02.000Z
2022-03-11T23:57:18.000Z
homeassistant/components/ebusd/sensor.py
zalke/home-assistant
a31e49c857722c0723dc5297cd83cbce0f8716f6
[ "Apache-2.0" ]
3
2019-04-28T16:35:45.000Z
2020-05-28T15:21:59.000Z
"""Support for Ebusd sensors.""" import logging import datetime from homeassistant.helpers.entity import Entity from .const import DOMAIN TIME_FRAME1_BEGIN = 'time_frame1_begin' TIME_FRAME1_END = 'time_frame1_end' TIME_FRAME2_BEGIN = 'time_frame2_begin' TIME_FRAME2_END = 'time_frame2_end' TIME_FRAME3_BEGIN = 'time_f...
31.081633
78
0.605384
import logging import datetime from homeassistant.helpers.entity import Entity from .const import DOMAIN TIME_FRAME1_BEGIN = 'time_frame1_begin' TIME_FRAME1_END = 'time_frame1_end' TIME_FRAME2_BEGIN = 'time_frame2_begin' TIME_FRAME2_END = 'time_frame2_end' TIME_FRAME3_BEGIN = 'time_frame3_begin' TIME_FRAME3_END = 't...
true
true
f73bb0e7631b8679aea8df524130f4386f13cdca
78,203
py
Python
rx7/__init__.py
Ramin-RX7/RX7-Lib
28d2c4bc316b031bb05700c72e5119a7ff2d0ae7
[ "MIT" ]
6
2020-03-18T13:30:12.000Z
2020-09-23T21:27:42.000Z
rx7/__init__.py
Ramin-RX7/RX7-Lib
28d2c4bc316b031bb05700c72e5119a7ff2d0ae7
[ "MIT" ]
null
null
null
rx7/__init__.py
Ramin-RX7/RX7-Lib
28d2c4bc316b031bb05700c72e5119a7ff2d0ae7
[ "MIT" ]
null
null
null
''' This Module is One to Make Your Code Shorter. High API Will Make You Feel You're Ordering And Machine Is Doing! Also There is Collection of most usefull function and methods from popular modules of python. (Read Help of Functions) Official Documention Will Be Added Soon. ''' ''' Written By RX Last Update: 1-15-2021...
33.292039
276
0.552293
__version__ = '3.0.0' import os as _os import re as _re import sys as _sys import abc as _abc import time as _time import socket as _socket import typing as _typing import urllib as _urllib import shutil as _shutil import random as _random import datetime as _datetime import calendar as _calendar import re...
true
true
f73bb19619c019dc12e0183f60850cb0c0904636
3,504
py
Python
asyncmc/host.py
ContextLogic/asyncmc
1091d06f70e8d6b22914a33f9fad3f0480dde6ef
[ "MIT" ]
null
null
null
asyncmc/host.py
ContextLogic/asyncmc
1091d06f70e8d6b22914a33f9fad3f0480dde6ef
[ "MIT" ]
null
null
null
asyncmc/host.py
ContextLogic/asyncmc
1091d06f70e8d6b22914a33f9fad3f0480dde6ef
[ "MIT" ]
null
null
null
import socket import time # import logging import tornado.ioloop import tornado.iostream from tornado import gen from . import constants from . import exceptions class Host(object): def __init__(self, host, conn, debug=0): self.debug = debug self.host = host self.port = 11211 self...
30.736842
77
0.544521
import socket import time import tornado.ioloop import tornado.iostream from tornado import gen from . import constants from . import exceptions class Host(object): def __init__(self, host, conn, debug=0): self.debug = debug self.host = host self.port = 11211 self.flush_on_reconn...
true
true
f73bb217822f915c58dae277c970281d9f9cbeb8
4,808
py
Python
configs/recognition/tsm/train_kinetics10_tsm_DEAR.py
Cogito2012/DEAR
97d0e8f191da0f20dcc9721280af48171dabef5e
[ "Apache-2.0" ]
47
2021-09-02T10:42:29.000Z
2022-03-31T01:37:49.000Z
configs/recognition/tsm/train_kinetics10_tsm_DEAR.py
Cogito2012/DEAR
97d0e8f191da0f20dcc9721280af48171dabef5e
[ "Apache-2.0" ]
2
2021-12-05T02:28:42.000Z
2022-01-05T06:46:10.000Z
configs/recognition/tsm/train_kinetics10_tsm_DEAR.py
Cogito2012/DEAR
97d0e8f191da0f20dcc9721280af48171dabef5e
[ "Apache-2.0" ]
6
2021-09-19T16:31:32.000Z
2022-03-03T06:57:34.000Z
# model settings evidence_loss = dict(type='EvidenceLoss', num_classes=101, evidence='exp', loss_type='log', with_kldiv=False, with_avuloss=True, annealing_method='exp') model = dict( ...
31.84106
78
0.634567
evidence_loss = dict(type='EvidenceLoss', num_classes=101, evidence='exp', loss_type='log', with_kldiv=False, with_avuloss=True, annealing_method='exp') model = dict( type='Recognizer...
true
true
f73bb2dd8f3459edfcfe045d0234308a2d65b723
3,874
py
Python
tests/service/test_scrape.py
avwx-rest/avwx-engine
af0ec16630d1d79bca19f2610b5d2b84a782333f
[ "MIT" ]
25
2019-11-27T05:33:04.000Z
2022-02-05T04:04:44.000Z
tests/service/test_scrape.py
avwx-rest/avwx-engine
af0ec16630d1d79bca19f2610b5d2b84a782333f
[ "MIT" ]
13
2019-11-18T17:03:54.000Z
2021-09-04T03:53:55.000Z
tests/service/test_scrape.py
avwx-rest/avwx-engine
af0ec16630d1d79bca19f2610b5d2b84a782333f
[ "MIT" ]
16
2019-11-18T01:55:49.000Z
2021-09-20T03:22:58.000Z
""" ScrapeService API Tests """ # pylint: disable=protected-access,missing-class-docstring,unidiomatic-typecheck # stdlib import unittest # library import pytest # module from avwx import exceptions, service # tests from .test_base import BaseTestService class TestStationScrape(BaseTestService): service_cla...
30.265625
87
0.626226
import unittest import pytest from avwx import exceptions, service from .test_base import BaseTestService class TestStationScrape(BaseTestService): service_class = service.scrape.StationScrape report_type = "metar" required_attrs = ("method", "_strip_whitespace", "_extract") def test_servi...
true
true
f73bb3030d3a369073536d546c00b44f374d40c0
179
py
Python
backend/posts/admin.py
dla1635/hyLink
8f3d1b6b0cad57ce2f6861583eb2b523f9fceee7
[ "MIT" ]
1
2020-07-17T05:57:47.000Z
2020-07-17T05:57:47.000Z
backend/posts/admin.py
dla1635/hyLink
8f3d1b6b0cad57ce2f6861583eb2b523f9fceee7
[ "MIT" ]
11
2020-06-06T00:30:23.000Z
2022-02-26T19:59:06.000Z
backend/posts/admin.py
dla1635/hylink
8f3d1b6b0cad57ce2f6861583eb2b523f9fceee7
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Post from .models import PostComment # Register your models here. admin.site.register(Post) admin.site.register(PostComment)
22.375
32
0.815642
from django.contrib import admin from .models import Post from .models import PostComment admin.site.register(Post) admin.site.register(PostComment)
true
true
f73bb4353fbece8fa2efde026b648fd372c22f99
1,763
py
Python
src/final/cloud.py
andy971022/acg-project
e42b0f9010f5f9fc2c7eb4b9b306ae6321ddfd51
[ "MIT" ]
null
null
null
src/final/cloud.py
andy971022/acg-project
e42b0f9010f5f9fc2c7eb4b9b306ae6321ddfd51
[ "MIT" ]
null
null
null
src/final/cloud.py
andy971022/acg-project
e42b0f9010f5f9fc2c7eb4b9b306ae6321ddfd51
[ "MIT" ]
null
null
null
import taichi as ti class Atom: def __init__(self, radius, dim=3): self.radius = radius self.dim = dim self.color = ti.Vector.field(dim, ti.f32, shape=1) self.pos = ti.Vector.field(dim, ti.f32, shape=1) def display(self, scene): scene.particles(self.pos, sel...
25.550725
88
0.577425
import taichi as ti class Atom: def __init__(self, radius, dim=3): self.radius = radius self.dim = dim self.color = ti.Vector.field(dim, ti.f32, shape=1) self.pos = ti.Vector.field(dim, ti.f32, shape=1) def display(self, scene): scene.particles(self.pos, sel...
true
true
f73bb5c57e0e4c85d49cc6ebc11d319b37811b8c
13,400
py
Python
mlflow/projects/databricks.py
ToonKBC/mlflow
fb9abd87afdefc8409adea409bca329215701e6e
[ "Apache-2.0" ]
2
2019-08-31T10:18:47.000Z
2022-02-13T13:34:14.000Z
mlflow/projects/databricks.py
ToonKBC/mlflow
fb9abd87afdefc8409adea409bca329215701e6e
[ "Apache-2.0" ]
5
2018-08-29T00:46:14.000Z
2018-08-31T07:17:58.000Z
mlflow/projects/databricks.py
ToonKBC/mlflow
fb9abd87afdefc8409adea409bca329215701e6e
[ "Apache-2.0" ]
2
2019-11-06T23:26:40.000Z
2020-12-18T08:59:20.000Z
import hashlib import json import os import shutil import tempfile import textwrap import time from six.moves import shlex_quote, urllib from mlflow.entities import RunStatus from mlflow.projects import _fetch_project from mlflow.projects.submitted_run import SubmittedRun from mlflow.utils import rest_utils, file_uti...
42.948718
100
0.705522
import hashlib import json import os import shutil import tempfile import textwrap import time from six.moves import shlex_quote, urllib from mlflow.entities import RunStatus from mlflow.projects import _fetch_project from mlflow.projects.submitted_run import SubmittedRun from mlflow.utils import rest_utils, file_uti...
true
true
f73bb630fbd813595c7ca9679483fccab4cbf015
3,746
py
Python
tfx/orchestration/portable/beam_executor_operator.py
ssoudan/tfx
13979ced62b50292a5dea7be2f15205fe8469400
[ "Apache-2.0" ]
null
null
null
tfx/orchestration/portable/beam_executor_operator.py
ssoudan/tfx
13979ced62b50292a5dea7be2f15205fe8469400
[ "Apache-2.0" ]
null
null
null
tfx/orchestration/portable/beam_executor_operator.py
ssoudan/tfx
13979ced62b50292a5dea7be2f15205fe8469400
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
41.622222
80
0.761612
from typing import Optional, cast from tfx.dsl.components.base import base_beam_executor from tfx.orchestration.portable import base_executor_operator from tfx.orchestration.portable import data_types from tfx.orchestration.portable import python_executor_operator from tfx.proto.orchestration import exec...
true
true
f73bb67ebf26cb9ef88d356d3860f76c135ab477
9,421
py
Python
graph.py
govindak-umd/PlanningTkinter
a4a1a908a6b314f04d818f2430f63708e8472889
[ "MIT" ]
null
null
null
graph.py
govindak-umd/PlanningTkinter
a4a1a908a6b314f04d818f2430f63708e8472889
[ "MIT" ]
null
null
null
graph.py
govindak-umd/PlanningTkinter
a4a1a908a6b314f04d818f2430f63708e8472889
[ "MIT" ]
null
null
null
from map import map_canvas from maps_utils import Node, resolution, map_size, border_size, Obstacles from maps_utils import cost def compareNodes(node_1, node_2): """ Compares two nodes to check if they are equal :param node_1: The first node to check :type node_1: Node type :par...
30.390323
99
0.569685
from map import map_canvas from maps_utils import Node, resolution, map_size, border_size, Obstacles from maps_utils import cost def compareNodes(node_1, node_2): if (node_1.x == node_2.x) and (node_1.y == node_2.y): return True else: return False def checkinThis(node_to_check, set_to_check_...
true
true
f73bb6858525c37b2b1a3791a2397b54c1991023
5,837
py
Python
ivi/interface/pyserial.py
lude-ma/python-ivi
f62907a2922d5fc98e0a524ef6ddbaa62791ff14
[ "MIT" ]
1
2017-09-09T06:04:14.000Z
2017-09-09T06:04:14.000Z
ivi/interface/pyserial.py
lude-ma/python-ivi
f62907a2922d5fc98e0a524ef6ddbaa62791ff14
[ "MIT" ]
null
null
null
ivi/interface/pyserial.py
lude-ma/python-ivi
f62907a2922d5fc98e0a524ef6ddbaa62791ff14
[ "MIT" ]
null
null
null
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2012-2014 Alex Forencich 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...
31.38172
102
0.601336
import serial import time class SerialInstrument: def __init__(self, port = None, baudrate=9600, bytesize=8, paritymode=0, stopbits=1, timeout=None, xonxoff=False, rtscts=False, dsrdtr=False): self.serial = serial.Serial(port) self.term_char = '\n' ...
true
true
f73bb6c9a1c6370708bf1d807f69c3b493c975e9
2,100
py
Python
pyler/euler_test_base.py
ewjoachim/pyler
e672f790f1160905fc01e30893e068f4bf301317
[ "MIT" ]
1
2015-11-02T14:26:34.000Z
2015-11-02T14:26:34.000Z
pyler/euler_test_base.py
ewjoachim/pyler
e672f790f1160905fc01e30893e068f4bf301317
[ "MIT" ]
8
2015-11-05T06:23:07.000Z
2017-08-31T17:10:56.000Z
pyler/euler_test_base.py
ewjoachim/pyler
e672f790f1160905fc01e30893e068f4bf301317
[ "MIT" ]
2
2016-06-12T07:16:46.000Z
2017-08-31T14:48:41.000Z
import signal import unittest import time from . import website as w class EulerProblem(unittest.TestCase): problem_id = None def solver(self, input_val): raise NotImplementedError() simple_input = None simple_output = None real_input = None def solve_real(self): """ ...
27.272727
78
0.587143
import signal import unittest import time from . import website as w class EulerProblem(unittest.TestCase): problem_id = None def solver(self, input_val): raise NotImplementedError() simple_input = None simple_output = None real_input = None def solve_real(self): return se...
true
true
f73bba4db4a97e0ebfc82fc883c1b0a11f38eb55
26,654
py
Python
sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_06_01/aio/operations/_file_shares_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
2
2021-03-24T06:26:11.000Z
2021-04-18T15:55:59.000Z
sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_06_01/aio/operations/_file_shares_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
4
2019-04-17T17:57:49.000Z
2020-04-24T21:11:22.000Z
sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_06_01/aio/operations/_file_shares_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
2
2021-05-23T16:46:31.000Z
2021-05-26T23:51:09.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 may ...
52.571992
222
0.66928
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure....
true
true
f73bbabaa02afed3536fbd7c2a143b110ce1acf6
4,367
py
Python
testCases.py
AndresJejen/MachineLearningSpanishTalleres
538e0bd05125cf4fcd74e34d092f14aacc1bf182
[ "Apache-2.0" ]
3
2019-08-20T18:36:58.000Z
2020-04-23T20:47:25.000Z
testCases.py
AndresJejen/MachineLearningSpanishTalleres
538e0bd05125cf4fcd74e34d092f14aacc1bf182
[ "Apache-2.0" ]
1
2020-03-25T20:30:59.000Z
2020-03-25T20:30:59.000Z
testCases.py
AndresJejen/MachineLearningSpanishTalleres
538e0bd05125cf4fcd74e34d092f14aacc1bf182
[ "Apache-2.0" ]
null
null
null
import numpy as np def compute_cost_with_regularization_test_case(): np.random.seed(1) Y_assess = np.array([[1, 1, 0, 1, 0]]) W1 = np.random.randn(2, 3) b1 = np.random.randn(2, 1) W2 = np.random.randn(3, 2) b2 = np.random.randn(3, 1) W3 = np.random.randn(1, 3) b3 = np.random.randn(1, 1...
53.256098
264
0.533776
import numpy as np def compute_cost_with_regularization_test_case(): np.random.seed(1) Y_assess = np.array([[1, 1, 0, 1, 0]]) W1 = np.random.randn(2, 3) b1 = np.random.randn(2, 1) W2 = np.random.randn(3, 2) b2 = np.random.randn(3, 1) W3 = np.random.randn(1, 3) b3 = np.random.randn(1, 1...
false
true
f73bbcedcd25303f7209490e28a550849e1245fb
3,711
py
Python
supriya/ugens/MulAdd.py
deeuu/supriya
14fcb5316eccb4dafbe498932ceff56e1abb9d27
[ "MIT" ]
null
null
null
supriya/ugens/MulAdd.py
deeuu/supriya
14fcb5316eccb4dafbe498932ceff56e1abb9d27
[ "MIT" ]
null
null
null
supriya/ugens/MulAdd.py
deeuu/supriya
14fcb5316eccb4dafbe498932ceff56e1abb9d27
[ "MIT" ]
null
null
null
import collections from supriya import CalculationRate from supriya.synthdefs import UGen class MulAdd(UGen): """ An Optimized multiplication / addition ugen. :: >>> source = supriya.ugens.SinOsc.ar() >>> mul_add = supriya.ugens.MulAdd.new( ... addend=0.5, ... mu...
28.328244
87
0.537591
import collections from supriya import CalculationRate from supriya.synthdefs import UGen class MulAdd(UGen): UGens" _ordered_input_names = collections.OrderedDict( [("source", None), ("multiplier", 1.0), ("addend", 0.0)] ) iplier=1.0, calculation_rate=None, source=None): UGen.__i...
true
true
f73bbdcc0b57b7ad395633254e4bb235902586b0
1,400
py
Python
pictures/tests.py
leezichanga/gallery
cd1b84ab204098b85109d4030024a04494500c83
[ "MIT" ]
null
null
null
pictures/tests.py
leezichanga/gallery
cd1b84ab204098b85109d4030024a04494500c83
[ "MIT" ]
null
null
null
pictures/tests.py
leezichanga/gallery
cd1b84ab204098b85109d4030024a04494500c83
[ "MIT" ]
null
null
null
from django.test import TestCase import datetime as dt # Create your tests here. from .models import Photos, categories, Location class LocationTestClass(TestCase): def setUp(self): self.location = Location(name = 'Nairobi') def test_instance(self): self.assertTrue(isinstance(self.location, Lo...
32.55814
62
0.697857
from django.test import TestCase import datetime as dt from .models import Photos, categories, Location class LocationTestClass(TestCase): def setUp(self): self.location = Location(name = 'Nairobi') def test_instance(self): self.assertTrue(isinstance(self.location, Location)) def test_sa...
true
true
f73bc0c617b8098d0b17d0993ff0d79ec005a361
4,853
py
Python
nova/tests/api/test_auth.py
bopopescu/nova-34
b037993984229bb698050f20e8719b8c06ff2be3
[ "Apache-2.0" ]
null
null
null
nova/tests/api/test_auth.py
bopopescu/nova-34
b037993984229bb698050f20e8719b8c06ff2be3
[ "Apache-2.0" ]
null
null
null
nova/tests/api/test_auth.py
bopopescu/nova-34
b037993984229bb698050f20e8719b8c06ff2be3
[ "Apache-2.0" ]
1
2020-07-24T08:52:14.000Z
2020-07-24T08:52:14.000Z
# Copyright (c) 2012 OpenStack Foundation # # 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 ...
38.515873
78
0.675665
import json import webob import webob.exc import nova.api.auth from nova.openstack.common.gettextutils import _ from nova import test class TestNovaKeystoneContextMiddleware(test.TestCase): def setUp(self): super(TestNovaKeystoneContextMiddleware, self).setUp() @webob.dec.wsgify()...
true
true
f73bc0eac30c71689b230efc46d89e81363191f5
5,271
py
Python
tests/test_tools_pdf2txt.py
ehtec/pdfminer.six
5b1823f25ab998e904fc5d81687732580f23e3b9
[ "MIT" ]
null
null
null
tests/test_tools_pdf2txt.py
ehtec/pdfminer.six
5b1823f25ab998e904fc5d81687732580f23e3b9
[ "MIT" ]
1
2022-01-31T22:58:07.000Z
2022-01-31T22:58:07.000Z
tests/test_tools_pdf2txt.py
phantomcyber/pdfminer.six
e35a9319a6ae5d310f08f07a5edf16aadc529c1e
[ "MIT" ]
null
null
null
import os from shutil import rmtree from tempfile import mkdtemp import filecmp import tools.pdf2txt as pdf2txt from helpers import absolute_sample_path from tempfilepath import TemporaryFilePath def run(sample_path, options=None): absolute_path = absolute_sample_path(sample_path) with TemporaryFilePath() as...
30.824561
79
0.631379
import os from shutil import rmtree from tempfile import mkdtemp import filecmp import tools.pdf2txt as pdf2txt from helpers import absolute_sample_path from tempfilepath import TemporaryFilePath def run(sample_path, options=None): absolute_path = absolute_sample_path(sample_path) with TemporaryFilePath() as...
true
true
f73bc29ff3af8410bbb96bd8e7e64ac5bb1fdf19
15,260
py
Python
electrumsv/plugins/keepkey/plugin.py
bakketun/electrumsv
1ed5b3d5b3f7e25d742d8634258322eee616d31a
[ "MIT" ]
null
null
null
electrumsv/plugins/keepkey/plugin.py
bakketun/electrumsv
1ed5b3d5b3f7e25d742d8634258322eee616d31a
[ "MIT" ]
null
null
null
electrumsv/plugins/keepkey/plugin.py
bakketun/electrumsv
1ed5b3d5b3f7e25d742d8634258322eee616d31a
[ "MIT" ]
null
null
null
from binascii import hexlify, unhexlify import logging import threading from electrumsv.util import bfh, bh2u from electrumsv.bitcoin import (xpub_from_pubkey, TYPE_ADDRESS, TYPE_SCRIPT) from electrumsv.i18n import _ from electrumsv.transaction import deserialize from electrumsv.keystore import Hardware_KeyStore, is_x...
42.506964
99
0.570052
from binascii import hexlify, unhexlify import logging import threading from electrumsv.util import bfh, bh2u from electrumsv.bitcoin import (xpub_from_pubkey, TYPE_ADDRESS, TYPE_SCRIPT) from electrumsv.i18n import _ from electrumsv.transaction import deserialize from electrumsv.keystore import Hardware_KeyStore, is_x...
true
true
f73bc3c35cf8b628e17a0d52b9fa434563da7ac3
1,723
py
Python
nicos_ess/devices/sample.py
ebadkamil/nicos
0355a970d627aae170c93292f08f95759c97f3b5
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
12
2019-11-06T15:40:36.000Z
2022-01-01T16:23:00.000Z
nicos_ess/devices/sample.py
ebadkamil/nicos
0355a970d627aae170c93292f08f95759c97f3b5
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
4
2019-11-08T10:18:16.000Z
2021-01-13T13:07:29.000Z
nicos_ess/devices/sample.py
ISISComputingGroup/nicos
94cb4d172815919481f8c6ee686f21ebb76f2068
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
6
2020-01-11T10:52:30.000Z
2022-02-25T12:35:23.000Z
# -*- coding: utf-8 -*- # ***************************************************************************** # NICOS, the Networked Instrument Control System of the MLZ # Copyright (c) 2009-2021 by the NICOS contributors (see AUTHORS) # # This program is free software; you can redistribute it and/or modify it under # the t...
41.02381
80
0.617528
from nicos.core import Param from nicos.devices.sample import Sample class EssSample(Sample): parameters = { 'sample_formula': Param('formula', type=str, settable=True, category='sample'), 'number_of': Param('number_of', type=int, settable=Tr...
true
true
f73bc42bb01cf765912667e9767ac3fa3ea463af
958
py
Python
stubs.min/Autodesk/Revit/DB/Structure/__init___parts/FabricLocation.py
ricardyn/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
1
2021-02-02T13:39:16.000Z
2021-02-02T13:39:16.000Z
stubs.min/Autodesk/Revit/DB/Structure/__init___parts/FabricLocation.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
stubs.min/Autodesk/Revit/DB/Structure/__init___parts/FabricLocation.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
class FabricLocation(Enum,IComparable,IFormattable,IConvertible): """ Fabric location in the host enum FabricLocation,values: BottomOrInternal (1),TopOrExternal (0) """ def __eq__(self,*args): """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self,*args):...
28.176471
215
0.670146
class FabricLocation(Enum,IComparable,IFormattable,IConvertible): pass """ __format__(formattable: IFormattable,format: str) -> str """ pass pass def __gt__(self,*args): pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializ...
true
true
f73bc4c189664fae6606da82f7b39a941a5cbaaf
1,126
py
Python
chanjet_openapi_python_sdk/response/get_token_by_permanent_code_response.py
Chanjet/chanjet-openapi-python-sdk-
a076ce11d6d1789e657b96d72bbbcff594dbb4e9
[ "MIT" ]
2
2021-08-12T05:22:56.000Z
2021-09-08T09:03:38.000Z
chanjet_openapi_python_sdk/response/get_token_by_permanent_code_response.py
Chanjet/chanjet-openapi-python-sdk
a076ce11d6d1789e657b96d72bbbcff594dbb4e9
[ "MIT" ]
null
null
null
chanjet_openapi_python_sdk/response/get_token_by_permanent_code_response.py
Chanjet/chanjet-openapi-python-sdk
a076ce11d6d1789e657b96d72bbbcff594dbb4e9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # @Time : 2021/8/10 17:00 # @Author : zc # @Desc : 使用用户永久授权码获取token返回值实体 from chanjet_openapi_python_sdk.chanjet_response import ChanjetResponse class GetTokenByPermanentCodeResponse(ChanjetResponse): def __init__(self, data=None): # 错误码,200为成功,其余均为失败 self.code = ''...
23.957447
71
0.498224
from chanjet_openapi_python_sdk.chanjet_response import ChanjetResponse class GetTokenByPermanentCodeResponse(ChanjetResponse): def __init__(self, data=None): self.code = '' self.message = '' self.result = self.Result() if data: self.__d...
true
true
f73bc4db4816d2dbd36250077c5be4d509744fdc
1,588
py
Python
tests/test_stack_trace.py
PostCenter/botlang
09f59cc4f8870507fab6101aecea65b316a347e8
[ "MIT" ]
1
2020-11-27T14:41:47.000Z
2020-11-27T14:41:47.000Z
tests/test_stack_trace.py
PostCenter/botlang
09f59cc4f8870507fab6101aecea65b316a347e8
[ "MIT" ]
8
2019-01-03T17:33:14.000Z
2019-07-15T21:16:30.000Z
tests/test_stack_trace.py
PostCenter/botlang
09f59cc4f8870507fab6101aecea65b316a347e8
[ "MIT" ]
1
2019-05-01T22:13:07.000Z
2019-05-01T22:13:07.000Z
import unittest from botlang import BotlangSystem, BotlangErrorException class StackTraceTestCase(unittest.TestCase): def test_stack_trace(self): code = """ (begin (define f (fun (n) (fun (x) (n x)) ) ...
27.37931
69
0.460327
import unittest from botlang import BotlangSystem, BotlangErrorException class StackTraceTestCase(unittest.TestCase): def test_stack_trace(self): code = """ (begin (define f (fun (n) (fun (x) (n x)) ) ...
true
true
f73bc50bfe94c33ef3618b2328c15b59c71f9efa
1,841
py
Python
pylot/planning/messages.py
mageofboy/pylot
c3154dc24c9429b9916274894c72ef92e03c946d
[ "Apache-2.0" ]
231
2019-06-05T00:22:00.000Z
2022-03-28T06:15:00.000Z
pylot/planning/messages.py
mageofboy/pylot
c3154dc24c9429b9916274894c72ef92e03c946d
[ "Apache-2.0" ]
108
2019-06-27T16:28:01.000Z
2022-03-28T19:14:18.000Z
pylot/planning/messages.py
mageofboy/pylot
c3154dc24c9429b9916274894c72ef92e03c946d
[ "Apache-2.0" ]
80
2019-06-07T01:08:13.000Z
2022-03-28T01:44:42.000Z
import erdos class WaypointsMessage(erdos.Message): """Message class to be used to send waypoints. Optionally can also send a target speed for each waypoint. Args: timestamp (:py:class:`erdos.timestamp.Timestamp`): The timestamp of the message. waypoints (:py:class:`~pylot.pl...
34.735849
75
0.614883
import erdos class WaypointsMessage(erdos.Message): def __init__(self, timestamp: erdos.Timestamp, waypoints, agent_state=None): super(WaypointsMessage, self).__init__(timestamp, None) self.waypoints = waypoints self.agent_state = agent_st...
true
true
f73bc58554bc45d34294bd53ef6960d1a81ec583
16,074
py
Python
dev-tools/create_bwc_index.py
WuXinxinJH/elasticsearch
b3105bd316f29666d0dbbbc36630911a6505c64e
[ "Apache-2.0" ]
null
null
null
dev-tools/create_bwc_index.py
WuXinxinJH/elasticsearch
b3105bd316f29666d0dbbbc36630911a6505c64e
[ "Apache-2.0" ]
null
null
null
dev-tools/create_bwc_index.py
WuXinxinJH/elasticsearch
b3105bd316f29666d0dbbbc36630911a6505c64e
[ "Apache-2.0" ]
null
null
null
# Licensed to Elasticsearch under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this file except...
34.642241
146
0.642466
import argparse import glob import logging import os import random import shutil import subprocess import sys import tempfile import time DEFAULT_TRANSPORT_TCP_PORT = 9300 DEFAULT_HTTP_TCP_PORT = 9200 if sys.version_info[0] < 3: print('%s must use python 3.x (for the ES python client)' % sys.argv[0]...
true
true
f73bc6614746699add4f9c6f4cb2086b981052b2
5,614
py
Python
tools/nntool/generation/naming_convension.py
VishalSharma0309/gap_sdk
09ccc594a3696a84953b732022cecae11e751c97
[ "Apache-2.0" ]
null
null
null
tools/nntool/generation/naming_convension.py
VishalSharma0309/gap_sdk
09ccc594a3696a84953b732022cecae11e751c97
[ "Apache-2.0" ]
null
null
null
tools/nntool/generation/naming_convension.py
VishalSharma0309/gap_sdk
09ccc594a3696a84953b732022cecae11e751c97
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2020 GreenWaves Technologies, SAS # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # This progr...
47.576271
104
0.608479
from abc import ABC, abstractmethod from graph.types import (ConcatParameters, Conv2DParameters, FcParameters, SoftMaxParameters, ConvFusionParameters, PoolingParameters, ActivationParameters, MatrixAddParameters, ActivationFusion, ...
true
true
f73bc714371e6e276e74ba36b3cb926f86c66561
315
py
Python
custom_features/__init__.py
softmatterlab/DeepTrack-2.0-app
3bc661987cba53519ebefcc0b7221994a6e2d317
[ "MIT" ]
null
null
null
custom_features/__init__.py
softmatterlab/DeepTrack-2.0-app
3bc661987cba53519ebefcc0b7221994a6e2d317
[ "MIT" ]
6
2020-10-27T15:50:49.000Z
2021-10-19T14:37:47.000Z
custom_features/__init__.py
softmatterlab/DeepTrack-2.0-app
3bc661987cba53519ebefcc0b7221994a6e2d317
[ "MIT" ]
3
2020-10-16T11:04:42.000Z
2021-10-19T14:26:52.000Z
from os.path import dirname, basename, isfile, join, abspath import glob import sys sys.path.append(abspath(join(dirname(__file__), "../python_src/"))) modules = glob.glob(join(dirname(__file__), "*.py")) __all__ = [ basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')] from . import *
39.375
93
0.71746
from os.path import dirname, basename, isfile, join, abspath import glob import sys sys.path.append(abspath(join(dirname(__file__), "../python_src/"))) modules = glob.glob(join(dirname(__file__), "*.py")) __all__ = [ basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')] from . import *
true
true
f73bc9082420d414d2f62dd154d0c60feed4bce3
1,948
py
Python
tests/TestCar.py
TestowanieAutomatyczneUG/laboratorium-9-stokwiszadrian
2bdb395bcbdcd86b30523841077705426ac0bdce
[ "MIT" ]
null
null
null
tests/TestCar.py
TestowanieAutomatyczneUG/laboratorium-9-stokwiszadrian
2bdb395bcbdcd86b30523841077705426ac0bdce
[ "MIT" ]
null
null
null
tests/TestCar.py
TestowanieAutomatyczneUG/laboratorium-9-stokwiszadrian
2bdb395bcbdcd86b30523841077705426ac0bdce
[ "MIT" ]
null
null
null
from src.Car import Car from src.CarImpl import CarImpl from unittest.mock import * from unittest import TestCase, main class test_Car(TestCase): def test_needsfuel_true(self): car = Car() car.needsFuel = Mock(name='needsFuel') car.needsFuel.return_value = True carImpl = CarImpl(ca...
36.754717
107
0.679158
from src.Car import Car from src.CarImpl import CarImpl from unittest.mock import * from unittest import TestCase, main class test_Car(TestCase): def test_needsfuel_true(self): car = Car() car.needsFuel = Mock(name='needsFuel') car.needsFuel.return_value = True carImpl = CarImpl(ca...
true
true
f73bcc307906ada8eceee6a21267b925ade3c652
13,646
py
Python
deeppavlov/core/layers/tf_csoftmax_attention.py
ineersa/DeepPavlov
8200bf9a0f0b378baad4ee0eb75b59453f516004
[ "Apache-2.0" ]
3
2020-04-16T04:25:10.000Z
2021-05-07T23:04:43.000Z
deeppavlov/core/layers/tf_csoftmax_attention.py
ineersa/DeepPavlov
8200bf9a0f0b378baad4ee0eb75b59453f516004
[ "Apache-2.0" ]
12
2020-01-28T22:14:04.000Z
2022-02-10T00:10:17.000Z
deeppavlov/core/layers/tf_csoftmax_attention.py
ineersa/DeepPavlov
8200bf9a0f0b378baad4ee0eb75b59453f516004
[ "Apache-2.0" ]
1
2021-02-05T13:01:48.000Z
2021-02-05T13:01:48.000Z
# Copyright 2017 Neural Networks and Deep Learning lab, MIPT # # 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...
53.724409
184
0.708413
import tensorflow as tf def csoftmax_for_slice(input): [ten, u] = input shape_t = ten.shape shape_u = u.shape ten -= tf.reduce_mean(ten) q = tf.exp(ten) active = tf.ones_like(u, dtype=tf.int32) mass = tf.constant(0, dtype=tf.float32) found = tf.constant(True, dtype=tf....
true
true
f73bcc8c71ca0e10ea57d961a9ac78839381bf3c
6,431
py
Python
tests/test_numeric_switchedsystem.py
ralfgerlich/simupy
7716c95ab51b63483278208230758dfdcd1a2b51
[ "BSD-2-Clause" ]
436
2017-08-30T06:55:26.000Z
2022-03-18T04:08:00.000Z
tests/test_numeric_switchedsystem.py
ralfgerlich/simupy
7716c95ab51b63483278208230758dfdcd1a2b51
[ "BSD-2-Clause" ]
25
2017-09-07T15:42:11.000Z
2022-03-24T15:57:34.000Z
tests/test_numeric_switchedsystem.py
ralfgerlich/simupy
7716c95ab51b63483278208230758dfdcd1a2b51
[ "BSD-2-Clause" ]
60
2017-09-07T14:17:07.000Z
2022-02-10T05:44:27.000Z
import pytest import numpy as np import numpy.testing as npt from simupy.systems import (SwitchedSystem, need_state_equation_function_msg, need_output_equation_function_msg, zero_dim_output_msg, full_state_output) max_n_condition = 4 bounds_min = -1 bounds_max = ...
34.390374
78
0.684497
import pytest import numpy as np import numpy.testing as npt from simupy.systems import (SwitchedSystem, need_state_equation_function_msg, need_output_equation_function_msg, zero_dim_output_msg, full_state_output) max_n_condition = 4 bounds_min = -1 bounds_max = ...
true
true
f73bcce97ee70082397ca731afbe74c12863cdc9
5,318
py
Python
examples/niscope/fetch.py
vvacharya/grpc-device
22326f69b83d774457c0f5409b71ce7fc66002f6
[ "MIT" ]
null
null
null
examples/niscope/fetch.py
vvacharya/grpc-device
22326f69b83d774457c0f5409b71ce7fc66002f6
[ "MIT" ]
null
null
null
examples/niscope/fetch.py
vvacharya/grpc-device
22326f69b83d774457c0f5409b71ce7fc66002f6
[ "MIT" ]
null
null
null
r"""Initiate an acquisition and fetch a waveform for each specified channel. The gRPC API is built from the C API. NI-SCOPE documentation is installed with the driver at: C:\Program Files (x86)\IVI Foundation\IVI\Drivers\niScope\Documentation\English\Digitizers.chm A version of this .chm is available online at: h...
33.658228
100
0.678827
import sys import grpc import niscope_pb2 as niscope_types import niscope_pb2_grpc as grpc_niscope SERVER_ADDRESS = "localhost" SERVER_PORT = "31763" RESOURCE = "SimulatedScope" OPTIONS = "Simulate=1, DriverSetup=Model:5164; BoardType:PXIe" CHANNELS = "0" if len(sys.argv) >= 2: SERVER_ADDRESS = sys.argv[1]...
true
true
f73bcd99a3c7c808b15a9439df00b8a3368de919
6,063
py
Python
demoapp/settings/base.py
praekelt/molo-surveysdemo
fc6f3f9e64f3c16bd3a774186e4699f756e36147
[ "BSD-2-Clause" ]
null
null
null
demoapp/settings/base.py
praekelt/molo-surveysdemo
fc6f3f9e64f3c16bd3a774186e4699f756e36147
[ "BSD-2-Clause" ]
null
null
null
demoapp/settings/base.py
praekelt/molo-surveysdemo
fc6f3f9e64f3c16bd3a774186e4699f756e36147
[ "BSD-2-Clause" ]
null
null
null
""" Django settings for base demoapp. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ from os.path import abspath, dirname, join from django.conf import global_set...
27.066964
81
0.70856
from os.path import abspath, dirname, join from django.conf import global_settings from django.utils.translation import ugettext_lazy as _ import dj_database_url import djcelery from celery.schedules import crontab djcelery.setup_loader() PROJECT_ROOT = dirname(dirname(dirname(abspath(__file__)))) SECRET_KEY =...
true
true
f73bcebdd2a730d1c6d54902c36ea152cddb678f
49,581
py
Python
ta/trend.py
amalekji/trading-tech-analysis
b360062d6b2a31f0bf237e42a9a399d3b1f6c306
[ "MIT" ]
1
2020-07-18T09:05:57.000Z
2020-07-18T09:05:57.000Z
ta/trend.py
amalekji/trading-tech-analysis
b360062d6b2a31f0bf237e42a9a399d3b1f6c306
[ "MIT" ]
null
null
null
ta/trend.py
amalekji/trading-tech-analysis
b360062d6b2a31f0bf237e42a9a399d3b1f6c306
[ "MIT" ]
1
2020-08-25T18:16:11.000Z
2020-08-25T18:16:11.000Z
""" .. module:: trend :synopsis: Trend Indicators. .. moduleauthor:: Dario Lopez Padial (Bukosabino) """ import numpy as np import pandas as pd from ta.utils import IndicatorMixin, ema, get_min_max, sma class AroonIndicator(IndicatorMixin): """Aroon Indicator Identify when trends are likely to change d...
34.479138
112
0.624675
import numpy as np import pandas as pd from ta.utils import IndicatorMixin, ema, get_min_max, sma class AroonIndicator(IndicatorMixin): def __init__(self, close: pd.Series, n: int = 25, fillna: bool = False): self._close = close self._n = n self._fillna = fillna self._run() ...
true
true
f73bcf9c573fc1a2d38793abf9f74c5ab13b74b0
414
py
Python
migrations/versions/008_Add_deleted_flag_to_batch.py
LCBRU/batch_demographics
e516e958091fd74dad00b1705431ac030e3c4503
[ "MIT" ]
null
null
null
migrations/versions/008_Add_deleted_flag_to_batch.py
LCBRU/batch_demographics
e516e958091fd74dad00b1705431ac030e3c4503
[ "MIT" ]
null
null
null
migrations/versions/008_Add_deleted_flag_to_batch.py
LCBRU/batch_demographics
e516e958091fd74dad00b1705431ac030e3c4503
[ "MIT" ]
null
null
null
from sqlalchemy import MetaData, Table, Column, Boolean meta = MetaData() def upgrade(migrate_engine): meta = MetaData(bind=migrate_engine) batch = Table("batch", meta, autoload=True) deleted = Column("deleted", Boolean()) deleted.create(batch) def downgrade(migrate_engine): meta = MetaData(bi...
23
55
0.705314
from sqlalchemy import MetaData, Table, Column, Boolean meta = MetaData() def upgrade(migrate_engine): meta = MetaData(bind=migrate_engine) batch = Table("batch", meta, autoload=True) deleted = Column("deleted", Boolean()) deleted.create(batch) def downgrade(migrate_engine): meta = MetaData(bi...
true
true
f73bd153e1be469d4bf090142eeaf0c8c121dfd4
737
py
Python
paragen/modules/search/abstract_search.py
godweiyang/ParaGen
9665d1244ea38a41fc06b4e0a7f6411985e2221f
[ "Apache-2.0" ]
50
2022-01-18T07:25:46.000Z
2022-03-14T13:06:18.000Z
paragen/modules/search/abstract_search.py
JiangtaoFeng/ParaGen
509334bf16e3674e009bb9dc37ecc38ae3b5c977
[ "Apache-2.0" ]
2
2022-01-19T09:36:42.000Z
2022-02-23T07:16:02.000Z
paragen/modules/search/abstract_search.py
JiangtaoFeng/ParaGen
509334bf16e3674e009bb9dc37ecc38ae3b5c977
[ "Apache-2.0" ]
6
2022-01-19T09:28:53.000Z
2022-03-10T10:20:08.000Z
from torch.nn import Module class AbstractSearch(Module): """ AbstractSearch is search algorithm on original neural model to perform special inference. """ def __init__(self): super().__init__() self._mode = 'infer' def build(self, *args, **kwargs): """ Build sear...
22.333333
93
0.576662
from torch.nn import Module class AbstractSearch(Module): def __init__(self): super().__init__() self._mode = 'infer' def build(self, *args, **kwargs): raise NotImplementedError def forward(self, *args, **kwargs): raise NotImplementedError def reset(self, mode): ...
true
true
f73bd166cfd3612d52cefc09b1c71b0426f1c099
1,991
py
Python
stellar_sdk/operation/utils.py
bantalon/py-stellar-base
b452f0f92be0387c3e78c8149103978788d7ec0f
[ "Apache-2.0" ]
null
null
null
stellar_sdk/operation/utils.py
bantalon/py-stellar-base
b452f0f92be0387c3e78c8149103978788d7ec0f
[ "Apache-2.0" ]
null
null
null
stellar_sdk/operation/utils.py
bantalon/py-stellar-base
b452f0f92be0387c3e78c8149103978788d7ec0f
[ "Apache-2.0" ]
null
null
null
from decimal import Decimal from typing import Optional, Union from ..asset import Asset from ..exceptions import ValueError, TypeError from ..keypair import Keypair from ..muxed_account import MuxedAccount from ..price import Price from ..strkey import StrKey _LOWER_LIMIT = "0" _UPPER_LIMIT = "922337203685.4775807" ...
31.109375
88
0.696133
from decimal import Decimal from typing import Optional, Union from ..asset import Asset from ..exceptions import ValueError, TypeError from ..keypair import Keypair from ..muxed_account import MuxedAccount from ..price import Price from ..strkey import StrKey _LOWER_LIMIT = "0" _UPPER_LIMIT = "922337203685.4775807" ...
true
true
f73bd18b9f473cc357560a995441df733d0f54c0
6,550
py
Python
datasets.py
smarsu/mtcnn
98c3839e250b18c310efa920bc6289a70379f07d
[ "MIT" ]
null
null
null
datasets.py
smarsu/mtcnn
98c3839e250b18c310efa920bc6289a70379f07d
[ "MIT" ]
null
null
null
datasets.py
smarsu/mtcnn
98c3839e250b18c310efa920bc6289a70379f07d
[ "MIT" ]
null
null
null
# -------------------------------------------------------- # Face Datasets # Licensed under The MIT License [see LICENSE for details] # Copyright 2019 smarsu. All Rights Reserved. # -------------------------------------------------------- import os.path as osp import numpy as np class Dataset(object): ...
32.26601
90
0.528244
import os.path as osp import numpy as np class Dataset(object): def __init__(self): pass @property def size(self): raise NotImplementedError def train_datas_debug(self, batch_size): if not isinstance(batch_size, int): raise ValueError('In ...
true
true
f73bd1bb0270072247ca3475da9fed4222ddf23e
164
py
Python
learning/drafts/random_nums.py
medale/pyschool
2bec74d602e3d323e6645c9ec661086cfa076037
[ "Apache-2.0" ]
null
null
null
learning/drafts/random_nums.py
medale/pyschool
2bec74d602e3d323e6645c9ec661086cfa076037
[ "Apache-2.0" ]
null
null
null
learning/drafts/random_nums.py
medale/pyschool
2bec74d602e3d323e6645c9ec661086cfa076037
[ "Apache-2.0" ]
null
null
null
import random def random_nums(): random_float = random.random() random_int = random.randint(1, 100) random_elem = random.choice(['heads', 'tails'])
16.4
51
0.670732
import random def random_nums(): random_float = random.random() random_int = random.randint(1, 100) random_elem = random.choice(['heads', 'tails'])
true
true
f73bd205e0400dad8111ce0cd70ef44926b2fd7f
4,930
py
Python
examples/learning_graph_embedding_and_predicting.py
YannCabanes/geomstats
ce3f4bab6cd59c2f071371a46e336086771d0493
[ "MIT" ]
743
2018-05-23T02:23:29.000Z
2022-03-29T22:59:22.000Z
examples/learning_graph_embedding_and_predicting.py
YannCabanes/geomstats
ce3f4bab6cd59c2f071371a46e336086771d0493
[ "MIT" ]
1,119
2018-05-15T05:29:38.000Z
2022-03-31T18:27:02.000Z
examples/learning_graph_embedding_and_predicting.py
YannCabanes/geomstats
ce3f4bab6cd59c2f071371a46e336086771d0493
[ "MIT" ]
159
2018-05-23T17:49:24.000Z
2022-03-30T16:44:47.000Z
"""Learning embedding of graph using Poincare Ball Model.""" import matplotlib.patches as mpatches import matplotlib.pyplot as plt import geomstats.backend as gs import geomstats.visualization as visualization from geomstats.datasets.prepare_graph_data import HyperbolicEmbedding from geomstats.datasets.utils import l...
32.866667
87
0.65071
import matplotlib.patches as mpatches import matplotlib.pyplot as plt import geomstats.backend as gs import geomstats.visualization as visualization from geomstats.datasets.prepare_graph_data import HyperbolicEmbedding from geomstats.datasets.utils import load_karate_graph from geomstats.learning.kmeans import Rieman...
true
true
f73bd25ec6cf4c0e5139d31719717efc84f6ced8
5,798
py
Python
tests/test_config_parser.py
songchenwen/icloud-drive-docker
7188dfbcc34e29ddbeeb1324c62ea77bed8f0576
[ "BSD-3-Clause" ]
null
null
null
tests/test_config_parser.py
songchenwen/icloud-drive-docker
7188dfbcc34e29ddbeeb1324c62ea77bed8f0576
[ "BSD-3-Clause" ]
null
null
null
tests/test_config_parser.py
songchenwen/icloud-drive-docker
7188dfbcc34e29ddbeeb1324c62ea77bed8f0576
[ "BSD-3-Clause" ]
null
null
null
__author__ = 'Mandar Patil (mandarons@pm.me)' import os import unittest from src import config_parser, constants class TestConfigParser(unittest.TestCase): def setUp(self) -> None: pass def tearDown(self) -> None: pass def test_read_config_valids(self): # Default config path ...
40.830986
109
0.703518
__author__ = 'Mandar Patil (mandarons@pm.me)' import os import unittest from src import config_parser, constants class TestConfigParser(unittest.TestCase): def setUp(self) -> None: pass def tearDown(self) -> None: pass def test_read_config_valids(self): self.assertIsN...
true
true
f73bd334cf9a9c49b25222410d6a13cf4e8cb04d
4,386
py
Python
codesearch/retrieval.py
chinchila/codesearch
eba4c08d9098cbbfbf9caf252c608b61a63d1d1a
[ "BSD-3-Clause" ]
30
2020-08-27T13:54:23.000Z
2022-03-17T03:41:05.000Z
codesearch/retrieval.py
pritam004/Neural-Code-Search
9b91ce40e8a727932302436c4de2eddb04ebb396
[ "BSD-3-Clause" ]
1
2021-06-07T11:22:52.000Z
2021-06-07T11:22:52.000Z
codesearch/retrieval.py
pritam004/Neural-Code-Search
9b91ce40e8a727932302436c4de2eddb04ebb396
[ "BSD-3-Clause" ]
4
2021-06-06T02:52:40.000Z
2022-01-26T07:05:58.000Z
# © 2020 Nokia # # Licensed under the BSD 3 Clause license # # SPDX-License-Identifier: BSD-3-Clause # ============================================ import functools import sys import numpy as np from codesearch.utils import Saveable from codesearch.data_config import DESCRIPTION_FIELD, CODE_FIELD class Retrie...
33.480916
117
0.553808
import functools import sys import numpy as np from codesearch.utils import Saveable from codesearch.data_config import DESCRIPTION_FIELD, CODE_FIELD class RetrievalModel(Saveable): def __init__(self): super().__init__() self._id2snippet = {} def query(self, query, ...
true
true
f73bd3c4156de1c614cdd8360761e6080312f66a
470
py
Python
876. Middle of the Linked List.py
rohitpatwa/leetcode
f4826763e8f154cac9134d53b154b8299acd39a8
[ "Xnet", "X11", "CECILL-B" ]
1
2020-07-15T20:48:27.000Z
2020-07-15T20:48:27.000Z
876. Middle of the Linked List.py
rohitpatwa/leetcode
f4826763e8f154cac9134d53b154b8299acd39a8
[ "Xnet", "X11", "CECILL-B" ]
null
null
null
876. Middle of the Linked List.py
rohitpatwa/leetcode
f4826763e8f154cac9134d53b154b8299acd39a8
[ "Xnet", "X11", "CECILL-B" ]
null
null
null
# Use slow pointer, fast pointer approach # Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def middleNode(self, head): """ :type head: ListNode :rtype: ListNode """ ...
22.380952
41
0.53617
class Solution(object): def middleNode(self, head): fast = head while fast and fast.next: head = head.next fast = fast.next.next return head
true
true
f73bd3e16dc98f8ade8ad548b8b995c01e0d8edf
11,059
py
Python
tests/v2/test_users.py
dennisdnyce/Questioner
7d981019786d20ee5352b3379b6c34f3636417c0
[ "MIT" ]
null
null
null
tests/v2/test_users.py
dennisdnyce/Questioner
7d981019786d20ee5352b3379b6c34f3636417c0
[ "MIT" ]
7
2019-01-06T16:12:44.000Z
2022-03-08T21:09:34.000Z
tests/v2/test_users.py
dennisdnyce/Questioner
7d981019786d20ee5352b3379b6c34f3636417c0
[ "MIT" ]
2
2019-01-09T07:04:49.000Z
2019-01-09T13:08:29.000Z
import os import json import unittest import pytest from app import create_app from app.api.v2.models.user_models import UserRegistration from app.api.v2.views.user_views import myuser from app.api.v2.utils.validators import validate_users from app.api.v2.models.database_test import QuestionerTestDatabase connector ...
67.432927
185
0.707116
import os import json import unittest import pytest from app import create_app from app.api.v2.models.user_models import UserRegistration from app.api.v2.views.user_views import myuser from app.api.v2.utils.validators import validate_users from app.api.v2.models.database_test import QuestionerTestDatabase connector ...
true
true
f73bd557f268ab27de93314a2c8acfc4ab2c6627
32,036
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_packet_captures_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
8
2021-01-13T23:44:08.000Z
2021-03-17T10:13:36.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_packet_captures_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
null
null
null
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_packet_captures_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
49.362096
240
0.667
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport impor...
true
true
f73bd73b96026f6ece6556dc2babadc1d614547e
2,001
py
Python
generator.py
Victorwz/fast-weights-pytorch
cef79631c9e41ae48fedbbc11e52be0cf084bfde
[ "Apache-2.0" ]
2
2020-04-22T20:01:40.000Z
2020-05-07T03:48:02.000Z
generator.py
Victorwz/fast-weights-pytorch
cef79631c9e41ae48fedbbc11e52be0cf084bfde
[ "Apache-2.0" ]
null
null
null
generator.py
Victorwz/fast-weights-pytorch
cef79631c9e41ae48fedbbc11e52be0cf084bfde
[ "Apache-2.0" ]
null
null
null
import numpy as np import random import pickle num_train = 60000 num_val = 10000 num_test = 10000 step_num = 4 elem_num = 26 + 10 + 1 x_train = np.zeros([num_train, step_num * 2 + 3, elem_num], dtype=np.float32) x_val = np.zeros([num_val, step_num * 2 + 3, elem_num], dtype=np.float32) x_test = np.zeros([num_test, st...
25.987013
77
0.541229
import numpy as np import random import pickle num_train = 60000 num_val = 10000 num_test = 10000 step_num = 4 elem_num = 26 + 10 + 1 x_train = np.zeros([num_train, step_num * 2 + 3, elem_num], dtype=np.float32) x_val = np.zeros([num_val, step_num * 2 + 3, elem_num], dtype=np.float32) x_test = np.zeros([num_test, st...
true
true
f73bd882a3ea329ad2d594ef0164253c0426c469
2,975
py
Python
DeepFashion2/model.py
lordtt13/Cybint-AI-projects
87ad57a2e9c432483c2256408dd15762b7897b56
[ "Apache-2.0" ]
2
2020-02-19T06:50:59.000Z
2020-02-19T06:51:04.000Z
DeepFashion2/model.py
lordtt13/Cybint-AI-projects
87ad57a2e9c432483c2256408dd15762b7897b56
[ "Apache-2.0" ]
null
null
null
DeepFashion2/model.py
lordtt13/Cybint-AI-projects
87ad57a2e9c432483c2256408dd15762b7897b56
[ "Apache-2.0" ]
1
2020-02-14T06:00:50.000Z
2020-02-14T06:00:50.000Z
from __future__ import print_function import config from config import * from utils import * # INPUT: # VGG16 - block5_pool (MaxPooling2D) (None, 7, 7, 512) # OUTPUT: # Branch1 - Class Prediction # Branch2 - IOU Prediction # NOTE: Both models in create_model_train() and create_model_p...
39.666667
184
0.65916
from __future__ import print_function import config from config import * from utils import * def create_model(is_input_bottleneck, is_load_weights, input_shape, output_classes, optimizer='Adagrad', learn_rate=None, decay=0.0, momentum=0.0, activation='relu', dropout_rate=0.5): logging.debug('input_shape ...
true
true
f73bd9fef40d9af195f1e1eb4ae5b47154f56eb1
461
py
Python
sim/Simulator.py
adhocmaster/pyns
607feb56baf0900535130195163eac331e131a2e
[ "MIT" ]
1
2021-06-15T06:21:14.000Z
2021-06-15T06:21:14.000Z
sim/Simulator.py
adhocmaster/pyns
607feb56baf0900535130195163eac331e131a2e
[ "MIT" ]
null
null
null
sim/Simulator.py
adhocmaster/pyns
607feb56baf0900535130195163eac331e131a2e
[ "MIT" ]
1
2021-06-15T06:21:18.000Z
2021-06-15T06:21:18.000Z
from abc import ABC class Simulator(ABC): def __init__(self): self.stats = {} self.stats['dataInFlight'] = [] self.stats['dataInQueue'] = [] self.stats['packetsInFlight'] = [] self.stats['packetsInQueue'] = [] self.stats['queueSize'] = [] self.stats['packet...
28.8125
44
0.553145
from abc import ABC class Simulator(ABC): def __init__(self): self.stats = {} self.stats['dataInFlight'] = [] self.stats['dataInQueue'] = [] self.stats['packetsInFlight'] = [] self.stats['packetsInQueue'] = [] self.stats['queueSize'] = [] self.stats['packet...
true
true
f73bda976a8336d5699bf9fa8b6ceb17884743d6
5,187
py
Python
src/kids/cache/__init__.py
vaab/kids.cache
668f3b966877c4a0855d60e05cc3706cf37e4570
[ "BSD-2-Clause" ]
25
2015-08-03T08:39:49.000Z
2021-02-10T13:49:10.000Z
src/kids/cache/__init__.py
vaab/kids.cache
668f3b966877c4a0855d60e05cc3706cf37e4570
[ "BSD-2-Clause" ]
10
2015-02-02T02:12:04.000Z
2018-05-24T09:12:40.000Z
src/kids/cache/__init__.py
vaab/kids.cache
668f3b966877c4a0855d60e05cc3706cf37e4570
[ "BSD-2-Clause" ]
4
2016-11-28T17:59:13.000Z
2019-10-03T10:19:20.000Z
# Package placeholder import threading import functools import collections CacheInfo = collections.namedtuple( 'CacheInfo', 'type hits misses maxsize currsize') def make_key(obj, typed=True): args, kwargs = obj key = (tuple(args), tuple(sorted(kwargs.items()))) if typed: key += tuple(type(v...
30.511765
79
0.614806
import threading import functools import collections CacheInfo = collections.namedtuple( 'CacheInfo', 'type hits misses maxsize currsize') def make_key(obj, typed=True): args, kwargs = obj key = (tuple(args), tuple(sorted(kwargs.items()))) if typed: key += tuple(type(v) for v in args) ...
true
true
f73bdbe602e188715f74357a12989a8527413446
2,383
py
Python
horovod/spark/mpi_run.py
hgao10/horovod_simulation
3678a7d1d424931f48af4b53ef3293073af71c2e
[ "Apache-2.0" ]
null
null
null
horovod/spark/mpi_run.py
hgao10/horovod_simulation
3678a7d1d424931f48af4b53ef3293073af71c2e
[ "Apache-2.0" ]
null
null
null
horovod/spark/mpi_run.py
hgao10/horovod_simulation
3678a7d1d424931f48af4b53ef3293073af71c2e
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Uber Technologies, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
43.327273
113
0.652539
import os import sys from horovod.run.mpi_run import mpi_run as hr_mpi_run from horovod.run.common.util import codec, secret def mpi_run(settings, nics, driver, env, stdout=None, stderr=None): if env is None: env = os.environ.copy() env[secret.HOROVOD_SECRET_KEY] = codec.dumps_ba...
true
true
f73bdc331de92a67cf6fdaa7ca361d0d53cdf647
1,080
py
Python
widgy/generic/__init__.py
isopets/django-widgy
de6920b2b25699888eee1cc9b4d28f2aa5905ce1
[ "Apache-2.0" ]
168
2015-01-04T17:22:45.000Z
2022-01-28T09:53:35.000Z
widgy/generic/__init__.py
isopets/django-widgy
de6920b2b25699888eee1cc9b4d28f2aa5905ce1
[ "Apache-2.0" ]
82
2015-01-09T18:14:32.000Z
2020-10-08T18:13:07.000Z
widgy/generic/__init__.py
isopets/django-widgy
de6920b2b25699888eee1cc9b4d28f2aa5905ce1
[ "Apache-2.0" ]
61
2015-01-09T17:16:51.000Z
2021-07-03T08:52:27.000Z
from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelation class ProxyGenericForeignKey(GenericForeignKey): def __init__(self, *args, **kwargs): kwargs['for_concrete_model'] = False super(ProxyGenericForeignKey, self).__init__(*args, **kwargs) class ProxyGenericRelation(Ge...
38.571429
109
0.690741
from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelation class ProxyGenericForeignKey(GenericForeignKey): def __init__(self, *args, **kwargs): kwargs['for_concrete_model'] = False super(ProxyGenericForeignKey, self).__init__(*args, **kwargs) class ProxyGenericRelation(Ge...
true
true
f73bdd24d80de4652f229c6057b882f0ba52dc44
4,108
py
Python
tests/test_flights/test_flight.py
PatrickCmd/flight-booking-application
a521932530d622c6eef46ea6a0f968c8267b622e
[ "MIT" ]
null
null
null
tests/test_flights/test_flight.py
PatrickCmd/flight-booking-application
a521932530d622c6eef46ea6a0f968c8267b622e
[ "MIT" ]
8
2020-02-12T01:01:51.000Z
2022-03-11T23:59:40.000Z
tests/test_flights/test_flight.py
PatrickCmd/flight-booking-application
a521932530d622c6eef46ea6a0f968c8267b622e
[ "MIT" ]
1
2019-08-13T19:04:11.000Z
2019-08-13T19:04:11.000Z
from tests.base_test_case import FlightBaseTestCase class TestFlight(FlightBaseTestCase): def test_create_flight(self): login_uri = "/fbs-api/users/login/" params_user = { "email": "test@testadminuser.com", "password": "Testadminuser12344#", } self.set_autho...
36.353982
87
0.56037
from tests.base_test_case import FlightBaseTestCase class TestFlight(FlightBaseTestCase): def test_create_flight(self): login_uri = "/fbs-api/users/login/" params_user = { "email": "test@testadminuser.com", "password": "Testadminuser12344#", } self.set_autho...
true
true
f73bdd63271386f7b70e3a2f607104f30a30ed3e
2,413
py
Python
tensorflow_examples/lite/model_maker/__init__.py
ufocruz/examples
e1142ebb269802b5b518219a19cba2f6e1f54258
[ "Apache-2.0" ]
3
2021-05-04T20:00:41.000Z
2021-09-14T08:56:05.000Z
tensorflow_examples/lite/model_maker/__init__.py
ufocruz/examples
e1142ebb269802b5b518219a19cba2f6e1f54258
[ "Apache-2.0" ]
null
null
null
tensorflow_examples/lite/model_maker/__init__.py
ufocruz/examples
e1142ebb269802b5b518219a19cba2f6e1f54258
[ "Apache-2.0" ]
1
2021-04-20T17:33:19.000Z
2021-04-20T17:33:19.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...
61.871795
129
0.862826
from tensorflow_examples.lite.model_maker.core import compat from tensorflow_examples.lite.model_maker.core.data_util import audio_dataloader from tensorflow_examples.lite.model_maker.core.data_util import image_dataloader from tensorflow_examples.lite.model_maker.core.data_util import object_detector_dat...
true
true
f73bdd8a837582d5bc07ef5d0cc81f29fba71831
3,737
py
Python
drmaa2/reservation_info.py
gridengine/drmaa2-python
36e84e8dc0079c9e3d772c1536f07ecb1e435684
[ "Apache-2.0" ]
10
2019-05-28T23:17:39.000Z
2022-01-14T08:52:54.000Z
drmaa2/reservation_info.py
iamh2o/drmaa2-python
36e84e8dc0079c9e3d772c1536f07ecb1e435684
[ "Apache-2.0" ]
5
2019-11-01T10:50:19.000Z
2021-12-13T11:56:19.000Z
drmaa2/reservation_info.py
iamh2o/drmaa2-python
36e84e8dc0079c9e3d772c1536f07ecb1e435684
[ "Apache-2.0" ]
2
2019-02-26T16:36:07.000Z
2019-10-29T02:02:06.000Z
#!/usr/bin/env python # ___INFO__MARK_BEGIN__ ####################################################################################### # Copyright 2008-2021 Univa Corporation (acquired and owned by Altair Engineering Inc.) # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file exce...
41.065934
167
0.676478
true
true
f73bdde09b10c8d24414c68d205cd8684a52d650
1,979
py
Python
alibi_detect/base.py
Clusks/alibi-detect
b39406a6cf88f315f401562d4fea93a42aa6dcc1
[ "ECL-2.0", "Apache-2.0", "CC0-1.0" ]
1
2021-01-19T09:13:12.000Z
2021-01-19T09:13:12.000Z
alibi_detect/base.py
Clusks/alibi-detect
b39406a6cf88f315f401562d4fea93a42aa6dcc1
[ "ECL-2.0", "Apache-2.0", "CC0-1.0" ]
null
null
null
alibi_detect/base.py
Clusks/alibi-detect
b39406a6cf88f315f401562d4fea93a42aa6dcc1
[ "ECL-2.0", "Apache-2.0", "CC0-1.0" ]
null
null
null
from abc import ABC, abstractmethod import copy import numpy as np from typing import Dict DEFAULT_META = { "name": None, "detector_type": None, # online or offline "data_type": None # tabular, image or time-series } # type: Dict def outlier_prediction_dict(): data = { 'instance_score': No...
21.988889
62
0.608893
from abc import ABC, abstractmethod import copy import numpy as np from typing import Dict DEFAULT_META = { "name": None, "detector_type": None, "data_type": None } def outlier_prediction_dict(): data = { 'instance_score': None, 'feature_score': None, 'is_outlier': None ...
true
true
f73bdf294246507d49633746f6c969ffda3ef049
2,219
py
Python
ldbc_snb_datagen-dev/tools/sparkbench/distributions_extractor.py
netdb407/skh_project
8893132f898d21149f73cfb3a5f7806ce5518be5
[ "Apache-2.0" ]
null
null
null
ldbc_snb_datagen-dev/tools/sparkbench/distributions_extractor.py
netdb407/skh_project
8893132f898d21149f73cfb3a5f7806ce5518be5
[ "Apache-2.0" ]
9
2020-05-15T22:29:42.000Z
2021-12-14T21:44:49.000Z
ldbc_snb_datagen-dev/tools/sparkbench/distributions_extractor.py
netdb407/skh_project
8893132f898d21149f73cfb3a5f7806ce5518be5
[ "Apache-2.0" ]
null
null
null
import sys input_file = open(sys.argv[1]) def parse_line( input_file ): line = input_file.readline() if len(line) > 0: if line[0] == '(': output = line.replace("\n","").replace(" ","") while output.find(')') == -1: line = input_file.readline() ...
34.138462
105
0.611987
import sys input_file = open(sys.argv[1]) def parse_line( input_file ): line = input_file.readline() if len(line) > 0: if line[0] == '(': output = line.replace("\n","").replace(" ","") while output.find(')') == -1: line = input_file.readline() ...
true
true
f73be0ead8db0c9b2b9580b0fc630b9d96a79294
1,312
py
Python
setup.py
dlbrittain/celery-exporter
c7295bda6ce17c8a4602203ef26b8a9608aab6f1
[ "MIT" ]
null
null
null
setup.py
dlbrittain/celery-exporter
c7295bda6ce17c8a4602203ef26b8a9608aab6f1
[ "MIT" ]
null
null
null
setup.py
dlbrittain/celery-exporter
c7295bda6ce17c8a4602203ef26b8a9608aab6f1
[ "MIT" ]
null
null
null
import io from setuptools import setup from setuptools_rust import Binding, RustExtension long_description = "See https://github.com/OvalMoney/celery-exporter" with io.open("README.md", encoding="utf-8") as fp: long_description = fp.read() with open("README.md", "r") as fh: long_description = fh.read() setu...
34.526316
87
0.677591
import io from setuptools import setup from setuptools_rust import Binding, RustExtension long_description = "See https://github.com/OvalMoney/celery-exporter" with io.open("README.md", encoding="utf-8") as fp: long_description = fp.read() with open("README.md", "r") as fh: long_description = fh.read() setu...
true
true
f73be0f3da49275a7dea5a705f01b7713d6fe45d
2,852
py
Python
utils/PullData.py
MaxineSun/Paper_Graph
a7e0350c80309b35152e4bce939f522236e8efe0
[ "MIT" ]
null
null
null
utils/PullData.py
MaxineSun/Paper_Graph
a7e0350c80309b35152e4bce939f522236e8efe0
[ "MIT" ]
null
null
null
utils/PullData.py
MaxineSun/Paper_Graph
a7e0350c80309b35152e4bce939f522236e8efe0
[ "MIT" ]
null
null
null
from crossref_commons.retrieval import get_entity from crossref_commons.types import EntityType, OutputType class PullData: #transform this function as a class def __init__(self, doi): self.doi = doi def getInitials(self, str): #Put getInitials brfore as a alone function instead of part of pullData allN...
22.634921
105
0.56101
from crossref_commons.retrieval import get_entity from crossref_commons.types import EntityType, OutputType class PullData: def __init__(self, doi): self.doi = doi def getInitials(self, str): allNames = str.split() initials = [names[0] for names in allNames] initialsProcessced = ". ".join(initials...
true
true
f73be1498618c64c0e1b596460a231018146a7a2
154,704
py
Python
tensorflow/python/framework/ops.py
ml-resources/tensorflow
4ecd72b68cd70c3930551aebbf0c80badc301d28
[ "Apache-2.0" ]
1
2019-06-19T08:43:26.000Z
2019-06-19T08:43:26.000Z
tensorflow/python/framework/ops.py
liudgit/tensorflow
4ecd72b68cd70c3930551aebbf0c80badc301d28
[ "Apache-2.0" ]
null
null
null
tensorflow/python/framework/ops.py
liudgit/tensorflow
4ecd72b68cd70c3930551aebbf0c80badc301d28
[ "Apache-2.0" ]
1
2019-06-19T08:43:23.000Z
2019-06-19T08:43:23.000Z
# Copyright 2015 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.596871
101
0.679944
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import contextlib import copy import linecache import re import sys import threading import six from tensorflow.core.framework import attr_value_pb2 from tensorflow.core.fram...
true
true
f73be1b188ec3aa0232075720e09d33b10e6ae07
5,793
py
Python
src/qfit/vdw_radii.py
ExcitedStates/qfit-3.0
8ed8e8f44015e4eb30fed7a5da65819a586c2bbf
[ "Artistic-2.0", "MIT" ]
13
2019-05-22T00:07:39.000Z
2022-03-09T18:12:47.000Z
src/qfit/vdw_radii.py
ExcitedStates/qfit-3.0
8ed8e8f44015e4eb30fed7a5da65819a586c2bbf
[ "Artistic-2.0", "MIT" ]
84
2019-02-14T00:46:57.000Z
2022-03-03T21:53:15.000Z
src/qfit/vdw_radii.py
ExcitedStates/qfit-3.0
8ed8e8f44015e4eb30fed7a5da65819a586c2bbf
[ "Artistic-2.0", "MIT" ]
7
2019-03-08T01:08:05.000Z
2021-10-02T14:40:45.000Z
''' Excited States software: qFit 3.0 Contributors: Saulo H. P. de Oliveira, Gydo van Zundert, and Henry van den Bedem. Contact: vdbedem@stanford.edu Copyright (C) 2009-2019 Stanford University Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation f...
24.969828
103
0.493181
vdwRadiiTable={ 'H':1.2, 'HE':1.4, 'LI':1.82, 'BE':1.78, 'B':1.74, 'C':1.7, 'N':1.55, 'O':1.52, 'F':1.47, 'NE':1.54, 'NA':2.27, 'MG':1.73, 'AL':1.8, 'SI':2.1, 'P':1.8, 'S':1.8, 'CL':1.75, 'AR':1.88, 'K':2.75, 'CA':2.65, 'SC':2.55, 'TI':2.45, 'V':2.35, 'CR':2.2...
true
true
f73be2df781224e713a842b5feab5f7542120fad
3,683
py
Python
selfdrive/loggerd/tests/test_uploader.py
919bot/Tessa
9b48ff9020e8fb6992fc78271f2720fd19e01093
[ "MIT" ]
null
null
null
selfdrive/loggerd/tests/test_uploader.py
919bot/Tessa
9b48ff9020e8fb6992fc78271f2720fd19e01093
[ "MIT" ]
null
null
null
selfdrive/loggerd/tests/test_uploader.py
919bot/Tessa
9b48ff9020e8fb6992fc78271f2720fd19e01093
[ "MIT" ]
null
null
null
import os import time import threading import logging import json from selfdrive.swaglog import cloudlog import selfdrive.loggerd.uploader as uploader from common.timeout import Timeout from selfdrive.loggerd.tests.loggerd_tests_common import UploaderTestCase class TestLogHandler(logging.Handler): def __init__(se...
30.94958
92
0.685039
import os import time import threading import logging import json from selfdrive.swaglog import cloudlog import selfdrive.loggerd.uploader as uploader from common.timeout import Timeout from selfdrive.loggerd.tests.loggerd_tests_common import UploaderTestCase class TestLogHandler(logging.Handler): def __init__(se...
true
true
f73be3a7b3130605aab47153b280e3d8ce8398c6
111
py
Python
back/db/gustafdb.py
rkohser/gustaf2
b9f4dc0a9b5adca94161f9c59fa9907e1842b091
[ "MIT" ]
null
null
null
back/db/gustafdb.py
rkohser/gustaf2
b9f4dc0a9b5adca94161f9c59fa9907e1842b091
[ "MIT" ]
null
null
null
back/db/gustafdb.py
rkohser/gustaf2
b9f4dc0a9b5adca94161f9c59fa9907e1842b091
[ "MIT" ]
null
null
null
from eve import Eve app = Eve() if __name__ == '__main__': app.run(host='0.0.0.0', port=5001, debug=True)
18.5
50
0.63964
from eve import Eve app = Eve() if __name__ == '__main__': app.run(host='0.0.0.0', port=5001, debug=True)
true
true
f73be3ae374fd3d931826c70906f0dcb8897a992
3,374
py
Python
main.py
charlespcamargo/pycococreator
764ea9055dca173012c36569369315e57fee4682
[ "Apache-2.0" ]
null
null
null
main.py
charlespcamargo/pycococreator
764ea9055dca173012c36569369315e57fee4682
[ "Apache-2.0" ]
1
2020-11-21T00:12:49.000Z
2020-11-21T00:12:49.000Z
main.py
charlespcamargo/pycococreator
764ea9055dca173012c36569369315e57fee4682
[ "Apache-2.0" ]
null
null
null
from pycococreator import PyCocoCreator from pycococreatortools import PyCocoCreatorTools from coco_dataset import CocoDataset from coco_json_utils import CocoJsonCreator from args import Args import os if __name__ == "__main__": import argparse parser = argparse.ArgumentParser(description="Generate") par...
43.25641
112
0.635448
from pycococreator import PyCocoCreator from pycococreatortools import PyCocoCreatorTools from coco_dataset import CocoDataset from coco_json_utils import CocoJsonCreator from args import Args import os if __name__ == "__main__": import argparse parser = argparse.ArgumentParser(description="Generate") par...
true
true
f73be43cfc5eaa1bca66f8efa2cb926b32ef81d2
11,979
py
Python
django_cyverse_auth/protocol/cas.py
simpsonw/django-cyverse-auth
969ff75f0068a116dce2aaf92c78e1f1675eccbe
[ "BSD-3-Clause" ]
1
2017-04-27T20:06:39.000Z
2017-04-27T20:06:39.000Z
django_cyverse_auth/protocol/cas.py
simpsonw/django-cyverse-auth
969ff75f0068a116dce2aaf92c78e1f1675eccbe
[ "BSD-3-Clause" ]
14
2021-04-09T01:09:39.000Z
2021-10-22T01:14:28.000Z
django_cyverse_auth/protocol/cas.py
benlazarine/django-cyverse-auth
1664a11c5d9ab223d4e476d78e0513adf8eb27e0
[ "BSD-3-Clause" ]
10
2017-01-05T16:18:33.000Z
2020-04-20T20:47:53.000Z
""" CAS authentication protocol Contact: Steven Gregory <sgregory@iplantcollaborative.org> """ from datetime import timedelta import time from django.conf import settings from django.contrib.auth import get_user_model from django.core.urlresolvers import reverse from django.http import HttpResponse, HttpRespon...
36.745399
86
0.652642
from datetime import timedelta import time from django.conf import settings from django.contrib.auth import get_user_model from django.core.urlresolvers import reverse from django.http import HttpResponse, HttpResponseRedirect from django.utils import timezone from caslib import CASClient, SAMLClient, OAuthClient im...
true
true
f73be4a4ef5b959c7ff8ded4c4dafe4cdd762858
7,640
py
Python
conans/tools.py
johnmcfarlane/conan
725bd0cee4e53f35521aef7eeb61d4772c460d5e
[ "MIT" ]
null
null
null
conans/tools.py
johnmcfarlane/conan
725bd0cee4e53f35521aef7eeb61d4772c460d5e
[ "MIT" ]
null
null
null
conans/tools.py
johnmcfarlane/conan
725bd0cee4e53f35521aef7eeb61d4772c460d5e
[ "MIT" ]
null
null
null
""" Conan tools: classes and function in this module are intended to be used out of the box with the Conan configuration already currified into them. This configuration refers mainly to two items: - requester: on network calls, this will include proxy definition. - output: the output configuration...
32.931034
108
0.767277
import requests from conans.client.output import ConanOutput from conans.client.tools import files as tools_files, net as tools_net, oss as tools_oss, \ system_pm as tools_system_pm, win as tools_win from conans.client.tools.env import * from conans.client.tools.pkg_config import * from conans.client.tools.s...
true
true
f73be4b323b6f527fad757910c441cb65ddf9c62
116,467
py
Python
tools/machine_learning/dataset/dataset_2000.py
emiliopomares/flow-separation-prediction
ca4585a8263cd5933889fbd763154e2f3851969a
[ "MIT" ]
null
null
null
tools/machine_learning/dataset/dataset_2000.py
emiliopomares/flow-separation-prediction
ca4585a8263cd5933889fbd763154e2f3851969a
[ "MIT" ]
null
null
null
tools/machine_learning/dataset/dataset_2000.py
emiliopomares/flow-separation-prediction
ca4585a8263cd5933889fbd763154e2f3851969a
[ "MIT" ]
null
null
null
dataset = [[575, 1.8478238142818033, 335.84132856507614, 4.0, 40.0, 18.0, 1.0], [576, 15.77686287348893, 42.441254859835766, 4.0, 40.0, 18.0, 1.0], [577, 2.5651959697179394, 460.4148384334217, 4.0, 40.0, 18.0, 0.796539971089987], [578, 17.085286455903624, 1722.0569227642409, 4.0, 40.0, 18.0, 0.20868652310905142], [579,...
58,233.5
116,466
0.731546
dataset = [[575, 1.8478238142818033, 335.84132856507614, 4.0, 40.0, 18.0, 1.0], [576, 15.77686287348893, 42.441254859835766, 4.0, 40.0, 18.0, 1.0], [577, 2.5651959697179394, 460.4148384334217, 4.0, 40.0, 18.0, 0.796539971089987], [578, 17.085286455903624, 1722.0569227642409, 4.0, 40.0, 18.0, 0.20868652310905142], [579,...
true
true
f73be5427fbe24030a0f1a642b8b36c5bc757baa
7,447
py
Python
git/objects/fun.py
yarikoptic/GitPython
7576b282013249a2b20ccda4acacefd5e625ea39
[ "BSD-3-Clause" ]
1
2020-10-15T06:16:48.000Z
2020-10-15T06:16:48.000Z
git/objects/fun.py
yarikoptic/GitPython
7576b282013249a2b20ccda4acacefd5e625ea39
[ "BSD-3-Clause" ]
null
null
null
git/objects/fun.py
yarikoptic/GitPython
7576b282013249a2b20ccda4acacefd5e625ea39
[ "BSD-3-Clause" ]
null
null
null
"""Module with functions which are supposed to be as fast as possible""" from stat import S_ISDIR __all__ = ('tree_to_stream', 'tree_entries_from_data', 'traverse_trees_recursive', 'traverse_tree_recursive') def tree_to_stream(entries, write): """Write the give list of entries into ...
37.235
125
0.587485
from stat import S_ISDIR __all__ = ('tree_to_stream', 'tree_entries_from_data', 'traverse_trees_recursive', 'traverse_tree_recursive') def tree_to_stream(entries, write): ord_zero = ord('0') bit_mask = 7 for binsha, mode, name in entries: mode_str = ...
true
true
f73be5dcad677cd24db42711894839a5ab1fc3b9
1,614
py
Python
installers/aws-eks-cdk/lib/handlers/eksAlbLoadBalancer/index.py
hagerupe/legend
0131369145adb997832c99f0ef886ff9f7cc67f4
[ "Apache-2.0" ]
1
2021-02-02T00:12:25.000Z
2021-02-02T00:12:25.000Z
installers/aws-eks-cdk/lib/handlers/eksAlbLoadBalancer/index.py
epsstan/legend
a0b1ee08bc92fd95514fe2e985fa8b809c3870d7
[ "Apache-2.0" ]
1
2021-04-07T15:34:22.000Z
2021-04-07T15:34:22.000Z
installers/aws-eks-cdk/lib/handlers/eksAlbLoadBalancer/index.py
hagerupe/legend
0131369145adb997832c99f0ef886ff9f7cc67f4
[ "Apache-2.0" ]
2
2021-01-27T15:41:10.000Z
2021-02-13T23:40:19.000Z
import logging as log import cfnresponse import boto3 import hashlib import time log.getLogger().setLevel(log.INFO) client = boto3.client('elbv2') def main(event, context): fqn = event['StackId'] + event['LogicalResourceId'] physical_id = hashlib.md5(fqn.encode('utf-8')).hexdigest() log.info(physical_id) t...
38.428571
128
0.67658
import logging as log import cfnresponse import boto3 import hashlib import time log.getLogger().setLevel(log.INFO) client = boto3.client('elbv2') def main(event, context): fqn = event['StackId'] + event['LogicalResourceId'] physical_id = hashlib.md5(fqn.encode('utf-8')).hexdigest() log.info(physical_id) t...
true
true
f73be7b40925c0d767653e9194b3df819eeb147d
975
py
Python
quantize_models.py
LordRaivo/ToxicBot
ebc09064afef0f4af5def1022eada9ef109d27ac
[ "MIT" ]
null
null
null
quantize_models.py
LordRaivo/ToxicBot
ebc09064afef0f4af5def1022eada9ef109d27ac
[ "MIT" ]
null
null
null
quantize_models.py
LordRaivo/ToxicBot
ebc09064afef0f4af5def1022eada9ef109d27ac
[ "MIT" ]
1
2022-02-03T23:49:29.000Z
2022-02-03T23:49:29.000Z
import torch import torch.nn as nn import models import os import pickle import glob import json import numpy as np backend = 'fbgemm' def split_path(path): _, path = os.path.splitdrive(path) folders = [] while 1: path, folder = os.path.split(path) if folder != "": folders.append(folder) elif path == "\\" ...
25
80
0.683077
import torch import torch.nn as nn import models import os import pickle import glob import json import numpy as np backend = 'fbgemm' def split_path(path): _, path = os.path.splitdrive(path) folders = [] while 1: path, folder = os.path.split(path) if folder != "": folders.append(folder) elif path == "\\" ...
true
true
f73be7c1487f54c21bfe94df00b0db808b57f4ff
1,278
py
Python
nuitka/codegen/OperatorCodes.py
sthagen/Nuitka-Nuitka
023dc76eeafd9c53ee2a51931474ddd98a3ba083
[ "Apache-2.0" ]
null
null
null
nuitka/codegen/OperatorCodes.py
sthagen/Nuitka-Nuitka
023dc76eeafd9c53ee2a51931474ddd98a3ba083
[ "Apache-2.0" ]
null
null
null
nuitka/codegen/OperatorCodes.py
sthagen/Nuitka-Nuitka
023dc76eeafd9c53ee2a51931474ddd98a3ba083
[ "Apache-2.0" ]
null
null
null
# Copyright 2022, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
30.428571
84
0.659624
unary_operator_codes = { "UAdd": ("PyNumber_Positive", 1), "USub": ("PyNumber_Negative", 1), "Invert": ("PyNumber_Invert", 1), "Repr": ("PyObject_Repr", 1), "Not": ("UNARY_NOT", 0), } rich_comparison_codes = { "Lt": "LT", "LtE": "LE", "Eq": "EQ", "NotEq": "NE", ...
true
true
f73be9e2c4accbcd5522d0c33b4871bb452b4176
158
py
Python
contrib/wallettools/walletunlock.py
GoldRushGOLDR/Gold-Rush_GOLDR
97c25d6e1fcdd2e8a243d267b2c3c280e6fa8ad4
[ "MIT" ]
null
null
null
contrib/wallettools/walletunlock.py
GoldRushGOLDR/Gold-Rush_GOLDR
97c25d6e1fcdd2e8a243d267b2c3c280e6fa8ad4
[ "MIT" ]
null
null
null
contrib/wallettools/walletunlock.py
GoldRushGOLDR/Gold-Rush_GOLDR
97c25d6e1fcdd2e8a243d267b2c3c280e6fa8ad4
[ "MIT" ]
null
null
null
from jsonrpc import ServiceProxy access = ServiceProxy("http://127.0.0.1:4354") pwd = raw_input("Enter wallet passphrase: ") access.walletpassphrase(pwd, 60)
31.6
46
0.765823
from jsonrpc import ServiceProxy access = ServiceProxy("http://127.0.0.1:4354") pwd = raw_input("Enter wallet passphrase: ") access.walletpassphrase(pwd, 60)
true
true
f73bea86057b0a672eb66c19ecef01f2e50c44e4
8,094
py
Python
msgraph-cli-extensions/v1_0/files_v1_0/azext_files_v1_0/vendored_sdks/files/aio/_files.py
thewahome/msgraph-cli
33127d9efa23a0e5f5303c93242fbdbb73348671
[ "MIT" ]
null
null
null
msgraph-cli-extensions/v1_0/files_v1_0/azext_files_v1_0/vendored_sdks/files/aio/_files.py
thewahome/msgraph-cli
33127d9efa23a0e5f5303c93242fbdbb73348671
[ "MIT" ]
22
2022-03-29T22:54:37.000Z
2022-03-29T22:55:27.000Z
msgraph-cli-extensions/v1_0/files_v1_0/azext_files_v1_0/vendored_sdks/files/aio/_files.py
thewahome/msgraph-cli
33127d9efa23a0e5f5303c93242fbdbb73348671
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
51.884615
97
0.75315
from typing import Any, Optional, TYPE_CHECKING from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential from ._configuration import FilesConfiguration from .operations import Drives...
true
true
f73beb3153c6c928fad7b0cca32a698113dbfc52
3,605
py
Python
PreProcessing/compare_3km_12km_snapshot.py
fuxingwang2018/HCLIMAI
8673d1b2cb9c5c17e70ba523fa64a8579c48798a
[ "MIT" ]
null
null
null
PreProcessing/compare_3km_12km_snapshot.py
fuxingwang2018/HCLIMAI
8673d1b2cb9c5c17e70ba523fa64a8579c48798a
[ "MIT" ]
null
null
null
PreProcessing/compare_3km_12km_snapshot.py
fuxingwang2018/HCLIMAI
8673d1b2cb9c5c17e70ba523fa64a8579c48798a
[ "MIT" ]
null
null
null
#%matplotlib inline import matplotlib.pyplot as plt import netCDF4 plt.switch_backend('agg') from map_plot import MapPlot import numpy as np data_folder = '/nobackup/rossby26/users/sm_fuxwa/AI/standard_data/' fig_out_path = '/home/sm_fuxwa/Figures/AI/' # 3km: tas, pr # 12km: ta500, ta700, ta850, ta950, # hus50...
28.164063
162
0.628294
import matplotlib.pyplot as plt import netCDF4 plt.switch_backend('agg') from map_plot import MapPlot import numpy as np data_folder = '/nobackup/rossby26/users/sm_fuxwa/AI/standard_data/' fig_out_path = '/home/sm_fuxwa/Figures/AI/' var = 'tas' exp_name = '3km' plot_period = '1h' if plot_period == '1h': ...
true
true
f73beb4c1b32163d91ff788de411bab4fbb108e3
6,897
py
Python
pybaseball/league_batting_stats.py
mdrews93/pybaseball
0dab4a2a3e27dd9fa27285d63a1f6f829dfcf4c5
[ "MIT" ]
null
null
null
pybaseball/league_batting_stats.py
mdrews93/pybaseball
0dab4a2a3e27dd9fa27285d63a1f6f829dfcf4c5
[ "MIT" ]
null
null
null
pybaseball/league_batting_stats.py
mdrews93/pybaseball
0dab4a2a3e27dd9fa27285d63a1f6f829dfcf4c5
[ "MIT" ]
null
null
null
import requests import pandas as pd import datetime import io from bs4 import BeautifulSoup def validate_datestring(date_text): try: datetime.datetime.strptime(date_text, '%Y-%m-%d') except ValueError: raise ValueError("Incorrect data format, should be YYYY-MM-DD") def sanitize_input(start_dt...
40.098837
199
0.634624
import requests import pandas as pd import datetime import io from bs4 import BeautifulSoup def validate_datestring(date_text): try: datetime.datetime.strptime(date_text, '%Y-%m-%d') except ValueError: raise ValueError("Incorrect data format, should be YYYY-MM-DD") def sanitize_input(start_dt...
true
true
f73bebdfdde04ee93dea82677a22edd4015cfe32
9,016
py
Python
hours/tests/test_resource_periods_as_text.py
City-of-Helsinki/hauki
f49628c0533baa68c7deb83224065c3b1158f807
[ "MIT" ]
3
2020-03-26T05:04:30.000Z
2022-03-22T15:57:18.000Z
hours/tests/test_resource_periods_as_text.py
City-of-Helsinki/hauki
f49628c0533baa68c7deb83224065c3b1158f807
[ "MIT" ]
81
2020-06-17T14:31:11.000Z
2022-02-20T19:01:54.000Z
hours/tests/test_resource_periods_as_text.py
City-of-Helsinki/hauki
f49628c0533baa68c7deb83224065c3b1158f807
[ "MIT" ]
9
2020-06-18T10:52:09.000Z
2022-02-11T13:05:59.000Z
import datetime import pytest from django.utils import translation from hours.enums import FrequencyModifier, RuleContext, RuleSubject, State, Weekday from hours.models import Rule from hours.tests.conftest import ( DatePeriodFactory, RuleFactory, TimeSpanFactory, TimeSpanGroupFactory, ) @pytest.mar...
31.746479
84
0.542702
import datetime import pytest from django.utils import translation from hours.enums import FrequencyModifier, RuleContext, RuleSubject, State, Weekday from hours.models import Rule from hours.tests.conftest import ( DatePeriodFactory, RuleFactory, TimeSpanFactory, TimeSpanGroupFactory, ) @pytest.mar...
true
true
f73bebf5f22f828fa0dddcbd7d2a4deae02f54a0
179
py
Python
plugins/clients/apps-client/test/mock_client_app/mock_client_event.py
pcanto-hopeit/hopeit.engine
c17b0438e56940a4d1b2f071cca90ae8b6f70629
[ "Apache-2.0" ]
15
2020-07-09T17:41:14.000Z
2021-10-04T20:13:08.000Z
plugins/clients/apps-client/test/mock_client_app/mock_client_event.py
pcanto-hopeit/hopeit.engine
c17b0438e56940a4d1b2f071cca90ae8b6f70629
[ "Apache-2.0" ]
48
2020-07-10T15:16:17.000Z
2022-03-03T19:46:46.000Z
plugins/clients/apps-client/test/mock_client_app/mock_client_event.py
pcanto-hopeit/hopeit.engine
c17b0438e56940a4d1b2f071cca90ae8b6f70629
[ "Apache-2.0" ]
3
2020-07-08T20:12:58.000Z
2021-01-10T15:57:21.000Z
from hopeit.app.context import EventContext __steps__ = ['test_app_call'] async def test_app_call(payload: None, context: EventContext) -> str: raise NotImplementedError()
22.375
69
0.77095
from hopeit.app.context import EventContext __steps__ = ['test_app_call'] async def test_app_call(payload: None, context: EventContext) -> str: raise NotImplementedError()
true
true
f73bed0be17ea24ab6ebb469bbeb064f4f2841f5
898
py
Python
Build.py
wasimakh2/FacebookBot
fe3adc1dfbc0babb0b54b8265b0c27eadbe22422
[ "Apache-2.0" ]
312
2016-02-16T22:52:32.000Z
2022-03-11T05:34:59.000Z
Build.py
wasimakh2/FacebookBot
fe3adc1dfbc0babb0b54b8265b0c27eadbe22422
[ "Apache-2.0" ]
17
2016-12-18T17:35:13.000Z
2021-04-30T08:58:03.000Z
Build.py
wasimakh2/FacebookBot
fe3adc1dfbc0babb0b54b8265b0c27eadbe22422
[ "Apache-2.0" ]
130
2016-02-03T12:34:18.000Z
2022-03-22T08:10:59.000Z
import os import sys script=""" from cx_Freeze import setup, Executable import sys base = None if sys.platform == "win32": base = "Win32GUI" setup( name = "$FILENOTPY$", version = "1.0", description = "$FILENOTPY$", executables = [Executable("$FILENAME$",appendScriptToExe = False,appen...
24.944444
116
0.601336
import os import sys script=""" from cx_Freeze import setup, Executable import sys base = None if sys.platform == "win32": base = "Win32GUI" setup( name = "$FILENOTPY$", version = "1.0", description = "$FILENOTPY$", executables = [Executable("$FILENAME$",appendScriptToExe = False,appen...
true
true
f73beebf053c139436dce4f12aff85bc275759a9
2,041
py
Python
src/api/bkuser_core/categories/handlers.py
trueware/bk-user
8c633e0a3821beb839ed120c4514c5733e675862
[ "MIT" ]
null
null
null
src/api/bkuser_core/categories/handlers.py
trueware/bk-user
8c633e0a3821beb839ed120c4514c5733e675862
[ "MIT" ]
null
null
null
src/api/bkuser_core/categories/handlers.py
trueware/bk-user
8c633e0a3821beb839ed120c4514c5733e675862
[ "MIT" ]
1
2021-12-31T06:48:41.000Z
2021-12-31T06:48:41.000Z
# -*- coding: utf-8 -*- """ TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-用户管理(Bk-User) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the Lic...
46.386364
115
0.763351
import logging from bkuser_core.bkiam.constants import IAMAction, ResourceType from bkuser_core.bkiam.helper import IAMHelper from bkuser_core.categories.signals import post_category_create from django.dispatch import receiver from .plugins.ldap.handlers import create_sync_tasks, delete_sync_tasks, update_sync_tasks...
true
true
f73bef434d57e5ad068ebf3139df0ab3c82e5c73
5,308
py
Python
src/resultGen/apisUsed.py
RRua/AnaDroid
7417b117a50149a6f210cd334de71b814db8d6c7
[ "MIT" ]
7
2019-01-17T18:37:59.000Z
2020-11-16T13:42:29.000Z
src/resultGen/apisUsed.py
RRua/AnaDroid
7417b117a50149a6f210cd334de71b814db8d6c7
[ "MIT" ]
null
null
null
src/resultGen/apisUsed.py
RRua/AnaDroid
7417b117a50149a6f210cd334de71b814db8d6c7
[ "MIT" ]
null
null
null
import json,sys,os,re # Linares Vasquez red_apis_file=os.getenv("ANADROID_PATH")+"/resources/redAPIS.json" sec_apis_file=os.getenv("ANADROID_PATH")+"/resources/secAPIS.json" # only needed fot tests executed before 27/08/2020 # created to undo error that caused malformed methoddefinitions in instrumentation phase ...
36.356164
300
0.727581
import json,sys,os,re red_apis_file=os.getenv("ANADROID_PATH")+"/resources/redAPIS.json" sec_apis_file=os.getenv("ANADROID_PATH")+"/resources/secAPIS.json" def fixMethodDefinition(met_id): simpl_m_name= met_id.split("->")[1].split("|")[0] if(len(simpl_m_name.split("."))>1): met_id=met_id.replace(simpl_m...
true
true
f73befd25e262931487e0a2a67889b9f79f6c43d
2,187
py
Python
caffe2/quantization/server/tanh_dnnlowp_op_test.py
Hacky-DH/pytorch
80dc4be615854570aa39a7e36495897d8a040ecc
[ "Intel" ]
60,067
2017-01-18T17:21:31.000Z
2022-03-31T21:37:45.000Z
caffe2/quantization/server/tanh_dnnlowp_op_test.py
Hacky-DH/pytorch
80dc4be615854570aa39a7e36495897d8a040ecc
[ "Intel" ]
66,955
2017-01-18T17:21:38.000Z
2022-03-31T23:56:11.000Z
caffe2/quantization/server/tanh_dnnlowp_op_test.py
Hacky-DH/pytorch
80dc4be615854570aa39a7e36495897d8a040ecc
[ "Intel" ]
19,210
2017-01-18T17:45:04.000Z
2022-03-31T23:51:56.000Z
import collections import caffe2.python.hypothesis_test_util as hu import hypothesis.strategies as st import numpy as np from caffe2.python import core, dyndep, workspace from hypothesis import given, settings dyndep.InitOpsLibrary("//caffe2/caffe2/quantization/server:dnnlowp_ops") workspace.GlobalInit(["caffe2", ...
32.641791
85
0.541838
import collections import caffe2.python.hypothesis_test_util as hu import hypothesis.strategies as st import numpy as np from caffe2.python import core, dyndep, workspace from hypothesis import given, settings dyndep.InitOpsLibrary("//caffe2/caffe2/quantization/server:dnnlowp_ops") workspace.GlobalInit(["caffe2", ...
true
true
f73bf01e0e8932369dd3f787db82c08609a7e6aa
2,988
py
Python
sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/__init__.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
3
2020-06-23T02:25:27.000Z
2021-09-07T18:48:11.000Z
sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/__init__.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
510
2019-07-17T16:11:19.000Z
2021-08-02T08:38:32.000Z
sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/__init__.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
5
2019-09-04T12:51:37.000Z
2020-09-16T07:28:40.000Z
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ from collections import namedtuple from six.moves.urllib_parse import urlparse from .challenge_auth_policy import ChallengeAuthPolicy, ChallengeAuthPolicyBase from .cl...
34.344828
117
0.678715
from collections import namedtuple from six.moves.urllib_parse import urlparse from .challenge_auth_policy import ChallengeAuthPolicy, ChallengeAuthPolicyBase from .client_base import KeyVaultClientBase from .http_challenge import HttpChallenge from . import http_challenge_cache as HttpChallengeCache __all__ = ...
true
true
f73bf1a1f7a6df4e14a3529dfff37120bc1158be
376
py
Python
TestDemo/changeApp.py
mocne/handerCode
bd6f9c1c5ec9a2e8be79146748f19a430ba30074
[ "MIT" ]
1
2018-04-21T13:54:56.000Z
2018-04-21T13:54:56.000Z
TestDemo/changeApp.py
mocne/handerCode
bd6f9c1c5ec9a2e8be79146748f19a430ba30074
[ "MIT" ]
null
null
null
TestDemo/changeApp.py
mocne/handerCode
bd6f9c1c5ec9a2e8be79146748f19a430ba30074
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import time from DriverInit import initAppiumDriver def change2app(driver, package, activity): driver.quit() driver = initAppiumDriver.initAppiumWithInfo(package=package, activity=activity) time.sleep(10) driver.get_screenshot_as_file('./img/%s.png' % time.strftime('%Y-%m-%d_%H...
34.181818
115
0.712766
import time from DriverInit import initAppiumDriver def change2app(driver, package, activity): driver.quit() driver = initAppiumDriver.initAppiumWithInfo(package=package, activity=activity) time.sleep(10) driver.get_screenshot_as_file('./img/%s.png' % time.strftime('%Y-%m-%d_%H_%M_%S', time.localtime...
true
true