hexsha stringlengths 40 40 | size int64 7 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 125 | 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 125 | 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 125 | 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.77 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 7 1.04M | filtered:remove_function_no_docstring int64 -102 942k | filtered:remove_class_no_docstring int64 -354 977k | filtered:remove_delete_markers int64 0 60.1k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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... | 502 | 1,835 | 100 |
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 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
... | 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
... | 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 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}')
| 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}')
| 0 | 0 | 0 |
2561b7ee33923e406e1d0f174ffc973c43ac7513 | 744 | py | Python | ui_htmx/htmx_render.py | remiberthoz/teachers-rubrics | 355a282e8d4e91e343eef28aaa9b1214b03d3399 | [
"MIT"
] | null | null | null | ui_htmx/htmx_render.py | remiberthoz/teachers-rubrics | 355a282e8d4e91e343eef28aaa9b1214b03d3399 | [
"MIT"
] | null | null | null | ui_htmx/htmx_render.py | remiberthoz/teachers-rubrics | 355a282e8d4e91e343eef28aaa9b1214b03d3399 | [
"MIT"
] | null | null | null | from django.template import Template, RequestContext
| 32.347826 | 97 | 0.599462 | from django.template import Template, RequestContext
def htmx_render_page(request, template, context, rendered_overlay=""):
if "HTTP_HX_REQUEST" not in request.META:
wrapper = f"""{{% extends "ui_htmx/wrapper.html" %}}"""
else:
wrapper = f"""{{% extends "ui_htmx/wrapper_in_body.html" %}}"""
... | 644 | 0 | 46 |
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 |
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 |
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 | 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
# Source for mean, median, and mo... | 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... | 340 | 169 | 23 |
66a74eae7c60911097ab89ee4bc049b6e2193d7d | 47 | py | Python | src/nemo_r4.0.4/tools/OBSTOOLS/OOO/ooo/__init__.py | yumengch/nemo4_pdafomi | c25fa7092ef0ae895d0fe3accdec74254cd85c55 | [
"MIT"
] | 2 | 2021-03-24T11:08:31.000Z | 2021-10-05T12:32:14.000Z | src/nemo_r4.0.4/tools/OBSTOOLS/OOO/ooo/__init__.py | yumengch/nemo4_pdafomi | c25fa7092ef0ae895d0fe3accdec74254cd85c55 | [
"MIT"
] | 1 | 2021-04-24T18:56:09.000Z | 2021-04-24T18:56:09.000Z | src/nemo_r4.0.4/tools/OBSTOOLS/OOO/ooo/__init__.py | yumengch/nemo4_pdafomi | c25fa7092ef0ae895d0fe3accdec74254cd85c55 | [
"MIT"
] | 1 | 2021-04-09T16:25:26.000Z | 2021-04-09T16:25:26.000Z | import nml
import locator
from ooo import main
| 11.75 | 20 | 0.829787 | import nml
import locator
from ooo import main
| 0 | 0 | 0 |
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
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... | 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... | 136 | 13 | 58 |
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 |
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... | 2,909 | 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,render_template
app = Flask(__name__)
@app.route("/")
@app.route("/pagina2")
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... | 841 | 0 | 44 |
8e362eb11b11ae305edc7abbff0e271c2b13782b | 156 | py | Python | src/models/test_predict_model.py | dddTESTxx/Gym-Final | 4ce6eea0291fc4a4d886ce6b26c04b9d46d9aff8 | [
"MIT"
] | null | null | null | src/models/test_predict_model.py | dddTESTxx/Gym-Final | 4ce6eea0291fc4a4d886ce6b26c04b9d46d9aff8 | [
"MIT"
] | null | null | null | src/models/test_predict_model.py | dddTESTxx/Gym-Final | 4ce6eea0291fc4a4d886ce6b26c04b9d46d9aff8 | [
"MIT"
] | null | null | null | import unittest
from predict_model import main
| 15.6 | 42 | 0.75 | import unittest
from predict_model import main
class TestPredictModel(unittest.TestCase):
def test_main_runs(self):
self.assertTrue(main())
| 36 | 21 | 50 |
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 |
853f5f717da777b838791314a170e5d1db34f47a | 2,017 | py | Python | src/pytest_zebrunner/zebrunner_logging.py | p4m-dev/pytest_zebrunner | ceb5cc92727061dd461ad68fad65d29ff1dc9c94 | [
"Apache-2.0"
] | null | null | null | src/pytest_zebrunner/zebrunner_logging.py | p4m-dev/pytest_zebrunner | ceb5cc92727061dd461ad68fad65d29ff1dc9c94 | [
"Apache-2.0"
] | 7 | 2020-11-24T12:19:38.000Z | 2021-03-23T11:53:57.000Z | src/pytest_zebrunner/zebrunner_logging.py | p4m-dev/pytest_zebrunner | ceb5cc92727061dd461ad68fad65d29ff1dc9c94 | [
"Apache-2.0"
] | null | null | null | import logging
import time
from datetime import datetime, timedelta
from logging import LogRecord, StreamHandler
from typing import List
import httpx
from pytest_zebrunner.api.client import ZebrunnerAPI
from pytest_zebrunner.api.models import LogRecordModel
from pytest_zebrunner.context import zebrunner_context
cla... | 32.015873 | 115 | 0.624194 | import logging
import time
from datetime import datetime, timedelta
from logging import LogRecord, StreamHandler
from typing import List
import httpx
from pytest_zebrunner.api.client import ZebrunnerAPI
from pytest_zebrunner.api.models import LogRecordModel
from pytest_zebrunner.context import zebrunner_context
cla... | 110 | 0 | 27 |
d3e3dbd09314b8ef8ed8701b5406eb39be445e43 | 23,128 | py | Python | src/custom_callbacks.py | testingautomated-usi/rl-plasticity-experiments | a32cebcee89f6f734477a1f1bdd8b7f8ef7aa99a | [
"MIT"
] | null | null | null | src/custom_callbacks.py | testingautomated-usi/rl-plasticity-experiments | a32cebcee89f6f734477a1f1bdd8b7f8ef7aa99a | [
"MIT"
] | null | null | null | src/custom_callbacks.py | testingautomated-usi/rl-plasticity-experiments | a32cebcee89f6f734477a1f1bdd8b7f8ef7aa99a | [
"MIT"
] | null | null | null | import os
import time
import warnings
from queue import Queue
from typing import Any, Dict, Optional, Tuple, Union
import gym
import numpy as np
import tensorflow as tf
from stable_baselines.bench import load_results
from stable_baselines.common.callbacks import BaseCallback, EventCallback
from stable_baselines.common... | 44.476923 | 127 | 0.622795 | import os
import time
import warnings
from queue import Queue
from typing import Any, Dict, Optional, Tuple, Union
import gym
import numpy as np
import tensorflow as tf
from stable_baselines.bench import load_results
from stable_baselines.common.callbacks import BaseCallback, EventCallback
from stable_baselines.common... | 19,691 | 31 | 665 |
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.889726... | 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... | 0 | 0 | 0 |
41cb0c9f486921d268d433635ba33038405796ce | 820 | py | Python | python/utils.py | alexjinchina/game-tools | 66c90f3a06921557df8d0c892d002559f1ab7b18 | [
"MIT"
] | null | null | null | python/utils.py | alexjinchina/game-tools | 66c90f3a06921557df8d0c892d002559f1ab7b18 | [
"MIT"
] | null | null | null | python/utils.py | alexjinchina/game-tools | 66c90f3a06921557df8d0c892d002559f1ab7b18 | [
"MIT"
] | null | null | null | import os
import json
| 24.117647 | 67 | 0.573171 | import os
import json
def object_hook(object):
return object # dict(object)
def object_pairs_hook(pairs):
try:
return dict([(int(k), v) for k, v in pairs])
except:
return dict(pairs)
def load_json(data):
if isinstance(data, str) or isinstance(data, unicode):
... | 689 | 0 | 99 |
f6f20c67b98cc6e57af62154dfa67dae00c9b4c1 | 382 | py | Python | src/utils/tests.py | bornhack/bornhack-website | 40ed0875f5129a4c8ae1887e33e7dedb4981dadc | [
"BSD-3-Clause"
] | 7 | 2017-04-14T15:28:29.000Z | 2021-09-10T09:45:38.000Z | src/utils/tests.py | bornhack/bornhack-website | 40ed0875f5129a4c8ae1887e33e7dedb4981dadc | [
"BSD-3-Clause"
] | 799 | 2016-04-28T09:31:50.000Z | 2022-03-29T09:05:02.000Z | src/utils/tests.py | bornhack/bornhack-website | 40ed0875f5129a4c8ae1887e33e7dedb4981dadc | [
"BSD-3-Clause"
] | 35 | 2016-04-28T09:23:53.000Z | 2021-05-02T12:36:01.000Z | from unittest import skip
from django.core.management import call_command
from django.test import TestCase
class ProductAvailabilityTest(TestCase):
"""Test bootstrap_devsite script (touching many codepaths)"""
@skip
def test_bootstrap_script(self):
"""If no orders have been made, the product is ... | 27.285714 | 74 | 0.746073 | from unittest import skip
from django.core.management import call_command
from django.test import TestCase
class ProductAvailabilityTest(TestCase):
"""Test bootstrap_devsite script (touching many codepaths)"""
@skip
def test_bootstrap_script(self):
"""If no orders have been made, the product is ... | 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 |
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 | 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'))... | 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 |
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 |
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.
#
import json
import os
import re
import shutil
from copy import deepcopy... | 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... | 82,655 | 0 | 363 |
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
"""
import re # noqa: F401
import sys # noqa: F4... | 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... | 901 | 0 | 49 |
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
import mitdeeplearning.lab3
| 18.833333 | 27 | 0.884956 | import mitdeeplearning.util
import mitdeeplearning.lab1
import mitdeeplearning.lab2
import mitdeeplearning.lab3
| 0 | 0 | 0 |
39a2b32548c3c35f301e5b9a00dd5feac588184e | 8,031 | py | Python | lib/pysgpp/extensions/datadriven/uq/refinement/RefinementManagerDescriptor.py | valentjn/thesis | 65a0eb7d5f7488aac93882959e81ac6b115a9ea8 | [
"CC0-1.0"
] | 4 | 2022-01-15T19:50:36.000Z | 2022-01-15T20:16:10.000Z | lib/pysgpp/extensions/datadriven/uq/refinement/RefinementManagerDescriptor.py | valentjn/thesis | 65a0eb7d5f7488aac93882959e81ac6b115a9ea8 | [
"CC0-1.0"
] | null | null | null | lib/pysgpp/extensions/datadriven/uq/refinement/RefinementManagerDescriptor.py | valentjn/thesis | 65a0eb7d5f7488aac93882959e81ac6b115a9ea8 | [
"CC0-1.0"
] | null | null | null | from AdmissibleSet import (AdmissibleSparseGridNodeSet,
RefinableNodesSet)
from LocalRefinementStrategy import (CreateAllChildrenRefinement,
ANOVARefinement,
AddNode)
from RefinementManager import RefinementManager
from... | 35.852679 | 99 | 0.676628 | from AdmissibleSet import (AdmissibleSparseGridNodeSet,
RefinableNodesSet)
from LocalRefinementStrategy import (CreateAllChildrenRefinement,
ANOVARefinement,
AddNode)
from RefinementManager import RefinementManager
from... | 4,590 | 1,090 | 767 |
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
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... | 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 |
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... | 20,960 | 0 | 96 |
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
import time
... | 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
... | 86 | 4,948 | 23 |
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 | class MyClass:
"This is my second class"
a = 10
# 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__) | 12 | 0 | 24 |
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
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... | 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 |
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
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... | 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... | 2,601 | 2,039 | 23 |
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 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) | 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():
... | 489 | 0 | 69 |
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
from graphene_django import DjangoObjectType
from ingredients.models import Category, Ingredient
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... | 305 | 730 | 115 |
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
import requests
from urllib.parse import urljoin
from .context import ContextManager, ctx
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):
... | 2,237 | 33 | 203 |
f0e08c0576c65a648ed6a50a36081f717fee72b7 | 1,017 | py | Python | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/email_marketing/migrations/0007_auto_20170809_0653.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 3 | 2021-12-15T04:58:18.000Z | 2022-02-06T12:15:37.000Z | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/email_marketing/migrations/0007_auto_20170809_0653.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | null | null | null | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/email_marketing/migrations/0007_auto_20170809_0653.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 1 | 2019-01-02T14:38:50.000Z | 2019-01-02T14:38:50.000Z | from django.db import migrations, models
| 37.666667 | 153 | 0.66765 | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('email_marketing', '0006_auto_20170711_0615'),
]
operations = [
migrations.AddField(
model_name='emailmarketingconfiguration',
name='sailthru_welcome_template',
... | 0 | 952 | 23 |
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
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.
"""
... | 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.
"""
... | 1,329 | 0 | 182 |
dd89ff10122b142faaef2d39a073ac7aa94db5c9 | 214 | py | Python | data_collection/gazette/spiders/sc_sao_miguel_do_oeste.py | kaiocp/querido-diario | 86004049c6eee305e13066cf3607d30849bb099a | [
"MIT"
] | 454 | 2018-04-07T03:32:57.000Z | 2020-08-17T19:56:22.000Z | data_collection/gazette/spiders/sc_sao_miguel_do_oeste.py | kaiocp/querido-diario | 86004049c6eee305e13066cf3607d30849bb099a | [
"MIT"
] | 254 | 2020-08-18T14:09:43.000Z | 2022-03-28T11:30:51.000Z | data_collection/gazette/spiders/sc_sao_miguel_do_oeste.py | kaiocp/querido-diario | 86004049c6eee305e13066cf3607d30849bb099a | [
"MIT"
] | 183 | 2018-04-11T15:09:37.000Z | 2020-08-15T18:55:11.000Z | from gazette.spiders.base.fecam import FecamGazetteSpider
| 26.75 | 57 | 0.78972 | from gazette.spiders.base.fecam import FecamGazetteSpider
class ScSaoMiguelDoOesteSpider(FecamGazetteSpider):
name = "sc_sao_miguel_do_oeste"
FECAM_QUERY = "cod_entidade:258"
TERRITORY_ID = "4217204"
| 0 | 132 | 23 |
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 |
ff8eec13e5fc02820b6c8401de4021444cbba6c0 | 4,143 | py | Python | ipalm/intermediate_data.py | hartvjir/detectron2 | 3d6cf5f1212ef432358db751e761491d7f60b6d5 | [
"Apache-2.0"
] | null | null | null | ipalm/intermediate_data.py | hartvjir/detectron2 | 3d6cf5f1212ef432358db751e761491d7f60b6d5 | [
"Apache-2.0"
] | null | null | null | ipalm/intermediate_data.py | hartvjir/detectron2 | 3d6cf5f1212ef432358db751e761491d7f60b6d5 | [
"Apache-2.0"
] | null | null | null | import collections
from typing import Tuple, Union, List
import numpy as np
from .mapping_utils import *
class SimpleInstance:
"""
Detected instance inside an image
> processes like so: output.pred_classes, output.scores, output.pred_boxes.tensor
"""
class IntermediateOutput:
"""
Contains al... | 25.262195 | 106 | 0.623703 | import collections
from typing import Tuple, Union, List
import numpy as np
from .mapping_utils import *
class SimpleInstance:
"""
Detected instance inside an image
> processes like so: output.pred_classes, output.scores, output.pred_boxes.tensor
"""
def __init__(self, raw_id, score, bbox):
... | 2,407 | 24 | 881 |
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():
... | 371 | -9 | 589 |
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
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'... | 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 | 359 | 23 |
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 | 0 | 0 |
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 |
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 |
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 |
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
'''
"""
from typing import List
| 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 | 638 | 23 |
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 |
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 | 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 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 | 190 | 46 |
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 accounts, interface, Contract
from brownie import (Bank, SimpleBankConfig, SimplePriceOracle, PancakeswapGoblin,
StrategyAllHTOnly, StrategyLiquidate, StrategyWithdrawMinimizeTrading, StrategyAddTwoSidesOptimal, PancakeswapGoblinConfig, TripleSlopeModel, ConfigurableInterestBank... | 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... | 14,590 | 0 | 69 |
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'
#========================================================================
import numpy as np
from ObservationParser.hierarchies import HierarchicalLossShaper
from Utils.utils import VarDictParser, ObsDictParser
#====================================================... | 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
#====================================================... | 3,876 | 33 | 166 |
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 | 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'
| 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):... | 514 | -7 | 103 |
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 |
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 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)))
| 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 |
7060ad52e2f5d16a49ba2084ecb4dfca04badf3d | 121 | py | Python | python-aws-lambda/lambda_function.py | alexhwoods/deployment-examples | e4a94220b8d483dff3268eb3b07f5e19934c861b | [
"MIT"
] | 28 | 2018-03-05T09:37:23.000Z | 2021-04-13T20:47:58.000Z | python-aws-lambda/lambda_function.py | alexhwoods/deployment-examples | e4a94220b8d483dff3268eb3b07f5e19934c861b | [
"MIT"
] | 162 | 2018-04-08T15:08:28.000Z | 2022-03-20T12:07:12.000Z | python-aws-lambda/lambda_function.py | alexhwoods/deployment-examples | e4a94220b8d483dff3268eb3b07f5e19934c861b | [
"MIT"
] | 39 | 2018-06-27T09:44:43.000Z | 2022-03-02T14:25:31.000Z | from rook.serverless import serverless_rook
@serverless_rook
| 20.166667 | 43 | 0.818182 | from rook.serverless import serverless_rook
@serverless_rook
def lambda_handler(event, context):
return "Hello world"
| 37 | 0 | 22 |
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 |
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 |
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 |
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 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
| 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, ... | 5,926 | -7 | 289 |
d786c04e852c54734f13c3e874c1ebf060ac3cfd | 1,872 | py | Python | asv_bench/benchmarks/dataarray_missing.py | jhamman/xarray-test-docs | c54123772817875678ec7ad769e6d4d6612aeb92 | [
"Apache-2.0"
] | 2 | 2019-09-27T02:29:25.000Z | 2021-01-10T12:52:16.000Z | asv_bench/benchmarks/dataarray_missing.py | jhamman/xarray-test-docs | c54123772817875678ec7ad769e6d4d6612aeb92 | [
"Apache-2.0"
] | 13 | 2021-05-17T06:33:56.000Z | 2022-02-14T14:43:49.000Z | asv_bench/benchmarks/dataarray_missing.py | jhamman/xarray-test-docs | c54123772817875678ec7ad769e6d4d6612aeb92 | [
"Apache-2.0"
] | 1 | 2019-09-27T02:29:53.000Z | 2019-09-27T02:29:53.000Z | import pandas as pd
import xarray as xr
from . import parameterized, randn, requires_dask
| 25.643836 | 81 | 0.534188 | import pandas as pd
import xarray as xr
from . import parameterized, randn, requires_dask
def make_bench_data(shape, frac_nan, chunks):
vals = randn(shape, frac_nan)
coords = {"time": pd.date_range("2000-01-01", freq="D", periods=shape[0])}
da = xr.DataArray(vals, dims=("time", "x", "y"), coords=coords)... | 1,017 | 691 | 69 |
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 base64
import boto3
import os
import json
import time
import uuid
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... | 995 | 0 | 46 |
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 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... | 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... | 1,842 | 0 | 110 |
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
from django.db import migrations, models
| 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 | 514 | 23 |
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."""
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... | 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... | 1,121 | 0 | 76 |
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
from django.db import migrations, models
import django.db.models.deletion
| 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 | 446 | 23 |
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 | 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... | 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 |
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... | 4,269 | 191 | 23 |
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 |
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, render_template, redirect, url_for, flash
from flask_login import login_required, current_user
views = Blueprint("views", __name__)
@views.route("/")
@views.route("/home")
@login_required
| 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... | 82 | 0 | 44 |
3164ba386f887c51673faf0efd914c898379c299 | 3,165 | py | Python | spiderlib/db/utils/db_obj_encoder.py | AmerJod/common | 5e8d498d4565cea1d008e8c0f228e7d9a49f517c | [
"MIT"
] | null | null | null | spiderlib/db/utils/db_obj_encoder.py | AmerJod/common | 5e8d498d4565cea1d008e8c0f228e7d9a49f517c | [
"MIT"
] | null | null | null | spiderlib/db/utils/db_obj_encoder.py | AmerJod/common | 5e8d498d4565cea1d008e8c0f228e7d9a49f517c | [
"MIT"
] | null | null | null |
from sqlalchemy.ext.declarative import DeclarativeMeta
from sqlalchemy.orm.collections import InstrumentedList
from spiderlib.db.db_modules.quote import Quote
from spiderlib.db.db_modules.author import Author
from spiderlib.db.db_modules.tag import Tag
import json
class DBEncoderJson(json.JSONEncoder):
"""
... | 32.628866 | 102 | 0.53207 |
from sqlalchemy.ext.declarative import DeclarativeMeta
from sqlalchemy.orm.collections import InstrumentedList
from spiderlib.db.db_modules.quote import Quote
from spiderlib.db.db_modules.author import Author
from spiderlib.db.db_modules.tag import Tag
import json
class DBEncoderJson(json.JSONEncoder):
"""
... | 1,147 | 0 | 27 |
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 | from django.apps import AppConfig
""" 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 | 121 | 23 |
450d4aa964c32c2ba6d5a38f6f72871881ab571f | 21,553 | py | Python | data_capture.py | ravngr/jtfadump | b443c73cf1940f719d6a6821759e0d0f341c6db3 | [
"MIT"
] | null | null | null | data_capture.py | ravngr/jtfadump | b443c73cf1940f719d6a6821759e0d0f341c6db3 | [
"MIT"
] | null | null | null | data_capture.py | ravngr/jtfadump | b443c73cf1940f719d6a6821759e0d0f341c6db3 | [
"MIT"
] | null | null | null | import equipment
import logging
import os
import time
import numpy
import scipy.io as sio
import mks
import util
| 42.594862 | 118 | 0.641024 | import equipment
import logging
import os
import time
import numpy
import scipy.io as sio
import mks
import util
class DataCapture:
_ROOT_CFG_SECTION = 'data'
def __init__(self, args, cfg, result_dir):
self._args = args
self._cfg = cfg
self._result_dir = result_dir
if self.... | 20,309 | 772 | 333 |
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 ..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`."... | 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 | 0 | 0 |
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)
import time
from simpbot import envvars
from simpbot import localedata
| 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 = []
... | 2,406 | 404 | 23 |
ab76e69aaa6ee2ac6b647e461f9691a7aeb60f8f | 336 | py | Python | odoo-13.0/addons/account/wizard/base_document_layout.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | odoo-13.0/addons/account/wizard/base_document_layout.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | odoo-13.0/addons/account/wizard/base_document_layout.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | from odoo import models
| 28 | 69 | 0.723214 | from odoo import models
class BaseDocumentLayout(models.TransientModel):
_inherit = 'base.document.layout'
def document_layout_save(self):
res = super(BaseDocumentLayout, self).document_layout_save()
for wizard in self:
wizard.company_id.action_save_onboarding_invoice_layout()
... | 196 | 92 | 23 |
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... | 40 | 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 click
import os
import json
### ----------------------------------------------------------------- ###
def check_main(folder, data_dir, csv_dir):
"""
Check if folders exist and if h5 files match csv files.... | 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 | 0 | 0 |
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.
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 ... | 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 |
a17fa19ff999746f65f8d2fbc3ace176fd9aad13 | 8,187 | py | Python | tests/test_specter.py | chris-pollard/specter-desktop | 4cb63a1d6203004b3ecf9196bcfc88c6d8e3803c | [
"MIT"
] | null | null | null | tests/test_specter.py | chris-pollard/specter-desktop | 4cb63a1d6203004b3ecf9196bcfc88c6d8e3803c | [
"MIT"
] | null | null | null | tests/test_specter.py | chris-pollard/specter-desktop | 4cb63a1d6203004b3ecf9196bcfc88c6d8e3803c | [
"MIT"
] | null | null | null | import json, logging, pytest
from decimal import Decimal
from cryptoadvance.specter.helpers import alias, generate_mnemonic
from cryptoadvance.specter.key import Key
from cryptoadvance.specter.rpc import BitcoinRPC
from cryptoadvance.specter.specter import get_rpc, Specter
from cryptoadvance.specter.specter_error impor... | 37.213636 | 89 | 0.686088 | import json, logging, pytest
from decimal import Decimal
from cryptoadvance.specter.helpers import alias, generate_mnemonic
from cryptoadvance.specter.key import Key
from cryptoadvance.specter.rpc import BitcoinRPC
from cryptoadvance.specter.specter import get_rpc, Specter
from cryptoadvance.specter.specter_error impor... | 7,612 | 0 | 91 |
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 |
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 | 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.
| 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... | 3,398 | 4,971 | 208 |
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
import os
import pathlib
import smtplib
import ssl
import config
from message import Message
| 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... | 1,595 | 77 | 23 |
9225875f09690ece0ee8d852cd362042b334f89c | 4,929 | py | Python | svdd.py | irenebenedetto/default-of-credit-card-clients | e0fb330e5bf786aaa81915b5a90a5808e00530c0 | [
"MIT"
] | 3 | 2021-06-07T12:53:30.000Z | 2022-03-03T16:34:10.000Z | svdd.py | irenebenedetto/default-of-credit-card-clients | e0fb330e5bf786aaa81915b5a90a5808e00530c0 | [
"MIT"
] | null | null | null | svdd.py | irenebenedetto/default-of-credit-card-clients | e0fb330e5bf786aaa81915b5a90a5808e00530c0 | [
"MIT"
] | 3 | 2021-04-02T20:36:49.000Z | 2021-06-28T21:29:08.000Z | import numpy as np
import xpress as xp | 34.468531 | 192 | 0.537634 | import numpy as np
import xpress as xp
class SVDD:
def __init__(self, **params):
"""
The class implement the Support Vector Data Description method for novelty detection as in paper https://www.researchgate.net/publication/226109293_Support_Vector_Data_Description.
The class make us... | 0 | 4,868 | 23 |
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
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_table_config(catalog, schema_name, table_name):
"""
This function adds t... | 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... | 3,867 | 0 | 23 |
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 |
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 |
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
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': [... | 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': [... | 904 | 0 | 92 |
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 | 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
... | 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
... | 1,642 | 0 | 132 |
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 ba... | 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... | 1,348 | 0 | 69 |
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 = ... | 5,731 | 1,827 | 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 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... | 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... | 2,248 | 0 | 23 |
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, 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... | 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... | 4,658 | 0 | 555 |
123c19b848b59ad1e4ea9cab0c9140b5df8dc7d9 | 2,151 | py | Python | ajax_backend/ajax_rating.py | PatchyVideo/PatchyVideo | cafbdfa34591d7292090d5e67bb633b974447b64 | [
"MIT"
] | 13 | 2020-06-04T00:25:24.000Z | 2022-03-31T13:12:17.000Z | ajax_backend/ajax_rating.py | PatchyVideo/PatchyVideo | cafbdfa34591d7292090d5e67bb633b974447b64 | [
"MIT"
] | 1 | 2021-01-03T04:17:45.000Z | 2021-02-07T14:19:04.000Z | ajax_backend/ajax_rating.py | PatchyVideo/PatchyVideo | cafbdfa34591d7292090d5e67bb633b974447b64 | [
"MIT"
] | null | null | null |
from flask import render_template, request, current_app, jsonify, redirect, session
from init import app
from utils.interceptors import jsonRequest, loginRequiredJSON, loginOptional
from utils.jsontools import *
from utils.exceptions import UserError
from utils import getDefaultJSON
from services.rating import rateV... | 39.109091 | 139 | 0.79126 |
from flask import render_template, request, current_app, jsonify, redirect, session
from init import app
from utils.interceptors import jsonRequest, loginRequiredJSON, loginOptional
from utils.jsontools import *
from utils.exceptions import UserError
from utils import getDefaultJSON
from services.rating import rateV... | 990 | 0 | 132 |
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 |
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 |
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, include
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 |
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 -*-
import re
| 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,... | 904 | 0 | 46 |
01a51ebb33b2586697bd9a1890b9da21313e8074 | 652 | py | Python | classes/Item.py | avalanche05/twotwo | 39753aa7fb45846c75decec0a80a140286b8a4b7 | [
"Apache-2.0"
] | null | null | null | classes/Item.py | avalanche05/twotwo | 39753aa7fb45846c75decec0a80a140286b8a4b7 | [
"Apache-2.0"
] | null | null | null | classes/Item.py | avalanche05/twotwo | 39753aa7fb45846c75decec0a80a140286b8a4b7 | [
"Apache-2.0"
] | null | null | null | import Constant
| 34.315789 | 95 | 0.532209 | import Constant
class Item:
def __init__(self, name: str, count: int, barcode: str, owner_id: int, price: float):
self.values_name = f'{Constant.NAME}, {Constant.COUNT},' \
f' {Constant.BARCODE}, {Constant.OWNER_ID}, ' \
f'{Constant.PRICE}'
sel... | 569 | -10 | 76 |
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."""
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... | 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 | 0 | 0 |
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 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... | 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... | 1,816 | -1 | 130 |