hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
790a6846f5a283e248a6ffbd74514545205cb849
2,354
py
Python
src/CalculatorTest.py
jimishapatel/Calculator
7554a2342da9a98ab9739ddead7455f826631261
[ "MIT" ]
null
null
null
src/CalculatorTest.py
jimishapatel/Calculator
7554a2342da9a98ab9739ddead7455f826631261
[ "MIT" ]
null
null
null
src/CalculatorTest.py
jimishapatel/Calculator
7554a2342da9a98ab9739ddead7455f826631261
[ "MIT" ]
null
null
null
import unittest from CsvReader import CsvReader from Calculator import MyCalculator class MyTestCase(unittest.TestCase): def setUp(self) -> None: self.calculator = MyCalculator() def test_instantiate_calculator(self): self.assertIsInstance(self.calculator, MyCalculator) def test_additio...
40.586207
98
0.649108
import unittest from CsvReader import CsvReader from Calculator import MyCalculator class MyTestCase(unittest.TestCase): def setUp(self) -> None: self.calculator = MyCalculator() def test_instantiate_calculator(self): self.assertIsInstance(self.calculator, MyCalculator) def test_additio...
true
true
790a687bfd81286b649201166ae2ebe38cb79b8a
3,095
py
Python
examples/rgbd_desk.py
IshitaTakeshi/DVO
2c5a3db1db7e651bfaa7808bbf79a6c1c6a42fc5
[ "Apache-2.0" ]
7
2019-12-20T07:19:11.000Z
2021-07-22T03:25:12.000Z
examples/rgbd_desk.py
IshitaTakeshi/DVO
2c5a3db1db7e651bfaa7808bbf79a6c1c6a42fc5
[ "Apache-2.0" ]
null
null
null
examples/rgbd_desk.py
IshitaTakeshi/DVO
2c5a3db1db7e651bfaa7808bbf79a6c1c6a42fc5
[ "Apache-2.0" ]
null
null
null
import csv import sys from pathlib import Path sys.path.append(str(Path(__file__).resolve().parent.parent)) from skimage.color import rgb2gray import numpy as np from tqdm import tqdm from tadataka import VisualOdometry, CameraParameters from tadataka.rigid import exp_se3, log_se3 from tadataka.projection import war...
29.47619
82
0.668498
import csv import sys from pathlib import Path sys.path.append(str(Path(__file__).resolve().parent.parent)) from skimage.color import rgb2gray import numpy as np from tqdm import tqdm from tadataka import VisualOdometry, CameraParameters from tadataka.rigid import exp_se3, log_se3 from tadataka.projection import war...
true
true
790a688592a18104373a0a646b965175738ee8ef
16,174
py
Python
train.py
YanchengWang/RegNet-Search-PyTorch
e15f2d33d5e2191ff22e65f5257693894156b4fd
[ "MIT" ]
310
2020-05-14T23:03:42.000Z
2022-03-31T11:35:47.000Z
train.py
YanchengWang/RegNet-Search-PyTorch
e15f2d33d5e2191ff22e65f5257693894156b4fd
[ "MIT" ]
7
2020-05-24T08:44:17.000Z
2022-02-03T03:25:24.000Z
train.py
YanchengWang/RegNet-Search-PyTorch
e15f2d33d5e2191ff22e65f5257693894156b4fd
[ "MIT" ]
43
2020-05-14T23:03:48.000Z
2022-03-16T15:33:55.000Z
##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ## Created by: Hang Zhang ## Email: zhanghang0704@gmail.com ## Copyright (c) 2020 ## ## LICENSE file in the root directory of this source tree ##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ import os import time i...
44.312329
110
0.563992
utedDataParallel import autotorch as at import encoding from encoding.nn import LabelSmoothing, NLLMultiLabelSmooth from encoding.utils import (accuracy, AverageMeter, MixUpWrapper, LR_Scheduler, torch_dist_sum) try: import apex from apex import amp except ModuleNotFoundError: print('please install amp if...
true
true
790a68c19c86be4fe2046db8e11db87131ee7751
2,393
py
Python
django/utils/version.py
andreip/django
c61d1361d027a729d07d277879950ff133c19f4c
[ "PSF-2.0", "BSD-3-Clause" ]
2
2020-09-25T04:02:25.000Z
2020-10-15T00:01:00.000Z
django/utils/version.py
seanfagan/django
66bbde6819586cc3a75630e12e569dc8ae72f211
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
django/utils/version.py
seanfagan/django
66bbde6819586cc3a75630e12e569dc8ae72f211
[ "PSF-2.0", "BSD-3-Clause" ]
1
2017-02-28T17:05:19.000Z
2017-02-28T17:05:19.000Z
import datetime import functools import os import subprocess def get_version(version=None): """Return a PEP 440-compliant version number from VERSION.""" version = get_complete_version(version) # Now build the two parts of the version number: # main = X.Y[.Z] # sub = .devN - for pre-alpha release...
29.9125
79
0.64814
import datetime import functools import os import subprocess def get_version(version=None): version = get_complete_version(version) main = get_main_version(version) sub = '' if version[3] == 'alpha' and version[4] == 0: git_changeset = get_git_changeset() if git_...
true
true
790a68e480d0b55f4a5a33a0466d228ee70d3a93
4,305
py
Python
hierarchical-sc/corpus.py
ne7ermore/deeping-flow
9414fa48139bac99824ae89cc45c6f59855fe7d4
[ "MIT" ]
54
2017-11-24T07:10:25.000Z
2021-03-04T07:09:24.000Z
hierarchical-sc/corpus.py
ne7ermore/deeping-flow
9414fa48139bac99824ae89cc45c6f59855fe7d4
[ "MIT" ]
9
2018-05-30T08:40:24.000Z
2020-03-04T14:12:15.000Z
hierarchical-sc/corpus.py
ne7ermore/deeping-flow
9414fa48139bac99824ae89cc45c6f59855fe7d4
[ "MIT" ]
13
2017-11-24T07:10:32.000Z
2020-04-08T10:36:26.000Z
import os import pickle import math import pandas as pd from const import * def middle_save(obj, inf): pickle.dump(obj, open(inf, "wb"), True) def middle_load(inf): return pickle.load(open(inf, "rb")) def word2idx(sents, word2idx): return [[word2idx[w] if w in word2idx else UNK for w in s] for s in ...
29.689655
87
0.532172
import os import pickle import math import pandas as pd from const import * def middle_save(obj, inf): pickle.dump(obj, open(inf, "wb"), True) def middle_load(inf): return pickle.load(open(inf, "rb")) def word2idx(sents, word2idx): return [[word2idx[w] if w in word2idx else UNK for w in s] for s in ...
true
true
790a697f21c28ae85d911f2e52d29c25f778fcaf
29,682
py
Python
utils/general.py
vivekkhurana/handsign
315e40e2d7b00a7e34cad870e6f90679e7bf7100
[ "MIT" ]
1
2020-01-12T18:14:07.000Z
2020-01-12T18:14:07.000Z
utils/general.py
vivekkhurana/handsign
315e40e2d7b00a7e34cad870e6f90679e7bf7100
[ "MIT" ]
null
null
null
utils/general.py
vivekkhurana/handsign
315e40e2d7b00a7e34cad870e6f90679e7bf7100
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # ColorHandPose3DNetwork - Network for estimating 3D Hand Pose from a single RGB Image # Copyright (C) 2017 Christian Zimmermann # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free So...
40.05668
148
0.552018
from __future__ import print_function, unicode_literals import tensorflow as tf from tensorflow.python import pywrap_tensorflow import numpy as np import math import cv2 class NetworkOps(object): neg_slope_of_relu = 0.01 @classmethod def leaky_relu(cls, tensor, name='relu'): ou...
true
true
790a6aedd03c48f724e76f642cd7f5067c735804
805
py
Python
notes-n-resources/Data-Structures-N-Algo/_DS-n-Algos/Interview-Problems/LeetCode/MinStack.py
side-projects-42/INTERVIEW-PREP-COMPLETE
627a3315cee4bbc38a0e81c256f27f928eac2d63
[ "MIT" ]
13
2021-03-11T00:25:22.000Z
2022-03-19T00:19:23.000Z
notes-n-resources/Data-Structures-N-Algo/_DS-n-Algos/Interview-Problems/LeetCode/MinStack.py
side-projects-42/INTERVIEW-PREP-COMPLETE
627a3315cee4bbc38a0e81c256f27f928eac2d63
[ "MIT" ]
160
2021-04-26T19:04:15.000Z
2022-03-26T20:18:37.000Z
notes-n-resources/Data-Structures-N-Algo/_DS-n-Algos/Interview-Problems/LeetCode/MinStack.py
side-projects-42/INTERVIEW-PREP-COMPLETE
627a3315cee4bbc38a0e81c256f27f928eac2d63
[ "MIT" ]
12
2021-04-26T19:43:01.000Z
2022-01-31T08:36:29.000Z
import math class MinStack: def __init__(self): """ initialize your data structure here. """ self.stack = [] self.min = math.inf def push(self, x: int) -> None: self.x = x self.stack.append(x) if x < self.min: self.min = x def p...
21.184211
63
0.532919
import math class MinStack: def __init__(self): self.stack = [] self.min = math.inf def push(self, x: int) -> None: self.x = x self.stack.append(x) if x < self.min: self.min = x def pop(self) -> None: t = self.stack.pop() if t == self.m...
true
true
790a6c616cbc8e212eb9b9128c574dddf371cb52
4,955
py
Python
postcipes/bfs.py
Mopolino8/postcipes
5d67b383aa3e314b581b5262ba95f734ecb6369f
[ "MIT" ]
null
null
null
postcipes/bfs.py
Mopolino8/postcipes
5d67b383aa3e314b581b5262ba95f734ecb6369f
[ "MIT" ]
null
null
null
postcipes/bfs.py
Mopolino8/postcipes
5d67b383aa3e314b581b5262ba95f734ecb6369f
[ "MIT" ]
1
2019-11-24T17:11:16.000Z
2019-11-24T17:11:16.000Z
# This file is part of postcipes # (c) Timofey Mukha # The code is released under the MIT Licence. # See LICENCE.txt and the Legal section in the README for more information from __future__ import absolute_import from __future__ import division from __future__ import print_function from .postcipe import Postci...
33.707483
79
0.52775
from __future__ import absolute_import from __future__ import division from __future__ import print_function from .postcipe import Postcipe import turbulucid as tbl import numpy as np import h5py __all__ = ["BackwardFacingStep"] class BackwardFacingStep(Postcipe): def __init__(self, path, nu,...
true
true
790a6df13312576a919d632818686df6c911d77f
10,559
py
Python
pygazebo/msg/geometry_pb2.py
CryptoCopter/pygazebo
f16704f3b59cb50a1390ef92fde283558fd71f8f
[ "Apache-2.0" ]
null
null
null
pygazebo/msg/geometry_pb2.py
CryptoCopter/pygazebo
f16704f3b59cb50a1390ef92fde283558fd71f8f
[ "Apache-2.0" ]
null
null
null
pygazebo/msg/geometry_pb2.py
CryptoCopter/pygazebo
f16704f3b59cb50a1390ef92fde283558fd71f8f
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: geometry.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protob...
46.721239
1,282
0.762572
from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _symbol_database.Default() import boxgeom_pb2 as boxgeom__pb2 import cylindergeom_p...
true
true
790a6eb21c9b01b275319a92d0d0a4b26f43a172
1,413
py
Python
CNN/Dense.py
GreatGameDota/CNN-Numpy-1D-Images
6016701b54d7475b0c294355801bf8f6ce534852
[ "MIT" ]
null
null
null
CNN/Dense.py
GreatGameDota/CNN-Numpy-1D-Images
6016701b54d7475b0c294355801bf8f6ce534852
[ "MIT" ]
null
null
null
CNN/Dense.py
GreatGameDota/CNN-Numpy-1D-Images
6016701b54d7475b0c294355801bf8f6ce534852
[ "MIT" ]
null
null
null
import numpy as np class Dense(): def __init__(self, units, activation=None, use_bias=True, kernel_initializer='glorot_uniform', bias_initializer='zeros', input_shape=None): self._units = units self._activation = activation self._use_bias = use_bias self._kernal_initializer = kern...
31.4
143
0.587403
import numpy as np class Dense(): def __init__(self, units, activation=None, use_bias=True, kernel_initializer='glorot_uniform', bias_initializer='zeros', input_shape=None): self._units = units self._activation = activation self._use_bias = use_bias self._kernal_initializer = kern...
true
true
790a6fced3b1b9469c137f7c3e15dd786ec39a92
6,012
py
Python
main_server/common.py
yehan-xiao/SUCS
4110a9d858c9e484d35c08198d951c6ba734460f
[ "MIT" ]
null
null
null
main_server/common.py
yehan-xiao/SUCS
4110a9d858c9e484d35c08198d951c6ba734460f
[ "MIT" ]
null
null
null
main_server/common.py
yehan-xiao/SUCS
4110a9d858c9e484d35c08198d951c6ba734460f
[ "MIT" ]
null
null
null
#Written by Shitao Tang # -------------------------------------------------------- import connectDB import time,hashlib,logging def sign_up(username,password): db=connectDB.database.getInstance() if len(username)<=20: return db.create_account(username,hashlib.sha224(password).hexdigest()) else: ...
30.989691
122
0.570692
import connectDB import time,hashlib,logging def sign_up(username,password): db=connectDB.database.getInstance() if len(username)<=20: return db.create_account(username,hashlib.sha224(password).hexdigest()) else: return 'username must be less than 20 characters' def account_authenticati...
false
true
790a7017b19c51e6dda79dfec8bdb0f336c8a704
1,218
py
Python
setup.py
luttermann/pystadel
41f627ab08f70bc8151d1337f886dd9ee596ae44
[ "BSD-2-Clause" ]
null
null
null
setup.py
luttermann/pystadel
41f627ab08f70bc8151d1337f886dd9ee596ae44
[ "BSD-2-Clause" ]
null
null
null
setup.py
luttermann/pystadel
41f627ab08f70bc8151d1337f886dd9ee596ae44
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() setup( name='p...
27.066667
68
0.644499
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() setup( name='pystadel', version='1.0.0', description='Class for sending S...
true
true
790a70a5736ebdf613d6c54c84ce4d4cc7768399
13,514
py
Python
colcon_package_information/verb/graph.py
christophebedard/colcon-package-information
295189f2f1d6362c331c6c3ff88e13ba28a94faa
[ "Apache-2.0" ]
2
2018-02-01T05:57:34.000Z
2018-02-01T06:23:21.000Z
colcon_package_information/verb/graph.py
christophebedard/colcon-package-information
295189f2f1d6362c331c6c3ff88e13ba28a94faa
[ "Apache-2.0" ]
12
2018-05-09T00:19:00.000Z
2021-08-09T07:04:57.000Z
colcon_package_information/verb/graph.py
christophebedard/colcon-package-information
295189f2f1d6362c331c6c3ff88e13ba28a94faa
[ "Apache-2.0" ]
6
2018-09-10T23:33:48.000Z
2021-07-28T23:14:41.000Z
# Copyright 2016-2018 Dirk Thomas # Licensed under the Apache License, Version 2.0 from collections import defaultdict from collections import OrderedDict import itertools import os from pathlib import Path from colcon_core.package_selection import add_arguments \ as add_packages_arguments from colcon_core.packag...
42.496855
79
0.492896
from collections import defaultdict from collections import OrderedDict import itertools import os from pathlib import Path from colcon_core.package_selection import add_arguments \ as add_packages_arguments from colcon_core.package_selection import get_package_descriptors from colcon_core.package_selection imp...
true
true
790a70eb22866d04959e1d316539871d41ec5268
11,843
py
Python
Providers/Scripts/2.4x-2.5x/Scripts/nxOMSPerfCounter.py
MicrosoftDocs/PowerShell-DSC-for-Linux
c7519c0b9166b4b0568cda75f05b5ad1cac72012
[ "MIT" ]
2
2020-05-19T20:07:32.000Z
2020-08-08T00:58:15.000Z
Providers/Scripts/2.4x-2.5x/Scripts/nxOMSPerfCounter.py
MicrosoftDocs/PowerShell-DSC-for-Linux
c7519c0b9166b4b0568cda75f05b5ad1cac72012
[ "MIT" ]
null
null
null
Providers/Scripts/2.4x-2.5x/Scripts/nxOMSPerfCounter.py
MicrosoftDocs/PowerShell-DSC-for-Linux
c7519c0b9166b4b0568cda75f05b5ad1cac72012
[ "MIT" ]
4
2019-10-31T19:10:42.000Z
2022-03-15T07:42:03.000Z
#!/usr/bin/env python #============================================================================ # Copyright (C) Microsoft Corporation, All rights reserved. #============================================================================ import os import imp import re import codecs protocol = imp.load_source('protoco...
39.476667
172
0.606772
import os import imp import re import codecs protocol = imp.load_source('protocol', '../protocol.py') nxDSCLog = imp.load_source('nxDSCLog', '../nxDSCLog.py') LG = nxDSCLog.DSCLog conf_path = '/etc/opt/microsoft/omsagent/conf/omsagent.conf' omi_map_path = '/etc/opt/microsoft/omsagent/conf/omsagent.d/omi_mappin...
true
true
790a73d25462380330efe136b15c7ca1a8ba7290
141,288
py
Python
core/domain/suggestion_registry_test.py
WebFlakyTest/oppia
520e35490eae8171beb035fbafc2948983abec75
[ "Apache-2.0" ]
1
2021-08-17T20:33:12.000Z
2021-08-17T20:33:12.000Z
core/domain/suggestion_registry_test.py
WebFlakyTest/oppia
520e35490eae8171beb035fbafc2948983abec75
[ "Apache-2.0" ]
null
null
null
core/domain/suggestion_registry_test.py
WebFlakyTest/oppia
520e35490eae8171beb035fbafc2948983abec75
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
42.685196
80
0.661365
from __future__ import absolute_import from __future__ import unicode_literals import datetime import os from core.domain import config_services from core.domain import exp_domain from core.domain import exp_fetchers from core.domain import exp_services from core.domain import fs_services from core...
true
true
790a73da072748e571f8d467301618f7fd859cdd
13,949
py
Python
robovat/simulation/simulator.py
leobxpan/robovat
0d360c34c677cf018c4daab0b8e758943ae1d2c1
[ "MIT" ]
62
2020-04-08T11:26:24.000Z
2021-09-06T02:45:53.000Z
robovat/simulation/simulator.py
leobxpan/robovat
0d360c34c677cf018c4daab0b8e758943ae1d2c1
[ "MIT" ]
7
2020-04-12T13:10:10.000Z
2022-03-12T00:15:03.000Z
robovat/simulation/simulator.py
leobxpan/robovat
0d360c34c677cf018c4daab0b8e758943ae1d2c1
[ "MIT" ]
17
2020-04-12T17:37:01.000Z
2021-09-07T01:51:46.000Z
"""The Simulator class. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os.path import numpy as np import pybullet from robovat.math.pose import Pose from robovat.simulation import physics from robovat.simulation.body import Body from robovat.si...
31.136161
79
0.538533
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os.path import numpy as np import pybullet from robovat.math.pose import Pose from robovat.simulation import physics from robovat.simulation.body import Body from robovat.simulation.controllable_body i...
true
true
790a73dc386e5f7248c4ddc6e27d71bea43bc2d5
2,363
py
Python
src/commercetools/platform/client/login/by_project_key_login_request_builder.py
labd/commercetools-python-sdk
d8ec285f08d56ede2e4cad45c74833f5b609ab5c
[ "MIT" ]
15
2018-11-02T14:35:52.000Z
2022-03-16T07:51:44.000Z
src/commercetools/platform/client/login/by_project_key_login_request_builder.py
labd/commercetools-python-sdk
d8ec285f08d56ede2e4cad45c74833f5b609ab5c
[ "MIT" ]
84
2018-11-02T12:50:32.000Z
2022-03-22T01:25:54.000Z
src/commercetools/platform/client/login/by_project_key_login_request_builder.py
labd/commercetools-python-sdk
d8ec285f08d56ede2e4cad45c74833f5b609ab5c
[ "MIT" ]
13
2019-01-03T09:16:50.000Z
2022-02-15T18:37:19.000Z
# This file is automatically generated by the rmf-codegen project. # # The Python code generator is maintained by Lab Digital. If you want to # contribute to this project then please do not edit this file directly # but send a pull request to the Lab Digital fork of rmf-codegen at # https://github.com/labd/rmf-codegen ...
36.921875
105
0.660601
import typing import warnings from ...models.customer import CustomerSignin, CustomerSignInResult from ...models.error import ErrorResponse if typing.TYPE_CHECKING: from ...base_client import BaseClient class ByProjectKeyLoginRequestBuilder: _client: "BaseClient" _project_key: str def __init...
true
true
790a742b6543de153cbeda83fe3f3076432fa81d
3,280
py
Python
snooty/test_specparser.py
rayangler/snooty-parser
3812adab1338ef78ff6f9aecae5e17d2ec5c5181
[ "Apache-2.0", "CNRI-Python-GPL-Compatible" ]
15
2019-04-25T15:38:31.000Z
2022-01-21T00:09:29.000Z
snooty/test_specparser.py
rayangler/snooty-parser
3812adab1338ef78ff6f9aecae5e17d2ec5c5181
[ "Apache-2.0", "CNRI-Python-GPL-Compatible" ]
69
2019-03-05T02:30:41.000Z
2022-03-02T17:51:08.000Z
snooty/test_specparser.py
rayangler/snooty-parser
3812adab1338ef78ff6f9aecae5e17d2ec5c5181
[ "Apache-2.0", "CNRI-Python-GPL-Compatible" ]
33
2019-02-05T21:18:17.000Z
2021-12-13T18:24:22.000Z
import pytest from . import specparser def test_load() -> None: spec = specparser.Spec.loads( """ [meta] version = 0 [enum] user_level = ["beginner", "intermediate", "advanced"] [directive._parent] content_type = "block" options.foo = ["path", "uri"] [directive.child] ...
21.721854
97
0.57561
import pytest from . import specparser def test_load() -> None: spec = specparser.Spec.loads( """ [meta] version = 0 [enum] user_level = ["beginner", "intermediate", "advanced"] [directive._parent] content_type = "block" options.foo = ["path", "uri"] [directive.child] ...
true
true
790a74a9becc2f129d39e41df4fd43afa655eb66
548
py
Python
src/app.py
budavariam/activity-visualizer
fd77e68eb7c50f4031865257740f00c26fcb9894
[ "MIT" ]
null
null
null
src/app.py
budavariam/activity-visualizer
fd77e68eb7c50f4031865257740f00c26fcb9894
[ "MIT" ]
null
null
null
src/app.py
budavariam/activity-visualizer
fd77e68eb7c50f4031865257740f00c26fcb9894
[ "MIT" ]
1
2022-02-11T13:14:20.000Z
2022-02-11T13:14:20.000Z
import os import layout import callbacks # layout needs to be defined before creating callbacks import routes import appserver server = appserver.app.server if __name__ == "__main__": debug_mode = True if os.getenv("DEBUG", "false") == "true" else False if debug_mode is True: print(f"Initiating server...
27.4
73
0.671533
import os import layout import callbacks import routes import appserver server = appserver.app.server if __name__ == "__main__": debug_mode = True if os.getenv("DEBUG", "false") == "true" else False if debug_mode is True: print(f"Initiating server. Debug mode enabled.") else: pri...
true
true
790a75e7d4eb0149caf084cd7775eb6559a24545
148,921
py
Python
venv/lib/python3.9/site-packages/IPython/core/interactiveshell.py
CMU-IDS-2022/final-project-the-evaluators
3b9262ad1a0f7315208a94a05ea1ce38e679d01d
[ "BSD-3-Clause" ]
null
null
null
venv/lib/python3.9/site-packages/IPython/core/interactiveshell.py
CMU-IDS-2022/final-project-the-evaluators
3b9262ad1a0f7315208a94a05ea1ce38e679d01d
[ "BSD-3-Clause" ]
null
null
null
venv/lib/python3.9/site-packages/IPython/core/interactiveshell.py
CMU-IDS-2022/final-project-the-evaluators
3b9262ad1a0f7315208a94a05ea1ce38e679d01d
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Main IPython class.""" #----------------------------------------------------------------------------- # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> # Copyright (C) 2001-2007 Fernando Perez. <fperez@colorado.edu> # Copyright (C) 2008-2011 The IPython Development Team # # Distribu...
39.53305
147
0.587781
import abc import ast import atexit import builtins as builtin_mod import dis import functools import inspect import os import re import runpy import subprocess import sys import tempfile import traceback import types import warnings from ast import stmt from io import open as io_open from logging import er...
true
true
790a75fd07c5de8baf26f61759be3a510f770be0
2,935
py
Python
pandas_ta/volatility/donchian.py
yssource/pandas-ta
0f975320684a91db3c04f6ea3dd739177dcb65aa
[ "MIT" ]
2
2021-03-30T01:23:14.000Z
2021-04-02T18:04:51.000Z
pandas_ta/volatility/donchian.py
lukaszbinden/pandas-ta
98478f8bf049a4c8748d6f3c795f4f335ced05ca
[ "MIT" ]
2
2021-03-08T14:28:33.000Z
2021-03-08T16:26:53.000Z
pandas_ta/volatility/donchian.py
witokondoria/pandas-ta
bf7e2b395596e8a75bed863e9ce0a0f34d14e829
[ "MIT" ]
1
2021-05-08T14:28:45.000Z
2021-05-08T14:28:45.000Z
# -*- coding: utf-8 -*- from pandas import DataFrame from pandas_ta.utils import get_offset, verify_series def donchian(high, low, lower_length=None, upper_length=None, offset=None, **kwargs): """Indicator: Donchian Channels (DC)""" # Validate arguments high = verify_series(high) low = verify_series(l...
35.361446
151
0.69983
from pandas import DataFrame from pandas_ta.utils import get_offset, verify_series def donchian(high, low, lower_length=None, upper_length=None, offset=None, **kwargs): high = verify_series(high) low = verify_series(low) lower_length = int(lower_length) if lower_length and lower_length > 0 else 20 ...
true
true
790a760f4de71492819effa48f545d3511700fb5
3,088
py
Python
run.py
franciscoadasme/pdb-bench
90bc877d1a8ac0748a5058707ce37067d639ebc0
[ "MIT" ]
null
null
null
run.py
franciscoadasme/pdb-bench
90bc877d1a8ac0748a5058707ce37067d639ebc0
[ "MIT" ]
null
null
null
run.py
franciscoadasme/pdb-bench
90bc877d1a8ac0748a5058707ce37067d639ebc0
[ "MIT" ]
null
null
null
# /usr/bin/env python3 """Benchmark of handling PDB files comparing multiple libraries.""" import argparse import glob import os import re import subprocess import sys from pathlib import Path def gather_libs(selected_libs): libs = [] for path in sorted(glob.iglob("bench/*")): lib = os.path.basename...
29.409524
84
0.589702
import argparse import glob import os import re import subprocess import sys from pathlib import Path def gather_libs(selected_libs): libs = [] for path in sorted(glob.iglob("bench/*")): lib = os.path.basename(path) if not os.path.isdir(path) or (selected_libs and lib not in selected_libs):...
true
true
790a762ab44054288c5f9263fb0095ff7686f748
4,473
py
Python
ninopianino/markov_trainer.py
NinoDoko/nino_pianino
2a459695932abea720103c85f486daa1145af3b2
[ "MIT" ]
2
2016-10-20T10:53:00.000Z
2020-11-16T03:18:08.000Z
ninopianino/markov_trainer.py
NinoDoko/nino_pianino
2a459695932abea720103c85f486daa1145af3b2
[ "MIT" ]
null
null
null
ninopianino/markov_trainer.py
NinoDoko/nino_pianino
2a459695932abea720103c85f486daa1145af3b2
[ "MIT" ]
null
null
null
import song_generator from markov_gen import markov_generator import os, json nino_dir = '/'.join(os.path.dirname(os.path.realpath(__file__)).split('/')[:-1]) import generator generator.set_dir_write_note(nino_dir + '/trainer/generated_notes') def gen_kwargs(): kwargs = { #What the general scale for t...
37.588235
177
0.667337
import song_generator from markov_gen import markov_generator import os, json nino_dir = '/'.join(os.path.dirname(os.path.realpath(__file__)).split('/')[:-1]) import generator generator.set_dir_write_note(nino_dir + '/trainer/generated_notes') def gen_kwargs(): kwargs = { 'song_scale' : ['maj...
true
true
790a772a6b60a69994d9a5b92d33ae9d661576eb
1,110
py
Python
setup.py
akhti/torch-blocksparse
49d029660dfa0fcf350f0e20f820872e9973973e
[ "MIT" ]
110
2020-03-05T18:50:16.000Z
2022-03-19T07:24:00.000Z
setup.py
akhti/torch-blocksparse
49d029660dfa0fcf350f0e20f820872e9973973e
[ "MIT" ]
32
2020-03-23T17:01:20.000Z
2021-04-05T14:35:54.000Z
setup.py
akhti/torch-blocksparse
49d029660dfa0fcf350f0e20f820872e9973973e
[ "MIT" ]
21
2020-04-06T16:50:32.000Z
2021-08-11T07:04:33.000Z
#!/usr/bin/env python import os import torch from setuptools import setup, find_packages from torch.utils.cpp_extension import BuildExtension, CppExtension cmdclass = {} cmdclass['build_ext'] = BuildExtension import setuptools ext_modules = [ CppExtension(name='torch_blocksparse_cpp_utils', so...
30
70
0.589189
import os import torch from setuptools import setup, find_packages from torch.utils.cpp_extension import BuildExtension, CppExtension cmdclass = {} cmdclass['build_ext'] = BuildExtension import setuptools ext_modules = [ CppExtension(name='torch_blocksparse_cpp_utils', sources=['csrc/utils.cp...
true
true
790a774ee823d211db822c5c0584efd5a0954fb1
473
py
Python
videos_id/provider/vimeo.py
RentFreeMedia/python-video-ids
077dffb9f26456e703fb4e396a81df883ae4d0e3
[ "MIT" ]
null
null
null
videos_id/provider/vimeo.py
RentFreeMedia/python-video-ids
077dffb9f26456e703fb4e396a81df883ae4d0e3
[ "MIT" ]
null
null
null
videos_id/provider/vimeo.py
RentFreeMedia/python-video-ids
077dffb9f26456e703fb4e396a81df883ae4d0e3
[ "MIT" ]
null
null
null
import re from videos_id.platform import Platform class Vimeo(Platform): def __init__(self): self.platform = "Vimeo" def check_url(self, url): pattern = r'https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/(?:[^\/]*)\/videos\/|album\/(?:\d+)\/video\/|video\/|)(\d+)(?:$|\...
27.823529
164
0.534884
import re from videos_id.platform import Platform class Vimeo(Platform): def __init__(self): self.platform = "Vimeo" def check_url(self, url): pattern = r'https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/(?:[^\/]*)\/videos\/|album\/(?:\d+)\/video\/|video\/|)(\d+)(?:$|\...
true
true
790a77f6a8f7fab10233c49133436ecca665996e
557
py
Python
day04/app04/urls.py
General-ITer/Django-Introduction
e88b12682f9abc46a90a0fc79e7443537230a506
[ "Apache-2.0" ]
null
null
null
day04/app04/urls.py
General-ITer/Django-Introduction
e88b12682f9abc46a90a0fc79e7443537230a506
[ "Apache-2.0" ]
1
2020-12-09T18:26:36.000Z
2020-12-09T18:26:36.000Z
day04/app04/urls.py
General-ITer/Django-Introduction
e88b12682f9abc46a90a0fc79e7443537230a506
[ "Apache-2.0" ]
null
null
null
from django.conf.urls import url, include from django.contrib import admin from .views import * urlpatterns = [ url(r'^index$',index,name='index'), url(r'^langs$',langs,name='langs'), url(r'^newindex$',new_index), url(r'^myindex/(\d+)$', myindex_with_param, name='myindex_with_...
27.85
42
0.59246
from django.conf.urls import url, include from django.contrib import admin from .views import * urlpatterns = [ url(r'^index$',index,name='index'), url(r'^langs$',langs,name='langs'), url(r'^newindex$',new_index), url(r'^myindex/(\d+)$', myindex_with_param, name='myindex_with_...
true
true
790a782daf803fc78611f2f7186f5aabb4791def
5,072
py
Python
tests/unit/admin/views/test_journals.py
fairhopeweb/warehouse
7d8ef742e8fe6b401190c28ce56761848041c89f
[ "Apache-2.0" ]
3,103
2015-01-30T00:24:10.000Z
2022-03-31T23:21:39.000Z
tests/unit/admin/views/test_journals.py
fairhopeweb/warehouse
7d8ef742e8fe6b401190c28ce56761848041c89f
[ "Apache-2.0" ]
6,709
2015-01-05T01:23:20.000Z
2022-03-31T14:49:46.000Z
tests/unit/admin/views/test_journals.py
fairhopeweb/warehouse
7d8ef742e8fe6b401190c28ce56761848041c89f
[ "Apache-2.0" ]
959
2015-01-12T22:22:40.000Z
2022-03-31T22:21:51.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
34.739726
86
0.610804
import pretend import pytest from pyramid.httpexceptions import HTTPBadRequest from warehouse.admin.views import journals as views from ....common.db.accounts import UserFactory from ....common.db.packaging import JournalEntryFactory, ProjectFactory class TestProjectList: def test_no_query(self, db...
true
true
790a7848a38af06836d6b558951873681cc2d1e3
257
py
Python
cff/models/record.py
cariad/cff
662164a29652bf242a3a4f6ce7986e8f187f571f
[ "MIT" ]
null
null
null
cff/models/record.py
cariad/cff
662164a29652bf242a3a4f6ce7986e8f187f571f
[ "MIT" ]
1
2021-11-02T16:19:19.000Z
2021-11-02T16:19:19.000Z
cff/models/record.py
cariad/cff
662164a29652bf242a3a4f6ce7986e8f187f571f
[ "MIT" ]
null
null
null
from typing import TypedDict from cff.models.cloudfront_event import CloudFrontEvent class Record(TypedDict): """Record of an event that raised a Lambda event.""" cf: CloudFrontEvent """The CloudFront event that raised this Lambda event."""
23.363636
61
0.747082
from typing import TypedDict from cff.models.cloudfront_event import CloudFrontEvent class Record(TypedDict): cf: CloudFrontEvent
true
true
790a78e4612ecd1ab2460a50584e2f5845c3f3c2
1,688
py
Python
perceptron_np.py
oustar/scipylearn
f3f3223f1170b39dc420606bdf989b6fcb705410
[ "Apache-2.0" ]
null
null
null
perceptron_np.py
oustar/scipylearn
f3f3223f1170b39dc420606bdf989b6fcb705410
[ "Apache-2.0" ]
null
null
null
perceptron_np.py
oustar/scipylearn
f3f3223f1170b39dc420606bdf989b6fcb705410
[ "Apache-2.0" ]
null
null
null
import numpy as np class Perceptron(object): def __init__(self, input_num, activator): self.activator = activator self.weights = np.zeros((input_num)) self.bias = 0.0 def __str__(self): return 'weights\t:%s\nbias\t:%f\n' % (self.weights, self.bias) def predict(self, in...
22.210526
74
0.61019
import numpy as np class Perceptron(object): def __init__(self, input_num, activator): self.activator = activator self.weights = np.zeros((input_num)) self.bias = 0.0 def __str__(self): return 'weights\t:%s\nbias\t:%f\n' % (self.weights, self.bias) def predict(self, in...
true
true
790a799b03ce196e8691ee4ca8e2fca0102db1c7
1,012
py
Python
src/openprocurement/agreement/cfaua/includeme.py
pontostroy/api
5afdd3a62a8e562cf77e2d963d88f1a26613d16a
[ "Apache-2.0" ]
3
2020-03-13T06:44:23.000Z
2020-11-05T18:25:29.000Z
src/openprocurement/agreement/cfaua/includeme.py
pontostroy/api
5afdd3a62a8e562cf77e2d963d88f1a26613d16a
[ "Apache-2.0" ]
2
2021-03-25T23:29:58.000Z
2022-03-21T22:18:37.000Z
src/openprocurement/agreement/cfaua/includeme.py
scrubele/prozorro-testing
42b93ea2f25d8cc40e66c596f582c7c05e2a9d76
[ "Apache-2.0" ]
3
2020-10-16T16:25:14.000Z
2021-05-22T12:26:20.000Z
import os import openprocurement.agreement.cfaua from logging import getLogger from pyramid.interfaces import IRequest from openprocurement.api.interfaces import IContentConfigurator from openprocurement.agreement.cfaua.interfaces import IClosedFrameworkAgreementUA from openprocurement.agreement.cfaua.models.agreemen...
32.645161
96
0.8083
import os import openprocurement.agreement.cfaua from logging import getLogger from pyramid.interfaces import IRequest from openprocurement.api.interfaces import IContentConfigurator from openprocurement.agreement.cfaua.interfaces import IClosedFrameworkAgreementUA from openprocurement.agreement.cfaua.models.agreemen...
true
true
790a79f94693e2fdc88da8df0434a6b544b844e1
6,890
py
Python
custom_components/bureau_of_meteorology/PyBoM/collector.py
QziP22/HomeAssistantConfig
6b05fa20c8267222dc66f90e94f03f5d865c57a9
[ "Unlicense" ]
4
2019-03-26T13:57:54.000Z
2021-11-04T04:55:49.000Z
custom_components/bureau_of_meteorology/PyBoM/collector.py
QziP22/HomeAssistantConfig
6b05fa20c8267222dc66f90e94f03f5d865c57a9
[ "Unlicense" ]
1
2021-04-03T01:10:11.000Z
2021-04-03T01:10:11.000Z
custom_components/bureau_of_meteorology/PyBoM/collector.py
QziP22/HomeAssistantConfig
6b05fa20c8267222dc66f90e94f03f5d865c57a9
[ "Unlicense" ]
2
2019-04-02T19:20:34.000Z
2019-08-13T16:39:52.000Z
"""BOM data 'collector' that downloads the observation data.""" import asyncio import datetime import aiohttp import logging from homeassistant.util import Throttle _LOGGER = logging.getLogger(__name__) MIN_TIME_BETWEEN_UPDATES = datetime.timedelta(minutes=10) BASE_URL = "https://api.weather.bom.gov.au" DAILY_FORECA...
36.648936
80
0.594194
import asyncio import datetime import aiohttp import logging from homeassistant.util import Throttle _LOGGER = logging.getLogger(__name__) MIN_TIME_BETWEEN_UPDATES = datetime.timedelta(minutes=10) BASE_URL = "https://api.weather.bom.gov.au" DAILY_FORECASTS_URL = "/v1/locations/{}/forecasts/daily" LOCATIONS_URL = "/v...
true
true
790a7a15d1e7dba1e510ec320a05921c9cba0383
5,199
py
Python
pyclient/zeroos/orchestrator/client/JobResult.py
5l1v3r1/0-orchestrator
9373a4acb1517ff001df526925c224a7a93b3274
[ "Apache-2.0" ]
3
2017-07-04T14:02:02.000Z
2019-07-06T23:34:08.000Z
pyclient/zeroos/orchestrator/client/JobResult.py
5l1v3r1/0-orchestrator
9373a4acb1517ff001df526925c224a7a93b3274
[ "Apache-2.0" ]
497
2017-05-31T07:55:40.000Z
2018-01-03T12:10:43.000Z
pyclient/zeroos/orchestrator/client/JobResult.py
zero-os/0-orchestrator
9373a4acb1517ff001df526925c224a7a93b3274
[ "Apache-2.0" ]
8
2017-06-14T09:45:56.000Z
2021-02-01T18:12:55.000Z
""" Auto-generated class for JobResult """ from .EnumJobResultName import EnumJobResultName from .EnumJobResultState import EnumJobResultState from . import client_support class JobResult(object): """ auto-generated. don't touch. """ @staticmethod def create(data, id, level, name, startTime, sta...
35.609589
107
0.601462
from .EnumJobResultName import EnumJobResultName from .EnumJobResultState import EnumJobResultState from . import client_support class JobResult(object): @staticmethod def create(data, id, level, name, startTime, state, stderr, stdout): return JobResult( data=data, id=id, ...
true
true
790a7a5bf46496ccc644901f088550b7840a536b
16,556
py
Python
recipes/sdl2/all/conanfile.py
Rapatas/community
e776c5a50092ab4597b3ef20586d12dbcb3cec78
[ "MIT" ]
null
null
null
recipes/sdl2/all/conanfile.py
Rapatas/community
e776c5a50092ab4597b3ef20586d12dbcb3cec78
[ "MIT" ]
null
null
null
recipes/sdl2/all/conanfile.py
Rapatas/community
e776c5a50092ab4597b3ef20586d12dbcb3cec78
[ "MIT" ]
null
null
null
from conans import ConanFile, CMake, tools from conans.errors import ConanInvalidConfiguration import os required_conan_version = ">=1.33.0" class SDL2Conan(ConanFile): # TODO: When porting to CCI rename this package to SDL (without 2) name = "sdl2" description = "Access to audio, keyboard, mouse, joysti...
46.505618
174
0.59181
from conans import ConanFile, CMake, tools from conans.errors import ConanInvalidConfiguration import os required_conan_version = ">=1.33.0" class SDL2Conan(ConanFile): name = "sdl2" description = "Access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL, Direct3D and Vulkan" top...
true
true
790a7d984089ce5707a1f2ba9afe87dd9e67bac2
3,586
py
Python
datapack/data/scripts/quests/43_HelpTheSister/__init__.py
DigitalCoin1/L2SPERO
f9ec069804d7bf13f9c4bfb508db2eb6ce37ab94
[ "Unlicense" ]
null
null
null
datapack/data/scripts/quests/43_HelpTheSister/__init__.py
DigitalCoin1/L2SPERO
f9ec069804d7bf13f9c4bfb508db2eb6ce37ab94
[ "Unlicense" ]
null
null
null
datapack/data/scripts/quests/43_HelpTheSister/__init__.py
DigitalCoin1/L2SPERO
f9ec069804d7bf13f9c4bfb508db2eb6ce37ab94
[ "Unlicense" ]
null
null
null
#quest by zerghase import sys from com.l2jfrozen import Config from com.l2jfrozen.gameserver.model.quest import State from com.l2jfrozen.gameserver.model.quest import QuestState from com.l2jfrozen.gameserver.model.quest.jython import QuestJython as JQuest qn = "43_HelpTheSister" COOPER=30829 GALLADUCCI=30097 CRAFTE...
28.919355
170
0.652259
import sys from com.l2jfrozen import Config from com.l2jfrozen.gameserver.model.quest import State from com.l2jfrozen.gameserver.model.quest import QuestState from com.l2jfrozen.gameserver.model.quest.jython import QuestJython as JQuest qn = "43_HelpTheSister" COOPER=30829 GALLADUCCI=30097 CRAFTED_DAGGER=220 MAP_P...
true
true
790a7e29375efe0aee4b8f054dd71d6c77c4540b
7,709
py
Python
src/python/pants/reporting/reporting.py
ghthor/pants
450de702414f87f563081ddefaefd8a554de07a3
[ "Apache-2.0" ]
null
null
null
src/python/pants/reporting/reporting.py
ghthor/pants
450de702414f87f563081ddefaefd8a554de07a3
[ "Apache-2.0" ]
null
null
null
src/python/pants/reporting/reporting.py
ghthor/pants
450de702414f87f563081ddefaefd8a554de07a3
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import os import sys from six import StringIO from pants.base.workunit import WorkUnitL...
49.416667
109
0.705928
from __future__ import absolute_import, division, print_function, unicode_literals import os import sys from six import StringIO from pants.base.workunit import WorkUnitLabel from pants.reporting.html_reporter import HtmlReporter from pants.reporting.invalidation_report import InvalidationReport from pants.repor...
true
true
790a7e470fa6c89b16514513cfe402cd6f124ec4
375
py
Python
ContestAnalyzerOnline/utils/migrations/0007_delete_comment.py
rogercaminal/HamToolsManager
1c55db416d0caaa039a5251ed49c57d9d1766e53
[ "MIT" ]
1
2017-10-02T15:48:13.000Z
2017-10-02T15:48:13.000Z
ContestAnalyzerOnline/utils/migrations/0007_delete_comment.py
rogercaminal/HamToolsManager
1c55db416d0caaa039a5251ed49c57d9d1766e53
[ "MIT" ]
null
null
null
ContestAnalyzerOnline/utils/migrations/0007_delete_comment.py
rogercaminal/HamToolsManager
1c55db416d0caaa039a5251ed49c57d9d1766e53
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2017-10-15 15:04 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('ContestAnalyzerOnline', '0006_auto_20171015_1445'), ] operations = [ migrations.Del...
19.736842
61
0.64
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('ContestAnalyzerOnline', '0006_auto_20171015_1445'), ] operations = [ migrations.DeleteModel( name='Comment', ), ]
true
true
790a7ffd1e68d0e1b9faac9add257963cfa024e5
16,738
py
Python
libcheckers/movement.py
YuriyGuts/libcheckers
7466458485c2392732bba26bb7fc1ae08a85ef3b
[ "MIT" ]
1
2017-10-25T13:29:29.000Z
2017-10-25T13:29:29.000Z
libcheckers/movement.py
YuriyGuts/libcheckers
7466458485c2392732bba26bb7fc1ae08a85ef3b
[ "MIT" ]
1
2017-12-13T16:10:37.000Z
2017-12-13T16:10:37.000Z
libcheckers/movement.py
YuriyGuts/libcheckers
7466458485c2392732bba26bb7fc1ae08a85ef3b
[ "MIT" ]
3
2017-10-30T12:28:41.000Z
2021-10-29T19:10:42.000Z
from abc import abstractmethod from collections import deque from copy import deepcopy from libcheckers import BoardConfig, InvalidMoveException from libcheckers.enum import Player, PieceClass, GameOverReason from libcheckers.utils import ( index_to_coords, coords_to_index, get_indexes_between, get_lin...
36.308026
108
0.623193
from abc import abstractmethod from collections import deque from copy import deepcopy from libcheckers import BoardConfig, InvalidMoveException from libcheckers.enum import Player, PieceClass, GameOverReason from libcheckers.utils import ( index_to_coords, coords_to_index, get_indexes_between, get_lin...
true
true
790a80009f1236770c6e63048445d0da22b1ea8d
1,554
py
Python
day12/main.py
Floozutter/aoc-2019-speedrun
e5704b03afccc6edb8f43f19fdf3a338c43a3507
[ "Unlicense" ]
null
null
null
day12/main.py
Floozutter/aoc-2019-speedrun
e5704b03afccc6edb8f43f19fdf3a338c43a3507
[ "Unlicense" ]
null
null
null
day12/main.py
Floozutter/aoc-2019-speedrun
e5704b03afccc6edb8f43f19fdf3a338c43a3507
[ "Unlicense" ]
null
null
null
INPUTPATH = "input.txt" #INPUTPATH = "input-test.txt" with open(INPUTPATH) as ifile: raw = ifile.read() from typing import Tuple def line_to_pos(line: str) -> Tuple[int, ...]: filtered = "".join(c for c in line if c.isdigit() or c in {"-", ","}) return tuple(map(int, filtered.split(","))) starts = tuple(zip(*map(lin...
29.884615
70
0.664093
INPUTPATH = "input.txt" with open(INPUTPATH) as ifile: raw = ifile.read() from typing import Tuple def line_to_pos(line: str) -> Tuple[int, ...]: filtered = "".join(c for c in line if c.isdigit() or c in {"-", ","}) return tuple(map(int, filtered.split(","))) starts = tuple(zip(*map(line_to_pos, raw.strip().split("...
true
true
790a8027876c66ca08f0327f7cfa1d16be2339db
1,206
py
Python
setup.py
fm100/simplefb
41f818f143fd384a96770a7db2513bcf7e3402fa
[ "MIT" ]
null
null
null
setup.py
fm100/simplefb
41f818f143fd384a96770a7db2513bcf7e3402fa
[ "MIT" ]
null
null
null
setup.py
fm100/simplefb
41f818f143fd384a96770a7db2513bcf7e3402fa
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages setup( name='simplefb', version='0.2.0a1', description='A simple facebook graph api and auth Mixins', url='https://github.com/fm100/simplefb', author='Freddie Park', author_email='sorelove@gmail.com', license='MIT', # See https://pypi.python...
31.736842
77
0.631012
from setuptools import setup, find_packages setup( name='simplefb', version='0.2.0a1', description='A simple facebook graph api and auth Mixins', url='https://github.com/fm100/simplefb', author='Freddie Park', author_email='sorelove@gmail.com', license='MIT', classifiers=[ ...
true
true
790a807b3ac5ba7847c3dc635b9c5b34f29964d8
3,813
py
Python
Python/k-similar-strings.py
RideGreg/LeetCode
b70818b1e6947bf29519a24f78816e022ebab59e
[ "MIT" ]
1
2022-01-30T06:55:28.000Z
2022-01-30T06:55:28.000Z
Python/k-similar-strings.py
RideGreg/LeetCode
b70818b1e6947bf29519a24f78816e022ebab59e
[ "MIT" ]
null
null
null
Python/k-similar-strings.py
RideGreg/LeetCode
b70818b1e6947bf29519a24f78816e022ebab59e
[ "MIT" ]
1
2021-12-31T03:56:39.000Z
2021-12-31T03:56:39.000Z
# Time: O(n * n!/(c_a!*...*c_z!), n is the length of A, B, # c_a...c_z is the count of each alphabet, # n = sum(c_a...c_z) # Space: O(n * n!/(c_a!*...*c_z!) # 854 # Strings A and B are K-similar (for some non-negative integer K) # if we can swap the po...
39.309278
108
0.586415
# of operation 'cutting corners'. Intuitively, our optimal swap schedule always increases the # of matches # (A[i] == B[i]s) for each swap, so cutting corners is the only type of operation we need to consider. # (This is essentially the happy swap assumption, proved in 765 - Coup...
true
true
790a80b2e52f62cdfc0af3c6e034400381d5e475
1,595
py
Python
test/test_input_output.py
ProcessMaker/pmio-sdk-python
49ddf9e6444c77a35ce51aa052059b254e0f5299
[ "Apache-2.0" ]
2
2017-11-10T05:10:44.000Z
2020-05-14T14:20:01.000Z
test/test_input_output.py
ProcessMaker/pmio-sdk-python
49ddf9e6444c77a35ce51aa052059b254e0f5299
[ "Apache-2.0" ]
null
null
null
test/test_input_output.py
ProcessMaker/pmio-sdk-python
49ddf9e6444c77a35ce51aa052059b254e0f5299
[ "Apache-2.0" ]
4
2017-07-01T22:04:18.000Z
2020-05-14T14:33:41.000Z
# coding: utf-8 """ ProcessMaker API This ProcessMaker I/O API provides access to a BPMN 2.0 compliant workflow engine api that is designed to be used as a microservice to support enterprise cloud applications.  The current Alpha 1.0 version supports most of the descriptive class of the BPMN 2.0 specification...
29.537037
278
0.731661
from __future__ import absolute_import import os import sys import unittest import ProcessMaker_PMIO from ProcessMaker_PMIO.rest import ApiException from ProcessMaker_PMIO.models.input_output import InputOutput class TestInputOutput(unittest.TestCase): def setUp(self): pass def tearDown(self): ...
true
true
790a8150f946b50d2a5a2572e7c851230ff1f896
448
py
Python
excel2mysql/__main__.py
zxjsdp/excel2mysql
4e1ed08d58366dcebc86a08fb74d20feb5369b36
[ "Apache-2.0" ]
null
null
null
excel2mysql/__main__.py
zxjsdp/excel2mysql
4e1ed08d58366dcebc86a08fb74d20feb5369b36
[ "Apache-2.0" ]
null
null
null
excel2mysql/__main__.py
zxjsdp/excel2mysql
4e1ed08d58366dcebc86a08fb74d20feb5369b36
[ "Apache-2.0" ]
2
2017-09-11T07:11:41.000Z
2021-11-26T06:20:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import (print_function, unicode_literals, absolute_import, with_statement) import os import sys if __name__ == '__main__': if __package__ is None: dir_name = os.path.dirname(__file__) sys.path.append( ...
20.363636
57
0.609375
from __future__ import (print_function, unicode_literals, absolute_import, with_statement) import os import sys if __name__ == '__main__': if __package__ is None: dir_name = os.path.dirname(__file__) sys.path.append( os.path.abspath( os.path...
true
true
790a8186fe8570e34da2dd80ded2622a912fd126
551
py
Python
01/01.py
PROxZIMA/AquaQ-Challenge-Hub
e52579264a2c69a0a0b1bccf98a60eabdbd22f95
[ "MIT" ]
null
null
null
01/01.py
PROxZIMA/AquaQ-Challenge-Hub
e52579264a2c69a0a0b1bccf98a60eabdbd22f95
[ "MIT" ]
null
null
null
01/01.py
PROxZIMA/AquaQ-Challenge-Hub
e52579264a2c69a0a0b1bccf98a60eabdbd22f95
[ "MIT" ]
null
null
null
from os.path import realpath def main(): inpString = open(f'{realpath(__file__)[:-2]}txt').read() inpString += '0' * (3 - len(inpString) % 3) # Padding to make it divisible by 3 inp = list(inpString) for i in range(len(inp)): if inp[i] not in '0123456789abcdef': inp[i] = ...
23.956522
105
0.53539
from os.path import realpath def main(): inpString = open(f'{realpath(__file__)[:-2]}txt').read() inpString += '0' * (3 - len(inpString) % 3) inp = list(inpString) for i in range(len(inp)): if inp[i] not in '0123456789abcdef': inp[i] = '0' inp = ''.join(inp) v ...
true
true
790a828f42fdd9c867267ea40e22c50c7668bbb0
2,189
py
Python
train_valid_split.py
njamalova/whale_tail_identifier
507ffe8838b42ca75dbd696c2faaa71252f417da
[ "MIT" ]
2
2020-09-12T17:06:38.000Z
2020-09-14T08:27:53.000Z
train_valid_split.py
purrwhite/whale_tail_identifier
507ffe8838b42ca75dbd696c2faaa71252f417da
[ "MIT" ]
8
2020-09-12T16:58:41.000Z
2020-09-12T22:19:01.000Z
train_valid_split.py
purrwhite/whale_tail_identifier
507ffe8838b42ca75dbd696c2faaa71252f417da
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[1]: import os import cv2 import tensorflow as tf # In[2]: import pandas as pd import numpy as np import matplotlib.pyplot as plt from PIL import Image # In[3]: from tensorflow.keras.preprocessing.image import ImageDataGenerator from tensorflow import keras from ten...
20.082569
118
0.649612
import os import cv2 import tensorflow as tf import pandas as pd import numpy as np import matplotlib.pyplot as plt from PIL import Image from tensorflow.keras.preprocessing.image import ImageDataGenerator from tensorflow import keras from tensorflow.keras import layers ation\\data\\train\\' train = ...
true
true
790a8293486af5b1dc59b7d328b8a9d2a7643089
2,325
py
Python
siuba/sql/dialects/snowflake.py
Techzune/siuba
575bffe016c40ccd4045d800f1c542e43a77aa50
[ "MIT" ]
null
null
null
siuba/sql/dialects/snowflake.py
Techzune/siuba
575bffe016c40ccd4045d800f1c542e43a77aa50
[ "MIT" ]
null
null
null
siuba/sql/dialects/snowflake.py
Techzune/siuba
575bffe016c40ccd4045d800f1c542e43a77aa50
[ "MIT" ]
null
null
null
from sqlalchemy.sql import func as fn from sqlalchemy import sql from ..translate import ( SqlTranslator, extend_base, sql_scalar, sql_agg, win_agg, win_cumul, annotate ) #from .postgresql import PostgresqlColumn, PostgresqlColumnAgg from .base import SqlColumn, SqlColumnAgg from . import ...
27.034884
122
0.653333
from sqlalchemy.sql import func as fn from sqlalchemy import sql from ..translate import ( SqlTranslator, extend_base, sql_scalar, sql_agg, win_agg, win_cumul, annotate ) from .base import SqlColumn, SqlColumnAgg from . import _dt_generics as _dt class SnowflakeColumn(SqlColumn): pass ...
true
true
790a82a041116da64249af9b11c92b7703ff53ac
14,236
py
Python
homeassistant/components/xiaomi_miio/config_flow.py
basicpail/core
5cc54618c5af3f75c08314bf2375cc7ac40d2b7e
[ "Apache-2.0" ]
11
2018-02-16T15:35:47.000Z
2020-01-14T15:20:00.000Z
homeassistant/components/xiaomi_miio/config_flow.py
basicpail/core
5cc54618c5af3f75c08314bf2375cc7ac40d2b7e
[ "Apache-2.0" ]
77
2020-07-16T16:43:09.000Z
2022-03-31T06:14:37.000Z
homeassistant/components/xiaomi_miio/config_flow.py
Vaarlion/core
f3de8b9f28de01abf72c0f5bb0b457eb1841f201
[ "Apache-2.0" ]
11
2020-12-16T13:48:14.000Z
2022-02-01T00:28:05.000Z
"""Config flow to configure Xiaomi Miio.""" import logging from re import search from micloud import MiCloud import voluptuous as vol from homeassistant import config_entries from homeassistant.config_entries import SOURCE_REAUTH from homeassistant.const import CONF_HOST, CONF_NAME, CONF_TOKEN from homeassistant.core...
36.502564
88
0.606631
import logging from re import search from micloud import MiCloud import voluptuous as vol from homeassistant import config_entries from homeassistant.config_entries import SOURCE_REAUTH from homeassistant.const import CONF_HOST, CONF_NAME, CONF_TOKEN from homeassistant.core import callback from homeassistant.helpers....
true
true
790a83767a47c40fd71d6d81a8790a3f0bbeb16d
2,198
py
Python
colossalai/amp/__init__.py
jiangz17THU/ColossalAI
354b7954d1fa6b21a5ba566f0d5ec099280ad315
[ "Apache-2.0" ]
null
null
null
colossalai/amp/__init__.py
jiangz17THU/ColossalAI
354b7954d1fa6b21a5ba566f0d5ec099280ad315
[ "Apache-2.0" ]
null
null
null
colossalai/amp/__init__.py
jiangz17THU/ColossalAI
354b7954d1fa6b21a5ba566f0d5ec099280ad315
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- encoding: utf-8 -*- from .amp_type import AMP_TYPE from colossalai.context import Config import torch.nn as nn from torch.optim import Optimizer from torch.nn.modules.loss import _Loss from .torch_amp import convert_to_torch_amp from .apex_amp import convert_to_apex_amp from .naive_amp impo...
43.098039
128
0.708826
from .amp_type import AMP_TYPE from colossalai.context import Config import torch.nn as nn from torch.optim import Optimizer from torch.nn.modules.loss import _Loss from .torch_amp import convert_to_torch_amp from .apex_amp import convert_to_apex_amp from .naive_amp import convert_to_naive_amp def convert_to_amp(m...
true
true
790a8385a223910f9cc30d80db9f448879dcd1bd
1,169
py
Python
groupdocs/models/GetBillingAddressResponse.py
groupdocs-legacy-sdk/python
80e5ef5a9a14ac4a7815c6cf933b5b2997381455
[ "Apache-2.0" ]
null
null
null
groupdocs/models/GetBillingAddressResponse.py
groupdocs-legacy-sdk/python
80e5ef5a9a14ac4a7815c6cf933b5b2997381455
[ "Apache-2.0" ]
null
null
null
groupdocs/models/GetBillingAddressResponse.py
groupdocs-legacy-sdk/python
80e5ef5a9a14ac4a7815c6cf933b5b2997381455
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ Copyright 2012 GroupDocs. 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...
29.974359
77
0.656116
class GetBillingAddressResponse: def __init__(self): self.swaggerTypes = { 'result': 'GetBillingAddressResult', 'status': 'str', 'error_message': 'str', 'composedOn': 'long' } self.result = None self.status = None self.e...
true
true
790a83be08a5197d889e4e751a9e8148d22046f2
93
py
Python
Chapter07/ch7_debugger3.py
PacktPublishing/Applied-Computational-Thinking-with-Python
fd9982383c5b473ffa1640998540d602876816e5
[ "MIT" ]
18
2020-11-27T22:41:12.000Z
2021-12-27T08:20:46.000Z
Chapter07/ch7_debugger3.py
PacktPublishing/Applied-Computational-Thinking-with-Python
fd9982383c5b473ffa1640998540d602876816e5
[ "MIT" ]
null
null
null
Chapter07/ch7_debugger3.py
PacktPublishing/Applied-Computational-Thinking-with-Python
fd9982383c5b473ffa1640998540d602876816e5
[ "MIT" ]
8
2020-11-30T17:51:11.000Z
2021-12-25T05:23:02.000Z
number = 5 number2 = 'five' print(number) breakpoint() print(str(number) + " " + number2)
10.333333
34
0.645161
number = 5 number2 = 'five' print(number) breakpoint() print(str(number) + " " + number2)
true
true
790a840e419c9466f82615cad59b857b5512ea66
95
py
Python
krcg_api/wsgi.py
lionel-panhaleux/krcg-api
95b25211dae152c20bba82b6bedfc7204b48692d
[ "MIT" ]
2
2020-12-18T21:22:08.000Z
2021-01-14T18:07:17.000Z
krcg_api/wsgi.py
lionel-panhaleux/krcg-api
95b25211dae152c20bba82b6bedfc7204b48692d
[ "MIT" ]
6
2021-07-20T00:25:43.000Z
2022-03-07T07:08:56.000Z
krcg_api/wsgi.py
lionel-panhaleux/krcg-api
95b25211dae152c20bba82b6bedfc7204b48692d
[ "MIT" ]
null
null
null
"""Entrypoint for the WSGI app (web API) """ from . import api application = api.create_app()
15.833333
40
0.694737
from . import api application = api.create_app()
true
true
790a845e3325bf565cd3b061ffc6a3a604aa0dfa
2,147
py
Python
gr-ieee802-15-4/python/qa_dqpsk_soft_demapper_cc.py
xueyuecanfeng/C-LQI
f489c6447428d6affb2159e9d8f895caab2868c7
[ "BSD-2-Clause" ]
2
2021-11-30T02:35:48.000Z
2021-11-30T02:53:02.000Z
gr-ieee802-15-4/python/qa_dqpsk_soft_demapper_cc.py
xueyuecanfeng/C-LQI
f489c6447428d6affb2159e9d8f895caab2868c7
[ "BSD-2-Clause" ]
null
null
null
gr-ieee802-15-4/python/qa_dqpsk_soft_demapper_cc.py
xueyuecanfeng/C-LQI
f489c6447428d6affb2159e9d8f895caab2868c7
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute of Technology (KIT) <wunsch.felix@googlemail.com>. # # This is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as publis...
37.666667
140
0.670703
from gnuradio import gr, gr_unittest from gnuradio import blocks import ieee802_15_4_swig as ieee802_15_4 import numpy as np class qa_dqpsk_soft_demapper_cc (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block () def tearDown (self): self.tb = None def te...
false
true
790a85a8743405ab5506de0abc971a503424ebb9
1,261
py
Python
libalgs-py/data_structures/min_stack.py
tdudz/libalgs-py
9b2610de66217c0564193096702c47478de5db5e
[ "MIT" ]
null
null
null
libalgs-py/data_structures/min_stack.py
tdudz/libalgs-py
9b2610de66217c0564193096702c47478de5db5e
[ "MIT" ]
null
null
null
libalgs-py/data_structures/min_stack.py
tdudz/libalgs-py
9b2610de66217c0564193096702c47478de5db5e
[ "MIT" ]
null
null
null
""" Min Stack ----- A LIFO abstract data type that serves as a collection of elements. Supports retrieving the min from the stack in constant time. """ class MinStack(object): def __init__(self): """ Attributes: data (arr): data stored in the stack minimum (arr): minimum values of data stored """ self...
16.592105
66
0.634417
class MinStack(object): def __init__(self): self.data = [] self.minimum = [] def empty(self): return len(self.data) == 0 def push(self, x): self.data.append(x) if not self.minimum or x <= self.minimum[-1]: self.minimum.append(x) def pop(self): x = self.data.pop() if x == self.minimum[-1]: s...
true
true
790a85d27fe4be9c3ed141d623bf5a9b1b66fffb
8,596
py
Python
nova/virt/vmwareapi/vim_util.py
bopopescu/nested_quota
6d8443287e29c2c9e03cd4e5c5757424314280ad
[ "Apache-2.0" ]
2
2015-06-15T02:16:33.000Z
2022-02-23T07:10:38.000Z
nova/virt/vmwareapi/vim_util.py
bopopescu/nested_quota
6d8443287e29c2c9e03cd4e5c5757424314280ad
[ "Apache-2.0" ]
9
2015-05-20T11:20:17.000Z
2017-07-27T08:21:33.000Z
nova/virt/vmwareapi/vim_util.py
bopopescu/nested_quota
6d8443287e29c2c9e03cd4e5c5757424314280ad
[ "Apache-2.0" ]
13
2015-05-05T09:34:04.000Z
2017-11-08T02:03:46.000Z
# Copyright (c) 2011 Citrix Systems, Inc. # Copyright 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
39.431193
79
0.646696
from oslo.config import cfg from oslo.vmware import vim_util as vutil import suds from nova.i18n import _ from nova.openstack.common import log as logging vmware_opts = cfg.IntOpt('maximum_objects', default=100, help='The maximum number of ObjectContent data ' ...
true
true
790a8617f84c30e29c8e29dee32a41b23c4f3615
2,250
py
Python
RAMP/disposableredis/__init__.py
MPalarya/RAMP
9792879e52b49586b06ac3fc002eab0c21c11bc6
[ "BSD-2-Clause" ]
null
null
null
RAMP/disposableredis/__init__.py
MPalarya/RAMP
9792879e52b49586b06ac3fc002eab0c21c11bc6
[ "BSD-2-Clause" ]
null
null
null
RAMP/disposableredis/__init__.py
MPalarya/RAMP
9792879e52b49586b06ac3fc002eab0c21c11bc6
[ "BSD-2-Clause" ]
null
null
null
import subprocess import socket import tempfile import redis import time import os import itertools import sys # Environment variable pointing to the redis executable REDIS_PATH_ENVVAR = 'REDIS_PATH' def get_random_port(): sock = socket.socket() sock.listen(0) _, port = sock.getsockname() sock.close(...
27.439024
112
0.569333
import subprocess import socket import tempfile import redis import time import os import itertools import sys REDIS_PATH_ENVVAR = 'REDIS_PATH' def get_random_port(): sock = socket.socket() sock.listen(0) _, port = sock.getsockname() sock.close() return port class DisposableRedis(object): ...
true
true
790a863e1b7c7976c78fdf15265431950cd90024
5,163
py
Python
espnet2/gan_tts/espnet_model.py
actboy/espnet
c0ca15e9da6e89ff6df5fe70ed08654deeca2ac0
[ "Apache-2.0" ]
null
null
null
espnet2/gan_tts/espnet_model.py
actboy/espnet
c0ca15e9da6e89ff6df5fe70ed08654deeca2ac0
[ "Apache-2.0" ]
1
2021-08-11T08:35:36.000Z
2021-08-13T07:12:47.000Z
espnet2/gan_tts/espnet_model.py
shirayu/espnet
66f0f8382b0e1195bed7c280c29711f8436b3db4
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Tomoki Hayashi # Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """GAN-based TTS ESPnet model.""" from contextlib import contextmanager from distutils.version import LooseVersion from typing import Any from typing import Dict from typing import Optional import torch from typeguard import...
35.363014
81
0.627929
from contextlib import contextmanager from distutils.version import LooseVersion from typing import Any from typing import Dict from typing import Optional import torch from typeguard import check_argument_types from espnet2.gan_tts.abs_gan_tts import AbsGANTTS from espnet2.layers.abs_normalize import AbsNormali...
true
true
790a86809267d0bf3803ad8266f5d236462f5f31
4,626
py
Python
homeassistant/components/github/coordinator.py
aomann/core
5e71e7b775461cd4849c36075c6a1459a7d0ad22
[ "Apache-2.0" ]
null
null
null
homeassistant/components/github/coordinator.py
aomann/core
5e71e7b775461cd4849c36075c6a1459a7d0ad22
[ "Apache-2.0" ]
24
2021-11-03T06:20:16.000Z
2022-03-31T06:23:17.000Z
homeassistant/components/github/coordinator.py
aomann/core
5e71e7b775461cd4849c36075c6a1459a7d0ad22
[ "Apache-2.0" ]
null
null
null
"""Custom data update coordinators for the GitHub integration.""" from __future__ import annotations from typing import Literal, TypedDict from aiogithubapi import ( GitHubAPI, GitHubCommitModel, GitHubException, GitHubReleaseModel, GitHubRepositoryModel, ) from homeassistant.config_entries impor...
32.577465
88
0.676827
from __future__ import annotations from typing import Literal, TypedDict from aiogithubapi import ( GitHubAPI, GitHubCommitModel, GitHubException, GitHubReleaseModel, GitHubRepositoryModel, ) from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant, T from...
true
true
790a87ee16722b26778f2467d7928438934aff0e
1,035
py
Python
examples/2in13-hello-world/test.py
piratebriggs/micropython-waveshare-epaper
cd3688656276fd1622f65cf3fae65017f4fe3cec
[ "MIT" ]
null
null
null
examples/2in13-hello-world/test.py
piratebriggs/micropython-waveshare-epaper
cd3688656276fd1622f65cf3fae65017f4fe3cec
[ "MIT" ]
null
null
null
examples/2in13-hello-world/test.py
piratebriggs/micropython-waveshare-epaper
cd3688656276fd1622f65cf3fae65017f4fe3cec
[ "MIT" ]
null
null
null
import epaper2in13 from machine import Pin,SPI from time import sleep_ms # SPI #2 on ESP32 spi = SPI(2,baudrate=2000000, polarity=0, phase=0) # miso=Pin(12), mosi=Pin(23), sck=Pin(18)) cs = Pin(5) dc = Pin(2) rst = Pin(15) busy = Pin(4) e = epaper2in13.EPD(spi, cs, dc, rst, busy) e.init(e.FULL_UPDATE) y_start = 6 ...
23
93
0.671498
import epaper2in13 from machine import Pin,SPI from time import sleep_ms 2,baudrate=2000000, polarity=0, phase=0) cs = Pin(5) dc = Pin(2) rst = Pin(15) busy = Pin(4) e = epaper2in13.EPD(spi, cs, dc, rst, busy) e.init(e.FULL_UPDATE) y_start = 6 import framebuf buf = bytearray(e.width * e.height // 8) fb = frameb...
true
true
790a87ee4b1cbb7e426d112803d5040a6008abca
3,908
py
Python
spare/wallet/wallet_interested_store.py
Spare-Network/spare-blockchain
9ea2677c73570131cfd02447b9cdc64cf01e0909
[ "Apache-2.0" ]
122
2021-06-18T23:51:22.000Z
2022-01-15T17:51:49.000Z
spare/wallet/wallet_interested_store.py
zcomputerwiz/spare-blockchain
c48fe41ac3b2aae2e76fce0e44ab0647530147ee
[ "Apache-2.0" ]
165
2021-06-18T23:12:20.000Z
2021-11-14T06:02:04.000Z
spare/wallet/wallet_interested_store.py
zcomputerwiz/spare-blockchain
c48fe41ac3b2aae2e76fce0e44ab0647530147ee
[ "Apache-2.0" ]
58
2021-06-18T23:10:50.000Z
2022-03-15T08:44:02.000Z
from typing import List, Tuple, Optional import aiosqlite from spare.types.blockchain_format.sized_bytes import bytes32 from spare.util.db_wrapper import DBWrapper class WalletInterestedStore: """ Stores coin ids that we are interested in receiving """ db_connection: aiosqlite.Connection db_wra...
38.313725
115
0.651228
from typing import List, Tuple, Optional import aiosqlite from spare.types.blockchain_format.sized_bytes import bytes32 from spare.util.db_wrapper import DBWrapper class WalletInterestedStore: db_connection: aiosqlite.Connection db_wrapper: DBWrapper @classmethod async def create(cls, wrapper: DBW...
true
true
790a88c4b4ff5f91bb3c1b5a2e0254f4d0d79507
732
pyw
Python
mPaintEditor/main.pyw
tbttfox/mPaintEditor
a62277a10088c384790bbe3a9cd93a09430abfd0
[ "MIT" ]
null
null
null
mPaintEditor/main.pyw
tbttfox/mPaintEditor
a62277a10088c384790bbe3a9cd93a09430abfd0
[ "MIT" ]
null
null
null
mPaintEditor/main.pyw
tbttfox/mPaintEditor
a62277a10088c384790bbe3a9cd93a09430abfd0
[ "MIT" ]
null
null
null
## # :namespace blurdev.mPaintEditor # # :remarks GUI to work with the paint in maya # # :author [author::email] # :author [author::company] # :date 03/22/17 # # make sure this is being run as the main process if __name__ in ("__main__", "__builtin__"): # since this file is ...
31.826087
112
0.688525
if __name__ in ("__main__", "__builtin__"): import blurdev blurdev.registerScriptPath(__file__) from mPaintEditor.paintEditorWidget import SkinPaintWin blurdev.launch(SkinPaintWin, instance=True)
true
true
790a89067bea003f40e96fb36818b84c4795b00a
17,078
py
Python
rqalpha/mod/rqalpha_mod_sys_accounts/position_model/future_position.py
HackReborn/rqalpha
ed64335675f7229f069f23812839c4780d55df67
[ "Apache-2.0" ]
null
null
null
rqalpha/mod/rqalpha_mod_sys_accounts/position_model/future_position.py
HackReborn/rqalpha
ed64335675f7229f069f23812839c4780d55df67
[ "Apache-2.0" ]
null
null
null
rqalpha/mod/rqalpha_mod_sys_accounts/position_model/future_position.py
HackReborn/rqalpha
ed64335675f7229f069f23812839c4780d55df67
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright 2017 Ricequant, 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 ...
35.285124
120
0.641293
from rqalpha.model.base_position import BasePosition from rqalpha.environment import Environment from rqalpha.const import SIDE, POSITION_EFFECT, DEFAULT_ACCOUNT_TYPE class FuturePosition(BasePosition): __abandon_properties__ = [] def __init__(self, order_book_id): super(FuturePositi...
true
true
790a8923219f3926b9522e1f7e477bc3a38453de
809
py
Python
ServerlessController/profiles/admin.py
pacslab/ChainFaaS
f99dd3753de21a93c61cc411b88b7ab2c5da9efe
[ "Apache-2.0" ]
7
2020-08-27T23:32:43.000Z
2022-02-18T12:08:50.000Z
ServerlessController/profiles/admin.py
pacslab/ChainFaaS
f99dd3753de21a93c61cc411b88b7ab2c5da9efe
[ "Apache-2.0" ]
6
2020-11-02T07:03:22.000Z
2021-06-10T19:58:48.000Z
ServerlessController/profiles/admin.py
pacslab/ChainFaaS
f99dd3753de21a93c61cc411b88b7ab2c5da9efe
[ "Apache-2.0" ]
2
2020-04-16T00:47:21.000Z
2021-04-27T07:45:52.000Z
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User from profiles.models import Developer, Provider class DeveloperInline(admin.StackedInline): model = Developer can_delete = False verbose_name_plural = 'Developer' fk_name = 'use...
26.096774
78
0.74042
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User from profiles.models import Developer, Provider class DeveloperInline(admin.StackedInline): model = Developer can_delete = False verbose_name_plural = 'Developer' fk_name = 'use...
true
true
790a8b8bc48ff92dce1875f35046719308d25602
9,340
py
Python
src/autoencoding_rl/latent_extractors/dyn_autoencoder/DynAutoencoder.py
c-rizz/autoencoding_rl
65775630e87184c8809a31a8ef980853d5b49f9f
[ "MIT" ]
null
null
null
src/autoencoding_rl/latent_extractors/dyn_autoencoder/DynAutoencoder.py
c-rizz/autoencoding_rl
65775630e87184c8809a31a8ef980853d5b49f9f
[ "MIT" ]
null
null
null
src/autoencoding_rl/latent_extractors/dyn_autoencoder/DynAutoencoder.py
c-rizz/autoencoding_rl
65775630e87184c8809a31a8ef980853d5b49f9f
[ "MIT" ]
null
null
null
from typing import Tuple import torch as th import torch.nn as nn from torchvision import transforms from autoencoding_rl.latent_extractors.autoencoder.SimpleEncoder import SimpleEncoder from autoencoding_rl.latent_extractors.autoencoder.SimpleDecoder import SimpleDecoder from autoencoding_rl.utils import Transition...
57.654321
287
0.678051
from typing import Tuple import torch as th import torch.nn as nn from torchvision import transforms from autoencoding_rl.latent_extractors.autoencoder.SimpleEncoder import SimpleEncoder from autoencoding_rl.latent_extractors.autoencoder.SimpleDecoder import SimpleDecoder from autoencoding_rl.utils import Transition...
true
true
790a8bb29bb0f5679c10a2428bc9b7410d3a2916
90
py
Python
vae/kpmtest.py
vipavlovic/pyprobml
59a2edc682d0163955db5e2f27491ad772b60141
[ "MIT" ]
4,895
2016-08-17T22:28:34.000Z
2022-03-31T17:07:15.000Z
vae/kpmtest.py
vipavlovic/pyprobml
59a2edc682d0163955db5e2f27491ad772b60141
[ "MIT" ]
446
2016-09-17T14:35:29.000Z
2022-03-31T19:59:33.000Z
vae/kpmtest.py
vipavlovic/pyprobml
59a2edc682d0163955db5e2f27491ad772b60141
[ "MIT" ]
1,160
2016-08-18T23:19:27.000Z
2022-03-31T12:44:07.000Z
import sys sys.path.append('../scripts') import pyprobml_utils as pml pml.test() print(42)
18
29
0.755556
import sys sys.path.append('../scripts') import pyprobml_utils as pml pml.test() print(42)
true
true
790a8c654a177355db1d8def9e1544123aa3fe09
517
py
Python
dp/climbing_stairs.py
vandesa003/leetcode_algo
8ebefef685cd25d8e149592f24e3552c8903504a
[ "MIT" ]
1
2022-03-23T01:33:42.000Z
2022-03-23T01:33:42.000Z
dp/climbing_stairs.py
vandesa003/leetcode_algo
8ebefef685cd25d8e149592f24e3552c8903504a
[ "MIT" ]
null
null
null
dp/climbing_stairs.py
vandesa003/leetcode_algo
8ebefef685cd25d8e149592f24e3552c8903504a
[ "MIT" ]
1
2020-07-24T03:32:30.000Z
2020-07-24T03:32:30.000Z
""" Leetcode 70. Climbing Stairs. DP. 类似斐波那契数列: 转移方程: f(n) = f(n-1) + f(n-2). 时间复杂度:O(n) 还是没看明白这跟DP有啥关系,就是递归而已。 """ class Solution: def climbStairs(self, n: int) -> int: res = [-1] * (n) def dfs(n): if n == 1: return 1 if n == 2: return 2 ...
19.148148
46
0.40619
class Solution: def climbStairs(self, n: int) -> int: res = [-1] * (n) def dfs(n): if n == 1: return 1 if n == 2: return 2 if res[n-1] == -1: res[n-1] = dfs(n-1) + dfs(n-2) return res[n-1] ...
true
true
790a8d02c44b35e70b9a71ad5e8829cc4a08db09
545
py
Python
redditcli/api/account.py
gobins/python-oauth2
2e486ef139569a1eca9275a8a7aa4447e210b29d
[ "Apache-2.0" ]
1
2015-07-31T03:05:52.000Z
2015-07-31T03:05:52.000Z
redditcli/api/account.py
gobins/python-oauth2
2e486ef139569a1eca9275a8a7aa4447e210b29d
[ "Apache-2.0" ]
null
null
null
redditcli/api/account.py
gobins/python-oauth2
2e486ef139569a1eca9275a8a7aa4447e210b29d
[ "Apache-2.0" ]
null
null
null
__author__ = 'Gobin' from redditcli.api import base class Account(base.Resource): resource_name = 'Account' class AccountManager(base.ResourceManager): resource_class = Account def me(self): return self._get('/api/v1/me') def getkarma(self): return self._get('/api/v1/me/karma') ...
20.961538
54
0.645872
__author__ = 'Gobin' from redditcli.api import base class Account(base.Resource): resource_name = 'Account' class AccountManager(base.ResourceManager): resource_class = Account def me(self): return self._get('/api/v1/me') def getkarma(self): return self._get('/api/v1/me/karma') ...
true
true
790a8d19143df62f0e2a574153286fa132a54004
860
py
Python
vc/migrations/0010_vcdomainprobvisioningconfig_vcfilter.py
xUndero/noc
9fb34627721149fcf7064860bd63887e38849131
[ "BSD-3-Clause" ]
1
2019-09-20T09:36:48.000Z
2019-09-20T09:36:48.000Z
vc/migrations/0010_vcdomainprobvisioningconfig_vcfilter.py
ewwwcha/noc
aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb
[ "BSD-3-Clause" ]
null
null
null
vc/migrations/0010_vcdomainprobvisioningconfig_vcfilter.py
ewwwcha/noc
aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # ---------------------------------------------------------------------- # vcdomainprovisioningconfig filter # ---------------------------------------------------------------------- # Copyright (C) 2007-2019 The NOC Project # See LICENSE for details # --------------------------------------------...
33.076923
99
0.495349
from django.db import models from noc.core.migration.base import BaseMigration class Migration(BaseMigration): def migrate(self): VCFilter = self.db.mock_model(model_name="VCFilter", db_table="vc_vcfilter") self.db.add_column( "vc_vcdomainprovisioningconfig", "vc...
true
true
790a8d3e219ee2a9d7df7c77d6ce7c72b979a675
75
py
Python
by-session/ta-921/j5/list7.py
amiraliakbari/sharif-mabani-python
5d14a08d165267fe71c28389ddbafe29af7078c5
[ "MIT" ]
2
2015-04-29T20:59:35.000Z
2018-09-26T13:33:43.000Z
by-session/ta-921/j5/list7.py
amiraliakbari/sharif-mabani-python
5d14a08d165267fe71c28389ddbafe29af7078c5
[ "MIT" ]
null
null
null
by-session/ta-921/j5/list7.py
amiraliakbari/sharif-mabani-python
5d14a08d165267fe71c28389ddbafe29af7078c5
[ "MIT" ]
null
null
null
a = [1, 1] for i in range(10): a.append(a[-1] + a[-2]) print a
10.714286
28
0.44
a = [1, 1] for i in range(10): a.append(a[-1] + a[-2]) print a
false
true
790a8f875b8cada0652f2a4c5df93f78340feb26
6,654
py
Python
dival/reconstructors/dip_ct_reconstructor.py
MBaltz/dival
b7c10ed471d05242312a7d4916900c92e0c36cdb
[ "MIT" ]
42
2019-08-06T11:41:14.000Z
2022-03-21T08:57:41.000Z
dival/reconstructors/dip_ct_reconstructor.py
MBaltz/dival
b7c10ed471d05242312a7d4916900c92e0c36cdb
[ "MIT" ]
17
2019-12-03T22:02:32.000Z
2021-09-04T07:29:46.000Z
dival/reconstructors/dip_ct_reconstructor.py
MBaltz/dival
b7c10ed471d05242312a7d4916900c92e0c36cdb
[ "MIT" ]
8
2019-10-07T09:21:55.000Z
2022-02-24T09:08:01.000Z
from warnings import warn from functools import partial from tqdm import tqdm import torch import numpy as np from torch.optim import Adam from torch.nn import MSELoss from odl.contrib.torch import OperatorModule from dival.reconstructors import IterativeReconstructor from dival.reconstructors.networks.unet import U...
37.382022
79
0.585512
from warnings import warn from functools import partial from tqdm import tqdm import torch import numpy as np from torch.optim import Adam from torch.nn import MSELoss from odl.contrib.torch import OperatorModule from dival.reconstructors import IterativeReconstructor from dival.reconstructors.networks.unet import U...
true
true
790a90d9e219283d15ab2f1ac1cc2c1fb3f96444
31,894
py
Python
tests/filtered_relation/tests.py
jpmallarino/django
659d2421c7adbbcd205604002d521d82d6b0b465
[ "BSD-3-Clause", "0BSD" ]
2
2022-02-22T17:20:19.000Z
2022-03-01T16:06:56.000Z
tests/filtered_relation/tests.py
jpmallarino/django
659d2421c7adbbcd205604002d521d82d6b0b465
[ "BSD-3-Clause", "0BSD" ]
1
2022-02-20T18:28:13.000Z
2022-02-20T18:32:04.000Z
tests/filtered_relation/tests.py
jpmallarino/django
659d2421c7adbbcd205604002d521d82d6b0b465
[ "BSD-3-Clause", "0BSD" ]
null
null
null
from datetime import date from decimal import Decimal from unittest import mock from django.db import connection, transaction from django.db.models import ( Case, Count, DecimalField, F, FilteredRelation, Q, Sum, When, ) from django.test import TestCase from django.test.testcases import...
35.241989
87
0.512949
from datetime import date from decimal import Decimal from unittest import mock from django.db import connection, transaction from django.db.models import ( Case, Count, DecimalField, F, FilteredRelation, Q, Sum, When, ) from django.test import TestCase from django.test.testcases import...
true
true
790a9126e29b6c50e4391ee0400fa8815cca49d9
842
py
Python
api/tests/opentrons/data/testosaur_v3.py
Opentrons/protocol_framework
ebbd6b2fe984edd6ecfcbf1dbe040db7f7356b9f
[ "Apache-2.0" ]
2
2015-11-10T17:49:51.000Z
2016-01-15T04:43:37.000Z
api/tests/opentrons/data/testosaur_v3.py
Opentrons/labware
e21d8db51eac5818477264a45ef12c0a2d15fb72
[ "Apache-2.0" ]
null
null
null
api/tests/opentrons/data/testosaur_v3.py
Opentrons/labware
e21d8db51eac5818477264a45ef12c0a2d15fb72
[ "Apache-2.0" ]
null
null
null
from opentrons import protocol_api, types metadata = { "protocolName": "Testosaur Version 3", "author": "Opentrons <engineering@opentrons.com>", "description": 'A variant on "Dinosaur" for testing with Protocol API v3', "source": "Opentrons Repository", "apiLevel": "3.0", } def run(ctx: protocol_...
35.083333
78
0.690024
from opentrons import protocol_api, types metadata = { "protocolName": "Testosaur Version 3", "author": "Opentrons <engineering@opentrons.com>", "description": 'A variant on "Dinosaur" for testing with Protocol API v3', "source": "Opentrons Repository", "apiLevel": "3.0", } def run(ctx: protocol_...
true
true
790a9147e54633c23691d9a2d89b436a975cd3e9
27,227
py
Python
openbci/wifi.py
kaherdin-reed/thinkingCap
069bbcb9167261d687ec37206d1d2f59ace137d8
[ "MIT" ]
null
null
null
openbci/wifi.py
kaherdin-reed/thinkingCap
069bbcb9167261d687ec37206d1d2f59ace137d8
[ "MIT" ]
null
null
null
openbci/wifi.py
kaherdin-reed/thinkingCap
069bbcb9167261d687ec37206d1d2f59ace137d8
[ "MIT" ]
null
null
null
""" Core OpenBCI object for handling connections and samples from the WiFi Shield Note that the LIB will take care on its own to print incoming ASCII messages if any (FIXME, BTW). EXAMPLE USE: def handle_sample(sample): print(sample.channels_data) wifi = OpenBCIWifi() wifi.start(handle_sample) TODO: Cyton/Gangli...
39.516691
189
0.551585
import asyncore import atexit import json import logging import re import socket import timeit try: import urllib2 except ImportError: import urllib import requests import xmltodict from openbci.utils import k, ParseRaw, OpenBCISample, ssdp SAMPLE_RATE = 0 class OpenBCIWiFi(object): def __init__(se...
true
true
790a921f2ad52d53457d98e97130c1978705ad61
4,748
py
Python
python-data-analysis/2019-nCoV-global/global_map.py
meteor1993/python-learning
4ee574c9360caf6e63bb6ee2ef31fa6a9918fa40
[ "MIT" ]
83
2019-10-15T06:54:06.000Z
2022-03-28T14:08:21.000Z
python-data-analysis/2019-nCoV-global/global_map.py
wenxuefeng3930/python-learning
4ee574c9360caf6e63bb6ee2ef31fa6a9918fa40
[ "MIT" ]
1
2020-04-16T08:13:19.000Z
2020-07-14T01:52:46.000Z
python-data-analysis/2019-nCoV-global/global_map.py
wenxuefeng3930/python-learning
4ee574c9360caf6e63bb6ee2ef31fa6a9918fa40
[ "MIT" ]
74
2019-11-02T08:10:36.000Z
2022-02-19T12:23:36.000Z
from pyecharts import options as opts from pyecharts.charts import Map import pandas as pd import namemap def read_country_code(): """ 获取国家中英文字典 :return: """ country_dict = {} for key, val in namemap.nameMap.items(): # 将 nameMap 列表里面键值互换 country_dict[val] = key return ...
60.101266
1,829
0.624684
from pyecharts import options as opts from pyecharts.charts import Map import pandas as pd import namemap def read_country_code(): country_dict = {} for key, val in namemap.nameMap.items(): country_dict[val] = key return country_dict def read_csv(): country_dict = read_country_cod...
true
true
790a9231b616b2ff50de6c1b6afc57bc29343260
2,186
py
Python
docs/image-registration.py
santosh653/dtcwt
01d9e87dc9abfa244a89c1f05aebf3dec6999f3a
[ "BSD-2-Clause" ]
61
2015-01-04T09:21:29.000Z
2022-03-07T16:25:02.000Z
docs/image-registration.py
santosh653/dtcwt
01d9e87dc9abfa244a89c1f05aebf3dec6999f3a
[ "BSD-2-Clause" ]
17
2015-04-02T13:37:07.000Z
2018-03-07T09:57:57.000Z
docs/image-registration.py
santosh653/dtcwt
01d9e87dc9abfa244a89c1f05aebf3dec6999f3a
[ "BSD-2-Clause" ]
26
2015-04-16T06:22:16.000Z
2021-12-07T09:17:44.000Z
#!/usr/bin/env python """ An example of image registration via the DTCWT. This script demonstrates some methods for image registration using the DTCWT. """ from __future__ import division, print_function import itertools import logging import os from matplotlib.pyplot import * import numpy as np import dtcwt from...
26.987654
84
0.677036
from __future__ import division, print_function import itertools import logging import os from matplotlib.pyplot import * import numpy as np import dtcwt from dtcwt.numpy import Transform2d import dtcwt.sampling from dtcwt.registration import * logging.basicConfig(level=logging.INFO) import datasets def registe...
true
true
790a92bb022245a3ec764ff48c44fb42a1a17a3b
41
py
Python
sklearn_plus/preprocessing/text/en/__init__.py
liuxiaoan8008/sklearn-plus
67258f6c9b833c82c2ffa2ec062fc2cc686b3004
[ "MIT" ]
null
null
null
sklearn_plus/preprocessing/text/en/__init__.py
liuxiaoan8008/sklearn-plus
67258f6c9b833c82c2ffa2ec062fc2cc686b3004
[ "MIT" ]
null
null
null
sklearn_plus/preprocessing/text/en/__init__.py
liuxiaoan8008/sklearn-plus
67258f6c9b833c82c2ffa2ec062fc2cc686b3004
[ "MIT" ]
null
null
null
from punc_tokenizer import PuncTokenizer
20.5
40
0.902439
from punc_tokenizer import PuncTokenizer
true
true
790a92c9d40d91364e19a32e1de7ea417b16ae5e
1,227
py
Python
datahub/search/company/apps.py
reupen/data-hub-api
d854188f4c45da0e89075add132a15bb1227ff79
[ "MIT" ]
null
null
null
datahub/search/company/apps.py
reupen/data-hub-api
d854188f4c45da0e89075add132a15bb1227ff79
[ "MIT" ]
16
2020-04-01T15:25:35.000Z
2020-04-14T14:07:30.000Z
datahub/search/company/apps.py
reupen/data-hub-api
d854188f4c45da0e89075add132a15bb1227ff79
[ "MIT" ]
null
null
null
from django.db.models import Max from datahub.company.models import Company as DBCompany, CompanyPermission from datahub.core.query_utils import get_aggregate_subquery from datahub.search.apps import SearchApp from datahub.search.company.models import Company class CompanySearchApp(SearchApp): """SearchApp for c...
30.675
74
0.685412
from django.db.models import Max from datahub.company.models import Company as DBCompany, CompanyPermission from datahub.core.query_utils import get_aggregate_subquery from datahub.search.apps import SearchApp from datahub.search.company.models import Company class CompanySearchApp(SearchApp): name = 'company' ...
true
true
790a9301f2baeb8df509ef35cb9ef110a6f784d6
196
py
Python
celery/loaders/app.py
frac/celery
b6b32ca9a951e81722c52412c3f8a1cff67109dd
[ "BSD-3-Clause" ]
1
2015-11-05T02:49:59.000Z
2015-11-05T02:49:59.000Z
celery/loaders/app.py
frac/celery
b6b32ca9a951e81722c52412c3f8a1cff67109dd
[ "BSD-3-Clause" ]
null
null
null
celery/loaders/app.py
frac/celery
b6b32ca9a951e81722c52412c3f8a1cff67109dd
[ "BSD-3-Clause" ]
null
null
null
from celery.loaders.base import BaseLoader class AppLoader(BaseLoader): def on_worker_init(self): self.import_default_modules() def read_configuration(self): return {}
17.818182
42
0.709184
from celery.loaders.base import BaseLoader class AppLoader(BaseLoader): def on_worker_init(self): self.import_default_modules() def read_configuration(self): return {}
true
true
790a93b9dbec3f8bad62494a7ec8393de3b647ea
2,956
py
Python
desktop/core/ext-py/dnspython-1.15.0/dns/rdtypes/ANY/TLSA.py
kokosing/hue
2307f5379a35aae9be871e836432e6f45138b3d9
[ "Apache-2.0" ]
5,079
2015-01-01T03:39:46.000Z
2022-03-31T07:38:22.000Z
desktop/core/ext-py/dnspython-1.15.0/dns/rdtypes/ANY/TLSA.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
1,623
2015-01-01T08:06:24.000Z
2022-03-30T19:48:52.000Z
desktop/core/ext-py/dnspython-1.15.0/dns/rdtypes/ANY/TLSA.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
2,033
2015-01-04T07:18:02.000Z
2022-03-28T19:55:47.000Z
# Copyright (C) 2005-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
35.614458
75
0.624154
import struct import binascii import dns.rdata import dns.rdatatype class TLSA(dns.rdata.Rdata): __slots__ = ['usage', 'selector', 'mtype', 'cert'] def __init__(self, rdclass, rdtype, usage, selector, mtype, cert): super(TLSA, self).__init__(rdclass, rdtype) ...
true
true
790a96999cf24260897ce867889a3d312cf4ed97
2,944
py
Python
operators/compositor_nodetree.py
MarcoHoo/RenderStackNode
e9624ccd4ebd4f72bd5b332205574bb053dbcb8d
[ "Apache-2.0" ]
null
null
null
operators/compositor_nodetree.py
MarcoHoo/RenderStackNode
e9624ccd4ebd4f72bd5b332205574bb053dbcb8d
[ "Apache-2.0" ]
null
null
null
operators/compositor_nodetree.py
MarcoHoo/RenderStackNode
e9624ccd4ebd4f72bd5b332205574bb053dbcb8d
[ "Apache-2.0" ]
null
null
null
import bpy from bpy.props import BoolProperty, StringProperty import os from ..preferences import get_pref class RSN_OT_CreatCompositorNode(bpy.types.Operator): bl_idname = "rsn.creat_compositor_node" bl_label = "Separate Passes" use_passes: BoolProperty(default=False) view_layer: StringProperty(def...
35.047619
101
0.647758
import bpy from bpy.props import BoolProperty, StringProperty import os from ..preferences import get_pref class RSN_OT_CreatCompositorNode(bpy.types.Operator): bl_idname = "rsn.creat_compositor_node" bl_label = "Separate Passes" use_passes: BoolProperty(default=False) view_layer: StringProperty(def...
true
true
790a97a803f54aad4dd9e368e5882e838b11e592
1,141
py
Python
backend/permissions/roles/p30_normal_user.py
chalvern/Icarus
6b745f739d0c5ad218a97a05cd1e00669a5b2297
[ "Zlib" ]
null
null
null
backend/permissions/roles/p30_normal_user.py
chalvern/Icarus
6b745f739d0c5ad218a97a05cd1e00669a5b2297
[ "Zlib" ]
null
null
null
backend/permissions/roles/p30_normal_user.py
chalvern/Icarus
6b745f739d0c5ad218a97a05cd1e00669a5b2297
[ "Zlib" ]
null
null
null
from permissions.roles.p10_visitor import merge_post_permissions_of_visitor from permissions.roles.p20_inactive_user import inactive_user from slim.base.permission import Ability, A, DataRecord normal_user = Ability('user', { 'user': { 'nickname': (A.QUERY, A.READ), 'group': (A.READ,), 'bio...
33.558824
75
0.560911
from permissions.roles.p10_visitor import merge_post_permissions_of_visitor from permissions.roles.p20_inactive_user import inactive_user from slim.base.permission import Ability, A, DataRecord normal_user = Ability('user', { 'user': { 'nickname': (A.QUERY, A.READ), 'group': (A.READ,), 'bio...
true
true
790a99e9b6fa5300ff649e42a1d71a3afc275e76
644
py
Python
jbank/migrations/0025_auto_20181101_1430.py
bachvtuan/django-jbank
1b384936d93b802d92442167efca292d2aaa2f47
[ "MIT" ]
null
null
null
jbank/migrations/0025_auto_20181101_1430.py
bachvtuan/django-jbank
1b384936d93b802d92442167efca292d2aaa2f47
[ "MIT" ]
2
2020-11-05T17:30:12.000Z
2021-02-24T23:54:35.000Z
jbank/migrations/0025_auto_20181101_1430.py
bachvtuan/django-jbank
1b384936d93b802d92442167efca292d2aaa2f47
[ "MIT" ]
1
2021-12-16T09:27:04.000Z
2021-12-16T09:27:04.000Z
# Generated by Django 2.1.2 on 2018-11-01 14:30 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("jbank", "0024_auto_20180425_1704"), ] operations = [ migrations.AddField( model_name="payout", name="reference", ...
26.833333
110
0.604037
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("jbank", "0024_auto_20180425_1704"), ] operations = [ migrations.AddField( model_name="payout", name="reference", field=models.CharField(blank=True, def...
true
true
790a9a8b489c409c977952f06eb57ba64fd7ab60
2,428
py
Python
config/config1_3_add_server_1.py
subincm/chain_replication
536522c011d2f0d31b6f0ce9c79d004723507aa8
[ "Apache-2.0" ]
null
null
null
config/config1_3_add_server_1.py
subincm/chain_replication
536522c011d2f0d31b6f0ce9c79d004723507aa8
[ "Apache-2.0" ]
null
null
null
config/config1_3_add_server_1.py
subincm/chain_replication
536522c011d2f0d31b6f0ce9c79d004723507aa8
[ "Apache-2.0" ]
null
null
null
############################################################################### # 1) This is a test case to verify that the deposit case works fine. # 2) It also checks whether duplicate requests are processed correctly. ############################################################################### ############...
47.607843
141
0.536656
true
true
790a9b877b44a2d9ca1215d426930ff3cc456e34
15,454
py
Python
setup.py
OCHA-DAP/hdx-ckan
202e0c44adc4ea8d0b90141e69365b65cce68672
[ "Apache-2.0" ]
58
2015-01-11T09:05:15.000Z
2022-03-17T23:44:07.000Z
setup.py
OCHA-DAP/hdx-ckan
202e0c44adc4ea8d0b90141e69365b65cce68672
[ "Apache-2.0" ]
1,467
2015-01-01T16:47:44.000Z
2022-02-28T16:51:20.000Z
setup.py
OCHA-DAP/hdx-ckan
202e0c44adc4ea8d0b90141e69365b65cce68672
[ "Apache-2.0" ]
17
2015-05-06T14:04:21.000Z
2021-11-11T19:58:16.000Z
# encoding: utf-8 import os import os.path from pkg_resources import parse_version # Avoid problem releasing to pypi from vagrant if os.environ.get('USER', '') == 'vagrant': del os.link try: from setuptools import (setup, find_packages, __version__ as setuptools_version) except I...
60.603922
151
0.752103
import os import os.path from pkg_resources import parse_version if os.environ.get('USER', '') == 'vagrant': del os.link try: from setuptools import (setup, find_packages, __version__ as setuptools_version) except ImportError: from ez_setup import use_setuptools use_set...
true
true
790a9bc1921b8abaa9ff05bbcbd5651e42f1573d
4,952
py
Python
tqsdk/utils.py
aManOf502/tqsdk-python
70d0e30ad4ceda04f08a8125d9c45d4096542f4c
[ "Apache-2.0" ]
1
2021-12-15T11:30:40.000Z
2021-12-15T11:30:40.000Z
tqsdk/utils.py
YountMan/tqsdk-python
b766b45bb82c89a0401a6a84e0e42600fa10e6f4
[ "Apache-2.0" ]
null
null
null
tqsdk/utils.py
YountMan/tqsdk-python
b766b45bb82c89a0401a6a84e0e42600fa10e6f4
[ "Apache-2.0" ]
null
null
null
#!usr/bin/env python3 # -*- coding:utf-8 -*- __author__ = 'yanqiong' import random import secrets from bisect import bisect_right from sgqlc.operation import Operation from pandas.core.internals import BlockManager from tqsdk.ins_schema import ins_schema, _add_all_frags RD = random.Random(secrets.randbits(128)) #...
35.120567
108
0.577948
__author__ = 'yanqiong' import random import secrets from bisect import bisect_right from sgqlc.operation import Operation from pandas.core.internals import BlockManager from tqsdk.ins_schema import ins_schema, _add_all_frags RD = random.Random(secrets.randbits(128)) def _generate_uuid(prefix=''): return...
true
true
790a9ef82489f2eb229ae3eda1e87ccd2595023f
314
py
Python
src/GUI/GUI.py
Steins7/MyLittleERP
f0220196136c1a0eff5dd7de469dfdb3466c1d5d
[ "MIT" ]
null
null
null
src/GUI/GUI.py
Steins7/MyLittleERP
f0220196136c1a0eff5dd7de469dfdb3466c1d5d
[ "MIT" ]
null
null
null
src/GUI/GUI.py
Steins7/MyLittleERP
f0220196136c1a0eff5dd7de469dfdb3466c1d5d
[ "MIT" ]
1
2019-06-03T21:18:21.000Z
2019-06-03T21:18:21.000Z
import sys from PySide2.QtWidgets import QApplication,QWidget,QMenuBar,QPushButton,QVBoxLayout,QMainWindow from MainWindow import MainWindow def start(): app = QApplication(sys.argv) app.setApplicationName("My Little ERP") mainWindow = MainWindow(app) mainWindow.show() sys.exit(app.exec_())
26.166667
95
0.761146
import sys from PySide2.QtWidgets import QApplication,QWidget,QMenuBar,QPushButton,QVBoxLayout,QMainWindow from MainWindow import MainWindow def start(): app = QApplication(sys.argv) app.setApplicationName("My Little ERP") mainWindow = MainWindow(app) mainWindow.show() sys.exit(app.exec_())
true
true
790a9f8431be3a86d2d663827b7717d5cbf6b143
11,724
py
Python
src/python/WMCore/Services/PhEDEx/DataStructs/SubscriptionList.py
cbbrainerd/WMCore
317969fdcfbfbb957e74aa1b45f92408d05a09a8
[ "Apache-2.0" ]
null
null
null
src/python/WMCore/Services/PhEDEx/DataStructs/SubscriptionList.py
cbbrainerd/WMCore
317969fdcfbfbb957e74aa1b45f92408d05a09a8
[ "Apache-2.0" ]
1
2016-10-13T14:57:35.000Z
2016-10-13T14:57:35.000Z
src/python/WMCore/Services/PhEDEx/DataStructs/SubscriptionList.py
juztas/WMCore
f7e830a573d50fb1d7240797f18d809f994b934d
[ "Apache-2.0" ]
null
null
null
""" _SubscriptionList_ Module with data structures to handle PhEDEx subscriptions in bulk. """ import logging from WMCore.WMException import WMException PhEDEx_VALID_SUBSCRIPTION_PRIORITIES = ['low', 'normal', 'high', 'reserved'] class PhEDExSubscriptionException(WMException): """ _PhEDExSubscriptionExcept...
38.821192
101
0.594336
import logging from WMCore.WMException import WMException PhEDEx_VALID_SUBSCRIPTION_PRIORITIES = ['low', 'normal', 'high', 'reserved'] class PhEDExSubscriptionException(WMException): pass class PhEDExSubscription(object): def __init__(self, datasetPathList, nodeList, group, level = 'dataset', ...
true
true
790aa1f3d52f53fc6f2c40a5e5a4c043defca4a4
113,777
py
Python
dcase_util/datasets/tut.py
ankitshah009/dcase_util
738571ce78faf60b0fdfa1d59fd42f42c8944f3d
[ "MIT" ]
null
null
null
dcase_util/datasets/tut.py
ankitshah009/dcase_util
738571ce78faf60b0fdfa1d59fd42f42c8944f3d
[ "MIT" ]
null
null
null
dcase_util/datasets/tut.py
ankitshah009/dcase_util
738571ce78faf60b0fdfa1d59fd42f42c8944f3d
[ "MIT" ]
null
null
null
# !/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function, absolute_import import collections import hashlib import os import pickle import sys import numpy import yaml from six import iteritems from tqdm import tqdm from dcase_util.datasets import AcousticSceneDataset, SyntheticSoundEve...
36.916613
124
0.543801
from __future__ import print_function, absolute_import import collections import hashlib import os import pickle import sys import numpy import yaml from six import iteritems from tqdm import tqdm from dcase_util.datasets import AcousticSceneDataset, SyntheticSoundEventDataset, SoundEventDataset from dcase_util....
true
true
790aa33d7aa90375177f9e9b7d434c02fd3dee2b
2,766
py
Python
cart/migrations/0001_initial.py
theonlykingpin/snapfoodclone
0c1a7839424e89d9bc7bfb55c150a92055759702
[ "MIT" ]
11
2021-09-17T07:44:05.000Z
2022-02-06T08:33:30.000Z
cart/migrations/0001_initial.py
theonlykingpin/snapfoodclone
0c1a7839424e89d9bc7bfb55c150a92055759702
[ "MIT" ]
1
2021-10-09T07:37:14.000Z
2021-10-09T07:37:14.000Z
cart/migrations/0001_initial.py
theonlykingpin/snapfoodclone
0c1a7839424e89d9bc7bfb55c150a92055759702
[ "MIT" ]
3
2021-09-27T14:12:13.000Z
2021-10-18T12:21:37.000Z
# Generated by Django 3.2 on 2021-09-07 12:46 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('payment', '0002_alter_invoice_address'), ('item', '0002_alter_item_upc'), ('accounts', '00...
51.222222
187
0.606652
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('payment', '0002_alter_invoice_address'), ('item', '0002_alter_item_upc'), ('accounts', '0002_auto_20210831_0046'), ('service', ...
true
true
790aa3522fd3ff8ce700562975062d5b973be574
193
py
Python
python/chap_1/1.4.3.py
RyodoTanaka/Cording_Matrix
7d357266c0b659495f226000418e9cdaee133ebf
[ "BSD-3-Clause" ]
null
null
null
python/chap_1/1.4.3.py
RyodoTanaka/Cording_Matrix
7d357266c0b659495f226000418e9cdaee133ebf
[ "BSD-3-Clause" ]
null
null
null
python/chap_1/1.4.3.py
RyodoTanaka/Cording_Matrix
7d357266c0b659495f226000418e9cdaee133ebf
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import cplotting as cplot S={2+2j, 3+2j, 1.75+1j, 2+1j, 2.25+1j, 2.5+1j, 2.75+1j, 3+1j, 3.25+1j} cplot.plot({1+2j+z for z in S},4) cplot.show()
19.3
70
0.590674
import cplotting as cplot S={2+2j, 3+2j, 1.75+1j, 2+1j, 2.25+1j, 2.5+1j, 2.75+1j, 3+1j, 3.25+1j} cplot.plot({1+2j+z for z in S},4) cplot.show()
true
true
790aa38bfe25fb8993b276dd925cb65f95a11ac6
4,225
py
Python
flask_app/events/aws/sqs.py
andersoncontreira/flask-skeleton-python
4a3087cf94f387830850dc438338251da86c3cfb
[ "MIT" ]
1
2021-08-11T21:29:50.000Z
2021-08-11T21:29:50.000Z
flask_app/events/aws/sqs.py
andersoncontreira/flask-skeleton-python
4a3087cf94f387830850dc438338251da86c3cfb
[ "MIT" ]
null
null
null
flask_app/events/aws/sqs.py
andersoncontreira/flask-skeleton-python
4a3087cf94f387830850dc438338251da86c3cfb
[ "MIT" ]
null
null
null
import json import os from flask_app.config import get_config from flask_app.logging import get_logger import boto3 class SQSEvents: def __init__(self, logger=None, config=None): # logger self.logger = logger if logger is not None else get_logger() # configurations self.config = ...
29.964539
103
0.550296
import json import os from flask_app.config import get_config from flask_app.logging import get_logger import boto3 class SQSEvents: def __init__(self, logger=None, config=None): self.logger = logger if logger is not None else get_logger() self.config = config if config is not ...
true
true
790aa405529a3e3ce8a0371e0b6ea0ba805d6c37
257,820
py
Python
zerver/lib/actions.py
luisogandob/zulip
f6667b8e80b4658b8d2a5ae6b3f0c9d6eac4a2d6
[ "Apache-2.0" ]
null
null
null
zerver/lib/actions.py
luisogandob/zulip
f6667b8e80b4658b8d2a5ae6b3f0c9d6eac4a2d6
[ "Apache-2.0" ]
null
null
null
zerver/lib/actions.py
luisogandob/zulip
f6667b8e80b4658b8d2a5ae6b3f0c9d6eac4a2d6
[ "Apache-2.0" ]
null
null
null
import datetime import itertools import logging import os import platform import time from collections import defaultdict from operator import itemgetter from typing import ( AbstractSet, Any, Callable, Dict, Iterable, List, Mapping, MutableMapping, Optional, Sequence, Set, ...
43.178697
133
0.659801
import datetime import itertools import logging import os import platform import time from collections import defaultdict from operator import itemgetter from typing import ( AbstractSet, Any, Callable, Dict, Iterable, List, Mapping, MutableMapping, Optional, Sequence, Set, ...
true
true
790aa421218d62214a81cc86a6532080e6d6f121
1,625
py
Python
Semana10/Dia5/alumnos/alumnos1/models.py
GuidoTorres/codigo8
7fdff4f677f048de7d7877b96ec3a688d3dde163
[ "MIT" ]
null
null
null
Semana10/Dia5/alumnos/alumnos1/models.py
GuidoTorres/codigo8
7fdff4f677f048de7d7877b96ec3a688d3dde163
[ "MIT" ]
40
2021-03-10T16:58:17.000Z
2022-03-26T01:55:17.000Z
Semana10/Dia5/ejercicio/Alumnos1/alumnos/alumnos/models.py
GuidoTorres/codigo8
7fdff4f677f048de7d7877b96ec3a688d3dde163
[ "MIT" ]
null
null
null
from django.db import models class alumno(models.Model): alum_id = models.AutoField(primary_key=True) alum_nom = models.CharField(max_length=100, help_text="Nombre del alumno", unique=True) alum_ape = models.CharField(max_length=100, help_text="Apellido del alumno", unique=True) def __str__(s...
27.083333
93
0.659692
from django.db import models class alumno(models.Model): alum_id = models.AutoField(primary_key=True) alum_nom = models.CharField(max_length=100, help_text="Nombre del alumno", unique=True) alum_ape = models.CharField(max_length=100, help_text="Apellido del alumno", unique=True) def __str__(s...
true
true
790aa4b6524a5dc2dda6c02eb04c91967046a988
7,337
py
Python
python/ray/rllib/agents/ppo/ppo.py
FieldMrFive/ray
a22d6ef95594a3b95fac5b2eb17f7f21be2888e8
[ "Apache-2.0" ]
3
2019-05-01T04:31:20.000Z
2021-03-01T09:25:36.000Z
python/ray/rllib/agents/ppo/ppo.py
FieldMrFive/ray
a22d6ef95594a3b95fac5b2eb17f7f21be2888e8
[ "Apache-2.0" ]
2
2019-01-28T00:31:25.000Z
2019-11-26T16:57:06.000Z
python/ray/rllib/agents/ppo/ppo.py
FieldMrFive/ray
a22d6ef95594a3b95fac5b2eb17f7f21be2888e8
[ "Apache-2.0" ]
2
2020-03-26T16:32:08.000Z
2021-02-05T17:04:11.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function import logging from ray.rllib.agents import Agent, with_common_config from ray.rllib.agents.ppo.ppo_policy_graph import PPOPolicyGraph from ray.rllib.optimizers import SyncSamplesOptimizer, LocalMultiGPUOptimi...
42.410405
79
0.622189
from __future__ import absolute_import from __future__ import division from __future__ import print_function import logging from ray.rllib.agents import Agent, with_common_config from ray.rllib.agents.ppo.ppo_policy_graph import PPOPolicyGraph from ray.rllib.optimizers import SyncSamplesOptimizer, LocalMultiGPUOptimi...
true
true
790aa74297f52abe851147e32cdcf5b1a7552301
1,343
py
Python
src/snake/Entities/Globals.py
willemserruys/Snake
5302b02e6f7bf04561e97bf001f758e6ddbaa17b
[ "MIT" ]
null
null
null
src/snake/Entities/Globals.py
willemserruys/Snake
5302b02e6f7bf04561e97bf001f758e6ddbaa17b
[ "MIT" ]
null
null
null
src/snake/Entities/Globals.py
willemserruys/Snake
5302b02e6f7bf04561e97bf001f758e6ddbaa17b
[ "MIT" ]
null
null
null
from odroid_go import GO from .Block import Block from .Snake import Snake SNAKE_COLOR = GO.lcd.colors.GREEN BACKGROUND_COLOR = GO.lcd.colors.BLACK FOOD_COLOR = GO.lcd.colors.RED BORDER_COLOR = GO.lcd.colors.WHITE SCREEN_WIDTH = 320 SCREEN_HEIGHT = 240 BLOCK_SIZE = 10 #Where borders are drawn INIT_X = 0 INIT_Y = 20 ...
23.155172
116
0.711095
from odroid_go import GO from .Block import Block from .Snake import Snake SNAKE_COLOR = GO.lcd.colors.GREEN BACKGROUND_COLOR = GO.lcd.colors.BLACK FOOD_COLOR = GO.lcd.colors.RED BORDER_COLOR = GO.lcd.colors.WHITE SCREEN_WIDTH = 320 SCREEN_HEIGHT = 240 BLOCK_SIZE = 10 INIT_X = 0 INIT_Y = 20 SNAKEINIT_X = 40 SNAKE...
true
true
790aa754ceaf63de41c7c0932667cbb8a8307095
314
py
Python
gunicorn/gunicorn_config.py
techstreets/django-prod
93ecee5823ef2e0d9337dae0cba0879758d936c4
[ "MIT" ]
1
2017-09-11T14:46:54.000Z
2017-09-11T14:46:54.000Z
gunicorn/gunicorn_config.py
techstreets/django-prod
93ecee5823ef2e0d9337dae0cba0879758d936c4
[ "MIT" ]
null
null
null
gunicorn/gunicorn_config.py
techstreets/django-prod
93ecee5823ef2e0d9337dae0cba0879758d936c4
[ "MIT" ]
null
null
null
import os import multiprocessing def num_cpus(): cpus = 0 try: cpus = os.sysconf("SC_NPROCESSORS_ONLN") except: cpus = multiprocessing.cpu_count() return cpus or 3 name = 'django' bind = '0.0.0.0:8000' workers = num_cpus() * 2 + 1 debug = True daemon = False loglevel = 'debug'
15.7
48
0.633758
import os import multiprocessing def num_cpus(): cpus = 0 try: cpus = os.sysconf("SC_NPROCESSORS_ONLN") except: cpus = multiprocessing.cpu_count() return cpus or 3 name = 'django' bind = '0.0.0.0:8000' workers = num_cpus() * 2 + 1 debug = True daemon = False loglevel = 'debug'
true
true
790aa7df83a824a6efe5541f4b8d3b59132333f9
2,679
py
Python
scripts/fsmt/fsmt-make-super-tiny-model.py
agemagician/transformers
666220fc6417505607148ffb19d172d5732e860a
[ "Apache-2.0" ]
2
2020-11-30T11:30:40.000Z
2021-03-26T17:20:33.000Z
scripts/fsmt/fsmt-make-super-tiny-model.py
agemagician/transformers
666220fc6417505607148ffb19d172d5732e860a
[ "Apache-2.0" ]
3
2021-06-08T23:15:29.000Z
2022-01-13T03:40:10.000Z
scripts/fsmt/fsmt-make-super-tiny-model.py
agemagician/transformers
666220fc6417505607148ffb19d172d5732e860a
[ "Apache-2.0" ]
1
2020-11-17T02:48:00.000Z
2020-11-17T02:48:00.000Z
#!/usr/bin/env python # coding: utf-8 # This script creates a super tiny model that is useful inside tests, when we just want to test that # the machinery works, without needing to the check the quality of the outcomes. # # This version creates a tiny vocab first, and then a tiny model - so the outcome is truly tiny -...
35.72
171
0.707353
from pathlib import Path import json import tempfile from transformers import FSMTTokenizer, FSMTConfig, FSMTForConditionalGeneration from transformers.models.fsmt.tokenization_fsmt import VOCAB_FILES_NAMES mname_tiny = "tiny-wmt19-en-ru" vocab = [ "l", "o", "w", "e", "r", "s", "t", "i", "d", "n", "w...
true
true
790aa941cbd4163c635189738d50c89080fa22c8
379
py
Python
sympy/abc.py
matthew-brett/sympy
7b87b62144c28f2e734e9106897c72806b99d181
[ "BSD-3-Clause" ]
null
null
null
sympy/abc.py
matthew-brett/sympy
7b87b62144c28f2e734e9106897c72806b99d181
[ "BSD-3-Clause" ]
null
null
null
sympy/abc.py
matthew-brett/sympy
7b87b62144c28f2e734e9106897c72806b99d181
[ "BSD-3-Clause" ]
1
2021-11-10T06:39:41.000Z
2021-11-10T06:39:41.000Z
from core import Symbol _latin = list('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') # COSINEQ should not be imported as they clash _greek = 'alpha beta gamma delta epsilon zeta eta theta iota kappa '\ 'mu nu xi omicron pi rho sigma tau upsilon phi chi psi omega'.split(' ') for _s in _latin + _greek: e...
31.583333
74
0.728232
from core import Symbol _latin = list('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') _greek = 'alpha beta gamma delta epsilon zeta eta theta iota kappa '\ 'mu nu xi omicron pi rho sigma tau upsilon phi chi psi omega'.split(' ') for _s in _latin + _greek: exec "%s = Symbol('%s')" % (_s, _s) del _latin...
false
true
790aa979795fd964972e943db06f0a39fc600935
4,666
py
Python
bokeh/client/states.py
lvcarlosja/bokeh
f258eb867515d3b493589886c4699a9ca032a6b0
[ "BSD-3-Clause" ]
null
null
null
bokeh/client/states.py
lvcarlosja/bokeh
f258eb867515d3b493589886c4699a9ca032a6b0
[ "BSD-3-Clause" ]
12
2020-08-26T20:19:29.000Z
2020-08-26T20:19:52.000Z
bokeh/client/states.py
lvcarlosja/bokeh
f258eb867515d3b493589886c4699a9ca032a6b0
[ "BSD-3-Clause" ]
null
null
null
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
30.496732
86
0.476211
import logging log = logging.getLogger(__name__) from enum import Enum, auto __all__ = ( 'CONNECTED_BEFORE_ACK', 'CONNECTED_AFTER_ACK', 'DISCONNECTED', 'ErrorReason', 'NOT_YET_CONNECTED', 'WAITING_FOR_REPLY', ) class ErrorReason(Enum): NO_ERROR = auto() ...
true
true
790aaa4f76b53c29268e9f79837e1f90626a0d3e
3,486
py
Python
bindings/python/ensmallen/datasets/string/lysinimicrobiumluteum.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
5
2021-02-17T00:44:45.000Z
2021-08-09T16:41:47.000Z
bindings/python/ensmallen/datasets/string/lysinimicrobiumluteum.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
18
2021-01-07T16:47:39.000Z
2021-08-12T21:51:32.000Z
bindings/python/ensmallen/datasets/string/lysinimicrobiumluteum.py
AnacletoLAB/ensmallen
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
3
2021-01-14T02:20:59.000Z
2021-08-04T19:09:52.000Z
""" This file offers the methods to automatically retrieve the graph Lysinimicrobium luteum. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STRING v11: protein--protein...
33.2
223
0.679002
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen import Graph def LysinimicrobiumLuteum( directed: bool = False, preprocess: bool = True, load_nodes: bool = True, verbose: int = 2, cache: bool = True, cache_path: str = "graphs/str...
true
true
790aaa8934e8fdcda30462389446df95a33e1c77
4,687
py
Python
binauthz-attestation/parse_arguments.py
jcortejoso/cloud-builders-community
80bbc3dfbabf39d7594e08ed0ae57b1a2114cb99
[ "Apache-2.0" ]
1,031
2017-10-24T14:35:13.000Z
2022-03-29T16:24:08.000Z
binauthz-attestation/parse_arguments.py
jcortejoso/cloud-builders-community
80bbc3dfbabf39d7594e08ed0ae57b1a2114cb99
[ "Apache-2.0" ]
431
2017-10-28T22:03:36.000Z
2022-03-23T15:10:50.000Z
binauthz-attestation/parse_arguments.py
jcortejoso/cloud-builders-community
80bbc3dfbabf39d7594e08ed0ae57b1a2114cb99
[ "Apache-2.0" ]
891
2017-10-24T14:39:17.000Z
2022-03-31T09:02:52.000Z
"""Parses the arguments passed to the bash script and returns them back to the bash script.""" from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import argparse import re import sys # Technique for printing custom error and help # Source: https://sta...
36.905512
94
0.703008
from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import argparse import re import sys class CustomParser(argparse.ArgumentParser): def error(self, message): print('{}: error: {}'.format(self.prog, message), file=sys.stderr) self.print_h...
true
true
790aac67e35d239a819e990bcf6586f8e77b8cfa
39,040
py
Python
env/lib/python3.7/site-packages/pygments/lexers/graphics.py
ritchadh/docs-like-code-demo
23d189e074b9ecf136b7b91df3826bcfa51cd124
[ "BSD-3-Clause" ]
null
null
null
env/lib/python3.7/site-packages/pygments/lexers/graphics.py
ritchadh/docs-like-code-demo
23d189e074b9ecf136b7b91df3826bcfa51cd124
[ "BSD-3-Clause" ]
null
null
null
env/lib/python3.7/site-packages/pygments/lexers/graphics.py
ritchadh/docs-like-code-demo
23d189e074b9ecf136b7b91df3826bcfa51cd124
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ pygments.lexers.graphics ~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for computer graphics and plotting related languages. :copyright: Copyright 2006-2020 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexer import RegexLexe...
49.923274
104
0.479662
from pygments.lexer import RegexLexer, words, include, bygroups, using, \ this, default from pygments.token import Text, Comment, Operator, Keyword, Name, \ Number, Punctuation, String __all__ = ['GLShaderLexer', 'PostScriptLexer', 'AsymptoteLexer', 'GnuplotLexer', 'PovrayLexer', 'HLSLShade...
true
true