hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c41cfbfc3890bce7a83910576e4bcfc92f254e8
2,564
py
Python
utils/kitti.py
Sliverk/hybridAveragePrecision
e0417ef71e7419a770b3c106624b5f4336ff5a8d
[ "MIT" ]
null
null
null
utils/kitti.py
Sliverk/hybridAveragePrecision
e0417ef71e7419a770b3c106624b5f4336ff5a8d
[ "MIT" ]
null
null
null
utils/kitti.py
Sliverk/hybridAveragePrecision
e0417ef71e7419a770b3c106624b5f4336ff5a8d
[ "MIT" ]
null
null
null
import pathlib import numpy as np def get_image_index_str(img_idx): return "{:06d}".format(img_idx) def get_label_anno(label_path): annotations = {} annotations.update({ 'name': [], 'truncated': [], 'occluded': [], 'alpha': [], 'bbox': [], 'dimensions': [],...
30.52381
77
0.608814
import pathlib import numpy as np def get_image_index_str(img_idx): return "{:06d}".format(img_idx) def get_label_anno(label_path): annotations = {} annotations.update({ 'name': [], 'truncated': [], 'occluded': [], 'alpha': [], 'bbox': [], 'dimensions': [],...
true
true
1c41d05846e91ffb115828352ba38c0ccc9074be
444
py
Python
backend/src/libs/strings.py
codeglitchz/attendance-system
c82a8d75375069b15e0b827608209bfacb67cde7
[ "MIT" ]
37
2019-12-15T17:39:38.000Z
2022-03-13T08:16:09.000Z
backend/src/libs/strings.py
codeglitchz/attendance-system
c82a8d75375069b15e0b827608209bfacb67cde7
[ "MIT" ]
16
2020-05-05T14:17:26.000Z
2022-03-02T09:09:38.000Z
backend/src/libs/strings.py
codeglitchz/attendance-system
c82a8d75375069b15e0b827608209bfacb67cde7
[ "MIT" ]
18
2019-12-15T17:39:43.000Z
2022-01-22T10:42:41.000Z
""" libs.strings By default, uses `en-gb.json` file inside the `strings` top-level folder. If language changes, set `libs.strings.default_locale` and run `libs.strings.refresh()`. """ import json default_locale = "en-us" cached_strings = {} def refresh(): global cached_strings with open(f"strings/{default_...
17.76
88
0.702703
import json default_locale = "en-us" cached_strings = {} def refresh(): global cached_strings with open(f"strings/{default_locale}.json") as f: cached_strings = json.load(f) def gettext(name): return cached_strings[name] refresh()
true
true
1c41d094b5f8dec87722e4e7bd89446113ad06cd
2,412
py
Python
leaguescrape.py
jmcph4/leaguescrape
2ab51dc09875952671857e1942a0ef8e17627cb4
[ "MIT" ]
2
2017-10-09T11:08:44.000Z
2019-07-23T14:48:23.000Z
leaguescrape.py
jmcph4/leaguescrape
2ab51dc09875952671857e1942a0ef8e17627cb4
[ "MIT" ]
null
null
null
leaguescrape.py
jmcph4/leaguescrape
2ab51dc09875952671857e1942a0ef8e17627cb4
[ "MIT" ]
null
null
null
from time import gmtime, strftime, sleep from urllib.request import urlopen from urllib.error import HTTPError import json import os # files TEAM_FILE_PATH = "team.txt" API_KEY_PATH = "api_key.secret" DATA_ROOT = "data/" # API constants API_KEY = open(API_KEY_PATH, "r").read() API_REGION = "OC1" # oceania API_ROOT = ...
29.777778
131
0.613599
from time import gmtime, strftime, sleep from urllib.request import urlopen from urllib.error import HTTPError import json import os TEAM_FILE_PATH = "team.txt" API_KEY_PATH = "api_key.secret" DATA_ROOT = "data/" API_KEY = open(API_KEY_PATH, "r").read() API_REGION = "OC1" API_ROOT = "https://oce.api.pvp.net/" API_...
true
true
1c41d0ad27a59617bb4ea2d7df5ed911bd2225ec
64
py
Python
tupe/__init__.py
jaketae/tupe
82fab32fc9dc3030d3fc710cdc38827aedf04d4e
[ "MIT" ]
9
2021-12-24T15:23:24.000Z
2022-01-27T16:34:11.000Z
tupe/__init__.py
jaketae/tupe
82fab32fc9dc3030d3fc710cdc38827aedf04d4e
[ "MIT" ]
null
null
null
tupe/__init__.py
jaketae/tupe
82fab32fc9dc3030d3fc710cdc38827aedf04d4e
[ "MIT" ]
1
2022-01-25T10:31:15.000Z
2022-01-25T10:31:15.000Z
from .config import TUPEConfig from .encoder import TUPEEncoder
21.333333
32
0.84375
from .config import TUPEConfig from .encoder import TUPEEncoder
true
true
1c41d191153218a74bf2d262f13cd2596d54c3b4
687
py
Python
tools/leetcode.144.Binary Tree Preorder Traversal/leetcode.144.Binary Tree Preorder Traversal.submission1.py
tedye/leetcode
975d7e3b8cb9b6be9e80e07febf4bcf6414acd46
[ "MIT" ]
4
2015-10-10T00:30:55.000Z
2020-07-27T19:45:54.000Z
tools/leetcode.144.Binary Tree Preorder Traversal/leetcode.144.Binary Tree Preorder Traversal.submission1.py
tedye/leetcode
975d7e3b8cb9b6be9e80e07febf4bcf6414acd46
[ "MIT" ]
null
null
null
tools/leetcode.144.Binary Tree Preorder Traversal/leetcode.144.Binary Tree Preorder Traversal.submission1.py
tedye/leetcode
975d7e3b8cb9b6be9e80e07febf4bcf6414acd46
[ "MIT" ]
null
null
null
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: # @param {TreeNode} root # @return {integer[]} def preorderTraversal(self, root): res = [] if not root: ...
687
687
0.436681
true
true
1c41d2134b8ca72250e8d0535d1f39976a4d09df
485
py
Python
Python (3)/Desafios/desafio10_B.py
Gafanhoto742/Python-3
b0a13ec4cf60185af3ed2508fc69188e36415b80
[ "MIT" ]
1
2021-04-08T19:54:01.000Z
2021-04-08T19:54:01.000Z
Python (3)/Desafios/desafio10_B.py
Gafanhoto742/Python-3
b0a13ec4cf60185af3ed2508fc69188e36415b80
[ "MIT" ]
null
null
null
Python (3)/Desafios/desafio10_B.py
Gafanhoto742/Python-3
b0a13ec4cf60185af3ed2508fc69188e36415b80
[ "MIT" ]
null
null
null
'''Escreva um programa que leia a velocidade de um carro. Se ele ultrapassar 80Km/h, mostre uma mensagem dizendo que ele foi multado. A multa vai custar R$ 7,00 por cada Km acima do limite. ''' veloc = float(input('Qual a velocidade do carro que estava o seu carro? ')) multa = input(veloc - 80) vlmulta = input(multa ...
37.307692
75
0.703093
veloc = float(input('Qual a velocidade do carro que estava o seu carro? ')) multa = input(veloc - 80) vlmulta = input(multa * 7,00) if veloc >=80.1: print('Você foi multado! E pagará R$ {:.2f}!'.format(vlmulta)) else: print('Parabéns, você está andando dentro do limite da via.')
true
true
1c41d21ddcd691671a9af7ab86a72df77e0ab5f7
6,789
py
Python
model.py
uv10000/P4
e9e7f0c06dd9fb32e0febae016857b113eee747a
[ "MIT" ]
null
null
null
model.py
uv10000/P4
e9e7f0c06dd9fb32e0febae016857b113eee747a
[ "MIT" ]
null
null
null
model.py
uv10000/P4
e9e7f0c06dd9fb32e0febae016857b113eee747a
[ "MIT" ]
null
null
null
import os import csv import cv2 import numpy as np import keras from scipy import ndimage from random import shuffle # read in udacity data from file lines=[] with open('../data_provided_by_udacity/driving_log.csv') as csvfile: reader=csv.reader(csvfile) i_have_seen_firstline=False for line in reader: ...
35.359375
131
0.643836
import os import csv import cv2 import numpy as np import keras from scipy import ndimage from random import shuffle lines=[] with open('../data_provided_by_udacity/driving_log.csv') as csvfile: reader=csv.reader(csvfile) i_have_seen_firstline=False for line in reader: if i_have_seen_firstline: ...
true
true
1c41d2517e0de178948c7261948c9170386efc52
1,142
py
Python
order.py
amur-host/PyAmur
f3a794b6b702e2e9f601d3e9451109fcb4fb2ee9
[ "MIT" ]
null
null
null
order.py
amur-host/PyAmur
f3a794b6b702e2e9f601d3e9451109fcb4fb2ee9
[ "MIT" ]
null
null
null
order.py
amur-host/PyAmur
f3a794b6b702e2e9f601d3e9451109fcb4fb2ee9
[ "MIT" ]
null
null
null
import pyamur class Order(object): def __init__(self, orderId, assetPair, address = ''): self.orderId = orderId self.assetPair = assetPair self.address = address self.matcher = pyamur.MATCHER self.matcherPublicKey = pyamur.MATCHER_PUBLICKEY self.status() def __s...
35.6875
259
0.589317
import pyamur class Order(object): def __init__(self, orderId, assetPair, address = ''): self.orderId = orderId self.assetPair = assetPair self.address = address self.matcher = pyamur.MATCHER self.matcherPublicKey = pyamur.MATCHER_PUBLICKEY self.status() def __s...
true
true
1c41d2bfd427c06ca8fd000b534717b1eaed08aa
126
py
Python
tests/__init__.py
kurniawano/flask_tdd_workshop
0f6a427ae627b20ed5b0d53349c61ab0f2cd97c4
[ "MIT" ]
null
null
null
tests/__init__.py
kurniawano/flask_tdd_workshop
0f6a427ae627b20ed5b0d53349c61ab0f2cd97c4
[ "MIT" ]
null
null
null
tests/__init__.py
kurniawano/flask_tdd_workshop
0f6a427ae627b20ed5b0d53349c61ab0f2cd97c4
[ "MIT" ]
null
null
null
import pytest from urlshortener.app import app @pytest.fixture def client(): client = app.test_client() yield client
18
32
0.738095
import pytest from urlshortener.app import app @pytest.fixture def client(): client = app.test_client() yield client
true
true
1c41d3edcb800670aebd98110b076a61a30c0563
3,310
py
Python
2.7-fancyIndex.py
pgiardiniere/notes-PythonDataScienceHandbook
ddb6662d2fbeedd5b6b09ce4d8ddee55813ec589
[ "MIT" ]
2
2019-05-01T02:23:02.000Z
2019-05-04T03:26:39.000Z
2.7-fancyIndex.py
pgiardiniere/notes-PythonDataScienceHandbook
ddb6662d2fbeedd5b6b09ce4d8ddee55813ec589
[ "MIT" ]
null
null
null
2.7-fancyIndex.py
pgiardiniere/notes-PythonDataScienceHandbook
ddb6662d2fbeedd5b6b09ce4d8ddee55813ec589
[ "MIT" ]
null
null
null
# Recall: # Simple Indexing e.g. arr[0] or arr[:5] # Boolean Masks e.g. arr[arr > 0] # Now add in fancy indexing - pass arrays of indices in place of scalars import numpy as np rand = np.random.RandomState(42) x = rand.randint(100, size=10) # Access same 3 elements via Simple indexing and Fancy indexing [x[3],...
27.131148
78
0.680967
import numpy as np rand = np.random.RandomState(42) x = rand.randint(100, size=10) [x[3], x[7], x[2]] ind = [3, 7, 4] x[ind] ind = np.array([[3, 7], [4, 5]]) x[ind] # Fancing indexing on a 2D array with 1D lists X = np.arange(12).reshape((3, 4)) row = np.array([0, 1, 2]) col = np.array([2, 1,...
false
true
1c41d43cf2688fdef8a476da3c79fd0a994bde35
910
py
Python
backend/migrations/versions/7408c872d6c0_.py
KSodowska/codeforpoznan.pl_v3
ddb079db90eda869940f4467832ef96f70591055
[ "MIT" ]
8
2019-08-12T22:10:48.000Z
2020-09-13T17:46:10.000Z
backend/migrations/versions/7408c872d6c0_.py
KSodowska/codeforpoznan.pl_v3
ddb079db90eda869940f4467832ef96f70591055
[ "MIT" ]
326
2018-11-07T20:29:28.000Z
2022-02-10T08:53:42.000Z
backend/migrations/versions/7408c872d6c0_.py
KSodowska/codeforpoznan.pl_v3
ddb079db90eda869940f4467832ef96f70591055
[ "MIT" ]
49
2018-11-14T17:50:27.000Z
2021-04-20T22:40:29.000Z
"""empty message Revision ID: 7408c872d6c0 Revises: 4d81578a84d3 Create Date: 2019-05-15 15:31:00.388640 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "7408c872d6c0" down_revision = "4d81578a84d3" branch_labels = None depends_on = None def upgrade(): # ...
26
72
0.679121
from alembic import op import sqlalchemy as sa revision = "7408c872d6c0" down_revision = "4d81578a84d3" branch_labels = None depends_on = None def upgrade(): ue), sa.ForeignKeyConstraint(["hacknight_id"], ["hacknight.id"]), sa.ForeignKeyConstraint(["participant_id"], ["participant.id"]), ) ...
true
true
1c41d452eff0e3892f4806b861e48081142b524a
636
py
Python
manage.py
ralphleyga/sleeknotes
b92c8dd12021eb0bfddcdf5dc046b8173930b68b
[ "MIT" ]
null
null
null
manage.py
ralphleyga/sleeknotes
b92c8dd12021eb0bfddcdf5dc046b8173930b68b
[ "MIT" ]
4
2021-03-19T02:32:55.000Z
2021-06-10T19:03:45.000Z
manage.py
ralphleyga/sleeknotes
b92c8dd12021eb0bfddcdf5dc046b8173930b68b
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'sleeknotes.settings.local') try: from django.core.management import execute_from_command_line except ImportError as exc: rai...
28.909091
80
0.685535
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'sleeknotes.settings.local') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed an...
true
true
1c41d4603e3f669b0578a44d5ceb60e270cf5d23
3,287
py
Python
experiments/classification/scripts/save_best_checkpt.py
Daulbaev/IRDM
4bb60191ac0072e4349ca47092675d06b39a979a
[ "MIT" ]
10
2020-12-06T13:04:33.000Z
2021-02-04T23:10:43.000Z
experiments/classification/scripts/save_best_checkpt.py
Daulbaev/IRDM
4bb60191ac0072e4349ca47092675d06b39a979a
[ "MIT" ]
null
null
null
experiments/classification/scripts/save_best_checkpt.py
Daulbaev/IRDM
4bb60191ac0072e4349ca47092675d06b39a979a
[ "MIT" ]
null
null
null
from glob import glob import os def get_normalizations(folder_stats): ### empty normalization key corresponds to "_bn1-BN_resblock-BNReLU_odeblock-LNReLU" normalizations = [] anode_logs = folder_stats['anode_logs'] for dirname in glob('{}*'.format(anode_logs, recursive = False)): normalization...
34.6
107
0.573471
from glob import glob import os def get_normalizations(folder_stats): ppend('_' + dirname.strip('{}'.format(anode_logs))) normalizations.append("") return normalizations def get_configs(folder_stats): configs_h1 = folder_stats['configs_h1'] configs_h2 = folder_stats['configs_h2'] configs...
true
true
1c41d46dae24e3af5650544cb44a4a7e917c362f
19,594
py
Python
adanet/distributed/placement_test.py
eustomaqua/adanet
9c1de82428a4e661768af8e764041afebfec2e6f
[ "Apache-2.0" ]
1
2020-11-08T17:03:52.000Z
2020-11-08T17:03:52.000Z
adanet/distributed/placement_test.py
eustomaqua/adanet
9c1de82428a4e661768af8e764041afebfec2e6f
[ "Apache-2.0" ]
null
null
null
adanet/distributed/placement_test.py
eustomaqua/adanet
9c1de82428a4e661768af8e764041afebfec2e6f
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The AdaNet 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 # https://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable la...
34.315236
80
0.457181
from __future__ import absolute_import from __future__ import division from __future__ import print_function import itertools from absl.testing import parameterized from adanet.distributed.placement import ReplicationStrategy from adanet.distributed.placement import RoundRobinStrategy import tensorflow...
true
true
1c41d4b11c7e8e19e9053f4daa2146566d6d84b4
4,338
py
Python
accounts/forms.py
HydroLearn/HydroLearn
fbf14aab7a33d71a336afa3878666378e1a75358
[ "BSD-3-Clause" ]
null
null
null
accounts/forms.py
HydroLearn/HydroLearn
fbf14aab7a33d71a336afa3878666378e1a75358
[ "BSD-3-Clause" ]
23
2018-08-09T18:46:20.000Z
2021-06-10T20:21:26.000Z
accounts/forms.py
HydroLearn/HydroLearn
fbf14aab7a33d71a336afa3878666378e1a75358
[ "BSD-3-Clause" ]
1
2019-01-28T15:42:39.000Z
2019-01-28T15:42:39.000Z
from django import forms from django.contrib.auth.forms import ReadOnlyPasswordHashField from accounts.models import User, Profile import six class RegisterForm(forms.ModelForm): password1 = forms.CharField(label='Password', widget=forms.PasswordInput) password2 = forms.CharField(label='Confirm password', wi...
33.890625
90
0.660673
from django import forms from django.contrib.auth.forms import ReadOnlyPasswordHashField from accounts.models import User, Profile import six class RegisterForm(forms.ModelForm): password1 = forms.CharField(label='Password', widget=forms.PasswordInput) password2 = forms.CharField(label='Confirm password', wi...
true
true
1c41d4f75774a0d772741eee7c4e5ae752cbd09c
743
py
Python
manage.py
MichaelNjoroge254/Personal-Blog
3a27f0667ec3e86d6d27b1c0b026a92fd2d4c64a
[ "MIT" ]
null
null
null
manage.py
MichaelNjoroge254/Personal-Blog
3a27f0667ec3e86d6d27b1c0b026a92fd2d4c64a
[ "MIT" ]
null
null
null
manage.py
MichaelNjoroge254/Personal-Blog
3a27f0667ec3e86d6d27b1c0b026a92fd2d4c64a
[ "MIT" ]
null
null
null
from app import create_app,db from flask_script import Manager,Server from app.models import User,Blog from flask_migrate import Migrate, MigrateCommand # from run import create_app # Creating app instance app = create_app('production') # manager = Manager(create_app()) manager = Manager(app) migrate = Migrate(app,d...
22.515152
58
0.730821
from app import create_app,db from flask_script import Manager,Server from app.models import User,Blog from flask_migrate import Migrate, MigrateCommand app = create_app('production') manager = Manager(app) migrate = Migrate(app,db) manager.add_command('db',MigrateCommand) manager.add_command('server',Server) @m...
true
true
1c41d52271a713cd58bdbe1ba302ed5ef72ab728
6,527
py
Python
coremltools/converters/mil/frontend/torch/torchir_passes.py
dpkg9/coremltools
096cc25f00d6cd0b6d9e9a76f128caf08aab9f40
[ "BSD-3-Clause" ]
null
null
null
coremltools/converters/mil/frontend/torch/torchir_passes.py
dpkg9/coremltools
096cc25f00d6cd0b6d9e9a76f128caf08aab9f40
[ "BSD-3-Clause" ]
null
null
null
coremltools/converters/mil/frontend/torch/torchir_passes.py
dpkg9/coremltools
096cc25f00d6cd0b6d9e9a76f128caf08aab9f40
[ "BSD-3-Clause" ]
null
null
null
from collections import OrderedDict import logging as _logging from .internal_graph import * def transform_inplace_ops(graph, name_remap_dict=None): # As we modify ops, we'll need to remap symbols. if name_remap_dict is None: name_remap_dict = {} for node in graph.nodes: for k, v in nam...
41.839744
104
0.573004
from collections import OrderedDict import logging as _logging from .internal_graph import * def transform_inplace_ops(graph, name_remap_dict=None): if name_remap_dict is None: name_remap_dict = {} for node in graph.nodes: for k, v in name_remap_dict.items(): node.replace_n...
true
true
1c41d5e143b2ee34d6d06f4c6e5c7363dc3ec3c5
113
py
Python
setup.py
johnzech/geotiffer
1ba49445f3006f12134ab2b9a8d8141e3c0dc8f0
[ "Qhull" ]
3
2016-04-08T09:26:04.000Z
2019-10-13T21:27:53.000Z
setup.py
johnzech/geotiffer
1ba49445f3006f12134ab2b9a8d8141e3c0dc8f0
[ "Qhull" ]
null
null
null
setup.py
johnzech/geotiffer
1ba49445f3006f12134ab2b9a8d8141e3c0dc8f0
[ "Qhull" ]
null
null
null
from distutils.core import setup import py2exe setup(console=['print_layers.py']) setup(console=['geotiffer.py'])
28.25
34
0.787611
from distutils.core import setup import py2exe setup(console=['print_layers.py']) setup(console=['geotiffer.py'])
true
true
1c41d71a0abdfdedec2985c9614b4a7f28e8ed49
6,184
py
Python
test-suite/exonum-py-tests/suite/common.py
Kollego/exonum
1374af9fef04c7afe1cfdf1245e0ce6c45109676
[ "Apache-2.0" ]
1,226
2017-07-17T05:09:05.000Z
2022-03-17T07:37:15.000Z
test-suite/exonum-py-tests/suite/common.py
Kollego/exonum
1374af9fef04c7afe1cfdf1245e0ce6c45109676
[ "Apache-2.0" ]
1,309
2017-07-17T10:51:09.000Z
2022-03-15T16:17:07.000Z
test-suite/exonum-py-tests/suite/common.py
Kollego/exonum
1374af9fef04c7afe1cfdf1245e0ce6c45109676
[ "Apache-2.0" ]
312
2017-07-17T06:21:05.000Z
2022-03-28T19:08:05.000Z
"""Module containing common scenarios that can be used for writing tests with less boiler-plate.""" from typing import List, Dict, Any import unittest import time from exonum_client import ExonumClient from suite import ExonumNetwork, ProcessOutput, ProcessExitResult from requests.exceptions import ConnectionError R...
32.547368
120
0.682245
from typing import List, Dict, Any import unittest import time from exonum_client import ExonumClient from suite import ExonumNetwork, ProcessOutput, ProcessExitResult from requests.exceptions import ConnectionError RETRIES_AMOUNT = 30 ARTIFACT_NAME = "exonum-cryptocurrency" ARTIFACT_VERSION = "0.2.0" MIN_PEER_PORT...
true
true
1c41da76853ab1945ffb0df0f5fb6d193a2733ff
476
py
Python
Aula 10/Desafios/032.py
mateuschaves/curso-python
53b2f3b4bf083ae2ce7ea19dd358f49a36becd9d
[ "MIT" ]
1
2018-07-23T04:03:35.000Z
2018-07-23T04:03:35.000Z
Aula 10/Desafios/032.py
mateuschaves/curso-python
53b2f3b4bf083ae2ce7ea19dd358f49a36becd9d
[ "MIT" ]
null
null
null
Aula 10/Desafios/032.py
mateuschaves/curso-python
53b2f3b4bf083ae2ce7ea19dd358f49a36becd9d
[ "MIT" ]
null
null
null
""" Faça um programa que leia um ano qualquer e mostre se ele é bissexto. Linda Do jeito que é Da cabeça ao pé Do jeitinho que for É, e só de pensar Sei que já vou estar Morrendo de amor De amor Coisa Linda - Tiago Iorc ♪♫ """ ano = int(input('Informe o ano: ')) if ...
17.62963
53
0.577731
ano = int(input('Informe o ano: ')) if ano % 400 == 0 or ano % 4 == 0 and ano % 100 != 0: print('O ano {} é bissexto !'.format(ano)) else: print('O ano {} não é bissexto !'.format(ano))
true
true
1c41dbed0453e2bd0f4943371b18e52147c24390
2,385
py
Python
Tutorials/12text.py
zza-jeff/MCB185-2022
562dc9de4be58cbb7783b66ee7781e5b93ff4f1d
[ "MIT" ]
null
null
null
Tutorials/12text.py
zza-jeff/MCB185-2022
562dc9de4be58cbb7783b66ee7781e5b93ff4f1d
[ "MIT" ]
null
null
null
Tutorials/12text.py
zza-jeff/MCB185-2022
562dc9de4be58cbb7783b66ee7781e5b93ff4f1d
[ "MIT" ]
22
2022-01-04T17:03:32.000Z
2022-01-10T22:47:48.000Z
#!/usr/bin/env python3 # 12text.py # Move the triple quotes downward to uncover each segment of code """ # Variables with text are called strings s = 'ACGT' # a string # Square brackets let you access sub-strings as 'slices' # Follow closely below, because the endpoints can be confusing # The first number before :...
26.797753
76
0.697694
true
true
1c41dc89cac944997ef491c2a9ccedf34ed86b14
38
py
Python
expman/plotters/__init__.py
vzhong/expman
e73603a4466771170e85b19afb1583c5794f342b
[ "MIT" ]
null
null
null
expman/plotters/__init__.py
vzhong/expman
e73603a4466771170e85b19afb1583c5794f342b
[ "MIT" ]
null
null
null
expman/plotters/__init__.py
vzhong/expman
e73603a4466771170e85b19afb1583c5794f342b
[ "MIT" ]
null
null
null
from .line_plotter import LinePlotter
19
37
0.868421
from .line_plotter import LinePlotter
true
true
1c41dcc10234348cbb222fd4d8fa9f100a3854b6
6,643
py
Python
rank.py
chariothy/proxy-mon
aa51220874d8a08553d4a2a26783533feb4a4949
[ "MIT" ]
null
null
null
rank.py
chariothy/proxy-mon
aa51220874d8a08553d4a2a26783533feb4a4949
[ "MIT" ]
null
null
null
rank.py
chariothy/proxy-mon
aa51220874d8a08553d4a2a26783533feb4a4949
[ "MIT" ]
null
null
null
from pandas import DataFrame from utils import ut, tmp_env from pybeans import utils as pu import pandas as pd from datetime import datetime, timedelta #from model import Proxy, Delay, Rank, query_delay, query_proxy from premailer import transform from pybeans import today from notify import notify_by_ding_talk imp...
31.633333
127
0.564353
from pandas import DataFrame from utils import ut, tmp_env from pybeans import utils as pu import pandas as pd from datetime import datetime, timedelta from premailer import transform from pybeans import today from notify import notify_by_ding_talk import arrow import os import re REG_DATE = re.compile(r'(\d{8})_\...
true
true
1c41deb2a0b654817fe9c0c9323a847028796100
25,589
py
Python
xfields/fieldmaps/interpolated.py
kparasch/xfields
fd288588ee269bf0d18da24ef83f5f925e6c5e4f
[ "MIT" ]
1
2021-09-07T14:34:22.000Z
2021-09-07T14:34:22.000Z
xfields/fieldmaps/interpolated.py
kparasch/xfields
fd288588ee269bf0d18da24ef83f5f925e6c5e4f
[ "MIT" ]
16
2021-03-12T11:28:57.000Z
2021-08-17T19:52:40.000Z
xfields/fieldmaps/interpolated.py
kparasch/xfields
fd288588ee269bf0d18da24ef83f5f925e6c5e4f
[ "MIT" ]
5
2021-06-16T12:45:22.000Z
2022-01-07T15:24:09.000Z
import numpy as np import xobjects as xo import xpart as xp import xtrack as xt from ..solvers.fftsolvers import FFTSolver3D, FFTSolver2p5D from ..general import _pkg_root class TriLinearInterpolatedFieldMapData(xo.Struct): x_min = xo.Float64 y_min = xo.Float64 z_min = xo.Float64 nx = xo.Int64 ny...
40.10815
90
0.563992
import numpy as np import xobjects as xo import xpart as xp import xtrack as xt from ..solvers.fftsolvers import FFTSolver3D, FFTSolver2p5D from ..general import _pkg_root class TriLinearInterpolatedFieldMapData(xo.Struct): x_min = xo.Float64 y_min = xo.Float64 z_min = xo.Float64 nx = xo.Int64 ny...
true
true
1c41df5dba5fe449010704d4dfae91c58717b001
1,466
py
Python
luz_asm_sim/lib/asmlib/objectfile.py
eliben/luz-cpu
680917f975f69e7d3cd32edbcbf79a650cbbead9
[ "Unlicense" ]
135
2015-01-19T07:18:00.000Z
2022-01-10T15:49:44.000Z
luz_asm_sim/lib/asmlib/objectfile.py
AhmedMounir/luz-cpu
680917f975f69e7d3cd32edbcbf79a650cbbead9
[ "Unlicense" ]
2
2017-04-02T18:37:34.000Z
2018-08-15T13:25:40.000Z
luz_asm_sim/lib/asmlib/objectfile.py
AhmedMounir/luz-cpu
680917f975f69e7d3cd32edbcbf79a650cbbead9
[ "Unlicense" ]
24
2015-02-18T02:30:32.000Z
2021-08-22T23:48:01.000Z
# Represents the object file recognized by the Luz architecture. # An object file is relocatable. It is created by the assembler, # and later combined with other object files by the linker into # an executable. # # Luz micro-controller assembler # Eli Bendersky (C) 2008-2010 # class ObjectFile(object): """ Use one...
28.745098
65
0.592087
class ObjectFile(object): def __init__(self): self.seg_data = {} self.export_table = [] self.import_table = [] self.reloc_table = [] self.name = None @classmethod def from_assembler( cls, seg_data, export_tabl...
true
true
1c41df68474777b29655bb8f57d627df3da18ac8
3,415
py
Python
src/elki_interface/Hics.py
eliavw/elki_interface
b60dd746a8deb08272f5c39cb7822dd3408188c2
[ "MIT" ]
null
null
null
src/elki_interface/Hics.py
eliavw/elki_interface
b60dd746a8deb08272f5c39cb7822dd3408188c2
[ "MIT" ]
null
null
null
src/elki_interface/Hics.py
eliavw/elki_interface
b60dd746a8deb08272f5c39cb7822dd3408188c2
[ "MIT" ]
null
null
null
import io import warnings import pandas as pd from prefect import Flow from prefect.tasks.shell import ShellTask from .cte import ELKI_FILEPATH from .Elki import Elki class Hics(Elki): def __init__( self, verbose=False, elki=ELKI_FILEPATH, contamination=0.1, k=5, **kwargs ): super().__init__...
26.068702
110
0.562518
import io import warnings import pandas as pd from prefect import Flow from prefect.tasks.shell import ShellTask from .cte import ELKI_FILEPATH from .Elki import Elki class Hics(Elki): def __init__( self, verbose=False, elki=ELKI_FILEPATH, contamination=0.1, k=5, **kwargs ): super().__init__...
true
true
1c41dffec20d92c8af4de2b7464ed7d62eef7243
23,885
py
Python
reader/blocksDB_diagramming.py
nairobi222/chainhammer
94ab5269a9a9c751d355b41f90ac244026ccf46b
[ "MIT" ]
null
null
null
reader/blocksDB_diagramming.py
nairobi222/chainhammer
94ab5269a9a9c751d355b41f90ac244026ccf46b
[ "MIT" ]
null
null
null
reader/blocksDB_diagramming.py
nairobi222/chainhammer
94ab5269a9a9c751d355b41f90ac244026ccf46b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ @summary: for the jupyter notebooks: tools, column creators, diagramming routines, etc. @version: v40 (29/November/2018) @since: 26/June/2018 @organization: @author: https://github.com/drandreaskrueger @see: https://github.com/drandreaskrueger/chainhammer for updates @TODO: this...
33.312413
164
0.614402
b.pyplot as plt if __name__ == '__main__' and __package__ is None: from os import sys, path sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) from hammer.config import RPCaddress, EMPTY_BLOCKS_AT_END def DB_tableSize(tablename, conn): count = DB_query("SELECT COUNT(*) FROM %s" %...
true
true
1c41e0d798c916b889d6eadadf47ec3f3f6577e2
4,372
py
Python
util/text_to_json.py
naamancampbell/rasc
81856c8d3ae06030655097fa3ccdf7fe739f39cf
[ "MIT" ]
null
null
null
util/text_to_json.py
naamancampbell/rasc
81856c8d3ae06030655097fa3ccdf7fe739f39cf
[ "MIT" ]
null
null
null
util/text_to_json.py
naamancampbell/rasc
81856c8d3ae06030655097fa3ccdf7fe739f39cf
[ "MIT" ]
null
null
null
import json import os import re import sys util_dir = os.path.dirname(os.path.abspath(__file__)) root_dir = os.path.dirname(util_dir) rasc_path = os.path.join(root_dir, 'data', 'rasc.txt') rasc_file = open(rasc_path, 'r', encoding='utf-8') rasc_dict = { 'seasons': [] } season_index = -1 episode_index = -1 track_index...
35.544715
79
0.569533
import json import os import re import sys util_dir = os.path.dirname(os.path.abspath(__file__)) root_dir = os.path.dirname(util_dir) rasc_path = os.path.join(root_dir, 'data', 'rasc.txt') rasc_file = open(rasc_path, 'r', encoding='utf-8') rasc_dict = { 'seasons': [] } season_index = -1 episode_index = -1 track_index...
true
true
1c41e1238670b013dfa4b916d6f4f4cf6f9751df
707
py
Python
sandbox/src1/TCSE3-3rd-examples/src/setup.py
sniemi/SamPy
e048756feca67197cf5f995afd7d75d8286e017b
[ "BSD-2-Clause" ]
5
2016-05-28T14:12:28.000Z
2021-04-22T10:23:12.000Z
sandbox/src1/TCSE3-3rd-examples/src/setup.py
sniemi/SamPy
e048756feca67197cf5f995afd7d75d8286e017b
[ "BSD-2-Clause" ]
null
null
null
sandbox/src1/TCSE3-3rd-examples/src/setup.py
sniemi/SamPy
e048756feca67197cf5f995afd7d75d8286e017b
[ "BSD-2-Clause" ]
2
2015-07-13T10:04:10.000Z
2021-04-22T10:23:23.000Z
#!/usr/bin/env python from distutils.core import setup, Extension import os, glob os.chdir('tools') # all scripts in src/tools are executables (subst.py is also a module) scripts = os.listdir(os.curdir) for del_dir in 'scitools', 'CVS', '.svn', 'build': try: del scripts[scripts.index(del_dir)] except: ...
27.192308
105
0.674682
from distutils.core import setup, Extension import os, glob os.chdir('tools') scripts = os.listdir(os.curdir) for del_dir in 'scitools', 'CVS', '.svn', 'build': try: del scripts[scripts.index(del_dir)] except: pass packages = ['scitools'] modules = ['subst'] setup( name='scitools', v...
true
true
1c41e159cf239ecbc90861dd633546b57bc77333
671
py
Python
terraform/bin/credstash_reader.py
InnovateUKGitHub/run_terraform
acfb4587c2b1d90509d6d512d74a6a9b160aff17
[ "MIT" ]
10
2018-01-09T03:33:38.000Z
2020-10-28T10:42:21.000Z
terraform/bin/credstash_reader.py
InnovateUKGitHub/run_terraform
acfb4587c2b1d90509d6d512d74a6a9b160aff17
[ "MIT" ]
10
2018-01-10T19:36:36.000Z
2021-12-13T19:49:35.000Z
terraform/bin/credstash_reader.py
InnovateUKGitHub/run_terraform
acfb4587c2b1d90509d6d512d74a6a9b160aff17
[ "MIT" ]
null
null
null
#!/usr/bin/env python import sys, subprocess, json, base64, random from pprint import pprint d = json.loads(sys.stdin.read()) try: secret = subprocess.check_output( [ 'credstash', '-t', d['table'], '-r', d['region'], 'get', ...
20.333333
47
0.529061
import sys, subprocess, json, base64, random from pprint import pprint d = json.loads(sys.stdin.read()) try: secret = subprocess.check_output( [ 'credstash', '-t', d['table'], '-r', d['region'], 'get', d['key'], ...
false
true
1c41e2855ec54676929a52df85329c818a7ea578
4,105
py
Python
setup.py
MacHu-GWU/flask-restless-api-client-project
c93ac4a00c7562e6eb50d5dc9a92beeda7798c68
[ "MIT" ]
null
null
null
setup.py
MacHu-GWU/flask-restless-api-client-project
c93ac4a00c7562e6eb50d5dc9a92beeda7798c68
[ "MIT" ]
null
null
null
setup.py
MacHu-GWU/flask-restless-api-client-project
c93ac4a00c7562e6eb50d5dc9a92beeda7798c68
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Frequent used classifiers List = [ "Development Status :: 1 - Planning", "Development Status :: 2 - Pre-Alpha", "Development Status :: 3 - Alpha", "Development Status :: 4 - Beta", "Development Status :: 5 - Production/Stable", "Development Stat...
34.208333
85
0.665773
from setuptools import setup, find_packages from datetime import datetime import os GITHUB_ACCOUNT = "MacHu-GWU" RELEASE_TAG = "2016-01-20" NAME = "flaskrestlessapiclient" VERSION = __import__(NAME).__version__ PACKAGES = [NAME] + ["%s.%s" % (NAME, i) for i in find_packages(NAME)] PACKAGE_DATA = { } SHORT_DESC...
true
true
1c41e2f216d760da5ee9d73785b2a83179b2fa3d
1,005
py
Python
stubs/micropython-v1_11-esp8266/uctypes.py
mattytrentini/micropython-stubs
4d596273823b69e9e5bcf5fa67f249c374ee0bbc
[ "MIT" ]
null
null
null
stubs/micropython-v1_11-esp8266/uctypes.py
mattytrentini/micropython-stubs
4d596273823b69e9e5bcf5fa67f249c374ee0bbc
[ "MIT" ]
null
null
null
stubs/micropython-v1_11-esp8266/uctypes.py
mattytrentini/micropython-stubs
4d596273823b69e9e5bcf5fa67f249c374ee0bbc
[ "MIT" ]
null
null
null
""" Module: 'uctypes' on esp8266 v1.11 """ # MCU: (sysname='esp8266', nodename='esp8266', release='2.2.0-dev(9422289)', version='v1.11-8-g48dcbbe60 on 2019-05-29', machine='ESP module with ESP8266') # Stubber: 1.1.0 - updated from typing import Any ARRAY = -1073741824 BFINT16 = -671088640 BFINT32 = -402653184 BFINT8 =...
16.75
155
0.703483
from typing import Any ARRAY = -1073741824 BFINT16 = -671088640 BFINT32 = -402653184 BFINT8 = -939524096 BFUINT16 = -805306368 BFUINT32 = -536870912 BFUINT8 = -1073741824 BF_LEN = 22 BF_POS = 17 BIG_ENDIAN = 1 FLOAT32 = -268435456 FLOAT64 = -134217728 INT = 671088640 INT16 = 402653184 INT32 = 671088640 INT64 = 93952...
true
true
1c41e4b19073a92f2f99f0428fb1948fedeba3ee
2,144
py
Python
1_Lecun_Network/LeNet_keras.py
Cynthia-QX-Li/Convolutional-neural-network
76335a96ce3a1779f512e4f7f3ed8b394f83b29a
[ "MIT" ]
5
2017-09-26T02:14:43.000Z
2021-09-09T15:50:31.000Z
1_Lecun_Network/LeNet_keras.py
Ken-Leo/BIGBALLONcifar-10-cnn
76335a96ce3a1779f512e4f7f3ed8b394f83b29a
[ "MIT" ]
null
null
null
1_Lecun_Network/LeNet_keras.py
Ken-Leo/BIGBALLONcifar-10-cnn
76335a96ce3a1779f512e4f7f3ed8b394f83b29a
[ "MIT" ]
null
null
null
import keras from keras import optimizers from keras.datasets import cifar10 from keras.models import Sequential from keras.layers import Conv2D, Dense, Flatten, MaxPooling2D from keras.callbacks import LearningRateScheduler, TensorBoard batch_size = 128 epochs = 180 iterations = 391 num_classes = 10 lo...
34.031746
125
0.693097
import keras from keras import optimizers from keras.datasets import cifar10 from keras.models import Sequential from keras.layers import Conv2D, Dense, Flatten, MaxPooling2D from keras.callbacks import LearningRateScheduler, TensorBoard batch_size = 128 epochs = 180 iterations = 391 num_classes = 10 lo...
true
true
1c41e4e4bef2f5b29177e4a6aa096761b12e2917
1,330
py
Python
tests_requre/openshift_integration/base.py
csomh/packit-service
d12836284f5e34f54dc6de20279175493b5f5d31
[ "MIT" ]
null
null
null
tests_requre/openshift_integration/base.py
csomh/packit-service
d12836284f5e34f54dc6de20279175493b5f5d31
[ "MIT" ]
null
null
null
tests_requre/openshift_integration/base.py
csomh/packit-service
d12836284f5e34f54dc6de20279175493b5f5d31
[ "MIT" ]
null
null
null
import os from shutil import copy from pathlib import Path import unittest from requre.constants import RELATIVE_TEST_DATA_DIRECTORY from requre.cassette import StorageMode from packit.config import RunCommandType from packit_service.worker.jobs import SteveJobs from glob import glob PROJECT_DIR = Path(__file__).paren...
33.25
84
0.67218
import os from shutil import copy from pathlib import Path import unittest from requre.constants import RELATIVE_TEST_DATA_DIRECTORY from requre.cassette import StorageMode from packit.config import RunCommandType from packit_service.worker.jobs import SteveJobs from glob import glob PROJECT_DIR = Path(__file__).paren...
true
true
1c41e5e92a822a7c6f95fd7730d5429ca21cac9f
11,886
py
Python
packages/api-server/api_server/app.py
cnboonhan/rmf-web
4389c53ef87e95c9a4bf1a6a72ed11f6f441a33f
[ "Apache-2.0" ]
null
null
null
packages/api-server/api_server/app.py
cnboonhan/rmf-web
4389c53ef87e95c9a4bf1a6a72ed11f6f441a33f
[ "Apache-2.0" ]
null
null
null
packages/api-server/api_server/app.py
cnboonhan/rmf-web
4389c53ef87e95c9a4bf1a6a72ed11f6f441a33f
[ "Apache-2.0" ]
null
null
null
import asyncio import logging import os import signal import sys import threading from typing import Any, Callable, Coroutine, List, Optional, Union import rclpy import rclpy.executors from fastapi import HTTPException from fastapi.logger import logger from fastapi.middleware.cors import CORSMiddleware from fastapi.st...
38.341935
98
0.627966
import asyncio import logging import os import signal import sys import threading from typing import Any, Callable, Coroutine, List, Optional, Union import rclpy import rclpy.executors from fastapi import HTTPException from fastapi.logger import logger from fastapi.middleware.cors import CORSMiddleware from fastapi.st...
true
true
1c41e622e4f8812e44c048ade2fd2b6dbe66de8d
20
py
Python
gui/PyUi/__init__.py
YuriShporhun/TheCarMonitor
fd9bd436413ef1b70e9ded119bb5acd672f7316f
[ "Apache-2.0" ]
19
2021-04-17T03:25:41.000Z
2022-02-10T03:53:01.000Z
gui/PyUi/__init__.py
YuriShporhun/TheCarMonitor
fd9bd436413ef1b70e9ded119bb5acd672f7316f
[ "Apache-2.0" ]
null
null
null
gui/PyUi/__init__.py
YuriShporhun/TheCarMonitor
fd9bd436413ef1b70e9ded119bb5acd672f7316f
[ "Apache-2.0" ]
12
2021-04-18T08:25:43.000Z
2022-02-17T06:30:13.000Z
__author__ = 'yuri'
10
19
0.7
__author__ = 'yuri'
true
true
1c41e633019e962f66cc3d82f3ae6054e6a020f7
1,828
py
Python
requests_pytest_plugin.py
ColdHeat/Advocate
6d699aed899784dfae5fac28e29567936bed81a3
[ "Apache-2.0" ]
null
null
null
requests_pytest_plugin.py
ColdHeat/Advocate
6d699aed899784dfae5fac28e29567936bed81a3
[ "Apache-2.0" ]
null
null
null
requests_pytest_plugin.py
ColdHeat/Advocate
6d699aed899784dfae5fac28e29567936bed81a3
[ "Apache-2.0" ]
null
null
null
import socket import doctest import pytest import requests import advocate import advocate.api from advocate.exceptions import MountDisabledException, ProxyDisabledException from advocate.packages import ipaddress from test.monkeypatching import CheckedSocket SKIP_EXCEPTIONS = (MountDisabledException, ProxyDisable...
30.983051
78
0.702407
import socket import doctest import pytest import requests import advocate import advocate.api from advocate.exceptions import MountDisabledException, ProxyDisabledException from advocate.packages import ipaddress from test.monkeypatching import CheckedSocket SKIP_EXCEPTIONS = (MountDisabledException, ProxyDisable...
true
true
1c41e705037d64a717a007fbace06ce645b19c6b
2,805
py
Python
analyze.py
kongyanye/paper_search
a5e8ab6210dd73988a5b0912bcbfc814b8a09f5e
[ "MIT" ]
null
null
null
analyze.py
kongyanye/paper_search
a5e8ab6210dd73988a5b0912bcbfc814b8a09f5e
[ "MIT" ]
null
null
null
analyze.py
kongyanye/paper_search
a5e8ab6210dd73988a5b0912bcbfc814b8a09f5e
[ "MIT" ]
null
null
null
""" Reads txt files of all papers and computes tfidf vectors for all papers. Dumps results to file tfidf.p """ from random import shuffle, seed import numpy as np from sklearn.feature_extraction.text import TfidfVectorizer from utils import Config, safe_pickle_dump, load_db seed(1337) # max number of tfidf training ...
30.16129
86
0.665241
from random import shuffle, seed import numpy as np from sklearn.feature_extraction.text import TfidfVectorizer from utils import Config, safe_pickle_dump, load_db seed(1337) max_train = 50000 max_features = 50000 db = load_db() v = TfidfVectorizer(input='content', encoding='utf-8', decode_e...
true
true
1c41e79428ccc78350c14e36be5eb7e42d55120c
1,332
py
Python
onnx/backend/test/case/node/sub.py
MISC-FORKS-cqc/onnx
c50f329dcde038aa364082e0942764d36fcd1448
[ "MIT" ]
null
null
null
onnx/backend/test/case/node/sub.py
MISC-FORKS-cqc/onnx
c50f329dcde038aa364082e0942764d36fcd1448
[ "MIT" ]
null
null
null
onnx/backend/test/case/node/sub.py
MISC-FORKS-cqc/onnx
c50f329dcde038aa364082e0942764d36fcd1448
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np # type: ignore import onnx from ..base import Base from . import expect class Sub(Base): @staticmethod def export(): # type: () -> None ...
27.183673
55
0.534535
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np import onnx from ..base import Base from . import expect class Sub(Base): @staticmethod def export(): node = onnx.helper.make_n...
true
true
1c41e7a1c7e0d3146cfddb69b0578fd1dab77acf
4,296
py
Python
var/spack/repos/builtin/packages/parsec/package.py
player1537-forks/spack
822b7632222ec5a91dc7b7cda5fc0e08715bd47c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/parsec/package.py
player1537-forks/spack
822b7632222ec5a91dc7b7cda5fc0e08715bd47c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
6
2022-01-08T08:41:11.000Z
2022-03-14T19:28:07.000Z
var/spack/repos/builtin/packages/parsec/package.py
player1537-forks/spack
822b7632222ec5a91dc7b7cda5fc0e08715bd47c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) # import llnl.util.tty as tty from spack import * class Parsec(CMakePackage, CudaPackage): """PaRSEC: the Parallel R...
46.193548
162
0.657356
import llnl.util.tty as tty from spack import * class Parsec(CMakePackage, CudaPackage): homepage = "https://icl.utk.edu/dte" git = "https://bitbucket.org/icldistcomp/parsec.git" url = "https://bitbucket.org/icldistcomp/parsec/get/parsec-3.0.2012.tar.bz2" list_url = "https...
true
true
1c41e7ca0948d717b2ec25a4757732e776cf92a4
27,997
py
Python
heat/tests/test_instance_group_update_policy.py
NeCTAR-RC/heat
b152817f192a7b46514793633ddc968c1fe1ebf8
[ "Apache-2.0" ]
1
2015-02-26T03:23:23.000Z
2015-02-26T03:23:23.000Z
heat/tests/test_instance_group_update_policy.py
NeCTAR-RC/heat
b152817f192a7b46514793633ddc968c1fe1ebf8
[ "Apache-2.0" ]
null
null
null
heat/tests/test_instance_group_update_policy.py
NeCTAR-RC/heat
b152817f192a7b46514793633ddc968c1fe1ebf8
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
40.871533
79
0.628353
import copy import json import mox from testtools.matchers import MatchesRegex from heat.common import exception from heat.common import template_format from heat.engine import parser from heat.engine.resources import image from heat.engine.resources import instance from heat.engine.resources import nova...
true
true
1c41e869cae5058a7a785d253d72491a018dee1a
26
py
Python
data/studio21_generated/introductory/4489/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
data/studio21_generated/introductory/4489/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
data/studio21_generated/introductory/4489/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
def sum_consecutives(s):
13
24
0.769231
def sum_consecutives(s):
false
true
1c41e8791b5c99f8614c868a92b2094f833ec4b4
28,004
py
Python
salt/cloud/clouds/joyent.py
kev009/salt
aecd53203eca51e150128ae7c9ad2a979d004127
[ "Apache-2.0" ]
null
null
null
salt/cloud/clouds/joyent.py
kev009/salt
aecd53203eca51e150128ae7c9ad2a979d004127
[ "Apache-2.0" ]
null
null
null
salt/cloud/clouds/joyent.py
kev009/salt
aecd53203eca51e150128ae7c9ad2a979d004127
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Joyent Cloud Module =================== The Joyent Cloud module is used to interact with the Joyent cloud system. Set up the cloud configuration at ``/etc/salt/cloud.providers`` or ``/etc/salt/cloud.providers.d/joyent.conf``: .. code-block:: yaml my-joyent-config: provider: joy...
25.953661
103
0.595094
from __future__ import absolute_import import os import json import logging import base64 import pprint import inspect import yaml import datetime from Crypto.Hash import SHA256 from Crypto.PublicKey import RSA from Crypto.Signature import PKCS1_v1_5 import salt.ext.six as six import salt.utils.http import salt.u...
true
true
1c41e8d446e7e12112fc42785b64eb62c8407fb0
3,705
py
Python
test/test_special_iocommands.py
LinusCDE/okcli
e52e1a7d5272f0d4b0cdeaa66af9d4a4de953319
[ "BSD-3-Clause" ]
29
2020-01-19T10:36:36.000Z
2022-03-10T15:17:43.000Z
test/test_special_iocommands.py
LinusCDE/okcli
e52e1a7d5272f0d4b0cdeaa66af9d4a4de953319
[ "BSD-3-Clause" ]
4
2019-11-10T04:03:42.000Z
2021-03-26T03:14:37.000Z
test/test_special_iocommands.py
LinusCDE/okcli
e52e1a7d5272f0d4b0cdeaa66af9d4a4de953319
[ "BSD-3-Clause" ]
4
2019-11-08T13:59:05.000Z
2022-02-09T22:47:20.000Z
# coding: utf-8 import os import stat import tempfile import pytest import okcli.packages.special from okcli.packages.special.main import CommandNotFound from utils import db_connection, dbtest def test_set_get_pager(): okcli.packages.special.set_pager_enabled(True) assert okcli.packages.special.is_pager_en...
34.305556
79
0.700675
import os import stat import tempfile import pytest import okcli.packages.special from okcli.packages.special.main import CommandNotFound from utils import db_connection, dbtest def test_set_get_pager(): okcli.packages.special.set_pager_enabled(True) assert okcli.packages.special.is_pager_enabled() okc...
true
true
1c41e93c89e0bc46ad2a5fa43da6421ec55bfee9
536
py
Python
recipes/libtasn1/all/test_package/conanfile.py
rockandsalt/conan-center-index
d739adcec3e4dd4c250eff559ceb738e420673dd
[ "MIT" ]
562
2019-09-04T12:23:43.000Z
2022-03-29T16:41:43.000Z
recipes/libtasn1/all/test_package/conanfile.py
rockandsalt/conan-center-index
d739adcec3e4dd4c250eff559ceb738e420673dd
[ "MIT" ]
9,799
2019-09-04T12:02:11.000Z
2022-03-31T23:55:45.000Z
recipes/libtasn1/all/test_package/conanfile.py
rockandsalt/conan-center-index
d739adcec3e4dd4c250eff559ceb738e420673dd
[ "MIT" ]
1,126
2019-09-04T11:57:46.000Z
2022-03-31T16:43:38.000Z
from conans import ConanFile, CMake, tools import os class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "cmake" def build(self): cmake = CMake(self) cmake.configure() cmake.build() def test(self): if not tools.cross_build...
28.210526
73
0.615672
from conans import ConanFile, CMake, tools import os class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "cmake" def build(self): cmake = CMake(self) cmake.configure() cmake.build() def test(self): if not tools.cross_build...
true
true
1c41eaa03ba7d884eb4c6be59cf06a01ad694350
126
py
Python
setup.py
gditzler/ProtoShotXAI-1
223d3da37397d35096238bbf49f6315ac8c2894c
[ "MIT" ]
1
2021-11-17T08:43:50.000Z
2021-11-17T08:43:50.000Z
setup.py
gditzler/ProtoShotXAI-1
223d3da37397d35096238bbf49f6315ac8c2894c
[ "MIT" ]
null
null
null
setup.py
gditzler/ProtoShotXAI-1
223d3da37397d35096238bbf49f6315ac8c2894c
[ "MIT" ]
2
2021-12-02T23:35:38.000Z
2021-12-02T23:35:53.000Z
from setuptools import setup, find_packages setup( name='ProtoShotXAI', version='1.0', packages=find_packages() )
18
43
0.706349
from setuptools import setup, find_packages setup( name='ProtoShotXAI', version='1.0', packages=find_packages() )
true
true
1c41eb030bae28e89f34356c9f0d71679d6a4f15
22,940
py
Python
tests/integration/modules/test_pip.py
springborland/salt
bee85e477d57e9a171884e54fefb9a59d0835ed0
[ "Apache-2.0" ]
1
2020-04-09T03:25:10.000Z
2020-04-09T03:25:10.000Z
tests/integration/modules/test_pip.py
springborland/salt
bee85e477d57e9a171884e54fefb9a59d0835ed0
[ "Apache-2.0" ]
null
null
null
tests/integration/modules/test_pip.py
springborland/salt
bee85e477d57e9a171884e54fefb9a59d0835ed0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ tests.integration.modules.pip ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ """ # Import python libs from __future__ import absolute_import, print_function, unicode_literals import os import pprint import re import shutil import sys import tempfile # Import salt libs import salt.utils.files import salt.u...
37.179903
105
0.564037
from __future__ import absolute_import, print_function, unicode_literals import os import pprint import re import shutil import sys import tempfile import salt.utils.files import salt.utils.path import salt.utils.platform from salt.modules.virtualenv_mod import KNOWN_BINARY_NAMES from tests.support.case import Mo...
true
true
1c41ebabc106d700de6df5026715d4856ee4b861
1,481
py
Python
auto_editor/interpolate.py
cysk003/auto-editor
e027d897fd5ee842deaf2db3e4fea81d909b343b
[ "Unlicense" ]
1
2021-03-17T03:44:51.000Z
2021-03-17T03:44:51.000Z
auto_editor/interpolate.py
cysk003/auto-editor
e027d897fd5ee842deaf2db3e4fea81d909b343b
[ "Unlicense" ]
null
null
null
auto_editor/interpolate.py
cysk003/auto-editor
e027d897fd5ee842deaf2db3e4fea81d909b343b
[ "Unlicense" ]
null
null
null
'''interpolate.py''' import math def linear(x: int, y: int, n: int) -> list: b = [x] step = (y - x) / n incre = x for _ in range(n - 2): incre += step b.append(incre) b.append(y) return b # See how these formulas are derived: # - https://www.desmos.com/calculator/jj4tociyb4 ...
20.859155
77
0.488859
import math def linear(x: int, y: int, n: int) -> list: b = [x] step = (y - x) / n incre = x for _ in range(n - 2): incre += step b.append(incre) b.append(y) return b def sine(x, y, n: int) -> list: b = [x] incre = 0 for _ in range(n - 2): incre +...
true
true
1c41ec8e80bab40b9157f039fb6c7beb59ca8cd6
468
py
Python
frappe-bench/apps/erpnext/erpnext/patches/v7_0/update_prevdoc_values_for_supplier_quotation_item.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v7_0/update_prevdoc_values_for_supplier_quotation_item.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v7_0/update_prevdoc_values_for_supplier_quotation_item.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
import frappe def execute(): frappe.reload_doctype('Supplier Quotation Item') for data in frappe.db.sql(""" select prevdoc_docname, prevdoc_detail_docname, name from `tabSupplier Quotation Item` where prevdoc_docname is not null""", as_dict=True): frappe.db.set_value("Supplier Quotation Item", data.name, "materi...
58.5
113
0.794872
import frappe def execute(): frappe.reload_doctype('Supplier Quotation Item') for data in frappe.db.sql(""" select prevdoc_docname, prevdoc_detail_docname, name from `tabSupplier Quotation Item` where prevdoc_docname is not null""", as_dict=True): frappe.db.set_value("Supplier Quotation Item", data.name, "materi...
true
true
1c41eddbcb665b20c36629b49fac1572c0ff3214
3,424
py
Python
elmextensions/embeddedterminal.py
JeffHoogland/python-elm-extensions
165ba2f0df38382b3e2bb7e8dbed9724633501ab
[ "BSD-3-Clause" ]
8
2015-02-01T15:14:17.000Z
2018-08-12T21:57:05.000Z
elmextensions/embeddedterminal.py
JeffHoogland/python-elm-extensions
165ba2f0df38382b3e2bb7e8dbed9724633501ab
[ "BSD-3-Clause" ]
5
2015-02-04T03:02:51.000Z
2017-08-06T16:07:52.000Z
elmextensions/embeddedterminal.py
JeffHoogland/python-elm-extensions
165ba2f0df38382b3e2bb7e8dbed9724633501ab
[ "BSD-3-Clause" ]
6
2015-02-03T23:46:28.000Z
2020-04-22T14:25:33.000Z
from efl import ecore from efl.elementary.box import Box from efl.elementary.frame import Frame from efl.elementary.button import Button from efl.elementary.entry import Entry, markup_to_utf8 from efl.evas import EVAS_HINT_EXPAND, EVAS_HINT_FILL EXPAND_BOTH = EVAS_HINT_EXPAND, EVAS_HINT_EXPAND EXPAND_HORIZ = EVAS_HINT...
34.938776
90
0.625876
from efl import ecore from efl.elementary.box import Box from efl.elementary.frame import Frame from efl.elementary.button import Button from efl.elementary.entry import Entry, markup_to_utf8 from efl.evas import EVAS_HINT_EXPAND, EVAS_HINT_FILL EXPAND_BOTH = EVAS_HINT_EXPAND, EVAS_HINT_EXPAND EXPAND_HORIZ = EVAS_HINT...
true
true
1c41ee729bf77b324242364358d2d779a37b648f
2,683
py
Python
apps/utils/base_crypt.py
kiritoscs/bk-log
4801b14182ba7cb108d968cd4f33668ee2d16dbc
[ "MIT" ]
null
null
null
apps/utils/base_crypt.py
kiritoscs/bk-log
4801b14182ba7cb108d968cd4f33668ee2d16dbc
[ "MIT" ]
null
null
null
apps/utils/base_crypt.py
kiritoscs/bk-log
4801b14182ba7cb108d968cd4f33668ee2d16dbc
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making BK-LOG 蓝鲸日志平台 available. Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. BK-LOG 蓝鲸日志平台 is licensed under the MIT License. License for BK-LOG 蓝鲸日志平台: ------------------------------------------------...
40.651515
111
0.710026
from __future__ import absolute_import from __future__ import unicode_literals import base64 from Crypto.Cipher import AES from django.conf import settings class BaseCrypt(object): _bk_crypt = False ROOT_KEY = b"TencentBkApp-Key" ROOT_IV = b"TencentBkApp--Iv" def __init__(self, instance_key=...
true
true
1c41ef2c5dea949cf3dbf13ee2295b6900f98748
1,556
py
Python
logreader/lineage.py
thundersen/ohol-data
6a8f9a3572e3149e222f38d226b1572ac25c07b3
[ "MIT" ]
null
null
null
logreader/lineage.py
thundersen/ohol-data
6a8f9a3572e3149e222f38d226b1572ac25c07b3
[ "MIT" ]
null
null
null
logreader/lineage.py
thundersen/ohol-data
6a8f9a3572e3149e222f38d226b1572ac25c07b3
[ "MIT" ]
null
null
null
from datetime import timedelta from datetimerange import DateTimeRange class Lineage: max_descendants = 0 max_duration = timedelta(seconds=0) def __init__(self, eve): self.eve = eve eve_descendants = self.eve.descendants() self._characters = [self.eve] + eve_descendants ...
27.298246
94
0.643959
from datetime import timedelta from datetimerange import DateTimeRange class Lineage: max_descendants = 0 max_duration = timedelta(seconds=0) def __init__(self, eve): self.eve = eve eve_descendants = self.eve.descendants() self._characters = [self.eve] + eve_descendants ...
true
true
1c41f0d7e3d1f1d8c4780884483f3c9dd0e530d8
1,858
py
Python
ecs/numpy/core/fromnumeric.py
gongqingfeng/huawei-codecraft
89b9bff78aa90a09ab391e20570ebbe660336f38
[ "MIT" ]
null
null
null
ecs/numpy/core/fromnumeric.py
gongqingfeng/huawei-codecraft
89b9bff78aa90a09ab391e20570ebbe660336f38
[ "MIT" ]
null
null
null
ecs/numpy/core/fromnumeric.py
gongqingfeng/huawei-codecraft
89b9bff78aa90a09ab391e20570ebbe660336f38
[ "MIT" ]
null
null
null
"""Module containing non-deprecated functions borrowed from Numeric. """ from __future__ import division, absolute_import, print_function import types from .numeric import asarray # functions that are methods __all__ = [ 'amax', 'amin', 'mean', 'round_' ] try: _gentype = types.G...
27.323529
68
0.582885
from __future__ import division, absolute_import, print_function import types from .numeric import asarray __all__ = [ 'amax', 'amin', 'mean', 'round_' ] try: _gentype = types.GeneratorType except AttributeError: _gentype = type(None) def amax(a, axis=None, out=None, keep...
true
true
1c41f2b441c93c4135dbb4c2c26daffe49f2da7f
943
py
Python
scripts/dataset/common.py
heptaliane/CycleGanTrainerPytorch
63380cd4129b959a86a8ce1b30fd4c13830ac6f3
[ "MIT" ]
null
null
null
scripts/dataset/common.py
heptaliane/CycleGanTrainerPytorch
63380cd4129b959a86a8ce1b30fd4c13830ac6f3
[ "MIT" ]
null
null
null
scripts/dataset/common.py
heptaliane/CycleGanTrainerPytorch
63380cd4129b959a86a8ce1b30fd4c13830ac6f3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import glob class DatasetDirectory(): def __init__(self, dirpath, ext='', rm_ext=True): self._path = dirpath self.ext = ext self._rm_ext = rm_ext os.makedirs(dirpath, exist_ok=True) def __str__(self): return os.path.join(self._path, '...
24.179487
70
0.576882
import os import glob class DatasetDirectory(): def __init__(self, dirpath, ext='', rm_ext=True): self._path = dirpath self.ext = ext self._rm_ext = rm_ext os.makedirs(dirpath, exist_ok=True) def __str__(self): return os.path.join(self._path, '*%s' % self.ext) @...
true
true
1c41f353898b15f4887409f1dd7b968e62b34230
2,098
py
Python
services/ingest-file/ingestors/support/encoding.py
jalmquist/aleph
28a56bc7edd77dbd7910c94dac40916032edc177
[ "MIT" ]
7
2020-02-18T14:35:10.000Z
2020-03-09T22:53:10.000Z
services/ingest-file/ingestors/support/encoding.py
jalmquist/aleph
28a56bc7edd77dbd7910c94dac40916032edc177
[ "MIT" ]
4
2021-09-08T02:07:35.000Z
2022-03-12T00:33:46.000Z
services/ingest-file/ingestors/support/encoding.py
jalmquist/aleph
28a56bc7edd77dbd7910c94dac40916032edc177
[ "MIT" ]
null
null
null
import logging import chardet from normality import stringify, guess_encoding from normality.encoding import guess_file_encoding, normalize_result from normality.encoding import normalize_encoding from ingestors.exc import ProcessingException log = logging.getLogger(__name__) class EncodingSupport(object): """D...
34.393443
75
0.618684
import logging import chardet from normality import stringify, guess_encoding from normality.encoding import guess_file_encoding, normalize_result from normality.encoding import normalize_encoding from ingestors.exc import ProcessingException log = logging.getLogger(__name__) class EncodingSupport(object): DEFA...
true
true
1c41f35fbb870118e1cc69183ab2e3fb1f90a153
28,671
py
Python
tronapi/trx.py
sonicskye/tron-api-python
eba4d5d1eb27b95ea69e2f9e0fbf05c819012b7e
[ "MIT" ]
1
2018-12-20T22:09:39.000Z
2018-12-20T22:09:39.000Z
tronapi/trx.py
sonicskye/tron-api-python
eba4d5d1eb27b95ea69e2f9e0fbf05c819012b7e
[ "MIT" ]
null
null
null
tronapi/trx.py
sonicskye/tron-api-python
eba4d5d1eb27b95ea69e2f9e0fbf05c819012b7e
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------- # Copyright (c) iEXBase. All rights reserved. # Licensed under the MIT License. # See License.txt in the project root for license information. # -------------------------------------------------------------------- """ tronapi.trx ==========...
31.232026
101
0.5997
import math from typing import Any from eth_account import Account from tronapi.base.transactions import wait_for_transaction_id from tronapi.contract import Contract from tronapi.exceptions import InvalidTronError, TronError, TimeExhausted from tronapi.module import Module from tronapi.utils.blocks import sel...
true
true
1c41f38a304fee9acbe8dcd174694925a69d4026
737
py
Python
gc_apps/geo_utils/file_hasher.py
IQSS/geoconnect
09c91be7ffbc04fbfa9850f6b740277d971ac8a7
[ "Apache-2.0" ]
6
2015-10-28T15:35:04.000Z
2020-08-20T10:18:33.000Z
gc_apps/geo_utils/file_hasher.py
IQSS/geoconnect
09c91be7ffbc04fbfa9850f6b740277d971ac8a7
[ "Apache-2.0" ]
50
2015-01-05T15:09:00.000Z
2021-06-30T04:11:36.000Z
gc_apps/geo_utils/file_hasher.py
IQSS/geoconnect
09c91be7ffbc04fbfa9850f6b740277d971ac8a7
[ "Apache-2.0" ]
2
2017-02-28T02:18:49.000Z
2017-07-14T02:40:43.000Z
import hashlib def hashfile(file_path, hasher=hashlib.md5(), blocksize=65536): """For verifying checksums of bigger files From: http://stackoverflow.com/questions/3431825/generating-a-md5-checksum-of-a-file :param file_path: full path to file to check :type file_path: string or unicode :param...
30.708333
88
0.660787
import hashlib def hashfile(file_path, hasher=hashlib.md5(), blocksize=65536): if file_path is None or hasher is None: return None fhandler = open(file_path, 'rb') buf = fhandler.read(blocksize) while len(buf) > 0: hasher.update(buf) buf = fhandler.read(blocksize...
true
true
1c41f3db279e3c4e09bf5816b442f61dd9fd181e
6,771
py
Python
git_stacktrace/server.py
fakeNetflix/pinterest-repo-git-stacktrace
3c9681c167f0b07288743e2fb65cf37db6023377
[ "Apache-2.0" ]
null
null
null
git_stacktrace/server.py
fakeNetflix/pinterest-repo-git-stacktrace
3c9681c167f0b07288743e2fb65cf37db6023377
[ "Apache-2.0" ]
null
null
null
git_stacktrace/server.py
fakeNetflix/pinterest-repo-git-stacktrace
3c9681c167f0b07288743e2fb65cf37db6023377
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function import json import logging import os from cgi import escape from git_stacktrace import api from six.moves.html_parser import HTMLParser from six.moves.urllib_parse import parse_qs from string import Template log = logging.getLogger(__name__) dir_path = os.path.dirname(os.path.re...
31.938679
100
0.560331
from __future__ import print_function import json import logging import os from cgi import escape from git_stacktrace import api from six.moves.html_parser import HTMLParser from six.moves.urllib_parse import parse_qs from string import Template log = logging.getLogger(__name__) dir_path = os.path.dirname(os.path.re...
true
true
1c41f440650c94402b8519babfeabcfcf87ebd3a
1,314
py
Python
app/recipe/serializers.py
mahinm20/recipe-app-api
f9d6c69ae71cdd3c265f50b503cb027c6cb307a9
[ "MIT" ]
null
null
null
app/recipe/serializers.py
mahinm20/recipe-app-api
f9d6c69ae71cdd3c265f50b503cb027c6cb307a9
[ "MIT" ]
null
null
null
app/recipe/serializers.py
mahinm20/recipe-app-api
f9d6c69ae71cdd3c265f50b503cb027c6cb307a9
[ "MIT" ]
null
null
null
from rest_framework import serializers from core.models import Tag, Ingredient, Recipe class TagSerializer(serializers.ModelSerializer): class Meta: model = Tag fields = ('id','name') read_only_field = ('id',) class IngredientSerializer(serializers.ModelSerializer): class Meta: ...
23.890909
74
0.636225
from rest_framework import serializers from core.models import Tag, Ingredient, Recipe class TagSerializer(serializers.ModelSerializer): class Meta: model = Tag fields = ('id','name') read_only_field = ('id',) class IngredientSerializer(serializers.ModelSerializer): class Meta: ...
true
true
1c41f4b8767f74cf84df48568599996ec6265e81
581
py
Python
igamelister/amiga/kickstart.py
chris-vg/igamelister
807f4d504911341edbc7ffc187c3a19b29a72ace
[ "MIT" ]
null
null
null
igamelister/amiga/kickstart.py
chris-vg/igamelister
807f4d504911341edbc7ffc187c3a19b29a72ace
[ "MIT" ]
null
null
null
igamelister/amiga/kickstart.py
chris-vg/igamelister
807f4d504911341edbc7ffc187c3a19b29a72ace
[ "MIT" ]
null
null
null
class Kickstart: """Represents a Kickstart ROM used by a WHDLoad Slave. """ name = None checksum = None def __init__(self, name: str, checksum: int) -> None: """Initialize a new instance of the Kickstart class. :param name: The name of the Kickstart ROM. :param checksum: Th...
27.666667
67
0.609294
class Kickstart: name = None checksum = None def __init__(self, name: str, checksum: int) -> None: self.name = name self.checksum = checksum def __hash__(self): return hash((self.name, self.checksum)) def __str__(self): return f"{self.name} ({hex(self.checksum)})"
true
true
1c41f5160840f5e973981924338d7cbdf89f91b9
5,139
py
Python
app/project/settings/base.py
Thibaut-Deveraux/explore.ac
b7a536101cb0560239e81d919e6f290b687710b9
[ "MIT" ]
5
2020-10-28T12:51:05.000Z
2022-02-26T01:25:11.000Z
app/project/settings/base.py
Thibaut-Deveraux/explore.ac
b7a536101cb0560239e81d919e6f290b687710b9
[ "MIT" ]
1
2019-07-25T10:57:53.000Z
2019-07-25T10:57:53.000Z
app/project/settings/base.py
Thibdx/explore.ac
b7a536101cb0560239e81d919e6f290b687710b9
[ "MIT" ]
null
null
null
""" Django settings for project project. Generated by 'django-admin startproject' using Django 2.2.1. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ # Build path...
27.778378
95
0.69605
import os PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) BASE_DIR = os.path.dirname(PROJECT_DIR) SECRET_KEY = os.getenv('SECRET_KEY','oxdmu06k18^8wb6m+z3+9^5p-qlapr0!w0$5n#rye@ojf@jb') # MODIFIED ! if os.getenv('PRODUCTION','') == 'true' : DEBUG = False else: DEBUG = True ...
true
true
1c41f54fbf7c3f3a79cb23d6fac3f1966d269193
3,156
py
Python
tests/unit/states/zcbuildout_test.py
preoctopus/salt
aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d
[ "Apache-2.0" ]
18
2015-02-22T12:53:50.000Z
2019-03-15T16:45:10.000Z
tests/unit/states/zcbuildout_test.py
preoctopus/salt
aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d
[ "Apache-2.0" ]
20
2015-01-20T22:35:02.000Z
2017-11-06T11:17:34.000Z
tests/unit/states/zcbuildout_test.py
preoctopus/salt
aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d
[ "Apache-2.0" ]
5
2015-01-13T04:23:09.000Z
2019-01-03T17:00:31.000Z
# -*- coding: utf-8 -*- # Import python libs from __future__ import absolute_import import os # Import Salt Testing libs from salttesting import skipIf from salttesting.helpers import ( ensure_in_syspath, requires_network, ) ensure_in_syspath('../../') import integration # Import Salt libs import salt.utils...
32.536082
76
0.635615
from __future__ import absolute_import import os from salttesting import skipIf from salttesting.helpers import ( ensure_in_syspath, requires_network, ) ensure_in_syspath('../../') import integration import salt.utils from unit.modules.zcbuildout_test import Base, KNOWN_VIRTUALENV_BINARY_NAMES from salt...
true
true
1c41f5fa7b3556c63c188517d6047efbd9927883
2,030
py
Python
make/uglify.py
Polychart/polychart2
4ac837ad4ee007aa291fb18a9df9eae810191954
[ "MIT" ]
64
2015-01-05T11:15:48.000Z
2021-07-08T01:30:39.000Z
make/uglify.py
Polychart/polychart2
4ac837ad4ee007aa291fb18a9df9eae810191954
[ "MIT" ]
2
2016-02-27T10:49:52.000Z
2017-01-26T00:03:09.000Z
make/uglify.py
Polychart/polychart2
4ac837ad4ee007aa291fb18a9df9eae810191954
[ "MIT" ]
19
2015-01-10T15:04:41.000Z
2019-04-06T19:37:23.000Z
#!/usr/bin/env python import argparse import subprocess import json import os def uglify_js(source, dest): # multiple (possible) implementations. # 1. uglify.js - fast, but fails hard without good error message on js syntax error. # 2. closure compiler (api) - easy to use via HTTP API. # 3. closure compiler (j...
32.741935
86
0.650246
import argparse import subprocess import json import os def uglify_js(source, dest): nt "Trying local closure compilation..." compiler = os.path.join(os.getcwd(), 'make/compiler.jar') cmd = [('java -jar %s' % compiler), ('--js=%s' % source), ('--js_output_file=%s' % dest) ] ...
false
true
1c41f61bd8a46c108a8e9aa698a2b42f2628b203
581
py
Python
sonia_navigation_states/src/sonia_navigation_states/modules/navigation_utilities.py
sonia-auv/sonia-behaviors
28519551f954616e83b474e6cab6ba3762d238f2
[ "BSD-3-Clause" ]
null
null
null
sonia_navigation_states/src/sonia_navigation_states/modules/navigation_utilities.py
sonia-auv/sonia-behaviors
28519551f954616e83b474e6cab6ba3762d238f2
[ "BSD-3-Clause" ]
1
2022-02-16T01:31:51.000Z
2022-02-21T22:30:46.000Z
sonia_navigation_states/src/sonia_navigation_states/modules/navigation_utilities.py
sonia-auv/sonia-behaviors
28519551f954616e83b474e6cab6ba3762d238f2
[ "BSD-3-Clause" ]
1
2021-11-09T13:34:43.000Z
2021-11-09T13:34:43.000Z
# Navigation function libraries. # Usefull for navigation states # includes from sonia_common.msg import AddPose, MultiAddPose # fill and return an addpose object def addpose( x, y, z, rx, ry,rz, frame, speed, fine, rot): buffer = AddPose() buffer.position.x = x buffer.position.y = y ...
27.666667
58
0.628227
from sonia_common.msg import AddPose, MultiAddPose def addpose( x, y, z, rx, ry,rz, frame, speed, fine, rot): buffer = AddPose() buffer.position.x = x buffer.position.y = y buffer.position.z = z buffer.orientation.x = rx buffer.orientation.y = ry buffer.orie...
true
true
1c41f62ab5976273b38fd1d35a4484ea7b232115
8,866
py
Python
siamese_tracking/test_siamrpn.py
FMsunyh/SiamDW
ef7a97ee6bdf732edbb7dc2943daf15b92535019
[ "MIT" ]
null
null
null
siamese_tracking/test_siamrpn.py
FMsunyh/SiamDW
ef7a97ee6bdf732edbb7dc2943daf15b92535019
[ "MIT" ]
null
null
null
siamese_tracking/test_siamrpn.py
FMsunyh/SiamDW
ef7a97ee6bdf732edbb7dc2943daf15b92535019
[ "MIT" ]
null
null
null
# ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. # Written by Houwen Peng and Zhipeng Zhang # Email: houwen.peng@microsoft.com # Clean testing scripts for SiamRPN # New: support GENE and TPE tuning # ---------------------...
37.252101
129
0.565531
import _init_paths import os import cv2 import random import argparse import numpy as np from os.path import exists, join import models.models as models from tracker.siamrpn import SiamRPN from torch.autograd import Variable from easydict import EasyDict as edict from utils.utils import load_pretr...
true
true
1c41f6623efb264d5446ee55e530428b257b58c3
626
py
Python
ros/build/waypoint_follower/catkin_generated/pkg.develspace.context.pc.py
Emad-W/CarND-Capstone-Project
d058533d0815559918f4128051b12d47b995980d
[ "MIT" ]
null
null
null
ros/build/waypoint_follower/catkin_generated/pkg.develspace.context.pc.py
Emad-W/CarND-Capstone-Project
d058533d0815559918f4128051b12d47b995980d
[ "MIT" ]
10
2019-12-16T22:12:07.000Z
2022-02-10T00:24:31.000Z
ros/build/waypoint_follower/catkin_generated/pkg.develspace.context.pc.py
Emad-W/CarND-Capstone-Project
d058533d0815559918f4128051b12d47b995980d
[ "MIT" ]
null
null
null
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/student/capstone/CarND-Capstone/ros/src/waypoint_follower/include".split(';') if "/home/student/capstone/CarND-Capstone/ros/src/waypoint_follower/include" != "" else [] PROJECT_CATKIN_DEPENDS = "...
69.555556
209
0.78115
CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/student/capstone/CarND-Capstone/ros/src/waypoint_follower/include".split(';') if "/home/student/capstone/CarND-Capstone/ros/src/waypoint_follower/include" != "" else [] PROJECT_CATKIN_DEPENDS = "roscpp;std_msgs;tf;geometry_msgs;styx_msgs".replace(';',...
true
true
1c41f7aace29301015d66f27f3003cf64a0e2c9b
769
py
Python
tests/test_pool.py
evgenia-ch/happybase-mock
6fbf4a4f9685829b32ad8dc3de3e01b2a9fba964
[ "MIT" ]
9
2015-06-08T02:26:37.000Z
2018-12-13T09:45:04.000Z
tests/test_pool.py
evgenia-ch/happybase-mock
6fbf4a4f9685829b32ad8dc3de3e01b2a9fba964
[ "MIT" ]
5
2017-02-17T20:35:29.000Z
2019-12-27T09:33:14.000Z
tests/test_pool.py
evgenia-ch/happybase-mock
6fbf4a4f9685829b32ad8dc3de3e01b2a9fba964
[ "MIT" ]
7
2016-03-16T17:25:40.000Z
2019-10-15T13:00:05.000Z
from .base import BaseTestCase from happybase_mock.pool import Connection, ConnectionPool class TestConnectionPool(BaseTestCase): def tearDown(self): Connection._instances.clear() def test_connection(self): pool = ConnectionPool(5, host='myhost', port=9999, table_prefix='test') with ...
34.954545
79
0.626788
from .base import BaseTestCase from happybase_mock.pool import Connection, ConnectionPool class TestConnectionPool(BaseTestCase): def tearDown(self): Connection._instances.clear() def test_connection(self): pool = ConnectionPool(5, host='myhost', port=9999, table_prefix='test') with ...
true
true
1c41f7c69e44158c4efe46da3c150864b32701aa
27,495
py
Python
sdk/python/kfp/components/_structures.py
PabloRR100/pipelines
475b6e165f7cd4d6a330b5e3849377f3cba6f70e
[ "Apache-2.0" ]
null
null
null
sdk/python/kfp/components/_structures.py
PabloRR100/pipelines
475b6e165f7cd4d6a330b5e3849377f3cba6f70e
[ "Apache-2.0" ]
null
null
null
sdk/python/kfp/components/_structures.py
PabloRR100/pipelines
475b6e165f7cd4d6a330b5e3849377f3cba6f70e
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The Kubeflow Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
34.36875
245
0.657065
__all__ = [ 'InputSpec', 'OutputSpec', 'InputValuePlaceholder', 'InputPathPlaceholder', 'OutputPathPlaceholder', 'InputUriPlaceholder', 'OutputUriPlaceholder', 'InputMetadataPlaceholder', 'InputOutputPortNamePlaceholder', 'OutputMetadataPlaceholder', 'ExecutorI...
true
true
1c41f8c588032f50019617be31c2dd1199f80b94
21,038
py
Python
wsme/tests/protocol.py
mail2nsrajesh/wsme
9f84e4c7c59b172a09341af2ab496d07e29e01aa
[ "MIT" ]
2
2020-11-05T06:09:20.000Z
2021-01-03T07:22:18.000Z
wsme/tests/protocol.py
mail2nsrajesh/wsme
9f84e4c7c59b172a09341af2ab496d07e29e01aa
[ "MIT" ]
null
null
null
wsme/tests/protocol.py
mail2nsrajesh/wsme
9f84e4c7c59b172a09341af2ab496d07e29e01aa
[ "MIT" ]
null
null
null
# coding=utf-8 import unittest import warnings import datetime import decimal import six from six import u, b from webtest import TestApp from wsme import WSRoot, Unset from wsme import expose, validate import wsme.types import wsme.utils warnings.filterwarnings('ignore', module='webob.dec') binarysample = b('\x0...
29.178918
78
0.596445
import unittest import warnings import datetime import decimal import six from six import u, b from webtest import TestApp from wsme import WSRoot, Unset from wsme import expose, validate import wsme.types import wsme.utils warnings.filterwarnings('ignore', module='webob.dec') binarysample = b('\x00\xff\x43') t...
true
true
1c41f97d960e0a2706e8365e7924db3b951a7459
688
py
Python
test/example_thirdparty/urls.py
concentricsky/pybbm
90147b74cff4740e6580a94b073f5eb576a93b4f
[ "BSD-2-Clause" ]
null
null
null
test/example_thirdparty/urls.py
concentricsky/pybbm
90147b74cff4740e6580a94b073f5eb576a93b4f
[ "BSD-2-Clause" ]
null
null
null
test/example_thirdparty/urls.py
concentricsky/pybbm
90147b74cff4740e6580a94b073f5eb576a93b4f
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() from account.views import ChangePasswordView, SignupView, LoginView urlpatterns = patterns('', url(r'^admin/', include(admin.site.urls)), url(r'^accounts/', include('account.urls'...
34.4
92
0.706395
from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() from account.views import ChangePasswordView, SignupView, LoginView urlpatterns = patterns('', url(r'^admin/', include(admin.site.urls)), url(r'^accounts/', include('account.urls')), url(r"^ac...
true
true
1c41f99ef9bab31faa0ff0a5649e4712bb354f1f
3,347
py
Python
crafter/__init__.py
ahn-ml/crafter
1ff80195a6a60d97b3c6e5d88d1d0adc195a99a6
[ "MIT" ]
null
null
null
crafter/__init__.py
ahn-ml/crafter
1ff80195a6a60d97b3c6e5d88d1d0adc195a99a6
[ "MIT" ]
null
null
null
crafter/__init__.py
ahn-ml/crafter
1ff80195a6a60d97b3c6e5d88d1d0adc195a99a6
[ "MIT" ]
1
2022-03-08T06:06:03.000Z
2022-03-08T06:06:03.000Z
from .env import Env from .recorder import Recorder try: import gym gym.register( id="CrafterReward-v1", entry_point="crafter:Env", max_episode_steps=10000, kwargs={"reward": True}, ) gym.register( id="CrafterNoReward-v1", entry_point="crafter:Env", ...
27.211382
45
0.564386
from .env import Env from .recorder import Recorder try: import gym gym.register( id="CrafterReward-v1", entry_point="crafter:Env", max_episode_steps=10000, kwargs={"reward": True}, ) gym.register( id="CrafterNoReward-v1", entry_point="crafter:Env", ...
true
true
1c41f9f333035b2a106ed7f03155e9cf748d4f20
958
py
Python
prediction/bimod/BACs_and_TERF/C06_featurize.py
dylanhross/dmccs
8b403a90b6cb7edd9d7abc172462e9d9b62b5dd3
[ "MIT" ]
3
2021-05-17T20:19:41.000Z
2022-02-01T21:43:30.000Z
prediction/bimod/BACs_and_TERF/C06_featurize.py
dylanhross/dmccs
8b403a90b6cb7edd9d7abc172462e9d9b62b5dd3
[ "MIT" ]
null
null
null
prediction/bimod/BACs_and_TERF/C06_featurize.py
dylanhross/dmccs
8b403a90b6cb7edd9d7abc172462e9d9b62b5dd3
[ "MIT" ]
null
null
null
#!/usr/local/Cellar/python@3.9/3.9.1_6/bin/python3 """ """ from pickle import load as pload from numpy import savetxt import sys #from DmimData.data import DMD from helpers import featurize def main(): """ main execution sequence """ n = 5 smis = ['C[N+](C)(C)CCCCCC' for _ in range(n)] structures ...
25.210526
125
0.605428
from pickle import load as pload from numpy import savetxt import sys from helpers import featurize def main(): n = 5 smis = ['C[N+](C)(C)CCCCCC' for _ in range(n)] structures = [] for i in range(1, n + 1): fname = 'C06_c{}.out.mfj.xyzmq'.format(i) with open(fname, 'r') as f: ...
true
true
1c41faae474a370da44723347057b4d2fa3cd34b
517
py
Python
app/marketing/migrations/0002_interestedperson.py
jasonrhaas/jumbobrew
b36b3404ee3db7c67ef53b7ab902743923cb6ffe
[ "MIT" ]
null
null
null
app/marketing/migrations/0002_interestedperson.py
jasonrhaas/jumbobrew
b36b3404ee3db7c67ef53b7ab902743923cb6ffe
[ "MIT" ]
null
null
null
app/marketing/migrations/0002_interestedperson.py
jasonrhaas/jumbobrew
b36b3404ee3db7c67ef53b7ab902743923cb6ffe
[ "MIT" ]
null
null
null
# Generated by Django 2.0.2 on 2018-02-04 20:02 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('marketing', '0001_initial'), ] operations = [ migrations.CreateModel( name='InterestedPerson', fields=[ ...
24.619048
114
0.582205
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('marketing', '0001_initial'), ] operations = [ migrations.CreateModel( name='InterestedPerson', fields=[ ('id', models.AutoField(auto_created=True, ...
true
true
1c41fb4b767e368b4d845109191bf1e16037823c
17,333
py
Python
tetris/tetris_ai.py
beomjin-lee/tetris-ai
dcf1ebe609e5162dc586f24192e20cf319ad3700
[ "MIT" ]
null
null
null
tetris/tetris_ai.py
beomjin-lee/tetris-ai
dcf1ebe609e5162dc586f24192e20cf319ad3700
[ "MIT" ]
null
null
null
tetris/tetris_ai.py
beomjin-lee/tetris-ai
dcf1ebe609e5162dc586f24192e20cf319ad3700
[ "MIT" ]
null
null
null
############################################################### # Made by KSEA Project Research and SW Team 2018 at UC Berkeley # This file contains tetris game and tetris AI functions # AI is built using genetic algorithms # Authors: Beom Jin Lee <beomjin.lee@berkeley.edu>, # Gabi Choi < gabichoi96@gmail.com >, # Bria...
25.266764
145
0.633647
matrix = self.concat_dictionary(board) for cy, row in enumerate(shape): for cx, cell in enumerate(row): try: if cell and matrix[cy + offset_y][cx + offset_x]: return 1 except: return 2 return 0 def concat_dictionary(self, dictionary): """ Util: Combines the arrays in dictionary f...
false
true
1c41fd424828f0271d1d8b5dc77cbb913337a59f
405
py
Python
django/contrib/auth/migrations/0003_alter_user_email_max_length.py
Yoann-Vie/esgi-hearthstone
115d03426c7e8e80d89883b78ac72114c29bed12
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
django/contrib/auth/migrations/0003_alter_user_email_max_length.py
Yoann-Vie/esgi-hearthstone
115d03426c7e8e80d89883b78ac72114c29bed12
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
django/contrib/auth/migrations/0003_alter_user_email_max_length.py
Yoann-Vie/esgi-hearthstone
115d03426c7e8e80d89883b78ac72114c29bed12
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('auth', '0002_alter_permission_name_max_length'), ] operations = [ migrations.AlterField( model_name='user', name='email', field=models.Email...
23.823529
95
0.592593
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('auth', '0002_alter_permission_name_max_length'), ] operations = [ migrations.AlterField( model_name='user', name='email', field=models.Email...
true
true
1c41fd47a3343803bbe9b8b2460d63fc7e24a07c
2,484
py
Python
tests/algos/torch/test_awac_impl.py
meokz/d3rlpy
40504e2d8b424547558ab82786c523e8f4626a82
[ "MIT" ]
2
2021-04-21T08:19:29.000Z
2021-05-17T09:08:06.000Z
tests/algos/torch/test_awac_impl.py
meokz/d3rlpy
40504e2d8b424547558ab82786c523e8f4626a82
[ "MIT" ]
null
null
null
tests/algos/torch/test_awac_impl.py
meokz/d3rlpy
40504e2d8b424547558ab82786c523e8f4626a82
[ "MIT" ]
null
null
null
import pytest from d3rlpy.algos.torch.awac_impl import AWACImpl from d3rlpy.augmentation import AugmentationPipeline from tests.algos.algo_test import torch_impl_tester, DummyScaler @pytest.mark.parametrize('observation_shape', [(100, ), (4, 84, 84)]) @pytest.mark.parametrize('action_size', [2]) @pytest.mark.paramet...
43.578947
75
0.61876
import pytest from d3rlpy.algos.torch.awac_impl import AWACImpl from d3rlpy.augmentation import AugmentationPipeline from tests.algos.algo_test import torch_impl_tester, DummyScaler @pytest.mark.parametrize('observation_shape', [(100, ), (4, 84, 84)]) @pytest.mark.parametrize('action_size', [2]) @pytest.mark.paramet...
true
true
1c41fd6ec43de71dd5eba76cd30cb0585524749e
4,980
py
Python
tests/test_backward_compat.py
gnomonsis/nncf_pytorch
9fc4a92b5cb1b2c240e633c4ffa69b4fae1917fb
[ "Apache-2.0" ]
null
null
null
tests/test_backward_compat.py
gnomonsis/nncf_pytorch
9fc4a92b5cb1b2c240e633c4ffa69b4fae1917fb
[ "Apache-2.0" ]
4
2020-07-17T11:12:35.000Z
2021-12-15T15:20:24.000Z
tests/test_backward_compat.py
gnomonsis/nncf_pytorch
9fc4a92b5cb1b2c240e633c4ffa69b4fae1917fb
[ "Apache-2.0" ]
null
null
null
""" Copyright (c) 2019-2020 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in w...
38.307692
120
0.717269
import os import pytest import torch from examples.common.distributed import configure_distributed from examples.common.execution import ExecutionMode, prepare_model_for_execution, get_device from examples.common.model_loader import load_model from examples.common.sample_config import SampleConfig from nncf.checkpoin...
true
true
1c41fe15bec83b66b7dc0ac3836337a91beddffe
3,310
py
Python
utils/pascal_utils.py
miltonbd/ECCV_2018_pedestrian_detection_challenege
24448247530555e8f34f8caa35dd7a3a40cc17c0
[ "MIT" ]
18
2019-02-05T14:46:49.000Z
2020-08-12T21:48:45.000Z
utils/pascal_utils.py
miltonbd/ECCV_2018_pedestrian_detection_challenege
24448247530555e8f34f8caa35dd7a3a40cc17c0
[ "MIT" ]
null
null
null
utils/pascal_utils.py
miltonbd/ECCV_2018_pedestrian_detection_challenege
24448247530555e8f34f8caa35dd7a3a40cc17c0
[ "MIT" ]
3
2018-07-24T09:32:40.000Z
2019-03-19T09:27:41.000Z
from PIL import Image import xml.etree.ElementTree as ET from PIL import Image from xml.dom import minidom from statics import * from data_reader import * def write_pascal_annotation(file_name,obj_list,xml_file): annotation=ET.Element('annotation') filename=ET.SubElement(annotation,'filename') filename.te...
30.366972
71
0.661329
from PIL import Image import xml.etree.ElementTree as ET from PIL import Image from xml.dom import minidom from statics import * from data_reader import * def write_pascal_annotation(file_name,obj_list,xml_file): annotation=ET.Element('annotation') filename=ET.SubElement(annotation,'filename') filename.te...
true
true
1c41fe4d2ad877055a0e41bf4c9cdff8b60444ab
546
py
Python
stubs/micropython-v1_18-rp2/json.py
mattytrentini/micropython-stubs
4d596273823b69e9e5bcf5fa67f249c374ee0bbc
[ "MIT" ]
null
null
null
stubs/micropython-v1_18-rp2/json.py
mattytrentini/micropython-stubs
4d596273823b69e9e5bcf5fa67f249c374ee0bbc
[ "MIT" ]
null
null
null
stubs/micropython-v1_18-rp2/json.py
mattytrentini/micropython-stubs
4d596273823b69e9e5bcf5fa67f249c374ee0bbc
[ "MIT" ]
null
null
null
""" Module: 'json' on micropython-v1.18-rp2 """ # MCU: {'family': 'micropython', 'sysname': 'rp2', 'version': '1.18.0', 'build': '', 'mpy': 5637, 'port': 'rp2', 'platform': 'rp2', 'name': 'micropython', 'arch': 'armv7m', 'machine': 'Arduino Nano RP2040 Connect with RP2040', 'nodename': 'rp2', 'ver': 'v1.18', 'release':...
27.3
282
0.562271
from typing import Any def dump(*args, **kwargs) -> Any: ... def dumps(*args, **kwargs) -> Any: ... def load(*args, **kwargs) -> Any: ... def loads(*args, **kwargs) -> Any: ...
true
true
1c41feda7dafeca312b2738522ba59265eca075d
5,579
py
Python
homeassistant/components/deconz/logbook.py
andersop91/core
0e0ef0aa17073609eae7c974cf4c73306b7c414b
[ "Apache-2.0" ]
22,481
2020-03-02T13:09:59.000Z
2022-03-31T23:34:28.000Z
homeassistant/components/deconz/logbook.py
andersop91/core
0e0ef0aa17073609eae7c974cf4c73306b7c414b
[ "Apache-2.0" ]
31,101
2020-03-02T13:00:16.000Z
2022-03-31T23:57:36.000Z
homeassistant/components/deconz/logbook.py
andersop91/core
0e0ef0aa17073609eae7c974cf4c73306b7c414b
[ "Apache-2.0" ]
11,411
2020-03-02T14:19:20.000Z
2022-03-31T22:46:07.000Z
"""Describe deCONZ logbook events.""" from __future__ import annotations from collections.abc import Callable from homeassistant.const import ATTR_DEVICE_ID, CONF_EVENT from homeassistant.core import HomeAssistant, callback import homeassistant.helpers.device_registry as dr from homeassistant.helpers.event import Eve...
29.675532
93
0.666965
from __future__ import annotations from collections.abc import Callable from homeassistant.const import ATTR_DEVICE_ID, CONF_EVENT from homeassistant.core import HomeAssistant, callback import homeassistant.helpers.device_registry as dr from homeassistant.helpers.event import Event from .const import CONF_GESTURE, D...
true
true
1c41ff0f1e9374a337b72a555782b1b0a7bc7a72
2,269
py
Python
growler/responder.py
pyGrowler/Growler
5492466d8828115bb04c665917d6aeb4f4323f44
[ "Apache-2.0" ]
806
2015-02-18T18:54:40.000Z
2021-12-28T20:14:13.000Z
growler/responder.py
akubera/Growler
5492466d8828115bb04c665917d6aeb4f4323f44
[ "Apache-2.0" ]
16
2016-05-05T08:32:36.000Z
2020-03-08T08:01:43.000Z
growler/responder.py
pyGrowler/Growler
5492466d8828115bb04c665917d6aeb4f4323f44
[ "Apache-2.0" ]
36
2015-08-02T11:52:02.000Z
2020-05-09T15:25:29.000Z
# # growler/responder.py # """ Event loop independent class for managing clients' requests and server responses. """ from typing import Optional from asyncio import BaseTransport from socket import socket as Socket from abc import ABC, abstractmethod class GrowlerResponder(ABC): """ Abstract base class for ...
23.635417
67
0.655355
from typing import Optional from asyncio import BaseTransport from socket import socket as Socket from abc import ABC, abstractmethod class GrowlerResponder(ABC): @abstractmethod def on_data(self, data): raise NotImplementedError() class CoroutineResponder(GrowlerResponder): def __init__(se...
true
true
1c41ffc484f89a80d534cd8c6d48239d3916eb00
6,420
py
Python
sdk/python/pulumi_azure_nextgen/storage/get_object_replication_policy.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/storage/get_object_replication_policy.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/storage/get_object_replication_policy.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilities, _tables from ...
39.62963
210
0.668224
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilities, _tables from . import outputs __all__ = [ 'GetObjectReplicationPolicyResult', 'AwaitableGetObjectReplicationPolicyResult', 'get_object_replication_policy', ] @pulum...
true
true
1c420085b055ce7cdac960f6e45563c43bc3b205
5,881
py
Python
nemo_cmd/deflate.py
SalishSeaCast/NEMO-Cmd
a1fb05c4430e152a7dae57296bce364f73752129
[ "Apache-2.0" ]
1
2020-03-26T16:42:26.000Z
2020-03-26T16:42:26.000Z
nemo_cmd/deflate.py
SalishSeaCast/NEMO-Cmd
a1fb05c4430e152a7dae57296bce364f73752129
[ "Apache-2.0" ]
10
2020-03-23T21:19:25.000Z
2021-11-01T22:12:17.000Z
nemo_cmd/deflate.py
SalishSeaCast/NEMO-Cmd
a1fb05c4430e152a7dae57296bce364f73752129
[ "Apache-2.0" ]
null
null
null
# Copyright 2013-2021 The Salish Sea MEOPAR Contributors # and The University of British Columbia # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2...
32.672222
87
0.631185
import logging import math import multiprocessing from pathlib import Path import shlex import subprocess import time import attr import cliff.command logger = logging.getLogger(__name__) class Deflate(cliff.command.Command): def get_parser(self, prog_name): parser = super(Deflate, self)....
true
true
1c42009c0a71aced9a6872f98bae003b20e2d1ac
10,039
py
Python
hive/db/adapter.py
abitmore/hivemind
a68d8dd49d5d79caccf988a1ff6cba4703adae49
[ "MIT" ]
45
2021-05-23T21:06:49.000Z
2022-03-22T23:04:25.000Z
hive/db/adapter.py
abitmore/hivemind
a68d8dd49d5d79caccf988a1ff6cba4703adae49
[ "MIT" ]
1
2021-08-03T10:57:23.000Z
2021-08-03T10:58:05.000Z
hive/db/adapter.py
abitmore/hivemind
a68d8dd49d5d79caccf988a1ff6cba4703adae49
[ "MIT" ]
30
2021-05-28T16:23:53.000Z
2021-09-09T00:28:34.000Z
"""Wrapper for sqlalchemy, providing a simple interface.""" import logging from time import perf_counter as perf from collections import OrderedDict from funcy.seqs import first import sqlalchemy import os from hive.utils.stats import Stats from hive.db.autoexplain_controller import AutoExplainWrapper logging.getLog...
35.725979
148
0.589302
import logging from time import perf_counter as perf from collections import OrderedDict from funcy.seqs import first import sqlalchemy import os from hive.utils.stats import Stats from hive.db.autoexplain_controller import AutoExplainWrapper logging.getLogger('sqlalchemy.engine').setLevel(logging.WARNING) log = lo...
true
true
1c4200fb9ca8139d5608caf502d469c5d182aee3
12,081
py
Python
hydra/_internal/instantiate/_instantiate2.py
dmitryvinn/hydra-1
4d22c5628787d6b3a8d2303a99f906a06a4bbb28
[ "MIT" ]
null
null
null
hydra/_internal/instantiate/_instantiate2.py
dmitryvinn/hydra-1
4d22c5628787d6b3a8d2303a99f906a06a4bbb28
[ "MIT" ]
null
null
null
hydra/_internal/instantiate/_instantiate2.py
dmitryvinn/hydra-1
4d22c5628787d6b3a8d2303a99f906a06a4bbb28
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import copy import functools import sys from enum import Enum from typing import Any, Callable, Dict, List, Sequence, Tuple, Union from omegaconf import OmegaConf, SCMode from omegaconf._utils import is_structured_config from hydra._internal.util...
38.231013
117
0.612201
import copy import functools import sys from enum import Enum from typing import Any, Callable, Dict, List, Sequence, Tuple, Union from omegaconf import OmegaConf, SCMode from omegaconf._utils import is_structured_config from hydra._internal.utils import _locate from hydra.errors import InstantiationException from ...
true
true
1c42012066391dbb8a299e980528cd00c950bf18
762
py
Python
metagym/__init__.py
WorldEditors/MetaGym
ad7263fcc80abd6831965ab6b556d54f75e17315
[ "Apache-2.0" ]
null
null
null
metagym/__init__.py
WorldEditors/MetaGym
ad7263fcc80abd6831965ab6b556d54f75e17315
[ "Apache-2.0" ]
null
null
null
metagym/__init__.py
WorldEditors/MetaGym
ad7263fcc80abd6831965ab6b556d54f75e17315
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2018 PaddlePaddle 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 app...
42.333333
115
0.757218
def make_env(env_id, **kwargs): raise Exception("metagym.make_env is deprecated. Please do \"import metagym.xxxenv\" and use gym.make instead")
true
true
1c420174e99d11a117a8f4ac056ef0c432b6f766
2,791
py
Python
controllers/plugin_daxs_media_galley.py
daxslab/web2py-media-galley
a73a779216403cc625002c9f76f5503b7b29002c
[ "MIT" ]
1
2016-01-27T01:24:07.000Z
2016-01-27T01:24:07.000Z
controllers/plugin_daxs_media_galley.py
daxslab/web2py-media-galley
a73a779216403cc625002c9f76f5503b7b29002c
[ "MIT" ]
null
null
null
controllers/plugin_daxs_media_galley.py
daxslab/web2py-media-galley
a73a779216403cc625002c9f76f5503b7b29002c
[ "MIT" ]
null
null
null
__author__ = 'cccaballero' from gluon import current import os def upload(): path = os.path.join(request.folder, 'uploads') form = SQLFORM.factory( Field('upload', 'upload', requires=IS_NOT_EMPTY(), uploadfolder=path), table_name=current.plugin_daxs_media_galley.settings.table_upload_name ...
32.453488
92
0.645647
__author__ = 'cccaballero' from gluon import current import os def upload(): path = os.path.join(request.folder, 'uploads') form = SQLFORM.factory( Field('upload', 'upload', requires=IS_NOT_EMPTY(), uploadfolder=path), table_name=current.plugin_daxs_media_galley.settings.table_upload_name ...
false
true
1c4202d16eb62f826aa2cd0e3997cb5cf90f9be5
23,112
py
Python
research/cognitive_mapping_and_planning/tfcode/vision_baseline_lstm.py
caoxingchao/tensorflow_models
48fd7cde3d3492a8c67ec9eec95211fbee341bc7
[ "Apache-2.0" ]
null
null
null
research/cognitive_mapping_and_planning/tfcode/vision_baseline_lstm.py
caoxingchao/tensorflow_models
48fd7cde3d3492a8c67ec9eec95211fbee341bc7
[ "Apache-2.0" ]
null
null
null
research/cognitive_mapping_and_planning/tfcode/vision_baseline_lstm.py
caoxingchao/tensorflow_models
48fd7cde3d3492a8c67ec9eec95211fbee341bc7
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 The TensorFlow Authors All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
43.280899
86
0.678522
import numpy as np import tensorflow as tf from tensorflow.contrib import slim import logging from tensorflow.python.platform import app from tensorflow.python.platform import flags from src import utils import src.file_utils as fu import tfcode.nav_utils as nu from tfcode import tf_utils setup_tr...
true
true
1c42031629c254017278935e32527500eb389956
567
py
Python
PythonLearnig/Algorithms_Part_2/Ex19DirectedEdge.py
dhivadeekshi/Algorithms-Samples
cadd159d835ce64d51d786eafc25c40e35540353
[ "MIT" ]
null
null
null
PythonLearnig/Algorithms_Part_2/Ex19DirectedEdge.py
dhivadeekshi/Algorithms-Samples
cadd159d835ce64d51d786eafc25c40e35540353
[ "MIT" ]
null
null
null
PythonLearnig/Algorithms_Part_2/Ex19DirectedEdge.py
dhivadeekshi/Algorithms-Samples
cadd159d835ce64d51d786eafc25c40e35540353
[ "MIT" ]
null
null
null
class DirectedEdge: def __init__(self, v, w, weight): self.v = v self.w = w self.weight = weight def from_v(self): return self.v def to_v(self): return self.w def get_weight(self): return self.weight def compare_to(self, that): return self...
18.9
68
0.585538
class DirectedEdge: def __init__(self, v, w, weight): self.v = v self.w = w self.weight = weight def from_v(self): return self.v def to_v(self): return self.w def get_weight(self): return self.weight def compare_to(self, that): return self...
true
true
1c42034168d392e077e4eb52a9036e0bda7c218c
2,743
py
Python
barcode/barcode/base.py
bharat-rajani/Project-barcode-passes
9e151aed5f8124350b757c6a8788f117d7f9c570
[ "MIT" ]
1
2020-12-21T20:04:45.000Z
2020-12-21T20:04:45.000Z
barcode/base.py
trobertsca/reBarcode
eb5929ffa20e6dc80ccad8d351c4ac8cb3ee07ac
[ "MIT" ]
null
null
null
barcode/base.py
trobertsca/reBarcode
eb5929ffa20e6dc80ccad8d351c4ac8cb3ee07ac
[ "MIT" ]
1
2019-05-28T15:54:55.000Z
2019-05-28T15:54:55.000Z
# -*- coding: utf-8 -*- """barcode.base """ from __future__ import unicode_literals from barcode.writer import SVGWriter class Barcode(object): name = '' raw = None digits = 0 default_writer = SVGWriter default_writer_options = { 'module_width': 0.2, 'module_height': 15.0, ...
26.375
71
0.553044
from __future__ import unicode_literals from barcode.writer import SVGWriter class Barcode(object): name = '' raw = None digits = 0 default_writer = SVGWriter default_writer_options = { 'module_width': 0.2, 'module_height': 15.0, 'quiet_zone': 6.5, 'font_siz...
true
true
1c4203425fb36f3395c1ea4a98381de0a194c6d6
120
py
Python
flag_engine/environments/integrations/models.py
Flagsmith/flagsmith-engine
a33097a772f30a275a9ebcba88627552877be0b5
[ "BSD-3-Clause" ]
4
2021-09-01T10:16:49.000Z
2022-02-15T04:23:07.000Z
flag_engine/environments/integrations/models.py
Flagsmith/flagsmith-engine
a33097a772f30a275a9ebcba88627552877be0b5
[ "BSD-3-Clause" ]
21
2021-10-01T13:37:17.000Z
2022-03-24T10:47:07.000Z
flag_engine/environments/integrations/models.py
Flagsmith/flagsmith-engine
a33097a772f30a275a9ebcba88627552877be0b5
[ "BSD-3-Clause" ]
1
2022-02-28T19:19:37.000Z
2022-02-28T19:19:37.000Z
from dataclasses import dataclass @dataclass class IntegrationModel: api_key: str = None base_url: str = None
15
33
0.741667
from dataclasses import dataclass @dataclass class IntegrationModel: api_key: str = None base_url: str = None
true
true
1c42038064106b4b0454c2d0791750ce4155985f
23,416
py
Python
splinext/pokedex/controllers/pokedex_conquest.py
hugopeixoto/spline-pokedex
17b8d22118c9d4b02a01c2271120c162b8dd41da
[ "MIT" ]
7
2015-05-28T22:37:26.000Z
2020-10-26T17:28:32.000Z
splinext/pokedex/controllers/pokedex_conquest.py
hugopeixoto/spline-pokedex
17b8d22118c9d4b02a01c2271120c162b8dd41da
[ "MIT" ]
28
2015-02-28T04:58:47.000Z
2021-03-19T03:32:43.000Z
splinext/pokedex/controllers/pokedex_conquest.py
hugopeixoto/spline-pokedex
17b8d22118c9d4b02a01c2271120c162b8dd41da
[ "MIT" ]
3
2015-11-25T17:02:32.000Z
2020-08-07T09:52:31.000Z
# encoding: utf8 from __future__ import absolute_import, division from collections import defaultdict import colorsys from itertools import izip from random import randint import pokedex.db import pokedex.db.tables as t from pylons import request, tmpl_context as c from pylons.controllers.util import abort import sql...
38.89701
82
0.592885
from __future__ import absolute_import, division from collections import defaultdict import colorsys from itertools import izip from random import randint import pokedex.db import pokedex.db.tables as t from pylons import request, tmpl_context as c from pylons.controllers.util import abort import sqlalchemy as sqla ...
true
true
1c4203b03f80648133ec496159fe09432bce6089
227
py
Python
Files/soundcloud.py
Li-Evelyn/vanilla-cake-bot
a166c897b15d21b82b3b9c838c017bd1679a2063
[ "MIT" ]
null
null
null
Files/soundcloud.py
Li-Evelyn/vanilla-cake-bot
a166c897b15d21b82b3b9c838c017bd1679a2063
[ "MIT" ]
null
null
null
Files/soundcloud.py
Li-Evelyn/vanilla-cake-bot
a166c897b15d21b82b3b9c838c017bd1679a2063
[ "MIT" ]
null
null
null
import soundcloud # TODO: add soundcloud link processing once https://soundcloud.com/you/apps/new opens up :( client = soundcloud.Client(client_id="") track_url = "" track = client.get('/resolve', url=track_url) print(track)
25.222222
91
0.744493
import soundcloud client = soundcloud.Client(client_id="") track_url = "" track = client.get('/resolve', url=track_url) print(track)
true
true
1c420479abefc7128f12f426e45827f1228ff734
17,260
py
Python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/operations/_virtual_machine_images_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
2
2021-03-24T06:26:11.000Z
2021-04-18T15:55:59.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/operations/_virtual_machine_images_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
4
2019-04-17T17:57:49.000Z
2020-04-24T21:11:22.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/operations/_virtual_machine_images_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
2
2021-05-23T16:46:31.000Z
2021-05-26T23:51:09.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
46.902174
221
0.664484
from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport impor...
true
true
1c4204b8cfaf8042c511acc4a89440dfa012d28b
480
py
Python
setup.py
SystematIC-Design/cocotbext-ral
c3dbd35727b1474700a5970c13d6325ea155e0c6
[ "MIT" ]
null
null
null
setup.py
SystematIC-Design/cocotbext-ral
c3dbd35727b1474700a5970c13d6325ea155e0c6
[ "MIT" ]
null
null
null
setup.py
SystematIC-Design/cocotbext-ral
c3dbd35727b1474700a5970c13d6325ea155e0c6
[ "MIT" ]
null
null
null
# Minimal setup.py. Extend as needed. from setuptools import setup, find_namespace_packages setup(name = 'cocotbext-ral', version = '0.1', packages = find_namespace_packages(include=['cocotbext.*']), install_requires = ['cocotb'], python_requires = '>=3.5', classifiers = [ "Progra...
36.923077
81
0.65
from setuptools import setup, find_namespace_packages setup(name = 'cocotbext-ral', version = '0.1', packages = find_namespace_packages(include=['cocotbext.*']), install_requires = ['cocotb'], python_requires = '>=3.5', classifiers = [ "Programming Language :: Python :: 3", ...
true
true
1c42067f56138dc2c2ea75e25e3849b0dfaa31fc
3,161
py
Python
test/lint/check-doc.py
PenTesting/bitcoin-abc
28fa7e2db7d986e63d70e41b8f1d29d5fdf724d2
[ "MIT" ]
1
2019-06-11T13:40:52.000Z
2019-06-11T13:40:52.000Z
test/lint/check-doc.py
PenTesting/bitcoin-abc
28fa7e2db7d986e63d70e41b8f1d29d5fdf724d2
[ "MIT" ]
null
null
null
test/lint/check-doc.py
PenTesting/bitcoin-abc
28fa7e2db7d986e63d70e41b8f1d29d5fdf724d2
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Copyright (c) 2019 The Bitcoin developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' This checks if all command line args are documented. Retu...
34.736264
79
0.554255
from subprocess import check_output from pprint import PrettyPrinter import glob import re TOP_LEVEL = 'git rev-parse --show-toplevel' FOLDER_SRC = '/src/**/' FOLDER_TEST = '/src/**/test/' EXTENSIONS = ["*.c", "*.h", "*.cpp", "*.cc", "*.hpp"] REGEX_ARG = '(?:ForceSet|SoftSet|Get|Is)(?:Bool)?Args?(?:Set)?\(\s*"...
true
true
1c4206925a8873719c846bb49eb9fa449ed6ad0b
2,778
py
Python
python/return_lobs_as_strings.py
granadomoreno/oracle-db-examples
feac5d72f4a8534c9b3e848bdfc501c5b4c69268
[ "Apache-2.0" ]
1,071
2017-04-06T16:59:55.000Z
2022-03-25T21:10:58.000Z
python/return_lobs_as_strings.py
abhishektripathi27/oracle-db-examples
0812a65c7c974718ec5a04454b8a42f7c25bf2a8
[ "Apache-2.0" ]
71
2017-04-12T14:55:52.000Z
2022-02-22T17:08:18.000Z
python/return_lobs_as_strings.py
abhishektripathi27/oracle-db-examples
0812a65c7c974718ec5a04454b8a42f7c25bf2a8
[ "Apache-2.0" ]
749
2017-04-09T06:48:58.000Z
2022-03-23T00:28:26.000Z
#------------------------------------------------------------------------------ # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # # Portions Copyright 2007-2015, Anthony Tuininga. All rights reserved. # # Portions Copyright 2001-2007, Computronix (Canada) Ltd., Edmonton, Alberta, # Canada...
38.583333
79
0.62887
import cx_Oracle as oracledb import sample_env def output_type_handler(cursor, name, default_type, size, precision, scale): if default_type == oracledb.CLOB: return cursor.var(oracledb.LONG_STRING, arraysize=cursor.arraysize) if default_type == oracledb.BLOB: return cursor.v...
true
true
1c4206db82fb99d15020a10c5521de38829b5ce7
8,324
py
Python
ytelapi/models/body.py
Ytel-Inc/YtelAPI-Python
139dc02d93e74c78b6c3d91e3002ae98e2270223
[ "MIT" ]
null
null
null
ytelapi/models/body.py
Ytel-Inc/YtelAPI-Python
139dc02d93e74c78b6c3d91e3002ae98e2270223
[ "MIT" ]
null
null
null
ytelapi/models/body.py
Ytel-Inc/YtelAPI-Python
139dc02d93e74c78b6c3d91e3002ae98e2270223
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ ytelapi This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). """ class Body(object): """Implementation of the 'body' model. TODO: type model description here. Attributes: mfrom (string): A valid Ytel Voice enabled ...
40.407767
84
0.59827
class Body(object): _names = { "mfrom":'From', "to":'To', "url":'Url', "method":'Method', "status_call_back_url":'StatusCallBackUrl', "status_call_back_method":'StatusCallBackMethod', "fall_back_url":'FallBackUrl', "fall_back_m...
true
true
1c4206f4baef4d3380d19223d4bb597733644ce4
1,491
py
Python
deepxde/maps/tensorflow/fnn.py
fabyayu/deepxde
89880a4c61586512c87cabd1e7a3bdbaedf0feab
[ "Apache-2.0" ]
null
null
null
deepxde/maps/tensorflow/fnn.py
fabyayu/deepxde
89880a4c61586512c87cabd1e7a3bdbaedf0feab
[ "Apache-2.0" ]
null
null
null
deepxde/maps/tensorflow/fnn.py
fabyayu/deepxde
89880a4c61586512c87cabd1e7a3bdbaedf0feab
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function from .nn import NN from .. import activations from .. import initializers from .. import regularizers from ...backend import tf class FNN(NN): """Fully-connected neural network.""" def __init__( ...
29.82
78
0.593561
from __future__ import absolute_import from __future__ import division from __future__ import print_function from .nn import NN from .. import activations from .. import initializers from .. import regularizers from ...backend import tf class FNN(NN): def __init__( self, layer_sizes, activation, kernel_...
true
true
1c4206f867f69dc25479bad4a9991f1cae1d265c
3,608
py
Python
findatapy/util/swimpool.py
mrderdelo/findatapy
5f619b372654a0246d6c12efedb286b237dba1a8
[ "Apache-2.0" ]
null
null
null
findatapy/util/swimpool.py
mrderdelo/findatapy
5f619b372654a0246d6c12efedb286b237dba1a8
[ "Apache-2.0" ]
null
null
null
findatapy/util/swimpool.py
mrderdelo/findatapy
5f619b372654a0246d6c12efedb286b237dba1a8
[ "Apache-2.0" ]
null
null
null
__author__ = "saeedamen" # Saeed Amen # # Copyright 2016 Cuemacro # # 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 applicabl...
37.978947
119
0.650499
__author__ = "saeedamen" from findatapy.util import DataConstants class SwimPool(object): def __init__(self, multiprocessing_library=None): self._pool = None if multiprocessing_library is None: multiprocessing_library = DataConstants().multiprocessing_library ...
true
true