hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4e7d0285d7f4e01703e7b30700e97bc01d069afe | 73 | py | Python | tests/validators/__init__.py | hiroaki-yamamoto/WTF-OTP | e7c87839cbe8683dd1f691912156ac348dc98e67 | [
"Unlicense",
"MIT"
] | 1 | 2019-06-27T06:47:25.000Z | 2019-06-27T06:47:25.000Z | tests/validators/__init__.py | hiroaki-yamamoto/WTF-OTP | e7c87839cbe8683dd1f691912156ac348dc98e67 | [
"Unlicense",
"MIT"
] | 2 | 2021-08-25T05:11:22.000Z | 2022-01-29T02:51:57.000Z | tests/validators/__init__.py | hiroaki-yamamoto/WTF-OTP | e7c87839cbe8683dd1f691912156ac348dc98e67 | [
"Unlicense",
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
"""OTP Number Validation tests."""
| 14.6 | 34 | 0.671233 |
4a5bb5d897f3509175df9a2a64e86dfc17e82843 | 1,028 | py | Python | new_api/urls.py | AlessandroSFreitas/rest_api | d6564e8b899c82312ef5d9830f7e81eb2476e0ad | [
"MIT"
] | null | null | null | new_api/urls.py | AlessandroSFreitas/rest_api | d6564e8b899c82312ef5d9830f7e81eb2476e0ad | [
"MIT"
] | null | null | null | new_api/urls.py | AlessandroSFreitas/rest_api | d6564e8b899c82312ef5d9830f7e81eb2476e0ad | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import path, include
from apps.person.api.views import PersonViewSet
from apps.family.api.views import FamilyViewSet
urlpatterns = [
path('', include('rest_framework.urls')),
path('admin/', admin.site.urls),
path('person/', PersonViewSet.as_view({"get": "l... | 31.151515 | 97 | 0.52821 |
df213235e601902428c2c6c2fb0856beebdb1318 | 19,495 | py | Python | airflow/models/dagrun.py | mebelousov/airflow | d99833c9b5be9eafc0c7851343ee86b6c20aed40 | [
"Apache-2.0"
] | 3 | 2019-12-11T15:54:13.000Z | 2021-05-24T20:21:08.000Z | airflow/models/dagrun.py | mebelousov/airflow | d99833c9b5be9eafc0c7851343ee86b6c20aed40 | [
"Apache-2.0"
] | 8 | 2021-02-08T20:40:47.000Z | 2022-03-29T22:27:53.000Z | airflow/models/dagrun.py | mebelousov/airflow | d99833c9b5be9eafc0c7851343ee86b6c20aed40 | [
"Apache-2.0"
] | 2 | 2021-01-11T13:53:03.000Z | 2021-10-02T05:06:34.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 37.928016 | 110 | 0.602257 |
b76da0316e7a291fa9219c005e1905d16780dd3e | 1,433 | py | Python | __Training__/Python - HackerRank/16. Numpy/Polynomials.py | JUD210/Study-Note | 2add9db3f11d99370f49878f0c19e9caa60d2d02 | [
"MIT"
] | null | null | null | __Training__/Python - HackerRank/16. Numpy/Polynomials.py | JUD210/Study-Note | 2add9db3f11d99370f49878f0c19e9caa60d2d02 | [
"MIT"
] | null | null | null | __Training__/Python - HackerRank/16. Numpy/Polynomials.py | JUD210/Study-Note | 2add9db3f11d99370f49878f0c19e9caa60d2d02 | [
"MIT"
] | null | null | null | # https://www.hackerrank.com/challenges/np-polynomials/problem
import numpy
# Inputs
standard_input = """1.1 2 3
0"""
p = [float(s) for s in input().split()]
# 1.1 2 3
x = int(input())
# 0
print(numpy.polyval(p, x))
# 3.0
""" Reference
[poly]
The poly tool returns the coefficients of a polynomial with the gi... | 19.364865 | 165 | 0.672715 |
50d900294828e2311282c6f5e84b2c9f7a33cca7 | 2,272 | py | Python | setup.py | akruszewski/kedro-mlflow | 330cab52642a0993e957740726e7d453282f1588 | [
"Apache-2.0"
] | null | null | null | setup.py | akruszewski/kedro-mlflow | 330cab52642a0993e957740726e7d453282f1588 | [
"Apache-2.0"
] | null | null | null | setup.py | akruszewski/kedro-mlflow | 330cab52642a0993e957740726e7d453282f1588 | [
"Apache-2.0"
] | null | null | null | import pathlib
import re
from setuptools import find_packages, setup
NAME = "kedro_mlflow"
HERE = pathlib.Path(__file__).parent
# get package version
with open((HERE / NAME / "__init__.py").as_posix(), encoding="utf-8") as file_handler:
result = re.search(r'__version__ *= *["\']([^"\']+)', file_handler.read())
... | 32.927536 | 148 | 0.680018 |
343f09834fd783225f8b469fb02773a6e6b949d6 | 2,774 | py | Python | tensorflow/python/profiler/profiler_client_test.py | nicolas-harraudeau-sonarsource/tensorflow | f42f57b814b82a217943f621967036a08bb95e88 | [
"Apache-2.0"
] | 27 | 2019-01-02T09:36:57.000Z | 2022-02-21T06:41:51.000Z | tensorflow/python/profiler/profiler_client_test.py | whoozle/tensorflow | a2725aa0153d52260f602c6604756840629d1569 | [
"Apache-2.0"
] | 3 | 2019-01-23T11:01:22.000Z | 2022-02-24T02:53:31.000Z | tensorflow/python/profiler/profiler_client_test.py | whoozle/tensorflow | a2725aa0153d52260f602c6604756840629d1569 | [
"Apache-2.0"
] | 11 | 2019-03-02T12:42:23.000Z | 2021-02-04T12:20:10.000Z | # Copyright 2020 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... | 41.402985 | 80 | 0.740807 |
1576e8e3a1fb52c674972866919edaf55178271f | 934 | py | Python | day01/t01/migrations/0002_cart_siji.py | lin8979/newrep01 | d0d7e157d522c2e83d1976a35d6a815c9e7e4257 | [
"Apache-2.0"
] | null | null | null | day01/t01/migrations/0002_cart_siji.py | lin8979/newrep01 | d0d7e157d522c2e83d1976a35d6a815c9e7e4257 | [
"Apache-2.0"
] | null | null | null | day01/t01/migrations/0002_cart_siji.py | lin8979/newrep01 | d0d7e157d522c2e83d1976a35d6a815c9e7e4257 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2.24 on 2021-06-09 15:09
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('t01', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Cart',
fields=[
('id', models... | 31.133333 | 114 | 0.549251 |
28202b8e169c48b2bfdb0c1d8efded224aec059c | 778 | py | Python | src/cardiac_geometries/_import_checks.py | ComputationalPhysiology/cardiac_geometries | ce4a621f5f067554fca58460ddb1892189aadd99 | [
"MIT"
] | 1 | 2022-01-31T11:14:08.000Z | 2022-01-31T11:14:08.000Z | src/cardiac_geometries/_import_checks.py | ComputationalPhysiology/cardiac_geometries | ce4a621f5f067554fca58460ddb1892189aadd99 | [
"MIT"
] | null | null | null | src/cardiac_geometries/_import_checks.py | ComputationalPhysiology/cardiac_geometries | ce4a621f5f067554fca58460ddb1892189aadd99 | [
"MIT"
] | null | null | null | try:
import meshio # noqa: F401
_has_meshio = True
except ImportError:
_has_meshio = False
try:
import dolfin # noqa: F401
_has_dolfin = True
except ImportError:
_has_dolfin = False
try:
import gmsh # noqa: F401
_has_gmsh = True
except (ImportError, OSError):
_has_gmsh = Fa... | 13.649123 | 31 | 0.654242 |
fa5beac2a607feca87ec71aba99b471a60a849ae | 3,203 | py | Python | core/tests/test_apps.nem.namespace.py | Kayuii/trezor-crypto | 6556616681a4e2d7e18817e8692d4f6e041dee01 | [
"MIT"
] | null | null | null | core/tests/test_apps.nem.namespace.py | Kayuii/trezor-crypto | 6556616681a4e2d7e18817e8692d4f6e041dee01 | [
"MIT"
] | 1 | 2019-02-08T00:22:42.000Z | 2019-02-13T09:41:54.000Z | core/tests/test_apps.nem.namespace.py | Kayuii/trezor-crypto | 6556616681a4e2d7e18817e8692d4f6e041dee01 | [
"MIT"
] | 2 | 2019-02-07T23:57:09.000Z | 2020-10-21T07:07:27.000Z | from common import *
from apps.nem.helpers import *
from apps.nem.namespace import *
from apps.nem.namespace.serialize import *
from trezor.crypto import hashlib
from trezor.messages.NEMProvisionNamespace import NEMProvisionNamespace
from trezor.messages.NEMSignTx import NEMSignTx
class TestNemNamespace(unittest.Te... | 43.876712 | 158 | 0.662816 |
1e5fbcb0616041dd9d158d6753fcfb63096ea6af | 6,733 | py | Python | statsmodels/stats/tests/test_dist_dependant_measures.py | timgates42/statsmodels | ab8ff09e3eb8c385214bd1575aa47b81bf53d584 | [
"BSD-3-Clause"
] | 2 | 2020-04-13T15:45:38.000Z | 2020-06-01T14:41:04.000Z | statsmodels/stats/tests/test_dist_dependant_measures.py | timgates42/statsmodels | ab8ff09e3eb8c385214bd1575aa47b81bf53d584 | [
"BSD-3-Clause"
] | 1 | 2020-04-21T02:42:32.000Z | 2020-04-21T02:42:32.000Z | statsmodels/stats/tests/test_dist_dependant_measures.py | timgates42/statsmodels | ab8ff09e3eb8c385214bd1575aa47b81bf53d584 | [
"BSD-3-Clause"
] | 1 | 2020-03-20T00:36:16.000Z | 2020-03-20T00:36:16.000Z | import numpy as np
from numpy.testing import assert_almost_equal
from pytest import raises as assert_raises, warns as assert_warns
import statsmodels.stats.dist_dependence_measures as ddm
from statsmodels.datasets import get_rdataset
class TestDistDependenceMeasures(object):
@classmethod
def setup_class(cls)... | 33.834171 | 77 | 0.630031 |
783b4d2ad3b24294c3e9abe21cc19418f0575aac | 560 | py | Python | BiLSTM/remove_symbols_from_dataset.py | cetinsamet/named-entity-recognition-turkish | 63cf2ccaa92fdeeb3177f5359464efd098adaa28 | [
"MIT"
] | null | null | null | BiLSTM/remove_symbols_from_dataset.py | cetinsamet/named-entity-recognition-turkish | 63cf2ccaa92fdeeb3177f5359464efd098adaa28 | [
"MIT"
] | 1 | 2019-09-09T11:50:57.000Z | 2019-09-10T15:02:46.000Z | BiLSTM/remove_symbols_from_dataset.py | cetinsamet/named-entity-recognition-turkish | 63cf2ccaa92fdeeb3177f5359464efd098adaa28 | [
"MIT"
] | null | null | null | import sys
import numpy as np
# data loading
black_list = ['"', '.', ',', '/', '\\', ':', ';', "'", '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', '(', ')', '%']
raw_txt_file = open('NER_Dataset/train_bio.txt', 'r', encoding="utf8").readlines()
file = open('NER_Dataset/train_bio_new.txt', "w", encoding="... | 26.666667 | 124 | 0.501786 |
a6229355bfff56279f1b216fd50dbe3f3476d67d | 1,945 | py | Python | doc/02_extract_and_concat.py | alleyway/gamma-ray | 8ed388b295d3bb37a1c190a406967d344d215456 | [
"0BSD"
] | null | null | null | doc/02_extract_and_concat.py | alleyway/gamma-ray | 8ed388b295d3bb37a1c190a406967d344d215456 | [
"0BSD"
] | null | null | null | doc/02_extract_and_concat.py | alleyway/gamma-ray | 8ed388b295d3bb37a1c190a406967d344d215456 | [
"0BSD"
] | 1 | 2021-04-23T15:23:58.000Z | 2021-04-23T15:23:58.000Z | #!/usr/bin/env python3
# Description:
# After downloading the raw data from BitMex, this script
# separates the data into separate files (one for each symbol) and removes the "symbol" column from the data
# By nature, it performs two sanity checks:
# 1) that the data downloaded is continuous (there isn't a missing... | 34.122807 | 117 | 0.660154 |
de5806abf443c74c662a66b7b6984c7cd0cb068e | 379 | py | Python | t_10_brief_tour_of_the_standard_library/t_10_6_mathematics/main.py | naokiur/Python-tutorial | 7b03dc8fd2e5992859fde00bfe2873b4fb7ca5e5 | [
"Apache-2.0"
] | null | null | null | t_10_brief_tour_of_the_standard_library/t_10_6_mathematics/main.py | naokiur/Python-tutorial | 7b03dc8fd2e5992859fde00bfe2873b4fb7ca5e5 | [
"Apache-2.0"
] | null | null | null | t_10_brief_tour_of_the_standard_library/t_10_6_mathematics/main.py | naokiur/Python-tutorial | 7b03dc8fd2e5992859fde00bfe2873b4fb7ca5e5 | [
"Apache-2.0"
] | null | null | null | import math
import random
import statistics
print(math.cos(math.pi / 4))
print(math.log(1024, 2))
print(random.choice(['apple', 'pear', 'banana']))
print(random.sample(range(100), 10))
print(random.random())
print(random.randrange(6))
data = [2.75, 1.75, 1.25, 0.25, 0.5, 1.25, 3.5]
print(statistics.mean(data))
print... | 22.294118 | 49 | 0.709763 |
d82c02cc5ca5f89c26dfdb53a8acd035dad962a6 | 4,353 | py | Python | ch09_WebCS/crawl.py | Nickhool/core-python | 324d6aabff5ccadb490d228c6437a203612d93e2 | [
"MIT"
] | 1 | 2019-07-25T02:36:11.000Z | 2019-07-25T02:36:11.000Z | ch09_WebCS/crawl.py | Nickhool/core-python | 324d6aabff5ccadb490d228c6437a203612d93e2 | [
"MIT"
] | null | null | null | ch09_WebCS/crawl.py | Nickhool/core-python | 324d6aabff5ccadb490d228c6437a203612d93e2 | [
"MIT"
] | null | null | null | __Author__ = "noduez"
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019/7/9 3:13 PM
# @File : crawl.py Web爬虫
# @Software: PyCharm
from io import StringIO
from formatter import AbstractFormatter, DumbWriter
import html
from html.parser import HTMLParser
import http.client
import os
import sys
import u... | 31.092857 | 70 | 0.52952 |
abee35a9f0d0c0a25133d096d1bf4b6abc050c20 | 469 | py | Python | 30. Else and If/ex30.py | vishalnarnaware/Learn-PYTHON-the-HARD-WAY | 392bae04c686c4a1076144f5dd295c7533e71163 | [
"MIT"
] | null | null | null | 30. Else and If/ex30.py | vishalnarnaware/Learn-PYTHON-the-HARD-WAY | 392bae04c686c4a1076144f5dd295c7533e71163 | [
"MIT"
] | null | null | null | 30. Else and If/ex30.py | vishalnarnaware/Learn-PYTHON-the-HARD-WAY | 392bae04c686c4a1076144f5dd295c7533e71163 | [
"MIT"
] | null | null | null | people = 30
cars = 40
buses = 15
if cars > people:
print("We should take the cars.")
elif cars < people:
print("We should not take the cars.")
else:
print("We can't decide.")
if buses > cars:
print("That's too many buses.")
elif buses < cars:
print("Maybe we could take the buses.")
else:
prin... | 19.541667 | 48 | 0.635394 |
09c0be87c9de528eb7deb99df1acbf30429209cf | 23,169 | py | Python | mavsdk/action_server_pb2_grpc.py | thomas-watters-skydio/MAVSDK-Python | e0f9db072e802a06a792a4ed6c64ce75f900167f | [
"BSD-3-Clause"
] | null | null | null | mavsdk/action_server_pb2_grpc.py | thomas-watters-skydio/MAVSDK-Python | e0f9db072e802a06a792a4ed6c64ce75f900167f | [
"BSD-3-Clause"
] | null | null | null | mavsdk/action_server_pb2_grpc.py | thomas-watters-skydio/MAVSDK-Python | e0f9db072e802a06a792a4ed6c64ce75f900167f | [
"BSD-3-Clause"
] | null | null | null | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from . import action_server_pb2 as action__server_dot_action__server__pb2
class ActionServerServiceStub(object):
"""Provide vehicle actions (as a server) s... | 39.269492 | 121 | 0.679788 |
697d16cfc3d589f67c94d0f64e6fd80f088f75cc | 474 | py | Python | example.py | bahiamartins/infobip-api-python-client | 88f044901af5690d01fcb7bce90d0ed2ab1ba4d1 | [
"Apache-2.0"
] | null | null | null | example.py | bahiamartins/infobip-api-python-client | 88f044901af5690d01fcb7bce90d0ed2ab1ba4d1 | [
"Apache-2.0"
] | null | null | null | example.py | bahiamartins/infobip-api-python-client | 88f044901af5690d01fcb7bce90d0ed2ab1ba4d1 | [
"Apache-2.0"
] | 1 | 2020-04-08T19:03:26.000Z | 2020-04-08T19:03:26.000Z | #!/usr/bin/env python
__author__ = 'nmaric'
import sys
import os
import glob
myfolder = os.path.dirname(__file__)
if sys.argv.__len__() < 2:
print 'Please choose example to run:'
files = glob.glob("examples/*.py")
for file_ in files:
if not file_.startswith("examples/__"):
print "* " ... | 22.571429 | 68 | 0.637131 |
b80084789dc63a522f73c61018224b6d573f8e4c | 2,304 | py | Python | LeetCode/Python3/DFS&BFS/339. Nested List Weight Sum.py | WatsonWangZh/CodingPractice | dc057dd6ea2fc2034e14fd73e07e73e6364be2ae | [
"MIT"
] | 11 | 2019-09-01T22:36:00.000Z | 2021-11-08T08:57:20.000Z | LeetCode/Python3/DFS&BFS/339. Nested List Weight Sum.py | WatsonWangZh/LeetCodePractice | dc057dd6ea2fc2034e14fd73e07e73e6364be2ae | [
"MIT"
] | null | null | null | LeetCode/Python3/DFS&BFS/339. Nested List Weight Sum.py | WatsonWangZh/LeetCodePractice | dc057dd6ea2fc2034e14fd73e07e73e6364be2ae | [
"MIT"
] | 2 | 2020-05-27T14:58:52.000Z | 2020-05-27T15:04:17.000Z | # Given a nested list of integers, return the sum of all integers in the list weighted by their depth.
# Each element is either an integer, or a list -- whose elements may also be integers or other lists.
# Example 1:
# Input: [[1,1],2,[1,1]]
# Output: 10
# Explanation: Four 1's at depth 2, one 2 at depth 1.
# Examp... | 31.135135 | 102 | 0.577257 |
c5ca87d0823e3dd1caa1f8bfa7aea9e4d04b7c4d | 1,504 | py | Python | nlpsc/vocabulary.py | BSlience/nlpsc | 3a62ed81cacc4b71e8d4d30225ccf99bba318858 | [
"MIT"
] | 4 | 2019-05-09T10:18:46.000Z | 2021-02-27T17:10:12.000Z | nlpsc/vocabulary.py | BSlience/nlpsc | 3a62ed81cacc4b71e8d4d30225ccf99bba318858 | [
"MIT"
] | null | null | null | nlpsc/vocabulary.py | BSlience/nlpsc | 3a62ed81cacc4b71e8d4d30225ccf99bba318858 | [
"MIT"
] | null | null | null | # encoding:utf-8
import collections
from .util.file import get_default_path
from .util.python import convert_to_unicode
class Vocabulary(object):
"""词典对象"""
def __init__(self):
# 结构{'token': id}
self.vocab = None
# 结构{'id': token}
self.inv_vocab = None
def load_vocab(se... | 25.491525 | 71 | 0.559176 |
79174bc3c8bac7682aed56972c57302e34fe105c | 238 | py | Python | one_hot_demo.py | keithyin/tensorflow-demos | e716eb1469cf8985018dc913cff91fc07fb073e9 | [
"Apache-2.0"
] | null | null | null | one_hot_demo.py | keithyin/tensorflow-demos | e716eb1469cf8985018dc913cff91fc07fb073e9 | [
"Apache-2.0"
] | null | null | null | one_hot_demo.py | keithyin/tensorflow-demos | e716eb1469cf8985018dc913cff91fc07fb073e9 | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
if __name__ == '__main__':
a = tf.constant([[1], [2], [3]], dtype=tf.int64)
one_hotted = tf.one_hot(a, depth=4)
print(one_hotted.shape)
with tf.Session() as sess:
print(sess.run(one_hotted)) | 34 | 52 | 0.634454 |
010be6a36581ec412ec06080e507ed14b004832b | 1,664 | py | Python | profiles_api/models.py | Amakson/profiles-rest-api | a02071a1eb6588c9a964066eb40fbccfd4dc4550 | [
"MIT"
] | null | null | null | profiles_api/models.py | Amakson/profiles-rest-api | a02071a1eb6588c9a964066eb40fbccfd4dc4550 | [
"MIT"
] | null | null | null | profiles_api/models.py | Amakson/profiles-rest-api | a02071a1eb6588c9a964066eb40fbccfd4dc4550 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import AbstractBaseUser
from django.contrib.auth.models import PermissionsMixin
from django.contrib.auth.models import BaseUserManager
class UserProfileManager(BaseUserManager):
"""Manager For user profiles"""
def create_user(self, email, name, pas... | 28.689655 | 68 | 0.668269 |
e116cc941769e15d470723831988ea7780b7c202 | 238 | py | Python | {{cookiecutter.project_slug}}/tests/lib/test_resources.py | thecoderstudio/cookiecutter-pyramid-api | b3122c0d98be7179bcf726c6527096c0327d7bb7 | [
"MIT"
] | null | null | null | {{cookiecutter.project_slug}}/tests/lib/test_resources.py | thecoderstudio/cookiecutter-pyramid-api | b3122c0d98be7179bcf726c6527096c0327d7bb7 | [
"MIT"
] | 1 | 2021-12-17T15:10:21.000Z | 2021-12-17T15:10:21.000Z | {{cookiecutter.project_slug}}/tests/lib/test_resources.py | thecoderstudio/cookiecutter-pyramid-api | b3122c0d98be7179bcf726c6527096c0327d7bb7 | [
"MIT"
] | 1 | 2021-03-01T14:27:10.000Z | 2021-03-01T14:27:10.000Z | from {{cookiecutter.project_slug}}.lib.resources import LocationAwareResource
def test_location_aware_resource_name():
class Sample(LocationAwareResource):
pass
sample = Sample()
assert sample.__name__ == 'Sample'
| 21.636364 | 77 | 0.743697 |
a38ca6bff4a91432a3d76b1e07d625b2429f4259 | 2,994 | py | Python | Gds/src/fprime_gds/common/loaders/ch_py_loader.py | hunterpaulson/fprime | 70560897b56dc3037dc966c99751b708b1cc8a05 | [
"Apache-2.0"
] | null | null | null | Gds/src/fprime_gds/common/loaders/ch_py_loader.py | hunterpaulson/fprime | 70560897b56dc3037dc966c99751b708b1cc8a05 | [
"Apache-2.0"
] | 5 | 2020-07-13T16:56:33.000Z | 2020-07-23T20:38:13.000Z | Gds/src/fprime_gds/common/loaders/ch_py_loader.py | hunterpaulson/lgtm-fprime | 9eeda383c263ecba8da8188a45e1d020107ff323 | [
"Apache-2.0"
] | null | null | null | """
@brief Loader class for importing python based channel dictionaries
@date Created July 11, 2018
@author R. Joseph Paetz
@bug No known bugs
"""
from __future__ import absolute_import
# Custom Python Modules
from .python_loader import PythonLoader
from fprime_gds.common.templates.ch_template import ChTemplate
cl... | 33.266667 | 100 | 0.625251 |
de4e2cbe2e0bf2f561464ccf027b2894a0d451bd | 1,331 | py | Python | lib_perspective.py | nguyenrobot/lane_detection_advanced_sliding_windows | c20076b42511294c9913c5baa041c90b1595b85b | [
"MIT"
] | 7 | 2020-11-17T17:36:26.000Z | 2021-04-03T15:30:25.000Z | lib_perspective.py | v-thiennp12/lane_detection_advanced_sliding_windows | c20076b42511294c9913c5baa041c90b1595b85b | [
"MIT"
] | 1 | 2021-10-06T02:19:41.000Z | 2022-03-16T08:03:01.000Z | lib_perspective.py | v-thiennp12/lane_detection_advanced_sliding_windows | c20076b42511294c9913c5baa041c90b1595b85b | [
"MIT"
] | 3 | 2020-11-17T17:36:28.000Z | 2021-04-03T15:30:26.000Z | # -*- coding: utf-8 -*-
"""
Created on Wed Sep 2 13:58:05 2020
@author:
Author : nguyenrobot
Copyright : nguyenrobot
https://github.com/nguyenrobot
https://www.nguyenrobot.com
"""
import cv2
import numpy
class birdseye:
def __init__(self, points):
self.source_points = points['source_points']
... | 39.147059 | 118 | 0.694966 |
81cff1c53fdc83c55b489f249b76c56287b682ec | 6,741 | py | Python | bindings/python/ensmallen_graph/datasets/string/desulfitobacteriumhafniense.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | bindings/python/ensmallen_graph/datasets/string/desulfitobacteriumhafniense.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | bindings/python/ensmallen_graph/datasets/string/desulfitobacteriumhafniense.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | """
This file offers the methods to automatically retrieve the graph Desulfitobacterium hafniense.
The graph is automatically retrieved from the STRING repository.
Report
---------------------
At the time of rendering these methods (please see datetime below), the graph
had the following characteristics:
Datetime... | 35.666667 | 223 | 0.706127 |
3d9cb5615c2106e647c4a225efa19c2b0156f924 | 9,475 | py | Python | source/tests/py_tests/constexpr_functions_errors_test.py | Panzerschrek/U-00DC-Sprache | eb677a66d178985433a62eb6b8a50ce2cdb14b1a | [
"BSD-3-Clause"
] | 45 | 2016-06-21T22:28:43.000Z | 2022-03-26T12:21:46.000Z | source/tests/py_tests/constexpr_functions_errors_test.py | Panzerschrek/U-00DC-Sprache | eb677a66d178985433a62eb6b8a50ce2cdb14b1a | [
"BSD-3-Clause"
] | 6 | 2020-07-12T18:00:10.000Z | 2021-11-30T11:20:14.000Z | source/tests/py_tests/constexpr_functions_errors_test.py | Panzerschrek/U-00DC-Sprache | eb677a66d178985433a62eb6b8a50ce2cdb14b1a | [
"BSD-3-Clause"
] | 5 | 2019-09-03T17:20:34.000Z | 2022-01-30T15:10:21.000Z | from py_tests_common import *
def ConstexprHalt_Test0():
c_program_text= """
fn constexpr Foo( i32 x ) : i32
{
halt if( (x&1) == 0 );
return x | 0xFF;
}
fn Baz(){ Foo( 84 ); }
"""
errors_list= ConvertErrors( tests_lib.build_program_with_errors( c_program_text ) )
assert( len(errors_list) > 0 )
a... | 31.374172 | 107 | 0.726332 |
894fc9d0623fe21647f9686d18093bd98a7f387d | 650 | py | Python | src/B2/__main__.py | Sidesplitter/Informatica-Olympiade-2016-2017 | 83704415c6c2febdcbb71116f86619950c8c1e6c | [
"MIT"
] | null | null | null | src/B2/__main__.py | Sidesplitter/Informatica-Olympiade-2016-2017 | 83704415c6c2febdcbb71116f86619950c8c1e6c | [
"MIT"
] | null | null | null | src/B2/__main__.py | Sidesplitter/Informatica-Olympiade-2016-2017 | 83704415c6c2febdcbb71116f86619950c8c1e6c | [
"MIT"
] | null | null | null | from B2.pathfinder import PathFinder
from B2.world import World
def main():
world = World('world.yml')
path_finder = PathFinder((0, 0), (world.height - 1, world.width - 1), world)
path = path_finder.get_path()
total = sum(map(lambda coordinates: world.get_value(coordinates), path))
readable_coord... | 32.5 | 96 | 0.675385 |
9bae6be35815f160677cfff480da8fcc83bde5b4 | 6,827 | py | Python | nlp/nlp_utils.py | vghost2008/wml | d0c5a1da6c228e321ae59a563e9ac84aa66266ff | [
"MIT"
] | 6 | 2019-12-10T17:18:56.000Z | 2022-03-01T01:00:35.000Z | nlp/nlp_utils.py | vghost2008/wml | d0c5a1da6c228e321ae59a563e9ac84aa66266ff | [
"MIT"
] | 2 | 2021-08-25T16:16:01.000Z | 2022-02-10T05:21:19.000Z | nlp/nlp_utils.py | vghost2008/wml | d0c5a1da6c228e321ae59a563e9ac84aa66266ff | [
"MIT"
] | 2 | 2019-12-07T09:57:35.000Z | 2021-09-06T04:58:10.000Z | #coding=utf-8
import numpy as np
import codecs
import os
import sys
import time
from functools import reduce
'''
load dict data which generated by trans_fastText
'''
def load_fastText_dict(dict_path):
dict = np.load(dict_path)
return dict
'''
load word embedding data which generated by trans_fastText
'''
def ... | 27.865306 | 117 | 0.587081 |
5768a22515f654bcf16433a173633dddd0610f13 | 2,602 | py | Python | ymir/schema/validators.py | mattvonrocketstein/ymir | a16117ec64c60ec52b0daa3b19eb711ec42b5070 | [
"MIT"
] | 3 | 2015-10-14T04:07:28.000Z | 2017-09-09T11:12:51.000Z | ymir/schema/validators.py | mattvonrocketstein/ymir | a16117ec64c60ec52b0daa3b19eb711ec42b5070 | [
"MIT"
] | 36 | 2015-05-07T11:46:32.000Z | 2021-09-23T23:20:56.000Z | ymir/schema/validators.py | mattvonrocketstein/ymir | a16117ec64c60ec52b0daa3b19eb711ec42b5070 | [
"MIT"
] | 3 | 2016-01-05T17:04:07.000Z | 2016-03-14T09:08:22.000Z | # -*- coding: utf-8 -*-
""" ymir.schema.validators
"""
import os
from voluptuous import Invalid
def nested_vagrant_validator(dct, ):
""" """
if not isinstance(dct, dict):
err = ("expected hash for key @ `vagrant`")
raise Invalid(err)
for key in 'name boot_timeout box box_check_update sync_... | 33.792208 | 87 | 0.600307 |
c9212adc3550b1e240197cf393685d408a9d0224 | 152 | py | Python | init5/src/articles/apps.py | iYoQ/init5 | be67fc501376f17f2f6a258c5f8c2002defbc415 | [
"Apache-2.0"
] | null | null | null | init5/src/articles/apps.py | iYoQ/init5 | be67fc501376f17f2f6a258c5f8c2002defbc415 | [
"Apache-2.0"
] | null | null | null | init5/src/articles/apps.py | iYoQ/init5 | be67fc501376f17f2f6a258c5f8c2002defbc415 | [
"Apache-2.0"
] | null | null | null | from django.apps import AppConfig
class ArticlesConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'src.articles'
| 21.714286 | 56 | 0.763158 |
d37a14e6962e168bd5d9c25097209ace0dc1d696 | 1,300 | py | Python | ESN/EchoTorch-master/echotorch/models/HNilsNet.py | RogerFu18/drunken-monkey | 2f8498a83105481d0d189b20407f6e3f658b1053 | [
"MIT"
] | null | null | null | ESN/EchoTorch-master/echotorch/models/HNilsNet.py | RogerFu18/drunken-monkey | 2f8498a83105481d0d189b20407f6e3f658b1053 | [
"MIT"
] | null | null | null | ESN/EchoTorch-master/echotorch/models/HNilsNet.py | RogerFu18/drunken-monkey | 2f8498a83105481d0d189b20407f6e3f658b1053 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# File : echotorch/models/NilsNet.py
# Description : A Hierarchical NilsNet module.
# Date : 09th of April, 2018
#
# This file is part of EchoTorch. EchoTorch is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the F... | 25.490196 | 79 | 0.682308 |
e8ecce912f9cdde55c7d7b1c35ac1d809ba8ee2d | 16,681 | py | Python | catalogue/application.py | Aqueum/UFS-ItemCatalogue | 75f1f0413343b8c23f8088378f4f13342456dbdf | [
"BSD-Source-Code"
] | null | null | null | catalogue/application.py | Aqueum/UFS-ItemCatalogue | 75f1f0413343b8c23f8088378f4f13342456dbdf | [
"BSD-Source-Code"
] | null | null | null | catalogue/application.py | Aqueum/UFS-ItemCatalogue | 75f1f0413343b8c23f8088378f4f13342456dbdf | [
"BSD-Source-Code"
] | null | null | null | from flask import (Flask,
render_template,
request,
flash,
redirect,
url_for,
jsonify,
make_response)
from flask import session as login_session
from sqlalchemy import (create_engine,
... | 38.88345 | 79 | 0.607218 |
c432a3a020fed576c35cc37a97b5f25ccb9fd1f2 | 13,977 | py | Python | tfx/dsl/component/experimental/decorators.py | epona-science/tfx | 2081eee1e94d97de399514e02079a233309d648d | [
"Apache-2.0"
] | null | null | null | tfx/dsl/component/experimental/decorators.py | epona-science/tfx | 2081eee1e94d97de399514e02079a233309d648d | [
"Apache-2.0"
] | null | null | null | tfx/dsl/component/experimental/decorators.py | epona-science/tfx | 2081eee1e94d97de399514e02079a233309d648d | [
"Apache-2.0"
] | null | null | null | # Lint as: python2, python3
# Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | 42.874233 | 81 | 0.694856 |
c397c8d6cbfdcce3ea9ddb40215c3f5c4e3a8afe | 11,277 | py | Python | autotest/ogr/ogr_vfk.py | joa-quim/gdal | 4864590da00e0ff439159e378bdfeb25b4be48d4 | [
"MIT"
] | null | null | null | autotest/ogr/ogr_vfk.py | joa-quim/gdal | 4864590da00e0ff439159e378bdfeb25b4be48d4 | [
"MIT"
] | null | null | null | autotest/ogr/ogr_vfk.py | joa-quim/gdal | 4864590da00e0ff439159e378bdfeb25b4be48d4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test OGR VFK driver functionality.
# Author: Martin Landa <landa.martin gmail.com>
#
######################################################... | 28.477273 | 100 | 0.593952 |
1caebd2893bd48e2199e840ba4e384679d162c3f | 23,539 | py | Python | intake/catalog/tests/test_local.py | raybellwaves/intake | 8acc70d9adb19344ca15dee948315828b61e87b2 | [
"BSD-2-Clause"
] | 3 | 2020-04-14T17:47:53.000Z | 2021-07-09T05:35:12.000Z | intake/catalog/tests/test_local.py | raybellwaves/intake | 8acc70d9adb19344ca15dee948315828b61e87b2 | [
"BSD-2-Clause"
] | 2 | 2019-05-15T20:42:24.000Z | 2019-07-25T00:35:24.000Z | intake/catalog/tests/test_local.py | raybellwaves/intake | 8acc70d9adb19344ca15dee948315828b61e87b2 | [
"BSD-2-Clause"
] | 1 | 2019-07-24T22:26:58.000Z | 2019-07-24T22:26:58.000Z | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2018, Anaconda, Inc. and Intake contributors
# All rights reserved.
#
# The full license is in the LICENSE file, distributed with this software.
#------------------------------------------------------------------------... | 30.6897 | 102 | 0.633587 |
457fbbb50ba5d857145b62a7880ae4125a5ec4e2 | 267 | py | Python | tests/artificial/transf_Anscombe/trend_PolyTrend/cycle_30/ar_12/test_artificial_1024_Anscombe_PolyTrend_30_12_100.py | shaido987/pyaf | b9afd089557bed6b90b246d3712c481ae26a1957 | [
"BSD-3-Clause"
] | 377 | 2016-10-13T20:52:44.000Z | 2022-03-29T18:04:14.000Z | tests/artificial/transf_Anscombe/trend_PolyTrend/cycle_30/ar_12/test_artificial_1024_Anscombe_PolyTrend_30_12_100.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 160 | 2016-10-13T16:11:53.000Z | 2022-03-28T04:21:34.000Z | tests/artificial/transf_Anscombe/trend_PolyTrend/cycle_30/ar_12/test_artificial_1024_Anscombe_PolyTrend_30_12_100.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 63 | 2017-03-09T14:51:18.000Z | 2022-03-27T20:52:57.000Z | import pyaf.Bench.TS_datasets as tsds
import tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "PolyTrend", cycle_length = 30, transform = "Anscombe", sigma = 0.0, exog_count = 100, ar_order = 12); | 38.142857 | 167 | 0.734082 |
78a5139ebe32861f3af06324d1f043b355891a1a | 271 | py | Python | projects/simple-email/app.py | iam-jjintta/python-tutorial | 7465c4ff9cf0a766fd016ccf0fdb48fd01d2677a | [
"Apache-2.0"
] | null | null | null | projects/simple-email/app.py | iam-jjintta/python-tutorial | 7465c4ff9cf0a766fd016ccf0fdb48fd01d2677a | [
"Apache-2.0"
] | null | null | null | projects/simple-email/app.py | iam-jjintta/python-tutorial | 7465c4ff9cf0a766fd016ccf0fdb48fd01d2677a | [
"Apache-2.0"
] | null | null | null |
import sys
import tkinter as tk
from pyemail.mailbox import MailBox
title = '흔한 찐따의 이메일 프로그램'
icon = 'icon.ico'
if __name__ == '__main__':
root = tk.Tk()
mailbox = MailBox(root, title=title, icon=icon)
mailbox.mainloop()
sys.exit(0)
| 15.941176 | 52 | 0.627306 |
1fc236735a63bb0e01e610bcbd792bd50b8479e4 | 7,902 | py | Python | server_pool.py | xiaobailong24-shadowsocks/SSR-manyuser | 0b94af0b7d721cb14d1c1a16a2e8a54e559fb616 | [
"Apache-2.0"
] | 6 | 2018-01-06T12:10:30.000Z | 2020-09-01T16:53:42.000Z | server_pool.py | xiaobailong24-shadowsocks/SSR-manyuser | 0b94af0b7d721cb14d1c1a16a2e8a54e559fb616 | [
"Apache-2.0"
] | null | null | null | server_pool.py | xiaobailong24-shadowsocks/SSR-manyuser | 0b94af0b7d721cb14d1c1a16a2e8a54e559fb616 | [
"Apache-2.0"
] | 6 | 2017-10-18T09:30:19.000Z | 2021-08-04T01:19:28.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2014 clowwindy
#
# 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
#... | 32.518519 | 122 | 0.717287 |
56606bfa1b54b7724552476858d006d3a983eff8 | 4,083 | py | Python | test/testscenarios.py | VITObelgium/geodynamix | 6d3323bc4cae1b85e26afdceab2ecf3686b11369 | [
"MIT"
] | null | null | null | test/testscenarios.py | VITObelgium/geodynamix | 6d3323bc4cae1b85e26afdceab2ecf3686b11369 | [
"MIT"
] | null | null | null | test/testscenarios.py | VITObelgium/geodynamix | 6d3323bc4cae1b85e26afdceab2ecf3686b11369 | [
"MIT"
] | 1 | 2021-06-16T11:55:27.000Z | 2021-06-16T11:55:27.000Z | import os
import unittest
import geodynamix as gdx
import numpy as np
class GdxIntegrationTest(unittest.TestCase):
script_dir = os.path.dirname(os.path.abspath(__file__))
data_dir = os.path.join(script_dir, 'mapdata')
reference_dir = os.path.join(script_dir, 'referencedata')
def tab(self, tab_file):
... | 52.346154 | 181 | 0.722753 |
6bbc49b6ca82dd6db1bf501f2e0252fbcddf49a3 | 2,166 | py | Python | 02. Chapter_2/julia1_lineprofiler3.py | Mikma03/High-performance-Python | b7720377bc967e856e16678ae91b37c2503b49e0 | [
"MIT"
] | null | null | null | 02. Chapter_2/julia1_lineprofiler3.py | Mikma03/High-performance-Python | b7720377bc967e856e16678ae91b37c2503b49e0 | [
"MIT"
] | null | null | null | 02. Chapter_2/julia1_lineprofiler3.py | Mikma03/High-performance-Python | b7720377bc967e856e16678ae91b37c2503b49e0 | [
"MIT"
] | null | null | null | """Julia set generator without optional PIL-based image drawing"""
import time
# area of complex space to investigate
x1, x2, y1, y2 = -1.8, 1.8, -1.8, 1.8
c_real, c_imag = -0.62772, -.42193
@profile
def calculate_z_serial_purepython(maxiter, zs, cs):
"""Calculate output list using Julia update rule"""
outpu... | 31.391304 | 109 | 0.645429 |
41492cda1d59787189845f7c6236bbb2909f22fd | 42 | py | Python | sabersql/__init__.py | dhuber34/sabersql | 27a4824d56dda9b7a8cd9b418fc06b3cc5dee935 | [
"MIT"
] | 1 | 2022-01-19T23:21:43.000Z | 2022-01-19T23:21:43.000Z | sabersql/__init__.py | dhuber34/sabersql | 27a4824d56dda9b7a8cd9b418fc06b3cc5dee935 | [
"MIT"
] | 2 | 2020-12-08T00:37:23.000Z | 2022-01-19T21:34:54.000Z | sabersql/__init__.py | dhuber34/sabersql | 27a4824d56dda9b7a8cd9b418fc06b3cc5dee935 | [
"MIT"
] | 1 | 2021-09-05T14:56:02.000Z | 2021-09-05T14:56:02.000Z | #!/usr/bin/env python3
name = "sabersql"
| 10.5 | 22 | 0.666667 |
9ad24b1b8198ac53d5567c1e1f83b3dfa9f4a09f | 4,153 | py | Python | my_account/custom_dns_api.py | bobzz-zone/saas_my_account | 0349bf14714bd070ec003dd96b3f60878af1b9b1 | [
"MIT"
] | null | null | null | my_account/custom_dns_api.py | bobzz-zone/saas_my_account | 0349bf14714bd070ec003dd96b3f60878af1b9b1 | [
"MIT"
] | null | null | null | my_account/custom_dns_api.py | bobzz-zone/saas_my_account | 0349bf14714bd070ec003dd96b3f60878af1b9b1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Myme and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
import os
import requests
import json
import subprocess
from frappe.utils.background_jobs import enqueue... | 43.715789 | 395 | 0.756321 |
554876438bf9923db06aa4c745b53c05d81df286 | 14,555 | py | Python | src/huntsman/drp/collection/collection.py | AstroHuntsman/huntsman-drp | 00f045ccccc1f7545da491457a2b17b9aabea89a | [
"MIT"
] | 1 | 2022-01-03T05:24:33.000Z | 2022-01-03T05:24:33.000Z | src/huntsman/drp/collection/collection.py | fergusL/huntsman-drp | 7f370079e347e4ef5500678808ea9a7952c04e7e | [
"MIT"
] | 139 | 2020-10-02T01:49:29.000Z | 2021-09-07T04:58:51.000Z | src/huntsman/drp/collection/collection.py | fergusL/huntsman-drp | 7f370079e347e4ef5500678808ea9a7952c04e7e | [
"MIT"
] | 3 | 2020-09-03T03:31:30.000Z | 2020-09-07T05:22:23.000Z | from contextlib import suppress
from datetime import timedelta
from urllib.parse import quote_plus
import pymongo
from pymongo.errors import ServerSelectionTimeoutError
from huntsman.drp.base import HuntsmanBase
from huntsman.drp.utils.date import current_date, make_mongo_date_constraint
from huntsman.drp.document im... | 42.066474 | 100 | 0.62652 |
eea9c00ed019d5e2eb93b46aea9540dd9417759a | 2,634 | py | Python | bin/Python27/Lib/site-packages/numpy/fft/tests/test_helper.py | lefevre-fraser/openmeta-mms | 08f3115e76498df1f8d70641d71f5c52cab4ce5f | [
"MIT"
] | null | null | null | bin/Python27/Lib/site-packages/numpy/fft/tests/test_helper.py | lefevre-fraser/openmeta-mms | 08f3115e76498df1f8d70641d71f5c52cab4ce5f | [
"MIT"
] | null | null | null | bin/Python27/Lib/site-packages/numpy/fft/tests/test_helper.py | lefevre-fraser/openmeta-mms | 08f3115e76498df1f8d70641d71f5c52cab4ce5f | [
"MIT"
] | 1 | 2020-08-08T12:44:48.000Z | 2020-08-08T12:44:48.000Z | #!/usr/bin/env python
"""Test functions for fftpack.helper module
Copied from fftpack.helper by Pearu Peterson, October 2005
"""
from __future__ import division, absolute_import, print_function
import numpy as np
from numpy.testing import TestCase, run_module_suite, assert_array_almost_equal
from numpy imp... | 33.341772 | 80 | 0.58656 |
6093f0fba93055c5a308b5bd55568d008d793252 | 21,557 | py | Python | test.py | lvca/graph-databases-testsuite | 217cd37d1037bbbfd53b89aab0391b1abcca1590 | [
"MIT"
] | 29 | 2017-06-21T10:15:10.000Z | 2022-01-17T00:15:18.000Z | test.py | lvca/graph-databases-testsuite | 217cd37d1037bbbfd53b89aab0391b1abcca1590 | [
"MIT"
] | 34 | 2018-07-05T11:54:08.000Z | 2022-02-11T16:26:35.000Z | test.py | lvca/graph-databases-testsuite | 217cd37d1037bbbfd53b89aab0391b1abcca1590 | [
"MIT"
] | 9 | 2019-03-17T10:49:35.000Z | 2022-01-17T00:15:22.000Z | #!/usr/bin/env python
"""
Assumptions:
- The entry script (CMD) of every docker-image will eventually execute
`/runtime/{tp2,tp3}/execute.sh`, after database bootstrap operation
have been completed.
- `runtime` directory structure
Provided guarantees:
- Query are executed in alphabetic... | 34.657556 | 102 | 0.543443 |
2e809ff144681afcb0869bb6b43e4298dfaab6f5 | 6,783 | py | Python | accelbyte_py_sdk/api/platform/operations/item/get_item_dynamic_data.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | null | null | null | accelbyte_py_sdk/api/platform/operations/item/get_item_dynamic_data.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | 1 | 2021-10-13T03:46:58.000Z | 2021-10-13T03:46:58.000Z | accelbyte_py_sdk/api/platform/operations/item/get_item_dynamic_data.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | null | null | null | # Copyright (c) 2021 AccelByte Inc. All Rights Reserved.
# This is licensed software from AccelByte Inc, for limitations
# and restrictions contact your company contract manager.
#
# Code generated. DO NOT EDIT!
# template file: justice_py_sdk_codegen/__main__.py
# pylint: disable=duplicate-code
# pylint: disable=li... | 28.620253 | 156 | 0.628336 |
9a56a11d0acfbff4358e71d090602b33ae043bad | 4,570 | py | Python | circus/tests/test_client.py | asteven/circus | 278ff49c1f941177465056350512282b233e8ccf | [
"Apache-2.0"
] | null | null | null | circus/tests/test_client.py | asteven/circus | 278ff49c1f941177465056350512282b233e8ccf | [
"Apache-2.0"
] | null | null | null | circus/tests/test_client.py | asteven/circus | 278ff49c1f941177465056350512282b233e8ccf | [
"Apache-2.0"
] | 2 | 2019-01-15T10:38:19.000Z | 2020-09-14T14:07:50.000Z | import os
import tempfile
from tornado.testing import gen_test
from tornado.gen import coroutine, Return
from circus.util import tornado_sleep
from circus.tests.support import TestCircus, EasyTestSuite, IS_WINDOWS
from circus.client import make_message
from circus.stream import QueueStream
class TestClient(TestCirc... | 35.703125 | 78 | 0.607659 |
2f36a6b6131790d94581ad07517b53019722b5d5 | 2,074 | py | Python | solum/tests/common/test_context.py | ed-/solum | 2d23edb7fb53e1bdeff510710824658575d166c4 | [
"Apache-2.0"
] | null | null | null | solum/tests/common/test_context.py | ed-/solum | 2d23edb7fb53e1bdeff510710824658575d166c4 | [
"Apache-2.0"
] | null | null | null | solum/tests/common/test_context.py | ed-/solum | 2d23edb7fb53e1bdeff510710824658575d166c4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 - Mirantis Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | 47.136364 | 75 | 0.645612 |
d0ea331599fc20800335cf9ade1533bb340e700e | 2,257 | py | Python | app/data_info.py | chuusan/DSCI_532_Group114_SKEC | 1ee8f15497ad96eb9faa523db18e3d219ed7aabb | [
"MIT"
] | null | null | null | app/data_info.py | chuusan/DSCI_532_Group114_SKEC | 1ee8f15497ad96eb9faa523db18e3d219ed7aabb | [
"MIT"
] | null | null | null | app/data_info.py | chuusan/DSCI_532_Group114_SKEC | 1ee8f15497ad96eb9faa523db18e3d219ed7aabb | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import altair as alt
import os as os
# need to pip install pyproj
from pyproj import Proj
# Creating Path to read data from the repo
x = os.getcwd()
x = x[:len(x)-3]
path=x + "/Data/crimedata_csv_all_years.csv"
# Reading Vancouver City Population from 2001 to 2018
path_pop=x + "... | 40.303571 | 145 | 0.699158 |
a4a871c163f304ac2d19e7a0ca9cdeb7996ae268 | 641 | py | Python | AlgoBox/Users/forms.py | AbhiY98/AlgoBox | 86de7a7e7081c0f0c5df39f5530fa67140417d62 | [
"Apache-2.0"
] | null | null | null | AlgoBox/Users/forms.py | AbhiY98/AlgoBox | 86de7a7e7081c0f0c5df39f5530fa67140417d62 | [
"Apache-2.0"
] | null | null | null | AlgoBox/Users/forms.py | AbhiY98/AlgoBox | 86de7a7e7081c0f0c5df39f5530fa67140417d62 | [
"Apache-2.0"
] | null | null | null | from django import forms
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
from django.db.models import CharField
class SignUpForm(UserCreationForm):
bio = forms.CharField(max_length = 500, help_text = 'Something that describes you in brief?')
cc_handle = forms.... | 42.733333 | 115 | 0.733229 |
47d3b03f8385465596780cedad5e3fcdeb33c2e0 | 1,572 | py | Python | data/showtimes.py | rjkerrison/allocine-python | 35167d9b7b6e2e05285907ce3bdefc094ca14f0c | [
"MIT"
] | null | null | null | data/showtimes.py | rjkerrison/allocine-python | 35167d9b7b6e2e05285907ce3bdefc094ca14f0c | [
"MIT"
] | null | null | null | data/showtimes.py | rjkerrison/allocine-python | 35167d9b7b6e2e05285907ce3bdefc094ca14f0c | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from datetime import date
from typing import List
from helpers.schedules import Schedule, build_weekly_schedule_str
from .movies import MovieVersion
@dataclass
class Showtime(Schedule):
movie: MovieVersion
def __str__(self):
return f"{self.date_str} : {self.movie}"
... | 31.44 | 78 | 0.732188 |
ce6617b04d462a5830c3c745815e67befe4bf032 | 6,400 | py | Python | frappe/defaults.py | erpnext-tm/frappe | 7b470f28e1cf00b0659c01e06a2d0a4693b28d98 | [
"MIT"
] | null | null | null | frappe/defaults.py | erpnext-tm/frappe | 7b470f28e1cf00b0659c01e06a2d0a4693b28d98 | [
"MIT"
] | null | null | null | frappe/defaults.py | erpnext-tm/frappe | 7b470f28e1cf00b0659c01e06a2d0a4693b28d98 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.cache_manager import clear_defaults_cache, common_default_keys
from frappe.desk.notifications import clear_notifications
# Note: DefaultValue records a... | 24.150943 | 123 | 0.719688 |
5ae6ed402ce2ef07ef1eae69c0cb485c92f4d098 | 5,106 | py | Python | samples/oci-load-file-into-adw-python/func.py | ojasvajain/oracle-functions-samples | 268fe177e50349fa4d826be6370493b3d678506d | [
"Apache-2.0"
] | 1 | 2022-01-18T05:45:13.000Z | 2022-01-18T05:45:13.000Z | samples/oci-load-file-into-adw-python/func.py | ojasvajain/oracle-functions-samples | 268fe177e50349fa4d826be6370493b3d678506d | [
"Apache-2.0"
] | null | null | null | samples/oci-load-file-into-adw-python/func.py | ojasvajain/oracle-functions-samples | 268fe177e50349fa4d826be6370493b3d678506d | [
"Apache-2.0"
] | null | null | null | #
# oci-load-file-into-adw-python version 1.0.
#
# Copyright (c) 2020 Oracle, Inc.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
#
import io
import json
import oci
import csv
import requests
from fdk import response
def soda_insert(ordsbaseurl, schema, dbus... | 44.4 | 119 | 0.660595 |
c5ce122d17b6579b81290b29923a957c689b36c7 | 5,399 | py | Python | attic/tests/post-deployment/resources/test_support/controls_low.py | ska-telescope/skampi | cd2f95bd56594888c8d0c3476824b438dfcfcf71 | [
"BSD-3-Clause"
] | null | null | null | attic/tests/post-deployment/resources/test_support/controls_low.py | ska-telescope/skampi | cd2f95bd56594888c8d0c3476824b438dfcfcf71 | [
"BSD-3-Clause"
] | 3 | 2019-10-25T13:38:56.000Z | 2022-03-30T09:13:33.000Z | attic/tests/post-deployment/resources/test_support/controls_low.py | ska-telescope/skampi | cd2f95bd56594888c8d0c3476824b438dfcfcf71 | [
"BSD-3-Clause"
] | 2 | 2019-11-04T09:59:06.000Z | 2020-05-07T11:05:42.000Z | import pytest
from datetime import date,datetime
import os
import logging
from tango import DeviceProxy
from ska.scripting.domain import Telescope, SubArray
##SUT imports
from ska.scripting.domain import Telescope
from resources.test_support.helpers_low import subarray_devices,resource,ResourceGroup,waiter,watch
fr... | 38.29078 | 128 | 0.704575 |
e0a7e488ad0bc4668fa2480347756f64b3082414 | 4,838 | py | Python | scripts/fighting.py | itsabugnotafeature/Raiders | 72c20a83c253538a3a41658a78cbc0fe5eca346b | [
"MIT"
] | 1 | 2022-03-27T05:36:44.000Z | 2022-03-27T05:36:44.000Z | scripts/fighting.py | itsabugnotafeature/Raiders | 72c20a83c253538a3a41658a78cbc0fe5eca346b | [
"MIT"
] | null | null | null | scripts/fighting.py | itsabugnotafeature/Raiders | 72c20a83c253538a3a41658a78cbc0fe5eca346b | [
"MIT"
] | null | null | null | from scripts.variables.localvars import *
class FightManager:
def __init__(self, system):
self.attacker = None
self.defender = None
self.player = None
self.monster = None
self.GameLogic = system
self.Engine = self.GameLogic.Engine
self.turn_counter = 1
... | 39.655738 | 127 | 0.637247 |
4209d5f15abae8052e16f12612044d4a0d62e938 | 5,366 | py | Python | model/attention/HaloAttention.py | lyp2333/External-Attention-pytorch | 08be6baff82bf22d48b1746fd668446280365b9b | [
"MIT"
] | 1 | 2022-03-15T11:25:34.000Z | 2022-03-15T11:25:34.000Z | model/attention/HaloAttention.py | lyp2333/External-Attention-pytorch | 08be6baff82bf22d48b1746fd668446280365b9b | [
"MIT"
] | null | null | null | model/attention/HaloAttention.py | lyp2333/External-Attention-pytorch | 08be6baff82bf22d48b1746fd668446280365b9b | [
"MIT"
] | null | null | null | import torch
from torch import nn, einsum
import torch.nn.functional as F
from einops import rearrange, repeat
# relative positional embedding
def to(x):
return {'device': x.device, 'dtype': x.dtype}
def pair(x):
return (x, x) if not isinstance(x, tuple) else x
def expand_dim(t, dim, k):
... | 30.83908 | 138 | 0.544353 |
936e4b0accf0d2b889f4ba8d69763f717a5a56e5 | 1,949 | py | Python | package/spack-diamond/package.py | ctuning/ck-spack | 307934efce1be2d4f104251275c82fbc70127105 | [
"BSD-3-Clause"
] | 1 | 2018-07-17T07:45:09.000Z | 2018-07-17T07:45:09.000Z | package/spack-diamond/package.py | ctuning/ck-spack | 307934efce1be2d4f104251275c82fbc70127105 | [
"BSD-3-Clause"
] | null | null | null | package/spack-diamond/package.py | ctuning/ck-spack | 307934efce1be2d4f104251275c82fbc70127105 | [
"BSD-3-Clause"
] | null | null | null | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | 45.325581 | 78 | 0.691637 |
8d07be0b5f3a87621f9a283dad7204d5d5e8b50e | 566 | py | Python | src/browserist/browser/mouse/hover.py | jakob-bagterp/browserist | 76bd916dd217b7da3759fd6ec3374191002dc091 | [
"Apache-2.0"
] | 2 | 2022-02-20T10:03:19.000Z | 2022-03-22T11:17:10.000Z | src/browserist/browser/mouse/hover.py | jakob-bagterp/browserist | 76bd916dd217b7da3759fd6ec3374191002dc091 | [
"Apache-2.0"
] | null | null | null | src/browserist/browser/mouse/hover.py | jakob-bagterp/browserist | 76bd916dd217b7da3759fd6ec3374191002dc091 | [
"Apache-2.0"
] | null | null | null | from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.by import By
from ...constant import timeout
from ...model.type.xpath import XPath
from ..wait.for_element import wait_for_element
def mouse_hover(driver: object, xpath: str, timeout: int = timeout.DEFAULT) -> None:
x... | 37.733333 | 84 | 0.757951 |
67245e20cb1ed74e4ad166a1bb00ad9591296fd3 | 3,042 | py | Python | python13 (writing files with python).py | Ahammmad-Shawki8/AS8-repository | fb0d1663c888c0bec0b1013b49778861117b6398 | [
"MIT"
] | 11 | 2020-09-08T12:18:50.000Z | 2021-11-08T11:22:44.000Z | python13 (writing files with python).py | Ahammmad-Shawki8/AS8-repository | fb0d1663c888c0bec0b1013b49778861117b6398 | [
"MIT"
] | 5 | 2021-03-02T13:18:38.000Z | 2021-04-24T03:30:01.000Z | python13 (writing files with python).py | Ahammmad-Shawki8/AS8-repository | fb0d1663c888c0bec0b1013b49778861117b6398 | [
"MIT"
] | 4 | 2020-08-17T12:23:12.000Z | 2021-03-08T17:52:33.000Z | # working with files
# how do we write a file with code?
#1.use the open function to create and open a file.
# myFile= open(fileName,accessMode)
#2.we must specify
#-file name
#-access mode
# what is the file name?
#= the file name is the name of our file including the extension
#-data.txt, mytimes.csv
# the file ... | 32.361702 | 102 | 0.70217 |
42d0cb99fe3cce0b8dd6aab785b15feda71f83f4 | 1,568 | py | Python | pipeline_plugins/components/collections/sites/open/cc/transfer_host_resource/legacy.py | wkma/bk-sops | 8fb5609c0c4495c28d588fbafa9d9f5f2976929b | [
"Apache-2.0"
] | 881 | 2019-03-25T02:45:42.000Z | 2022-03-30T09:10:49.000Z | pipeline_plugins/components/collections/sites/open/cc/transfer_host_resource/legacy.py | wkma/bk-sops | 8fb5609c0c4495c28d588fbafa9d9f5f2976929b | [
"Apache-2.0"
] | 3,303 | 2019-03-25T04:18:03.000Z | 2022-03-31T11:52:03.000Z | pipeline_plugins/components/collections/sites/open/cc/transfer_host_resource/legacy.py | wkma/bk-sops | 8fb5609c0c4495c28d588fbafa9d9f5f2976929b | [
"Apache-2.0"
] | 395 | 2019-03-25T02:53:36.000Z | 2022-03-31T08:37:28.000Z | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | 43.555556 | 115 | 0.806122 |
410d3de51cfbb6bb4c055c98d1f682f94157bea2 | 9,111 | py | Python | via_cms/model/static/geoloc_dao.py | jeanjacquesp/via-cms | 12b212f8005e3d667c23ffc4da831e4d3e653999 | [
"MIT"
] | null | null | null | via_cms/model/static/geoloc_dao.py | jeanjacquesp/via-cms | 12b212f8005e3d667c23ffc4da831e4d3e653999 | [
"MIT"
] | null | null | null | via_cms/model/static/geoloc_dao.py | jeanjacquesp/via-cms | 12b212f8005e3d667c23ffc4da831e4d3e653999 | [
"MIT"
] | null | null | null | # Copyright 2020 Pax Syriana Foundation. Licensed under the Apache License, Version 2.0
#
from collections import namedtuple
from via_cms.extension import db
from via_cms.model._database import Model
from via_cms.util.helper import Separator
CATEGORY_COUNTRY = 0
CATEGORY_PROVINCE = 1
CATEGORY_DISTRICT = 2
CATEGOR... | 37.804979 | 127 | 0.564922 |
0ee77a53e2d398f1b2e6dfd8a0596ae20c928fd5 | 2,578 | py | Python | examples/broadcast_exec/server.py | TrigonDev/hikari-clusters | d94cce2ee880c35109f3663e904a64c5e4c0ae2a | [
"MIT"
] | 4 | 2022-01-16T20:02:12.000Z | 2022-03-23T01:36:11.000Z | examples/broadcast_exec/server.py | TrigonDev/hikari-clusters | d94cce2ee880c35109f3663e904a64c5e4c0ae2a | [
"MIT"
] | 15 | 2021-12-15T17:50:54.000Z | 2022-03-25T06:24:09.000Z | examples/broadcast_exec/server.py | TrigonDev/hikari-clusters | d94cce2ee880c35109f3663e904a64c5e4c0ae2a | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2021 TrigonDev
#
# 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, modify, merge, pu... | 34.373333 | 79 | 0.703646 |
f602b82d5a48a1efb63d72451cebd81ded20d845 | 4,915 | py | Python | docs/conf.py | rankoliang/investment_tracker | 5345409fdddc6a39da0d812eb035b2408e6ca959 | [
"MIT"
] | null | null | null | docs/conf.py | rankoliang/investment_tracker | 5345409fdddc6a39da0d812eb035b2408e6ca959 | [
"MIT"
] | 29 | 2020-02-12T22:08:05.000Z | 2022-03-21T14:28:09.000Z | docs/conf.py | rankoliang/investment_tracker | 5345409fdddc6a39da0d812eb035b2408e6ca959 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# investment_tracker documentation build configuration file, created by
# sphinx-quickstart on Fri Jun 9 13:47:02 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated fi... | 30.71875 | 77 | 0.693184 |
cca45396a936ac4b7c4f6f8fea644be08dffe62f | 2,728 | py | Python | Source/Tools/TrainList_Kitti_2015.py | NPU-IAP/NLCA-Net | a5e03dd8370a8fa41552155aabaf8fb531b0ac22 | [
"MIT"
] | 9 | 2020-07-31T10:00:48.000Z | 2022-03-23T06:14:14.000Z | Source/Tools/TrainList_Kitti_2015.py | NPU-IAP/NLCA-Net | a5e03dd8370a8fa41552155aabaf8fb531b0ac22 | [
"MIT"
] | 4 | 2020-10-17T12:58:24.000Z | 2022-02-10T03:34:40.000Z | Source/Tools/TrainList_Kitti_2015.py | NPU-IAP/NLCA-Net | a5e03dd8370a8fa41552155aabaf8fb531b0ac22 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
# define sone struct
RootPath = '/home1/Documents/Database/' # root path
RawDataFolder = 'Kitti/training/%s/'
LeftFolder = 'image_2'
RightFolder = 'image_3'
LableFolder = 'disp_occ_0'
FileName = '%06d_10'
RawDataType = '.png'
LabelType = '.png'
TrainListPath = './Dataset/trainlist_k... | 29.978022 | 87 | 0.696114 |
971c422abc83e0bf380f5071a39b1333fe5e67aa | 3,210 | py | Python | fundamentals/tries/trie_v1.py | sassafras13/coding-interview | 9e23027e535fbae90a874076a18cdfa42e362b7c | [
"MIT"
] | null | null | null | fundamentals/tries/trie_v1.py | sassafras13/coding-interview | 9e23027e535fbae90a874076a18cdfa42e362b7c | [
"MIT"
] | null | null | null | fundamentals/tries/trie_v1.py | sassafras13/coding-interview | 9e23027e535fbae90a874076a18cdfa42e362b7c | [
"MIT"
] | null | null | null | # 01-11-2021
# Emma Benjaminson
# Trie Implementation
# Source: https://towardsdatascience.com/implementing-a-trie-data-structure-in-python-in-less-than-100-lines-of-code-a877ea23c1a1
# a tuple is a built-in data type in Python that stores data
# ordered and unchangeable
# written with round brackets
from typing i... | 29.722222 | 130 | 0.619626 |
85c6a276eed151ad6e2ca2a5f618f87d760540de | 11,323 | py | Python | release/ansible/ansible_collections/kubernetes/core/plugins/modules/k8s_scale.py | jmrodri/ocp-release-operator-sdk | fe08de5bb8fe56f3ea2868da7f467dae03cd3829 | [
"Apache-2.0"
] | 7 | 2019-06-17T21:46:31.000Z | 2022-03-03T07:43:59.000Z | release/ansible/ansible_collections/kubernetes/core/plugins/modules/k8s_scale.py | openshift/ocp-release-operator-sdk | 6466b01d2a1ed29cbd8cb80d687dbf42d706a1a3 | [
"Apache-2.0"
] | 223 | 2019-01-17T19:22:40.000Z | 2022-03-31T16:12:49.000Z | release/ansible/ansible_collections/kubernetes/core/plugins/modules/k8s_scale.py | jmrodri/ocp-release-operator-sdk | fe08de5bb8fe56f3ea2868da7f467dae03cd3829 | [
"Apache-2.0"
] | 24 | 2019-01-17T19:19:49.000Z | 2022-02-03T13:34:08.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2018, Chris Houseknecht <@chouseknecht>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = r'''
module: k8s_scale
short_... | 34.521341 | 139 | 0.675528 |
ae05774ffcd6bcfd9587bf32d55e43134f45be43 | 2,313 | py | Python | ddmin/ddmin.py | hydraseq/ddmin | 44d5ab3d6d8905c4025198c9630ed8672b95febb | [
"MIT"
] | 1 | 2020-03-21T17:03:41.000Z | 2020-03-21T17:03:41.000Z | ddmin/ddmin.py | hydraseq/ddmin | 44d5ab3d6d8905c4025198c9630ed8672b95febb | [
"MIT"
] | 1 | 2020-12-09T11:31:39.000Z | 2020-12-09T11:31:39.000Z | ddmin/ddmin.py | hydraseq/ddmin | 44d5ab3d6d8905c4025198c9630ed8672b95febb | [
"MIT"
] | null | null | null |
class DDMin:
def __init__(self, circumstances, test_func, default_partition=2):
self.circumstances = circumstances
self.test = test_func
self.part = default_partition
def listminus(self, circ1, circ2):
"""Return all elements of C1 that are not in C2. Assumes elementes of C1
... | 37.918033 | 94 | 0.58971 |
8ed03064c5b5efa81b21b1a4333711cc450a7162 | 23,931 | py | Python | ssd_utils.py | PrimadonnaGit/tpgr_ssd_detectors | de45dea112af67d6e8ff7bebcdde64a8665e2ff5 | [
"MIT"
] | 3 | 2019-09-27T01:30:59.000Z | 2020-09-02T06:55:24.000Z | ssd_utils.py | PrimadonnaGit/tpgr_ssd_detectors | de45dea112af67d6e8ff7bebcdde64a8665e2ff5 | [
"MIT"
] | null | null | null | ssd_utils.py | PrimadonnaGit/tpgr_ssd_detectors | de45dea112af67d6e8ff7bebcdde64a8665e2ff5 | [
"MIT"
] | null | null | null | """Some utils for SSD."""
import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
import keras.backend as K
import h5py
import cv2
import os
#from tqdm import tqdm
#from utils.model import load_weights, calc_memory_usage, count_parameters, plot_parameter_statistic, calc_receptive_field
#from utils... | 37.805687 | 129 | 0.554093 |
9cb5a4952715645e130326dc514c1c46ad24ed89 | 3,310 | py | Python | o/soft_robot/derivation_of_dynamics/derived/mac2/eqs/numpy_style/Theta0.py | YoshimitsuMatsutaIe/ctrlab2021_soudan | 7841c981e6804cc92d34715a00e7c3efce41d1d0 | [
"MIT"
] | null | null | null | o/soft_robot/derivation_of_dynamics/derived/mac2/eqs/numpy_style/Theta0.py | YoshimitsuMatsutaIe/ctrlab2021_soudan | 7841c981e6804cc92d34715a00e7c3efce41d1d0 | [
"MIT"
] | null | null | null | o/soft_robot/derivation_of_dynamics/derived/mac2/eqs/numpy_style/Theta0.py | YoshimitsuMatsutaIe/ctrlab2021_soudan | 7841c981e6804cc92d34715a00e7c3efce41d1d0 | [
"MIT"
] | null | null | null | import numpy
def f(q, q_dot, xi):
l1, l2, l3 = q[0,0], q[1,0], q[2,0]
l1_dot, l2_dot, l3_dot = q_dot[0,0], q_dot[1,0], q_dot[2,0]
return numpy.array([[8.8412689977681e-5*xi**2*(0.5*l1 - 5.0e-5)*(l2 - 0.002) + 3.31547587416304e-5*xi**2*(0.5*l1 - 5.0e-5)*(l3 - 0.0015) - 3.03918621798279e-5*xi**2*(l1 - 0.0001... | 551.666667 | 3,171 | 0.60997 |
12f2511f6f80ac8c9e70e0fe21ae83dcf8eb0edf | 1,218 | py | Python | chat/views.py | damiso15/chat_bot | d3c08252c4bd728e5c604f498e25c866213f5174 | [
"MIT"
] | null | null | null | chat/views.py | damiso15/chat_bot | d3c08252c4bd728e5c604f498e25c866213f5174 | [
"MIT"
] | 6 | 2020-06-21T10:12:02.000Z | 2021-09-22T19:16:45.000Z | chat/views.py | damiso15/chat_bot | d3c08252c4bd728e5c604f498e25c866213f5174 | [
"MIT"
] | 1 | 2020-07-29T10:54:57.000Z | 2020-07-29T10:54:57.000Z | from django.shortcuts import render
from django.http import HttpResponse
import json
from django.views.decorators.csrf import csrf_exempt
from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer
# Create your views here.
# chatbot = ChatBot(
# 'Ron Obvious',
# trainer='chatterbot... | 28.325581 | 86 | 0.711823 |
6b4e83770131798fa5ecd44529b901b4e54d7f9f | 7,239 | py | Python | huey/contrib/sql_huey.py | qyqx233/huey | b1275c9fff5d72683979fc3503b174544ce10a8e | [
"MIT"
] | 3,676 | 2015-01-02T22:43:04.000Z | 2022-03-31T05:29:02.000Z | huey/contrib/sql_huey.py | qyqx233/huey | b1275c9fff5d72683979fc3503b174544ce10a8e | [
"MIT"
] | 542 | 2015-01-15T17:18:52.000Z | 2022-03-16T19:18:55.000Z | huey/contrib/sql_huey.py | qyqx233/huey | b1275c9fff5d72683979fc3503b174544ce10a8e | [
"MIT"
] | 385 | 2015-01-08T05:02:58.000Z | 2022-03-17T12:27:38.000Z | from functools import partial
import operator
from peewee import *
from playhouse.db_url import connect as db_url_connect
from huey.api import Huey
from huey.constants import EmptyData
from huey.exceptions import ConfigurationError
from huey.storage import BaseStorage
class BytesBlobField(BlobField):
def python... | 31.75 | 79 | 0.570521 |
4d072e8d40ee7162553c37709ac9be2f2f407748 | 59 | py | Python | project/apps/smanager/__init__.py | bhs-contests/barberscore-api | 7bd06b074c99903f031220f41b15a22474724044 | [
"BSD-2-Clause"
] | null | null | null | project/apps/smanager/__init__.py | bhs-contests/barberscore-api | 7bd06b074c99903f031220f41b15a22474724044 | [
"BSD-2-Clause"
] | 9 | 2020-06-05T22:17:17.000Z | 2022-03-12T00:04:00.000Z | project/apps/smanager/__init__.py | bhs-contests/barberscore-api | 7bd06b074c99903f031220f41b15a22474724044 | [
"BSD-2-Clause"
] | null | null | null | default_app_config = 'apps.smanager.config.SmanagerConfig'
| 29.5 | 58 | 0.847458 |
f1cf5f854b2c3af21eaecf8348ae4839e96fc14a | 15,058 | py | Python | testproject/tests.py | nim65s/cagnotte_solidaire | 60df468093dadfab67a6a44d77549d13a2b79616 | [
"BSD-2-Clause"
] | null | null | null | testproject/tests.py | nim65s/cagnotte_solidaire | 60df468093dadfab67a6a44d77549d13a2b79616 | [
"BSD-2-Clause"
] | 15 | 2019-10-22T21:36:18.000Z | 2022-03-11T23:27:27.000Z | testproject/tests.py | nim65s/cagnotte_solidaire | 60df468093dadfab67a6a44d77549d13a2b79616 | [
"BSD-2-Clause"
] | null | null | null | """Main test module for Cagnotte Solidaire."""
from datetime import date
from cagnottesolidaire.models import Cagnotte, Demande, Offre, Proposition
from django.contrib.auth.models import User
from django.core import mail
from django.test import TestCase
from django.urls import reverse
def strpdate(s: str) -> date:
... | 57.254753 | 116 | 0.596162 |
fb7787e2fb06d1815f81aedc052cb891c6a1bdfd | 2,130 | py | Python | Exscript/protocols/drivers/one_os.py | timgates42/exscript | 37f4f632352b934a2ff8fdf94ee26663e8181ead | [
"MIT"
] | 226 | 2015-01-20T19:59:06.000Z | 2022-01-02T11:13:01.000Z | Exscript/protocols/drivers/one_os.py | timgates42/exscript | 37f4f632352b934a2ff8fdf94ee26663e8181ead | [
"MIT"
] | 155 | 2015-01-02T07:56:27.000Z | 2022-01-09T20:56:19.000Z | Exscript/protocols/drivers/one_os.py | timgates42/exscript | 37f4f632352b934a2ff8fdf94ee26663e8181ead | [
"MIT"
] | 114 | 2015-01-03T11:48:17.000Z | 2022-01-26T02:50:43.000Z | #
# Copyright (C) 2010-2017 Samuel Abels
# The MIT License (MIT)
#
# 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,... | 36.101695 | 72 | 0.69108 |
3bdad9e4c71b18ad3bcb160a0b3845a60e46a0db | 3,248 | py | Python | Leetcode-cn/74.搜索二维矩阵.py | joey66666/Codeyard | 08fc599baf1d99e39f878386124af854006a3602 | [
"MIT"
] | null | null | null | Leetcode-cn/74.搜索二维矩阵.py | joey66666/Codeyard | 08fc599baf1d99e39f878386124af854006a3602 | [
"MIT"
] | 3 | 2020-08-11T10:18:23.000Z | 2021-05-18T15:25:42.000Z | Leetcode-cn/74.搜索二维矩阵.py | joey66666/Codeyard | 08fc599baf1d99e39f878386124af854006a3602 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode.cn id=74 lang=python3
#
# [74] 搜索二维矩阵
#
# https://leetcode-cn.com/problems/search-a-2d-matrix/description/
#
# algorithms
# Medium (41.18%)
# Likes: 401
# Dislikes: 0
# Total Accepted: 123.9K
# Total Submissions: 281.6K
# Testcase Example: '[[1,3,5,7],[10,11,16,20],[23,30,34,60]]\n3'
#
# 编写一... | 27.294118 | 91 | 0.47814 |
ca56dff3a343009c12c245791b2ce1fdecc1b392 | 1,029 | py | Python | tasks/password_validator/05_Viktoriya_Vasileva/password.py | valentinvarbanov/software_engineering_2021 | 33ece7d1e4889840621626e30f975d6cfd370b38 | [
"MIT"
] | 7 | 2021-10-05T14:54:55.000Z | 2022-02-16T06:07:12.000Z | tasks/password_validator/05_Viktoriya_Vasileva/password.py | valentinvarbanov/software_engineering_2021 | 33ece7d1e4889840621626e30f975d6cfd370b38 | [
"MIT"
] | 2 | 2021-12-04T10:49:46.000Z | 2022-02-28T06:09:06.000Z | tasks/password_validator/05_Viktoriya_Vasileva/password.py | valentinvarbanov/software_engineering_2021 | 33ece7d1e4889840621626e30f975d6cfd370b38 | [
"MIT"
] | null | null | null | import requests
def weak_passwords(password):
weak = ['12345', 'qwerty', 'password', 'asdf']
if password in weak:
return True
return False
def letters_password(password):
return any(c.isalpha() for c in password)
def special_letters_password(password):
special_characters = "?!*%$@" #""!@#... | 19.415094 | 79 | 0.656948 |
128b652efdd4f9a115ef80c22578f784dcf1ebfe | 5,520 | py | Python | Code/automation/SimTest.py | oahul14/ShockNet | cbc72d1a4f2d5000b9374a4e929282034171491a | [
"MIT"
] | 4 | 2020-10-03T07:58:10.000Z | 2021-12-13T13:43:02.000Z | Code/automation/SimTest.py | oahul14/ShockNet | cbc72d1a4f2d5000b9374a4e929282034171491a | [
"MIT"
] | 4 | 2021-06-08T22:20:50.000Z | 2022-03-12T00:46:57.000Z | Code/automation/SimTest.py | oahul14/ShockNet | cbc72d1a4f2d5000b9374a4e929282034171491a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import time
import random
class GeoDomain(object):
def __init__(self):
"""
Initialise a GeoDomain of either a polygon or a cube.
Defined by the original coordinates and the sides of the domain
Parameters
----------
gtype : List of str
... | 30 | 93 | 0.555254 |
0d9be5504af9280485e42f63af5103fb494c3364 | 3,611 | py | Python | src/server/lis.py | eugeneai/hw-cardio-nec | f145c4f9a7eda0854e1ae6dd6a1cf19e2b8d2431 | [
"MIT"
] | null | null | null | src/server/lis.py | eugeneai/hw-cardio-nec | f145c4f9a7eda0854e1ae6dd6a1cf19e2b8d2431 | [
"MIT"
] | null | null | null | src/server/lis.py | eugeneai/hw-cardio-nec | f145c4f9a7eda0854e1ae6dd6a1cf19e2b8d2431 | [
"MIT"
] | 1 | 2021-12-15T23:06:28.000Z | 2021-12-15T23:06:28.000Z | import requests as req
import pics
# SERVER = "http://192.168.22.4:5000/"
SERVER = "http://192.168.0.114:5000/"
H3 = SERVER+'h3/'
SPI = H3+'spi'
FORTH = H3+'forth'
SCREND = 9
class Colors():
pass
class Base():
def __init__(self, endpoint):
self.endpoint = endpoint
def post(self, abytesarray=No... | 24.903448 | 76 | 0.544448 |
332db8df4876467266d5f5df0381f8cd61d37fb5 | 955 | py | Python | setup.py | yabirgb/simobility | aca8245d582a94a16c6bd0eed98344974f6dafb4 | [
"MIT"
] | null | null | null | setup.py | yabirgb/simobility | aca8245d582a94a16c6bd0eed98344974f6dafb4 | [
"MIT"
] | null | null | null | setup.py | yabirgb/simobility | aca8245d582a94a16c6bd0eed98344974f6dafb4 | [
"MIT"
] | null | null | null | from setuptools import setup
from simobility import __version__
setup(
name="simobility",
description="Lightweight mobility simulation for quick algorithm prototyping",
author="Oleksandr Lysenko",
author_email="sashkolysenko@gmail.com",
version=__version__,
packages=[
"simobility",
... | 21.704545 | 82 | 0.506806 |
5118380035e938189b7eb20f0658afb95a85a391 | 1,390 | py | Python | samples/use_cnbc_client.py | areed1192/finance-news-aggregator | 6d66f44292565cf4ccfeab0983fce1dab90fd1ae | [
"MIT"
] | 49 | 2020-07-19T17:53:41.000Z | 2022-03-27T10:36:36.000Z | samples/use_cnbc_client.py | webclinic017/finance-news-aggregator | 6d66f44292565cf4ccfeab0983fce1dab90fd1ae | [
"MIT"
] | 1 | 2021-09-12T15:06:29.000Z | 2021-09-12T15:06:29.000Z | samples/use_cnbc_client.py | webclinic017/finance-news-aggregator | 6d66f44292565cf4ccfeab0983fce1dab90fd1ae | [
"MIT"
] | 18 | 2020-08-06T07:39:17.000Z | 2022-01-16T14:59:28.000Z | from pprint import pprint
from finnews.client import News
from finnews.news_enum import cnbc_top_news
from finnews.news_enum import cnbc_tv_programs_asia
# Create a new instance of the News Client.
news_client = News()
# Grab the CNBC News Client.
cnbc_news_client = news_client.cnbc
# Grab the top news.
cbnc_top_ne... | 24.821429 | 58 | 0.784173 |
fa1405bc4069e2aa4abb6a94195ea2230f27586a | 91 | py | Python | dnsQuery/apps.py | valarpirai/docker-demo | 26e1238a4fdf9086cc518ac99d38821075dd2aa5 | [
"MIT"
] | 1 | 2019-11-16T10:32:20.000Z | 2019-11-16T10:32:20.000Z | dnsQuery/apps.py | valarpirai/docker-demo | 26e1238a4fdf9086cc518ac99d38821075dd2aa5 | [
"MIT"
] | 6 | 2020-03-24T15:30:02.000Z | 2021-06-10T18:38:20.000Z | dnsQuery/apps.py | valarpirai/docker-demo | 26e1238a4fdf9086cc518ac99d38821075dd2aa5 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class DnsqueryConfig(AppConfig):
name = 'dnsQuery'
| 15.166667 | 33 | 0.758242 |
7d82acc2b408bd1be4320c40b23cf2b8cf78a9c4 | 699 | py | Python | oops_fhir/r4/value_set/v3_query_parameter_value.py | Mikuana/oops_fhir | 77963315d123756b7d21ae881f433778096a1d25 | [
"MIT"
] | null | null | null | oops_fhir/r4/value_set/v3_query_parameter_value.py | Mikuana/oops_fhir | 77963315d123756b7d21ae881f433778096a1d25 | [
"MIT"
] | null | null | null | oops_fhir/r4/value_set/v3_query_parameter_value.py | Mikuana/oops_fhir | 77963315d123756b7d21ae881f433778096a1d25 | [
"MIT"
] | null | null | null | from pathlib import Path
from fhir.resources.valueset import ValueSet as _ValueSet
from oops_fhir.utils import ValueSet
from oops_fhir.r4.code_system.v3_query_parameter_value import (
v3QueryParameterValue as v3QueryParameterValue_,
)
__all__ = ["v3QueryParameterValue"]
_resource = _ValueSet.parse_file(Path(... | 21.84375 | 74 | 0.76681 |
f7e701a9e7fc983a8db743b79b3c408007f82241 | 2,865 | py | Python | vision_transform_codes/tests/sparse_coding_2.py | spencerkent/vision-transform-codes | 63258ce698e436ee3ce29def75c89337759fb98b | [
"BSD-3-Clause"
] | null | null | null | vision_transform_codes/tests/sparse_coding_2.py | spencerkent/vision-transform-codes | 63258ce698e436ee3ce29def75c89337759fb98b | [
"BSD-3-Clause"
] | null | null | null | vision_transform_codes/tests/sparse_coding_2.py | spencerkent/vision-transform-codes | 63258ce698e436ee3ce29def75c89337759fb98b | [
"BSD-3-Clause"
] | null | null | null | """
Test: Sparse coding, fully connected, fista, cheap qaudratic descent
"""
import _set_the_path
import math
import pickle
import torch
from training.sparse_coding import train_dictionary
from utils.dataset_generation import OneOutputDset
from utils import defaults
RUN_IDENTIFIER = '_testing_sc_2'
LOGS_STORED_HERE ... | 37.207792 | 77 | 0.742408 |
ad333a4eaea44bdaa6fd0f3b9687f2e04a567329 | 4,516 | py | Python | src/api-service/__app__/proxy/__init__.py | CuteCutePanda/onefuzz | c71ce580bd6ef37e6e8f8ee7c9413a13c0abd695 | [
"MIT"
] | 1 | 2021-12-20T14:48:40.000Z | 2021-12-20T14:48:40.000Z | src/api-service/__app__/proxy/__init__.py | CuteCutePanda/onefuzz | c71ce580bd6ef37e6e8f8ee7c9413a13c0abd695 | [
"MIT"
] | null | null | null | src/api-service/__app__/proxy/__init__.py | CuteCutePanda/onefuzz | c71ce580bd6ef37e6e8f8ee7c9413a13c0abd695 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
from typing import Optional
import azure.functions as func
from onefuzztypes.enums import ErrorCode, VmState
from onefuzztypes.models import Error
from onefuzztypes.requests import ProxyCreate, ProxyDelete, ProxyGet, Prox... | 32.028369 | 86 | 0.678255 |
9f5083a51e0f3e0de9a672079f151e9b84efabeb | 35,740 | py | Python | external/devlib/devlib/utils/android.py | douglas-raillard-arm/lisa | 147906063550728400aa7914c1fe568228dcf3bf | [
"Apache-2.0"
] | 159 | 2016-01-25T11:08:39.000Z | 2022-03-28T05:20:41.000Z | external/devlib/devlib/utils/android.py | douglas-raillard-arm/lisa | 147906063550728400aa7914c1fe568228dcf3bf | [
"Apache-2.0"
] | 656 | 2016-01-25T11:16:56.000Z | 2022-03-23T16:03:28.000Z | external/devlib/devlib/utils/android.py | ARM-software/lisa | 3c39388f22d2531b5b3f2159e2f7641dee99bd46 | [
"Apache-2.0"
] | 116 | 2016-01-25T12:06:31.000Z | 2022-03-28T08:43:28.000Z | # Copyright 2013-2018 ARM Limited
#
# 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... | 37.424084 | 146 | 0.618942 |
aacde24fbe2ea42d01d4c7ca74eaecebf8427acc | 3,371 | py | Python | 12 - The Python Programmer Bootcamp/5_Conditionals/7_Practice challenge (15:11)/6.7_Conditionals_questions_UNSOLVED.py | olayinka04/365-data-science-courses | 7d71215432f0ef07fd3def559d793a6f1938d108 | [
"Apache-2.0"
] | null | null | null | 12 - The Python Programmer Bootcamp/5_Conditionals/7_Practice challenge (15:11)/6.7_Conditionals_questions_UNSOLVED.py | olayinka04/365-data-science-courses | 7d71215432f0ef07fd3def559d793a6f1938d108 | [
"Apache-2.0"
] | null | null | null | 12 - The Python Programmer Bootcamp/5_Conditionals/7_Practice challenge (15:11)/6.7_Conditionals_questions_UNSOLVED.py | olayinka04/365-data-science-courses | 7d71215432f0ef07fd3def559d793a6f1938d108 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Oct 17 13:04:18 2019
@author: Giles
"""
'''
Question 1
Write code that asks the user to input a number between 1 and 5 inclusive.
The code will take the integer value and print out the string value. So for
example if the user inputs 2 the code will pri... | 30.369369 | 80 | 0.679917 |
5ab5c4a57cfe60464e662003349d560a3cd16f42 | 23,242 | py | Python | tests/fnet/test_modeling_fnet.py | dctelus/transformers | 6786cbc4b14ebff0ac59c768cadd109391db9a08 | [
"Apache-2.0"
] | 3 | 2022-01-15T08:06:07.000Z | 2022-03-10T07:13:18.000Z | tests/fnet/test_modeling_fnet.py | arron1227/transformers | b18dfd95e1f60ae65a959a7b255fc06522170d1b | [
"Apache-2.0"
] | 2 | 2022-03-14T10:13:16.000Z | 2022-03-14T11:50:27.000Z | tests/fnet/test_modeling_fnet.py | arron1227/transformers | b18dfd95e1f60ae65a959a7b255fc06522170d1b | [
"Apache-2.0"
] | 2 | 2022-03-21T04:32:39.000Z | 2022-03-22T01:02:49.000Z | # 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... | 41.503571 | 315 | 0.669779 |
f3db4bb27de7b8ef2802f6105c2abac117657036 | 1,106 | py | Python | plotly/validators/volume/stream/__init__.py | piyush1301/plotly.py | 50cd5c4cd4732042422751c7760acbab8dd8a50d | [
"MIT"
] | 6 | 2019-05-03T02:12:04.000Z | 2020-03-01T06:33:21.000Z | plotly/validators/volume/stream/__init__.py | piyush1301/plotly.py | 50cd5c4cd4732042422751c7760acbab8dd8a50d | [
"MIT"
] | null | null | null | plotly/validators/volume/stream/__init__.py | piyush1301/plotly.py | 50cd5c4cd4732042422751c7760acbab8dd8a50d | [
"MIT"
] | 5 | 2019-05-18T16:50:11.000Z | 2021-07-06T21:14:36.000Z |
import _plotly_utils.basevalidators
class TokenValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name='token', parent_name='volume.stream', **kwargs
):
super(TokenValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent... | 28.358974 | 76 | 0.611212 |
a244718746e1c913b01ee81eb90eff1ac0f91f31 | 9,047 | py | Python | pyleecan/GUI/Dialog/DMachineSetup/SWSlot/SWSlot.py | Kelos-Zhu/pyleecan | 368f8379688e31a6c26d2c1cd426f21dfbceff2a | [
"Apache-2.0"
] | null | null | null | pyleecan/GUI/Dialog/DMachineSetup/SWSlot/SWSlot.py | Kelos-Zhu/pyleecan | 368f8379688e31a6c26d2c1cd426f21dfbceff2a | [
"Apache-2.0"
] | null | null | null | pyleecan/GUI/Dialog/DMachineSetup/SWSlot/SWSlot.py | Kelos-Zhu/pyleecan | 368f8379688e31a6c26d2c1cd426f21dfbceff2a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from numpy import pi
from PyQt5.QtCore import pyqtSignal
from PyQt5.QtWidgets import QMessageBox, QWidget
from .....Classes.LamSlotWind import LamSlotWind
from .....Classes.Slot import Slot
from .....Classes.SlotW10 import SlotW10
from .....Classes.SlotWind import SlotWind
from .....GUI.Dialog... | 32.19573 | 78 | 0.612579 |
29deacb419ca0cd59c9101f1b097455aa82027f9 | 579 | py | Python | flavio/__init__.py | AlexandreCarvunis/flavio | c21936a5ff004283b08cab543e2c880e35526bb6 | [
"MIT"
] | null | null | null | flavio/__init__.py | AlexandreCarvunis/flavio | c21936a5ff004283b08cab543e2c880e35526bb6 | [
"MIT"
] | null | null | null | flavio/__init__.py | AlexandreCarvunis/flavio | c21936a5ff004283b08cab543e2c880e35526bb6 | [
"MIT"
] | null | null | null | from ._version import __version__
from . import physics
from . import statistics
from . import io
from . import parameters
from . import measurements
from . import classes
from .classes import Measurement, Parameter, ParameterConstraints, Observable, NamedInstanceClass
from .config import config
from . import citations... | 41.357143 | 158 | 0.848014 |
e3245390de455fdff455f201fd1a529ab260178a | 12,275 | py | Python | app/main/views/index.py | TechforgoodCAST/notifications-admin | 0a9e06aafd79d0fbe50c26a85bf757aaeaa59340 | [
"MIT"
] | null | null | null | app/main/views/index.py | TechforgoodCAST/notifications-admin | 0a9e06aafd79d0fbe50c26a85bf757aaeaa59340 | [
"MIT"
] | 1 | 2021-10-19T13:34:15.000Z | 2021-10-19T13:34:15.000Z | app/main/views/index.py | TechforgoodCAST/notifications-admin | 0a9e06aafd79d0fbe50c26a85bf757aaeaa59340 | [
"MIT"
] | 1 | 2021-03-05T13:18:44.000Z | 2021-03-05T13:18:44.000Z | from flask import (
abort,
make_response,
redirect,
render_template,
request,
url_for,
)
from flask_login import current_user
from notifications_utils.international_billing_rates import (
INTERNATIONAL_BILLING_RATES,
)
from notifications_utils.template import HTMLEmailTemplate, LetterImageTe... | 28.15367 | 101 | 0.667862 |
c6da4ac44de5e5e7a924afdc7328f27d694abf25 | 700 | py | Python | PBO_8081/tugas PBO 1.py | ifanamirudin/PBO | 76ab2b1ca2a4a4e05aa5fae48bfeb45f20018911 | [
"MIT"
] | null | null | null | PBO_8081/tugas PBO 1.py | ifanamirudin/PBO | 76ab2b1ca2a4a4e05aa5fae48bfeb45f20018911 | [
"MIT"
] | null | null | null | PBO_8081/tugas PBO 1.py | ifanamirudin/PBO | 76ab2b1ca2a4a4e05aa5fae48bfeb45f20018911 | [
"MIT"
] | null | null | null | Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 22:39:24) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> x1=input("masukkan nama")
masukkan namaifan hi amirudin
>>> x2=input("masukkan nmp")
masukkan nmp8081
>>> a="masukkan nama"
>>> b="masukkan n... | 25.925926 | 95 | 0.638571 |
f920654e0a8fc604bf49f4d312297cc0efcc4a56 | 845 | py | Python | src/klasser.py | Leopold2020/code_repo | 24b1a932d77ba1456f8df4978f029dd841c7b177 | [
"MIT"
] | null | null | null | src/klasser.py | Leopold2020/code_repo | 24b1a932d77ba1456f8df4978f029dd841c7b177 | [
"MIT"
] | null | null | null | src/klasser.py | Leopold2020/code_repo | 24b1a932d77ba1456f8df4978f029dd841c7b177 | [
"MIT"
] | null | null | null |
class NTI_Elev:
def __init__(self, name, age, sex):
self.name = name
self.age = age
self.sex = sex
def __str__(self):
return f"NTI eleven heter {self.name}, de är {self.age} år gammal och är en {self.sex}."
def return_name(self):
return self.name
class ITaren(... | 20.119048 | 96 | 0.577515 |
b1049a4f01ddf9fa0444d1c852627e5141fbba8a | 9,333 | py | Python | smdebug/tensorflow/utils.py | vandanavk/sagemaker-debugger | 5246cda198295aa1dd1656ad32b30c4bb1e2aec4 | [
"Apache-2.0"
] | 1 | 2020-08-14T16:10:04.000Z | 2020-08-14T16:10:04.000Z | smdebug/tensorflow/utils.py | vandanavk/sagemaker-debugger | 5246cda198295aa1dd1656ad32b30c4bb1e2aec4 | [
"Apache-2.0"
] | null | null | null | smdebug/tensorflow/utils.py | vandanavk/sagemaker-debugger | 5246cda198295aa1dd1656ad32b30c4bb1e2aec4 | [
"Apache-2.0"
] | null | null | null | # Standard Library
import collections
import json
from enum import Enum
# Third Party
from tensorflow.contrib.distribute import MirroredStrategy as ContribMirroredStrategy
from tensorflow.python.distribute import values
# First Party
from smdebug.core.modes import ModeKeys
try:
import tensorflow.compat.v1 as tf
... | 31.318792 | 101 | 0.663238 |
03bba9823c8aa6959b6e2ebc6b72ef1ff459b7ab | 1,740 | py | Python | astroquery/nist/tests/test_nist.py | hdevillepoix/astroquery | ce8c500c28424fe841e04741d4230b8f695ee194 | [
"BSD-3-Clause"
] | 577 | 2015-02-12T18:23:49.000Z | 2022-03-22T21:38:58.000Z | astroquery/nist/tests/test_nist.py | hdevillepoix/astroquery | ce8c500c28424fe841e04741d4230b8f695ee194 | [
"BSD-3-Clause"
] | 1,812 | 2015-01-01T08:02:20.000Z | 2022-03-31T13:03:52.000Z | astroquery/nist/tests/test_nist.py | hdevillepoix/astroquery | ce8c500c28424fe841e04741d4230b8f695ee194 | [
"BSD-3-Clause"
] | 322 | 2015-02-23T19:31:29.000Z | 2022-03-25T18:51:30.000Z | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import os
import numpy.testing as npt
import pytest
from astropy.table import Table
import astropy.units as u
from ...utils.testing_tools import MockResponse
from ... import nist
DATA_FILES = {'lines': 'nist_out.html'}
def data_path(filename):
dat... | 31.071429 | 74 | 0.665517 |
0fea8cb76a628c99707f98ef43eb7949e526fc49 | 281 | py | Python | emukit/model_wrappers/__init__.py | DavidJanz/emukit | 7421cb7f4ed831b6581f3686806521ff7fb97e74 | [
"Apache-2.0"
] | 6 | 2019-06-02T21:23:27.000Z | 2020-02-17T09:46:30.000Z | emukit/model_wrappers/__init__.py | DavidJanz/emukit | 7421cb7f4ed831b6581f3686806521ff7fb97e74 | [
"Apache-2.0"
] | 4 | 2019-05-17T13:30:21.000Z | 2019-06-21T13:49:19.000Z | emukit/model_wrappers/__init__.py | DavidJanz/emukit | 7421cb7f4ed831b6581f3686806521ff7fb97e74 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
from .gpy_model_wrappers import GPyModelWrapper, GPyMultiOutputWrapper # noqa: F401
from .gpy_quadrature_wrappers import BaseGaussianProcessGPy, RBFGPy # noqa: F401
| 40.142857 | 84 | 0.807829 |
dec618ffb1476317c02a49ee40afd094eb8e256e | 3,535 | py | Python | lib_fr/layer_utils/proposal_layer.py | chang010453/GRP-HAI | 60f7c7633e33dbdd852f5df3e0a3d1017b6b2a22 | [
"MIT"
] | null | null | null | lib_fr/layer_utils/proposal_layer.py | chang010453/GRP-HAI | 60f7c7633e33dbdd852f5df3e0a3d1017b6b2a22 | [
"MIT"
] | null | null | null | lib_fr/layer_utils/proposal_layer.py | chang010453/GRP-HAI | 60f7c7633e33dbdd852f5df3e0a3d1017b6b2a22 | [
"MIT"
] | null | null | null | # --------------------------------------------------------
# Faster R-CNN
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick and Xinlei Chen
# --------------------------------------------------------
from __future__ import absolute_import
from __future__ import division
from __future_... | 35.707071 | 118 | 0.676945 |
3d61b62e248d294ddc7be762a7e667fad0d95bb1 | 4,129 | py | Python | htdfsdk/web3/providers/websocket.py | youngqqcn/htdfsdk | c22f213a967c8233bb6ccfb01bf148112efd44db | [
"MIT"
] | 2 | 2021-01-21T01:46:29.000Z | 2021-03-12T05:59:19.000Z | htdfsdk/web3/providers/websocket.py | youngqqcn/htdfsdk | c22f213a967c8233bb6ccfb01bf148112efd44db | [
"MIT"
] | null | null | null | htdfsdk/web3/providers/websocket.py | youngqqcn/htdfsdk | c22f213a967c8233bb6ccfb01bf148112efd44db | [
"MIT"
] | null | null | null | import asyncio
import json
import logging
import os
from threading import (
Thread,
)
from types import (
TracebackType,
)
from typing import (
Any,
Optional,
Type,
Union,
)
from eth_typing import (
URI,
)
import websockets
from htdfsdk.web3.exceptions import (
ValidationError,
)
from ... | 29.492857 | 91 | 0.630903 |
60aff374220c9cf3d3d6f604a8747bf3cfbdf8c4 | 1,460 | py | Python | setup.py | koustuvsinha/bert_score | 29a20b7393d5bbff8c5830c19670bfb263a011ba | [
"MIT"
] | null | null | null | setup.py | koustuvsinha/bert_score | 29a20b7393d5bbff8c5830c19670bfb263a011ba | [
"MIT"
] | null | null | null | setup.py | koustuvsinha/bert_score | 29a20b7393d5bbff8c5830c19670bfb263a011ba | [
"MIT"
] | null | null | null | from io import open
from setuptools import find_packages, setup
setup(
name="bert_score",
version='0.3.8',
author="Tianyi Zhang*, Varsha Kishore*, Felix Wu*, Kilian Q. Weinberger, and Yoav Artzi",
author_email="tzhang@asapp.com",
description="PyTorch implementation of BERT score",
long_descript... | 34.761905 | 93 | 0.559589 |
ffcc250a6da76622d23bcf520543ce2a2b346ce2 | 4,407 | py | Python | calc.py | mourice-oduor/Python-Calculator | 4550b272c281d95c6be6efacc0988d4e459eb0f7 | [
"MIT"
] | null | null | null | calc.py | mourice-oduor/Python-Calculator | 4550b272c281d95c6be6efacc0988d4e459eb0f7 | [
"MIT"
] | null | null | null | calc.py | mourice-oduor/Python-Calculator | 4550b272c281d95c6be6efacc0988d4e459eb0f7 | [
"MIT"
] | null | null | null | from tkinter import *
import tkinter as tk
import os
import re #(Regular expression)
class Calculator:
def __init__(self, cal):
self.cal = cal
cal.title('Simple Python Calculator')
#cal.iconbitmap(r'/home/net/MORYSO/PYTHON/Game-Dev/games-todo/16. Calculator/calculator.icon')
#cal.ic... | 39.348214 | 133 | 0.597005 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.