hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 247 | max_issues_repo_name stringlengths 4 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 4 247 | max_forks_repo_name stringlengths 4 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.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f4bdd6e3b86836c5fb0f99888a4715b01e1da4c4 | 6,169 | py | Python | apply/src/awsqs_kubernetes_resource/vpc.py | aws-quickstart/quickstart-kubernetes-resource-provider | f54ddce8f89cd3996b0ba79f1a0ada1945e8c539 | [
"Apache-2.0"
] | 11 | 2020-08-18T19:20:27.000Z | 2022-01-30T16:17:06.000Z | apply/src/awsqs_kubernetes_resource/vpc.py | aws-quickstart/quickstart-kubernetes-resource-provider | f54ddce8f89cd3996b0ba79f1a0ada1945e8c539 | [
"Apache-2.0"
] | 23 | 2020-10-21T12:46:36.000Z | 2022-03-31T23:19:45.000Z | apply/src/awsqs_kubernetes_resource/vpc.py | aws-quickstart/quickstart-kubernetes-resource-provider | f54ddce8f89cd3996b0ba79f1a0ada1945e8c539 | [
"Apache-2.0"
] | 11 | 2020-11-06T09:46:03.000Z | 2022-03-06T12:00:24.000Z | import logging
LOG = logging.getLogger(__name__)
LOG.setLevel(logging.DEBUG)
| 36.502959 | 120 | 0.64662 | import boto3
import os
import traceback
from string import ascii_lowercase
from random import choice
import json
import logging
import time
from typing import Optional, Union
from pathlib import Path
from cloudformation_cli_python_lib import SessionProxy, exceptions
LOG = logging.getLogger(__name__)
LOG.setLevel(logg... | 0 | 0 | 0 | 0 | 0 | 5,646 | 0 | 32 | 404 |
64c95da98bf1dd7e0fa3dbe6528500995df8a6ba | 3,860 | py | Python | scapy-space-packets/ats.py | solar-wine/tools-for-hack-a-sat-2020 | 8721173953b1649dea1004871269c944ef98eede | [
"BSD-3-Clause"
] | 58 | 2020-09-05T08:24:57.000Z | 2022-03-13T16:41:11.000Z | scapy-space-packets/ats.py | solar-wine/tools-for-hack-a-sat-2020 | 8721173953b1649dea1004871269c944ef98eede | [
"BSD-3-Clause"
] | null | null | null | scapy-space-packets/ats.py | solar-wine/tools-for-hack-a-sat-2020 | 8721173953b1649dea1004871269c944ef98eede | [
"BSD-3-Clause"
] | 10 | 2020-09-05T21:30:49.000Z | 2021-12-25T02:11:50.000Z | #!/usr/bin/env python3
"""
doc: https://raw.githubusercontent.com/nasa/SC/master/docs/users_guide/CFS%20SC%20User%20Guide%20Doc%20No%20582-2012-003%20Ver%201.1%202014_12-18.pdf
Table specifications: https://github.com/nasa/SC/tree/master/fsw/tables
Table image examples: https://github.com/solar-wine/flatsat_data_firm... | 30.88 | 149 | 0.613731 | #!/usr/bin/env python3
"""
doc: https://raw.githubusercontent.com/nasa/SC/master/docs/users_guide/CFS%20SC%20User%20Guide%20Doc%20No%20582-2012-003%20Ver%201.1%202014_12-18.pdf
Table specifications: https://github.com/nasa/SC/tree/master/fsw/tables
Table image examples: https://github.com/solar-wine/flatsat_data_firm... | 0 | 0 | 0 | 2,895 | 0 | 0 | 0 | 17 | 137 |
1c2ddde4c9264ef06c744be59061bedaa0f73663 | 926 | py | Python | 1.7.video_stream.py | enesonmez/opencv-learning | 3cbefc16a8793b5f1c24cc9080c005b4f58714cd | [
"MIT"
] | null | null | null | 1.7.video_stream.py | enesonmez/opencv-learning | 3cbefc16a8793b5f1c24cc9080c005b4f58714cd | [
"MIT"
] | null | null | null | 1.7.video_stream.py | enesonmez/opencv-learning | 3cbefc16a8793b5f1c24cc9080c005b4f58714cd | [
"MIT"
] | null | null | null | import cv2
cap = cv2.VideoCapture(0) # 0 => pc kameras, 1 => usb'ye bal kamera, 2 =>
# video'yu kaydetmek iin
fourcc = cv2.VideoWriter_fourcc(*'XVID') # 4 byte'lk video codec kodu alarak int veri dndrr.
out = cv2.VideoWriter('img/output.avi', fourcc, 20.0, (640,480)) # video ad, codec code, fps, video size
while Tr... | 40.26087 | 112 | 0.719222 | import cv2
cap = cv2.VideoCapture(0) # 0 => pc kamerası, 1 => usb'ye bağlı kamera, 2 =>
# video'yu kaydetmek için
fourcc = cv2.VideoWriter_fourcc(*'XVID') # 4 byte'lık video codec kodu alarak int veri döndürür.
out = cv2.VideoWriter('img/output.avi', fourcc, 20.0, (640,480)) # video adı, codec code, fps, video size
... | 132 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8a6d59815443fa709986864d612994d290e9ef3a | 240 | py | Python | Projetos Python/pythonexercicios/des068.py | Moyses-Nunes/Projetos-Python | 71ae170fb0d7be6afea18608bca630b57b9f0dff | [
"MIT"
] | null | null | null | Projetos Python/pythonexercicios/des068.py | Moyses-Nunes/Projetos-Python | 71ae170fb0d7be6afea18608bca630b57b9f0dff | [
"MIT"
] | null | null | null | Projetos Python/pythonexercicios/des068.py | Moyses-Nunes/Projetos-Python | 71ae170fb0d7be6afea18608bca630b57b9f0dff | [
"MIT"
] | null | null | null | c = 0
while True:
n = int(input('Digite um nmero para ver sua tabuada: '))
c += 1
if n < 0:
print('Programa encerrado!')
break
else:
for m in range(1, 11):
print(f'{n} x {m} = {n * m}')
| 20 | 61 | 0.470833 | c = 0
while True:
n = int(input('Digite um número para ver sua tabuada: '))
c += 1
if n < 0:
print('Programa encerrado!')
break
else:
for m in range(1, 11):
print(f'{n} x {m} = {n * m}')
| 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d74a82e74637b14b3e67e5e0e9e1a72dc3748f00 | 280 | py | Python | badkeys/__init__.py | hoheinzollern/badkeys | 62417cbf4304a20a5af40b5b102438406068f998 | [
"MIT"
] | null | null | null | badkeys/__init__.py | hoheinzollern/badkeys | 62417cbf4304a20a5af40b5b102438406068f998 | [
"MIT"
] | null | null | null | badkeys/__init__.py | hoheinzollern/badkeys | 62417cbf4304a20a5af40b5b102438406068f998 | [
"MIT"
] | null | null | null | __all__ = ["allchecks", "checkrsa", "checkpubkey", "checkprivkey", "checkcrt",
"checkcsr", "checksshpubkey", "detectandcheck"]
from .checks import (allchecks, checkrsa, checkpubkey, checkprivkey, checkcrt, checkcsr, checksshpubkey, detectandcheck)
| 56 | 78 | 0.682143 | __all__ = ["allchecks", "checkrsa", "checkpubkey", "checkprivkey", "checkcrt",
"checkcsr", "checksshpubkey", "detectandcheck"]
from .checks import (allchecks, checkrsa, checkpubkey, checkprivkey, checkcrt,
checkcsr, checksshpubkey, detectandcheck)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 21 | 0 |
768a128a678e716a623e5e9e19c7ac321a65765c | 1,640 | py | Python | bin/seq-gen.py | acorg/seqgen | e94418d155e99c36a58fe2d73f05eb18b9996e65 | [
"MIT"
] | null | null | null | bin/seq-gen.py | acorg/seqgen | e94418d155e99c36a58fe2d73f05eb18b9996e65 | [
"MIT"
] | 3 | 2018-05-23T13:03:37.000Z | 2018-05-23T22:01:27.000Z | bin/seq-gen.py | acorg/seqgen | e94418d155e99c36a58fe2d73f05eb18b9996e65 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from __future__ import print_function
import sys
import argparse
from json.decoder import JSONDecodeError
from seqgen import Sequences
parser = argparse.ArgumentParser(
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
description=('Create genetic sequences according to a '
... | 36.444444 | 79 | 0.70061 | #!/usr/bin/env python
from __future__ import print_function
import sys
import argparse
from json.decoder import JSONDecodeError
from seqgen import Sequences
parser = argparse.ArgumentParser(
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
description=('Create genetic sequences according to a '
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
49969ea62282b602bcb176da940e470d13fc2719 | 1,120 | py | Python | StatsCalculations/statisticsCalculator.py | mcp48/StatsCalculator | 6defb5b55e75ce2528ba58bdf5efc4f016f645d7 | [
"MIT"
] | null | null | null | StatsCalculations/statisticsCalculator.py | mcp48/StatsCalculator | 6defb5b55e75ce2528ba58bdf5efc4f016f645d7 | [
"MIT"
] | 1 | 2021-07-08T19:41:11.000Z | 2021-07-08T19:41:11.000Z | StatsCalculations/statisticsCalculator.py | mcp48/StatsCalculator | 6defb5b55e75ce2528ba58bdf5efc4f016f645d7 | [
"MIT"
] | null | null | null |
# Source for mean, median, and mode:
# https://www.geeksforgeeks.org/finding-mean-median-mode-in-python-without-libraries/
# Source for variance: https://www.geeksforgeeks.org/python-variance-of-list/
# Source for standard deviation: https://www.geeksforgeeks.org/python-standard-deviation-of-list/
| 29.473684 | 97 | 0.728571 | from Calculator.calculator import Calculator
from StatsCalculations.mean import mean
from StatsCalculations.median import median
from StatsCalculations.mode import mode
from StatsCalculations.variance import variance
from StatsCalculations.standardDeviation import standard_deviation
class StatisticsCalculator(Calcula... | 0 | 0 | 0 | 509 | 0 | 0 | 0 | 152 | 155 |
d28315891cd5aefdd4aa2f10c9b9ae21de2a7bfd | 536 | py | Python | biopymlff/calculators/gebf_pm6_test.py | saandre15/biopymlff | ec90370a8c03c51426bd24477034c9413bdcdb04 | [
"MIT"
] | null | null | null | biopymlff/calculators/gebf_pm6_test.py | saandre15/biopymlff | ec90370a8c03c51426bd24477034c9413bdcdb04 | [
"MIT"
] | null | null | null | biopymlff/calculators/gebf_pm6_test.py | saandre15/biopymlff | ec90370a8c03c51426bd24477034c9413bdcdb04 | [
"MIT"
] | null | null | null | import os
path = os.path.join(os.getcwd(), "data", "systems")
proteins_path = os.path.join(path, "proteins")
| 28.210526 | 116 | 0.720149 | import os
import unittest
from ..test.factory import suite
from ..test.protein import Protein_Test
from ..test.general import General_Test
from ..calculators.gebf_dft import GEBF_DFT
from ..calculators.gebf_pm6 import GEBF_PM6
path = os.path.join(os.getcwd(), "data", "systems")
proteins_path = os.path.join(path, "pr... | 0 | 0 | 0 | 184 | 0 | 0 | 0 | 85 | 157 |
1d521622d1586893444412bed8825a0b22333743 | 407 | py | Python | setup.py | AndrewNeudegg/venv_easy | b51ba2d38eda95dce587b633c71c7ea935ca1403 | [
"MIT"
] | null | null | null | setup.py | AndrewNeudegg/venv_easy | b51ba2d38eda95dce587b633c71c7ea935ca1403 | [
"MIT"
] | 1 | 2017-12-02T10:44:28.000Z | 2017-12-02T10:44:28.000Z | setup.py | AndrewNeudegg/venv_easy | b51ba2d38eda95dce587b633c71c7ea935ca1403 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(name='venv_easy',
version='0.1',
description='Easily automating virtual environment creation and implementation from within your Python3 Application.',
url='https://github.com/AndrewNeudegg/venv_easy',
author='Andrew Neudegg',
author_email='andrew.neudeg... | 33.916667 | 124 | 0.700246 | from setuptools import setup
setup(name='venv_easy',
version='0.1',
description='Easily automating virtual environment creation and implementation from within your Python3 Application.',
url='https://github.com/AndrewNeudegg/venv_easy',
author='Andrew Neudegg',
author_email='andrew.neudeg... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b88fbf20f099cd9f458df95f8945e34d05663335 | 4,917 | py | Python | convfeatures.py | farman1855/image-caption-generator | 6c588f63517deaf0174e7a144af132b5b1f88d4d | [
"BSD-3-Clause"
] | null | null | null | convfeatures.py | farman1855/image-caption-generator | 6c588f63517deaf0174e7a144af132b5b1f88d4d | [
"BSD-3-Clause"
] | null | null | null | convfeatures.py | farman1855/image-caption-generator | 6c588f63517deaf0174e7a144af132b5b1f88d4d | [
"BSD-3-Clause"
] | null | null | null | import tensorflow as tf
import numpy as np
import os
batch_size = 10
img_path = "/gpfs/fs01/user/s076-844c78348e985f-04662317cedd/notebook/work/Dataset/flickr30k-images/"
try:
files = sorted(np.array(os.listdir("/gpfs/fs01/user/s076-844c78348e985f-04662317cedd/notebook/work/Dataset/flickr30k-images/")))
n_batc... | 35.121429 | 163 | 0.624364 | import tensorflow as tf
import numpy as np
import os
batch_size = 10
img_path = "/gpfs/fs01/user/s076-844c78348e985f-04662317cedd/notebook/work/Dataset/flickr30k-images/"
try:
files = sorted(np.array(os.listdir("/gpfs/fs01/user/s076-844c78348e985f-04662317cedd/notebook/work/Dataset/flickr30k-images/")))
n_batc... | 0 | 0 | 0 | 0 | 293 | 2,616 | 0 | 0 | 115 |
b9901ed31e3c9a90a66ffa942c100d4ed8142876 | 1,061 | py | Python | Flask/calculadora_dano/app.py | paulohenriquegama/Modulo2-BD_Cloud | 7aece9286dd985c97d797bd01f5e30da5147d353 | [
"MIT"
] | null | null | null | Flask/calculadora_dano/app.py | paulohenriquegama/Modulo2-BD_Cloud | 7aece9286dd985c97d797bd01f5e30da5147d353 | [
"MIT"
] | null | null | null | Flask/calculadora_dano/app.py | paulohenriquegama/Modulo2-BD_Cloud | 7aece9286dd985c97d797bd01f5e30da5147d353 | [
"MIT"
] | null | null | null | from flask import Flask
app = Flask(__name__)
if __name__ == "__main__":
app.run(debug=True)
| 25.261905 | 99 | 0.683318 | from flask import Flask,render_template
app = Flask(__name__)
@app.route("/")
def home():
name = "Bases Sonic"
hp = 2000
status_img = True
img_orc = "https://thumbs.gfycat.com/AmbitiousSarcasticBandicoot-size_restricted.gif"
img_goblin = "https://i.pinimg.com/originals/f6/e7/71/f6e771decdab671290... | 0 | 880 | 0 | 0 | 0 | 0 | 0 | 16 | 46 |
54d439733e009fe2915e100ff4343a47cdde739f | 4,665 | py | Python | SchemDraw/custom_elements.py | feschmidt/SchemDraw | a519ba1800e80c5c1931e2c52a0f18c21f19e411 | [
"MIT"
] | null | null | null | SchemDraw/custom_elements.py | feschmidt/SchemDraw | a519ba1800e80c5c1931e2c52a0f18c21f19e411 | [
"MIT"
] | 4 | 2019-06-11T12:53:32.000Z | 2019-06-11T12:54:16.000Z | SchemDraw/custom_elements.py | feschmidt/SchemDraw | a519ba1800e80c5c1931e2c52a0f18c21f19e411 | [
"MIT"
] | 1 | 2019-11-04T15:53:03.000Z | 2019-11-04T15:53:03.000Z | """
This file contains custom elements defined by Adriaan Rol and Felix Schmidt
The intention is that these get merged into SchemDraw.elements after cleaning
up so as to merge them into the master of CDelker
"""
import numpy as np
import SchemDraw.elements as e
# TODO: SQUID
# TODO: SQUID with flux bias line
# TODO: S... | 27.280702 | 183 | 0.435584 | """
This file contains custom elements defined by Adriaan Rol and Felix Schmidt
The intention is that these get merged into SchemDraw.elements after cleaning
up so as to merge them into the master of CDelker
"""
import numpy as np
import SchemDraw.elements as e
# TODO: SQUID
# TODO: SQUID with flux bias line
# TODO: S... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6fc43089d3bca084f49bce2c594654040b3ce52b | 691 | py | Python | qmsolve/util/constants.py | lukepolson/qmsolve | 373dbc6349509984139a59746acb140b48414fdf | [
"BSD-3-Clause"
] | 1 | 2022-02-09T19:23:08.000Z | 2022-02-09T19:23:08.000Z | qmsolve/util/constants.py | lukepolson/qmsolve | 373dbc6349509984139a59746acb140b48414fdf | [
"BSD-3-Clause"
] | null | null | null | qmsolve/util/constants.py | lukepolson/qmsolve | 373dbc6349509984139a59746acb140b48414fdf | [
"BSD-3-Clause"
] | null | null | null | # conversion constants to atomic units
hbar = 1.0
m_e = 1.0
a_0 = 1.0
e = 1.0
hartree = 1.0
Eh = hartree
nm = 1.8897261246257702e1
= 1.8897261246257702
eV = 0.03674932217565499
ps = 4.134137333518212e4
fs = 4.134137333518212
V = 0.03674932217565499
V_m = 1.9446903811488876e-12
T = 4.254382157326325e-06
m = 1.8897261... | 19.742857 | 52 | 0.746744 | # conversion constants to atomic units
hbar = 1.0
m_e = 1.0
a_0 = 1.0
e = 1.0
hartree = 1.0
Eh = hartree
nm = 1.8897261246257702e1
Å = 1.8897261246257702
eV = 0.03674932217565499
ps = 4.134137333518212e4
fs = 4.134137333518212
V = 0.03674932217565499
V_m = 1.9446903811488876e-12
T = 4.254382157326325e-06
m = 1.889726... | 10 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
867e97553957a4675c5eb56a4809e516a174d4ec | 8,798 | py | Python | jans-pycloudlib/jans/pycloudlib/pki.py | duttarnab/jans | b4ae02f9cb60433a44a2b889268525532d82a247 | [
"Apache-2.0"
] | null | null | null | jans-pycloudlib/jans/pycloudlib/pki.py | duttarnab/jans | b4ae02f9cb60433a44a2b889268525532d82a247 | [
"Apache-2.0"
] | 33 | 2020-10-12T09:42:36.000Z | 2021-11-23T11:39:15.000Z | jans-pycloudlib/jans/pycloudlib/pki.py | duttarnab/jans | b4ae02f9cb60433a44a2b889268525532d82a247 | [
"Apache-2.0"
] | 3 | 2020-11-16T09:45:42.000Z | 2021-02-16T13:04:57.000Z | """
jans.pycloudlib.pki
~~~~~~~~~~~~~~~~~~~
This module contains various Public Key Infrastucture (PKI) helpers.
"""
import os
from datetime import datetime
from datetime import timedelta
from ipaddress import IPv4Address
from cryptography.hazmat.backends import default_backend
from cryptography import x509
from cry... | 33.075188 | 106 | 0.636736 | """
jans.pycloudlib.pki
~~~~~~~~~~~~~~~~~~~
This module contains various Public Key Infrastucture (PKI) helpers.
"""
import os
from datetime import datetime
from datetime import timedelta
from ipaddress import IPv4Address
from cryptography.hazmat.backends import default_backend
from cryptography import x509
from cry... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
98335a151c6fec5f0726c0ba574f4fa5169df0f7 | 396 | py | Python | django/conf/project_template/urls.py | rawwell/django | 6b3264671ead4604f26cbd2b71e8d6a02945bf0c | [
"BSD-3-Clause"
] | 1 | 2016-05-08T12:24:22.000Z | 2016-05-08T12:24:22.000Z | django/conf/project_template/urls.py | rawwell/django | 6b3264671ead4604f26cbd2b71e8d6a02945bf0c | [
"BSD-3-Clause"
] | null | null | null | django/conf/project_template/urls.py | rawwell/django | 6b3264671ead4604f26cbd2b71e8d6a02945bf0c | [
"BSD-3-Clause"
] | 1 | 2015-11-19T14:45:16.000Z | 2015-11-19T14:45:16.000Z |
# Uncomment this for admin:
#from django.contrib import admin
urlpatterns = patterns('',
# Example:
# (r'^{{ project_name }}/', include('{{ project_name }}.foo.urls')),
# Uncomment this for admin docs:
#(r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment this for admin:
#... | 24.75 | 72 | 0.636364 | from django.conf.urls.defaults import *
# Uncomment this for admin:
#from django.contrib import admin
urlpatterns = patterns('',
# Example:
# (r'^{{ project_name }}/', include('{{ project_name }}.foo.urls')),
# Uncomment this for admin docs:
#(r'^admin/doc/', include('django.contrib.admindocs.urls'))... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 22 |
9df60980838b90cb08407937c8f4c95c8051468c | 273 | py | Python | deep_translator/configs.py | gleidsonh/deep-translator | f7b64fd0296641e0301800862889871bab57817c | [
"MIT"
] | 6 | 2021-03-27T11:50:33.000Z | 2021-08-09T05:42:08.000Z | deep_translator/configs.py | gleidsonh/deep-translator | f7b64fd0296641e0301800862889871bab57817c | [
"MIT"
] | 1 | 2021-08-18T08:57:18.000Z | 2021-08-18T08:57:18.000Z | deep_translator/configs.py | gleidsonh/deep-translator | f7b64fd0296641e0301800862889871bab57817c | [
"MIT"
] | 2 | 2021-08-29T14:44:31.000Z | 2022-01-26T06:50:31.000Z | """
configuration object that holds data about the language detection api
"""
config = {
"url": 'https://ws.detectlanguage.com/0.2/detect',
"headers": {
'User-Agent': 'Detect Language API Python Client 1.4.0',
'Authorization': 'Bearer {}',
}
}
| 22.75 | 69 | 0.615385 | """
configuration object that holds data about the language detection api
"""
config = {
"url": 'https://ws.detectlanguage.com/0.2/detect',
"headers": {
'User-Agent': 'Detect Language API Python Client 1.4.0',
'Authorization': 'Bearer {}',
}
}
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a46eb71628dda10a1e803339b6b018d98659c363 | 84,882 | py | Python | cube_builder_aws/cube_builder_aws/maestro.py | brazil-data-cube/bdc-scripts-aws | a4ebdba081621e3c2a19cd18c3e0546596c08e12 | [
"MIT"
] | 5 | 2020-02-06T13:52:44.000Z | 2021-07-10T14:59:07.000Z | cube_builder_aws/cube_builder_aws/maestro.py | brazil-data-cube/bdc-scripts-aws | a4ebdba081621e3c2a19cd18c3e0546596c08e12 | [
"MIT"
] | 82 | 2020-02-06T19:08:13.000Z | 2022-03-03T19:36:24.000Z | cube_builder_aws/cube_builder_aws/maestro.py | brazil-data-cube/bdc-scripts-aws | a4ebdba081621e3c2a19cd18c3e0546596c08e12 | [
"MIT"
] | 4 | 2020-02-07T15:08:19.000Z | 2021-02-07T01:06:11.000Z | #
# This file is part of Python Module for Cube Builder AWS.
# Copyright (C) 2019-2021 INPE.
#
# Cube Builder AWS is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
#
###############################
# HARMONIZATION
###################... | 44.698262 | 149 | 0.573172 | #
# This file is part of Python Module for Cube Builder AWS.
# Copyright (C) 2019-2021 INPE.
#
# Cube Builder AWS is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
#
import json
import os
import re
import shutil
from copy import deepcopy... | 0 | 0 | 0 | 0 | 0 | 82,655 | 0 | 763 | 828 |
4cf82b95d002df267c54e9dc8dbeaad8fbb88748 | 19,109 | py | Python | com/precisely/apis/model/school.py | PreciselyData/PreciselyAPIsSDK-Python | 28ffff0c96d81d3a53a5599c987d54d7b632b508 | [
"Apache-2.0"
] | null | null | null | com/precisely/apis/model/school.py | PreciselyData/PreciselyAPIsSDK-Python | 28ffff0c96d81d3a53a5599c987d54d7b632b508 | [
"Apache-2.0"
] | null | null | null | com/precisely/apis/model/school.py | PreciselyData/PreciselyAPIsSDK-Python | 28ffff0c96d81d3a53a5599c987d54d7b632b508 | [
"Apache-2.0"
] | null | null | null | """
Precisely APIs
Enhance & enrich your data, applications, business processes, and workflows with rich location, information, and identify APIs. # noqa: E501
The version of the OpenAPI document: 11.9.3
Generated by: https://openapi-generator.tech
"""
| 47.299505 | 145 | 0.56879 | """
Precisely APIs
Enhance & enrich your data, applications, business processes, and workflows with rich location, information, and identify APIs. # noqa: E501
The version of the OpenAPI document: 11.9.3
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F4... | 0 | 14,105 | 0 | 3,368 | 0 | 882 | 0 | 315 | 164 |
a4dbb92467da68cbb1e79c14f8fb748f010aceb0 | 113 | py | Python | mitdeeplearning/__init__.py | gcfc/introtodeeplearning | b47b452b44b762c1a7892db1d075af39992d0d20 | [
"MIT"
] | 4,279 | 2020-01-27T17:41:27.000Z | 2022-03-31T22:20:11.000Z | mitdeeplearning/__init__.py | gcfc/introtodeeplearning | b47b452b44b762c1a7892db1d075af39992d0d20 | [
"MIT"
] | 59 | 2020-01-25T02:33:45.000Z | 2022-03-26T16:22:40.000Z | mitdeeplearning/__init__.py | gcfc/introtodeeplearning | b47b452b44b762c1a7892db1d075af39992d0d20 | [
"MIT"
] | 2,150 | 2020-01-27T18:15:56.000Z | 2022-03-31T20:16:11.000Z | import mitdeeplearning.util
import mitdeeplearning.lab1
import mitdeeplearning.lab2
| 18.833333 | 27 | 0.884956 | import mitdeeplearning.util
import mitdeeplearning.lab1
import mitdeeplearning.lab2
import mitdeeplearning.lab3
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 22 |
d0adb690407b70153b236d3f4a5bb14e88bc8793 | 904 | py | Python | {{ cookiecutter.repo_name }}/setup.py | jakebrinkmann/waldo-jakebrinkmann | a625bff7ba9a3319968f7512d8bfa05408737dcf | [
"MIT"
] | null | null | null | {{ cookiecutter.repo_name }}/setup.py | jakebrinkmann/waldo-jakebrinkmann | a625bff7ba9a3319968f7512d8bfa05408737dcf | [
"MIT"
] | null | null | null | {{ cookiecutter.repo_name }}/setup.py | jakebrinkmann/waldo-jakebrinkmann | a625bff7ba9a3319968f7512d8bfa05408737dcf | [
"MIT"
] | null | null | null | """A setuptools based setup module."""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# Extract the tag from the system
from subimage import __version__
# Get the long description from the README file
with open("README.md", encoding="utf-8") as f:
long_description = f.read(... | 33.481481 | 81 | 0.747788 | """A setuptools based setup module."""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
from os import path
# Extract the tag from the system
from subimage import __version__
# Get the long description from the README file
with open("README.md", encoding="utf-8") as f:
long_d... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -2 | 22 |
a4a6a00f909148b8031c34bf35bd3f1d07ac4bc5 | 23,286 | py | Python | tools/compare_h5.py | MapsPy/MapsPy | 385eb739dc3f4132d2db5020fccc6a29c15f3583 | [
"BSD-2-Clause"
] | 7 | 2016-05-30T12:40:52.000Z | 2022-01-20T23:59:01.000Z | tools/compare_h5.py | MapsPy/MapsPy | 385eb739dc3f4132d2db5020fccc6a29c15f3583 | [
"BSD-2-Clause"
] | null | null | null | tools/compare_h5.py | MapsPy/MapsPy | 385eb739dc3f4132d2db5020fccc6a29c15f3583 | [
"BSD-2-Clause"
] | 3 | 2019-11-16T06:49:54.000Z | 2021-11-17T16:24:07.000Z | '''
Created on Jan 11, 2012
@author: Mirna Lerotic, 2nd Look Consulting
http://www.2ndlookconsulting.com/
Copyright (c) 2013, Stefan Vogt, Argonne National Laboratory
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided th... | 38.681063 | 231 | 0.605256 | '''
Created on Jan 11, 2012
@author: Mirna Lerotic, 2nd Look Consulting
http://www.2ndlookconsulting.com/
Copyright (c) 2013, Stefan Vogt, Argonne National Laboratory
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided th... | 0 | 0 | 0 | 0 | 0 | 20,960 | 0 | -37 | 215 |
185353c6f0ce60b71cdc37ad5edfbd9d758415a1 | 5,483 | py | Python | lte/gateway/python/integ_tests/s1aptests/test_ipv4v6_secondary_pdn_multi_ue.py | saurabhsoni88/magma | 4236c9d8edb7bd203707ff7e861b1f7c12fb84c7 | [
"BSD-3-Clause"
] | 1 | 2021-08-04T16:40:05.000Z | 2021-08-04T16:40:05.000Z | lte/gateway/python/integ_tests/s1aptests/test_ipv4v6_secondary_pdn_multi_ue.py | saurabhsoni88/magma | 4236c9d8edb7bd203707ff7e861b1f7c12fb84c7 | [
"BSD-3-Clause"
] | 151 | 2020-09-03T20:44:13.000Z | 2022-03-31T20:28:52.000Z | lte/gateway/python/integ_tests/s1aptests/test_ipv4v6_secondary_pdn_multi_ue.py | kkahrs/magma | 73e666627dc28e0c492feab7321bb7d6dd433b09 | [
"BSD-3-Clause"
] | 2 | 2021-05-27T18:15:16.000Z | 2021-05-27T18:41:39.000Z | """
Copyright (c) 2016-present, Facebook, Inc.
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. An additional grant
of patent rights can be found in the PATENTS file in the same directory.
"""
import unittest
if __name... | 34.055901 | 79 | 0.537115 | """
Copyright (c) 2016-present, Facebook, Inc.
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. An additional grant
of patent rights can be found in the PATENTS file in the same directory.
"""
import unittest
import time
... | 0 | 0 | 0 | 5,034 | 0 | 0 | 0 | -21 | 112 |
8b4af53bce689afa0363ecca7bb2e6fb715bddb6 | 269 | py | Python | Class-Example/CLASSES_IN_PYTHON_4.py | emehrawn/Python-Codes | a7093fa51a544149ebea74100cbbdb27f3687cbc | [
"MIT"
] | null | null | null | Class-Example/CLASSES_IN_PYTHON_4.py | emehrawn/Python-Codes | a7093fa51a544149ebea74100cbbdb27f3687cbc | [
"MIT"
] | null | null | null | Class-Example/CLASSES_IN_PYTHON_4.py | emehrawn/Python-Codes | a7093fa51a544149ebea74100cbbdb27f3687cbc | [
"MIT"
] | null | null | null |
# Output: 10
print(MyClass.a)
# Output: <function MyClass.func at 0x0000000003079BF8>
print(MyClass.func.self)
# Output: 'This is my second class'
print(MyClass.__doc__) | 19.214286 | 56 | 0.687732 | class MyClass:
"This is my second class"
a = 10
def func(self):
print('Hello')
# Output: 10
print(MyClass.a)
# Output: <function MyClass.func at 0x0000000003079BF8>
print(MyClass.func.self)
# Output: 'This is my second class'
print(MyClass.__doc__) | 0 | 0 | 0 | 66 | 0 | 0 | 0 | 0 | 23 |
015c5c54420abbac70b1e286c2466a00aeb255e3 | 4,278 | py | Python | rollover/utils/setup_material_mod.py | KnutAM/AbaqusRolloverSimulation | 8ff361bbcf8a24afa1f3f88a6169b3984303fcfb | [
"MIT"
] | 2 | 2021-04-25T09:39:47.000Z | 2021-08-17T01:18:14.000Z | rollover/utils/setup_material_mod.py | KnutAM/AbaqusRolloverSimulation | 8ff361bbcf8a24afa1f3f88a6169b3984303fcfb | [
"MIT"
] | 3 | 2021-06-28T14:33:26.000Z | 2021-06-30T09:31:52.000Z | rollover/utils/setup_material_mod.py | KnutAM/AbaqusRolloverSimulation | 8ff361bbcf8a24afa1f3f88a6169b3984303fcfb | [
"MIT"
] | null | null | null | """This module contains functions that sets up material models
.. codeauthor:: Knut Andreas Meyer
"""
# Abaqus imports
def add_material(the_model, material_spec, name):
"""Add a material to the_model according to material_spec with name=name.
:param the_model: The model to which the sketch will be added... | 35.065574 | 100 | 0.570594 | """This module contains functions that sets up material models
.. codeauthor:: Knut Andreas Meyer
"""
# Abaqus imports
from abaqusConstants import *
import material
def add_material(the_model, material_spec, name):
"""Add a material to the_model according to material_spec with name=name.
:param the_mode... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 44 |
656de3b027d215e0e00fc2df177b0a24d1bb19bd | 5,104 | py | Python | ml/rl/models/dueling_quantile_dqn.py | joshrose/Horizon | a2eb407b31a16560ae78aa6751eb83672a122a7e | [
"BSD-3-Clause"
] | 2 | 2021-01-11T18:16:32.000Z | 2021-11-30T09:34:58.000Z | ml/rl/models/dueling_quantile_dqn.py | joshrose/Horizon | a2eb407b31a16560ae78aa6751eb83672a122a7e | [
"BSD-3-Clause"
] | null | null | null | ml/rl/models/dueling_quantile_dqn.py | joshrose/Horizon | a2eb407b31a16560ae78aa6751eb83672a122a7e | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
import logging
import torch.nn as nn
import torch.nn.init as init
logger = logging.getLogger(__name__)
| 38.37594 | 88 | 0.591889 | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
import logging
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.init as init
from ml.rl import types as rlt
from ml.rl.models.base import ModelBase
from ml.rl.models.fully_connected_network... | 0 | 0 | 0 | 4,640 | 0 | 0 | 0 | 106 | 156 |
fc52d65196bbbf545de8f5f45d9b72097487a46d | 850 | py | Python | tests/test_webservice.py | chrislim2888/IP2Location-Python | 2909e1f1159b276b05bfdca38aa7eeb48d9d1785 | [
"MIT"
] | 90 | 2015-01-21T01:15:56.000Z | 2022-02-25T05:12:16.000Z | tests/test_webservice.py | Guantum/IP2Location-Python | dfa5710cd527ddbd446bbd2206242de6c62758fc | [
"MIT"
] | 17 | 2015-11-09T12:48:44.000Z | 2022-03-21T00:29:00.000Z | tests/test_webservice.py | Guantum/IP2Location-Python | dfa5710cd527ddbd446bbd2206242de6c62758fc | [
"MIT"
] | 36 | 2016-01-12T11:33:56.000Z | 2021-10-02T12:34:39.000Z | # -*- coding: utf-8 -*-
import IP2Location
apikey = "demo"
package = "WS24"
usessl = True
addons = ["continent", "country", "region", "city", "geotargeting", "country_groupings", "time_zone_info"]
language = "en"
ws = IP2Location.IP2LocationWebService(apikey,package,usessl) | 31.481481 | 106 | 0.692941 | # -*- coding: utf-8 -*-
import pytest
import IP2Location
apikey = "demo"
package = "WS24"
usessl = True
addons = ["continent", "country", "region", "city", "geotargeting", "country_groupings", "time_zone_info"]
language = "en"
ws = IP2Location.IP2LocationWebService(apikey,package,usessl)
def testcountrycode():
... | 0 | 0 | 0 | 0 | 0 | 489 | 0 | -8 | 92 |
5bd946317d4648cb5596d25a6faf44ad4684dc17 | 1,346 | py | Python | lessons/5_graphql/tutorial2/tutorial2/schema.py | OmarThinks/django-cheat-sheet | dd8ca772301c443aa6c8a0845e9b10c182a00efa | [
"MIT"
] | null | null | null | lessons/5_graphql/tutorial2/tutorial2/schema.py | OmarThinks/django-cheat-sheet | dd8ca772301c443aa6c8a0845e9b10c182a00efa | [
"MIT"
] | null | null | null | lessons/5_graphql/tutorial2/tutorial2/schema.py | OmarThinks/django-cheat-sheet | dd8ca772301c443aa6c8a0845e9b10c182a00efa | [
"MIT"
] | null | null | null | import graphene
# cookbook/schema.py
schema = graphene.Schema(query=MainQuery)
| 22.065574 | 66 | 0.701337 | import graphene
class HelloQuery(graphene.ObjectType):
hello = graphene.String(default_value="Hi!")
# cookbook/schema.py
from graphene_django import DjangoObjectType
from ingredients.models import Category, Ingredient
class CategoryType(DjangoObjectType):
class Meta:
model = Category
fiel... | 0 | 0 | 0 | 1,035 | 0 | 0 | 0 | 53 | 160 |
620fa2166f2a6a4f909ee18e4f52dc417f4ac3e9 | 2,620 | py | Python | kirby/api/__init__.py | minh-adimian/kirby | 04e44d339e3e232f33325430725bceda5e74cd19 | [
"MIT"
] | 6 | 2019-05-06T12:57:43.000Z | 2021-07-17T03:11:21.000Z | kirby/api/__init__.py | nicksjl-adimian/kirby | b39f1f24412020392ffc3f63086130d9f6aa6260 | [
"MIT"
] | 42 | 2019-05-02T21:01:21.000Z | 2020-02-08T21:37:33.000Z | kirby/api/__init__.py | nicksjl-adimian/kirby | b39f1f24412020392ffc3f63086130d9f6aa6260 | [
"MIT"
] | 4 | 2019-07-06T08:26:07.000Z | 2019-09-30T09:44:29.000Z | import logging
logger = logging.getLogger(__name__)
| 32.345679 | 79 | 0.574427 | import logging
import requests
from urllib.parse import urljoin
from .context import ContextManager, ctx
logger = logging.getLogger(__name__)
class ServerError(BaseException):
pass
class ClientError(BaseException):
pass
class Kirby:
def __init__(self, env_signature, session=None, testing=False):
... | 0 | 0 | 0 | 2,404 | 0 | 0 | 0 | 24 | 136 |
60ea6bf3031e3871e14e3ccf97e640378f27fc4f | 3,181 | py | Python | desktop/core/ext-py/django-extensions-1.8.0/django_extensions/management/utils.py | kokosing/hue | 2307f5379a35aae9be871e836432e6f45138b3d9 | [
"Apache-2.0"
] | 5,079 | 2015-01-01T03:39:46.000Z | 2022-03-31T07:38:22.000Z | desktop/core/ext-py/django-extensions-1.8.0/django_extensions/management/utils.py | zks888/hue | 93a8c370713e70b216c428caa2f75185ef809deb | [
"Apache-2.0"
] | 1,623 | 2015-01-01T08:06:24.000Z | 2022-03-30T19:48:52.000Z | desktop/core/ext-py/django-extensions-1.8.0/django_extensions/management/utils.py | zks888/hue | 93a8c370713e70b216c428caa2f75185ef809deb | [
"Apache-2.0"
] | 2,033 | 2015-01-04T07:18:02.000Z | 2022-03-28T19:55:47.000Z | # -*- coding: utf-8 -*-
import logging
import os
import sys
def _make_writeable(filename):
"""
Make sure that the file is writeable. Useful if our source is
read-only.
"""
import stat
if sys.platform.startswith('java'):
# On Jython there is no os.access()
return
if not os.... | 30.883495 | 101 | 0.643823 | # -*- coding: utf-8 -*-
import logging
import os
import sys
import csv
import codecs
from io import BytesIO
from django_extensions.management.signals import post_command, pre_command
def _make_writeable(filename):
"""
Make sure that the file is writeable. Useful if our source is
read-only.
"""
... | 0 | 0 | 0 | 1,312 | 0 | 348 | 0 | 35 | 185 |
9dfd95abb89818016037986c94ae84c7715be624 | 429 | py | Python | src/super_debug.py | saintic/Breezes | 3a5cb68afb9d5bfeccd30b813ca8afeb9dae6efd | [
"MIT"
] | 9 | 2017-02-06T06:41:04.000Z | 2019-02-21T15:42:28.000Z | src/super_debug.py | saintic/Breezes | 3a5cb68afb9d5bfeccd30b813ca8afeb9dae6efd | [
"MIT"
] | null | null | null | src/super_debug.py | saintic/Breezes | 3a5cb68afb9d5bfeccd30b813ca8afeb9dae6efd | [
"MIT"
] | 7 | 2017-02-08T07:30:13.000Z | 2022-01-18T01:39:23.000Z | # -*- coding:utf8 -*-
# Performance optimization model(Maybe Only Linux)
if __name__ == "__main__":
from main import app
from werkzeug.contrib.profiler import ProfilerMiddleware
from config import GLOBAL
Host = GLOBAL.get('Host')
Port = GLOBAL.get('Port')
app.config['PROFILE'] = True
app.ws... | 33 | 72 | 0.69697 | # -*- coding:utf8 -*-
# Performance optimization model(Maybe Only Linux)
if __name__ == "__main__":
from main import app
from werkzeug.contrib.profiler import ProfilerMiddleware
from config import GLOBAL
Host = GLOBAL.get('Host')
Port = GLOBAL.get('Port')
app.config['PROFILE'] = True
app.ws... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
cfefec15c85c8a9d2983143701e5d608f5578811 | 975 | py | Python | bot/color.py | CeroProgramming/NextBot | 8aece75604273feee4c6e3d97495bb5d5bd12cf2 | [
"MIT"
] | 1 | 2018-07-04T22:40:54.000Z | 2018-07-04T22:40:54.000Z | bot/color.py | CeroProgramming/NextBot | 8aece75604273feee4c6e3d97495bb5d5bd12cf2 | [
"MIT"
] | null | null | null | bot/color.py | CeroProgramming/NextBot | 8aece75604273feee4c6e3d97495bb5d5bd12cf2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
| 14.772727 | 23 | 0.552821 | # -*- coding: utf-8 -*-
class Color:
def __init__(self):
pass
def teal():
return 0x1abc9c
def dark_teal():
return 0x11806a
def green():
return 0x2ecc71
def dark_green():
return 0x1f8b4c
def blue():
return 0x3498db
def dark_blue():
... | 0 | 0 | 0 | 929 | 0 | 0 | 0 | 0 | 22 |
73c0c1aad835cabc83fff0734c74149d6eadf77e | 728 | py | Python | app/models.py | anilkumarggk/cab_auto_queuing | b3abbde0890f7c0bac64adaa10b95169cdc75095 | [
"MIT"
] | null | null | null | app/models.py | anilkumarggk/cab_auto_queuing | b3abbde0890f7c0bac64adaa10b95169cdc75095 | [
"MIT"
] | null | null | null | app/models.py | anilkumarggk/cab_auto_queuing | b3abbde0890f7c0bac64adaa10b95169cdc75095 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
# Create your models here.
RIDE_STATUS_CHOICES = (
('waiting', 'Waiting'),
('ongoing', 'Ongoing'),
('complete', 'Complete')
)
AVAILABLE_DRIVER_CHOICES = (
(1, 'Driver 1'),
(2, 'Driver 2'),
(3, 'Driver 3'),
(4, 'Driver 4'),
(5, 'Driver 5')
)
| 26.962963 | 96 | 0.693681 | from __future__ import unicode_literals
from django.db import models
# Create your models here.
RIDE_STATUS_CHOICES = (
('waiting', 'Waiting'),
('ongoing', 'Ongoing'),
('complete', 'Complete')
)
AVAILABLE_DRIVER_CHOICES = (
(1, 'Driver 1'),
(2, 'Driver 2'),
(3, 'Driver 3'),
(4, 'Driver 4'... | 0 | 0 | 0 | 359 | 0 | 0 | 0 | 7 | 46 |
88a6ebc93ea8f659cb42a0e10d96e07cfbb0c0f7 | 14,540 | py | Python | hardware/ip/nt_gen_replay/test/nt_gen_replay_top_test.py | aoeldemann/fluent10g | 78d87b594eacc9d208722c15846f1e3ec67b20ff | [
"MIT"
] | 20 | 2018-07-09T14:24:11.000Z | 2021-12-07T16:09:03.000Z | hardware/ip/nt_gen_replay/test/nt_gen_replay_top_test.py | aoeldemann/fluent10g | 78d87b594eacc9d208722c15846f1e3ec67b20ff | [
"MIT"
] | 4 | 2020-08-13T13:32:23.000Z | 2022-01-15T17:16:10.000Z | hardware/ip/nt_gen_replay/test/nt_gen_replay_top_test.py | aoeldemann/fluent10g | 78d87b594eacc9d208722c15846f1e3ec67b20ff | [
"MIT"
] | 4 | 2018-12-19T10:54:48.000Z | 2022-02-09T16:12:34.000Z | """Test bench for the Verilog module 'nt_gen_replay_top'."""
# The MIT License
#
# Copyright (c) 2017-2019 by the author(s)
#
# 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 restricti... | 37.474227 | 79 | 0.649243 | """Test bench for the Verilog module 'nt_gen_replay_top'."""
# The MIT License
#
# Copyright (c) 2017-2019 by the author(s)
#
# 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 restricti... | 0 | 12,083 | 0 | 0 | 0 | 0 | 0 | 155 | 312 |
f759ea7c2b2f5fa3eccc1e9b741410287de6529c | 48 | py | Python | dataExtract/__init__.py | dshadowwolf/pdf-data-extractor | 754a00649873ec43399f227858b6d9ddb2b32666 | [
"MIT"
] | null | null | null | dataExtract/__init__.py | dshadowwolf/pdf-data-extractor | 754a00649873ec43399f227858b6d9ddb2b32666 | [
"MIT"
] | null | null | null | dataExtract/__init__.py | dshadowwolf/pdf-data-extractor | 754a00649873ec43399f227858b6d9ddb2b32666 | [
"MIT"
] | null | null | null | __all__ = ["Deskew", "YAMLBits", "ImageUtils"]
| 16 | 46 | 0.645833 | __all__ = ["Deskew", "YAMLBits", "ImageUtils"]
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d51a3e8b7e251050ecd8235bb18dc9a527dfd0c7 | 5,574 | py | Python | models/text2text/encoder.py | aasseman/mi-prometheus | c655c88cc6aec4d0724c19ea95209f1c2dd6770d | [
"Apache-2.0"
] | null | null | null | models/text2text/encoder.py | aasseman/mi-prometheus | c655c88cc6aec4d0724c19ea95209f1c2dd6770d | [
"Apache-2.0"
] | null | null | null | models/text2text/encoder.py | aasseman/mi-prometheus | c655c88cc6aec4d0724c19ea95209f1c2dd6770d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# The MIT License (MIT)
#
# Copyright (c) 2017 Sean Robertson
#
# 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... | 41.909774 | 182 | 0.685863 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# The MIT License (MIT)
#
# Copyright (c) 2017 Sean Robertson
#
# 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... | 0 | 0 | 0 | 3,361 | 0 | 0 | 0 | 5 | 90 |
391ad88068400c74bef498d909bc5b20de3340bb | 4,566 | py | Python | python/vsi/utils/mesh_utils.py | NoahRJohnson/vsi_common | e19e14bc276b20b9dcfd62e3e38abfd6f3487502 | [
"MIT"
] | null | null | null | python/vsi/utils/mesh_utils.py | NoahRJohnson/vsi_common | e19e14bc276b20b9dcfd62e3e38abfd6f3487502 | [
"MIT"
] | null | null | null | python/vsi/utils/mesh_utils.py | NoahRJohnson/vsi_common | e19e14bc276b20b9dcfd62e3e38abfd6f3487502 | [
"MIT"
] | null | null | null | """ Utility functions related to mesh processing """
import numpy as np
def save_point_cloud_ply(output_fname, pts, colors=None):
""" Save a 3D point cloud in PLY acii format
Parameters
----------
output_fname : str
Filename to save to
pts : array_like
The 3D points. Shape = Nx3
... | 35.952756 | 118 | 0.594393 | """ Utility functions related to mesh processing """
import numpy as np
def save_point_cloud_ply(output_fname, pts, colors=None):
""" Save a 3D point cloud in PLY acii format
Parameters
----------
output_fname : str
Filename to save to
pts : array_like
The 3D points. Shape = Nx3
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2b74c01ca5fcf6f578885db2210be37acd761141 | 922 | py | Python | Python/1897/p1897_1.py | ArvinZJC/LeetCode-Entry2Abandonment | 9f6e6cdaaf212bbd5b1d7eb3c9d2241265b37ddd | [
"MIT"
] | 1 | 2022-02-10T14:05:40.000Z | 2022-02-10T14:05:40.000Z | Python/1897/p1897_1.py | ArvinZJC/LeetCode-Entry2Abandonment | 9f6e6cdaaf212bbd5b1d7eb3c9d2241265b37ddd | [
"MIT"
] | null | null | null | Python/1897/p1897_1.py | ArvinZJC/LeetCode-Entry2Abandonment | 9f6e6cdaaf212bbd5b1d7eb3c9d2241265b37ddd | [
"MIT"
] | null | null | null | """
'''
Description: Problem 1897 (Redistribute Characters to Make All Strings Equal) - Solution 1
Version: 1.0.0.20220322
Author: Arvin Zhao
Date: 2022-03-10 13:58:02
Last Editors: Arvin Zhao
LastEditTime: 2022-03-22 19:36:37
'''
"""
| 30.733333 | 155 | 0.639913 | """
'''
Description: Problem 1897 (Redistribute Characters to Make All Strings Equal) - Solution 1
Version: 1.0.0.20220322
Author: Arvin Zhao
Date: 2022-03-10 13:58:02
Last Editors: Arvin Zhao
LastEditTime: 2022-03-22 19:36:37
'''
"""
from typing import List
class Solution:
def makeEqual(self, words: List[str]) ... | 0 | 0 | 0 | 638 | 0 | 0 | 0 | 2 | 46 |
ad9aa6569b1e592bc8fa6a55acdceec3dcd6a529 | 12,179 | py | Python | python/tests/test.py | midnighteuler/libneoradio2 | 022e22515620d35dd4350a8537db059f97df5bd0 | [
"Unlicense",
"MIT"
] | 3 | 2019-04-30T23:44:56.000Z | 2019-07-15T19:28:38.000Z | python/tests/test.py | midnighteuler/libneoradio2 | 022e22515620d35dd4350a8537db059f97df5bd0 | [
"Unlicense",
"MIT"
] | 12 | 2019-04-29T18:02:45.000Z | 2021-05-18T15:13:20.000Z | python/tests/test.py | midnighteuler/libneoradio2 | 022e22515620d35dd4350a8537db059f97df5bd0 | [
"Unlicense",
"MIT"
] | 4 | 2019-04-28T18:00:01.000Z | 2021-07-09T19:56:41.000Z | import os
try:
print(os.environ['PYTHONPATH'].split(os.pathsep))
finally:
pass
try:
import neoradio2
print(neoradio2.__file__)
except Exception as ex:
input(str(ex))
import time
if __name__ == "__main__":
for device in neoradio2.find():
print("Opening {} {}...".format(device.name, dev... | 38.541139 | 105 | 0.513917 | import os
try:
print(os.environ['PYTHONPATH'].split(os.pathsep))
finally:
pass
try:
import neoradio2
print(neoradio2.__file__)
except Exception as ex:
input(str(ex))
import time
if __name__ == "__main__":
for device in neoradio2.find():
print("Opening {} {}...".format(device.name, dev... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5658fa31da7fd2f117037506dbc7c01b82b27ac2 | 560 | py | Python | wallet/forms.py | Saketh-Chandra/Hotel_Ordering_Application | 373bd0df7c9b7dfcaa0c6d113d511bc7c3ff7ff0 | [
"MIT"
] | null | null | null | wallet/forms.py | Saketh-Chandra/Hotel_Ordering_Application | 373bd0df7c9b7dfcaa0c6d113d511bc7c3ff7ff0 | [
"MIT"
] | 1 | 2021-08-09T09:20:35.000Z | 2021-08-09T09:20:35.000Z | wallet/forms.py | Saketh-Chandra/Hotel_Ordering_Application | 373bd0df7c9b7dfcaa0c6d113d511bc7c3ff7ff0 | [
"MIT"
] | 5 | 2021-03-10T07:34:04.000Z | 2021-03-17T12:18:06.000Z |
# class bill_form(ModelForm):
# class Meta:
# model = bill
# fields = ['name', 'amount', 'email']
| 22.4 | 64 | 0.6625 | from .models import *
from django.forms import ModelForm
from django import forms
from .views import *
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
class reg_form(UserCreationForm):
class Meta:
model = User
fields = ['username', 'email', 'passw... | 0 | 0 | 0 | 190 | 0 | 0 | 0 | 70 | 178 |
cd2fbb5f1d2b2d4d0bd6f298641c1eae76670bdc | 14,618 | py | Python | scripts/deploy_heco.py | shiqinfeng1/alphahomora-bsc | ed0dcce0f4542ad9e88c4eb6de550133bda957b1 | [
"MIT"
] | null | null | null | scripts/deploy_heco.py | shiqinfeng1/alphahomora-bsc | ed0dcce0f4542ad9e88c4eb6de550133bda957b1 | [
"MIT"
] | null | null | null | scripts/deploy_heco.py | shiqinfeng1/alphahomora-bsc | ed0dcce0f4542ad9e88c4eb6de550133bda957b1 | [
"MIT"
] | null | null | null | from brownie import network
# set default gas price
network.gas_price('1 gwei')
| 45.538941 | 267 | 0.60446 | from brownie import accounts, interface, Contract
from brownie import (Bank, SimpleBankConfig, SimplePriceOracle, PancakeswapGoblin,
StrategyAllHTOnly, StrategyLiquidate, StrategyWithdrawMinimizeTrading, StrategyAddTwoSidesOptimal, PancakeswapGoblinConfig, TripleSlopeModel, ConfigurableInterestBank... | 879 | 0 | 0 | 0 | 0 | 13,711 | 0 | 351 | 179 |
fa7919f7d1abfe489fce83a37dc4a51d7d046114 | 4,524 | py | Python | phoenics/ObservationParser/observation_parser.py | Tabor-Research-Group/phoenics | e14a4dfc76035aa434f2962f9db5af7bc76dcf58 | [
"Apache-2.0"
] | 72 | 2018-01-19T21:08:38.000Z | 2022-03-26T08:44:49.000Z | phoenics/ObservationParser/observation_parser.py | Tabor-Research-Group/phoenics | e14a4dfc76035aa434f2962f9db5af7bc76dcf58 | [
"Apache-2.0"
] | 6 | 2018-12-14T02:44:51.000Z | 2022-02-16T08:01:12.000Z | phoenics/ObservationParser/observation_parser.py | Tabor-Research-Group/phoenics | e14a4dfc76035aa434f2962f9db5af7bc76dcf58 | [
"Apache-2.0"
] | 16 | 2018-06-20T11:34:30.000Z | 2022-01-07T17:51:22.000Z | #!/usr/bin/env python
__author__ = 'Florian Hase'
#========================================================================
#========================================================================
#========================================================================
| 32.314286 | 118 | 0.690318 | #!/usr/bin/env python
__author__ = 'Florian Hase'
#========================================================================
import numpy as np
from ObservationParser.hierarchies import HierarchicalLossShaper
from Utils.utils import VarDictParser, ObsDictParser
#====================================================... | 0 | 0 | 0 | 3,996 | 0 | 66 | 0 | 71 | 115 |
330570abc6ef02669c72c7ce7cd690f2443b3b44 | 834 | py | Python | flask/dao.py | MyDevNote/Python-Chat-bot-tcp | bd0c36e33a1cd008b3f7ac448c4824061cbcc543 | [
"MIT"
] | null | null | null | flask/dao.py | MyDevNote/Python-Chat-bot-tcp | bd0c36e33a1cd008b3f7ac448c4824061cbcc543 | [
"MIT"
] | null | null | null | flask/dao.py | MyDevNote/Python-Chat-bot-tcp | bd0c36e33a1cd008b3f7ac448c4824061cbcc543 | [
"MIT"
] | 1 | 2021-03-26T01:21:45.000Z | 2021-03-26T01:21:45.000Z |
SQL_CRIAR_USUARIO = 'INSERT INTO users (name, email, username, password) values (%s, %s, %s, %s)'
SQL_LOGIN_USUARIO = 'SELECT id, name, email, username, password from users where email = %s'
| 30.888889 | 97 | 0.642686 | from models import User
SQL_CRIAR_USUARIO = 'INSERT INTO users (name, email, username, password) values (%s, %s, %s, %s)'
SQL_LOGIN_USUARIO = 'SELECT id, name, email, username, password from users where email = %s'
class UserDao:
def __init__(self, db):
self.__db = db
def criar_usuario(self, user):... | 0 | 0 | 0 | 593 | 0 | 0 | 0 | 2 | 45 |
3cef26de81920073e3e3b47373f457eabffb7c25 | 127 | py | Python | ctgapi/admin.py | prkhrv/CTG-rest-API | 352a55a8d698ef92d8872888bc68a1226d94c1f5 | [
"MIT"
] | null | null | null | ctgapi/admin.py | prkhrv/CTG-rest-API | 352a55a8d698ef92d8872888bc68a1226d94c1f5 | [
"MIT"
] | null | null | null | ctgapi/admin.py | prkhrv/CTG-rest-API | 352a55a8d698ef92d8872888bc68a1226d94c1f5 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import getintouch
# Register your models here.
admin.site.register(getintouch)
| 18.142857 | 32 | 0.811024 | from django.contrib import admin
from .models import getintouch
# Register your models here.
admin.site.register(getintouch)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
304088c1b0d98fbec5255e9b4da8ea53ba42ea9d | 292 | py | Python | graphvl/main.py | verifid/graph-vl | 7062e0e0fa7de3e1ce0598cd7c8f0e74e6355e9e | [
"MIT"
] | 27 | 2020-04-04T12:08:48.000Z | 2021-12-28T23:07:19.000Z | graphvl/main.py | verifid/graph-vl | 7062e0e0fa7de3e1ce0598cd7c8f0e74e6355e9e | [
"MIT"
] | null | null | null | graphvl/main.py | verifid/graph-vl | 7062e0e0fa7de3e1ce0598cd7c8f0e74e6355e9e | [
"MIT"
] | 3 | 2021-01-22T19:03:15.000Z | 2021-07-20T16:11:56.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import graphene
from fastapi import FastAPI
from starlette.graphql import GraphQLApp
from graphvl.schema import Query, Mutation
app = FastAPI()
app.add_route("/", GraphQLApp(schema=graphene.Schema(query=Query, mutation=Mutation)))
| 19.466667 | 86 | 0.756849 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import graphene
from fastapi import FastAPI
from starlette.graphql import GraphQLApp
from graphvl.schema import Query, Mutation
app = FastAPI()
app.add_route("/", GraphQLApp(schema=graphene.Schema(query=Query, mutation=Mutation)))
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | -12 | 23 |
db5b2ba185e4f99605971e025097c407fdc63fe8 | 9,519 | py | Python | python/skytools/__init__.py | zzahti/skytools | 71c0852dfa3fc9021b1821e50b2ba58dde7c27fe | [
"0BSD"
] | 116 | 2015-01-06T17:56:12.000Z | 2021-08-16T06:33:01.000Z | python/skytools/__init__.py | zzahti/skytools | 71c0852dfa3fc9021b1821e50b2ba58dde7c27fe | [
"0BSD"
] | 17 | 2015-02-17T17:50:53.000Z | 2020-01-15T08:05:46.000Z | python/skytools/__init__.py | zzahti/skytools | 71c0852dfa3fc9021b1821e50b2ba58dde7c27fe | [
"0BSD"
] | 51 | 2015-02-18T16:12:13.000Z | 2021-03-07T19:22:58.000Z |
"""Tools for Python database scripts."""
_symbols = {
# skytools.adminscript
'AdminScript': 'skytools.adminscript:AdminScript',
# skytools.config
'Config': 'skytools.config:Config',
# skytools.dbservice
'DBService': 'skytools.dbservice:DBService',
'ServiceContext': 'skytools.dbservice:Serv... | 43.072398 | 71 | 0.720034 |
"""Tools for Python database scripts."""
_symbols = {
# skytools.adminscript
'AdminScript': 'skytools.adminscript:AdminScript',
# skytools.config
'Config': 'skytools.config:Config',
# skytools.dbservice
'DBService': 'skytools.dbservice:DBService',
'ServiceContext': 'skytools.dbservice:Serv... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 211 | 547 |
f748fdc731195e145279701eecbc7fdacc79b82a | 9,994 | py | Python | ml_debiaser/randomized_threshold.py | pedersor/google-research | 6fa751dd261b3f6d918fd2cd35efef5d8bf3eea6 | [
"Apache-2.0"
] | 1 | 2022-03-30T07:14:49.000Z | 2022-03-30T07:14:49.000Z | ml_debiaser/randomized_threshold.py | pedersor/google-research | 6fa751dd261b3f6d918fd2cd35efef5d8bf3eea6 | [
"Apache-2.0"
] | null | null | null | ml_debiaser/randomized_threshold.py | pedersor/google-research | 6fa751dd261b3f6d918fd2cd35efef5d8bf3eea6 | [
"Apache-2.0"
] | 1 | 2022-03-30T07:20:29.000Z | 2022-03-30T07:20:29.000Z | # coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 38.291188 | 80 | 0.655493 | # coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 0 | 0 | 0 | 9,292 | 0 | 0 | 0 | -13 | 69 |
a3c9afd2aa44505e8e4c164fb40a5da1bc3e2612 | 359 | py | Python | det3d/models/readers/__init__.py | stooloveu/Det3D | ac20e98e88c2b0c99ccbe9e7307608d18e87e885 | [
"Apache-2.0"
] | 5 | 2021-01-10T08:14:11.000Z | 2021-06-19T15:01:15.000Z | det3d/models/readers/__init__.py | stooloveu/Det3D | ac20e98e88c2b0c99ccbe9e7307608d18e87e885 | [
"Apache-2.0"
] | null | null | null | det3d/models/readers/__init__.py | stooloveu/Det3D | ac20e98e88c2b0c99ccbe9e7307608d18e87e885 | [
"Apache-2.0"
] | 4 | 2020-11-24T06:31:14.000Z | 2021-06-19T15:01:26.000Z | from .pillar_encoder import PillarFeatureNet, PointPillarsScatter
from .voxel_encoder import SimpleVoxel, VFEV3_ablation, VoxelFeatureExtractorV3
from .feature_normalizer import FeatureNormalizer
__all__ = [
"VoxelFeatureExtractorV3",
"SimpleVoxel",
"PillarFeatureNet",
"PointPillarsScatter",
"VFEV... | 25.642857 | 79 | 0.785515 | from .pillar_encoder import PillarFeatureNet, PointPillarsScatter
from .voxel_encoder import SimpleVoxel, VFEV3_ablation, VoxelFeatureExtractorV3
from .feature_normalizer import FeatureNormalizer
__all__ = [
"VoxelFeatureExtractorV3",
"SimpleVoxel",
"PillarFeatureNet",
"PointPillarsScatter",
"VFEV... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d9d54954a1b0c075f9120088cd8e45eeb3c120ce | 6,476 | py | Python | mission_control/radar.py | QuantumFractal/CPRE288-Mission-Control | b8253cc53ac60d92ca5bd729050981e6f94b7dca | [
"MIT"
] | 1 | 2016-04-09T19:43:51.000Z | 2016-04-09T19:43:51.000Z | mission_control/radar.py | QuantumFractal/CPRE288-Mission-Control | b8253cc53ac60d92ca5bd729050981e6f94b7dca | [
"MIT"
] | null | null | null | mission_control/radar.py | QuantumFractal/CPRE288-Mission-Control | b8253cc53ac60d92ca5bd729050981e6f94b7dca | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""" Object Detection Viewer """
import os
#setup sdl
os.environ["PYSDL2_DLL_PATH"] = "..\env"
| 30.54717 | 114 | 0.553274 | # -*- coding: utf-8 -*-
""" Object Detection Viewer """
import serial, os, copy
import sys
import ctypes
#setup sdl
os.environ["PYSDL2_DLL_PATH"] = "..\env"
from sdl2 import *
from math import sin, cos, radians
import sdl2.ext
import sdl2.sdlgfx as gfx
class Radar():
def __init__(self, renderer, x=200, y=200, ... | 0 | 0 | 0 | 5,692 | 0 | 481 | 0 | 3 | 179 |
d5f538da94b4db3bf792d0275d5dc757aaa94d6a | 1,331 | py | Python | lambda-personalize-events/lambda.py | aGreenPig/amazon-personalize-ingestion-pipeline | 9a3b1b75df42bd5bc8819ad4425dab2c08f80a72 | [
"MIT-0"
] | 8 | 2020-03-16T08:27:56.000Z | 2021-10-31T20:41:11.000Z | lambda-personalize-events/lambda.py | aGreenPig/amazon-personalize-ingestion-pipeline | 9a3b1b75df42bd5bc8819ad4425dab2c08f80a72 | [
"MIT-0"
] | null | null | null | lambda-personalize-events/lambda.py | aGreenPig/amazon-personalize-ingestion-pipeline | 9a3b1b75df42bd5bc8819ad4425dab2c08f80a72 | [
"MIT-0"
] | 4 | 2020-04-16T00:48:13.000Z | 2021-10-31T20:41:05.000Z | # Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
import boto3
import os
trackingId = os.environ['TRACKING_ID']
personalize_events = boto3.client(service_name='personalize-events') | 29.577778 | 79 | 0.613824 | # Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
import base64
import boto3
import os
import json
import time
import uuid
trackingId = os.environ['TRACKING_ID']
personalize_events = boto3.client(service_name='personalize-events')
def lambda_handler(event, co... | 0 | 0 | 0 | 0 | 0 | 995 | 0 | -38 | 135 |
39ede7ec2b9aa07c245c727f10c6c00b3985736c | 2,904 | py | Python | app.py | juliamarc/mal-tier-list-app | 1d05f34c5db0f145b8b7ccb2838652d6beadaaa7 | [
"MIT"
] | null | null | null | app.py | juliamarc/mal-tier-list-app | 1d05f34c5db0f145b8b7ccb2838652d6beadaaa7 | [
"MIT"
] | null | null | null | app.py | juliamarc/mal-tier-list-app | 1d05f34c5db0f145b8b7ccb2838652d6beadaaa7 | [
"MIT"
] | null | null | null | import logging
import sys
import mal_tier_list_bbcode_gen.exceptions as exceptions
from flask import Flask
UPLOAD_FOLDER = '/tmp'
MAX_CONTENT_LENGTH_MB = 4
app = Flask(__name__)
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
app.config['MAX_CONTENT_LENGTH'] = MAX_CONTENT_LENGTH_MB * 1024 * 1024
app.logger.addHandler(l... | 29.333333 | 76 | 0.63843 | import logging
import os
import uuid
import warnings
import sys
import click
import mal_tier_list_bbcode_gen.exceptions as exceptions
from flask import Flask, render_template, request, send_from_directory
from mal_tier_list_bbcode_gen.tierlistgenerator import TierListGenerator
from waitress import serve
from werkzeug... | 0 | 2,102 | 0 | 0 | 0 | 0 | 0 | 98 | 270 |
edd4a6d17f5a83438c8eca0f847646c6dc7db651 | 628 | py | Python | ee/migrations/0008_null_definition_descriptions.py | ld-rale/posthog | 0fa5b18b2e940cf5cdbe8afc733eb7e3cd4ae810 | [
"MIT"
] | null | null | null | ee/migrations/0008_null_definition_descriptions.py | ld-rale/posthog | 0fa5b18b2e940cf5cdbe8afc733eb7e3cd4ae810 | [
"MIT"
] | null | null | null | ee/migrations/0008_null_definition_descriptions.py | ld-rale/posthog | 0fa5b18b2e940cf5cdbe8afc733eb7e3cd4ae810 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.5 on 2022-02-15 20:45
| 26.166667 | 70 | 0.60828 | # Generated by Django 3.2.5 on 2022-02-15 20:45
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("ee", "0007_dashboard_permissions"),
]
operations = [
migrations.AlterField(
model_name="enterpriseeventdefinition",
... | 0 | 0 | 0 | 514 | 0 | 0 | 0 | 19 | 46 |
05538ac7c9c3bbfba09360aa8aa2587490680e56 | 2,147 | py | Python | packaging/setup/plugins/ovirt-engine-setup/ovirt-engine-grafana-dwh/config/database.py | sandrobonazzola/ovirt-dwh | f1c930df2274085eff324d20ddc526860a5d6f75 | [
"Apache-2.0"
] | 5 | 2016-01-23T06:05:16.000Z | 2022-02-05T13:58:47.000Z | packaging/setup/plugins/ovirt-engine-setup/ovirt-engine-grafana-dwh/config/database.py | sandrobonazzola/ovirt-dwh | f1c930df2274085eff324d20ddc526860a5d6f75 | [
"Apache-2.0"
] | 17 | 2022-01-03T16:56:32.000Z | 2022-03-30T12:56:04.000Z | packaging/setup/plugins/ovirt-engine-setup/ovirt-engine-grafana-dwh/config/database.py | sandrobonazzola/ovirt-dwh | f1c930df2274085eff324d20ddc526860a5d6f75 | [
"Apache-2.0"
] | 22 | 2015-01-04T06:28:08.000Z | 2022-02-14T07:42:25.000Z | #
# ovirt-engine-setup -- ovirt engine setup
#
# Copyright oVirt Authors
# SPDX-License-Identifier: Apache-2.0
#
#
"""Grafana Database plugin."""
# vim: expandtab tabstop=4 shiftwidth=4
| 27.883117 | 74 | 0.639497 | #
# ovirt-engine-setup -- ovirt engine setup
#
# Copyright oVirt Authors
# SPDX-License-Identifier: Apache-2.0
#
#
"""Grafana Database plugin."""
import gettext
from otopi import constants as otopicons
from otopi import filetransaction
from otopi import plugin
from otopi import util
from ovirt_engine_setup import... | 0 | 1,410 | 0 | 0 | 0 | 54 | 0 | 221 | 269 |
7d663076df8e27b1cb2f12a24663a7ae615872e8 | 593 | py | Python | majestic-monolith-django/shipping/migrations/0002_alter_shippingbatch_shipping_transport.py | kokospapa8/majestic-monolith-django | a0879989a651ecef6761ee7fce619ab17738bb35 | [
"Apache-2.0"
] | 1 | 2022-03-12T09:55:36.000Z | 2022-03-12T09:55:36.000Z | majestic-monolith-django/shipping/migrations/0002_alter_shippingbatch_shipping_transport.py | kokospapa8/majestic-monolith-django | a0879989a651ecef6761ee7fce619ab17738bb35 | [
"Apache-2.0"
] | 6 | 2022-03-09T10:42:44.000Z | 2022-03-31T08:27:25.000Z | majestic-monolith-django/shipping/migrations/0002_alter_shippingbatch_shipping_transport.py | kokospapa8/majestic-monolith-django | a0879989a651ecef6761ee7fce619ab17738bb35 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.2.4 on 2022-03-18 12:09
| 28.238095 | 114 | 0.629005 | # Generated by Django 3.2.4 on 2022-03-18 12:09
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('shipping', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='shippingbatch',... | 0 | 0 | 0 | 446 | 0 | 0 | 0 | 30 | 68 |
0c4ba9e6d901e4db5be7f29f6b9803b515fc0ebe | 1,221 | py | Python | ML_LinearModelRegression.py | nimitarora/algorithms | 33c8d3517fe7e8d19b10dbe5dccdf9347ee8a56f | [
"MIT"
] | null | null | null | ML_LinearModelRegression.py | nimitarora/algorithms | 33c8d3517fe7e8d19b10dbe5dccdf9347ee8a56f | [
"MIT"
] | null | null | null | ML_LinearModelRegression.py | nimitarora/algorithms | 33c8d3517fe7e8d19b10dbe5dccdf9347ee8a56f | [
"MIT"
] | null | null | null | from sklearn import datasets, linear_model
from sklearn.metrics import mean_squared_error
diabetes = datasets.load_diabetes()
# (['data', 'target', 'frame', 'DESCR', 'feature_names', 'data_filename', 'target_filename'])
# print(diabetes.keys())
# print(diabetes.data)
# print(diabetes.DESCR)
diabetes_x = ... | 29.071429 | 94 | 0.739558 | import matplotlib.pyplot as plt
import numpy as np
from sklearn import datasets, linear_model
from sklearn.metrics import mean_squared_error
diabetes = datasets.load_diabetes()
# (['data', 'target', 'frame', 'DESCR', 'feature_names', 'data_filename', 'target_filename'])
# print(diabetes.keys())
# print(dia... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 46 |
f010d8dec9e126c48b1e233e854488a465e25466 | 4,976 | py | Python | src/notifier/notifier.py | joeyparis/serverless-aws-iam-access-key-auto-rotation | 273478a0efbdc0a9d83ce70f9f5e17d3a6bbdc0f | [
"MIT-0"
] | null | null | null | src/notifier/notifier.py | joeyparis/serverless-aws-iam-access-key-auto-rotation | 273478a0efbdc0a9d83ce70f9f5e17d3a6bbdc0f | [
"MIT-0"
] | null | null | null | src/notifier/notifier.py | joeyparis/serverless-aws-iam-access-key-auto-rotation | 273478a0efbdc0a9d83ce70f9f5e17d3a6bbdc0f | [
"MIT-0"
] | null | null | null | # (c) 2021 Amazon Web Services, Inc. or its affiliates. All Rights Reserved.
# This AWS Content is provided subject to the terms of the AWS Customer Agreement available at
# https://aws.amazon.com/agreement/ or other written agreement between Customer
# and Amazon Web Services, Inc.
"""Notifier.
Provies core logic fo... | 34.317241 | 94 | 0.535772 | # (c) 2021 Amazon Web Services, Inc. or its affiliates. All Rights Reserved.
# This AWS Content is provided subject to the terms of the AWS Customer Agreement available at
# https://aws.amazon.com/agreement/ or other written agreement between Customer
# and Amazon Web Services, Inc.
"""Notifier.
Provies core logic fo... | 0 | 921 | 0 | 3,539 | 0 | 0 | 0 | 13 | 68 |
ae6be8c99336ad00bd1d2646fdaaa96cc416fc38 | 784 | py | Python | .github/scripts/version.py | sigvaldm/symfem | 5b51748a49015bb37839d1ca39bb26348b33936a | [
"MIT"
] | null | null | null | .github/scripts/version.py | sigvaldm/symfem | 5b51748a49015bb37839d1ca39bb26348b33936a | [
"MIT"
] | null | null | null | .github/scripts/version.py | sigvaldm/symfem | 5b51748a49015bb37839d1ca39bb26348b33936a | [
"MIT"
] | null | null | null | import json
import sys
import github
access_key = sys.argv[-1]
git = github.Github(access_key)
symfem = git.get_repo("mscroggs/symfem")
branch = symfem.get_branch("main")
ref = symfem.get_git_ref("heads/main")
base_tree = symfem.get_git_tree(branch.commit.sha)
vfile1 = symfem.get_contents("VERSION", branch.commit.s... | 28 | 84 | 0.727041 | import json
import sys
import github
access_key = sys.argv[-1]
git = github.Github(access_key)
symfem = git.get_repo("mscroggs/symfem")
branch = symfem.get_branch("main")
ref = symfem.get_git_ref("heads/main")
base_tree = symfem.get_git_tree(branch.commit.sha)
vfile1 = symfem.get_contents("VERSION", branch.commit.s... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
15e05876675dad30497155e0101ac76e37fe3300 | 348 | py | Python | website/views.py | whale93/podfolio-tracker | 4931c5324ed758738826f365b9510834370ad5cd | [
"MIT"
] | null | null | null | website/views.py | whale93/podfolio-tracker | 4931c5324ed758738826f365b9510834370ad5cd | [
"MIT"
] | null | null | null | website/views.py | whale93/podfolio-tracker | 4931c5324ed758738826f365b9510834370ad5cd | [
"MIT"
] | null | null | null | from flask import Blueprint
views = Blueprint("views", __name__)
| 21.75 | 70 | 0.747126 | from flask import Blueprint, render_template, redirect, url_for, flash
from flask_login import login_required, current_user
views = Blueprint("views", __name__)
@views.route("/")
def root():
return redirect(url_for("views.home"))
@views.route("/home")
@login_required
def home():
return render_template("hom... | 0 | 138 | 0 | 0 | 0 | 0 | 0 | 74 | 68 |
2245fd2553270d855e1281857127b35974accc39 | 223 | py | Python | staff_management_models/staff_group_payments/apps.py | reimibeta/django-staff-management-models | 20fd718d18d39f333fb9e1ac231154db86a9b91c | [
"Apache-2.0"
] | null | null | null | staff_management_models/staff_group_payments/apps.py | reimibeta/django-staff-management-models | 20fd718d18d39f333fb9e1ac231154db86a9b91c | [
"Apache-2.0"
] | null | null | null | staff_management_models/staff_group_payments/apps.py | reimibeta/django-staff-management-models | 20fd718d18d39f333fb9e1ac231154db86a9b91c | [
"Apache-2.0"
] | null | null | null |
""" this models require wallets module """
| 24.777778 | 57 | 0.780269 | from django.apps import AppConfig
""" this models require wallets module """
class StaffGroupPaymentsConfig(AppConfig):
name = 'staff_management_models.staff_group_payments'
verbose_name = 'Staff Group Payments'
| 0 | 0 | 0 | 121 | 0 | 0 | 0 | 12 | 45 |
734bd85da0555a83af2c90b72ff06d0ce03153d8 | 853 | py | Python | myia/operations/prim_Jinv.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 222 | 2019-02-13T07:56:28.000Z | 2022-03-28T07:07:54.000Z | myia/operations/prim_Jinv.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 107 | 2019-02-12T21:56:39.000Z | 2022-03-12T01:08:03.000Z | myia/operations/prim_Jinv.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 27 | 2017-11-14T17:58:15.000Z | 2019-01-14T01:36:09.000Z | """Definitions for the primitive `Jinv`."""
from . import primitives as P
__operation_defaults__ = {
"name": "Jinv",
"registered_name": "Jinv",
"mapping": P.Jinv,
"python_implementation": None,
}
__primitive_defaults__ = {
"name": "Jinv",
"registered_name": "Jinv",
"type": "placeholder... | 23.054054 | 56 | 0.692849 | """Definitions for the primitive `Jinv`."""
from ..abstract.infer import compute_jinv_type
from ..lib import bprop_to_grad_transform, standard_prim
from ..operations import J
from . import primitives as P
@standard_prim(P.Jinv)
async def infer_Jinv(self, engine, x):
"""Infer the return type of primitive `Jinv`."... | 0 | 241 | 0 | 0 | 0 | 0 | 0 | 65 | 113 |
c0aaa60fb871a339e13ebd3f7353bc67cc21931a | 2,997 | py | Python | simpbot/dbstore/user.py | IsmaelRLG/simpbot | 7d4288334f637e0a7774ef1acda933a668c60181 | [
"MIT"
] | 3 | 2017-05-08T14:53:40.000Z | 2021-12-18T22:15:14.000Z | simpbot/dbstore/user.py | IsmaelRLG/simpbot | 7d4288334f637e0a7774ef1acda933a668c60181 | [
"MIT"
] | null | null | null | simpbot/dbstore/user.py | IsmaelRLG/simpbot | 7d4288334f637e0a7774ef1acda933a668c60181 | [
"MIT"
] | 1 | 2017-05-15T23:28:56.000Z | 2017-05-15T23:28:56.000Z | # -*- coding: utf-8 -*-
# Simple Bot (SimpBot)
# Copyright 2016-2017, Ismael Lugo (kwargs)
| 28.542857 | 77 | 0.552553 | # -*- coding: utf-8 -*-
# Simple Bot (SimpBot)
# Copyright 2016-2017, Ismael Lugo (kwargs)
import time
from simpbot import envvars
from simpbot import localedata
class user(object):
def __init__(self, net, user, since, status, admin=None, logindate=None):
self.network = net
self.chan_flags = []
... | 0 | 368 | 0 | 2,442 | 0 | 0 | 0 | 5 | 90 |
255e1b40ca057238d70d78e5dadad05322fd7289 | 439 | py | Python | challenges/array/array_reverse/array.py | bayan-alkhatib/data-structures-and-algorithms-401 | c22e0adf159392a8925f07a36b3083654d3a7002 | [
"MIT"
] | null | null | null | challenges/array/array_reverse/array.py | bayan-alkhatib/data-structures-and-algorithms-401 | c22e0adf159392a8925f07a36b3083654d3a7002 | [
"MIT"
] | 11 | 2021-06-14T00:14:54.000Z | 2021-06-30T00:08:30.000Z | challenges/array/array_reverse/array.py | bayan-alkhatib/data-structures-and-algorithms-401 | c22e0adf159392a8925f07a36b3083654d3a7002 | [
"MIT"
] | 1 | 2021-07-26T11:08:29.000Z | 2021-07-26T11:08:29.000Z | list=[2,5,9,6]
print(revers(list))
# def revers(arr):
# new_array=[]
# for i in range(len(arr)-1,-1,-1):
# print(i)
# new_array.append(arr[i])
# print(new_array)
# revers(list)
# def revers(arr):
# new_array=[0 for i in arr ]
# for i in range(0,len(arr)):
# new_array[i]=a... | 17.56 | 40 | 0.562642 | list=[2,5,9,6]
def revers(arr):
new_array=arr[::-1]
return new_array
print(revers(list))
# def revers(arr):
# new_array=[]
# for i in range(len(arr)-1,-1,-1):
# print(i)
# new_array.append(arr[i])
# print(new_array)
# revers(list)
# def revers(arr):
# new_array=[0 for i in a... | 0 | 0 | 0 | 0 | 0 | 40 | 0 | 0 | 23 |
e3ad9ee237793462066aae8d29396e943c83ad8d | 13,014 | py | Python | cli.py | neurosimata/seizy | 2e18851f90cdda21ad85af3b2224eff17b5689bc | [
"Apache-2.0"
] | null | null | null | cli.py | neurosimata/seizy | 2e18851f90cdda21ad85af3b2224eff17b5689bc | [
"Apache-2.0"
] | null | null | null | cli.py | neurosimata/seizy | 2e18851f90cdda21ad85af3b2224eff17b5689bc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
### ----------------------------- IMPORTS --------------------------- ###
import os
import json
### ----------------------------------------------------------------- ###
def check_main(folder, data_dir, csv_dir):
"""
Check if folders exist and if h5 files match csv files.
Paramet... | 34.247368 | 139 | 0.568849 | # -*- coding: utf-8 -*-
### ----------------------------- IMPORTS --------------------------- ###
import click
import os
import json
### ----------------------------------------------------------------- ###
def check_main(folder, data_dir, csv_dir):
"""
Check if folders exist and if h5 files match csv files.... | 0 | 9,876 | 0 | 0 | 0 | 0 | 0 | -9 | 260 |
48a2c0469036932d74c0dde4c6ed190ccb59d74b | 2,045 | py | Python | logic/functions.py | pycollabproject/realprice | 80a054ca4c6aa60bf6d0c235a545cff1dc6667fb | [
"Apache-2.0"
] | 13 | 2016-01-07T17:51:37.000Z | 2021-02-06T02:49:28.000Z | logic/functions.py | pycollabproject/realprice | 80a054ca4c6aa60bf6d0c235a545cff1dc6667fb | [
"Apache-2.0"
] | 17 | 2016-01-06T22:34:28.000Z | 2016-01-19T10:41:45.000Z | logic/functions.py | pycollabproject/realprice | 80a054ca4c6aa60bf6d0c235a545cff1dc6667fb | [
"Apache-2.0"
] | 7 | 2016-01-07T00:29:35.000Z | 2016-09-24T07:46:20.000Z | import json # import function unused for now, until we have a sample JSON file.
<<<<<<< Updated upstream
return prices[int((totalInstances-1)/2)]
=======
return prices[(totalInstances-1)/2]
def iqr(self):
>>>>>>> Stashed changes
| 36.517857 | 100 | 0.647922 | import json # import function unused for now, until we have a sample JSON file.
class Processing:
"""Contains logic for processing json from wrapper.
:mean: defines mean price of input prices from mean
:location: defines average lat and long for input.
:average: defines average.
:median: defines ... | 0 | 0 | 0 | 1,771 | 0 | 0 | 0 | 0 | 23 |
355d66c3532e5d3747b9b6ce5c06223b1014ab03 | 404 | py | Python | PART01/19_sort_index.py | arti1117/python-machine-learning-pandas-data-analytics | 132b0f3326aeb028348bc9e07d38d18e4ec2e18e | [
"MIT"
] | 1 | 2021-01-21T09:11:51.000Z | 2021-01-21T09:11:51.000Z | PART01/19_sort_index.py | arti1117/python-machine-learning-pandas-data-analytics | 132b0f3326aeb028348bc9e07d38d18e4ec2e18e | [
"MIT"
] | null | null | null | PART01/19_sort_index.py | arti1117/python-machine-learning-pandas-data-analytics | 132b0f3326aeb028348bc9e07d38d18e4ec2e18e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Aug 5 22:34:12 2020
@author: arti
"""
import pandas as pd
dict_data = {'c0':[1,2,3], 'c1':[4,5,6], 'c2':[7,8,9], 'c3':[10,11,12], 'c4':[13,14,15]}
df = pd.DataFrame(dict_data, index=['r0', 'r1', 'r2'])
print(df); print('--')
ndf = df.sort_index(asc... | 20.2 | 88 | 0.576733 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Aug 5 22:34:12 2020
@author: arti
"""
import pandas as pd
dict_data = {'c0':[1,2,3], 'c1':[4,5,6], 'c2':[7,8,9], 'c3':[10,11,12], 'c4':[13,14,15]}
df = pd.DataFrame(dict_data, index=['r0', 'r1', 'r2'])
print(df); print('--')
ndf = df.sort_index(asc... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
cd8f64508e877aacaf5388a083e0b9e06b9d0e62 | 8,815 | py | Python | chigreQL/tests/tests_querys.py | javiercp/holdmybeer | 1b8f847c9a9d35880b8461c16c6ec7630bde86f5 | [
"MIT"
] | null | null | null | chigreQL/tests/tests_querys.py | javiercp/holdmybeer | 1b8f847c9a9d35880b8461c16c6ec7630bde86f5 | [
"MIT"
] | 53 | 2018-06-14T16:17:51.000Z | 2021-07-21T04:31:55.000Z | chigreQL/tests/tests_querys.py | javiercp/holdmybeer | 1b8f847c9a9d35880b8461c16c6ec7630bde86f5 | [
"MIT"
] | null | null | null |
# Create your tests here.
| 29.982993 | 137 | 0.449007 | import graphene
from django.test import TestCase
from django.contrib.auth.models import User
from chigre.models import Brewery, BeerType, KegType, TapType, Beer, Keg, Tap, Pub
from chigreQL.schema import Query
# Create your tests here.
def test_query(query, expected):
schema = graphene.Schema(query=Query)
re... | 0 | 0 | 0 | 8,217 | 0 | 152 | 0 | 100 | 319 |
aa50342a82b8b8ed7bfae772c3edc15e6a43e0cb | 1,814 | py | Python | mail.py | githubbauman/website-monitor | 79dfb3a24220f5fec0fb0af8fc47a290e37a97a4 | [
"MIT"
] | null | null | null | mail.py | githubbauman/website-monitor | 79dfb3a24220f5fec0fb0af8fc47a290e37a97a4 | [
"MIT"
] | null | null | null | mail.py | githubbauman/website-monitor | 79dfb3a24220f5fec0fb0af8fc47a290e37a97a4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
| 31.275862 | 75 | 0.54355 | #!/usr/bin/env python3
import os
import pathlib
import smtplib
import ssl
import config
from message import Message
class Mail: # pylint: disable=too-few-public-methods
@staticmethod
def send(message_text):
message = '''\
From: "''' + config.SENDER_NAME + '''" < ''' + config.SENDER_EMAIL + '''>
To... | 0 | 1,613 | 0 | 32 | 0 | 0 | 0 | -39 | 184 |
8057632cc897d4ba087ead5338b6b08cc21e71b0 | 6,904 | py | Python | utils.py | informatics-isi-edu/betacell-consortium | 41e27ff2690e5cc192a2ba3cf95c5b6973eb6550 | [
"Apache-2.0"
] | 1 | 2018-06-20T17:54:59.000Z | 2018-06-20T17:54:59.000Z | utils.py | informatics-isi-edu/betacell-consortium | 41e27ff2690e5cc192a2ba3cf95c5b6973eb6550 | [
"Apache-2.0"
] | null | null | null | utils.py | informatics-isi-edu/betacell-consortium | 41e27ff2690e5cc192a2ba3cf95c5b6973eb6550 | [
"Apache-2.0"
] | null | null | null | import deriva.core.ermrest_model as em
def default_table_config(catalog, schema_name, table_name):
"""
This function adds the following basic configuration details to an existing table:
1) Creates a self service modification policy in which creators can update update any row they create. Optionally,
... | 40.139535 | 235 | 0.557503 | import deriva.core.ermrest_model as em
from deriva.core import ErmrestCatalog, get_credential
from deriva.core.ermrest_config import tag as chaise_tags
from requests.exceptions import HTTPError
from attrdict import AttrDict
def default_catalog_config(catalog):
model = catalog.getCatalogModel()
groups = confi... | 0 | 0 | 0 | 0 | 0 | 3,867 | 0 | 97 | 112 |
a9fc8d7f0b1fa27aaa323b1dadbaf264dc801b4d | 207 | py | Python | backend/tasks/urls.py | Newinacode/Daily_Tracker | c5ce28832039dfbca977826be6409586311d107d | [
"MIT"
] | 2 | 2020-10-11T12:36:49.000Z | 2020-10-12T03:10:00.000Z | backend/tasks/urls.py | Newinacode/Daily_Tracker | c5ce28832039dfbca977826be6409586311d107d | [
"MIT"
] | null | null | null | backend/tasks/urls.py | Newinacode/Daily_Tracker | c5ce28832039dfbca977826be6409586311d107d | [
"MIT"
] | 2 | 2020-10-11T12:21:31.000Z | 2020-10-12T11:27:13.000Z | from django.urls import path
from .views import TaskListCreateView, TaskUpdateDeleteView
urlpatterns = [
path('', TaskListCreateView.as_view()),
path('<int:pk>/', TaskUpdateDeleteView.as_view()),
]
| 25.875 | 59 | 0.73913 | from django.urls import path
from .views import TaskListCreateView, TaskUpdateDeleteView
urlpatterns = [
path('', TaskListCreateView.as_view()),
path('<int:pk>/', TaskUpdateDeleteView.as_view()),
]
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bef2920eaaeea3228a6d73e673a5a946a1b3694f | 106 | py | Python | test_link_cpp.py | jskDr/cython_cpp | 151465a6de665b47d89ed351fbd0c978a139cf48 | [
"MIT"
] | null | null | null | test_link_cpp.py | jskDr/cython_cpp | 151465a6de665b47d89ed351fbd0c978a139cf48 | [
"MIT"
] | null | null | null | test_link_cpp.py | jskDr/cython_cpp | 151465a6de665b47d89ed351fbd0c978a139cf48 | [
"MIT"
] | null | null | null | import link_cpp
link_cpp.main()
import mathx_cpp
mathx_cpp.main()
import mathx
print(mathx.inverse(2.0)) | 13.25 | 25 | 0.792453 | import link_cpp
link_cpp.main()
import mathx_cpp
mathx_cpp.main()
import mathx
print(mathx.inverse(2.0)) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
21f72c733c730c2b34e9fda7154dcb712596ced0 | 2,217 | py | Python | tests/test_75_jinja2_for_see_seealso.py | KaKkouo/kana_text | 8b6a505be94225c10269f527b35ec821cdafe058 | [
"BSD-2-Clause"
] | 1 | 2021-10-02T02:43:21.000Z | 2021-10-02T02:43:21.000Z | tests/test_75_jinja2_for_see_seealso.py | KaKkouo/kana_text | 8b6a505be94225c10269f527b35ec821cdafe058 | [
"BSD-2-Clause"
] | 13 | 2021-11-01T13:27:25.000Z | 2022-03-01T18:51:35.000Z | tests/test_75_jinja2_for_see_seealso.py | KaKkouo/kana_text | 8b6a505be94225c10269f527b35ec821cdafe058 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/python3.8
import sys
sys.path.append('sphinxcontrib')
#-------------------------------------------------------------------
#kana_text_word_list
testcase01in = {
'doc01': [('single','|; |','id-01','',None)],
'doc02': [('see','|; |','id-02','',None)],
'doc03': [('single','|; |','id-03','',None)],
'doc04': [... | 31.225352 | 68 | 0.617501 | #!/usr/bin/python3.8
import sys
import unittest
from pprint import pprint
from jinja2 import Template
sys.path.append('sphinxcontrib')
from src import ExtIndexRack as IndexRack
from . import util
#-------------------------------------------------------------------
#kana_text_word_listの上書き
testcase01in = {
'doc01': [... | 354 | 0 | 0 | 0 | 0 | 904 | 0 | 21 | 202 |
f7f5b453307c130d4a81b92e6af87c95a74db22f | 2,176 | py | Python | plugins/tts/google.py | ollmer/jasper-client | 49b76c248c9550ff50e37f549915de2034d22050 | [
"MIT"
] | null | null | null | plugins/tts/google.py | ollmer/jasper-client | 49b76c248c9550ff50e37f549915de2034d22050 | [
"MIT"
] | null | null | null | plugins/tts/google.py | ollmer/jasper-client | 49b76c248c9550ff50e37f549915de2034d22050 | [
"MIT"
] | null | null | null |
try:
except ImportError:
pass
| 31.536232 | 76 | 0.551471 | import os
import yaml
import tempfile
from abstract_tts import AbstractMp3TTSEngine
from src import diagnose
from src import paths
try:
import gtts
except ImportError:
pass
class GoogleTTS(AbstractMp3TTSEngine):
"""
Uses the Google TTS online translator
Requires pymad and gTTS to be available
... | 0 | 1,108 | 0 | 861 | 0 | 0 | 0 | -11 | 182 |
cdeb53cfcda0b0fa0c00762b6c7ee2c6e47d30f1 | 2,276 | py | Python | tools/accessibility/codereview/download_issue.py | chromium/chromium | df46e572c3449a4b108d6e02fbe4f6d24cf98381 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 14,668 | 2015-01-01T01:57:10.000Z | 2022-03-31T23:33:32.000Z | tools/accessibility/codereview/download_issue.py | chromium/chromium | df46e572c3449a4b108d6e02fbe4f6d24cf98381 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 86 | 2015-10-21T13:02:42.000Z | 2022-03-14T07:50:50.000Z | tools/accessibility/codereview/download_issue.py | chromium/chromium | df46e572c3449a4b108d6e02fbe4f6d24cf98381 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 5,941 | 2015-01-02T11:32:21.000Z | 2022-03-31T16:35:46.000Z | #!/usr/bin/env python
# Copyright (c) 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Downloads a patch and changed files from Rietveld.
Prints the patch of the most recent patchset to stdout.
"""
try:
import fi... | 26.16092 | 75 | 0.709578 | #!/usr/bin/env python
# Copyright (c) 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Downloads a patch and changed files from Rietveld.
Prints the patch of the most recent patchset to stdout.
"""
try:
import ba... | 0 | 0 | 0 | 0 | 0 | 1,348 | 0 | -39 | 213 |
6432dbc9a92a1a5f3824b8c45f3e306e49b2219b | 13,261 | py | Python | src/library_manager_nanny.py | moibenko/enstore | 6f2ff5b67ff73872a9e68f2a68b0bdaa70cef9b9 | [
"Intel",
"Unlicense"
] | 4 | 2021-10-17T11:17:59.000Z | 2022-02-28T16:58:40.000Z | src/library_manager_nanny.py | moibenko/enstore | 6f2ff5b67ff73872a9e68f2a68b0bdaa70cef9b9 | [
"Intel",
"Unlicense"
] | 17 | 2021-10-05T21:44:06.000Z | 2022-03-31T16:58:40.000Z | src/library_manager_nanny.py | moibenko/enstore | 6f2ff5b67ff73872a9e68f2a68b0bdaa70cef9b9 | [
"Intel",
"Unlicense"
] | 8 | 2021-09-02T18:55:49.000Z | 2022-03-09T21:05:28.000Z | #!/usr/bin/env python
import socket
import select
import errno
import os
import sys
import time
import getopt
import string
import shutil
import configuration_client
import log_client
import udp_client
import library_manager_client
import e_errors
import enstore_functions2
import Trace
import enstore_mail
interval = ... | 38.774854 | 162 | 0.571224 | #!/usr/bin/env python
import socket
import select
import errno
import os
import sys
import time
import getopt
import string
import shutil
import configuration_client
import log_client
import udp_client
import library_manager_client
import e_errors
import enstore_functions2
import Trace
import enstore_mail
interval = ... | 0 | 0 | 0 | 5,361 | 0 | 2,197 | 0 | 0 | 115 |
5c89779d9dfedcf28dd57f4955d1dd0e311b4ac7 | 4,691 | py | Python | ros_ws/src/iconlab/scripts/run_experiment_2drones.py | labicon/crazyswarm-labicon | 32a1cd553093a31ed86058c5a9868b5a6a59dfe6 | [
"MIT"
] | null | null | null | ros_ws/src/iconlab/scripts/run_experiment_2drones.py | labicon/crazyswarm-labicon | 32a1cd553093a31ed86058c5a9868b5a6a59dfe6 | [
"MIT"
] | null | null | null | ros_ws/src/iconlab/scripts/run_experiment_2drones.py | labicon/crazyswarm-labicon | 32a1cd553093a31ed86058c5a9868b5a6a59dfe6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import rospy
import tf
import datetime
import csv
import julia
jl = julia.Julia(compiled_modules=False)
# Enable or disable using Julia MPC algorithm
USE_JULIA = True
# Assemble filename for logged data
datetimeString = datetime.datetime.now().strftime("%m%d%y-%H:%M:%S")
csv_filename = "experim... | 30.861842 | 107 | 0.64741 | #!/usr/bin/env python
import roslib
import rospy
import math
import tf
import geometry_msgs.msg
from pycrazyswarm import *
import datetime
import csv
import time
import julia
jl = julia.Julia(compiled_modules=False)
from julia import Main
# Enable or disable using Julia MPC algorithm
USE_JULIA = True
# Assemble file... | 0 | 0 | 0 | 0 | 0 | 2,248 | 0 | -19 | 155 |
4671a4f81462b5fc9a7bfc9ea572fbb35c89ad1c | 11,785 | py | Python | sanic_restful_api/fields.py | janu8ry/sanic-restful | 4ce2c65147118ee78bf03718df7293c2e5a16fd7 | [
"MIT"
] | 21 | 2019-09-09T09:53:22.000Z | 2021-07-04T19:11:52.000Z | sanic_restful_api/fields.py | janu8ry/sanic-restful | 4ce2c65147118ee78bf03718df7293c2e5a16fd7 | [
"MIT"
] | 3 | 2020-05-15T09:54:01.000Z | 2021-02-21T12:42:54.000Z | sanic_restful_api/fields.py | janu8ry/sanic-restful | 4ce2c65147118ee78bf03718df7293c2e5a16fd7 | [
"MIT"
] | 5 | 2020-03-12T01:43:23.000Z | 2021-03-12T08:04:11.000Z |
from calendar import timegm
from decimal import Decimal as MyDecimal
from email.utils import formatdate
__all__ = ["String", "FormattedString", "DateTime", "Float",
"Integer", "Arbitrary", "Nested", "List", "Raw", "Boolean",
"Fixed", "Price"]
def get_value(key, obj, default=None):
"""Hel... | 30.29563 | 90 | 0.621129 |
from calendar import timegm
from decimal import Decimal as MyDecimal, ROUND_HALF_EVEN
from email.utils import formatdate
import six
from sanic_restful_api import marshal
__all__ = ["String", "FormattedString", "DateTime", "Float",
"Integer", "Arbitrary", "Nested", "List", "Raw", "Boolean",
"Fixe... | 0 | 0 | 0 | 9,089 | 0 | 513 | 0 | 22 | 389 |
7df705981bd4f013ce2613d37e88dd70fbf3d653 | 2,201 | py | Python | abmarl/tools/utils.py | Leonardo767/Abmarl | 9fada5447b09174c6a70b6032b4a8d08b66c4589 | [
"Apache-2.0"
] | 7 | 2020-11-13T01:33:44.000Z | 2021-03-05T14:30:34.000Z | abmarl/tools/utils.py | Leonardo767/Abmarl | 9fada5447b09174c6a70b6032b4a8d08b66c4589 | [
"Apache-2.0"
] | 91 | 2020-11-04T23:34:30.000Z | 2021-06-08T17:18:00.000Z | abmarl/tools/utils.py | Leonardo767/Abmarl | 9fada5447b09174c6a70b6032b4a8d08b66c4589 | [
"Apache-2.0"
] | 6 | 2021-07-12T19:28:51.000Z | 2022-03-01T00:50:02.000Z | import fnmatch
import os
def custom_import_module(full_config_path):
"""
Import and execute a python file as a module. Useful for import the experiment module and the
analysis module.
Args:
full_config_path: Full path to the python file.
Returns: The python file as a module
"""
i... | 32.850746 | 97 | 0.686506 | import fnmatch
import os
def custom_import_module(full_config_path):
"""
Import and execute a python file as a module. Useful for import the experiment module and the
analysis module.
Args:
full_config_path: Full path to the python file.
Returns: The python file as a module
"""
i... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f091b5f5c6d2fe700c420dc0908e23145f6d66c9 | 128 | py | Python | samples/tracemultiplexer/unsynchronized.py | jproudlo/PyModel | 2ab0e2cf821807206725adaa425409b0c28929b7 | [
"BSD-3-Clause"
] | 61 | 2015-01-29T16:18:51.000Z | 2021-09-28T10:14:02.000Z | samples/tracemultiplexer/unsynchronized.py | vikstr/PyModel | 4fff616fe0fd8342c91a42d9db5d4097a179dff8 | [
"BSD-3-Clause"
] | 2 | 2015-02-04T11:57:53.000Z | 2021-07-18T20:59:55.000Z | samples/tracemultiplexer/unsynchronized.py | vikstr/PyModel | 4fff616fe0fd8342c91a42d9db5d4097a179dff8 | [
"BSD-3-Clause"
] | 34 | 2015-02-04T12:00:29.000Z | 2022-03-14T07:41:25.000Z | """pymodel config"""
import tracemultiplexer
tracemultiplexer.unsynchronized = True # ignore tracelock, may corrupt log file
| 18.285714 | 79 | 0.789063 | """pymodel config"""
import tracemultiplexer
tracemultiplexer.unsynchronized = True # ignore tracelock, may corrupt log file
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
83d57825c1675de31e60d16b96d7064df7193827 | 176 | py | Python | pages/urls.py | Great-B/real-estate-app | 6c151df7b7ad40a859cf5a6e2886b76ea396f964 | [
"MIT"
] | null | null | null | pages/urls.py | Great-B/real-estate-app | 6c151df7b7ad40a859cf5a6e2886b76ea396f964 | [
"MIT"
] | 10 | 2020-06-05T23:42:01.000Z | 2022-03-12T00:03:50.000Z | pages/urls.py | Great-B/real-estate-app | 6c151df7b7ad40a859cf5a6e2886b76ea396f964 | [
"MIT"
] | null | null | null | from django.urls import path
from pages import views
urlpatterns = [
path('', views.index, name='index'),
path('about', views.about, name='about')
]
| 19.555556 | 45 | 0.642045 | from django.urls import path, include
from pages import views
urlpatterns = [
path('', views.index, name='index'),
path('about', views.about, name='about')
]
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0 |
dc721dc1796933b99e28a28bcbff28bde1db87f7 | 986 | py | Python | bank_account_validator/utils.py | noverde/bank-account-validator | 4f524ec147e2aea9b3c217acdb94f14d4428096c | [
"MIT"
] | null | null | null | bank_account_validator/utils.py | noverde/bank-account-validator | 4f524ec147e2aea9b3c217acdb94f14d4428096c | [
"MIT"
] | null | null | null | bank_account_validator/utils.py | noverde/bank-account-validator | 4f524ec147e2aea9b3c217acdb94f14d4428096c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
| 22.930233 | 71 | 0.605477 | # -*- coding: utf-8 -*-
import re
def smarter_zfill(value, expected_length=None):
if not value:
return ''
result = re.sub('^0+', '', str(value))
if expected_length:
result = result.zfill(expected_length)
return result
def calculate_verifier_digit(
account_relevant_data, pivot,... | 0 | 0 | 0 | 0 | 0 | 904 | 0 | -12 | 68 |
437253ed7bf394677cd7ac72c903a4f9e75ee84f | 13,259 | py | Python | polaris/polaris/tests/withdraw_test.py | msfeldstein/django-polaris | 2671afed7cb2bbbff6a0b428d98d5c9189edb6bb | [
"Apache-2.0"
] | null | null | null | polaris/polaris/tests/withdraw_test.py | msfeldstein/django-polaris | 2671afed7cb2bbbff6a0b428d98d5c9189edb6bb | [
"Apache-2.0"
] | null | null | null | polaris/polaris/tests/withdraw_test.py | msfeldstein/django-polaris | 2671afed7cb2bbbff6a0b428d98d5c9189edb6bb | [
"Apache-2.0"
] | null | null | null | """This module tests the `/withdraw` endpoint."""
# TODO: Decompose the below tests, since they call the same logic. The issue: Pytest complains
# about decomposition when passing fixtures to a helper function.
| 37.991404 | 247 | 0.750358 | """This module tests the `/withdraw` endpoint."""
import json
from unittest.mock import patch
import pytest
from stellar_sdk.keypair import Keypair
from stellar_sdk.transaction_envelope import TransactionEnvelope
from polaris import settings
from polaris.helpers import format_memo_horizon
from polaris.management.comm... | 0 | 12,293 | 0 | 0 | 0 | 0 | 0 | 195 | 544 |
26c27880f74fb84d5b7bb6ce8b36849e29c08028 | 2,445 | py | Python | tests/test_ner.py | zhufz/nlp_research | b435319858520edcca7c0320dca3e0013087c276 | [
"MIT"
] | 160 | 2019-06-21T03:52:48.000Z | 2022-03-07T07:10:11.000Z | tests/test_ner.py | zfz1015/nlp_research | b435319858520edcca7c0320dca3e0013087c276 | [
"MIT"
] | 1 | 2021-01-05T02:30:44.000Z | 2021-01-05T02:30:44.000Z | tests/test_ner.py | zhufz/nlp_research | b435319858520edcca7c0320dca3e0013087c276 | [
"MIT"
] | 45 | 2019-06-29T09:53:54.000Z | 2022-01-03T07:13:31.000Z | #-*- coding:utf-8 -*-
import os, sys
ROOT_PATH = '/'.join(os.path.abspath(__file__).split('/')[:-2])
sys.path.append(ROOT_PATH)
| 35.434783 | 87 | 0.596728 | #-*- coding:utf-8 -*-
import tensorflow as tf
from tensorflow.contrib import predictor
from sklearn.metrics.pairwise import cosine_similarity, euclidean_distances
import pdb
import traceback
import pickle
import logging
import multiprocessing
from functools import partial
import os,sys
ROOT_PATH = '/'.join(os.path.absp... | 0 | 0 | 0 | 1,923 | 0 | 0 | 0 | 83 | 310 |
aac10eb6d326bdbc253c6f3cad42157c69e270a7 | 6,230 | py | Python | server/apps/project/worker/delete_project.py | iotile/iotile_cloud | 9dc65ac86d3a730bba42108ed7d9bbb963d22ba6 | [
"MIT"
] | null | null | null | server/apps/project/worker/delete_project.py | iotile/iotile_cloud | 9dc65ac86d3a730bba42108ed7d9bbb963d22ba6 | [
"MIT"
] | null | null | null | server/apps/project/worker/delete_project.py | iotile/iotile_cloud | 9dc65ac86d3a730bba42108ed7d9bbb963d22ba6 | [
"MIT"
] | null | null | null | import logging
from django.contrib.auth import get_user_model
logger = logging.getLogger(__name__)
user_model = get_user_model()
| 40.986842 | 113 | 0.651846 | import logging
from django.conf import settings
from django.contrib.auth import get_user_model
from apps.emailutil.tasks import Email
from apps.org.models import Org
from apps.physicaldevice.models import Device
from apps.project.models import Project
from apps.sqsworker.action import Action
from apps.sqsworker.excep... | 0 | 808 | 0 | 4,794 | 0 | 0 | 0 | 252 | 245 |
e0fe037a8c2c0fdc1adafdbd73b20496ab18d7e1 | 3,935 | py | Python | hyperion/clustering/ahc.py | jsalt2019-diadet/hyperion | 14a11436d62f3c15cd9b1f70bcce3eafbea2f753 | [
"Apache-2.0"
] | 9 | 2019-09-22T05:19:59.000Z | 2022-03-05T18:03:37.000Z | hyperion/clustering/ahc.py | jsalt2019-diadet/hyperion | 14a11436d62f3c15cd9b1f70bcce3eafbea2f753 | [
"Apache-2.0"
] | null | null | null | hyperion/clustering/ahc.py | jsalt2019-diadet/hyperion | 14a11436d62f3c15cd9b1f70bcce3eafbea2f753 | [
"Apache-2.0"
] | 4 | 2019-10-10T06:34:05.000Z | 2022-03-05T18:03:56.000Z | """
Copyright 2018 Johns Hopkins University (Author: Jesus Villalba)
Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
| 32.520661 | 101 | 0.602033 | """
Copyright 2018 Johns Hopkins University (Author: Jesus Villalba)
Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
from six.moves import xrange
import numpy as np
import h5py
from copy import ... | 0 | 0 | 0 | 3,403 | 0 | 0 | 0 | 82 | 202 |
bee16100c634fe267f2ab3c9fb80f756a28e69da | 423 | py | Python | snakefmt/__init__.py | je3we3/snakefmt | fbe584deade1049f756ce1c7258902dbcdca41a5 | [
"MIT"
] | 83 | 2020-04-14T14:50:50.000Z | 2022-03-22T21:34:23.000Z | snakefmt/__init__.py | je3we3/snakefmt | fbe584deade1049f756ce1c7258902dbcdca41a5 | [
"MIT"
] | 118 | 2020-04-20T13:29:06.000Z | 2022-03-25T07:14:17.000Z | snakefmt/__init__.py | je3we3/snakefmt | fbe584deade1049f756ce1c7258902dbcdca41a5 | [
"MIT"
] | 18 | 2020-04-19T22:27:00.000Z | 2022-03-29T06:23:37.000Z | import sys
"""
Version has unique source in pyproject.toml.
importlib fetches version from distribution metadata files
(in dist-info or egg-info dirs).
From Python 3.8, importlib_metadata is in standard library as importlib.metadata.
"""
if sys.version_info >= (3, 8):
from importlib import metadata
else:
impor... | 24.882353 | 81 | 0.775414 | import sys
"""
Version has unique source in pyproject.toml.
importlib fetches version from distribution metadata files
(in dist-info or egg-info dirs).
From Python 3.8, importlib_metadata is in standard library as importlib.metadata.
"""
if sys.version_info >= (3, 8):
from importlib import metadata
else:
impor... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
693f14d8b2af0c9f8672aea85ecbeb39e1269b19 | 3,247 | py | Python | target_snowflake/file_format.py | BlueOrangeDigital/pipelinewise-target-snowflake | a71c58a1344e96b51b4be2d085042109df0e1dc1 | [
"Apache-2.0"
] | null | null | null | target_snowflake/file_format.py | BlueOrangeDigital/pipelinewise-target-snowflake | a71c58a1344e96b51b4be2d085042109df0e1dc1 | [
"Apache-2.0"
] | null | null | null | target_snowflake/file_format.py | BlueOrangeDigital/pipelinewise-target-snowflake | a71c58a1344e96b51b4be2d085042109df0e1dc1 | [
"Apache-2.0"
] | null | null | null | """Enums used by pipelinewise-target-snowflake"""
# Supported types for file formats.
# pylint: disable=too-few-public-methods
| 36.077778 | 119 | 0.670157 | """Enums used by pipelinewise-target-snowflake"""
from enum import Enum, unique
from types import ModuleType
from typing import Callable
import target_snowflake.file_formats
from target_snowflake.exceptions import FileFormatNotFoundException, InvalidFileFormatException
# Supported types for file formats.
@unique
clas... | 0 | 2,230 | 0 | 622 | 0 | 0 | 0 | 110 | 155 |
06d566d4e011abd6c510a15e8d2ed0a0680bbe5c | 6,361 | py | Python | az-function-durable/UpgradeSandbox/__init__.py | Mina69/AKSAutoUpgrade | 66b1c5a233f5c202a73b63c8540a4ee57d9abaf9 | [
"MIT"
] | null | null | null | az-function-durable/UpgradeSandbox/__init__.py | Mina69/AKSAutoUpgrade | 66b1c5a233f5c202a73b63c8540a4ee57d9abaf9 | [
"MIT"
] | null | null | null | az-function-durable/UpgradeSandbox/__init__.py | Mina69/AKSAutoUpgrade | 66b1c5a233f5c202a73b63c8540a4ee57d9abaf9 | [
"MIT"
] | null | null | null | # This function is not intended to be invoked directly. Instead it will be
# triggered by an orchestrator function.
| 58.357798 | 263 | 0.606037 | # This function is not intended to be invoked directly. Instead it will be
# triggered by an orchestrator function.
import logging
import os
from azure.mgmt.containerservice import ContainerServiceClient
from azure.identity import ClientSecretCredential
from azure.mgmt.subscription import SubscriptionClient
from az... | 0 | 0 | 0 | 0 | 0 | 5,788 | 0 | 231 | 226 |
b7b493318a7a3b83dbe2c7866ef9fbe0f690ec4d | 154 | py | Python | documentation/rst2html.py | dutrow/crits | 6b357daa5c3060cf622d3a3b0c7b41a9ca69c049 | [
"MIT"
] | 738 | 2015-01-02T12:39:55.000Z | 2022-03-23T11:05:51.000Z | documentation/rst2html.py | deadbits/crits | 154097a1892e9d3960d6faaed4bd2e912a196a47 | [
"MIT"
] | 605 | 2015-01-01T01:03:39.000Z | 2021-11-17T18:51:07.000Z | documentation/rst2html.py | deadbits/crits | 154097a1892e9d3960d6faaed4bd2e912a196a47 | [
"MIT"
] | 316 | 2015-01-07T12:35:01.000Z | 2022-03-30T04:44:30.000Z | #!/usr/bin/env python
"""
This requires the python docutils library.
"""
from docutils.core import publish_cmdline
publish_cmdline(writer_name='html')
| 15.4 | 42 | 0.766234 | #!/usr/bin/env python
"""
This requires the python docutils library.
"""
from docutils.core import publish_cmdline
publish_cmdline(writer_name='html')
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e68756120394754488130dbeffd29954ffbe521b | 38,575 | py | Python | blender/arm/utils.py | notwarp/armory | bd6078e3035eefcb3c725664698eeb369b4c2d88 | [
"Zlib"
] | null | null | null | blender/arm/utils.py | notwarp/armory | bd6078e3035eefcb3c725664698eeb369b4c2d88 | [
"Zlib"
] | null | null | null | blender/arm/utils.py | notwarp/armory | bd6078e3035eefcb3c725664698eeb369b4c2d88 | [
"Zlib"
] | null | null | null | import json
from typing import Any
import bpy
import arm.lib.armpack
import arm.log as log
# Passed by load_post handler when armsdk is found in project folder
use_local_sdk = False
def get_relative_paths():
"""Whether to convert absolute paths to relative"""
addon_prefs = get_arm_preferences()
return... | 35.100091 | 165 | 0.606455 | import glob
import json
import os
import platform
import re
import subprocess
from typing import Any
import webbrowser
import shlex
import locale
import numpy as np
import bpy
import arm.lib.armpack
from arm.lib.lz4 import LZ4
import arm.log as log
import arm.make_state as state
import arm.props_renderpath
from enum... | 0 | 0 | 0 | 1,044 | 0 | 31,472 | 0 | -39 | 2,399 |
e3304d55e263566a2adac7ca3d08576c8498fa85 | 4,426 | py | Python | extensions/adm/templates/5-todo/__init__.py | icoman/AppServer | b7715d90662e112638000b5a3c242fbcb59488a3 | [
"MIT"
] | null | null | null | extensions/adm/templates/5-todo/__init__.py | icoman/AppServer | b7715d90662e112638000b5a3c242fbcb59488a3 | [
"MIT"
] | null | null | null | extensions/adm/templates/5-todo/__init__.py | icoman/AppServer | b7715d90662e112638000b5a3c242fbcb59488a3 | [
"MIT"
] | null | null | null | #
# Sample Todo module
#
"""
Your license message ...
"""
app = MyAppModule()
| 28.012658 | 118 | 0.504745 | #
# Sample Todo module
#
"""
Your license message ...
"""
import os, bottle, json, datetime
from appmodule import AppModule
from .modeldb import setupDB, Todo, MyS
class MyAppModule(AppModule):
def init(self):
DSN = self.module_config.get('DSN')
try:
setupDB(DSN)
except:
... | 0 | 3,861 | 0 | 176 | 0 | 7 | 0 | 40 | 251 |
551636b992bdc48b5739abf461de16da8884d738 | 812 | py | Python | rss_importer.py | wakin-/simple_ap | f13013fdc79207cfb07f3944caeeef45fe31bbf7 | [
"MIT"
] | 10 | 2018-06-18T09:17:59.000Z | 2020-04-22T11:46:12.000Z | rss_importer.py | wakin-/simple_ap | f13013fdc79207cfb07f3944caeeef45fe31bbf7 | [
"MIT"
] | 4 | 2020-06-05T18:24:12.000Z | 2021-06-10T20:29:49.000Z | rss_importer.py | wakin-/simple_ap | f13013fdc79207cfb07f3944caeeef45fe31bbf7 | [
"MIT"
] | null | null | null | import django
django.setup()
| 31.230769 | 81 | 0.653941 | import feedparser
import pandas
import django
django.setup()
from activitypub.models import Account, Note
def get_feeds_from_url(url):
feed = feedparser.parse(url)
return pandas.DataFrame(feed.entries)
def get_new_feeds(account):
feeds = get_feeds_from_url(account.feed_url)
note_ids = Note.objects.fil... | 0 | 0 | 0 | 0 | 0 | 637 | 0 | 11 | 135 |
a0ef4efb407a0c4dd51e8c25cefb6ca15903ff15 | 4,561 | py | Python | tests/test_fors.py | grantps/superhelp | d8e861bf1ad91571ac23b9c833a8cd461bb1952f | [
"MIT"
] | 27 | 2020-05-17T20:48:43.000Z | 2022-01-08T21:32:30.000Z | tests/test_fors.py | grantps/superhelp | d8e861bf1ad91571ac23b9c833a8cd461bb1952f | [
"MIT"
] | null | null | null | tests/test_fors.py | grantps/superhelp | d8e861bf1ad91571ac23b9c833a8cd461bb1952f | [
"MIT"
] | null | null | null |
ROOT = 'superhelp.helpers.for_help.'
# test_misc()
| 33.536765 | 135 | 0.414164 | from textwrap import dedent
from tests import check_as_expected
ROOT = 'superhelp.helpers.for_help.'
def test_misc():
test_conf = [
(
dedent("""\
name_lengths = []
"""),
{
ROOT + 'comprehension_option': 0,
ROOT + 'for_index_i... | 0 | 0 | 0 | 0 | 0 | 4,420 | 0 | 20 | 68 |
c4a3c80583b1fb723e0e2f1c5392f324c5581138 | 811 | py | Python | 11/1167.py | ToshikiShimizu/AOJ | e87f684b6520189170842e800451063dad1369dd | [
"MIT"
] | null | null | null | 11/1167.py | ToshikiShimizu/AOJ | e87f684b6520189170842e800451063dad1369dd | [
"MIT"
] | null | null | null | 11/1167.py | ToshikiShimizu/AOJ | e87f684b6520189170842e800451063dad1369dd | [
"MIT"
] | null | null | null | if __name__ == '__main__':
main() | 25.34375 | 65 | 0.364982 | def main():
ans = []
N = 10**6
dp = [10**10]*(N+1)
dp_odd = [10**10]*(N+1)
dp[0] = 0
dp_odd[0] = 0
for i in range(1,10**3):
w = i*(i+1)*(i+2)//6
if N<=w:
break
for n in range(N-w):
# dp[n+w] = min(dp[n]+1,dp[n+w]) # TLE
new = dp[n]... | 0 | 0 | 0 | 0 | 0 | 752 | 0 | 0 | 22 |
21b4f0b5e1a796e28a9049075d652c5073d3add5 | 12,043 | py | Python | main.py | semibroiled/mysql-gs-rpy | ddfbc175bbd86871b39c8e1dde4201c93e682b9d | [
"MIT"
] | null | null | null | main.py | semibroiled/mysql-gs-rpy | ddfbc175bbd86871b39c8e1dde4201c93e682b9d | [
"MIT"
] | null | null | null | main.py | semibroiled/mysql-gs-rpy | ddfbc175bbd86871b39c8e1dde4201c93e682b9d | [
"MIT"
] | null | null | null | from getpass import getpass
from mysql.connector import connect, Error
try:
with connect(
host="localhost",
#user=input("Enter username: "),
user = 'acm',
password=getpass("Enter password: "),
database = 'online_movie_rating'
) as connection:
show_db_qu... | 33.267956 | 112 | 0.560409 | from getpass import getpass
from mysql.connector import connect, Error
try:
with connect(
host="localhost",
#user=input("Enter username: "),
user = 'acm',
password=getpass("Enter password: "),
database = 'online_movie_rating'
) as connection:
show_db_qu... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c7ec4fea1556dea89fb52a03d8362d2a2bb1532e | 2,930 | py | Python | oemof_examples/oemof.solph/v0.2.x/generic_chp/ccet.py | ekatef/oemof-examples | f16511d20008c30889a6e75a788a3a1a0bc632c2 | [
"MIT"
] | 28 | 2018-11-10T12:14:04.000Z | 2022-01-14T00:01:09.000Z | oemof_examples/oemof.solph/v0.2.x/generic_chp/ccet.py | ekatef/oemof-examples | f16511d20008c30889a6e75a788a3a1a0bc632c2 | [
"MIT"
] | 28 | 2018-11-08T06:58:06.000Z | 2022-02-22T18:58:17.000Z | oemof_examples/oemof.solph/v0.2.x/generic_chp/ccet.py | oemof/examples | 4805d5cef03141a917fd8a9e1141acfa8cc9d781 | [
"MIT"
] | 55 | 2018-11-09T09:50:36.000Z | 2022-03-08T10:31:02.000Z | # -*- coding: utf-8 -*-
"""
General description:
---------------------
Example that illustrates how to use custom component `GenericCHP` can be used.
In this case it is used to model a combined cycle extraction turbine.
Installation requirements:
---------------------------
This example requires the latest version of ... | 28.72549 | 78 | 0.669966 | # -*- coding: utf-8 -*-
"""
General description:
---------------------
Example that illustrates how to use custom component `GenericCHP` can be used.
In this case it is used to model a combined cycle extraction turbine.
Installation requirements:
---------------------------
This example requires the latest version of ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
46392fac0bb552ed8d94ccaf8bf7aec2ec479708 | 15,524 | py | Python | assemblyline/assemblyline/deployment/create_deployment.py | dendisuhubdy/grokmachine | 120a21a25c2730ed356739231ec8b99fc0575c8b | [
"BSD-3-Clause"
] | 46 | 2017-05-15T11:15:08.000Z | 2018-07-02T03:32:52.000Z | deployment/create_deployment.py | rtruxal/assemblyline | d1f02c9c7c8859d4c0b7ac231d91d544bb3a33eb | [
"MIT"
] | null | null | null | deployment/create_deployment.py | rtruxal/assemblyline | d1f02c9c7c8859d4c0b7ac231d91d544bb3a33eb | [
"MIT"
] | 24 | 2017-05-17T03:26:17.000Z | 2018-07-09T07:00:50.000Z | #!/usr/bin/env python
from __future__ import print_function
DEVEL_VM = "Development VM"
APPLIANCE = "Appliance (Full deployment on single machine)"
CLUSTER = "Cluster (High volume production deployment)"
DEPLOYMENT_TYPES = [DEVEL_VM, APPLIANCE, CLUSTER]
# noinspection PyBroadException
# noinspection PyBroadExcept... | 43.00277 | 119 | 0.666516 | #!/usr/bin/env python
from __future__ import print_function
import subprocess
import re
from getters import *
DEVEL_VM = "Development VM"
APPLIANCE = "Appliance (Full deployment on single machine)"
CLUSTER = "Cluster (High volume production deployment)"
DEPLOYMENT_TYPES = [DEVEL_VM, APPLIANCE, CLUSTER]
# noinspecti... | 0 | 0 | 0 | 0 | 0 | 14,568 | 0 | -16 | 341 |
52ef33a9f0aa2124be939ba0f08b14912e3558c0 | 3,366 | py | Python | notification_integration/utilities/pubsub_test.py | GoogleCloudPlatform/cloud-alerting-notification-forwarding | 1bd47043de723c92dee3f49ddf4bbe226ba5d106 | [
"Apache-2.0"
] | 3 | 2021-12-08T02:59:28.000Z | 2022-02-04T01:14:54.000Z | notification_integration/utilities/pubsub_test.py | GoogleCloudPlatform/cloud-alerting-notification-forwarding | 1bd47043de723c92dee3f49ddf4bbe226ba5d106 | [
"Apache-2.0"
] | null | null | null | notification_integration/utilities/pubsub_test.py | GoogleCloudPlatform/cloud-alerting-notification-forwarding | 1bd47043de723c92dee3f49ddf4bbe226ba5d106 | [
"Apache-2.0"
] | 1 | 2021-12-25T17:32:04.000Z | 2021-12-25T17:32:04.000Z | # Copyright 2021 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 agreed to in writing, ... | 44.88 | 133 | 0.687463 | # Copyright 2021 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 agreed to in writing, ... | 0 | 0 | 0 | 2,608 | 0 | 0 | 0 | -14 | 156 |
a9959636d5aafd55740dd9287c56898a3f184af2 | 8,632 | py | Python | groupenc/vault.py | guilt/groupenc | 579022edfa54323d9b19bb89ec82178da4d71081 | [
"MIT"
] | 5 | 2021-02-18T09:14:24.000Z | 2021-02-23T09:20:44.000Z | groupenc/vault.py | guilt/groupenc | 579022edfa54323d9b19bb89ec82178da4d71081 | [
"MIT"
] | 1 | 2021-02-23T05:44:26.000Z | 2021-03-13T00:27:55.000Z | groupenc/vault.py | guilt/groupenc | 579022edfa54323d9b19bb89ec82178da4d71081 | [
"MIT"
] | 1 | 2021-03-02T09:52:47.000Z | 2021-03-02T09:52:47.000Z |
PUBLIC_KEY_HIVE = 'public_keys'
GROUP_KEY_HIVE = 'group_keys'
SECRETS_HIVE = 'secrets'
| 38.535714 | 101 | 0.726483 | import json
import os
from Crypto.Cipher import AES
from Crypto.Hash import SHA256
from Crypto.Random import get_random_bytes
from Crypto.Util.Padding import pad, unpad
from .config import DEFAULT_VAULT_FILE, DEFAULT_GROUP_KEY_BITS, DEFAULT_PAD_BYTES, DEFAULT_IV_BITS, \
DEFAULT_KEY_ENCODING, HASH_SECRETS
from .he... | 0 | 0 | 0 | 4,762 | 0 | 3,046 | 0 | 224 | 499 |
c765837c6798605e5e1250e8dee402fade7036e7 | 587 | py | Python | rancher/migrations/0033_auto_20210528_0844.py | rockychen-dpaw/it-assets | 92ec23c6a413c5c45bb3d96981d6af68535d225c | [
"Apache-2.0"
] | 4 | 2018-11-16T13:49:49.000Z | 2021-08-19T05:16:50.000Z | rancher/migrations/0033_auto_20210528_0844.py | rockychen-dpaw/it-assets | 92ec23c6a413c5c45bb3d96981d6af68535d225c | [
"Apache-2.0"
] | 10 | 2018-07-06T09:34:56.000Z | 2022-01-28T06:09:05.000Z | rancher/migrations/0033_auto_20210528_0844.py | rockychen-dpaw/it-assets | 92ec23c6a413c5c45bb3d96981d6af68535d225c | [
"Apache-2.0"
] | 9 | 2018-05-05T23:29:10.000Z | 2020-06-26T02:29:17.000Z | # Generated by Django 2.2.21 on 2021-05-28 00:44
| 25.521739 | 81 | 0.614991 | # Generated by Django 2.2.21 on 2021-05-28 00:44
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('rancher', '0032_auto_20210527_1037'),
]
operations = [
migrations.AlterField(
model_name='vulnerability',
name='vul... | 0 | 0 | 0 | 472 | 0 | 0 | 0 | 19 | 46 |
c8e61fae94304118cdb5dd0f9f34585932fbe45c | 42 | py | Python | sksurgerytorch/ui/__init__.py | UCL/scikit-surgerytorch | 5666077d4fe645f198afb0ae821c19472fcefdd8 | [
"BSD-3-Clause"
] | null | null | null | sksurgerytorch/ui/__init__.py | UCL/scikit-surgerytorch | 5666077d4fe645f198afb0ae821c19472fcefdd8 | [
"BSD-3-Clause"
] | 7 | 2020-08-20T07:41:53.000Z | 2022-03-22T19:04:28.000Z | sksurgerytorch/ui/__init__.py | UCL/scikit-surgerytorch | 5666077d4fe645f198afb0ae821c19472fcefdd8 | [
"BSD-3-Clause"
] | null | null | null | # coding=utf-8
"""scikit-surgerytorch"""
| 10.5 | 25 | 0.666667 | # coding=utf-8
"""scikit-surgerytorch"""
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1bd046461d504a44bcac51e726db948ece84d020 | 1,540 | py | Python | data/ONModelMetropolis/raw/raw_transformer.py | statphysandml/LatticeModelImplementations | 5cadb44679445d821cc3d88646215d82d71e920c | [
"MIT"
] | 3 | 2021-05-10T12:36:40.000Z | 2021-06-03T13:56:15.000Z | data/ONModelMetropolis/raw/raw_transformer.py | statphysandml/LatticeModelImplementations | 5cadb44679445d821cc3d88646215d82d71e920c | [
"MIT"
] | null | null | null | data/ONModelMetropolis/raw/raw_transformer.py | statphysandml/LatticeModelImplementations | 5cadb44679445d821cc3d88646215d82d71e920c | [
"MIT"
] | null | null | null |
# site, moving dimension, direction, index of site representation
| 41.621622 | 152 | 0.635065 |
# site, moving dimension, direction, index of site representation
def get_neighbour_index(n, dim, direction, mu, dimensions, dim_mul, elem_per_site):
if direction:
return (n - n % (dim_mul[dim] * dimensions[dim]) +
(n + dim_mul[dim]) % (dim_mul[dim] * dimensions[dim])) * elem_per_site + mu... | 0 | 0 | 0 | 0 | 0 | 1,426 | 0 | 0 | 45 |