hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
797101e0910ba162824af3238dc009b0eb90e906 | 11,235 | py | Python | lib/modules/python/collection/linux/sniffer.py | jimshew/Empire | a7413869849b2c3c521eb50bed61e00ede107688 | [
"BSD-3-Clause"
] | 4 | 2019-03-11T02:40:13.000Z | 2021-01-29T06:45:21.000Z | lib/modules/python/collection/linux/sniffer.py | jimshew/Empire | a7413869849b2c3c521eb50bed61e00ede107688 | [
"BSD-3-Clause"
] | 20 | 2020-03-11T03:58:21.000Z | 2020-03-12T03:59:38.000Z | lib/modules/python/collection/linux/sniffer.py | jimshew/Empire | a7413869849b2c3c521eb50bed61e00ede107688 | [
"BSD-3-Clause"
] | 1 | 2020-01-15T06:46:16.000Z | 2020-01-15T06:46:16.000Z | from builtins import str
from builtins import object
class Module(object):
def __init__(self, mainMenu, params=[]):
# metadata info about the module, not modified during runtime
self.info = {
# name for the module that will appear in module menus
'Name': 'PcapSniffer',
... | 39.699647 | 127 | 0.570004 |
7971026161b7657b6f75a87d5f958ea6e03b5439 | 731 | py | Python | sensorluztemp.py | bsolre/CursoGalileo | 38e9fe7a0a8dda57f676ae30203fc1f0a221ba2a | [
"Apache-2.0"
] | null | null | null | sensorluztemp.py | bsolre/CursoGalileo | 38e9fe7a0a8dda57f676ae30203fc1f0a221ba2a | [
"Apache-2.0"
] | null | null | null | sensorluztemp.py | bsolre/CursoGalileo | 38e9fe7a0a8dda57f676ae30203fc1f0a221ba2a | [
"Apache-2.0"
] | null | null | null | #!/bsolre/bin/python
import signal
import sys
import time
import pyupm_grove as grove
import pyupm_i2clcd as lcd
def interruptHandler(signal, frame):
sys.exit(0)
if __name__=='__main__':
signal.signal(signal.SIGINT, interruptHandler)
myLcd = lcd.Jhd1313m1(0, 0x3E, 0x62)
sensorluz = grove.GroveLight(0)
sensort... | 20.885714 | 64 | 0.737346 |
79710288e0439be9f5b05b115718350731230fbe | 19,966 | py | Python | tools/tpm2_pkcs11/db.py | tstellar/tpm2-pkcs11 | 63a5f554cc73114d024ba1e093b70fe557a65fc7 | [
"BSD-2-Clause"
] | null | null | null | tools/tpm2_pkcs11/db.py | tstellar/tpm2-pkcs11 | 63a5f554cc73114d024ba1e093b70fe557a65fc7 | [
"BSD-2-Clause"
] | null | null | null | tools/tpm2_pkcs11/db.py | tstellar/tpm2-pkcs11 | 63a5f554cc73114d024ba1e093b70fe557a65fc7 | [
"BSD-2-Clause"
] | null | null | null | # SPDX-License-Identifier: BSD-2-Clause
import fcntl
import io
import os
import sys
import sqlite3
import textwrap
import yaml
from .pkcs11t import (
CKA_ALLOWED_MECHANISMS,
CKA_CLASS,
CKO_SECRET_KEY,
CKA_KEY_TYPE,
CKM_AES_CBC_PAD,
CKK_AES
)
VERSION = 5
#
# With Db() as db:
# // do stuff
#
cl... | 32.151369 | 100 | 0.526545 |
797102cf936cc0802efd1eb0fc25e80d14778e7b | 7,123 | py | Python | tests/keras/utils/data_utils_test.py | nils-werner/keras | 78f26df8fb2b8aa5c6262aef44a494a8335a9c6e | [
"MIT"
] | 30 | 2017-04-11T04:17:22.000Z | 2020-09-08T08:18:37.000Z | tests/keras/utils/data_utils_test.py | nils-werner/keras | 78f26df8fb2b8aa5c6262aef44a494a8335a9c6e | [
"MIT"
] | null | null | null | tests/keras/utils/data_utils_test.py | nils-werner/keras | 78f26df8fb2b8aa5c6262aef44a494a8335a9c6e | [
"MIT"
] | 21 | 2017-03-27T08:06:11.000Z | 2020-06-18T09:35:07.000Z | """Tests for functions in data_utils.py.
"""
import os
import sys
import tarfile
import threading
import zipfile
from itertools import cycle
import numpy as np
import pytest
from six.moves.urllib.parse import urljoin
from six.moves.urllib.request import pathname2url
from keras.utils import Sequence
from keras.utils i... | 28.492 | 94 | 0.681876 |
79710348e8c43d6455c387a03f749e38b2bfffc9 | 784 | py | Python | additional code/students_grades_animation.py | Integrative-Transcriptomics/VIPurPCA | 8971fa21f94e6d2310fc7803089a23c0b0150b1a | [
"MIT"
] | null | null | null | additional code/students_grades_animation.py | Integrative-Transcriptomics/VIPurPCA | 8971fa21f94e6d2310fc7803089a23c0b0150b1a | [
"MIT"
] | null | null | null | additional code/students_grades_animation.py | Integrative-Transcriptomics/VIPurPCA | 8971fa21f94e6d2310fc7803089a23c0b0150b1a | [
"MIT"
] | null | null | null | from src.vipurpca.PCA import PCA
from Animation import Animation
from generate_samples import student_grades_data_set
if __name__ == '__main__':
Y, y, cov_Y = student_grades_data_set()
# Y = Y - np.mean(Y, axis=0)
# n_features = Y.shape[1]
n_components = 2
print(Y)
pca_student_grades = PCA(matr... | 39.2 | 112 | 0.751276 |
79710358c4dabfc7b1dd3c487a33659c8246eabb | 1,047 | py | Python | nnet/layers/softmax.py | k15z/kevz-nnet | e870b02e032903510b3cbac6e604fa58b4b84b44 | [
"MIT"
] | null | null | null | nnet/layers/softmax.py | k15z/kevz-nnet | e870b02e032903510b3cbac6e604fa58b4b84b44 | [
"MIT"
] | null | null | null | nnet/layers/softmax.py | k15z/kevz-nnet | e870b02e032903510b3cbac6e604fa58b4b84b44 | [
"MIT"
] | null | null | null | import numpy as np
class Softmax:
def __init__(self, input_dims, output_dims):
self.input_dims = input_dims
self.output_dims = output_dims
self.weight = np.random.normal(0.0, 1.0 / np.sqrt(output_dims), (output_dims, input_dims))
def _softmax(self, y):
result = []
for i, y_i in enumerate(y):
e_y_i = np... | 26.846154 | 92 | 0.683859 |
79710420fb0fbb64582729bf6b408620b39ef5b2 | 674 | py | Python | config.py | Den1al/Flask-Boilerplate | 2eee49614f09e49551299081919bb70e135a1ba7 | [
"MIT"
] | 1 | 2017-12-01T07:24:22.000Z | 2017-12-01T07:24:22.000Z | config.py | Den1al/flask-boilerplate | 2eee49614f09e49551299081919bb70e135a1ba7 | [
"MIT"
] | null | null | null | config.py | Den1al/flask-boilerplate | 2eee49614f09e49551299081919bb70e135a1ba7 | [
"MIT"
] | null | null | null | import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config(object):
DEBUG = False
TESTING = False
SECRET_KEY = '<please change this secret key!>'
SQLALCHEMY_TRACK_MODIFICATIONS = False
SQLALCHEMY_DATABASE_URI = 'sqlite:///db.sqlite'
SHOW_CAPTCHA = True
RECAPTCHA_SITE_KEY ... | 19.823529 | 58 | 0.706231 |
7971044c6e0858afcb247cf71cfd4aae17b980cf | 668 | py | Python | var/spack/repos/builtin/packages/r-tester/package.py | varioustoxins/spack | cab0e4cb240f34891a6d753f3393e512f9a99e9a | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/r-tester/package.py | varioustoxins/spack | cab0e4cb240f34891a6d753f3393e512f9a99e9a | [
"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/r-tester/package.py | foeroyingur/spack | 5300cbbb2e569190015c72d0970d25425ea38647 | [
"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)
from spack import *
class RTester(RPackage):
"""tester allows you to test characteristics of common R objects."""
... | 35.157895 | 95 | 0.726048 |
79710519803dc177e881e04b7cffcd930722331e | 37,647 | py | Python | tests/test_xml_regular.py | JPchico/parsevasp | 9e43076657007145e2dbab17b5a57fff7b778442 | [
"MIT"
] | null | null | null | tests/test_xml_regular.py | JPchico/parsevasp | 9e43076657007145e2dbab17b5a57fff7b778442 | [
"MIT"
] | null | null | null | tests/test_xml_regular.py | JPchico/parsevasp | 9e43076657007145e2dbab17b5a57fff7b778442 | [
"MIT"
] | null | null | null | import os
import pytest
import numpy as np
from parsevasp.vasprun import Xml
import utils
"""Test parsew, the regular extraction for both terminated
and truncated XML files.
"""
@pytest.fixture(scope='module', autouse=True)
def set_precision(request):
np.set_printoptions(precision=8)
@pytest.fixture(scope='modul... | 42.157895 | 292 | 0.621962 |
7971054ec35a87583048a34bcbb2598d789b1e99 | 775 | py | Python | api.py | SuiMingYang/ProductTypeClassify | ad5c76e71f21dccd2c1190eff96848146c0790c8 | [
"MIT"
] | 4 | 2020-07-23T09:39:12.000Z | 2021-11-21T12:42:30.000Z | api.py | SuiMingYang/ProductTypeClassify | ad5c76e71f21dccd2c1190eff96848146c0790c8 | [
"MIT"
] | 1 | 2020-07-07T11:14:32.000Z | 2020-07-08T03:20:35.000Z | api.py | SuiMingYang/ProductTypeClassify | ad5c76e71f21dccd2c1190eff96848146c0790c8 | [
"MIT"
] | 5 | 2020-06-15T14:08:13.000Z | 2022-01-24T04:10:09.000Z | from sklearn.externals import joblib
import pickle
from sklearn.feature_extraction.text import CountVectorizer
import jieba
from collections import Counter
"""
调用代码
"""
if __name__ == "__main__":
def put_category(l):
l=loaded_model.predict(vec.transform(jieba.lcut(l)))
l=sorted(Counter(l).items(),... | 26.724138 | 98 | 0.636129 |
79710674f5a0100baf8bce8e1e1f9f88b17f4f36 | 417 | py | Python | cliente/forms.py | IngridiGrein/django-framework-01 | a6578be9e91f58bf756a3a711521037943e7ce20 | [
"MIT"
] | null | null | null | cliente/forms.py | IngridiGrein/django-framework-01 | a6578be9e91f58bf756a3a711521037943e7ce20 | [
"MIT"
] | null | null | null | cliente/forms.py | IngridiGrein/django-framework-01 | a6578be9e91f58bf756a3a711521037943e7ce20 | [
"MIT"
] | null | null | null | from django.forms import ModelForm
from .models import Cidade
from .models import Endereco
from .models import Cliente
class CidadeForm(ModelForm):
class Meta:
model = Cidade
fields = "__all__"
class EnderecoForm(ModelForm):
class Meta:
model = Endereco
fields = "__all__"
... | 20.85 | 34 | 0.661871 |
79710675200222e6f5e4b379754bfe3332dc9502 | 1,574 | py | Python | results/process-results.py | jswalens/labyrinth | d6a9359cafcc0ed02c5cd6c152551386e1e160f8 | [
"MIT"
] | null | null | null | results/process-results.py | jswalens/labyrinth | d6a9359cafcc0ed02c5cd6c152551386e1e160f8 | [
"MIT"
] | null | null | null | results/process-results.py | jswalens/labyrinth | d6a9359cafcc0ed02c5cd6c152551386e1e160f8 | [
"MIT"
] | null | null | null | import sys
import re
from collections import defaultdict
import numpy
if len(sys.argv) >= 2:
FILE = sys.argv[1]
else:
FILE = "20190817T1454-1cc19b18.csv"
if len(sys.argv) >= 3:
OUTPUT = sys.argv[2]
else:
# E.g. 20190817T1454-1cc19b18.csv to
# 20190817T1454-1cc19b18-medians.csv
OUTPUT = re.sub(... | 29.698113 | 79 | 0.523507 |
797106f0679e3935eb88e959d4efa3227731c1df | 24,359 | py | Python | google/cloud/redis_v1beta1/services/cloud_redis/transports/grpc_asyncio.py | googleapis/python-redis | 9c0cd3dc619557e6f73e418f0af16f38cfdcfc44 | [
"Apache-2.0"
] | 9 | 2020-09-19T11:31:25.000Z | 2022-03-18T04:43:06.000Z | google/cloud/redis_v1beta1/services/cloud_redis/transports/grpc_asyncio.py | googleapis/python-redis | 9c0cd3dc619557e6f73e418f0af16f38cfdcfc44 | [
"Apache-2.0"
] | 50 | 2020-02-03T19:18:21.000Z | 2022-03-15T21:27:39.000Z | google/cloud/redis_v1beta1/services/cloud_redis/transports/grpc_asyncio.py | googleapis/python-redis | 9c0cd3dc619557e6f73e418f0af16f38cfdcfc44 | [
"Apache-2.0"
] | 4 | 2020-02-03T19:00:51.000Z | 2022-01-29T08:13:18.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 42.961199 | 88 | 0.642514 |
79710704868ae1cfa539e4f1a84d2d60bbf4c592 | 4,170 | py | Python | finalclass/LineBot/app/router.py | antallen/PythonMaterial | c582fb1610610feb72002f43a3758d5c58d6da85 | [
"MIT"
] | null | null | null | finalclass/LineBot/app/router.py | antallen/PythonMaterial | c582fb1610610feb72002f43a3758d5c58d6da85 | [
"MIT"
] | null | null | null | finalclass/LineBot/app/router.py | antallen/PythonMaterial | c582fb1610610feb72002f43a3758d5c58d6da85 | [
"MIT"
] | 1 | 2021-07-23T09:59:15.000Z | 2021-07-23T09:59:15.000Z | import re
from werkzeug.utils import html
from app import app, handler, request, abort
from linebot.exceptions import InvalidSignatureError
from app.dataSQL import connectDB
from flask import request, render_template, url_for, redirect, flash
from flask_login import login_user, logout_user, login_required, current_use... | 27.254902 | 77 | 0.630935 |
79710862b676635557c452b9f890e491fa14adcf | 10,635 | py | Python | python/phonenumbers/data/region_AR.py | musabaloyi/python-phonenumbers | c2e9bd954e560c5eada9129526b3815449f226db | [
"Apache-2.0"
] | 1 | 2020-04-16T21:40:27.000Z | 2020-04-16T21:40:27.000Z | warehouse/python-app-venv/lib/python3.6/site-packages/phonenumbers/data/region_AR.py | perivision/BAPPE | 20b01b0aee6977ddc28d09b8fd667d2ec30486b6 | [
"MIT"
] | null | null | null | warehouse/python-app-venv/lib/python3.6/site-packages/phonenumbers/data/region_AR.py | perivision/BAPPE | 20b01b0aee6977ddc28d09b8fd667d2ec30486b6 | [
"MIT"
] | 1 | 2020-06-19T11:49:45.000Z | 2020-06-19T11:49:45.000Z | """Auto-generated file, do not edit by hand. AR metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_AR = PhoneMetadata(id='AR', country_code=54, international_prefix='00',
general_desc=PhoneNumberDesc(national_number_pattern='11\\d{8}|(?:[2368]|9\\d)\\d{9}', possible... | 312.794118 | 1,339 | 0.520639 |
79710863075b311841af94fd4e78c19ecd135e0f | 2,048 | py | Python | statues/models.py | LilliJane/psychic-waffle | 07649c56ddc5fbdaad11da11dfed43f9015e722a | [
"Apache-2.0"
] | 3 | 2017-04-18T09:42:10.000Z | 2017-11-05T04:40:23.000Z | statues/models.py | LilliJane/psychic-waffle | 07649c56ddc5fbdaad11da11dfed43f9015e722a | [
"Apache-2.0"
] | null | null | null | statues/models.py | LilliJane/psychic-waffle | 07649c56ddc5fbdaad11da11dfed43f9015e722a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
import os
from django.db import models
from django.utils import timezone
from django.template.defaultfilters import slugify
# Create your models here.
class Statue(models.Model):
""" Default values for latitude and longitude are the... | 33.032258 | 99 | 0.696777 |
7971087e5053d7300cb9e0e9a1b815ffb639c147 | 1,184 | py | Python | Lista3/ex3.py | brunocozendey/Pythonplayground | 41257c5010274f7964b3f72a2d00513ddf8ad3c1 | [
"MIT"
] | null | null | null | Lista3/ex3.py | brunocozendey/Pythonplayground | 41257c5010274f7964b3f72a2d00513ddf8ad3c1 | [
"MIT"
] | null | null | null | Lista3/ex3.py | brunocozendey/Pythonplayground | 41257c5010274f7964b3f72a2d00513ddf8ad3c1 | [
"MIT"
] | null | null | null | # -*- coding: cp1252 -*-
'''
O programa exibe uma lista com uma quantidade indeterminada de nomes.
Classifica e exibe em ordem alfabética decrescente (x→a)
usando Bubble Sort.
Criado por: Bruno Cozendey
Em: 02/06/2018
'''
def ler():
nomes = []
while True:
while True:
try:
... | 23.215686 | 79 | 0.495777 |
797109b2714a53db3bdb8b4a1675e111db2e80b1 | 8,740 | py | Python | ionyweb/website/migrations/0001_initial.py | makinacorpus/ionyweb | 2f18e3dc1fdc86c7e19bae3778e67e28a37567be | [
"BSD-3-Clause"
] | 4 | 2015-09-28T10:07:39.000Z | 2019-10-18T20:14:07.000Z | ionyweb/website/migrations/0001_initial.py | makinacorpus/ionyweb | 2f18e3dc1fdc86c7e19bae3778e67e28a37567be | [
"BSD-3-Clause"
] | 1 | 2021-03-19T21:41:33.000Z | 2021-03-19T21:41:33.000Z | ionyweb/website/migrations/0001_initial.py | makinacorpus/ionyweb | 2f18e3dc1fdc86c7e19bae3778e67e28a37567be | [
"BSD-3-Clause"
] | 1 | 2017-10-12T09:25:19.000Z | 2017-10-12T09:25:19.000Z | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'WebSite'
db.create_table('website_website', (
('id', self.gf('django.db.models... | 68.28125 | 182 | 0.588101 |
79710bf604bad0fc7b071347093f880c13aae56e | 4,455 | py | Python | datawinners/dcs_web/local_settings_example_dcs.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | datawinners/dcs_web/local_settings_example_dcs.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | datawinners/dcs_web/local_settings_example_dcs.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | # vim: ai ts=4 sts=4 et sw=4 encoding=utf-8
import os
from datawinners.settings import PROJECT_DIR, TEMPLATE_DIRS
SITE_ID = 1
DATABASES = {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.postgis', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'mangrove'... | 30.724138 | 135 | 0.715376 |
79710c0f5d0ed368d25f580fc6c7cf3b0c196d69 | 18,680 | py | Python | python/ccxt/fcoin.py | MoreChickenDelivered/ccxt | a8996798d08a1cedc30bfb3db72d14bc8919930f | [
"MIT"
] | 1 | 2017-10-16T01:59:45.000Z | 2017-10-16T01:59:45.000Z | python/ccxt/fcoin.py | LeapM/ccxt | aeb07fc86991ce38a218c1199c6ae3bb5cfdf228 | [
"MIT"
] | null | null | null | python/ccxt/fcoin.py | LeapM/ccxt | aeb07fc86991ce38a218c1199c6ae3bb5cfdf228 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
# -----------------------------------------------------------------------------
try:
basestri... | 37.063492 | 133 | 0.488919 |
79710eff21a04cc9fd96c03825a3289fe5e15bb6 | 1,878 | py | Python | mmdeploy/apis/openvino/utils.py | zhiqwang/mmdeploy | 997d111a6f4ca9624ab3b36717748e6ce002037d | [
"Apache-2.0"
] | 1 | 2022-03-08T12:22:34.000Z | 2022-03-08T12:22:34.000Z | mmdeploy/apis/openvino/utils.py | zhiqwang/mmdeploy | 997d111a6f4ca9624ab3b36717748e6ce002037d | [
"Apache-2.0"
] | null | null | null | mmdeploy/apis/openvino/utils.py | zhiqwang/mmdeploy | 997d111a6f4ca9624ab3b36717748e6ce002037d | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
from typing import Dict, List
import mmcv
from mmdeploy.utils import get_model_inputs
from mmdeploy.utils.config_utils import get_ir_config
def update_input_names(input_info: Dict[str, List],
input_names: List[str]) -> Dict[str, List]:
"""Re... | 35.433962 | 78 | 0.685304 |
797110b1694c41156f9848191304b76a6568a634 | 1,189 | py | Python | firecam/detection_policies/test_always_never.py | open-climate-tech/firecam | d0041332f3d8ba38b7db3b6426010bff0099f569 | [
"Apache-2.0"
] | 9 | 2020-11-25T03:51:50.000Z | 2022-02-13T19:19:51.000Z | firecam/detection_policies/test_always_never.py | open-climate-tech/firecam | d0041332f3d8ba38b7db3b6426010bff0099f569 | [
"Apache-2.0"
] | 6 | 2020-03-27T01:35:10.000Z | 2022-03-26T16:20:31.000Z | firecam/detection_policies/test_always_never.py | open-climate-tech/firecam | d0041332f3d8ba38b7db3b6426010bff0099f569 | [
"Apache-2.0"
] | 3 | 2020-06-08T15:49:40.000Z | 2022-01-24T11:18:40.000Z | # Copyright 2020 Open Climate Tech Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | 32.135135 | 80 | 0.703953 |
797110b3f0a1cf6f0cd064662edd18b01739b55e | 3,148 | py | Python | src/spinnaker_ros_lsm/venv/lib/python2.7/site-packages/pacman/model/partitionable_graph/abstract_partitionable_edge.py | Roboy/LSM_SpiNNaker_MyoArm | 04fa1eaf78778edea3ba3afa4c527d20c491718e | [
"BSD-3-Clause"
] | 2 | 2020-11-01T13:22:11.000Z | 2020-11-01T13:22:20.000Z | src/spinnaker_ros_lsm/venv/lib/python2.7/site-packages/pacman/model/partitionable_graph/abstract_partitionable_edge.py | Roboy/LSM_SpiNNaker_MyoArm | 04fa1eaf78778edea3ba3afa4c527d20c491718e | [
"BSD-3-Clause"
] | null | null | null | src/spinnaker_ros_lsm/venv/lib/python2.7/site-packages/pacman/model/partitionable_graph/abstract_partitionable_edge.py | Roboy/LSM_SpiNNaker_MyoArm | 04fa1eaf78778edea3ba3afa4c527d20c491718e | [
"BSD-3-Clause"
] | null | null | null | from abc import ABCMeta
from abc import abstractmethod
from six import add_metaclass
@add_metaclass(ABCMeta)
class AbstractPartitionableEdge(object):
""" Represents a directional edge in a partitionable graph between two\
vertices
"""
def __init__(self, pre_vertex, post_vertex, label=None):
... | 35.772727 | 122 | 0.64263 |
797110f0d0a0c3a6a07b6fde87176f9bfec72d26 | 1,461 | py | Python | src/services/login_scraper/user_event_spiders/register_spider.py | BlieNuckel/kronoxAppBackend | 3c720e7529a06abaa378a576f1931a45c5545458 | [
"MIT"
] | null | null | null | src/services/login_scraper/user_event_spiders/register_spider.py | BlieNuckel/kronoxAppBackend | 3c720e7529a06abaa378a576f1931a45c5545458 | [
"MIT"
] | null | null | null | src/services/login_scraper/user_event_spiders/register_spider.py | BlieNuckel/kronoxAppBackend | 3c720e7529a06abaa378a576f1931a45c5545458 | [
"MIT"
] | null | null | null | from scrapy import Request
from src.services.login_scraper.login_spider import LoginSpider
from scrapy.responsetypes import Response
class RegisterSpider(LoginSpider):
def __init__(self, baseUrl: str, username: str, password: str, event_code: str):
self.event_code = event_code
super().__init__(bas... | 47.129032 | 148 | 0.577002 |
79711135ff2483f67c376782b697128c14577616 | 20,550 | py | Python | hue-src/desktop/libs/notebook/src/notebook/connectors/base.py | bopopescu/docker-hue | 97409e1ce13dd639a3623fa37a67b9415909038e | [
"Apache-2.0"
] | 1 | 2020-05-17T06:40:33.000Z | 2020-05-17T06:40:33.000Z | hue-src/desktop/libs/notebook/src/notebook/connectors/base.py | bopopescu/docker-hue | 97409e1ce13dd639a3623fa37a67b9415909038e | [
"Apache-2.0"
] | 3 | 2020-04-06T07:09:33.000Z | 2021-05-10T17:02:07.000Z | hue-src/desktop/libs/notebook/src/notebook/connectors/base.py | bopopescu/docker-hue | 97409e1ce13dd639a3623fa37a67b9415909038e | [
"Apache-2.0"
] | 1 | 2020-07-25T19:38:10.000Z | 2020-07-25T19:38:10.000Z | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | 33.469055 | 184 | 0.667251 |
7971128fd6527bbaf0dcc21af4626b0caf211e64 | 3,510 | py | Python | deprecated_gallery/wmf.py | guyongqiangx/construct | 72c80035f703d29b1dc62a3e08831d68b29a6e40 | [
"MIT"
] | 629 | 2015-01-06T03:01:56.000Z | 2022-03-23T13:13:26.000Z | deprecated_gallery/wmf.py | guyongqiangx/construct | 72c80035f703d29b1dc62a3e08831d68b29a6e40 | [
"MIT"
] | 897 | 2015-02-28T15:46:06.000Z | 2022-03-30T08:19:13.000Z | deprecated_gallery/wmf.py | guyongqiangx/construct | 72c80035f703d29b1dc62a3e08831d68b29a6e40 | [
"MIT"
] | 151 | 2015-01-08T16:36:24.000Z | 2022-03-10T16:59:49.000Z | """
Windows Meta File
"""
from construct import *
wmf_record = Struct(
"size" / Int32ul, # size in words, including the size, function and params
"function" / Enum(Int16ul,
AbortDoc = 0x0052,
Aldus_Header = 0x0001,
AnimatePalette = 0x0436,
Arc = 0x0817,
BitBlt = 0x0922... | 27 | 78 | 0.580342 |
797112e6dffbccf45d50de366be6d2473675d91b | 412 | py | Python | sandbox/sample5.py | kojinho10/application_switcher | 1437501dd2f5fe900fc55e96a3651db34f969455 | [
"MIT"
] | null | null | null | sandbox/sample5.py | kojinho10/application_switcher | 1437501dd2f5fe900fc55e96a3651db34f969455 | [
"MIT"
] | null | null | null | sandbox/sample5.py | kojinho10/application_switcher | 1437501dd2f5fe900fc55e96a3651db34f969455 | [
"MIT"
] | null | null | null | import win32gui
win32gui.ShowWindow(HWND, win32con.SW_RESTORE)
win32gui.SetWindowPos(HWND,win32con.HWND_NOTOPMOST, 0, 0, 0,0, win32con.SWP_NOMOVE + win32con.SWP_NOSIZE )
win32gui.SetWindowPos(HWND,win32con.HWND_TOPMOST, 0, 0, 0,0,win32con.SWP_NOMOVE + win32con.SWP_NOSIZE )
win32gui.SetWindowPos(HWND,win32con.HWN... | 31.692308 | 130 | 0.805825 |
7971135a4f3120b088f081925e60b3e12bba6315 | 6,307 | py | Python | src/sage/categories/bimodules.py | switzel/sage | 7eb8510dacf61b691664cd8f1d2e75e5d473e5a0 | [
"BSL-1.0"
] | null | null | null | src/sage/categories/bimodules.py | switzel/sage | 7eb8510dacf61b691664cd8f1d2e75e5d473e5a0 | [
"BSL-1.0"
] | null | null | null | src/sage/categories/bimodules.py | switzel/sage | 7eb8510dacf61b691664cd8f1d2e75e5d473e5a0 | [
"BSL-1.0"
] | 1 | 2020-07-24T12:20:37.000Z | 2020-07-24T12:20:37.000Z | r"""
Bimodules
"""
#*****************************************************************************
# Copyright (C) 2005 David Kohel <kohel@maths.usyd.edu>
# William Stein <wstein@math.ucsd.edu>
# 2008 Teresa Gomez-Diaz (CNRS) <Teresa.Gomez-Diaz@univ-mlv.fr>
# ... | 34.277174 | 123 | 0.594736 |
797114dc66a715efe9ae180d3e041e0834637aa9 | 421 | py | Python | blog/migrations/0004_auto_20200419_1049.py | ekesel/gyanism | deaeba2f61be23927b51f955d290685b56db3558 | [
"Apache-2.0"
] | 2 | 2021-04-14T18:01:12.000Z | 2021-09-05T13:53:09.000Z | blog/migrations/0004_auto_20200419_1049.py | ekesel/gyanism | deaeba2f61be23927b51f955d290685b56db3558 | [
"Apache-2.0"
] | null | null | null | blog/migrations/0004_auto_20200419_1049.py | ekesel/gyanism | deaeba2f61be23927b51f955d290685b56db3558 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2.9 on 2020-04-19 05:19
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('blog', '0003_auto_20200418_1626'),
]
operations = [
migrations.AlterModelOptions(
name='post',
options={},
),
... | 19.136364 | 47 | 0.548694 |
797115e6d936e7737da1d97da2fe095db929f66a | 12,605 | py | Python | eval_linear.py | mattroos/dino | 5e5a599a5f315bad9bf85112f29d5671822af484 | [
"Apache-2.0"
] | null | null | null | eval_linear.py | mattroos/dino | 5e5a599a5f315bad9bf85112f29d5671822af484 | [
"Apache-2.0"
] | null | null | null | eval_linear.py | mattroos/dino | 5e5a599a5f315bad9bf85112f29d5671822af484 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
#
# 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 ... | 46.172161 | 131 | 0.66196 |
797116fd4b8fe53ea0536098d7c6e3a6b0f77d25 | 6,800 | py | Python | widgets.py | nihaalnz/patient-hsptl-app | 1697e0ae19ad6d372b8030f2408ebd35aabc6c76 | [
"MIT"
] | 2 | 2020-05-16T20:18:53.000Z | 2021-06-25T07:24:56.000Z | widgets.py | nihaalnz/patient-hsptl-app | 1697e0ae19ad6d372b8030f2408ebd35aabc6c76 | [
"MIT"
] | null | null | null | widgets.py | nihaalnz/patient-hsptl-app | 1697e0ae19ad6d372b8030f2408ebd35aabc6c76 | [
"MIT"
] | 1 | 2020-10-13T11:26:46.000Z | 2020-10-13T11:26:46.000Z | import tkinter as tk, re
from tkinter import ttk
from dataclasses import dataclass, field
from typing import List, Pattern, Iterable
from copy import deepcopy
Char: Pattern = re.compile('[a-z0-9]', re.I)
''' FormEntryFormat_dc
this serves as a configuration for the behavior of FormEntry
'''
@dataclass
class Form... | 40.963855 | 126 | 0.572059 |
7971179bb6c00fe29e576e87ef2437e1ca773ee8 | 906 | py | Python | tests/functional/customer/wishlists_tests.py | Idematica/django-oscar | 242a0654210d63ba75f798788916c8b2f7abb7fb | [
"BSD-3-Clause"
] | null | null | null | tests/functional/customer/wishlists_tests.py | Idematica/django-oscar | 242a0654210d63ba75f798788916c8b2f7abb7fb | [
"BSD-3-Clause"
] | null | null | null | tests/functional/customer/wishlists_tests.py | Idematica/django-oscar | 242a0654210d63ba75f798788916c8b2f7abb7fb | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from django.db.models import get_model
from oscar.test.factories import create_product
from oscar.test.testcases import WebTestCase
WishList = get_model('wishlists', 'WishList')
class TestProductDetailPage(WebTestCase):
is_anonymous = False
def setUp(self):
super(TestProduct... | 30.2 | 63 | 0.696468 |
7971194b84458a80bd33549bcec1a1600c8bb6cc | 1,257 | py | Python | post_data.py | aip99/Plasma-Emissions | cee99eb6cf55495ade5f7cfdbd12a99c4a8e870f | [
"MIT"
] | null | null | null | post_data.py | aip99/Plasma-Emissions | cee99eb6cf55495ade5f7cfdbd12a99c4a8e870f | [
"MIT"
] | null | null | null | post_data.py | aip99/Plasma-Emissions | cee99eb6cf55495ade5f7cfdbd12a99c4a8e870f | [
"MIT"
] | null | null | null | import matlab_extractor as me
import os
data = 'C:/Users/16098/Documents/Research Project/Exported_Data_l_10/'
def reader(data, method, length):
content = os.listdir(data)
ind = content.index(method + "_" + str(length) +".txt")
print(ind)
text_file = open(data + content[ind], "r")
lines ... | 22.446429 | 78 | 0.552108 |
7971196ab1099631faa5175de6b75c8561374378 | 865 | py | Python | zinnia_threaded_comments/models.py | dantezhu/zinnia-threaded-comments | fce5e76f5785bcca368fd80f8b24379e1b2420ee | [
"BSD-3-Clause"
] | null | null | null | zinnia_threaded_comments/models.py | dantezhu/zinnia-threaded-comments | fce5e76f5785bcca368fd80f8b24379e1b2420ee | [
"BSD-3-Clause"
] | null | null | null | zinnia_threaded_comments/models.py | dantezhu/zinnia-threaded-comments | fce5e76f5785bcca368fd80f8b24379e1b2420ee | [
"BSD-3-Clause"
] | null | null | null | """Models for zinnia-threaded-comments"""
from django.utils.translation import ugettext_lazy as _
from django.db import models
from django_comments.managers import CommentManager
from django_comments.models import Comment
from mptt.managers import TreeManager
from mptt.models import MPTTModel
from mptt.models import ... | 23.378378 | 55 | 0.678613 |
79711a1b3c39f0cea309d03480fe5da8f41b7d73 | 6,732 | py | Python | ether.py | swimclan/eth_mining | dbec8b3884bc61e9ff44d40f76121c8b2fb1abdd | [
"MIT"
] | 1 | 2021-10-09T18:26:13.000Z | 2021-10-09T18:26:13.000Z | ether.py | swimclan/eth_mining | dbec8b3884bc61e9ff44d40f76121c8b2fb1abdd | [
"MIT"
] | null | null | null | ether.py | swimclan/eth_mining | dbec8b3884bc61e9ff44d40f76121c8b2fb1abdd | [
"MIT"
] | null | null | null | import prices
class Mining:
def __init__(
self,
invest_days=3650,
eth_usd=400.0,
start_megahash = 0,
initial_investment = 15000,
daily_eth_per_megahash = 0.000141,
reinvest_ratio = 0.7,
contract_length = 730,
full_reinvest_til_even = False,
... | 44.582781 | 235 | 0.632204 |
79711a4672857b2e623cb41abeee62576acada40 | 2,060 | py | Python | examples/dfp/v201508/inventory_service/create_ad_units.py | wbrp/googleads-python-lib | c0f8ce6c4acfe88ce8f913a4f0e0e92b548e1022 | [
"Apache-2.0"
] | 1 | 2020-05-23T11:32:32.000Z | 2020-05-23T11:32:32.000Z | examples/dfp/v201508/inventory_service/create_ad_units.py | cmm08/googleads-python-lib | 97743df32eff92cf00cb8beaddcda42dfa0a37f4 | [
"Apache-2.0"
] | null | null | null | examples/dfp/v201508/inventory_service/create_ad_units.py | cmm08/googleads-python-lib | 97743df32eff92cf00cb8beaddcda42dfa0a37f4 | [
"Apache-2.0"
] | 2 | 2018-04-20T02:16:33.000Z | 2020-11-12T20:58:54.000Z | #!/usr/bin/python
#
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 28.611111 | 78 | 0.703398 |
79711a48ba53b52656682097bacf236c73e8d82c | 460 | py | Python | plotly/validators/layout/xaxis/_zerolinewidth.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | 2 | 2020-03-24T11:41:14.000Z | 2021-01-14T07:59:43.000Z | plotly/validators/layout/xaxis/_zerolinewidth.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | null | null | null | plotly/validators/layout/xaxis/_zerolinewidth.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | 4 | 2019-06-03T14:49:12.000Z | 2022-01-06T01:05:12.000Z | import _plotly_utils.basevalidators
class ZerolinewidthValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self,
plotly_name='zerolinewidth',
parent_name='layout.xaxis',
**kwargs
):
super(ZerolinewidthValidator, self).__init__(
plotly_nam... | 24.210526 | 75 | 0.61087 |
79711b0e05b0f2b4af7c66df47378ce5fd1f5af8 | 1,380 | py | Python | src/pagnn/prediction/gan/args.py | ostrokach/protein-adjacency-net | fd3ad0b9034eb61b0187752c1f38f7eed1a8f1dc | [
"MIT"
] | 1 | 2022-01-16T12:06:13.000Z | 2022-01-16T12:06:13.000Z | src/pagnn/prediction/gan/args.py | ostrokach/protein-adjacency-net | fd3ad0b9034eb61b0187752c1f38f7eed1a8f1dc | [
"MIT"
] | null | null | null | src/pagnn/prediction/gan/args.py | ostrokach/protein-adjacency-net | fd3ad0b9034eb61b0187752c1f38f7eed1a8f1dc | [
"MIT"
] | null | null | null | from pathlib import Path
import attr
from attr.validators import instance_of
from pagnn.utils import ArgsBase
def str_to_path(file):
return Path(file).resolve()
@attr.s
class Args(ArgsBase):
#: File from which we should read input (either *.pdb or *.parquet).
input_file: Path = attr.ib(converter=lamb... | 30.666667 | 98 | 0.691304 |
79711b234e5e7a6ca42764093a3466e7ac88d808 | 1,185 | py | Python | oauth2test.py | jsiverskog/skicka | 0efbf55e4e9da2ac904fce72ba92bb8d5726fe1d | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2021-01-06T00:43:28.000Z | 2021-01-06T00:43:28.000Z | oauth2test.py | jsiverskog/skicka | 0efbf55e4e9da2ac904fce72ba92bb8d5726fe1d | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | oauth2test.py | jsiverskog/skicka | 0efbf55e4e9da2ac904fce72ba92bb8d5726fe1d | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | #login
#curl -I
#granting access redirects to
#http://www.stuffmatic.com/?code=fe57277eae295fe3352d&state=abc123
#exchange code for an access token
#curl -I https://github.com/login/oauth/access_token?client_id=6c585bdf3d7aa7fc0182
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
import requests
PORT_N... | 24.6875 | 101 | 0.693671 |
79711b86680b26a09a6a802990cfe2c823c513e1 | 511 | py | Python | scripts/checksum.py | thurn/dungeonstrike | c9eb8867a7c9d5f6702d3fc743cc39d3bfc4a52d | [
"Apache-2.0"
] | 1 | 2017-10-07T14:40:12.000Z | 2017-10-07T14:40:12.000Z | scripts/checksum.py | thurn/dungeonstrike | c9eb8867a7c9d5f6702d3fc743cc39d3bfc4a52d | [
"Apache-2.0"
] | null | null | null | scripts/checksum.py | thurn/dungeonstrike | c9eb8867a7c9d5f6702d3fc743cc39d3bfc4a52d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
import lib
env = lib.init()
print("\nValidating checksums...\n")
third_party = os.path.join(env.client_root, 'Assets/ThirdParty')
for directory in os.listdir(third_party):
path = os.path.join(third_party, directory)
if not os.path.isdir(path): continue
if directory == "Plugins": ... | 28.388889 | 70 | 0.688845 |
79711bccf33dab18c3398adea2d99181a605adc9 | 3,684 | py | Python | doc/jupyter_execute/examples/iter8/progressive_rollout/separate_sdeps/abtest.py | edshee/seldon-core | 78c10fbca16a5e2a0c25b9673aa3deb220070e26 | [
"Apache-2.0"
] | null | null | null | doc/jupyter_execute/examples/iter8/progressive_rollout/separate_sdeps/abtest.py | edshee/seldon-core | 78c10fbca16a5e2a0c25b9673aa3deb220070e26 | [
"Apache-2.0"
] | null | null | null | doc/jupyter_execute/examples/iter8/progressive_rollout/separate_sdeps/abtest.py | edshee/seldon-core | 78c10fbca16a5e2a0c25b9673aa3deb220070e26 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# # Progressive Rollouts using Two Seldon Deployments
#
# In this example we will AB Test two Iris models: an SKLearn model and an XGBOOST model.
# We will run a progressive rollout allowing Iter8 to control the traffic to the two Seldon Deployments and gradually move traffic to ... | 19.492063 | 203 | 0.690825 |
79711c9b29757d2cc347d9bf8b9dd1c5e7b7ac57 | 10,570 | py | Python | Ch5_Cartopy/5_Python_Week5_cartopy.py | KLeeDE/Python | 0a12ffdabb25586ab47d10d5a320033918155eac | [
"MIT"
] | null | null | null | Ch5_Cartopy/5_Python_Week5_cartopy.py | KLeeDE/Python | 0a12ffdabb25586ab47d10d5a320033918155eac | [
"MIT"
] | null | null | null | Ch5_Cartopy/5_Python_Week5_cartopy.py | KLeeDE/Python | 0a12ffdabb25586ab47d10d5a320033918155eac | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Dec 3 12:03:49 2020
@author: Kyungmin Lee
"""
# R / Week3 Assignment
import warnings
warnings.filterwarnings("ignore")
import cartopy
import cartopy.crs as ccrs
import matplotlib.pyplot as plt
help(ccrs.PlateCarree())
# 1st figure
plt.figure()
ax = p... | 30.461095 | 124 | 0.672469 |
79711cc5a2aa19e1b1e580d275a8113b8898556f | 5,518 | py | Python | models/backbones/wrn.py | hanseungwook/SimSiam | ff363f2cfdee07ecfee6c25ae3e920fdb9302e57 | [
"MIT"
] | 1 | 2021-05-05T22:34:55.000Z | 2021-05-05T22:34:55.000Z | models/backbones/wrn.py | hanseungwook/SimSiam | ff363f2cfdee07ecfee6c25ae3e920fdb9302e57 | [
"MIT"
] | null | null | null | models/backbones/wrn.py | hanseungwook/SimSiam | ff363f2cfdee07ecfee6c25ae3e920fdb9302e57 | [
"MIT"
] | null | null | null | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
"""
Original Author: Wei Yang
"""
__all__ = ['wrn']
class BasicBlock(nn.Module):
def __init__(self, in_planes, out_planes, stride, dropRate=0.0):
super(BasicBlock, self).__init__()
self.bn1 = nn.BatchNorm2d(in_planes)... | 32.458824 | 116 | 0.589706 |
79711d656e77a03c0461206f9166b064d7df7e92 | 459 | py | Python | Pygame/Game/study/BasicPyGameProgram.py | danghohuuphuc/Code_Python | 4aee488bc0c4a7bf2c110bbfad3c8fd48b31a070 | [
"Apache-2.0"
] | null | null | null | Pygame/Game/study/BasicPyGameProgram.py | danghohuuphuc/Code_Python | 4aee488bc0c4a7bf2c110bbfad3c8fd48b31a070 | [
"Apache-2.0"
] | null | null | null | Pygame/Game/study/BasicPyGameProgram.py | danghohuuphuc/Code_Python | 4aee488bc0c4a7bf2c110bbfad3c8fd48b31a070 | [
"Apache-2.0"
] | null | null | null | # import library
import pygame
pygame.init()
# set up the drawing window
screen = pygame.display.set_mode([500, 500])
# the main game loop
running = True
while running:
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
screen.fill((255, 255, 255))
# draw... | 21.857143 | 59 | 0.64488 |
79711d6fed10c2f4ba1780a8b735c382ae8b494a | 83 | py | Python | AtCoder/ABC/A/page-1/059A.py | Nishi05/Competitive-programming | e59a6755b706d9d5c1f359f4511d92c114e6a94e | [
"MIT"
] | null | null | null | AtCoder/ABC/A/page-1/059A.py | Nishi05/Competitive-programming | e59a6755b706d9d5c1f359f4511d92c114e6a94e | [
"MIT"
] | null | null | null | AtCoder/ABC/A/page-1/059A.py | Nishi05/Competitive-programming | e59a6755b706d9d5c1f359f4511d92c114e6a94e | [
"MIT"
] | null | null | null | a, b, c = map(str, input().split())
print(a[0].upper()+b[0].upper()+c[0].upper())
| 20.75 | 45 | 0.542169 |
79711dd25c6174cb8db50e504372794ebb828d35 | 9,207 | py | Python | keras/saving/saved_model/utils.py | shantanusharma/keras | 662f6c5bb82b54d90ec8e863ac7a44c3b8c1b938 | [
"Apache-2.0"
] | 3 | 2021-03-15T05:32:36.000Z | 2021-12-14T07:29:53.000Z | keras/saving/saved_model/utils.py | bluemap19/keras | 662f6c5bb82b54d90ec8e863ac7a44c3b8c1b938 | [
"Apache-2.0"
] | 1 | 2021-03-01T13:50:34.000Z | 2021-03-01T13:50:34.000Z | keras/saving/saved_model/utils.py | bluemap19/keras | 662f6c5bb82b54d90ec8e863ac7a44c3b8c1b938 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 33.60219 | 109 | 0.732378 |
79712001d02c8b43afb2fb6d2df153af62e4c722 | 16,419 | py | Python | tests/conftest.py | kevinchow924/saleor | 51fc0066c185dc6b772bf30f183c703d48663f59 | [
"BSD-3-Clause"
] | null | null | null | tests/conftest.py | kevinchow924/saleor | 51fc0066c185dc6b772bf30f183c703d48663f59 | [
"BSD-3-Clause"
] | 1 | 2022-02-10T14:46:00.000Z | 2022-02-10T14:46:00.000Z | tests/conftest.py | kevinchow924/saleor | 51fc0066c185dc6b772bf30f183c703d48663f59 | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals
from decimal import Decimal
import pytest
from io import BytesIO
from PIL import Image
from django.contrib.sites.models import Site
from django.core.files.uploadedfile import SimpleUploadedFile
from django.contrib.auth.models import AnonymousUser, Group, Permis... | 29.907104 | 82 | 0.721055 |
7971200acc27d43a4116098398df722792075b2d | 2,465 | py | Python | zfused_maya/zfused_maya/tool/utility/assetmanage/assetlistwidget/assetlistwidget.py | qinningfx/zfused_outsource | bfc5558f05e3d6005653794a47bd863b61b009b1 | [
"Apache-2.0"
] | 2 | 2019-02-22T03:33:26.000Z | 2019-02-23T03:29:26.000Z | zfused_maya/zfused_maya/tool/utility/assetmanage/assetlistwidget/assetlistwidget.py | qinningfx/zfused_outsource | bfc5558f05e3d6005653794a47bd863b61b009b1 | [
"Apache-2.0"
] | null | null | null | zfused_maya/zfused_maya/tool/utility/assetmanage/assetlistwidget/assetlistwidget.py | qinningfx/zfused_outsource | bfc5558f05e3d6005653794a47bd863b61b009b1 | [
"Apache-2.0"
] | null | null | null | # coding:utf-8
# --author-- lanhua.zhou
from __future__ import print_function
import logging
from qtpy import QtWidgets, QtGui, QtCore
import zfused_api
import zfused_maya.core.record as record
import zfused_maya.core.resource as resource
import zfused_maya.widgets.widgets as widgets
from . import assetlistmodel, a... | 30.8125 | 103 | 0.679108 |
7971204e12380e3ca760aa957c3cb29d9dff7936 | 521 | py | Python | tests/test_utils.py | KIPAC/cfgmdl | ea2903b51594ca1102f812c73ad77228fe51cc00 | [
"BSD-3-Clause"
] | null | null | null | tests/test_utils.py | KIPAC/cfgmdl | ea2903b51594ca1102f812c73ad77228fe51cc00 | [
"BSD-3-Clause"
] | null | null | null | tests/test_utils.py | KIPAC/cfgmdl | ea2903b51594ca1102f812c73ad77228fe51cc00 | [
"BSD-3-Clause"
] | 1 | 2022-02-22T20:20:46.000Z | 2022-02-22T20:20:46.000Z | #!/usr/bin/env python
"""
Test the model build
"""
import numpy as np
from cfgmdl.utils import is_none, is_not_none
def test_none():
assert is_none(None)
assert is_none('None')
assert is_none('none')
assert is_none([]) == False
assert is_none({}) == False
assert is_none("a") == False
... | 18.607143 | 45 | 0.641075 |
7971206d5440b5036365668fd6e7d34100f485ba | 2,962 | py | Python | src/programy/parser/template/nodes/xml.py | narnikgamarnikus/program-y | 777b9a8a75ec787c037de9f11a8527875ff450b1 | [
"MIT"
] | null | null | null | src/programy/parser/template/nodes/xml.py | narnikgamarnikus/program-y | 777b9a8a75ec787c037de9f11a8527875ff450b1 | [
"MIT"
] | null | null | null | src/programy/parser/template/nodes/xml.py | narnikgamarnikus/program-y | 777b9a8a75ec787c037de9f11a8527875ff450b1 | [
"MIT"
] | null | null | null | """
Copyright (c) 2016-17 Keith Sterling http://www.keithsterling.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, mod... | 37.974359 | 126 | 0.687373 |
79712094369bab8bc0dc01f3167374bb5798999e | 832 | py | Python | python exercises/dek_program047.py | dek-odoo/python-samples | 0109d19e0aec3f40ea39973948d99657f7c27135 | [
"Apache-2.0"
] | 3 | 2015-01-30T07:06:26.000Z | 2020-08-04T05:09:23.000Z | python exercises/dek_program047.py | dek-odoo/python-samples | 0109d19e0aec3f40ea39973948d99657f7c27135 | [
"Apache-2.0"
] | null | null | null | python exercises/dek_program047.py | dek-odoo/python-samples | 0109d19e0aec3f40ea39973948d99657f7c27135 | [
"Apache-2.0"
] | 7 | 2017-06-15T23:27:48.000Z | 2021-12-28T17:34:16.000Z | # !/user/bin/python
# -*- coding: utf-8 -*-
#- Author : (DEK) Devendra Kavthekar
# Write a program which can map() and filter() to make a list whose
# elements are square of even number in [1,2,3,4,5,6,7,8,9,10].
# Hints:
# Use map() to generate a list.
# Use filter() to filter elements of a list.
# Use lambda to def... | 28.689655 | 67 | 0.653846 |
797120f890e00b3e9df1b25ad86eef363068995f | 335 | py | Python | ABC/205/C.py | i14kawanaka/AtCoder | 1dd24b42ef672a64c592dc6479a80c4fe8383abc | [
"MIT"
] | null | null | null | ABC/205/C.py | i14kawanaka/AtCoder | 1dd24b42ef672a64c592dc6479a80c4fe8383abc | [
"MIT"
] | null | null | null | ABC/205/C.py | i14kawanaka/AtCoder | 1dd24b42ef672a64c592dc6479a80c4fe8383abc | [
"MIT"
] | null | null | null | import numpy as np
s1 = input().split()
A = int(s1[0])
B = int(s1[1])
C = int(s1[2])
if(C%2 == 0): #偶数
if(np.abs(A)==np.abs(B)):
print("=")
elif(np.abs(A)>np.abs(B)):
print(">")
else:
print("<")
else:
if(A==B):
print("=")
elif(A>B):
print(">")
else:
... | 15.227273 | 30 | 0.408955 |
7971211b4846302aafbe44aacbfabea55aedf95c | 249 | py | Python | src/lesson_mathematics/fractions_limit_denominator.py | jasonwee/asus-rt-n14uhp-mrtg | 4fa96c3406e32ea6631ce447db6d19d70b2cd061 | [
"Apache-2.0"
] | 3 | 2018-08-14T09:33:52.000Z | 2022-03-21T12:31:58.000Z | src/lesson_mathematics/fractions_limit_denominator.py | jasonwee/asus-rt-n14uhp-mrtg | 4fa96c3406e32ea6631ce447db6d19d70b2cd061 | [
"Apache-2.0"
] | null | null | null | src/lesson_mathematics/fractions_limit_denominator.py | jasonwee/asus-rt-n14uhp-mrtg | 4fa96c3406e32ea6631ce447db6d19d70b2cd061 | [
"Apache-2.0"
] | null | null | null | import fractions
import math
print('PI =', math.pi)
f_pi = fractions.Fraction(str(math.pi))
print('No limit =', f_pi)
for i in [1, 6, 11, 60, 70, 90, 100]:
limited = f_pi.limit_denominator(i)
print('{0:8} = {1}'.format(i, limited))
| 20.75 | 43 | 0.618474 |
797122a5cfd00be530605fd5c1a38fd5ed430a6f | 13,286 | py | Python | rman_constants.py | fxjeane/RenderManForBlender | f41fd0b8b680c9d6cab1657662d9f37b19a3f9eb | [
"MIT"
] | null | null | null | rman_constants.py | fxjeane/RenderManForBlender | f41fd0b8b680c9d6cab1657662d9f37b19a3f9eb | [
"MIT"
] | null | null | null | rman_constants.py | fxjeane/RenderManForBlender | f41fd0b8b680c9d6cab1657662d9f37b19a3f9eb | [
"MIT"
] | null | null | null | import os
import bpy
RFB_ADDON_VERSION_MAJOR = 24
RFB_ADDON_VERSION_MINOR = 3
RFB_ADDON_VERSION_PATCH = 0
RFB_ADDON_VERSION = (RFB_ADDON_VERSION_MAJOR, RFB_ADDON_VERSION_MINOR, RFB_ADDON_VERSION_PATCH)
RFB_ADDON_VERSION_STRING = '%d.%d.%d' % (RFB_ADDON_VERSION_MAJOR, RFB_ADDON_VERSION_MINOR, RFB_ADDON_VERSION_PATCH)
R... | 71.816216 | 496 | 0.775252 |
797122b36ea00a714c5ea787eb85dfbe210203fa | 2,430 | py | Python | core/tests/test_agents/test_async_spawner.py | erexer/polyaxon | be14dae1ed56d568983388736bcdaf27a7baa4a4 | [
"Apache-2.0"
] | null | null | null | core/tests/test_agents/test_async_spawner.py | erexer/polyaxon | be14dae1ed56d568983388736bcdaf27a7baa4a4 | [
"Apache-2.0"
] | null | null | null | core/tests/test_agents/test_async_spawner.py | erexer/polyaxon | be14dae1ed56d568983388736bcdaf27a7baa4a4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 31.973684 | 74 | 0.734156 |
797123948f0c37117c4f365d825bcc1b6526c1d7 | 3,332 | py | Python | docs/source/conf.py | Smurphy000/arrow-datafusion | db305dadea458a26723fa53d85463155247d39f9 | [
"Apache-2.0"
] | null | null | null | docs/source/conf.py | Smurphy000/arrow-datafusion | db305dadea458a26723fa53d85463155247d39f9 | [
"Apache-2.0"
] | null | null | null | docs/source/conf.py | Smurphy000/arrow-datafusion | db305dadea458a26723fa53d85463155247d39f9 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 32.990099 | 79 | 0.691176 |
7971239e37a57033c0b0c9a7e8753f5e9a5c3d13 | 4,853 | py | Python | python/ccxt/base/errors.py | ngugc/ccxt | e65042475e8eb1c3ba4921502f8c0a81aed7e69f | [
"MIT"
] | null | null | null | python/ccxt/base/errors.py | ngugc/ccxt | e65042475e8eb1c3ba4921502f8c0a81aed7e69f | [
"MIT"
] | null | null | null | python/ccxt/base/errors.py | ngugc/ccxt | e65042475e8eb1c3ba4921502f8c0a81aed7e69f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# MIT License
# Copyright (c) 2017 Igor Kroitor
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use,... | 29.05988 | 145 | 0.695034 |
7971241f498261bcb4c3268ebf34169ddd569416 | 10,296 | py | Python | tests/views_employees_unittests.py | SideShowBoBGOT/EPAM-project | f96ce88c81a8c075daafc6f37b4df47186395320 | [
"Unlicense"
] | 1 | 2021-12-04T21:46:12.000Z | 2021-12-04T21:46:12.000Z | tests/views_employees_unittests.py | SideShowBoBGOT/EPAM-project | f96ce88c81a8c075daafc6f37b4df47186395320 | [
"Unlicense"
] | null | null | null | tests/views_employees_unittests.py | SideShowBoBGOT/EPAM-project | f96ce88c81a8c075daafc6f37b4df47186395320 | [
"Unlicense"
] | null | null | null | import os
import sys
sys.path.append(os.path.abspath(os.path.join('..')))
from models.departments import Departments
from models.employees import Employees
from models.users import User
from wsgi import app
import unittest
import datetime
from bs4 import BeautifulSoup
app.app_context().push()
ADMIN_LOGIN = User.que... | 50.719212 | 117 | 0.600913 |
79712554d58e1e3e47ddd93a38ebed66137d8250 | 84,382 | py | Python | datumaro/components/project.py | azhavoro/datumaro | 6fe1d68281d06cedac850b93c92ffb1da14bd9ae | [
"MIT"
] | null | null | null | datumaro/components/project.py | azhavoro/datumaro | 6fe1d68281d06cedac850b93c92ffb1da14bd9ae | [
"MIT"
] | null | null | null | datumaro/components/project.py | azhavoro/datumaro | 6fe1d68281d06cedac850b93c92ffb1da14bd9ae | [
"MIT"
] | null | null | null | # Copyright (C) 2019-2021 Intel Corporation
#
# SPDX-License-Identifier: MIT
from contextlib import ExitStack, suppress
from enum import Enum, auto
from typing import (
Any, Dict, Generic, Iterable, List, NewType, Optional, Tuple, TypeVar,
Union,
)
import json
import logging as log
import os
import os.path as ... | 34.329536 | 83 | 0.575502 |
797126d218d4cf195abe95e7fcc1fa3c5b01e864 | 1,341 | py | Python | sentiment/create_task_queue.py | hotpxl/nebuchadnezzar | b26e0f19b9fdfeb8baa094e0f5ee2526cefb6409 | [
"MIT"
] | 2 | 2015-05-20T18:02:40.000Z | 2016-08-07T18:57:27.000Z | sentiment/create_task_queue.py | hotpxl/nebuchadnezzar | b26e0f19b9fdfeb8baa094e0f5ee2526cefb6409 | [
"MIT"
] | null | null | null | sentiment/create_task_queue.py | hotpxl/nebuchadnezzar | b26e0f19b9fdfeb8baa094e0f5ee2526cefb6409 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
from __future__ import print_function
import logging
import argparse
import redis
import re
# Logger
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)s %(levelname)s: [%(name)s] %(... | 31.928571 | 92 | 0.700224 |
79712757c1ebc2c4650a08d5c19888ba4ab3c4c0 | 2,246 | py | Python | scripts/commands/tests/command_test.py | mzlee/pyre-check | e31eedeedd88aa92890ffe38afdc6063d8b21ef8 | [
"MIT"
] | null | null | null | scripts/commands/tests/command_test.py | mzlee/pyre-check | e31eedeedd88aa92890ffe38afdc6063d8b21ef8 | [
"MIT"
] | null | null | null | scripts/commands/tests/command_test.py | mzlee/pyre-check | e31eedeedd88aa92890ffe38afdc6063d8b21ef8 | [
"MIT"
] | null | null | null | # Copyright (c) 2016-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import io
import unittest
from unittest.mock import patch, mock_open, MagicMock
from ... import EnvironmentException # noqa
from ... import comma... | 29.552632 | 78 | 0.604185 |
7971277805808dd1fb0c2e9948aba80b5650d5ff | 17,184 | py | Python | nmtpy/models/attention_factors.py | lium-lst/nmtpy | dc0a1618f217d5117d6abeacdc15a22443561acf | [
"MIT"
] | 144 | 2016-07-29T06:02:49.000Z | 2020-12-04T08:58:20.000Z | nmtpy/models/attention_factors.py | lium-lst/nmtpy | dc0a1618f217d5117d6abeacdc15a22443561acf | [
"MIT"
] | 21 | 2017-02-16T15:49:20.000Z | 2018-03-15T18:11:08.000Z | nmtpy/models/attention_factors.py | lium-lst/nmtpy | dc0a1618f217d5117d6abeacdc15a22443561acf | [
"MIT"
] | 39 | 2017-02-07T16:40:08.000Z | 2021-08-09T17:19:12.000Z | # -*- coding: utf-8 -*-
# Python
from collections import OrderedDict
import tempfile
import os
# 3rd party
import numpy as np
import theano
import theano.tensor as tensor
# Ours
from ..layers import *
from ..defaults import INT, FLOAT
from ..nmtutils import *
from ..iterators.text import TextIterator
from ..iterato... | 49.808696 | 177 | 0.612139 |
79712935ab70da34ba33dd79c2f36c18d3b68872 | 1,286 | py | Python | pytorch_lightning/metrics/functional/average_precision.py | GabrielePicco/pytorch-lightning | 0d6dfd42d8965347a258e3d20e83bddd344e718f | [
"Apache-2.0"
] | 4 | 2021-07-27T14:39:02.000Z | 2022-03-07T10:57:13.000Z | pytorch_lightning/metrics/functional/average_precision.py | GabrielePicco/pytorch-lightning | 0d6dfd42d8965347a258e3d20e83bddd344e718f | [
"Apache-2.0"
] | 1 | 2021-03-25T18:10:25.000Z | 2021-04-06T18:54:04.000Z | pytorch_lightning/metrics/functional/average_precision.py | GabrielePicco/pytorch-lightning | 0d6dfd42d8965347a258e3d20e83bddd344e718f | [
"Apache-2.0"
] | 1 | 2022-01-08T14:06:27.000Z | 2022-01-08T14:06:27.000Z | # Copyright The PyTorch Lightning team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 36.742857 | 89 | 0.754277 |
797129f9477efae9301ebb4ec81042adb129d671 | 86 | py | Python | sensitive.py | pentestfail/CAPCollector | 7f03f92f6a6d45301467f1c4080bcda703816335 | [
"BSD-3-Clause"
] | 11 | 2015-01-24T03:04:31.000Z | 2022-01-12T23:33:49.000Z | sensitive.py | pentestfail/CAPCollector | 7f03f92f6a6d45301467f1c4080bcda703816335 | [
"BSD-3-Clause"
] | null | null | null | sensitive.py | pentestfail/CAPCollector | 7f03f92f6a6d45301467f1c4080bcda703816335 | [
"BSD-3-Clause"
] | 8 | 2015-04-19T18:22:53.000Z | 2021-12-15T11:21:02.000Z | SECRET_KEY=''
DATABASE_HOST=''
DATABASE_NAME=''
DATABASE_USER=''
DATABASE_PASSWORD=''
| 14.333333 | 20 | 0.767442 |
79712c01d2a8d3b3e0b80821325b19948d462eed | 2,226 | py | Python | scripts/ntripclient.py | xbroquer/ntrip_ros | 3769170384033f576b38f7839497c94c23e58aec | [
"BSD-3-Clause"
] | 6 | 2018-10-30T13:13:00.000Z | 2019-04-11T12:49:28.000Z | scripts/ntripclient.py | xbroquer/ntrip_ros | 3769170384033f576b38f7839497c94c23e58aec | [
"BSD-3-Clause"
] | 2 | 2019-06-21T10:50:29.000Z | 2020-01-22T19:18:21.000Z | scripts/ntripclient.py | xbroquer/ntrip_ros | 3769170384033f576b38f7839497c94c23e58aec | [
"BSD-3-Clause"
] | 22 | 2018-04-06T19:34:46.000Z | 2022-02-14T19:57:08.000Z | #!/usr/bin/python
import rospy
#from nmea_msgs.msg import Sentence
from rtcm_msgs.msg import Message
from httplib import HTTPConnection
from base64 import b64encode
from threading import Thread
class ntripconnect(Thread):
def __init__(self, ntc):
super(ntripconnect, self).__init__()
self.ntc = n... | 30.493151 | 98 | 0.593441 |
79712d1e7fa8ac5e910b3c3d4386efc93547407d | 3,270 | py | Python | .rflint.d/keyword.py | rickypc/dotfiles | 983ea4b526eda150bce4373baa75be4c24d52d2a | [
"MIT"
] | 3 | 2016-12-29T19:20:34.000Z | 2018-02-06T16:39:22.000Z | .rflint.d/keyword.py | rickypc/dotfiles | 983ea4b526eda150bce4373baa75be4c24d52d2a | [
"MIT"
] | null | null | null | .rflint.d/keyword.py | rickypc/dotfiles | 983ea4b526eda150bce4373baa75be4c24d52d2a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Robot Lint Rules - Lint rules for Robot Framework data files.
# Copyright (c) 2014, 2015, 2016 Richard Huang <rickypc@users.noreply.github.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Gen... | 33.367347 | 84 | 0.649235 |
79712e3b61cfa168328434e3ad92ae5434709b3b | 17,823 | py | Python | dace/codegen/compiler.py | Shigangli/dace | 966365a572921a6916737e4292e581e767873cf0 | [
"BSD-3-Clause"
] | null | null | null | dace/codegen/compiler.py | Shigangli/dace | 966365a572921a6916737e4292e581e767873cf0 | [
"BSD-3-Clause"
] | null | null | null | dace/codegen/compiler.py | Shigangli/dace | 966365a572921a6916737e4292e581e767873cf0 | [
"BSD-3-Clause"
] | 1 | 2021-03-04T13:01:48.000Z | 2021-03-04T13:01:48.000Z | # Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.
""" Handles compilation of code objects. Creates the proper folder structure,
compiles each target separately, links all targets to one binary, and
returns the corresponding CompiledSDFG object. """
from __future__ import print_functio... | 39.085526 | 83 | 0.623296 |
79712efae86f6e20f249fcd8cd27cc32f12b72dc | 12,084 | py | Python | src/test.py | jrkoenig/mypyvy | 3ae6a0198ac7114a0f3f97405f320f16bde835dd | [
"MIT"
] | null | null | null | src/test.py | jrkoenig/mypyvy | 3ae6a0198ac7114a0f3f97405f320f16bde835dd | [
"MIT"
] | null | null | null | src/test.py | jrkoenig/mypyvy | 3ae6a0198ac7114a0f3f97405f320f16bde835dd | [
"MIT"
] | null | null | null | import unittest
import utils
import parser
import syntax
import mypyvy
import os
from pathlib import Path
import shlex
import subprocess
from typing import List
PROJECT_ROOT = Path(__file__).resolve().parent.parent
class SyntaxTests(unittest.TestCase):
def setUp(self) -> None:
utils.args = mypyvy.parse... | 46.122137 | 188 | 0.582092 |
79712f5adf591d2ae63bb6872ccd13869dcda5f5 | 395 | py | Python | gen_supp.py | cbosoft/syringepump | 50597082f765a363d247e240ade4f5fdc2a50156 | [
"MIT"
] | null | null | null | gen_supp.py | cbosoft/syringepump | 50597082f765a363d247e240ade4f5fdc2a50156 | [
"MIT"
] | 2 | 2020-03-06T08:59:03.000Z | 2020-03-06T09:01:36.000Z | gen_supp.py | cbosoft/syringepump | 50597082f765a363d247e240ade4f5fdc2a50156 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
ignore_libs = ['libpango', 'libgtk', 'libgobject', 'libglib', 'libfreetype', 'libfontconfig', 'libgdk', 'libdl', 'libcairo', 'libX11', 'librsvg', 'libpixman', 'libdbus']
err_types = ['Cond', 'Leak', 'Addr8', 'Value8']
for lib in ignore_libs:
for err in err_types:
supp = f'{{\n <{lib}>\... | 39.5 | 169 | 0.597468 |
79712fd970b447da016e7bf4e7228d9e3cb861b4 | 3,000 | py | Python | Aula 13/Exercicios/Exercicio.py | diegorafaelvieira/Programacao-1 | 657a974f1215cec4aed68603e738d9a135131545 | [
"MIT"
] | null | null | null | Aula 13/Exercicios/Exercicio.py | diegorafaelvieira/Programacao-1 | 657a974f1215cec4aed68603e738d9a135131545 | [
"MIT"
] | null | null | null | Aula 13/Exercicios/Exercicio.py | diegorafaelvieira/Programacao-1 | 657a974f1215cec4aed68603e738d9a135131545 | [
"MIT"
] | null | null | null | texto = ("Deixe-me começar dizendo o que pensamento computacional não é. Não se trata, por exemplo, de saber navegar na internet, enviar email, publicar um blog, ou operar um processador de texto.Pensamento computacional é saber usar o computador como um instrumento de aumento do poder cognitivo e operacional humano – ... | 52.631579 | 1,656 | 0.715333 |
797130070263ecfa27da4db355fa893b9dea8450 | 3,425 | py | Python | pycppad/runge_kutta_4.py | utke1/pycppad | 0713cd0fbbce5f4475934adc55a42eac56e4fbb6 | [
"Unlicense"
] | 15 | 2015-09-09T04:50:57.000Z | 2022-01-18T00:54:33.000Z | pycppad/runge_kutta_4.py | utke1/pycppad | 0713cd0fbbce5f4475934adc55a42eac56e4fbb6 | [
"Unlicense"
] | 1 | 2016-11-21T03:36:05.000Z | 2016-11-23T14:10:46.000Z | pycppad/runge_kutta_4.py | utke1/pycppad | 0713cd0fbbce5f4475934adc55a42eac56e4fbb6 | [
"Unlicense"
] | 7 | 2016-11-13T02:43:59.000Z | 2021-01-11T16:31:04.000Z | # $begin runge_kutta_4$$ $newlinech #$$
# $spell
# pycppad
# def
# numpy
# yi
# yf
# Runge-Kutta
# dt
# 2nd ed.
# $$
# $index ODE solver, Runge-Kutta$$
# $index Runge-Kutta, ODE solver$$
#
# $section Fourth Order Runge Kutta$$
#
# $head Syntax$$
# $codei% yf = runge_kutta_4(%f%, %ti%, %yi%, %dt%)%$$
#
# $head Purpose$$... | 31.136364 | 76 | 0.621314 |
797130522e525a58e85e7b3f848947aed4b21310 | 2,150 | py | Python | detro/packages/circledet/network.py | Peiiii/detro | 26d74468d7554dc20b2a2daf7ec5009302c820f2 | [
"MIT"
] | null | null | null | detro/packages/circledet/network.py | Peiiii/detro | 26d74468d7554dc20b2a2daf7ec5009302c820f2 | [
"MIT"
] | null | null | null | detro/packages/circledet/network.py | Peiiii/detro | 26d74468d7554dc20b2a2daf7ec5009302c820f2 | [
"MIT"
] | null | null | null | from .resnet_backbone import resnet18
from torch import nn
import torch
import torch.nn.functional as F
from detro.networks.components import BiFPN, Center_layer, Offset_layer, Reg_layer, Heatmap_layer
from detro.networks.losslib import center_loss, distance_loss
class FeatureFusionNetwork(nn.Module):
def __init_... | 33.59375 | 97 | 0.649767 |
79713106e90036f41be0e0b0eced23775ce4a5dd | 23 | py | Python | cantools/version.py | andlaus/cantools | 386f51a1c9bb42d065b8ba20d8745e8ceae97e83 | [
"MIT"
] | 2 | 2021-02-16T15:15:21.000Z | 2022-02-03T08:56:44.000Z | cantools/version.py | andlaus/cantools | 386f51a1c9bb42d065b8ba20d8745e8ceae97e83 | [
"MIT"
] | null | null | null | cantools/version.py | andlaus/cantools | 386f51a1c9bb42d065b8ba20d8745e8ceae97e83 | [
"MIT"
] | null | null | null | __version__ = '35.5.0'
| 11.5 | 22 | 0.652174 |
79713181c04e637858a255dd84d50dfb8f2ccae8 | 4,890 | py | Python | sp_api/base/credential_provider.py | Camille-cmd/python-amazon-sp-api | 00a169a0b16700e1498550742f384de74fca4aa3 | [
"MIT"
] | 213 | 2020-12-20T09:43:47.000Z | 2022-03-30T10:00:41.000Z | sp_api/base/credential_provider.py | Camille-cmd/python-amazon-sp-api | 00a169a0b16700e1498550742f384de74fca4aa3 | [
"MIT"
] | 173 | 2021-01-02T10:24:27.000Z | 2022-03-31T08:27:48.000Z | sp_api/base/credential_provider.py | Camille-cmd/python-amazon-sp-api | 00a169a0b16700e1498550742f384de74fca4aa3 | [
"MIT"
] | 109 | 2021-01-06T03:16:47.000Z | 2022-03-24T11:41:29.000Z | import json
import os
import confuse
import boto3
from botocore.exceptions import ClientError
from cachetools import Cache
required_credentials = [
'aws_access_key',
'aws_secret_key',
'lwa_app_id',
'lwa_client_secret'
]
class MissingCredentials(Exception):
"""
Credentials are missing, see th... | 34.195804 | 99 | 0.645399 |
797131c714eda01b307c2d96ae34eba28564e34f | 481 | py | Python | home/wsgi.py | MarkDavidson/taxii2_demo | c2a1ff52c93f236aa81254ed33193c27e6096a0b | [
"MIT"
] | null | null | null | home/wsgi.py | MarkDavidson/taxii2_demo | c2a1ff52c93f236aa81254ed33193c27e6096a0b | [
"MIT"
] | null | null | null | home/wsgi.py | MarkDavidson/taxii2_demo | c2a1ff52c93f236aa81254ed33193c27e6096a0b | [
"MIT"
] | null | null | null | """
WSGI config for taxii2 project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
from whitenoise.django import DjangoW... | 24.05 | 78 | 0.800416 |
79713224eb7bfc1a9ac259922bc1973b92440e3a | 28,050 | py | Python | par_writer_runner.py | ogoodwin505/BdNMC_Mphys | 5dd8bf4fd15f8e2d371751449511e872e3452b5c | [
"MIT"
] | null | null | null | par_writer_runner.py | ogoodwin505/BdNMC_Mphys | 5dd8bf4fd15f8e2d371751449511e872e3452b5c | [
"MIT"
] | null | null | null | par_writer_runner.py | ogoodwin505/BdNMC_Mphys | 5dd8bf4fd15f8e2d371751449511e872e3452b5c | [
"MIT"
] | null | null | null | from par_writer import *
import numpy as np
import sys
import math
import copy
import time
_pion_decay=1
_eta_decay=2
_rho_decay=3
_parton=4
_brem=5
_piminus_cap=6
_phi_decay=7
_pion_inelastic_channels={"Pion_Inelastic","Pion_Inelastic_Charged","Inelastic_Delta_to_Gamma"}
#write_miniboone(mdm=0.005,mv=0.4,proddist=... | 46.984925 | 272 | 0.627344 |
7971328e96a472e64097229fe622d75ab09d54ed | 5,648 | py | Python | src/classes/database.py | varshilshah-2002/Stock_Market_Simulator | 9d13b3cc0104c7c297232637c479c30ded217acf | [
"Apache-2.0"
] | null | null | null | src/classes/database.py | varshilshah-2002/Stock_Market_Simulator | 9d13b3cc0104c7c297232637c479c30ded217acf | [
"Apache-2.0"
] | null | null | null | src/classes/database.py | varshilshah-2002/Stock_Market_Simulator | 9d13b3cc0104c7c297232637c479c30ded217acf | [
"Apache-2.0"
] | null | null | null | import sqlite3 as db
from datetime import date
cnt = db.connect('storage.db')
try:
cnt.execute('''CREATE TABLE PERSON(
email TEXT PRIMARY KEY,
password TEXT,
balance REAL,
net_profit REAL,
net_loss REAL);''')
except:
print("Log/database/PERSON TABLE ALREADY EXISTS")
try... | 38.951724 | 140 | 0.623229 |
797134b7d9f4bd990972e4ab81bfce3cc3b627ba | 3,661 | py | Python | manager-blueprint/scripts/configure.py | pathakvaidehi2391/WorkSpace | 5c4b9bad6e5aa786a34cbb10e20df23d5fbb8ce9 | [
"Apache-2.0"
] | null | null | null | manager-blueprint/scripts/configure.py | pathakvaidehi2391/WorkSpace | 5c4b9bad6e5aa786a34cbb10e20df23d5fbb8ce9 | [
"Apache-2.0"
] | null | null | null | manager-blueprint/scripts/configure.py | pathakvaidehi2391/WorkSpace | 5c4b9bad6e5aa786a34cbb10e20df23d5fbb8ce9 | [
"Apache-2.0"
] | null | null | null | ########
# Copyright (c) 2014 GigaSpaces Technologies Ltd. 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... | 36.61 | 126 | 0.690522 |
79713501c24eb0f30bca75e51ee4e83ac8b7865c | 73,762 | py | Python | biostarPython/service/device_pb2_copy.py | gcartlidge/biostarPython | 4985371ef99c9241b9ed3e5ce107ab5bcdf9eb64 | [
"MIT"
] | null | null | null | biostarPython/service/device_pb2_copy.py | gcartlidge/biostarPython | 4985371ef99c9241b9ed3e5ce107ab5bcdf9eb64 | [
"MIT"
] | null | null | null | biostarPython/service/device_pb2_copy.py | gcartlidge/biostarPython | 4985371ef99c9241b9ed3e5ce107ab5bcdf9eb64 | [
"MIT"
] | null | null | null | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: device.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _me... | 35.394434 | 7,477 | 0.754576 |
7971351d2b985fd085baade9d86ec8b7bcf1fda9 | 154 | py | Python | noheavenbot/utils/__init__.py | Molanito13/noheaven-bot | ad126d4601321ecabff9d1d214ce7d3f4e258c3e | [
"MIT"
] | 3 | 2018-10-13T14:05:24.000Z | 2018-12-25T21:40:21.000Z | noheavenbot/utils/__init__.py | Molanito13/noheaven-bot | ad126d4601321ecabff9d1d214ce7d3f4e258c3e | [
"MIT"
] | 2 | 2018-10-08T14:33:39.000Z | 2020-03-02T18:00:47.000Z | noheavenbot/utils/__init__.py | Molanito13/noheaven-bot | ad126d4601321ecabff9d1d214ce7d3f4e258c3e | [
"MIT"
] | 5 | 2018-10-08T14:18:58.000Z | 2020-11-01T17:55:51.000Z | from noheavenbot.utils.database_config import Database
from noheavenbot.utils.different_utils import pretify_done
__all__ = ['Database', 'pretify_done']
| 30.8 | 58 | 0.837662 |
7971355ca3b64d37e26c6d25a0fc250623e2eca0 | 443 | py | Python | extrabacon-2.0/improved/shellcode_8_0(4).py | JS-Burns/CVE-2016-6366 | 0ba7426a9bf2a01c807608b7e1b63f87fe2699a5 | [
"MIT"
] | 171 | 2016-09-22T23:35:35.000Z | 2021-12-21T21:56:17.000Z | extrabacon-2.0/improved/shellcode_8_0(4).py | FDlucifer/CVE-2016-6366 | 0ba7426a9bf2a01c807608b7e1b63f87fe2699a5 | [
"MIT"
] | 3 | 2016-09-27T01:05:07.000Z | 2016-11-02T03:12:21.000Z | extrabacon-2.0/improved/shellcode_8_0(4).py | FDlucifer/CVE-2016-6366 | 0ba7426a9bf2a01c807608b7e1b63f87fe2699a5 | [
"MIT"
] | 79 | 2016-09-22T23:16:29.000Z | 2021-05-07T16:17:13.000Z | ##
## this file autogenerated
## 8.0(4)
##
jmp_esp_offset = "109.188.26.9"
saferet_offset = "140.100.168.8"
fix_ebp = "88"
pmcheck_bounds = "0.96.19.9"
pmcheck_offset = "128.101.19.9"
pmcheck_code = "85.49.192.137"
admauth_bounds = "0.96.6.8"
admauth_offset = "176.104.6.8"
admauth_code = "85.137.229.87"
# "8.0(4)" =... | 26.058824 | 135 | 0.632054 |
7971379ca60c11a5ae51f21d439311fc09cb1e78 | 14,040 | py | Python | scripts/validate_docstrings.py | gsyqax/pandas | cb35d8a938c9222d903482d2f66c62fece5a7aae | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | 4 | 2015-06-09T07:27:52.000Z | 2021-08-06T13:50:05.000Z | scripts/validate_docstrings.py | MohamedGamal-HIZ/pandas | 148f9fd74fc71cb7509c0898883036316efc6f89 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | 7 | 2015-08-30T23:51:00.000Z | 2018-12-29T19:52:35.000Z | scripts/validate_docstrings.py | MohamedGamal-HIZ/pandas | 148f9fd74fc71cb7509c0898883036316efc6f89 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | 5 | 2017-10-04T22:24:49.000Z | 2021-08-06T13:50:13.000Z | #!/usr/bin/env python3
"""
Analyze docstrings to detect errors.
If no argument is provided, it does a quick check of docstrings and returns
a csv with all API functions and results of basic checks.
If a function or method is provided in the form "pandas.function",
"pandas.module.class.method", etc. a list of all erro... | 32.054795 | 85 | 0.609117 |
797138cd0d3aace11ab664454ed58446fdabbf03 | 14,745 | py | Python | metrics/stats.py | idea-iitd/graphgen | 0c74511faeed593dcfa7a6c59fc177812232f7d2 | [
"MIT"
] | 34 | 2020-01-23T11:08:02.000Z | 2022-03-02T01:50:04.000Z | metrics/stats.py | idea-iitd/graphgen | 0c74511faeed593dcfa7a6c59fc177812232f7d2 | [
"MIT"
] | 6 | 2020-02-17T11:22:15.000Z | 2021-12-20T16:35:00.000Z | metrics/stats.py | idea-iitd/graphgen | 0c74511faeed593dcfa7a6c59fc177812232f7d2 | [
"MIT"
] | 11 | 2020-01-28T08:10:44.000Z | 2022-01-03T20:31:39.000Z | import concurrent.futures
import os
import pickle
import subprocess as sp
import tempfile
from datetime import datetime
from functools import partial
import numpy as np
import networkx as nx
import metrics.mmd as mmd
PRINT_TIME = True
MAX_WORKERS = 48
def degree_worker(G):
return np.array(nx.degree_histogram(G)... | 32.477974 | 112 | 0.650797 |
797138e350d2ae45c34b72781970ab9b7df05b25 | 4,132 | py | Python | arm_20/geometric_approach/geometrical_ik_v3.py | ogzgbkn/rover_20 | a10a4f658e1bfb876e3063b9183f0aac71fe6dfd | [
"BSD-2-Clause"
] | 1 | 2021-03-12T16:02:51.000Z | 2021-03-12T16:02:51.000Z | arm_20/geometric_approach/geometrical_ik_v3.py | Aydogan99/rover_20 | ca35debe3decb67fd1a3270ce478984ae7af8f60 | [
"BSD-2-Clause"
] | null | null | null | arm_20/geometric_approach/geometrical_ik_v3.py | Aydogan99/rover_20 | ca35debe3decb67fd1a3270ce478984ae7af8f60 | [
"BSD-2-Clause"
] | null | null | null | import rospy
import math
from std_msgs.msg import Float64 as F64
import numpy as np
from random import randint
from calculations import *
from sensor_msgs.msg import Joy
from Arm import *
global x,xi,y,yi,z,zi,w,flag,button
flag=False
x=54.0
y=50.0
z=0.0
xi=0.0
yi=0.0
zi=0.0
button=0.0
pitch=0.0
yaw=0.0
roll=0.0
def ... | 28.30137 | 265 | 0.739835 |
79713905e60ab841f4c5e769ee08c4af6bfa9df8 | 470 | py | Python | help/examples/only_analyze.py | renderbus/rayvision_houdini | 4241080b81f8d1beee4fe9e9b5bb95f2eb7e5fe2 | [
"Apache-2.0"
] | 3 | 2019-11-15T10:55:00.000Z | 2020-04-16T02:51:32.000Z | help/examples/only_analyze.py | renderbus/rayvision_houdini | 4241080b81f8d1beee4fe9e9b5bb95f2eb7e5fe2 | [
"Apache-2.0"
] | null | null | null | help/examples/only_analyze.py | renderbus/rayvision_houdini | 4241080b81f8d1beee4fe9e9b5bb95f2eb7e5fe2 | [
"Apache-2.0"
] | 1 | 2020-03-23T02:12:15.000Z | 2020-03-23T02:12:15.000Z | # -*- coding: utf-8 -*-
"""only analyze houdini"""
from rayvision_houdini.analyze_houdini import AnalyzeHoudini
analyze_info = {
"cg_file": r"D:\files\CG FILE\flip_test_slice4.hip",
"workspace": "c:/workspace",
"software_version": "17.5.293",
"project_name": "Project1",
"plugin_config": {
... | 29.375 | 121 | 0.678723 |
79713909907f119a1643ad3c70352c00d7a188ca | 4,214 | py | Python | kalasiris/specialpixels.py | rbeyer/kalasiris | e09d5554fe90442d22f0ae545a7ca0dac7623f67 | [
"BSD-3-Clause"
] | 6 | 2019-02-22T17:54:17.000Z | 2022-02-21T12:04:56.000Z | kalasiris/specialpixels.py | rbeyer/kalasiris | e09d5554fe90442d22f0ae545a7ca0dac7623f67 | [
"BSD-3-Clause"
] | 8 | 2019-02-22T16:50:39.000Z | 2021-11-15T17:56:06.000Z | kalasiris/specialpixels.py | rbeyer/kalasiris | e09d5554fe90442d22f0ae545a7ca0dac7623f67 | [
"BSD-3-Clause"
] | 4 | 2019-02-22T16:54:44.000Z | 2022-02-24T04:46:50.000Z | # -*- coding: utf-8 -*-
"""Constants for Isis Special Pixels.
The constants are provided as SpecialPixel :func:collection.namedtuple:
objects, and have the following keys: Min, Null, Lrs, Lis, His,
Hrs, and Max.
Null
A null pixel indicates no data was collected at the particular
location.
Lis
A low inst... | 32.921875 | 108 | 0.714286 |
7971399f5ae576c6ae5b6815b1a206d890d37297 | 709 | py | Python | test_wallet.py | hillarykhan/lambdata | 319d4465ab5081e72a12360a8f9fadf70ef873dd | [
"MIT"
] | null | null | null | test_wallet.py | hillarykhan/lambdata | 319d4465ab5081e72a12360a8f9fadf70ef873dd | [
"MIT"
] | null | null | null | test_wallet.py | hillarykhan/lambdata | 319d4465ab5081e72a12360a8f9fadf70ef873dd | [
"MIT"
] | null | null | null | import pytest
from lambdata.wallet import Wallet
@pytest.fixture
def empty_wallet():
"""Returns a wallet instance with a zero balance"""
return Wallet()
@pytest.fixture
def wallet():
"""Returns wallet of balance 20"""
return Wallet(20)
def test_default_initial_amount(empty_wallet):
# wallet = ... | 19.162162 | 55 | 0.700987 |
79713a65a94336f05fd66a8c533aa354321ca303 | 1,087 | py | Python | Prepare/mongo_client.py | vedk21/video-games-analysis | 3497806e598fa34ba5238fbc60fc191f03b7bf5f | [
"MIT"
] | null | null | null | Prepare/mongo_client.py | vedk21/video-games-analysis | 3497806e598fa34ba5238fbc60fc191f03b7bf5f | [
"MIT"
] | null | null | null | Prepare/mongo_client.py | vedk21/video-games-analysis | 3497806e598fa34ba5238fbc60fc191f03b7bf5f | [
"MIT"
] | null | null | null | import sys
import os
from pymongo import MongoClient
# add internal packages
sys.path.append(os.path.join(os.path.dirname(sys.path[0]), 'config'))
from mongo_config import MONGO_SERVER_CONFIG
def create_or_use_database_and_collection(db_connection, db_name, collection_name):
db = db_connection[db_name]
cln = db[co... | 38.821429 | 246 | 0.793928 |
79713a66197afe7e08af3aeddf9f3a5f8671ac9f | 417 | py | Python | trade_remedies_api/documents/admin.py | uktrade/trade-remedies-api | fbe2d142ef099c7244788a0f72dd1003eaa7edce | [
"MIT"
] | 1 | 2020-08-13T10:37:15.000Z | 2020-08-13T10:37:15.000Z | trade_remedies_api/documents/admin.py | uktrade/trade-remedies-api | fbe2d142ef099c7244788a0f72dd1003eaa7edce | [
"MIT"
] | 4 | 2020-09-10T13:41:52.000Z | 2020-12-16T09:00:21.000Z | trade_remedies_api/documents/admin.py | uktrade/trade-remedies-api | fbe2d142ef099c7244788a0f72dd1003eaa7edce | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Document, DocumentBundle
class DocumentAdmin(admin.ModelAdmin):
list_display = ("name", "file", "system", "checksum", "size", "created_at")
list_filter = ["system"]
search_fields = ["name"]
class DocumentBundleAdmin(admin.ModelAdmin):
pass
admin... | 24.529412 | 79 | 0.748201 |
79713bd814c190cfe87a882338183a4940614dda | 11,837 | py | Python | ez_setup.py | starofrainnight/tesseract_baker | 1f4d2f63784fe044ce09b7f6ba83583984c59ba1 | [
"MIT"
] | 87 | 2015-01-01T03:48:19.000Z | 2021-11-23T16:23:24.000Z | ez_setup.py | starofrainnight/tesseract_baker | 1f4d2f63784fe044ce09b7f6ba83583984c59ba1 | [
"MIT"
] | 189 | 2015-01-06T15:53:11.000Z | 2019-05-31T13:19:45.000Z | ez_setup.py | starofrainnight/tesseract_baker | 1f4d2f63784fe044ce09b7f6ba83583984c59ba1 | [
"MIT"
] | 56 | 2015-01-13T02:18:50.000Z | 2022-01-05T10:00:59.000Z | #!python
"""Bootstrap setuptools installation
If you want to use setuptools in your package's setup.py, just include this
file in the same directory with it, and add this to the top of your setup.py::
from ez_setup import use_setuptools
use_setuptools()
If you want to require a specific version of setuptools... | 31.90566 | 87 | 0.638591 |
79713c7b46ef50bf7eb5becb667f0255c2dc665a | 2,213 | py | Python | deeppavlov_agent/utils/http_api_stress_test.py | deepmipt/dp-agent | 74b5b993a451ac54efd9a5086ff507a9520ad0c6 | [
"Apache-2.0"
] | 54 | 2019-05-16T12:58:54.000Z | 2022-01-09T06:09:01.000Z | deeppavlov_agent/utils/http_api_stress_test.py | deepmipt/dp-agent | 74b5b993a451ac54efd9a5086ff507a9520ad0c6 | [
"Apache-2.0"
] | 27 | 2019-06-13T12:31:42.000Z | 2021-09-10T16:37:59.000Z | deeppavlov_agent/utils/http_api_stress_test.py | deepmipt/dp-agent | 74b5b993a451ac54efd9a5086ff507a9520ad0c6 | [
"Apache-2.0"
] | 25 | 2019-06-08T03:30:48.000Z | 2022-03-17T15:47:27.000Z | import argparse
import asyncio
import uuid
from statistics import mean, median
from time import time
import aiohttp
parser = argparse.ArgumentParser()
parser.add_argument('-u', '--url', type=str)
parser.add_argument('-pf', '--phrasesfile', help='name of the file with phrases for dialog', type=str, default="")
parser.... | 34.578125 | 114 | 0.634885 |
79713ce19370d013e188af271587f48174220d8d | 26,979 | py | Python | examples/pytorch/eager/huggingface_models/examples/text-classification/run_glue_no_trainer_gradient_prune.py | intelkevinputnam/lpot-docs | 1ff32b4d89074a6bd133ba531f7c0cea3b73152f | [
"Apache-2.0"
] | null | null | null | examples/pytorch/eager/huggingface_models/examples/text-classification/run_glue_no_trainer_gradient_prune.py | intelkevinputnam/lpot-docs | 1ff32b4d89074a6bd133ba531f7c0cea3b73152f | [
"Apache-2.0"
] | null | null | null | examples/pytorch/eager/huggingface_models/examples/text-classification/run_glue_no_trainer_gradient_prune.py | intelkevinputnam/lpot-docs | 1ff32b4d89074a6bd133ba531f7c0cea3b73152f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2021 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | 42.419811 | 126 | 0.64465 |
79713d7faa41d228e566ea0aa65e28cff8b271e6 | 23,940 | py | Python | mars/learn/decomposition/pca.py | ueshin/mars | 0b542974243be4e0ff239eaf49ab0fb2935f3361 | [
"Apache-2.0"
] | null | null | null | mars/learn/decomposition/pca.py | ueshin/mars | 0b542974243be4e0ff239eaf49ab0fb2935f3361 | [
"Apache-2.0"
] | null | null | null | mars/learn/decomposition/pca.py | ueshin/mars | 0b542974243be4e0ff239eaf49ab0fb2935f3361 | [
"Apache-2.0"
] | null | null | null | # Copyright 1999-2020 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 39.50495 | 99 | 0.612782 |
79713dc5b2fcf782efba9f83e45b7532c13e3960 | 8,886 | py | Python | luft/tasks/bq_load_task.py | lmc-eu/luft | 476b4c0cc81bd9c3c9bfe12a4f36436f543580ab | [
"MIT"
] | 1 | 2020-03-20T17:51:50.000Z | 2020-03-20T17:51:50.000Z | luft/tasks/bq_load_task.py | lmc-eu/luft | 476b4c0cc81bd9c3c9bfe12a4f36436f543580ab | [
"MIT"
] | 18 | 2019-09-04T09:02:33.000Z | 2020-03-27T11:15:00.000Z | luft/tasks/bq_load_task.py | lmc-eu/luft | 476b4c0cc81bd9c3c9bfe12a4f36436f543580ab | [
"MIT"
] | 2 | 2019-08-20T12:50:01.000Z | 2019-09-02T12:19:03.000Z | # -*- coding: utf-8 -*-
"""BigQuery Load Task."""
from pathlib import Path
from typing import Dict, List
from google.cloud import bigquery
from luft.common.column import Column
from luft.common.config import (
BQ_DATA_TYPES, BQ_HIST_DEFAULT_TEMPLATE, BQ_STAGE_DEFAULT_TEMPLATE,
BQ_STAGE_SCHEMA_FORM, GCS_BUCKET... | 44.43 | 99 | 0.582714 |
79713e3eacd27436f6dd83ff0de21f401ab775b3 | 4,350 | py | Python | project/partners/models.py | G-Papad/tedxntua2021 | ef895762a3a4cf8d8599a17ba60d98314390d6cf | [
"MIT"
] | null | null | null | project/partners/models.py | G-Papad/tedxntua2021 | ef895762a3a4cf8d8599a17ba60d98314390d6cf | [
"MIT"
] | null | null | null | project/partners/models.py | G-Papad/tedxntua2021 | ef895762a3a4cf8d8599a17ba60d98314390d6cf | [
"MIT"
] | null | null | null | from collections import OrderedDict
from django.utils.translation import ugettext_lazy as _
from django.db import models
from django.dispatch import receiver
from versatileimagefield.fields import VersatileImageField
from versatileimagefield.image_warmer import VersatileImageFieldWarmer
from parler.models import Transl... | 33.984375 | 114 | 0.674713 |
79713ed81d2d2058a33cb7f10c4f06dd2d31b53b | 40,724 | py | Python | fabric/connection.py | timsnyder/fabric | 35d7662ee020e8de236577a17571f1428c102479 | [
"BSD-2-Clause"
] | null | null | null | fabric/connection.py | timsnyder/fabric | 35d7662ee020e8de236577a17571f1428c102479 | [
"BSD-2-Clause"
] | 8 | 2021-09-22T12:47:32.000Z | 2022-01-14T21:30:38.000Z | venv/lib/python3.8/site-packages/fabric/connection.py | HCDigitalScholarship/migration-encounters | 08e705f8ed1b4d4e00d2c1112a8b5d30bf2ebd4d | [
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.000Z | from contextlib import contextmanager
from threading import Event
try:
from invoke.vendor.six import StringIO
from invoke.vendor.decorator import decorator
from invoke.vendor.six import string_types
except ImportError:
from six import StringIO
from decorator import decorator
from six import str... | 40.88755 | 163 | 0.617204 |
79713ed882a4c3d4058dfd5df0e0759aaabcf6d4 | 5,798 | py | Python | azure-vote/azure-vote/main.py | udoyen/azure-voting-app-redis | 7f60d05a84b4698277831bc86bdfb0cedf050785 | [
"MIT"
] | null | null | null | azure-vote/azure-vote/main.py | udoyen/azure-voting-app-redis | 7f60d05a84b4698277831bc86bdfb0cedf050785 | [
"MIT"
] | null | null | null | azure-vote/azure-vote/main.py | udoyen/azure-voting-app-redis | 7f60d05a84b4698277831bc86bdfb0cedf050785 | [
"MIT"
] | null | null | null | from flask import Flask, request, render_template
import os
import random
import redis
import socket
import sys
import logging
from datetime import datetime
# App Insights
# TODO: Import required libraries for App Insights
from opencensus.ext.azure.log_exporter import AzureLogHandler
from opencensus.ext.azure.log_expo... | 34.511905 | 186 | 0.72318 |
79713f3926f0c47d9da0b312a4866ae19bbe9456 | 17,249 | py | Python | sdks/python/.tox/docs/lib/python2.7/site-packages/sphinx/builders/__init__.py | YYTVicky/kafka | b0f3eb276fa034b215570cd4f837851d9fb9166a | [
"Apache-2.0"
] | 35 | 2016-09-22T22:53:14.000Z | 2020-02-13T15:12:21.000Z | sdks/python/.tox/docs/lib/python2.7/site-packages/sphinx/builders/__init__.py | axbaretto/presto | f137d2709db42b5c3e4d43a631832a8f74853065 | [
"Apache-2.0"
] | 28 | 2020-03-04T22:01:48.000Z | 2022-03-12T00:59:47.000Z | sdks/python/.tox/docs/lib/python2.7/site-packages/sphinx/builders/__init__.py | axbaretto/presto | f137d2709db42b5c3e4d43a631832a8f74853065 | [
"Apache-2.0"
] | 88 | 2016-11-27T02:16:11.000Z | 2020-02-28T05:10:26.000Z | # -*- coding: utf-8 -*-
"""
sphinx.builders
~~~~~~~~~~~~~~~
Builder superclass for all builders.
:copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import os
from os import path
try:
import multiprocessing
except ImportError:
mult... | 37.993392 | 86 | 0.604383 |
7971402860f11e731682247f0c42b025a4aa2ec9 | 2,659 | py | Python | test_flexbe_states/src/test_flexbe_states/robot_move.py | andy-Chien/dcma_flexbe | bf75abf7a6eee29b2dd94e1ed31ce01aba9e8542 | [
"BSD-3-Clause"
] | null | null | null | test_flexbe_states/src/test_flexbe_states/robot_move.py | andy-Chien/dcma_flexbe | bf75abf7a6eee29b2dd94e1ed31ce01aba9e8542 | [
"BSD-3-Clause"
] | null | null | null | test_flexbe_states/src/test_flexbe_states/robot_move.py | andy-Chien/dcma_flexbe | bf75abf7a6eee29b2dd94e1ed31ce01aba9e8542 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import rospy
from flexbe_core import EventState, Logger
from flexbe_core.proxy import ProxyActionClient
from moveit_msgs.msg import MoveGroupAction, MoveGroupGoal, Constraints, JointConstraint, MoveItErrorCodes
from control_msgs.msg import FollowJointTrajectoryGoal, FollowJointTrajectoryAction,... | 27.132653 | 144 | 0.743889 |
79714098a460f7d9047d672ea0989ba11c0fc2de | 13,219 | py | Python | osbs/build/spec.py | rcerven/osbs-client | c7e6fdde85ec65683b07b1983fd75aed0fb356c3 | [
"BSD-3-Clause"
] | null | null | null | osbs/build/spec.py | rcerven/osbs-client | c7e6fdde85ec65683b07b1983fd75aed0fb356c3 | [
"BSD-3-Clause"
] | null | null | null | osbs/build/spec.py | rcerven/osbs-client | c7e6fdde85ec65683b07b1983fd75aed0fb356c3 | [
"BSD-3-Clause"
] | null | null | null | """
Copyright (c) 2015 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import print_function, absolute_import, unicode_literals
import logging
import datetime
import os
import re
from osbs.constan... | 41.965079 | 110 | 0.66117 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.