hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f7305a7160e771c29930fa09a63b5a4213102df1
2,604
py
Python
PyDictAPI/__init__.py
imshawan/PyDictAPI
937001ce896b634132e6dce3e0f1a59986c4551c
[ "MIT" ]
null
null
null
PyDictAPI/__init__.py
imshawan/PyDictAPI
937001ce896b634132e6dce3e0f1a59986c4551c
[ "MIT" ]
null
null
null
PyDictAPI/__init__.py
imshawan/PyDictAPI
937001ce896b634132e6dce3e0f1a59986c4551c
[ "MIT" ]
1
2021-08-29T11:08:07.000Z
2021-08-29T11:08:07.000Z
""" ---------------------- Python Dictionary API ---------------------- PyDictAPI is library written in Python, that can be used to fetch meanings and translation. Both the Finder and Translator class takes an arguement "jsonify" that is set to False by default. If jsonify is set to True, than the processed querie...
30.635294
231
0.656682
__author__ = "Shawan Mandal" __email__ = "imshawan.dev049@gmail.com" __version__ = "1.6.0" try: from .scrape import * from .translator import * except: from scrape import * from translator import *
true
true
f7305a74ccf623557222c020c2382bc476227606
3,177
py
Python
tests/e2e_scenarios.py
rneatherway/CCF
e04c6bbbe0b5ba044abaab9f972287194b6fc6cc
[ "Apache-2.0" ]
2
2020-08-06T04:12:36.000Z
2021-09-09T04:15:25.000Z
tests/e2e_scenarios.py
rajdhandus/CCF
96edbc9db6bd14c559a8c59bcda1c2a4835768d2
[ "Apache-2.0" ]
2
2022-02-03T06:32:47.000Z
2022-02-09T23:00:07.000Z
tests/e2e_scenarios.py
securelogicgroup/CCF
2bad8ca6caa146e6b7cd4167fea551d61fecabfa
[ "Apache-2.0" ]
null
null
null
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache 2.0 License. import os import json import http import random import infra.network import infra.proc import infra.e2e_args import infra.checker from loguru import logger as LOG def run(args): # SNIPPET_START: parsing with ...
32.418367
81
0.514951
import os import json import http import random import infra.network import infra.proc import infra.e2e_args import infra.checker from loguru import logger as LOG def run(args): with open(args.scenario) as f: scenario = json.load(f) hosts = scenario.get("hosts", infra.e2e_args.max_nodes(args, f=...
true
true
f7305b4091d94994c4a20cc3634347522a8f0bce
35,217
py
Python
qiskit/visualization/pulse/matplotlib.py
siddharthdangwal/qiskit-terra
af34eb06f28de18ef276e1e9029c62a4e35dd6a9
[ "Apache-2.0" ]
null
null
null
qiskit/visualization/pulse/matplotlib.py
siddharthdangwal/qiskit-terra
af34eb06f28de18ef276e1e9029c62a4e35dd6a9
[ "Apache-2.0" ]
null
null
null
qiskit/visualization/pulse/matplotlib.py
siddharthdangwal/qiskit-terra
af34eb06f28de18ef276e1e9029c62a4e35dd6a9
[ "Apache-2.0" ]
1
2020-07-13T17:56:46.000Z
2020-07-13T17:56:46.000Z
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modif...
39.13
96
0.548911
import collections import warnings from typing import Dict, List, Tuple, Callable, Union, Any import numpy as np try: from matplotlib import pyplot as plt, gridspec HAS_MATPLOTLIB = True except ImportError: HAS_MATPLOTLIB = False from qiskit.visualization.pulse.qcstyle import PulseStyle, SchedStyle f...
true
true
f7305d3f7c5dd7b9094f0a20b4e9f5a957e94535
1,443
py
Python
numpylint/lintbits.py
perimosocordiae/numpylint
67e6c077b393760bffe59524ede1d4904476a1ce
[ "MIT" ]
null
null
null
numpylint/lintbits.py
perimosocordiae/numpylint
67e6c077b393760bffe59524ede1d4904476a1ce
[ "MIT" ]
null
null
null
numpylint/lintbits.py
perimosocordiae/numpylint
67e6c077b393760bffe59524ede1d4904476a1ce
[ "MIT" ]
null
null
null
import numpy as np # Dict of all the patterns with their replacements. # Structure: # name of replacement -> list of (pattern, replacement, kwargs) tuples LINTBITS = { 'diagonal matrix dot product': [ # diag(x).dot(y) ('${diag}(${x}).dot(${y})', '((${x}) * (${y}).T).T', dict(diag='name=...
35.195122
72
0.444213
import numpy as np LINTBITS = { 'diagonal matrix dot product': [ ('${diag}(${x}).dot(${y})', '((${x}) * (${y}).T).T', dict(diag='name=numpy.diag')), ('${dot}(${diag}(${x}), ${y})', '((${x}) * (${y}).T).T', dict(diag='name=numpy.diag', dot='name=numpy.dot')), ...
true
true
f7305eb7c580daac5db72b2c4ac0c1258330b442
26,460
py
Python
bert4keras/snippets.py
vecent-don/bert4keras
3c31cbbf87d6574ddad038e4ea17a941ddd027dc
[ "Apache-2.0" ]
1
2021-06-03T12:39:23.000Z
2021-06-03T12:39:23.000Z
bert4keras/snippets.py
vecent-don/bert4keras
3c31cbbf87d6574ddad038e4ea17a941ddd027dc
[ "Apache-2.0" ]
null
null
null
bert4keras/snippets.py
vecent-don/bert4keras
3c31cbbf87d6574ddad038e4ea17a941ddd027dc
[ "Apache-2.0" ]
null
null
null
#! -*- coding: utf-8 -*- # 代码合集 import os, sys, six, re, json import logging import numpy as np from collections import defaultdict from bert4keras.backend import K, keras, tf _open_ = open is_py2 = six.PY2 if not is_py2: basestring = str def to_array(*args): """批量转numpy的array """ results = [np.arr...
30.875146
80
0.524339
import os, sys, six, re, json import logging import numpy as np from collections import defaultdict from bert4keras.backend import K, keras, tf _open_ = open is_py2 = six.PY2 if not is_py2: basestring = str def to_array(*args): results = [np.array(a) for a in args] if len(args) == 1: return res...
true
true
f7305f172f99aa4ee10baf90adde0cdb5a91636b
432
py
Python
altair/examples/__init__.py
jakevdp/altair2
46d391034c5b72867c9e4d01f3a7c7c536533add
[ "BSD-3-Clause" ]
2
2018-02-03T05:35:52.000Z
2018-02-05T21:00:18.000Z
altair/examples/__init__.py
jakevdp/altair2
46d391034c5b72867c9e4d01f3a7c7c536533add
[ "BSD-3-Clause" ]
null
null
null
altair/examples/__init__.py
jakevdp/altair2
46d391034c5b72867c9e4d01f3a7c7c536533add
[ "BSD-3-Clause" ]
null
null
null
import os import json def iter_example_names(): specdir = os.path.join(os.path.dirname(__file__), 'spec') for spec in sorted(os.listdir(specdir)): yield spec def load_example(name): filename = os.path.join(os.path.dirname(__file__), 'spec', name) with open(filename, 'r') as f: return...
21.6
68
0.671296
import os import json def iter_example_names(): specdir = os.path.join(os.path.dirname(__file__), 'spec') for spec in sorted(os.listdir(specdir)): yield spec def load_example(name): filename = os.path.join(os.path.dirname(__file__), 'spec', name) with open(filename, 'r') as f: return...
true
true
f7305ff6dcb783b887e7c18ac02bfe8c87cfeacf
112
py
Python
vl/wsgi.py
verifid/vl
39fb3056658fbc2360eb3d8bfcd74bdcfd12cc67
[ "MIT" ]
3
2019-06-30T21:09:05.000Z
2021-05-09T17:56:19.000Z
vl/wsgi.py
verifid/vl
39fb3056658fbc2360eb3d8bfcd74bdcfd12cc67
[ "MIT" ]
null
null
null
vl/wsgi.py
verifid/vl
39fb3056658fbc2360eb3d8bfcd74bdcfd12cc67
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from vl.app import app as application if __name__ == "__main__": application.run()
16
37
0.705357
from vl.app import app as application if __name__ == "__main__": application.run()
true
true
f73060075d4c066e5e8285761903993ce0cf2935
31,110
py
Python
pymatgen/core/composition.py
rousseab/pymatgen
ecfba4a576a21f31c222be8fd20ce2ddaa77495a
[ "MIT" ]
1
2015-05-18T14:31:20.000Z
2015-05-18T14:31:20.000Z
pymatgen/core/composition.py
rousseab/pymatgen
ecfba4a576a21f31c222be8fd20ce2ddaa77495a
[ "MIT" ]
null
null
null
pymatgen/core/composition.py
rousseab/pymatgen
ecfba4a576a21f31c222be8fd20ce2ddaa77495a
[ "MIT" ]
null
null
null
# coding: utf-8 from __future__ import division, unicode_literals """ This module implements a Composition class to represent compositions, and a ChemicalPotential class to represent potentials. """ __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2011, The Materials Project" __version__ = "0.1" __maintainer...
36.006944
80
0.564899
from __future__ import division, unicode_literals __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2011, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "shyuep@gmail.com" __status__ = "Production" __date__ = "Nov 10, 2012" import collections import numbers import re...
true
true
f730609d863d7ec81eadcaed88ab2c70b888fad3
22,602
py
Python
GearGenerator_by_UI.py
manguel1980-dev/Gear-Generator
c4f2eea957340201e42a213b458cc1c28d04833b
[ "MIT" ]
null
null
null
GearGenerator_by_UI.py
manguel1980-dev/Gear-Generator
c4f2eea957340201e42a213b458cc1c28d04833b
[ "MIT" ]
null
null
null
GearGenerator_by_UI.py
manguel1980-dev/Gear-Generator
c4f2eea957340201e42a213b458cc1c28d04833b
[ "MIT" ]
null
null
null
#!/usr/bin/env python #------------------------------------------------------------------------------- # Name: Gear Generator # Purpose: Just for fun # # Author: Manuel Astros # Email: manuel.astros1980@gmail.com # Web: https://sites.google.com/view/interpolation/home # # C...
44.756436
160
0.543713
import sys from PyQt5.uic import loadUi from PyQt5 import QtWidgets, QtCore from PyQt5.QtGui import QCloseEvent, QFont from PyQt5.QtWidgets import QDialog, QApplication, QMainWindow, QHeaderView, \ QCheckBox, QComboBox, QMessageBox, QWidget, QVBoxLayout from Gear_Mpl_Draw impor...
true
true
f730617f1ec79e7ee02ce125d82a1b33d9acb7f8
4,003
py
Python
workflow/powerbiCatToM.py
sixtysecondrevit/dynamoPython
dfb4b001800ebf9ab308510db40cfc5a5a953fee
[ "MIT" ]
114
2018-07-17T17:47:11.000Z
2022-03-08T09:33:39.000Z
workflow/powerbiCatToM.py
sixtysecondrevit/dynamoPython
dfb4b001800ebf9ab308510db40cfc5a5a953fee
[ "MIT" ]
28
2018-07-18T10:43:37.000Z
2020-11-24T06:08:18.000Z
workflow/powerbiCatToM.py
sixtysecondrevit/dynamoPython
dfb4b001800ebf9ab308510db40cfc5a5a953fee
[ "MIT" ]
56
2018-07-17T17:57:28.000Z
2022-03-26T12:30:39.000Z
''' CATEGORIES TO M SCRIPT - CREATE CONDITIONAL STATEMENT CODE FOR POWER BI - a dynamoPython script, visit the website for more details https://github.com/Amoursol/dynamoPython ''' __author__ = 'Adam Bear - adam@ukbear.com' __twitter__ = '@adambear82' __github__ = '@adambear82' __version__ = '1.0.0' ''' for large proj...
29.433824
154
0.683987
__author__ = 'Adam Bear - adam@ukbear.com' __twitter__ = '@adambear82' __github__ = '@adambear82' __version__ = '1.0.0' import clr clr.AddReference('System.Windows.Forms') from System.Windows.Forms import Clipboard clr.AddReference('RevitServices') import RevitServices from RevitServices.Persistence import Document...
true
true
f730625ed1d40a9135df52e51742c9f032d3ce20
1,930
py
Python
results/rabi_and_lmg_optimizations_20190227/script_rabi_bangramp_neldermead.py
lucainnocenti/ultrafast-critical-ground-state-preparation-2007.07381
29f80dcf914096555cee9bc2e18249a2c95d6a50
[ "MIT" ]
1
2020-07-21T02:31:41.000Z
2020-07-21T02:31:41.000Z
results/rabi_and_lmg_optimizations_20190228/script_rabi_bangramp_neldermead.py
lucainnocenti/ultrafast-critical-ground-state-preparation-2007.07381
29f80dcf914096555cee9bc2e18249a2c95d6a50
[ "MIT" ]
null
null
null
results/rabi_and_lmg_optimizations_20190228/script_rabi_bangramp_neldermead.py
lucainnocenti/ultrafast-critical-ground-state-preparation-2007.07381
29f80dcf914096555cee9bc2e18249a2c95d6a50
[ "MIT" ]
null
null
null
import os import sys import numpy as np import pandas as pd import logging if '../../' not in sys.path: sys.path.append('../../') import src.optimization as optimization model = 'rabi' model_parameters = dict(N=100, Omega=100, omega_0=1.) protocol = 'bangramp' optimization_method = 'Nelder-Mead' # ------ build...
29.242424
70
0.707254
import os import sys import numpy as np import pandas as pd import logging if '../../' not in sys.path: sys.path.append('../../') import src.optimization as optimization model = 'rabi' model_parameters = dict(N=100, Omega=100, omega_0=1.) protocol = 'bangramp' optimization_method = 'Nelder-Mead' additional_fil...
true
true
f730640adaf31ffe5b7c8de73e4fd29b5bc4983e
9,252
py
Python
doc/source/conf.py
ifxit/nidho
7d49bb7d879d0f3d444df50f2c18c2cdf883216c
[ "MIT" ]
11
2016-06-09T12:07:14.000Z
2018-01-18T08:01:08.000Z
doc/source/conf.py
ifxit/nidho
7d49bb7d879d0f3d444df50f2c18c2cdf883216c
[ "MIT" ]
4
2016-07-06T11:06:34.000Z
2020-01-02T10:11:48.000Z
doc/source/conf.py
ifxit/nidhogg
7d49bb7d879d0f3d444df50f2c18c2cdf883216c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Nidhogg documentation build configuration file, created by # sphinx-quickstart on Thu May 28 09:48:45 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # A...
32.236934
79
0.718223
import os import shlex import sys sys.path.insert(0, os.path.abspath('../../')) extensions = [ 'sphinx.ext.autodoc', ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'Nidhogg' copyright = u'2018, Roland Wohlfahrt, Christian Assing' author = u'Roland Wohlfahrt, Chris...
true
true
f730647bf68842c5a3eff14c987502a2fca1c432
141,522
py
Python
scripts/automation/trex_control_plane/interactive/trex/stl/trex_stl_client.py
GabrielGanne/trex-core
688a0fe0adb890964691473723d70ffa98e00dd3
[ "Apache-2.0" ]
null
null
null
scripts/automation/trex_control_plane/interactive/trex/stl/trex_stl_client.py
GabrielGanne/trex-core
688a0fe0adb890964691473723d70ffa98e00dd3
[ "Apache-2.0" ]
null
null
null
scripts/automation/trex_control_plane/interactive/trex/stl/trex_stl_client.py
GabrielGanne/trex-core
688a0fe0adb890964691473723d70ffa98e00dd3
[ "Apache-2.0" ]
null
null
null
import time import sys import os from collections import OrderedDict from functools import wraps from ..utils.common import get_current_user, list_intersect, is_sub_list, user_input, list_difference, parse_ports_from_profiles from ..utils import parsing_opts, text_tables from ..utils.text_opts import format_text, form...
39.268036
360
0.531084
import time import sys import os from collections import OrderedDict from functools import wraps from ..utils.common import get_current_user, list_intersect, is_sub_list, user_input, list_difference, parse_ports_from_profiles from ..utils import parsing_opts, text_tables from ..utils.text_opts import format_text, form...
true
true
f73064bf0edcae1e29ce194797909ff6107a9759
22,176
py
Python
salt/runners/saltutil.py
byteskeptical/salt
637fe0b04f38b2274191b005d73b3c6707d7f400
[ "Apache-2.0" ]
2
2015-06-18T19:07:20.000Z
2017-09-27T18:54:29.000Z
salt/runners/saltutil.py
byteskeptical/salt
637fe0b04f38b2274191b005d73b3c6707d7f400
[ "Apache-2.0" ]
12
2015-04-15T22:17:42.000Z
2016-03-22T08:46:27.000Z
salt/runners/saltutil.py
byteskeptical/salt
637fe0b04f38b2274191b005d73b3c6707d7f400
[ "Apache-2.0" ]
4
2015-04-16T03:24:08.000Z
2015-04-22T15:33:28.000Z
# -*- coding: utf-8 -*- ''' The Saltutil runner is used to sync custom types to the Master. See the :mod:`saltutil module <salt.modules.saltutil>` for documentation on managing updates to minions. .. versionadded:: 2016.3.0 ''' from __future__ import absolute_import, print_function, unicode_literals # Import python l...
33.498489
128
0.689123
from __future__ import absolute_import, print_function, unicode_literals import logging import salt.utils.extmods log = logging.getLogger(__name__) def sync_all(saltenv='base', extmod_whitelist=None, extmod_blacklist=None): log.debug('Syncing all') ret = {} ret['clouds'] = sync_clouds(saltenv=saltenv, ...
true
true
f73064f7b7a9daf8dccd16ffa7b8b4d1a6869ec6
21,364
py
Python
tensorflow/python/tpu/device_assignment.py
wainshine/tensorflow
dc7a8dc8546c679b9c7b3df7494ce4506bfc1a6d
[ "Apache-2.0" ]
54
2017-06-17T14:07:48.000Z
2022-03-29T02:11:20.000Z
tensorflow/python/tpu/device_assignment.py
wainshine/tensorflow
dc7a8dc8546c679b9c7b3df7494ce4506bfc1a6d
[ "Apache-2.0" ]
19
2021-12-28T12:44:55.000Z
2022-01-13T08:11:28.000Z
tensorflow/python/tpu/device_assignment.py
wainshine/tensorflow
dc7a8dc8546c679b9c7b3df7494ce4506bfc1a6d
[ "Apache-2.0" ]
11
2018-04-19T22:36:01.000Z
2021-08-02T08:44:43.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
38.15
99
0.662236
import enum import math from typing import List, Optional, Text, Tuple import numpy as np from tensorflow.python.platform import tf_logging as logging from tensorflow.python.tpu.topology import Topology from tensorflow.python.util.tf_export import tf_export SINGLE_CORE_ASSIGNMENT = [[[0, 0, 0, 0]]] def _compute_...
true
true
f730660ea29c7c979e17a2993b7cf5dd2dd52d57
7,981
py
Python
tests/unit/streamalert/alert_processor/outputs/test_output_base.py
Meliairon/streamalert
3b774a59d260b2822cd156e837781bd34f3625f7
[ "Apache-2.0" ]
null
null
null
tests/unit/streamalert/alert_processor/outputs/test_output_base.py
Meliairon/streamalert
3b774a59d260b2822cd156e837781bd34f3625f7
[ "Apache-2.0" ]
null
null
null
tests/unit/streamalert/alert_processor/outputs/test_output_base.py
Meliairon/streamalert
3b774a59d260b2822cd156e837781bd34f3625f7
[ "Apache-2.0" ]
null
null
null
""" Copyright 2017-present Airbnb, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
36.610092
96
0.699035
from mock import Mock, patch, MagicMock from moto import mock_kms, mock_ssm from nose.tools import ( assert_equal, assert_is_instance, assert_is_not_none, assert_is_none, assert_count_equal ) from requests.exceptions import Timeout as ReqTimeout from streamalert.alert_processor.outputs.output_base ...
true
true
f7306785f709b39146aac848874a28763d800c0c
20,872
py
Python
test/functional/test_framework/script.py
bitcoin-money/bitcoinmoney
d208756366292fa7ab16b8f4b9f2dff9b8567bee
[ "MIT" ]
null
null
null
test/functional/test_framework/script.py
bitcoin-money/bitcoinmoney
d208756366292fa7ab16b8f4b9f2dff9b8567bee
[ "MIT" ]
null
null
null
test/functional/test_framework/script.py
bitcoin-money/bitcoinmoney
d208756366292fa7ab16b8f4b9f2dff9b8567bee
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2017 The Bitcoin Money developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Functionality to build scripts, as well as SignatureHash(). This file is modified from python-bitcoin...
30.118326
146
0.613549
from .mininode import CTransaction, CTxOut, sha256, hash256, uint256_from_str, ser_uint256, ser_string from binascii import hexlify import hashlib import sys bchr = chr bord = ord if sys.version > '3': long = int bchr = lambda x: bytes([x]) bord = lambda x: x import struct from .bignum import bn2vch MA...
true
true
f730697874d74284e3f36d2b3355caa3e355cf54
2,770
py
Python
mwparserfromhell/nodes/wikilink.py
valhallasw/mwparserfromhell
1607687c37c1b1e7c0c83a39d7803707665151ef
[ "MIT" ]
null
null
null
mwparserfromhell/nodes/wikilink.py
valhallasw/mwparserfromhell
1607687c37c1b1e7c0c83a39d7803707665151ef
[ "MIT" ]
null
null
null
mwparserfromhell/nodes/wikilink.py
valhallasw/mwparserfromhell
1607687c37c1b1e7c0c83a39d7803707665151ef
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2013 Ben Kurtovic <ben.kurtovic@gmail.com> # # 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 ...
33.373494
79
0.654152
from __future__ import unicode_literals from . import Node from ..compat import str from ..utils import parse_anything __all__ = ["Wikilink"] class Wikilink(Node): def __init__(self, title, text=None): super(Wikilink, self).__init__() self._title = title self._text = text def __uni...
true
true
f7306a936639c0c25548020fae55cc2780443200
935
py
Python
wus_feats_predict.py
FloodCamML/FloodCam-WUSFeats
b58c3f3770bebebf078be4e3804f12f3512b5569
[ "MIT" ]
2
2021-05-21T10:57:44.000Z
2021-05-29T17:02:54.000Z
wus_feats_predict.py
FloodCamML/FloodCam-WUSFeats
b58c3f3770bebebf078be4e3804f12f3512b5569
[ "MIT" ]
null
null
null
wus_feats_predict.py
FloodCamML/FloodCam-WUSFeats
b58c3f3770bebebf078be4e3804f12f3512b5569
[ "MIT" ]
1
2021-05-28T12:45:38.000Z
2021-05-28T12:45:38.000Z
#i/o import requests, os, random from glob import glob from collections import Counter from collections import defaultdict from PIL import Image from skimage.io import imread import pickle #numerica import numpy as np import tensorflow as tf import tensorflow.keras.backend as K from tensorflow import keras from ten...
29.21875
113
0.840642
import requests, os, random from glob import glob from collections import Counter from collections import defaultdict from PIL import Image from skimage.io import imread import pickle import numpy as np import tensorflow as tf import tensorflow.keras.backend as K from tensorflow import keras from tensorflow.keras i...
true
true
f7306be7655fa4665aa16310d89615d9df796e9f
207
py
Python
leetcode/python/others/hamming_distance.py
ajeet1308/code_problems
5d99839b6319295c6d81dd86775c46a536e7a1ca
[ "MIT" ]
61
2020-09-26T19:57:44.000Z
2022-03-09T18:51:44.000Z
leetcode/python/others/hamming_distance.py
ajeet1308/code_problems
5d99839b6319295c6d81dd86775c46a536e7a1ca
[ "MIT" ]
88
2020-09-19T20:00:27.000Z
2021-10-31T09:41:57.000Z
leetcode/python/others/hamming_distance.py
ajeet1308/code_problems
5d99839b6319295c6d81dd86775c46a536e7a1ca
[ "MIT" ]
218
2020-09-20T08:18:03.000Z
2022-01-30T23:13:16.000Z
class Solution: def hammingDistance(self, x: int, y: int) -> int: count = 0 diff = x ^ y while diff != 0: count += 1 diff &= (diff-1) return count
23
53
0.454106
class Solution: def hammingDistance(self, x: int, y: int) -> int: count = 0 diff = x ^ y while diff != 0: count += 1 diff &= (diff-1) return count
true
true
f7306cae98bbc792ae9e49ea47e2232347c28149
3,218
py
Python
homeassistant/util/logging.py
GotoCode/home-assistant
7e39a5c4d50cf5754f5f32a84870ca57a5778b02
[ "Apache-2.0" ]
11
2017-09-25T13:11:33.000Z
2020-05-16T21:54:28.000Z
homeassistant/util/logging.py
GotoCode/home-assistant
7e39a5c4d50cf5754f5f32a84870ca57a5778b02
[ "Apache-2.0" ]
125
2018-12-11T07:31:20.000Z
2021-07-27T08:20:03.000Z
homeassistant/util/logging.py
y1ngyang/home-assistant
7e39a5c4d50cf5754f5f32a84870ca57a5778b02
[ "Apache-2.0" ]
3
2018-05-22T18:52:01.000Z
2019-07-18T21:30:45.000Z
"""Logging utilities.""" import asyncio import logging import threading from .async_ import run_coroutine_threadsafe class HideSensitiveDataFilter(logging.Filter): """Filter API password calls.""" def __init__(self, text): """Initialize sensitive data filter.""" super().__init__() se...
26.377049
74
0.598198
import asyncio import logging import threading from .async_ import run_coroutine_threadsafe class HideSensitiveDataFilter(logging.Filter): def __init__(self, text): super().__init__() self.text = text def filter(self, record): record.msg = record.msg.replace(self.text, '*******') ...
true
true
f7306e7cc53d34293df4261830687777126b1853
107,459
py
Python
pysnmp-with-texts/HUAWEI-CLOCK-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/HUAWEI-CLOCK-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/HUAWEI-CLOCK-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module HUAWEI-CLOCK-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HUAWEI-CLOCK-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:43:52 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar ...
148.629322
11,779
0.782587
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, ConstraintsUnion, ValueSizeConstraint, SingleValueConstraint, ValueRangeConstraint = mibBuilder.impo...
true
true
f7306fd1c3e0405e0d613485262300727fcf5a80
340
py
Python
setup.py
ScottHMcKean/gfracture
63eec9fd4cf4234149b6a6656ec538d5a6ddcb41
[ "MIT" ]
null
null
null
setup.py
ScottHMcKean/gfracture
63eec9fd4cf4234149b6a6656ec538d5a6ddcb41
[ "MIT" ]
null
null
null
setup.py
ScottHMcKean/gfracture
63eec9fd4cf4234149b6a6656ec538d5a6ddcb41
[ "MIT" ]
null
null
null
from setuptools import setup setup(name='gfracture', version='0.1', description='Fracture segmentation and trace analysis', url='https://github.com/ScottHMcKean/gfracture', author='Scott McKean', author_email='scott.mckean@ucalgary.ca', license='MIT', packages=['gfracture'], ...
30.909091
61
0.667647
from setuptools import setup setup(name='gfracture', version='0.1', description='Fracture segmentation and trace analysis', url='https://github.com/ScottHMcKean/gfracture', author='Scott McKean', author_email='scott.mckean@ucalgary.ca', license='MIT', packages=['gfracture'], ...
true
true
f7307105658f4dd57c433ca83570b1d9ad3a1448
79
py
Python
src/textacy/tokenizers/__init__.py
austinjp/textacy
dddfdbf0e0ab3bf756bc4eda042eab1001aac709
[ "Apache-2.0" ]
1,929
2016-02-14T08:30:38.000Z
2022-03-31T03:00:35.000Z
src/textacy/tokenizers/__init__.py
austinjp/textacy
dddfdbf0e0ab3bf756bc4eda042eab1001aac709
[ "Apache-2.0" ]
304
2016-02-18T15:52:22.000Z
2022-03-31T18:06:54.000Z
src/textacy/tokenizers/__init__.py
austinjp/textacy
dddfdbf0e0ab3bf756bc4eda042eab1001aac709
[ "Apache-2.0" ]
285
2016-03-20T04:25:08.000Z
2022-03-24T11:31:17.000Z
from .char_ngrams import CharNgramsTokenizer from .terms import TermsTokenizer
26.333333
44
0.873418
from .char_ngrams import CharNgramsTokenizer from .terms import TermsTokenizer
true
true
f73071c7b77b19c3949f7425141f76374ee2f03f
1,667
py
Python
selfswab/migrations/0012_auto_20201202_1235.py
praekeltfoundation/healthcheck
3f8b3722ea41c2d81c706e0f9a3473ba2cb2f2ba
[ "BSD-3-Clause" ]
null
null
null
selfswab/migrations/0012_auto_20201202_1235.py
praekeltfoundation/healthcheck
3f8b3722ea41c2d81c706e0f9a3473ba2cb2f2ba
[ "BSD-3-Clause" ]
23
2020-07-16T15:40:35.000Z
2021-12-13T13:59:30.000Z
selfswab/migrations/0012_auto_20201202_1235.py
praekeltfoundation/healthcheck
3f8b3722ea41c2d81c706e0f9a3473ba2cb2f2ba
[ "BSD-3-Clause" ]
1
2021-02-24T04:58:40.000Z
2021-02-24T04:58:40.000Z
# Generated by Django 3.1 on 2020-12-02 10:35 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ("selfswab", "0011_selfswabtest_should_sync"), ] operations = [ migrations.AddField( model_name="selfsw...
28.741379
74
0.467307
from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ("selfswab", "0011_selfswabtest_should_sync"), ] operations = [ migrations.AddField( model_name="selfswabregistration", name="age", ...
true
true
f7307275427014a14072d16f4f9a637d0116fbc9
19,509
py
Python
tests/unit/common/db/test_api.py
onecloud/gbp-rally
7589b1788c4de26bb66c531ef340ba080754f8c3
[ "Apache-2.0" ]
null
null
null
tests/unit/common/db/test_api.py
onecloud/gbp-rally
7589b1788c4de26bb66c531ef340ba080754f8c3
[ "Apache-2.0" ]
null
null
null
tests/unit/common/db/test_api.py
onecloud/gbp-rally
7589b1788c4de26bb66c531ef340ba080754f8c3
[ "Apache-2.0" ]
null
null
null
# Copyright 2013: Mirantis 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 b...
43.066225
79
0.634579
from six import moves from rally.common import db from rally import consts from rally import exceptions from tests.unit import test class TasksTestCase(test.DBTestCase): def setUp(self): super(TasksTestCase, self).setUp() self.deploy = db.deployment_create({}) def _get_task(self, uuid): ...
true
true
f73072bb0fa62e6519596da6e47d9a8d23c2a32a
1,146
py
Python
src/wsgi.py
mine-archived/dinner
0b7e556994a6f8e91450377631f88694a97fdcf7
[ "MIT" ]
null
null
null
src/wsgi.py
mine-archived/dinner
0b7e556994a6f8e91450377631f88694a97fdcf7
[ "MIT" ]
null
null
null
src/wsgi.py
mine-archived/dinner
0b7e556994a6f8e91450377631f88694a97fdcf7
[ "MIT" ]
null
null
null
""" WSGI config for src project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` sett...
38.2
79
0.790576
import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") # setting points here. from django.core.wsgi import get_wsgi_application application = get_wsgi_application() # Apply WSGI middleware here. # from helloworld.wsgi import HelloWorldApplication # application = HelloWorldApplica...
true
true
f73073b29e40f88ca0b69b779adcab0c43322bfc
10,040
py
Python
modules/feature_extraction.py
OverFitted/ai-academy-2022
e58a68a13d81f203027cc367f5f335c2b22f0962
[ "MIT" ]
null
null
null
modules/feature_extraction.py
OverFitted/ai-academy-2022
e58a68a13d81f203027cc367f5f335c2b22f0962
[ "MIT" ]
null
null
null
modules/feature_extraction.py
OverFitted/ai-academy-2022
e58a68a13d81f203027cc367f5f335c2b22f0962
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') class VGG_FeatureExtractor(nn.Module): def __init__(self, input_channel, output_channel=512): super(VGG_FeatureExtractor, self).__init__() self.output_channel = ...
41.659751
118
0.612251
import torch import torch.nn as nn import torch.nn.functional as F device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') class VGG_FeatureExtractor(nn.Module): def __init__(self, input_channel, output_channel=512): super(VGG_FeatureExtractor, self).__init__() self.output_channel = ...
true
true
f73075b082a65a62398c6c4d6ab5bdf795ac00ee
8,704
py
Python
examples/python-guide/Gaussian_process_mixed_effects_models_example.py
StatMixedML/GPBoost
786d8be61c5c28da0690e167af636a6d777bf9e1
[ "Apache-2.0" ]
2
2020-04-12T06:12:17.000Z
2020-04-12T15:34:01.000Z
examples/python-guide/Gaussian_process_mixed_effects_models_example.py
StatMixedML/GPBoost
786d8be61c5c28da0690e167af636a6d777bf9e1
[ "Apache-2.0" ]
null
null
null
examples/python-guide/Gaussian_process_mixed_effects_models_example.py
StatMixedML/GPBoost
786d8be61c5c28da0690e167af636a6d777bf9e1
[ "Apache-2.0" ]
1
2020-04-12T15:34:12.000Z
2020-04-12T15:34:12.000Z
# coding: utf-8 # pylint: disable = invalid-name, C0111 import gpboost as gpb import numpy as np # import pandas as pd import matplotlib.pyplot as plt plt.style.use('ggplot') # --------------------Grouped random effects model: single-level random effect---------------- # Simulate data n = 100 # number of samples m = ...
42.048309
110
0.654756
import gpboost as gpb import numpy as np import matplotlib.pyplot as plt plt.style.use('ggplot') n = 100 m = 25 group = np.arange(n) for i in range(m): group[int(i * n / m):int((i + 1) * n / m)] = i Z1 = np.zeros((n, m)) for i in range(m): Z1[np.where(group == i), i] = 1 sigma2_1 = 1 ** 2 sigma2 = 0.5 ** 2...
true
true
f73075bef3ed405f4ed01eba617bcacbd18b5ea5
10,394
py
Python
tests/test_renault_vehicle.py
Nebukadneza/renault-api
30fdcc405575ca394c98b556878260da787c9ffc
[ "MIT" ]
null
null
null
tests/test_renault_vehicle.py
Nebukadneza/renault-api
30fdcc405575ca394c98b556878260da787c9ffc
[ "MIT" ]
null
null
null
tests/test_renault_vehicle.py
Nebukadneza/renault-api
30fdcc405575ca394c98b556878260da787c9ffc
[ "MIT" ]
null
null
null
"""Test cases for the Renault client API keys.""" from datetime import datetime from typing import List import aiohttp import pytest from aioresponses import aioresponses from tests import get_file_content from tests.const import TEST_ACCOUNT_ID from tests.const import TEST_COUNTRY from tests.const import TEST_KAMEREO...
35.233898
88
0.681547
from datetime import datetime from typing import List import aiohttp import pytest from aioresponses import aioresponses from tests import get_file_content from tests.const import TEST_ACCOUNT_ID from tests.const import TEST_COUNTRY from tests.const import TEST_KAMEREON_URL from tests.const import TEST_LOCALE_DETAILS ...
true
true
f73076c02920003b04f8d7e5599366f2dce13c0e
1,277
py
Python
randomgenius.py
JosephCottingham/MusicPlaylist-LinkedList
bb8014158fed05b45194705424bc5830ed25527a
[ "MIT" ]
null
null
null
randomgenius.py
JosephCottingham/MusicPlaylist-LinkedList
bb8014158fed05b45194705424bc5830ed25527a
[ "MIT" ]
null
null
null
randomgenius.py
JosephCottingham/MusicPlaylist-LinkedList
bb8014158fed05b45194705424bc5830ed25527a
[ "MIT" ]
null
null
null
import requests, json, random, sys, configparser #def getData(auth_string, id): def getData(): global auth_token s = random.randint(100000, 1000000) id_str = str(s) request_url = "http://api.genius.com/songs/" + id_str headersMap = { "User-Agent": "CompuServe Classic/1.22", ...
29.697674
61
0.628034
import requests, json, random, sys, configparser def getData(): global auth_token s = random.randint(100000, 1000000) id_str = str(s) request_url = "http://api.genius.com/songs/" + id_str headersMap = { "User-Agent": "CompuServe Classic/1.22", "Accept": "application/json", ...
true
true
f73077be389c6681ad96c3ab9228da1f85632f08
2,263
py
Python
aliyun-python-sdk-cdn/aliyunsdkcdn/request/v20141111/SetHttpHeaderConfigRequest.py
liumihust/aliyun-openapi-python-sdk
c7b5dd4befae4b9c59181654289f9272531207ef
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-cdn/aliyunsdkcdn/request/v20141111/SetHttpHeaderConfigRequest.py
liumihust/aliyun-openapi-python-sdk
c7b5dd4befae4b9c59181654289f9272531207ef
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-cdn/aliyunsdkcdn/request/v20141111/SetHttpHeaderConfigRequest.py
liumihust/aliyun-openapi-python-sdk
c7b5dd4befae4b9c59181654289f9272531207ef
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
33.776119
74
0.764914
from aliyunsdkcore.request import RpcRequest from aliyunsdkcdn.endpoint import endpoint_data class SetHttpHeaderConfigRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Cdn', '2014-11-11', 'SetHttpHeaderConfig') if hasattr(self, "endpoint_map"): setattr(self, "endpoint_map", endpoint_data.ge...
true
true
f7307823c40ee64d03118ec461eb3103c01b9c29
5,544
py
Python
Heats/scoresheetsHtml.py
yuxuibbs/MCC-Competition-Docs
384726c41434c5a07becb6438c3d2409c6ca6eb4
[ "MIT" ]
4
2016-11-13T20:49:33.000Z
2017-12-20T20:03:03.000Z
Heats/scoresheetsHtml.py
yuxuibbs/MCC-Competition-Docs
384726c41434c5a07becb6438c3d2409c6ca6eb4
[ "MIT" ]
5
2016-12-26T19:14:46.000Z
2022-02-11T03:44:39.000Z
Heats/scoresheetsHtml.py
yuxuibbs/MCC-Competition-Docs
384726c41434c5a07becb6438c3d2409c6ca6eb4
[ "MIT" ]
2
2016-12-29T12:03:15.000Z
2017-02-16T15:51:02.000Z
startHTML = ''' <html> <head> <style> table { border-collapse: collapse; height: 100%; width: 100%; } table, th, td { border: 3px solid black; } @media print { table { page-break-after: always; ...
25.906542
64
0.418831
startHTML = ''' <html> <head> <style> table { border-collapse: collapse; height: 100%; width: 100%; } table, th, td { border: 3px solid black; } @media print { table { page-break-after: always; ...
true
true
f7307828ee10c47bd1ad7591cd1e3358963ef61f
1,063
py
Python
authors/apps/authentication/tests/test_login.py
andela/ah-backend-thanos
baf7f20a023cc3c3ecae0fcf91bb7d9165e79fc8
[ "BSD-3-Clause" ]
null
null
null
authors/apps/authentication/tests/test_login.py
andela/ah-backend-thanos
baf7f20a023cc3c3ecae0fcf91bb7d9165e79fc8
[ "BSD-3-Clause" ]
42
2018-10-24T08:21:07.000Z
2021-06-10T20:54:39.000Z
authors/apps/authentication/tests/test_login.py
andela/ah-backend-thanos
baf7f20a023cc3c3ecae0fcf91bb7d9165e79fc8
[ "BSD-3-Clause" ]
2
2018-11-05T08:56:42.000Z
2019-05-03T12:40:43.000Z
from rest_framework import status from django.contrib.auth import get_user_model from rest_framework.reverse import reverse from .basetest import BaseTestCase User = get_user_model() signup_url = reverse("authentication:signup") login_url = reverse("authentication:login") class UserApiTestCase(BaseTestCase): d...
34.290323
77
0.643462
from rest_framework import status from django.contrib.auth import get_user_model from rest_framework.reverse import reverse from .basetest import BaseTestCase User = get_user_model() signup_url = reverse("authentication:signup") login_url = reverse("authentication:login") class UserApiTestCase(BaseTestCase): d...
true
true
f73078ac1b77d76adea8e2e058894be4fc7fa673
4,504
py
Python
techno_files/eic25_zawieszki.py
lukaszmachura/ejc2019_name_badge
13996bdfc25958129fda26a8692c1e08c016eae4
[ "MIT" ]
null
null
null
techno_files/eic25_zawieszki.py
lukaszmachura/ejc2019_name_badge
13996bdfc25958129fda26a8692c1e08c016eae4
[ "MIT" ]
null
null
null
techno_files/eic25_zawieszki.py
lukaszmachura/ejc2019_name_badge
13996bdfc25958129fda26a8692c1e08c016eae4
[ "MIT" ]
null
null
null
import subprocess import os def read_list(fname="lista.csv"): for row in open(fname): yield row def write_preamble(fname): preamble = r"""%25 EIC technology, (C) LM 2018 \documentclass{article} \usepackage{graphicx} \usepackage[space]{grffile} \usepackage{anyfontsize} \usepackage{fon...
23.458333
76
0.552398
import subprocess import os def read_list(fname="lista.csv"): for row in open(fname): yield row def write_preamble(fname): preamble = r"""%25 EIC technology, (C) LM 2018 \documentclass{article} \usepackage{graphicx} \usepackage[space]{grffile} \usepackage{anyfontsize} \usepackage{fon...
true
true
f73079477a3e239cd6a9759ffd6c3d612f6a5ff4
9,121
py
Python
google/ads/google_ads/interceptors/interceptor.py
allandproust/google-ads-python
004d283f5c9031748782884daad41d97c281cafa
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/interceptors/interceptor.py
allandproust/google-ads-python
004d283f5c9031748782884daad41d97c281cafa
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/interceptors/interceptor.py
allandproust/google-ads-python
004d283f5c9031748782884daad41d97c281cafa
[ "Apache-2.0" ]
1
2020-03-13T00:14:31.000Z
2020-03-13T00:14:31.000Z
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
37.846473
82
0.63129
from collections import namedtuple from importlib import import_module import json from google.protobuf.message import DecodeError from grpc import ClientCallDetails, StatusCode from google.ads.google_ads.errors import GoogleAdsException _REQUEST_ID_KEY = 'request-id' _RETRY_STATUS_CODES = (StatusCode.INTERNAL, Sta...
true
true
f7307a29a25257c1fb187abf7a58e0c31eda5993
17,968
py
Python
toolchain/riscv/MSYS/python/Lib/test/test_platform.py
zhiqiang-hu/bl_iot_sdk
154ee677a8cc6a73e6a42a5ff12a8edc71e6d15d
[ "Apache-2.0" ]
null
null
null
toolchain/riscv/MSYS/python/Lib/test/test_platform.py
zhiqiang-hu/bl_iot_sdk
154ee677a8cc6a73e6a42a5ff12a8edc71e6d15d
[ "Apache-2.0" ]
1
2020-04-23T02:34:53.000Z
2020-04-23T02:34:53.000Z
toolchain/riscv/MSYS/python/Lib/test/test_platform.py
zhiqiang-hu/bl_iot_sdk
154ee677a8cc6a73e6a42a5ff12a8edc71e6d15d
[ "Apache-2.0" ]
1
2020-04-27T15:07:54.000Z
2020-04-27T15:07:54.000Z
from unittest import mock import os import platform import subprocess import sys import sysconfig import tempfile import unittest import warnings from test import support class PlatformTest(unittest.TestCase): def test_architecture(self): res = platform.architecture() @support.skip_un...
41.689095
114
0.512077
from unittest import mock import os import platform import subprocess import sys import sysconfig import tempfile import unittest import warnings from test import support class PlatformTest(unittest.TestCase): def test_architecture(self): res = platform.architecture() @support.skip_un...
true
true
f7307a51d6578e0dff654d9626eca5b71b10855a
2,435
py
Python
src/core/magicae/core.py
ravenSanstete/hako
fe72c76e9f319add1921a63dee711f90f4960873
[ "MIT" ]
1
2016-11-17T07:15:00.000Z
2016-11-17T07:15:00.000Z
src/core/magicae/core.py
ravenSanstete/hako
fe72c76e9f319add1921a63dee711f90f4960873
[ "MIT" ]
6
2016-11-17T10:27:38.000Z
2016-11-18T13:20:05.000Z
src/core/magicae/core.py
ravenSanstete/hako
fe72c76e9f319add1921a63dee711f90f4960873
[ "MIT" ]
null
null
null
""" Implementation of an auxiliary class that as an intermediate layer of Monad and Prototype A Function Class """ import functools as F from __init__ import utils from __init__ import proto # a magica determines (A) the way to distribute the difference to each prototype # (B) the way to measure o...
48.7
120
0.720329
import functools as F from __init__ import utils from __init__ import proto class Magica(object): def __init__(self): super(Magica,self).__init__() def mix(self, prototypes): utils.check_types(prototypes,proto.Prototype); return F.partial(measure, self, prototypes), F.partial(prop...
true
true
f7307f0a3175323d41f8181d3a53d0ce5b8e591e
3,465
py
Python
src/programy/parser/template/nodes/system.py
cen-ai/program-y
a753667638147544c54dbebd9f1c8f9ae7f2159e
[ "MIT" ]
5
2018-08-21T00:13:45.000Z
2018-09-01T20:00:55.000Z
src/programy/parser/template/nodes/system.py
cen-ai/program-y
a753667638147544c54dbebd9f1c8f9ae7f2159e
[ "MIT" ]
1
2018-09-12T18:30:17.000Z
2018-09-12T18:30:17.000Z
src/programy/parser/template/nodes/system.py
cen-ai/program-y
a753667638147544c54dbebd9f1c8f9ae7f2159e
[ "MIT" ]
5
2018-08-21T00:08:36.000Z
2018-09-23T06:11:04.000Z
""" Copyright (c) 2016-2018 Keith Sterling http://www.keithsterling.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, m...
42.777778
120
0.679076
from programy.utils.logging.ylogger import YLogger import subprocess from programy.parser.exceptions import ParserException from programy.parser.template.nodes.attrib import TemplateAttribNode class TemplateSystemNode(TemplateAttribNode): def __init__(self): TemplateAttribNode.__init__(self) se...
true
true
f73080eed9178010cd0131e215e25b70104b6075
1,483
py
Python
engine/test_cloud_init.py
cnrancher/os-tests
57d46413954e602e81cad287410dfecf46bfef84
[ "Apache-2.0" ]
2
2018-11-14T17:02:02.000Z
2019-07-19T07:13:41.000Z
engine/test_cloud_init.py
cnrancher/os-tests
57d46413954e602e81cad287410dfecf46bfef84
[ "Apache-2.0" ]
13
2018-11-06T09:29:50.000Z
2019-12-23T07:36:07.000Z
engine/test_cloud_init.py
cnrancher/os-tests
57d46413954e602e81cad287410dfecf46bfef84
[ "Apache-2.0" ]
1
2018-11-05T04:03:20.000Z
2018-11-05T04:03:20.000Z
# coding = utf-8 # Create date: 2018-11-20 # Author :Hailong from utils.connect_to_os import executor, connection def test_cloud_init(ros_kvm_init, cloud_config_url): kwargs = dict(cloud_config='{url}test_cloud_init.yml'.format(url=cloud_config_url), is_install_to_hard_drive=True) tuple_retu...
35.309524
110
0.647336
from utils.connect_to_os import executor, connection def test_cloud_init(ros_kvm_init, cloud_config_url): kwargs = dict(cloud_config='{url}test_cloud_init.yml'.format(url=cloud_config_url), is_install_to_hard_drive=True) tuple_return = ros_kvm_init(**kwargs) client = tuple_return[0] ...
true
true
f730815c16e59fb5fe9c61f2d195fe9da671f9b0
1,023
py
Python
Python/as-far-from-land-as-possible.py
sm2774us/leetcode_interview_prep_2021
33b41bea66c266b733372d9a8b9d2965cd88bf8c
[ "Fair" ]
null
null
null
Python/as-far-from-land-as-possible.py
sm2774us/leetcode_interview_prep_2021
33b41bea66c266b733372d9a8b9d2965cd88bf8c
[ "Fair" ]
null
null
null
Python/as-far-from-land-as-possible.py
sm2774us/leetcode_interview_prep_2021
33b41bea66c266b733372d9a8b9d2965cd88bf8c
[ "Fair" ]
null
null
null
# Time: O(m * n) # Space: O(m * n) import collections class Solution(object): def maxDistance(self, grid): """ :type grid: List[List[int]] :rtype: int """ directions = [(0, 1), (1, 0), (0, -1), (-1, 0)] q = collections.deque([(i, j) for i in range(len(grid)) ...
30.088235
87
0.379277
import collections class Solution(object): def maxDistance(self, grid): directions = [(0, 1), (1, 0), (0, -1), (-1, 0)] q = collections.deque([(i, j) for i in range(len(grid)) for j in range(len(grid[0])) if grid[i][j] == 1]) if len(q) == len(grid)*le...
true
true
f73081bc0d5f8d3350d07a2150f753fd344a22a7
623
py
Python
guanabara/Exercicios/mundo 1 _ aulas 01 a 12/001-003.py
pbittencourt/datasciencestudies
85f0b2a4366fe7c6daa5628ed4bd2994355963c0
[ "MIT" ]
null
null
null
guanabara/Exercicios/mundo 1 _ aulas 01 a 12/001-003.py
pbittencourt/datasciencestudies
85f0b2a4366fe7c6daa5628ed4bd2994355963c0
[ "MIT" ]
null
null
null
guanabara/Exercicios/mundo 1 _ aulas 01 a 12/001-003.py
pbittencourt/datasciencestudies
85f0b2a4366fe7c6daa5628ed4bd2994355963c0
[ "MIT" ]
null
null
null
# PRIMEIROS PASSOS """ Imprime OLÁ, MUNDO na tela -- obviamente! Pede nome do usuário e dois números. Exibe nome do usuário e a soma dos números inseridos """ print('Hello, world!!!') nome = input('Qual é o seu nome? ') print('Olá, {}, é um prazer te conhecer!'.format(nome)) # idade = int(input('Qual é a sua idade? ')...
32.789474
86
0.659711
print('Hello, world!!!') nome = input('Qual é o seu nome? ') print('Olá, {}, é um prazer te conhecer!'.format(nome)) idade = int(input('Qual é a sua idade? ')) print('Você tem {} anos e ano que vem você terá {} anos' .format(idade, idade + 1)) n1 = int(input('Aproveitando a brincadeira, {}, digita um número aí: ' .fo...
true
true
f73081bcbbb55a3e2f6093ea3985232180c04f1a
1,812
py
Python
homework/HW4/HW4-final/P1.py
TangJiahui/cs107_system_devlopment
c46d7769683d9be0c31973e3b0666e3fe2a4099b
[ "MIT" ]
null
null
null
homework/HW4/HW4-final/P1.py
TangJiahui/cs107_system_devlopment
c46d7769683d9be0c31973e3b0666e3fe2a4099b
[ "MIT" ]
null
null
null
homework/HW4/HW4-final/P1.py
TangJiahui/cs107_system_devlopment
c46d7769683d9be0c31973e3b0666e3fe2a4099b
[ "MIT" ]
1
2021-09-21T16:28:51.000Z
2021-09-21T16:28:51.000Z
import numpy as np import matplotlib.pyplot as plt # Part A: Numerical Differentiation Closure def numerical_diff(f,h): def inner(x): return (f(x+h) - f(x))/h return inner # Part B: f = np.log x = np.linspace(0.2, 0.4, 500) h = [1e-1, 1e-7, 1e-15] y_analytical = 1/x result = {} for i in h: y = n...
38.553191
219
0.724614
import numpy as np import matplotlib.pyplot as plt def numerical_diff(f,h): def inner(x): return (f(x+h) - f(x))/h return inner f = np.log x = np.linspace(0.2, 0.4, 500) h = [1e-1, 1e-7, 1e-15] y_analytical = 1/x result = {} for i in h: y = numerical_diff(f,i)(x) result[i] = y plt.figure(fi...
true
true
f730824ede58439b2808be47b15c08761386514e
10,409
py
Python
neutron/plugins/mlnx/db/mlnx_db_v2.py
petrutlucian94/neutron
44976d12bbe72331e536d92bb46e35a8835a75ce
[ "Apache-2.0" ]
null
null
null
neutron/plugins/mlnx/db/mlnx_db_v2.py
petrutlucian94/neutron
44976d12bbe72331e536d92bb46e35a8835a75ce
[ "Apache-2.0" ]
null
null
null
neutron/plugins/mlnx/db/mlnx_db_v2.py
petrutlucian94/neutron
44976d12bbe72331e536d92bb46e35a8835a75ce
[ "Apache-2.0" ]
null
null
null
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 Mellanox Technologies, Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
39.729008
79
0.614372
from sqlalchemy.orm import exc from neutron.common import exceptions as q_exc import neutron.db.api as db from neutron.db import models_v2 from neutron.db import securitygroups_db as sg_db from neutron import manager from neutron.openstack.common import log as logging from neutron.plugins.mlnx.common import config f...
true
true
f7308345fe160b2a1f7b7c825a95a3b7f2aa10bc
6,872
py
Python
scripts/07_tensor_linear_regresssion.py
UnacceptableBehaviour/pytorch_tut_00
ca74b9bde8485f651bda9314b8f4a7ed277db787
[ "MIT" ]
null
null
null
scripts/07_tensor_linear_regresssion.py
UnacceptableBehaviour/pytorch_tut_00
ca74b9bde8485f651bda9314b8f4a7ed277db787
[ "MIT" ]
null
null
null
scripts/07_tensor_linear_regresssion.py
UnacceptableBehaviour/pytorch_tut_00
ca74b9bde8485f651bda9314b8f4a7ed277db787
[ "MIT" ]
null
null
null
#! /usr/bin/env python # PyTorch Tutorial 07 - Linear Regression # https://www.youtube.com/watch?v=YAJ5XBwlN4o&list=PLqnslRFeH2UrcDBWF5mfPGpqQDSta6VK4&index=7 #from __future__ import print_function import torch print("\n" * 20) print("-" * 80) print("-" * 80) print("\n" * 2) #### Steps in Torch ML pipeline # 1) Desi...
42.95
120
0.625437
import torch print("\n" * 20) print("-" * 80) print("-" * 80) print("\n" * 2) import torch import torch.nn as nn import numpy as np from sklearn import datasets import matplotlib.pyplot as plt x_numpy, y_numpy = datasets.make_regression(n_samp...
true
true
f73083901e3441f13ab867dc840908e3619b3a39
18,332
py
Python
zerver/lib/markdown/fenced_code.py
narendrapsgim/zulip
e2df0d171f921d1e2b09d5de72088ffcc6a0f5f4
[ "Apache-2.0" ]
17,004
2015-09-25T18:27:24.000Z
2022-03-31T22:02:32.000Z
zerver/lib/markdown/fenced_code.py
narendrapsgim/zulip
e2df0d171f921d1e2b09d5de72088ffcc6a0f5f4
[ "Apache-2.0" ]
20,344
2015-09-25T19:02:42.000Z
2022-03-31T23:54:40.000Z
zerver/lib/markdown/fenced_code.py
narendrapsgim/zulip
e2df0d171f921d1e2b09d5de72088ffcc6a0f5f4
[ "Apache-2.0" ]
7,271
2015-09-25T18:48:39.000Z
2022-03-31T21:06:11.000Z
""" Fenced Code Extension for Python Markdown ========================================= This extension adds Fenced Code Blocks to Python-Markdown. >>> import markdown >>> text = ''' ... A paragraph before a fenced code block: ... ... ~~~ ... Fenced code block ... ~~~ ... ''' >>> ht...
32.971223
100
0.603971
import re from typing import Any, Callable, Dict, Iterable, List, Mapping, MutableSequence, Optional, Sequence import lxml.html from django.utils.html import escape from markdown import Markdown from markdown.extensions import Extension, codehilite from markdown.extensions.codehilite import CodeHiliteExtension, parse_...
true
true
f73083f83f4bca4deac6272da174e16b8fa14446
3,149
py
Python
heat/tests/clients/test_glance_client.py
ISCAS-VDI/heat-base
ca8390434edfd8396c7e46651e1e31ff488b2307
[ "Apache-2.0" ]
1
2015-12-18T21:46:55.000Z
2015-12-18T21:46:55.000Z
heat/tests/clients/test_glance_client.py
ISCAS-VDI/heat-base
ca8390434edfd8396c7e46651e1e31ff488b2307
[ "Apache-2.0" ]
null
null
null
heat/tests/clients/test_glance_client.py
ISCAS-VDI/heat-base
ca8390434edfd8396c7e46651e1e31ff488b2307
[ "Apache-2.0" ]
null
null
null
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
38.876543
79
0.643061
import uuid from glanceclient import exc from glanceclient.openstack.common.apiclient import exceptions import mock from heat.engine.clients.os import glance from heat.tests import common from heat.tests import utils class GlanceUtilsTest(common.HeatTestCase): def setUp(self): super(GlanceUtilsTest, s...
true
true
f730842547db0fa4ac95c76cc51c2fc28fb8e9b8
7,385
py
Python
imcsdk/mometa/export/ExportLdapCACertificate.py
vadimkuznetsov/imcsdk
ed038ce1dbc8031f99d2dfb3ccee3bf0b48309d8
[ "Apache-2.0" ]
null
null
null
imcsdk/mometa/export/ExportLdapCACertificate.py
vadimkuznetsov/imcsdk
ed038ce1dbc8031f99d2dfb3ccee3bf0b48309d8
[ "Apache-2.0" ]
null
null
null
imcsdk/mometa/export/ExportLdapCACertificate.py
vadimkuznetsov/imcsdk
ed038ce1dbc8031f99d2dfb3ccee3bf0b48309d8
[ "Apache-2.0" ]
1
2019-11-10T18:42:04.000Z
2019-11-10T18:42:04.000Z
"""This module contains the general information for ExportLdapCACertificate ManagedObject.""" from ...imcmo import ManagedObject from ...imccoremeta import MoPropertyMeta, MoMeta from ...imcmeta import VersionMeta class ExportLdapCACertificateConsts: PROTOCOL_FTP = "ftp" PROTOCOL_HTTP = "http" PROTOCOL_N...
69.018692
907
0.579282
from ...imcmo import ManagedObject from ...imccoremeta import MoPropertyMeta, MoMeta from ...imcmeta import VersionMeta class ExportLdapCACertificateConsts: PROTOCOL_FTP = "ftp" PROTOCOL_HTTP = "http" PROTOCOL_NONE = "none" PROTOCOL_SCP = "scp" PROTOCOL_SFTP = "sftp" PROTOCOL_TFTP = "tftp" ...
true
true
f730844764dcd79f2f76188b5b0b2bdde3759d30
30,151
py
Python
eta/core/labels.py
MagicCodess/eta
4599292a4de1f5f477e159787e2c2127d9fbde1b
[ "Apache-2.0" ]
null
null
null
eta/core/labels.py
MagicCodess/eta
4599292a4de1f5f477e159787e2c2127d9fbde1b
[ "Apache-2.0" ]
null
null
null
eta/core/labels.py
MagicCodess/eta
4599292a4de1f5f477e159787e2c2127d9fbde1b
[ "Apache-2.0" ]
null
null
null
""" Core data structures for working with labels. Copyright 2017-2022, Voxel51, Inc. voxel51.com """ # pragma pylint: disable=redefined-builtin # pragma pylint: disable=unused-wildcard-import # pragma pylint: disable=wildcard-import from __future__ import absolute_import from __future__ import division from __future__...
30.000995
79
0.629631
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from builtins import * from future.utils import iteritems from collections import defaultdict import logging import eta.core.serial as etas import eta.core.utils as eta...
true
true
f73084dd6dc2a8e45a03307bb76941dc0e054034
2,458
py
Python
examples/image_classification/classify.py
sergioalberto/rpi-deep-learning
94024c2b2c225dc607954874bdcd345b805b1561
[ "MIT" ]
null
null
null
examples/image_classification/classify.py
sergioalberto/rpi-deep-learning
94024c2b2c225dc607954874bdcd345b805b1561
[ "MIT" ]
14
2021-03-19T04:37:26.000Z
2022-03-12T00:23:16.000Z
examples/image_classification/classify.py
sergioalberto/rpi-deep-learning-lab
94024c2b2c225dc607954874bdcd345b805b1561
[ "MIT" ]
null
null
null
# 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...
34.619718
91
0.767697
from tensorflow.lite.python.interpreter import Interpreter import numpy as np import argparse from PIL import Image parser = argparse.ArgumentParser(description='Image Classification') parser.add_argument('--filename', type=str, help='Specify the filename', required=True) parser.add_argument('--model_path', type=str...
true
true
f73086577458af1fa28ed63eff9c394107997af2
29,942
py
Python
binance/websockets.py
pnpn521521/python-binance-with-futures-websocket
483737fb364f4de07427df4c2b76e63561b40bbb
[ "MIT" ]
17
2020-04-22T11:24:11.000Z
2022-03-14T10:03:02.000Z
binance/websockets.py
pnpn521521/python-binance-with-futures-websocket
483737fb364f4de07427df4c2b76e63561b40bbb
[ "MIT" ]
null
null
null
binance/websockets.py
pnpn521521/python-binance-with-futures-websocket
483737fb364f4de07427df4c2b76e63561b40bbb
[ "MIT" ]
7
2020-06-30T20:30:28.000Z
2021-07-28T02:25:27.000Z
# coding=utf-8 import json import threading from autobahn.twisted.websocket import WebSocketClientFactory, \ WebSocketClientProtocol, \ connectWS from twisted.internet import reactor, ssl from twisted.internet.protocol import ReconnectingClientFactory from twisted.internet.error import ReactorAlreadyRunning ...
36.514634
141
0.583962
import json import threading from autobahn.twisted.websocket import WebSocketClientFactory, \ WebSocketClientProtocol, \ connectWS from twisted.internet import reactor, ssl from twisted.internet.protocol import ReconnectingClientFactory from twisted.internet.error import ReactorAlreadyRunning from binance.cl...
true
true
f73087aa81776159702022d95866d5b4fbe8cb4f
3,942
py
Python
level3/usb/decrypt.py
fishilico/sstic-2016
9a05bb18df4c8d2e76f1e30fda6b38b1bc930e8c
[ "Beerware" ]
null
null
null
level3/usb/decrypt.py
fishilico/sstic-2016
9a05bb18df4c8d2e76f1e30fda6b38b1bc930e8c
[ "Beerware" ]
null
null
null
level3/usb/decrypt.py
fishilico/sstic-2016
9a05bb18df4c8d2e76f1e30fda6b38b1bc930e8c
[ "Beerware" ]
1
2020-04-03T06:19:11.000Z
2020-04-03T06:19:11.000Z
#!/usr/bin/env python3 import binascii import hashlib import os.path import struct import sys sys.path.insert(0, os.path.dirname(__file__)) import rc4 # Helper functions def rol32(val, shift): val = val & 0xffffffff shift = shift & 0x1f if not shift: return val return ((val << shift) & 0xffff...
32.04878
86
0.691781
import binascii import hashlib import os.path import struct import sys sys.path.insert(0, os.path.dirname(__file__)) import rc4 def rol32(val, shift): val = val & 0xffffffff shift = shift & 0x1f if not shift: return val return ((val << shift) & 0xffffffff) | (val >> (32 - shift)) def ror32(v...
true
true
f73087de99d28d62c47ee47f567d8a406a1bc2b8
1,502
py
Python
var/spack/repos/builtin/packages/eztrace/package.py
robertodr/spack
9b809e01b47d48f01b3d257912fe1b752943cd3d
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2020-08-13T15:24:33.000Z
2021-10-18T18:38:19.000Z
var/spack/repos/builtin/packages/eztrace/package.py
robertodr/spack
9b809e01b47d48f01b3d257912fe1b752943cd3d
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
4
2020-07-24T17:09:12.000Z
2022-01-17T22:39:06.000Z
var/spack/repos/builtin/packages/eztrace/package.py
robertodr/spack
9b809e01b47d48f01b3d257912fe1b752943cd3d
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2019-01-22T14:01:28.000Z
2020-07-23T21:35:12.000Z
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Eztrace(AutotoolsPackage): """EZTrace is a tool to automatically generate execution traces...
31.957447
106
0.62783
from spack import * class Eztrace(AutotoolsPackage): homepage = "http://eztrace.gforge.inria.fr" url = "https://gitlab.com/eztrace/eztrace/-/archive/eztrace-1.1-10/eztrace-eztrace-1.1-10.tar.gz" maintainers = ['trahay'] version('1.1-10', sha256='97aba8f3b3b71e8e2f7ef47e00c262234e27b9cb4a870c85...
true
true
f7308819cec616f6758ef2e8960686762613ad90
18,855
py
Python
cbcintacctsdk/apis/api_base.py
Cold-Bore-Capital/sageintacct-sdk-py
a65c89aba9987a6d74238ad7d28b39ddd704d68c
[ "MIT" ]
null
null
null
cbcintacctsdk/apis/api_base.py
Cold-Bore-Capital/sageintacct-sdk-py
a65c89aba9987a6d74238ad7d28b39ddd704d68c
[ "MIT" ]
null
null
null
cbcintacctsdk/apis/api_base.py
Cold-Bore-Capital/sageintacct-sdk-py
a65c89aba9987a6d74238ad7d28b39ddd704d68c
[ "MIT" ]
null
null
null
""" API Base class with util functions """ import json import datetime import uuid from warnings import warn from typing import Dict, List, Tuple from urllib.parse import unquote import re import xmltodict import requests from ..exceptions import SageIntacctSDKError, ExpiredTokenError, InvalidTokenError, NoPrivilegeE...
34.723757
137
0.547759
import json import datetime import uuid from warnings import warn from typing import Dict, List, Tuple from urllib.parse import unquote import re import xmltodict import requests from ..exceptions import SageIntacctSDKError, ExpiredTokenError, InvalidTokenError, NoPrivilegeError, \ WrongParamsError, NotFoundItemE...
true
true
f730894e33a039bd60f085adc8ba9927f4c02448
17,661
py
Python
binance.py
mrhuytran/bnb-api-wrapper
569e6eddc9c44f50a918b046cdb248bee60ac0e1
[ "MIT" ]
1
2021-02-19T17:23:04.000Z
2021-02-19T17:23:04.000Z
binance.py
mrhuytran/bnb-api-wrapper
569e6eddc9c44f50a918b046cdb248bee60ac0e1
[ "MIT" ]
null
null
null
binance.py
mrhuytran/bnb-api-wrapper
569e6eddc9c44f50a918b046cdb248bee60ac0e1
[ "MIT" ]
1
2020-11-16T05:59:49.000Z
2020-11-16T05:59:49.000Z
import requests import json from datetime import datetime import time import pandas as pd from pandas import DataFrame as df import hmac import hashlib from interval_enum import Interval from order_enum import Order class BinanceClient: def __init__(self, api_key, api_secret): self.key = api_key ...
33.135084
120
0.554895
import requests import json from datetime import datetime import time import pandas as pd from pandas import DataFrame as df import hmac import hashlib from interval_enum import Interval from order_enum import Order class BinanceClient: def __init__(self, api_key, api_secret): self.key = api_key ...
true
true
f7308a1085cb46493a7cbe0bd9834d3db9018f4f
946
py
Python
Initial files/dht_publish.py
vinayrnair/ESP32-DHT22-Sensors
cc7a34eb866b39aa62ce8cdf676371aa9d6a3d28
[ "Unlicense" ]
1
2021-12-07T09:40:38.000Z
2021-12-07T09:40:38.000Z
Initial files/dht_publish.py
vinayrnair/ESP32-DHT22-Sensors
cc7a34eb866b39aa62ce8cdf676371aa9d6a3d28
[ "Unlicense" ]
null
null
null
Initial files/dht_publish.py
vinayrnair/ESP32-DHT22-Sensors
cc7a34eb866b39aa62ce8cdf676371aa9d6a3d28
[ "Unlicense" ]
null
null
null
from time import sleep from umqtt.simple import MQTTClient from machine import Pin from dht import DHT22 SERVER = 'ip address' # MQTT Server Address (Change to the IP address of your Pi) CLIENT_ID = 'ESP32_DHT22_Sensor' TOPIC = b'temp_humidity' client = MQTTClient(CLIENT_ID, SERVER) client.connect() # Connect to M...
32.62069
105
0.651163
from time import sleep from umqtt.simple import MQTTClient from machine import Pin from dht import DHT22 SERVER = 'ip address' CLIENT_ID = 'ESP32_DHT22_Sensor' TOPIC = b'temp_humidity' client = MQTTClient(CLIENT_ID, SERVER) client.connect() sensor = DHT22(Pin(23, Pin.IN, Pin.PULL_UP)) while True: try: ...
true
true
f7308a5b65edfbcf8a90beaa071fcbcffe8b5c75
1,912
py
Python
echopype/utils/prov.py
mbdunn/echopype
a53290801d1ca062d45c00ca2c541d54682dd40a
[ "Apache-2.0" ]
null
null
null
echopype/utils/prov.py
mbdunn/echopype
a53290801d1ca062d45c00ca2c541d54682dd40a
[ "Apache-2.0" ]
null
null
null
echopype/utils/prov.py
mbdunn/echopype
a53290801d1ca062d45c00ca2c541d54682dd40a
[ "Apache-2.0" ]
null
null
null
from datetime import datetime as dt from pathlib import PosixPath from typing import Any, Dict, List, Tuple, Union # TODO: uncomment after release (causes flake8 to fail) # from _echopype_version import version as ECHOPYPE_VERSION from typing_extensions import Literal ProcessType = Literal["conversion", "processing"]...
29.875
96
0.668933
from datetime import datetime as dt from pathlib import PosixPath from typing import Any, Dict, List, Tuple, Union from typing_extensions import Literal ProcessType = Literal["conversion", "processing"] def echopype_prov_attrs(process_type: ProcessType) -> Dict[str, str]: prov_dict = { f"{process_ty...
true
true
f7308d265ec40e3e5b63ae6f5eca1836d9790623
1,861
py
Python
aliyun-python-sdk-ess/aliyunsdkess/request/v20140828/DescribeNotificationConfigurationsRequest.py
LittleJober/aliyun-openapi-python-sdk
f45cfa2248a5c8c47b2cebc1d4d1c2516b94df76
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-ess/aliyunsdkess/request/v20140828/DescribeNotificationConfigurationsRequest.py
LittleJober/aliyun-openapi-python-sdk
f45cfa2248a5c8c47b2cebc1d4d1c2516b94df76
[ "Apache-2.0" ]
1
2020-05-31T14:51:47.000Z
2020-05-31T14:51:47.000Z
aliyun-python-sdk-ess/aliyunsdkess/request/v20140828/DescribeNotificationConfigurationsRequest.py
LittleJober/aliyun-openapi-python-sdk
f45cfa2248a5c8c47b2cebc1d4d1c2516b94df76
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
37.979592
92
0.780226
from aliyunsdkcore.request import RpcRequest from aliyunsdkess.endpoint import endpoint_data class DescribeNotificationConfigurationsRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Ess', '2014-08-28', 'DescribeNotificationConfigurations','ess') if hasattr(self, "endpoint_map"): setattr(se...
true
true
f7308d359d4660aec3e1f8d361278eb035139385
2,776
py
Python
jcp/lexer.py
RupasaiR/CC-Project
b50164ddadc45ef0f09edd791215b3e127feee58
[ "MIT" ]
null
null
null
jcp/lexer.py
RupasaiR/CC-Project
b50164ddadc45ef0f09edd791215b3e127feee58
[ "MIT" ]
null
null
null
jcp/lexer.py
RupasaiR/CC-Project
b50164ddadc45ef0f09edd791215b3e127feee58
[ "MIT" ]
null
null
null
#----------------------------------------------------------------------------------- # lexer.py # Lexer for Java programming language in Python # Reference: https://docs.oracle.com/javase/specs/jls/se7/html/jls-18.html #----------------------------------------------------------------------------------- import ply.lex ...
26.692308
113
0.507565
import ply.lex as lex keywords = ('this', 'class', 'void', 'super', 'extends', 'implements', 'enum', 'interface', 'byte', 'short', 'int', 'long', 'char', 'float', 'double', 'boolean', 'null', 'true', 'false', 'final', 'public', 'protected', 'private', 'abstract', 'static', 'strictf...
true
true
f7308dfb1be9d3dd6bfea4a978d12b10c84b88cb
1,785
py
Python
kessk_web/device/wexinSignature.py
yungs2017/kessk-switch
a56c73c756bb88e8ee38b7aa196fd58a4a802341
[ "BSD-3-Clause" ]
9
2019-09-30T04:24:39.000Z
2021-07-15T06:08:20.000Z
kessk_web/device/wexinSignature.py
yungs2017/kessk-switch
a56c73c756bb88e8ee38b7aa196fd58a4a802341
[ "BSD-3-Clause" ]
6
2020-05-14T03:13:32.000Z
2022-02-10T10:23:46.000Z
kessk_web/device/wexinSignature.py
yungs2017/kessk-switch
a56c73c756bb88e8ee38b7aa196fd58a4a802341
[ "BSD-3-Clause" ]
2
2020-12-19T07:12:01.000Z
2021-05-24T02:21:15.000Z
import hashlib import random import string import time from django.core.cache import cache import requests from common.config import WECHAT_GET_JSSDK_TICKET_URL, WECHAT_GET_ACCESS_TOKEN_URL class Signature: """ Get Wechat JSSDK signature """ def __init__(self,url): self.ret = { 'n...
29.262295
111
0.62521
import hashlib import random import string import time from django.core.cache import cache import requests from common.config import WECHAT_GET_JSSDK_TICKET_URL, WECHAT_GET_ACCESS_TOKEN_URL class Signature: def __init__(self,url): self.ret = { 'nonceStr': self.__create_nonce_str(), ...
true
true
f7308e9c4d895763eaa137bfcd7402eab1c334b6
388
py
Python
src/euler_python_package/euler_python/medium/p124.py
wilsonify/euler
5214b776175e6d76a7c6d8915d0e062d189d9b79
[ "MIT" ]
null
null
null
src/euler_python_package/euler_python/medium/p124.py
wilsonify/euler
5214b776175e6d76a7c6d8915d0e062d189d9b79
[ "MIT" ]
null
null
null
src/euler_python_package/euler_python/medium/p124.py
wilsonify/euler
5214b776175e6d76a7c6d8915d0e062d189d9b79
[ "MIT" ]
null
null
null
def problem124(): LIMIT = 100000 # Modification of the sieve of Eratosthenes rads = [0] + [1] * LIMIT for i in range(2, len(rads)): if rads[i] == 1: for j in range(i, len(rads), i): rads[j] *= i data = sorted((rad, i) for (i, rad) in enumerate(rads)) return ...
22.823529
59
0.53866
def problem124(): LIMIT = 100000 rads = [0] + [1] * LIMIT for i in range(2, len(rads)): if rads[i] == 1: for j in range(i, len(rads), i): rads[j] *= i data = sorted((rad, i) for (i, rad) in enumerate(rads)) return data[10000][1] if __name__ == "__main__": ...
true
true
f7308f2ba96d7185ba98d55e78390dec75d685f8
1,923
py
Python
Chapter05/utils.py
Kushalshingote/Hands-On-Generative-Adversarial-Networks-with-Keras
fccada4810ba1fe8b79c5a74420a590c95623b52
[ "MIT" ]
76
2019-05-27T23:38:53.000Z
2021-12-19T00:31:13.000Z
Chapter05/utils.py
Kushalshingote/Hands-On-Generative-Adversarial-Networks-with-Keras
fccada4810ba1fe8b79c5a74420a590c95623b52
[ "MIT" ]
9
2019-05-29T21:01:32.000Z
2020-07-30T12:00:02.000Z
Chapter05/utils.py
Kushalshingote/Hands-On-Generative-Adversarial-Networks-with-Keras
fccada4810ba1fe8b79c5a74420a590c95623b52
[ "MIT" ]
35
2019-05-12T04:20:54.000Z
2022-03-03T19:46:06.000Z
import matplotlib matplotlib.use("Agg") import matplotlib.pylab as plt from math import ceil import numpy as np import argparse from functools import partial import os from keras.models import Model, Sequential from keras.layers import Input, Dense, Reshape, Flatten from keras.layers.merge import _Merge from keras.laye...
30.52381
69
0.690588
import matplotlib matplotlib.use("Agg") import matplotlib.pylab as plt from math import ceil import numpy as np import argparse from functools import partial import os from keras.models import Model, Sequential from keras.layers import Input, Dense, Reshape, Flatten from keras.layers.merge import _Merge from keras.laye...
true
true
f7308f9c00ebc9bbce9d89a7668d0310b9d0223d
793
py
Python
PythonVirtEnv/Lib/site-packages/plotly/validators/layout/grid/_subplots.py
zuhorski/EPL_Project
2d2417652879cfbe33c44c003ad77b7222590849
[ "MIT" ]
7
2021-09-29T09:46:36.000Z
2022-03-24T08:30:41.000Z
PythonVirtEnv/Lib/site-packages/plotly/validators/layout/grid/_subplots.py
zuhorski/EPL_Project
2d2417652879cfbe33c44c003ad77b7222590849
[ "MIT" ]
1
2021-09-30T16:56:21.000Z
2021-10-15T09:14:12.000Z
PythonVirtEnv/Lib/site-packages/plotly/validators/layout/grid/_subplots.py
zuhorski/EPL_Project
2d2417652879cfbe33c44c003ad77b7222590849
[ "MIT" ]
1
2021-09-29T22:34:05.000Z
2021-09-29T22:34:05.000Z
import _plotly_utils.basevalidators class SubplotsValidator(_plotly_utils.basevalidators.InfoArrayValidator): def __init__(self, plotly_name="subplots", parent_name="layout.grid", **kwargs): super(SubplotsValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
36.045455
85
0.515763
import _plotly_utils.basevalidators class SubplotsValidator(_plotly_utils.basevalidators.InfoArrayValidator): def __init__(self, plotly_name="subplots", parent_name="layout.grid", **kwargs): super(SubplotsValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
true
true
f730903cf9f64cb688db3b16064ab4dafccd0ee0
297
py
Python
5.3-Thursday/writing.py
lraynes/activities
5438ff9869df9d67757817fd4994be545eb38604
[ "MIT" ]
null
null
null
5.3-Thursday/writing.py
lraynes/activities
5438ff9869df9d67757817fd4994be545eb38604
[ "MIT" ]
null
null
null
5.3-Thursday/writing.py
lraynes/activities
5438ff9869df9d67757817fd4994be545eb38604
[ "MIT" ]
null
null
null
import os import csv output_path = os.path.join(".", "output", "new.csv") with open(output_path, "w", newline="") as csvfile: csvwriter = csv.writer(csvfile, delimiter=",") csvwriter.writerow(["First Name", "Last Name", "SSN"]) csvwriter.writerow(["Laura", "Raynes", "555-55-5555"])
29.7
58
0.653199
import os import csv output_path = os.path.join(".", "output", "new.csv") with open(output_path, "w", newline="") as csvfile: csvwriter = csv.writer(csvfile, delimiter=",") csvwriter.writerow(["First Name", "Last Name", "SSN"]) csvwriter.writerow(["Laura", "Raynes", "555-55-5555"])
true
true
f73090ca8723e36f89646c3925d6c5c1658f9fa9
24,872
py
Python
harvester_e2e_tests/scenarios/test_vm_actions.py
tjjh89017/tests
ab7a7dbc380f2585cf6de709d203912cf34fa84a
[ "Apache-2.0" ]
5
2021-06-21T08:17:44.000Z
2022-03-25T03:12:13.000Z
harvester_e2e_tests/scenarios/test_vm_actions.py
tjjh89017/tests
ab7a7dbc380f2585cf6de709d203912cf34fa84a
[ "Apache-2.0" ]
107
2021-06-07T07:31:14.000Z
2022-03-30T07:24:33.000Z
harvester_e2e_tests/scenarios/test_vm_actions.py
tjjh89017/tests
ab7a7dbc380f2585cf6de709d203912cf34fa84a
[ "Apache-2.0" ]
17
2021-05-26T21:05:54.000Z
2022-03-29T00:49:50.000Z
# Copyright (c) 2021 SUSE LLC # # This program is free software; you can redistribute it and/or # modify it under the terms of version 3 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; witho...
41.801681
79
0.575064
from harvester_e2e_tests import utils import polling2 import time import json import pytest pytest_plugins = [ 'harvester_e2e_tests.fixtures.keypair', 'harvester_e2e_tests.fixtures.vm', 'harvester_e2e_tests.fixtures.volume', 'harvester_e2e_tests.fixtures.backuptarget' ] def backup_restore_migrated_v...
true
true
f7309124ed3ffe0189fdb1c51cf417808d3ed9f7
1,726
py
Python
data/mnist.py
aPere3/MVAProject-RecVis16
83b581c37cb486ec855e4a40652860df4e56b363
[ "MIT" ]
null
null
null
data/mnist.py
aPere3/MVAProject-RecVis16
83b581c37cb486ec855e4a40652860df4e56b363
[ "MIT" ]
null
null
null
data/mnist.py
aPere3/MVAProject-RecVis16
83b581c37cb486ec855e4a40652860df4e56b363
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- """ This module contains a method to load mnist data. Based on David Larson work at: http://g.sweyla.com/blog/2012/mnist-numpy/a """ import numpy import os, struct from array import array as pyarray def load_mnist(dataset="training", digits=numpy.arange(10), path="mnist"):...
32.566038
115
0.634994
import numpy import os, struct from array import array as pyarray def load_mnist(dataset="training", digits=numpy.arange(10), path="mnist"): if dataset == "training": fname_img = os.path.join(path, 'train-images.idx3-ubyte') fname_lbl = os.path.join(path, 'train-labels.idx1-ubyte') elif dat...
true
true
f73092536f6b16f929d0669d98b5a821729b2f1a
4,328
py
Python
tests/modules/notifications/resources/utils.py
WildMeOrg/houston
8102229421388e44234c07ee6cb73bf705b6fba0
[ "Apache-2.0" ]
6
2021-04-06T19:50:52.000Z
2022-01-19T17:42:33.000Z
tests/modules/notifications/resources/utils.py
WildMeOrg/houston
8102229421388e44234c07ee6cb73bf705b6fba0
[ "Apache-2.0" ]
491
2021-01-20T01:10:00.000Z
2022-03-31T19:30:48.000Z
tests/modules/notifications/resources/utils.py
WildMeOrg/houston
8102229421388e44234c07ee6cb73bf705b6fba0
[ "Apache-2.0" ]
2
2021-03-12T02:33:55.000Z
2021-03-16T20:18:43.000Z
# -*- coding: utf-8 -*- """ notification resources utils ------------- """ import json from tests import utils as test_utils PATH = '/api/v1/notifications/' EXPECTED_NOTIFICATION_KEYS = { 'guid', 'is_read', 'message_type', 'sender_name', 'sender_guid', 'message_values', } EXPECTED_LIST_KEYS = {...
29.243243
106
0.676063
import json from tests import utils as test_utils PATH = '/api/v1/notifications/' EXPECTED_NOTIFICATION_KEYS = { 'guid', 'is_read', 'message_type', 'sender_name', 'sender_guid', 'message_values', } EXPECTED_LIST_KEYS = { 'guid', 'is_read', 'message_type', 'sender_name', 'sen...
true
true
f730926324462a884c4e33f7f7f63d6260891d16
3,685
py
Python
tutorials/plot_notebook.py
jnothman/sphinx-gallery
b930662613a32fe05f16b39f86fafdb4c8d6f424
[ "BSD-3-Clause" ]
null
null
null
tutorials/plot_notebook.py
jnothman/sphinx-gallery
b930662613a32fe05f16b39f86fafdb4c8d6f424
[ "BSD-3-Clause" ]
null
null
null
tutorials/plot_notebook.py
jnothman/sphinx-gallery
b930662613a32fe05f16b39f86fafdb4c8d6f424
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ ======================== Notebook styled examples ======================== The gallery is capable of transforming python files into reStructuredText files with a notebook structure. For this to be used you need to respect some syntax rules. It makes a lot of sense to contrast this output r...
37.989691
79
0.690638
import numpy as np import matplotlib.pyplot as plt x = np.linspace(-np.pi, np.pi, 300) xx, yy = np.meshgrid(x, x) z = np.cos(xx) + np.cos(yy) plt.figure() plt.imshow(z) plt.colorbar() plt.xlabel('$x$') plt.ylabel('$y$') plt.figure() plt.imshow(z, cmap=plt.cm.get_cmap('hot')) plt.figure() plt.imshow(z, cmap=plt.c...
true
true
f73092a62dc94f15d8005c38a7f97315b3879895
2,582
py
Python
src/openstack_cli/commands/conf/keys/export.py
hapylestat/openstack_cli
be627f0b3c7ab9bf1032c36faca2ad101e53fb0e
[ "Apache-2.0" ]
null
null
null
src/openstack_cli/commands/conf/keys/export.py
hapylestat/openstack_cli
be627f0b3c7ab9bf1032c36faca2ad101e53fb0e
[ "Apache-2.0" ]
1
2021-03-02T07:15:43.000Z
2021-03-02T07:15:43.000Z
src/openstack_cli/commands/conf/keys/export.py
hapylestat/openstack_cli
be627f0b3c7ab9bf1032c36faca2ad101e53fb0e
[ "Apache-2.0" ]
1
2021-03-23T10:00:56.000Z
2021-03-23T10:00:56.000Z
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not...
36.366197
82
0.72773
import os from openstack_cli.commands.conf.keys.list import _keys_list from openstack_cli.modules.apputils.terminal import Console from openstack_cli.core.config import Configuration from openstack_cli.modules.apputils.discovery import CommandMetaInfo from openstack_cli.modules.openstack import VMKeypairItemValue, Op...
true
true
f73093a92dabd28a9639dd0153472843f0f05b2b
4,305
py
Python
huaweicloud-sdk-osm/huaweicloudsdkosm/v2/model/accessory_limit_vo.py
NQLoong/huaweicloud-sdk-python-v3
677944a0b722147c6e105c53df9110724d64152a
[ "Apache-2.0" ]
1
2021-11-03T07:54:50.000Z
2021-11-03T07:54:50.000Z
huaweicloud-sdk-osm/huaweicloudsdkosm/v2/model/accessory_limit_vo.py
mawenbo-huawei/huaweicloud-sdk-python-v3
677944a0b722147c6e105c53df9110724d64152a
[ "Apache-2.0" ]
null
null
null
huaweicloud-sdk-osm/huaweicloudsdkosm/v2/model/accessory_limit_vo.py
mawenbo-huawei/huaweicloud-sdk-python-v3
677944a0b722147c6e105c53df9110724d64152a
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 import pprint import re import six class AccessoryLimitVo: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value i...
26.090909
80
0.571196
import pprint import re import six class AccessoryLimitVo: sensitive_list = [] openapi_types = { 'limit_count': 'str', 'limit_size': 'str', 'limit_file_type': 'str' } attribute_map = { 'limit_count': 'limit_count', 'limit_size': 'limit_size', '...
true
true
f730942a921d93e237889ddabf84129fe2aacd58
26
py
Python
e.py
Flonky/e
0954acd82ebd74e6a433aa778a3844dc7b8acc60
[ "MIT" ]
1
2022-03-24T18:18:29.000Z
2022-03-24T18:18:29.000Z
e.py
Flonky/e
0954acd82ebd74e6a433aa778a3844dc7b8acc60
[ "MIT" ]
null
null
null
e.py
Flonky/e
0954acd82ebd74e6a433aa778a3844dc7b8acc60
[ "MIT" ]
null
null
null
while True: print("e")
13
14
0.576923
while True: print("e")
true
true
f7309493f11a75d980777cffc4ea62f00325b0e2
23,031
py
Python
test/functional/test_framework/util.py
DancingAxolotl/encocoinplus
b3dcc750c48a4f4e2ffebd104e5426544fe2f6b8
[ "MIT" ]
1
2020-04-07T10:09:00.000Z
2020-04-07T10:09:00.000Z
test/functional/test_framework/util.py
DancingAxolotl/encocoinplus
b3dcc750c48a4f4e2ffebd104e5426544fe2f6b8
[ "MIT" ]
13
2020-05-08T11:14:37.000Z
2020-05-12T10:03:53.000Z
test/functional/test_framework/util.py
DancingAxolotl/encocoinplus
b3dcc750c48a4f4e2ffebd104e5426544fe2f6b8
[ "MIT" ]
22
2020-02-10T09:17:20.000Z
2020-07-10T10:33:26.000Z
#!/usr/bin/env python3 # Copyright (c) 2014-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Helpful routines for regression testing.""" from base64 import b64encode from binascii import hexlify,...
38.00495
142
0.649516
from base64 import b64encode from binascii import hexlify, unhexlify from decimal import Decimal, ROUND_DOWN import hashlib import json import logging import os import random import re from subprocess import CalledProcessError import time from . import coverage from .authproxy import AuthServiceProxy, JSONRPCExceptio...
true
true
f7309534df4a2fc8176f000b46935824e18a7d45
6,764
py
Python
bindings/python/ensmallen_graph/datasets/string/kandleriavitulina.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/kandleriavitulina.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/kandleriavitulina.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
""" This file offers the methods to automatically retrieve the graph Kandleria vitulina. The graph is automatically retrieved from the STRING repository. Report --------------------- At the time of rendering these methods (please see datetime below), the graph had the following characteristics: Datetime: 2021-02-...
35.413613
223
0.706978
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen_graph import EnsmallenGraph def KandleriaVitulina( directed: bool = False, verbose: int = 2, cache_path: str = "graphs/string", **additional_graph_kwargs: Dict ) -> EnsmallenGraph: retur...
true
true
f73095a96bda44dd33e649a8f9b2f81b0f8a2d5e
108
py
Python
modules/2.79/bpy/types/NodeSocketInterfaceIntUnsigned.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
modules/2.79/bpy/types/NodeSocketInterfaceIntUnsigned.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
modules/2.79/bpy/types/NodeSocketInterfaceIntUnsigned.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
class NodeSocketInterfaceIntUnsigned: default_value = None max_value = None min_value = None
13.5
37
0.722222
class NodeSocketInterfaceIntUnsigned: default_value = None max_value = None min_value = None
true
true
f7309823f58463b82e823f3fd4ecc77467f835fd
11,759
py
Python
pml/engineer_tests.py
gatapia/py_ml_utils
844d8b62a7c5cc0a80f4f62c0bfda092aac57ade
[ "MIT" ]
183
2015-01-11T13:01:01.000Z
2022-02-08T04:45:33.000Z
pml/engineer_tests.py
gatapia/py_ml_utils
844d8b62a7c5cc0a80f4f62c0bfda092aac57ade
[ "MIT" ]
13
2015-05-12T17:39:42.000Z
2018-07-29T18:01:38.000Z
pml/engineer_tests.py
gatapia/py_ml_utils
844d8b62a7c5cc0a80f4f62c0bfda092aac57ade
[ "MIT" ]
166
2015-01-28T18:05:55.000Z
2022-02-08T04:45:34.000Z
from __future__ import print_function, absolute_import import unittest, math import pandas as pd import numpy as np from . import * class T(base_pandas_extensions_tester.BasePandasExtensionsTester): def test_concat(self): df = pd.DataFrame({'c_1':['a', 'b', 'c'], 'c_2': ['d', 'e', 'f']}) df.en...
46.478261
133
0.541628
from __future__ import print_function, absolute_import import unittest, math import pandas as pd import numpy as np from . import * class T(base_pandas_extensions_tester.BasePandasExtensionsTester): def test_concat(self): df = pd.DataFrame({'c_1':['a', 'b', 'c'], 'c_2': ['d', 'e', 'f']}) df.en...
true
true
f73099b5d58d809058597f4eeb4632505a3407c8
404
py
Python
package/cloudshell/cp/azure/models/azure_blob_url.py
tim-spiglanin/Azure-Shell
58c52994f0d6cfd798c5dca33737419ec18363d4
[ "Apache-2.0" ]
5
2016-09-08T08:33:47.000Z
2020-02-10T12:31:15.000Z
package/cloudshell/cp/azure/models/azure_blob_url.py
tim-spiglanin/Azure-Shell
58c52994f0d6cfd798c5dca33737419ec18363d4
[ "Apache-2.0" ]
505
2016-08-09T07:41:03.000Z
2021-02-08T20:26:46.000Z
package/cloudshell/cp/azure/models/azure_blob_url.py
tim-spiglanin/Azure-Shell
58c52994f0d6cfd798c5dca33737419ec18363d4
[ "Apache-2.0" ]
5
2016-12-21T12:52:55.000Z
2021-07-08T09:50:42.000Z
class AzureBlobUrlModel(object): def __init__(self, storage_name, container_name, blob_name): """ :param storage_name: (str) Azure storage name :param container_name: (str) Azure container name :param blob_name: (str) Azure Blob name """ self.storage_name = storage_n...
33.666667
64
0.658416
class AzureBlobUrlModel(object): def __init__(self, storage_name, container_name, blob_name): self.storage_name = storage_name self.container_name = container_name self.blob_name = blob_name
true
true
f7309b8ab0ec6cc5672805a9ee0b86213e917ba4
964
py
Python
webdriver_test_tools/config/__init__.py
connordelacruz/webdriver-test-tools
fe6906839e4423562c6d4d0aa6b10b2ea90bff6b
[ "MIT" ]
5
2018-07-02T13:18:59.000Z
2019-10-14T04:55:31.000Z
webdriver_test_tools/config/__init__.py
connordelacruz/webdriver-test-tools
fe6906839e4423562c6d4d0aa6b10b2ea90bff6b
[ "MIT" ]
1
2019-10-16T20:54:25.000Z
2019-10-16T20:54:25.000Z
webdriver_test_tools/config/__init__.py
connordelacruz/webdriver-test-tools
fe6906839e4423562c6d4d0aa6b10b2ea90bff6b
[ "MIT" ]
1
2019-09-03T05:29:41.000Z
2019-09-03T05:29:41.000Z
"""Default configurations for various items in the test framework. This module imports the following classes: :class:`webdriver_test_tools.config.browser.BrowserConfig` :class:`webdriver_test_tools.config.browser.BrowserStackConfig` :class:`webdriver_test_tools.config.projectfiles.ProjectFilesConfig` ...
35.703704
72
0.823651
from .projectfiles import ProjectFilesConfig from .site import SiteConfig from .test import TestSuiteConfig from .webdriver import WebDriverConfig from .browser import BrowserConfig, BrowserStackConfig
true
true
f7309bc8a28f4f8cdb7fb8535f464ad2bbe04bfe
392
py
Python
tests/test_invenio_circulation.py
NRodriguezcuellar/invenio-circulation
8e0c977849eb76ba9a342542dae3b6a6ef5bae16
[ "MIT" ]
1
2020-04-27T14:47:30.000Z
2020-04-27T14:47:30.000Z
tests/test_invenio_circulation.py
NRodriguezcuellar/invenio-circulation
8e0c977849eb76ba9a342542dae3b6a6ef5bae16
[ "MIT" ]
1
2020-06-09T15:23:04.000Z
2020-06-09T15:23:04.000Z
tests/test_invenio_circulation.py
NRodriguezcuellar/invenio-circulation
8e0c977849eb76ba9a342542dae3b6a6ef5bae16
[ "MIT" ]
1
2020-01-13T17:10:13.000Z
2020-01-13T17:10:13.000Z
# -*- coding: utf-8 -*- # # Copyright (C) 2018-2019 CERN. # Copyright (C) 2018-2019 RERO. # # Invenio-Circulation is free software; you can redistribute it and/or modify # it under the terms of the MIT License; see LICENSE file for more details. """Module tests.""" def test_version(): """Test version import.""" ...
23.058824
77
0.701531
def test_version(): from invenio_circulation import __version__ assert __version__
true
true
f7309c92dce2b8723801c5e1bdb0c965492b3e58
12,782
py
Python
lib/coinchooser.py
parkbyte/electrum-parkbyte
32fec1a172e1b39e5b57df93a972f4d9b4e595c4
[ "MIT" ]
null
null
null
lib/coinchooser.py
parkbyte/electrum-parkbyte
32fec1a172e1b39e5b57df93a972f4d9b4e595c4
[ "MIT" ]
null
null
null
lib/coinchooser.py
parkbyte/electrum-parkbyte
32fec1a172e1b39e5b57df93a972f4d9b4e595c4
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # Electrum - lightweight ParkByte client # Copyright (C) 2015 kyuupichan@gmail # # 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 witho...
39.819315
79
0.634408
from collections import defaultdict, namedtuple from math import floor, log10 import struct from parkbyte import sha256, COIN, TYPE_ADDRESS from transaction import Transaction from util import NotEnoughFunds, PrintError, profiler class PRNG: def __init__(self, seed): self.sha = sha256(seed) self...
true
true
f7309d29d60d2cbdb6763d9b77b9ea53b7fcf2ae
631
py
Python
scripts/AddTag/R21/addsbtag.py
AsheAnn/C4D_Python
3fa5e1d8b4f94efb03f820a61789d276c8a5b045
[ "MIT" ]
null
null
null
scripts/AddTag/R21/addsbtag.py
AsheAnn/C4D_Python
3fa5e1d8b4f94efb03f820a61789d276c8a5b045
[ "MIT" ]
null
null
null
scripts/AddTag/R21/addsbtag.py
AsheAnn/C4D_Python
3fa5e1d8b4f94efb03f820a61789d276c8a5b045
[ "MIT" ]
null
null
null
# ---------------------------------------------------------------------- # Note: # - This is the Python code used in Script Manager. ## # Compatible: # - Win / Mac...
31.55
204
0.328051
import c4d def main(): c4d.CallCommand(100004708, 100004708) c4d.CallCommand(180000042, 180000042) if __name__=='__main__': main()
true
true
f7309e2c4b077ea8962cfa2d8cd82d87e8d4bf65
2,158
py
Python
Analysis Scripts/co2_offset.py
bonesbb/HASPR
856af4a480f4ff135591bbbcc1267898d88cbf0d
[ "MIT" ]
1
2019-07-07T19:54:17.000Z
2019-07-07T19:54:17.000Z
Analysis Scripts/co2_offset.py
bonesbb/HASPR
856af4a480f4ff135591bbbcc1267898d88cbf0d
[ "MIT" ]
null
null
null
Analysis Scripts/co2_offset.py
bonesbb/HASPR
856af4a480f4ff135591bbbcc1267898d88cbf0d
[ "MIT" ]
null
null
null
# HASPR - High-Altitude Solar Power Research # Script to calculate CO2-equivalent offset given generation profiles # Version 0.1 # Author: neyring from os import walk import haspr from haspr import Result from haspr import Dataset import numpy as np from numpy import genfromtxt # PARAMETERS # # path to ....
33.71875
100
0.696942
from os import walk import haspr from haspr import Result from haspr import Dataset import numpy as np from numpy import genfromtxt ciPath = "D:\\00_Results\\04_CO2 Offset\\1_Swiss Grid CI - 1h - UTC.csv" inputDirectory = "D:\\00_Results\\Out" haspr.outputDirectory = "D:\\00_Results\\04_CO2 Offset\\Case 5 -...
true
true
f7309e42f5d8076d77031b024afee339b3886980
1,817
py
Python
setup.py
JockeJarre/robotframework-CSVLibrary
e9e567ca3c7d3199ddde167c42c310fcd5657c96
[ "Apache-2.0" ]
null
null
null
setup.py
JockeJarre/robotframework-CSVLibrary
e9e567ca3c7d3199ddde167c42c310fcd5657c96
[ "Apache-2.0" ]
null
null
null
setup.py
JockeJarre/robotframework-CSVLibrary
e9e567ca3c7d3199ddde167c42c310fcd5657c96
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python from os.path import join, dirname, abspath from setuptools import setup def read(rel_path): here = abspath(dirname(__file__)) with open(join(here, rel_path)) as fp: return fp.read() def get_version(rel_path): for line in read(rel_path).splitlines(): if line.startsw...
34.283019
63
0.624656
from os.path import join, dirname, abspath from setuptools import setup def read(rel_path): here = abspath(dirname(__file__)) with open(join(here, rel_path)) as fp: return fp.read() def get_version(rel_path): for line in read(rel_path).splitlines(): if line.startswith("__version__"): ...
true
true
f7309efcb09c67631eaa89d0877022da259f67fd
566
py
Python
083-remove-duplicates-from-sorted-list/remove_duplicates_from_sorted_list.py
cnluocj/leetcode
5b870a63ba1aab3db1e05421c91f404a9aabc489
[ "MIT" ]
null
null
null
083-remove-duplicates-from-sorted-list/remove_duplicates_from_sorted_list.py
cnluocj/leetcode
5b870a63ba1aab3db1e05421c91f404a9aabc489
[ "MIT" ]
null
null
null
083-remove-duplicates-from-sorted-list/remove_duplicates_from_sorted_list.py
cnluocj/leetcode
5b870a63ba1aab3db1e05421c91f404a9aabc489
[ "MIT" ]
null
null
null
""" 60.36% """ # Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def deleteDuplicates(self, head): """ :type head: ListNode :rtype: ListNode """ current = hea...
23.583333
45
0.530035
class Solution(object): def deleteDuplicates(self, head): current = head while current and current.next: next_node = current.next if next_node.val == current.val: current.next = next_node.next else: current = current.next ...
true
true
f7309f8fa8176e6126bbfea93a4688ef973e5475
2,172
py
Python
tests/util/test_rwlock.py
abichinger/pycasbin
6166f298406d029a8540a12a4157d7b0072f8c8e
[ "Apache-2.0" ]
915
2018-11-25T01:00:39.000Z
2022-03-30T11:21:34.000Z
tests/util/test_rwlock.py
ffyuanda/pycasbin
230132e459420aaa519d1eb9479f8996bdbbbd2a
[ "Apache-2.0" ]
231
2019-02-13T09:29:51.000Z
2022-03-28T16:32:51.000Z
tests/util/test_rwlock.py
ffyuanda/pycasbin
230132e459420aaa519d1eb9479f8996bdbbbd2a
[ "Apache-2.0" ]
173
2019-02-08T02:22:33.000Z
2022-03-10T15:16:11.000Z
from unittest import TestCase from casbin.util.rwlock import RWLockWrite from concurrent.futures import ThreadPoolExecutor import time import queue class TestRWLock(TestCase): def gen_locks(self): rw_lock = RWLockWrite() rl = rw_lock.gen_rlock() wl = rw_lock.gen_wlock() return (rl,...
26.814815
70
0.563076
from unittest import TestCase from casbin.util.rwlock import RWLockWrite from concurrent.futures import ThreadPoolExecutor import time import queue class TestRWLock(TestCase): def gen_locks(self): rw_lock = RWLockWrite() rl = rw_lock.gen_rlock() wl = rw_lock.gen_wlock() return (rl,...
true
true
f7309fc308191a299ba7877254d0da7512e8a712
1,237
py
Python
tests/python/unittest/test_lang_target.py
titikid/tvm
0cf3765b28d457d2503ec20b551e9a8eadb1491d
[ "Apache-2.0" ]
6
2019-08-29T19:00:57.000Z
2020-06-15T14:55:16.000Z
tests/python/unittest/test_lang_target.py
titikid/tvm
0cf3765b28d457d2503ec20b551e9a8eadb1491d
[ "Apache-2.0" ]
1
2020-10-23T18:56:21.000Z
2020-10-23T18:56:33.000Z
tests/python/unittest/test_lang_target.py
titikid/tvm
0cf3765b28d457d2503ec20b551e9a8eadb1491d
[ "Apache-2.0" ]
3
2018-06-29T17:19:21.000Z
2020-12-11T07:50:33.000Z
import tvm @tvm.target.generic_func def mygeneric(data): # default generic function return data + 1 @mygeneric.register(["cuda", "gpu"]) def cuda_func(data): return data + 2 @mygeneric.register("rocm") def rocm_func(data): return data + 3 @mygeneric.register("cpu") def rocm_func(data): return da...
22.490909
70
0.654002
import tvm @tvm.target.generic_func def mygeneric(data): return data + 1 @mygeneric.register(["cuda", "gpu"]) def cuda_func(data): return data + 2 @mygeneric.register("rocm") def rocm_func(data): return data + 3 @mygeneric.register("cpu") def rocm_func(data): return data + 10 def test_target_d...
true
true
f730a1a680a5e31f14718b5fcf0fe938a393cf81
4,041
py
Python
examples/decoupledibpm/flatplate3dRe100_GPU/scripts/plotForceCoefficients.py
jedbrown/PetIBM
8584d824e0ffbbe2ea413dcf081e79a72b39bf5f
[ "BSD-3-Clause" ]
null
null
null
examples/decoupledibpm/flatplate3dRe100_GPU/scripts/plotForceCoefficients.py
jedbrown/PetIBM
8584d824e0ffbbe2ea413dcf081e79a72b39bf5f
[ "BSD-3-Clause" ]
null
null
null
examples/decoupledibpm/flatplate3dRe100_GPU/scripts/plotForceCoefficients.py
jedbrown/PetIBM
8584d824e0ffbbe2ea413dcf081e79a72b39bf5f
[ "BSD-3-Clause" ]
null
null
null
""" Plots the steady-state force coefficients of an inclined flat-plate with aspect-ratio 2 at Reynolds number 100 for angles of attack between 0 and 90 degrees. Compares with experimental results reported in Taira et al. (2007). _References:_ * Taira, K., Dickson, W. B., Colonius, T., Dickinson, M. H., & Rowley, C. ...
39.23301
78
0.644642
import os import numpy from matplotlib import pyplot if not os.environ.get('PETIBM_EXAMPLES'): raise KeyError('Environment variable PETIBM_EXAMPLES is not set; ' 'Set PETIBM_EXAMPLES as the root directory of the examples.') script_dir = os.path.dirname(os.path.realpath(__file__)) root_dir = os.se...
true
true
f730a1ae102d08afb1c37051c52914eb79ec8212
1,395
py
Python
utils/parser/parser.py
reeegry/youtube-parser-bot
475e232f80445ae6ba3e988d844b61bada6c0aed
[ "MIT" ]
null
null
null
utils/parser/parser.py
reeegry/youtube-parser-bot
475e232f80445ae6ba3e988d844b61bada6c0aed
[ "MIT" ]
null
null
null
utils/parser/parser.py
reeegry/youtube-parser-bot
475e232f80445ae6ba3e988d844b61bada6c0aed
[ "MIT" ]
null
null
null
import urllib.request import json import requests from data.config import * def youtube_get_information(channel_id): api_key = YOUTUBE_API_KEY base_search_url = "https://www.googleapis.com/youtube/v3/search?" base_video_link = "https://www.youtube.com/watch?v=" first_url = base_search_url + f"key={api...
29.680851
113
0.629391
import urllib.request import json import requests from data.config import * def youtube_get_information(channel_id): api_key = YOUTUBE_API_KEY base_search_url = "https://www.googleapis.com/youtube/v3/search?" base_video_link = "https://www.youtube.com/watch?v=" first_url = base_search_url + f"key={api...
true
true
f730a1efa3b379ce51a02f804023a5cabbc94433
12,104
py
Python
models/yolo.py
QamarQuqa/Real-time-Traffic-and-Pedestrian-Counting
c53384f496e816bb852afea328d94b9e963fe753
[ "MIT" ]
4
2021-07-21T07:48:02.000Z
2022-03-16T00:42:33.000Z
models/yolo.py
QamarQuqa/Real-time-Traffic-and-Pedestrian-Counting
c53384f496e816bb852afea328d94b9e963fe753
[ "MIT" ]
3
2021-11-06T09:18:21.000Z
2022-01-11T14:19:40.000Z
models/yolo.py
QamarQuqa/Real-time-Traffic-and-Pedestrian-Counting
c53384f496e816bb852afea328d94b9e963fe753
[ "MIT" ]
3
2021-12-26T03:05:06.000Z
2022-01-14T07:54:56.000Z
# YOLOv5 YOLO-specific modules import argparse import logging import sys from copy import deepcopy sys.path.append('./') # to run '$ python *.py' files in subdirectories logger = logging.getLogger(__name__) from models.common import * from models.experimental import * from utils.autoanchor import check_anchor_order...
43.539568
119
0.542052
import argparse import logging import sys from copy import deepcopy sys.path.append('./') logger = logging.getLogger(__name__) from models.common import * from models.experimental import * from utils.autoanchor import check_anchor_order from utils.general import make_divisible, check_file, set_logging from utils.to...
true
true
f730a306db38384a6b876c13045c0824325f5a80
95
py
Python
matversion.py
lukasijus/Improving-Deep-Neural-Networks-Hyperparameter-tuning-Regularization-and-gradient-checking
ce33f2a830abaf974aa1b04b61a7f25d2c4b2bd7
[ "MIT" ]
1
2020-08-06T18:51:26.000Z
2020-08-06T18:51:26.000Z
matversion.py
lukasijus/Improving-Deep-Neural-Networks-Hyperparameter-tuning-Regularization-and-gradient-checking
ce33f2a830abaf974aa1b04b61a7f25d2c4b2bd7
[ "MIT" ]
null
null
null
matversion.py
lukasijus/Improving-Deep-Neural-Networks-Hyperparameter-tuning-Regularization-and-gradient-checking
ce33f2a830abaf974aa1b04b61a7f25d2c4b2bd7
[ "MIT" ]
null
null
null
#import matplotlib #print(matplotlib.__version__) import tensorflow as tf print(tf.__version__)
23.75
30
0.842105
import tensorflow as tf print(tf.__version__)
true
true
f730a4182acb8d42e7b585c4b972507dc5f1fbb5
5,276
py
Python
egs/voxceleb/v1/nnet/lib/extract.py
deciding/tf-kaldi-speaker
ceaed721e502a71434d910fd73b202940ea2ce60
[ "Apache-2.0" ]
null
null
null
egs/voxceleb/v1/nnet/lib/extract.py
deciding/tf-kaldi-speaker
ceaed721e502a71434d910fd73b202940ea2ce60
[ "Apache-2.0" ]
1
2022-02-10T06:48:05.000Z
2022-02-10T06:48:05.000Z
egs/voxceleb/v1/nnet/lib/extract.py
deciding/tf-kaldi-speaker
ceaed721e502a71434d910fd73b202940ea2ce60
[ "Apache-2.0" ]
null
null
null
import argparse import numpy as np import os import sys import numpy, scipy, sklearn from model.trainer import Trainer from misc.utils import Params from dataset.kaldi_io import FeatureReader, open_or_fd, read_mat_ark, write_vec_flt from six.moves import range parser = argparse.ArgumentParser() parser.add_argument("-g...
52.237624
164
0.657127
import argparse import numpy as np import os import sys import numpy, scipy, sklearn from model.trainer import Trainer from misc.utils import Params from dataset.kaldi_io import FeatureReader, open_or_fd, read_mat_ark, write_vec_flt from six.moves import range parser = argparse.ArgumentParser() parser.add_argument("-g...
true
true
f730a42cacff927c57b8618033a20ff148ab5b71
1,637
py
Python
config.py
rafael-carvalho/investigo-meraki
3c75ebc54e38b822e5ae452f4faf12d527d95f4d
[ "Apache-2.0" ]
2
2018-04-05T08:52:54.000Z
2020-05-16T15:43:44.000Z
config.py
meraki/investigo-spark-bot
34665143724522d463873d704dd8d77861748358
[ "Apache-2.0" ]
null
null
null
config.py
meraki/investigo-spark-bot
34665143724522d463873d704dd8d77861748358
[ "Apache-2.0" ]
2
2018-04-18T08:35:59.000Z
2020-03-12T22:13:19.000Z
import os class Config(object): BASE_DIR = os.path.abspath(os.path.dirname(__file__)) DEBUG = False SECRET_KEY = os.environ['SECRET_KEY'] DATABASE_URL = os.environ['DATABASE_URL'] SQLALCHEMY_DATABASE_URI = DATABASE_URL SQLALCHEMY_TRACK_MODIFICATIONS = True TROPO_API_KEY_TEXT = os.environ.g...
34.829787
91
0.729994
import os class Config(object): BASE_DIR = os.path.abspath(os.path.dirname(__file__)) DEBUG = False SECRET_KEY = os.environ['SECRET_KEY'] DATABASE_URL = os.environ['DATABASE_URL'] SQLALCHEMY_DATABASE_URI = DATABASE_URL SQLALCHEMY_TRACK_MODIFICATIONS = True TROPO_API_KEY_TEXT = os.environ.g...
true
true
f730a48aa8629fddb68ef5a3a25e8da73942fea2
5,876
py
Python
tensorflow/python/compat/compat.py
lightyang/tensorflow
1a455a77d80fa788fd7963530dd130ad7d902226
[ "Apache-2.0" ]
null
null
null
tensorflow/python/compat/compat.py
lightyang/tensorflow
1a455a77d80fa788fd7963530dd130ad7d902226
[ "Apache-2.0" ]
2
2021-08-25T16:13:06.000Z
2022-02-10T02:19:43.000Z
tensorflow/python/compat/compat.py
Hyperclaw79/tensorflow
14c58e1d380b2001ffdf7ef782d44ad1a21f763c
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
35.185629
82
0.747617
from __future__ import absolute_import from __future__ import division from __future__ import print_function import datetime import os from tensorflow.python.util import tf_contextlib from tensorflow.python.util.tf_export import tf_export _FORWARD_COMPATIBILITY_HORIZON = datetime.date(2020, 2, 5) _FORWARD_COMPATIBI...
true
true
f730a4db01573a009901b98513880dc1ffb68715
807
py
Python
env/lib/python3.6/site-packages/nibabel/tests/test_imageglobals.py
Raniac/NEURO-LEARN
3c3acc55de8ba741e673063378e6cbaf10b64c7a
[ "Apache-2.0" ]
8
2019-05-29T09:38:30.000Z
2021-01-20T03:36:59.000Z
env/lib/python3.6/site-packages/nibabel/tests/test_imageglobals.py
Raniac/neurolearn_dev
3c3acc55de8ba741e673063378e6cbaf10b64c7a
[ "Apache-2.0" ]
12
2021-03-09T03:01:16.000Z
2022-03-11T23:59:36.000Z
env/lib/python3.6/site-packages/nibabel/tests/test_imageglobals.py
Raniac/NEURO-LEARN
3c3acc55de8ba741e673063378e6cbaf10b64c7a
[ "Apache-2.0" ]
1
2020-07-17T12:49:49.000Z
2020-07-17T12:49:49.000Z
# emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the NiBabel package for the # copyright and license terms. # ### ### ### #...
33.625
78
0.545229
from nose.tools import (assert_true, assert_false, assert_raises, assert_equal, assert_not_equal) from .. import imageglobals as igs def test_errorlevel(): orig_level = igs.error_level for level in (10, 20, 30): with igs.ErrorLevel(level): assert_equal(igs.error_l...
true
true
f730a5be097b0dd193d78fd67d840787ea818e19
886
py
Python
graph_peak_caller/analysis/diploratio_v_motifrate.py
uio-bmi/graph_peak_caller
89deeabf3cd0b23fba49b1304f1c81222fb534d7
[ "BSD-3-Clause" ]
10
2018-04-19T21:54:31.000Z
2021-07-22T12:46:33.000Z
graph_peak_caller/analysis/diploratio_v_motifrate.py
uio-bmi/graph_peak_caller
89deeabf3cd0b23fba49b1304f1c81222fb534d7
[ "BSD-3-Clause" ]
9
2018-01-30T20:41:36.000Z
2021-01-28T23:00:18.000Z
graph_peak_caller/analysis/diploratio_v_motifrate.py
uio-bmi/graph_peak_caller
89deeabf3cd0b23fba49b1304f1c81222fb534d7
[ "BSD-3-Clause" ]
3
2019-08-20T21:43:53.000Z
2022-01-20T14:39:34.000Z
import numpy as np import matplotlib.pyplot as plt def plot(base_name): def get_hist(s): return s["summary"][0]*s["diplo_hist"] motif = np.load(base_name + "/limited_summits_alignments_motif_summary.npz") nonmotif = np.load(base_name + "/limited_summits_alignments_nonmotif_summary.npz") motif_...
31.642857
86
0.691874
import numpy as np import matplotlib.pyplot as plt def plot(base_name): def get_hist(s): return s["summary"][0]*s["diplo_hist"] motif = np.load(base_name + "/limited_summits_alignments_motif_summary.npz") nonmotif = np.load(base_name + "/limited_summits_alignments_nonmotif_summary.npz") motif_...
true
true
f730a5caa27df176131385076f8a70b5752aa206
1,224
py
Python
os_windows/_i18n.py
cloudbase/oslo.windows
8dd9a41499653ea7c58e238877942ab1d4c46636
[ "Apache-2.0" ]
2
2015-09-02T21:39:10.000Z
2016-06-16T01:54:20.000Z
os_windows/_i18n.py
cloudbase/oslo.windows
8dd9a41499653ea7c58e238877942ab1d4c46636
[ "Apache-2.0" ]
null
null
null
os_windows/_i18n.py
cloudbase/oslo.windows
8dd9a41499653ea7c58e238877942ab1d4c46636
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 Cloudbase Solutions Srl # 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 r...
31.384615
78
0.747549
import oslo_i18n _translators = oslo_i18n.TranslatorFactory(domain='oslo.windows') _ = _translators.primary _LI = _translators.log_info _LW = _translators.log_warning _LE = _translators.log_error _LC = _translators.log_critical
true
true
f730a64dcfd7ad054c235267a643fa3816394fc1
261
py
Python
month01/all_code/day02/exercise06.py
chaofan-zheng/tedu-python-demo
abe983ddc52690f4726cf42cc6390cba815026d8
[ "Apache-2.0" ]
4
2021-01-07T14:25:15.000Z
2021-02-01T10:36:10.000Z
month01/all_code/day02/exercise06.py
chaofan-zheng/tedu-python-demo
abe983ddc52690f4726cf42cc6390cba815026d8
[ "Apache-2.0" ]
null
null
null
month01/all_code/day02/exercise06.py
chaofan-zheng/tedu-python-demo
abe983ddc52690f4726cf42cc6390cba815026d8
[ "Apache-2.0" ]
null
null
null
""" 练习1:在终端中输入一个疫情确诊人数再录入一个治愈人数, 打印治愈比例 格式:治愈比例为xx% 效果: 请输入确诊人数:500 请 输入治愈人数:495 治愈比例为99.0% """ confirmed = int(input("请输入确诊人数:")) cure = int(input("请输入治愈人数:")) result = cure / confirmed * 100 print("治愈比例为" + str(result) + "%")
18.642857
34
0.59387
confirmed = int(input("请输入确诊人数:")) cure = int(input("请输入治愈人数:")) result = cure / confirmed * 100 print("治愈比例为" + str(result) + "%")
true
true
f730a690b6b79400b52d582014d1ddf3b05f2bf6
369
py
Python
h1st_contrib/iot_mgmt/maint_ops/migrations/0073_auto_20181121_0024.py
h1st-ai/h1st-contrib
38fbb1fff4513bb3433bc12f2b436836e5e51c80
[ "Apache-2.0" ]
1
2022-02-19T18:55:43.000Z
2022-02-19T18:55:43.000Z
h1st_contrib/iot_mgmt/maint_ops/migrations/0073_auto_20181121_0024.py
h1st-ai/h1st-contrib
38fbb1fff4513bb3433bc12f2b436836e5e51c80
[ "Apache-2.0" ]
null
null
null
h1st_contrib/iot_mgmt/maint_ops/migrations/0073_auto_20181121_0024.py
h1st-ai/h1st-contrib
38fbb1fff4513bb3433bc12f2b436836e5e51c80
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.1.1 on 2018-11-21 00:24 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('IoT_MaintOps', '0072_auto_20181115_0423'), ] operations = [ migrations.AlterModelOptions( name='equipmentinstancedailyriskscore', ...
20.5
52
0.620596
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('IoT_MaintOps', '0072_auto_20181115_0423'), ] operations = [ migrations.AlterModelOptions( name='equipmentinstancedailyriskscore', options={'ordering': ()}, ), ]...
true
true
f730a88b0aa1fb26bbd6dfb345fe135d202fd7b6
8,692
py
Python
sdk/python/pulumi_mongodbatlas/get_cloud_provider_snapshot.py
pulumi/pulumi-mongodbatlas
0d5c085dcfd871b56fb4cf582620260b70caa07a
[ "ECL-2.0", "Apache-2.0" ]
9
2020-04-28T19:12:30.000Z
2022-03-22T23:04:46.000Z
sdk/python/pulumi_mongodbatlas/get_cloud_provider_snapshot.py
pulumi/pulumi-mongodbatlas
0d5c085dcfd871b56fb4cf582620260b70caa07a
[ "ECL-2.0", "Apache-2.0" ]
59
2020-06-12T12:12:52.000Z
2022-03-28T18:14:50.000Z
sdk/python/pulumi_mongodbatlas/get_cloud_provider_snapshot.py
pulumi/pulumi-mongodbatlas
0d5c085dcfd871b56fb4cf582620260b70caa07a
[ "ECL-2.0", "Apache-2.0" ]
2
2020-09-25T21:22:08.000Z
2021-08-30T20:06:18.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import ...
40.0553
254
0.666015
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ 'GetCloudProviderSnapshotResult', 'AwaitableGetCloudProviderSnapshotResult', 'get_cloud_provider_snapshot', ] @pulumi.output_type class GetCloudPro...
true
true
f730a8d6bd9bfbf555172824425acb3083358392
686
py
Python
coq/tools/make-both-time-files.py
reichel3/TacTok
c344e76263de04311af8a0030c07aec95d87f71c
[ "MIT" ]
7
2020-11-23T02:45:36.000Z
2022-03-18T03:03:33.000Z
coq/tools/make-both-time-files.py
reichel3/TacTok
c344e76263de04311af8a0030c07aec95d87f71c
[ "MIT" ]
4
2021-02-23T03:03:51.000Z
2021-11-13T00:07:38.000Z
coq/tools/make-both-time-files.py
reichel3/TacTok
c344e76263de04311af8a0030c07aec95d87f71c
[ "MIT" ]
2
2021-01-19T17:56:28.000Z
2022-03-28T04:39:41.000Z
#!/usr/bin/env python import sys from TimeFileMaker import * if __name__ == '__main__': USAGE = 'Usage: %s [--sort-by=auto|absolute|diff] AFTER_FILE_NAME BEFORE_FILE_NAME [OUTPUT_FILE_NAME ..]' % sys.argv[0] HELP_STRING = r'''Formats timing information from the output of two invocations of `make TIMED=1` into ...
40.352941
123
0.728863
import sys from TimeFileMaker import * if __name__ == '__main__': USAGE = 'Usage: %s [--sort-by=auto|absolute|diff] AFTER_FILE_NAME BEFORE_FILE_NAME [OUTPUT_FILE_NAME ..]' % sys.argv[0] HELP_STRING = r'''Formats timing information from the output of two invocations of `make TIMED=1` into a sorted table. The i...
true
true
f730a93f581867bc217a894c85120b1515d73e81
2,516
py
Python
z2/part3/updated_part2_batch/jm/parser_errors_2/125359744.py
kozakusek/ipp-2020-testy
09aa008fa53d159672cc7cbf969a6b237e15a7b8
[ "MIT" ]
1
2020-04-16T12:13:47.000Z
2020-04-16T12:13:47.000Z
z2/part3/updated_part2_batch/jm/parser_errors_2/125359744.py
kozakusek/ipp-2020-testy
09aa008fa53d159672cc7cbf969a6b237e15a7b8
[ "MIT" ]
18
2020-03-06T17:50:15.000Z
2020-05-19T14:58:30.000Z
z2/part3/updated_part2_batch/jm/parser_errors_2/125359744.py
kozakusek/ipp-2020-testy
09aa008fa53d159672cc7cbf969a6b237e15a7b8
[ "MIT" ]
18
2020-03-06T17:45:13.000Z
2020-06-09T19:18:31.000Z
from part1 import ( gamma_board, gamma_busy_fields, gamma_delete, gamma_free_fields, gamma_golden_move, gamma_golden_possible, gamma_move, gamma_new, ) """ scenario: test_random_actions uuid: 125359744 """ """ random actions, total chaos """ board = gamma_new(3, 4, 4, 4) assert board is...
29.255814
58
0.678855
from part1 import ( gamma_board, gamma_busy_fields, gamma_delete, gamma_free_fields, gamma_golden_move, gamma_golden_possible, gamma_move, gamma_new, ) board = gamma_new(3, 4, 4, 4) assert board is not None assert gamma_move(board, 1, 1, 2) == 1 assert gamma_move(board, 1, 0, 2) == 1 ...
true
true