hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e4ba6ef688aa37560a69eb7860a151045a256156 | 1,156 | py | Python | Project.py | nishitde/Data-Dictionary | 4da47de16739d3a255c36b1060244d7cb1df6bae | [
"MIT"
] | null | null | null | Project.py | nishitde/Data-Dictionary | 4da47de16739d3a255c36b1060244d7cb1df6bae | [
"MIT"
] | null | null | null | Project.py | nishitde/Data-Dictionary | 4da47de16739d3a255c36b1060244d7cb1df6bae | [
"MIT"
] | null | null | null | import json
from difflib import get_close_matches
data = json.load(open("data.json"))
word = input("Enter a word: ")
try:
output = (translate(word))
if (type(output) == list):
for item in output:
print(item)
else:
print(output)
except KeyError:
print("... | 28.195122 | 85 | 0.50519 |
e4bd27232f18521dba7be29751865723323f35e8 | 94 | py | Python | rust/resources/api/resources.py | AsiaLi/rust | 9954d2bd9c337376840d638c6ac5af6d9a32ed28 | [
"Apache-2.0"
] | 5 | 2018-02-08T04:31:52.000Z | 2020-05-08T00:59:05.000Z | rust/resources/api/resources.py | AsiaLi/rust | 9954d2bd9c337376840d638c6ac5af6d9a32ed28 | [
"Apache-2.0"
] | 2 | 2019-03-23T03:14:06.000Z | 2019-04-19T07:51:55.000Z | rust/resources/api/resources.py | AsiaLi/rust | 9954d2bd9c337376840d638c6ac5af6d9a32ed28 | [
"Apache-2.0"
] | 4 | 2019-02-20T04:35:33.000Z | 2020-05-07T13:46:27.000Z | #coding: utf8
"""
built-in, .
, settingsRUST_RESOURCES
""" | 15.666667 | 43 | 0.787234 |
e4be20e88f19e786bc1af90364e0539952a470e3 | 88 | py | Python | django_mix_admin/__init__.py | longminxiang/django_mix_admin | 375cca608b3128c7f96045628bb863e9b49a8b15 | [
"MIT"
] | null | null | null | django_mix_admin/__init__.py | longminxiang/django_mix_admin | 375cca608b3128c7f96045628bb863e9b49a8b15 | [
"MIT"
] | null | null | null | django_mix_admin/__init__.py | longminxiang/django_mix_admin | 375cca608b3128c7f96045628bb863e9b49a8b15 | [
"MIT"
] | null | null | null | __version_info__ = (0, 1, 5)
__version__ = '.'.join([str(v) for v in __version_info__])
| 29.333333 | 58 | 0.681818 |
e4c0d071d3b7e4c6ad479ab79343874462a2daf0 | 2,173 | py | Python | tests/openwisp2/settings.py | MiHiR151203/django-x509 | fed09c9948fb81ab79ab9e541590ce2e398dd81e | [
"BSD-3-Clause"
] | 410 | 2016-07-18T20:07:34.000Z | 2022-03-28T11:21:58.000Z | tests/openwisp2/settings.py | devkapilbansal/django-x509 | fe67255028a5437ac8e918831e39698c7e6c661a | [
"BSD-3-Clause"
] | 120 | 2016-09-13T10:36:10.000Z | 2022-02-24T15:36:42.000Z | tests/openwisp2/settings.py | devkapilbansal/django-x509 | fe67255028a5437ac8e918831e39698c7e6c661a | [
"BSD-3-Clause"
] | 85 | 2016-09-05T21:36:12.000Z | 2022-03-19T13:44:13.000Z | import os
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
DEBUG = True
ALLOWED_HOSTS = []
DATABASES = {
'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'djangox509.db'}
}
SECRET_KEY = 'fn)t*+$)ugeyip6-#txyy$5wf2ervc0d2n#h)qb)y5@ly$t*@w'
INSTALLED_APPS = [
'django.contrib.auth',
'djan... | 28.592105 | 81 | 0.678785 |
e4c31aee7bfbc8595d53ad5906b60459c10165ee | 3,472 | py | Python | service/recv_setup.py | mikroncoin/mikron_restapi_py | 79cd47c8f26615ccd27c9764c92299f8cebd578a | [
"BSD-2-Clause"
] | null | null | null | service/recv_setup.py | mikroncoin/mikron_restapi_py | 79cd47c8f26615ccd27c9764c92299f8cebd578a | [
"BSD-2-Clause"
] | 6 | 2018-09-27T07:12:28.000Z | 2019-08-14T10:13:13.000Z | service/recv_setup.py | mikroncoin/mikron_restapi_py | 79cd47c8f26615ccd27c9764c92299f8cebd578a | [
"BSD-2-Clause"
] | null | null | null | import config
import recv_db
import node_rpc_helper
import threading
from time import sleep, time
setup_check_background_result = {"msg": "(uninitialized)"}
config = config.readConfig()
last_check_time = time() - 10000
# Check the receiver accounts; compare accounts in the node wallets and in the DB
#config = confi... | 32.754717 | 93 | 0.616647 |
e4c4cb3330bd82155cdbb03b29afb2dbeedea99b | 23,602 | py | Python | pysnmp-with-texts/NSCHippiSonet-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/NSCHippiSonet-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/NSCHippiSonet-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module NSCHippiSonet-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/NSCHippiSonet-MIB
# Produced by pysmi-0.3.4 at Wed May 1 14:25:03 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Ma... | 125.542553 | 3,243 | 0.800398 |
e4c4f544669d2e4b222ccb9bd7786787ddb72fee | 784 | py | Python | 2015/day/2/solution.py | iangregson/advent-of-code | e2a2dde30dcaed027a5ba78f9270f8a1976577f1 | [
"MIT"
] | null | null | null | 2015/day/2/solution.py | iangregson/advent-of-code | e2a2dde30dcaed027a5ba78f9270f8a1976577f1 | [
"MIT"
] | null | null | null | 2015/day/2/solution.py | iangregson/advent-of-code | e2a2dde30dcaed027a5ba78f9270f8a1976577f1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
dir_path = os.path.dirname(os.path.realpath(__file__))
file = open(dir_path + "/input.txt", "r")
lines = file.readlines()
lines = [line.strip() for line in lines]
# lines = ["2x3x4", "1x1x10"]
total = 0
for line in lines:
l, w, h = [int(v) for v in line.split('x')]
side1 = ... | 21.777778 | 54 | 0.598214 |
e4c526448ad55197755fe945ed7cc9cdffa6ce97 | 1,522 | py | Python | setup.py | camp-zju/HHypermap | f65133f2a45188ccc91dca48ea5a7f6d5afa1c18 | [
"MIT"
] | 6 | 2018-04-17T03:07:06.000Z | 2022-01-11T00:14:42.000Z | setup.py | camp-zju/HHypermap | f65133f2a45188ccc91dca48ea5a7f6d5afa1c18 | [
"MIT"
] | 23 | 2018-05-14T21:13:58.000Z | 2022-03-21T22:16:40.000Z | setup.py | camp-zju/HHypermap | f65133f2a45188ccc91dca48ea5a7f6d5afa1c18 | [
"MIT"
] | 2 | 2019-09-18T05:48:03.000Z | 2020-03-19T07:06:29.000Z | import os
from distutils.core import setup
from distutils.command.install import INSTALL_SCHEMES
from setuptools import find_packages
from hypermap import __version__, __description__
setup(
name=__description__,
version=__version__,
author='',
author_email='',
url='https://github.com/cga-harvard... | 24.548387 | 70 | 0.581472 |
e4c67370682280607f52d85bc867fcf1b22bcd29 | 2,611 | py | Python | src/utils/__init__.py | ppolewicz/screeps-starter-python | dd2f5646a53c9353bf99e976e5f362e297715e96 | [
"MIT"
] | null | null | null | src/utils/__init__.py | ppolewicz/screeps-starter-python | dd2f5646a53c9353bf99e976e5f362e297715e96 | [
"MIT"
] | null | null | null | src/utils/__init__.py | ppolewicz/screeps-starter-python | dd2f5646a53c9353bf99e976e5f362e297715e96 | [
"MIT"
] | null | null | null | from creeps.scheduled_action import ScheduledAction
AROUND_OFFSETS = (
(
(-1, -1),
(-1, 0),
(-1, 1),
(0, 1),
(0, -1),
(1, -1),
(1, 0),
(1, 1),
),
(
(1, -2),
(0, -2),
(-1, -2),
(-2, -2),
(-2, -1),
... | 23.522523 | 91 | 0.550747 |
e4c8185a2c9690234bd9c6872e272faa663e2d58 | 2,419 | py | Python | src/sidecar/connection.py | aldanor/sidecar | 5353bc4120a01460f6b1e51ea8e1fcafb0524782 | [
"Apache-2.0"
] | null | null | null | src/sidecar/connection.py | aldanor/sidecar | 5353bc4120a01460f6b1e51ea8e1fcafb0524782 | [
"Apache-2.0"
] | null | null | null | src/sidecar/connection.py | aldanor/sidecar | 5353bc4120a01460f6b1e51ea8e1fcafb0524782 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import json
import logging
import os
from sockjs.tornado import SockJSRouter, SockJSConnection
from tornado.web import RequestHandler, StaticFileHandler
from tornado.web import Application
from tornado.ioloop import IOLoop
from sidecar.utils import log
| 26.582418 | 76 | 0.613477 |
e4c9e7db24e7faa2d384c8fed0def5b98126bad5 | 4,584 | py | Python | recognizer/sat_plan_recognizer.py | RukNdf/MA-Landmark | 4038ebe7edc9e353e1987479f5f9edc528a4bd2a | [
"Unlicense"
] | null | null | null | recognizer/sat_plan_recognizer.py | RukNdf/MA-Landmark | 4038ebe7edc9e353e1987479f5f9edc528a4bd2a | [
"Unlicense"
] | null | null | null | recognizer/sat_plan_recognizer.py | RukNdf/MA-Landmark | 4038ebe7edc9e353e1987479f5f9edc528a4bd2a | [
"Unlicense"
] | null | null | null | import time
from z3 import Solver, Implies, sat, Const, Function, IntSort, ForAll, DeclareSort
from recognizer.pddl.pddl_planner import applicable
from recognizer.pddl.sat_planner import SATPlanner
from recognizer.plan_recognizer import PlanRecognizer
| 43.245283 | 123 | 0.610384 |
e4cb77ef15c6281746b9224f3a653571c3753950 | 925 | py | Python | USPTO-15K/scripts/coverage.py | wengong-jin/nips17-rexgen | fb7dea369b0721b88cd0133a7d66348d244f65d3 | [
"MIT"
] | 113 | 2017-09-22T19:42:50.000Z | 2022-02-05T03:11:27.000Z | USPTO-15K/scripts/coverage.py | wibrow/nips17-rexgen | fb7dea369b0721b88cd0133a7d66348d244f65d3 | [
"MIT"
] | 6 | 2017-11-18T05:54:49.000Z | 2021-03-04T08:28:46.000Z | USPTO-15K/scripts/coverage.py | wibrow/nips17-rexgen | fb7dea369b0721b88cd0133a7d66348d244f65d3 | [
"MIT"
] | 41 | 2017-12-13T02:32:10.000Z | 2022-01-09T06:39:40.000Z | cand = open('lbp-bond/data.cbond')
gold = open('data/connor_split.csv')
tot,good = 0,0
for line in cand:
cand_bonds = []
for v in line.split():
x,y = v.split('-')
cand_bonds.append((int(x),int(y)))
line = gold.readline()
items = line.split()
if items[1] != 'test': continue
... | 25 | 46 | 0.484324 |
e4cbdc38c4ab5669908483516a67bda51e21ba7f | 1,431 | py | Python | somato/06_dipole.py | larsoner/beamformer_simulation | ebc9cfc8bc73434ecd995c3b85560db962642307 | [
"BSD-3-Clause"
] | 2 | 2019-06-03T21:09:24.000Z | 2020-05-29T20:53:22.000Z | somato/06_dipole.py | larsoner/beamformer_simulation | ebc9cfc8bc73434ecd995c3b85560db962642307 | [
"BSD-3-Clause"
] | null | null | null | somato/06_dipole.py | larsoner/beamformer_simulation | ebc9cfc8bc73434ecd995c3b85560db962642307 | [
"BSD-3-Clause"
] | 4 | 2019-07-14T02:44:40.000Z | 2020-05-28T18:05:26.000Z | import os.path as op
import numpy as np
import matplotlib.pyplot as plt
import mne
from nilearn.plotting import plot_anat
from config import fname, subject_id, n_jobs
report = mne.open_report(fname.report)
epochs = mne.read_epochs(fname.epochs)
noise_cov = mne.compute_covariance(epochs, tmin=-0.2, tmax=0, method='s... | 36.692308 | 91 | 0.750524 |
e4cbe718ce99cfda8db68cebd8b2f70d40be2a56 | 299 | py | Python | Exercicios/Resposta-EstruturaDeDecisao/Exerc_4.py | ThaisAlves7/Exercicios_PythonBrasil | 3c55f56c44b4da9953a79398859e7c73a155dc0e | [
"MIT"
] | null | null | null | Exercicios/Resposta-EstruturaDeDecisao/Exerc_4.py | ThaisAlves7/Exercicios_PythonBrasil | 3c55f56c44b4da9953a79398859e7c73a155dc0e | [
"MIT"
] | null | null | null | Exercicios/Resposta-EstruturaDeDecisao/Exerc_4.py | ThaisAlves7/Exercicios_PythonBrasil | 3c55f56c44b4da9953a79398859e7c73a155dc0e | [
"MIT"
] | null | null | null | # Faa um programa que verifique se uma letra digitada vogal ou consoante.
vogais = ['A', 'E', 'I', 'O', 'U']
letra = input('Digite uma letra: ').strip()
letra = letra.capitalize()
if letra in vogais:
print(f'A letra {letra} uma vogal')
else:
print(f'A letra {letra} uma consoante') | 27.181818 | 76 | 0.655518 |
e4cc0d2e30cb90d31f4c75e015c940d7ee00182a | 19,236 | py | Python | extras/simpleperf/runtest/runtest.py | Keneral/asystem | df12381b72ef3d629c8efc61100cc8c714195320 | [
"Unlicense"
] | null | null | null | extras/simpleperf/runtest/runtest.py | Keneral/asystem | df12381b72ef3d629c8efc61100cc8c714195320 | [
"Unlicense"
] | null | null | null | extras/simpleperf/runtest/runtest.py | Keneral/asystem | df12381b72ef3d629c8efc61100cc8c714195320 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (C) 2015 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | 32.548223 | 78 | 0.629289 |
e4cc48259575ae3ff337d2ba3e8068256382c270 | 21,443 | py | Python | summarization_utils.py | allenai/advisor | 6849755042c6dab1488f64cf21bde2322add3cc1 | [
"Apache-2.0"
] | 5 | 2021-12-13T18:21:35.000Z | 2022-03-27T17:18:09.000Z | summarization_utils.py | allenai/advisor | 6849755042c6dab1488f64cf21bde2322add3cc1 | [
"Apache-2.0"
] | null | null | null | summarization_utils.py | allenai/advisor | 6849755042c6dab1488f64cf21bde2322add3cc1 | [
"Apache-2.0"
] | null | null | null | import ast
import hashlib
import json
import os
from collections import defaultdict
from typing import Tuple, Sequence, Dict, Optional, Union, Any, Set
import compress_pickle
import matplotlib.pyplot as plt
import numpy as np
import pandas
import pandas as pd
from filelock import FileLock
from allenact.utils.misc_uti... | 36.221284 | 88 | 0.533834 |
e4d1a5ffa7594bfb272d1e801de25c346e704f41 | 159 | py | Python | finished/edabit/very_easy/return_sum.py | UltiRequiem/daily-python-practice | 31f72c45378be90b8fcadd30d7042819ee551a17 | [
"MIT"
] | 8 | 2021-05-29T23:30:12.000Z | 2021-09-24T03:25:44.000Z | finished/edabit/very_easy/return_sum.py | UltiRequiem/daily-python-practice | 31f72c45378be90b8fcadd30d7042819ee551a17 | [
"MIT"
] | null | null | null | finished/edabit/very_easy/return_sum.py | UltiRequiem/daily-python-practice | 31f72c45378be90b8fcadd30d7042819ee551a17 | [
"MIT"
] | 6 | 2021-06-02T14:20:24.000Z | 2021-08-19T00:49:26.000Z |
# addition_lambda = lambda x, y: x + y
# Test:
if __name__ == "__main__":
print(addition(78, 98))
| 15.9 | 38 | 0.591195 |
e4d249940b5e4b94dccb108c35a99b6f1dfb8b25 | 899 | py | Python | mylog.py | james-prior/python-asyncio-experiments | eeda9aafe855f2ef666c694cc6fa85ceef91cfe5 | [
"MIT"
] | null | null | null | mylog.py | james-prior/python-asyncio-experiments | eeda9aafe855f2ef666c694cc6fa85ceef91cfe5 | [
"MIT"
] | null | null | null | mylog.py | james-prior/python-asyncio-experiments | eeda9aafe855f2ef666c694cc6fa85ceef91cfe5 | [
"MIT"
] | null | null | null | import datetime
def log(message):
'''
prints a line with:
elapsed time since this function was first called
elapsed time since this function was previously called
message
Elapsed times are shown in seconds with microsecond resolution
although one does not know what the accuracy... | 24.972222 | 66 | 0.694105 |
e4d3a3a4b5231dc56cb563722643de1889b8ff1c | 9,563 | py | Python | scripts/lmpsizes.py | elor/lmputils | 5fd38f7ef8fe50f580c530e2a7b457421c6525e5 | [
"MIT"
] | 1 | 2016-06-25T13:13:01.000Z | 2016-06-25T13:13:01.000Z | scripts/lmpsizes.py | elor/lmputils | 5fd38f7ef8fe50f580c530e2a7b457421c6525e5 | [
"MIT"
] | null | null | null | scripts/lmpsizes.py | elor/lmputils | 5fd38f7ef8fe50f580c530e2a7b457421c6525e5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys, re
# init
stdin=None
try:
sys.argv.index('-h')
printHelp()
sys.exit(1)
except ValueError:
pass
try:
sys.argv.index('--help')
printHelp()
sys.exit(1)
except ValueError:
pass
if len(sys.argv) < 2:
suggestHelp()
sys.exit(1)
srcname = sys.argv[1]
# daisychain o... | 24.583548 | 233 | 0.594165 |
e4d4b64f36bac32559212d9f09ad4caa0d9bfce2 | 286 | py | Python | tests/superset_test_config.py | manueliglesiasgarcia/superset-api-client | 268b36d3b9694895f0e4a9595af7b592ac7c5b77 | [
"Apache-2.0"
] | 11 | 2021-05-07T16:34:52.000Z | 2022-03-17T07:54:56.000Z | tests/superset_test_config.py | manueliglesiasgarcia/superset-api-client | 268b36d3b9694895f0e4a9595af7b592ac7c5b77 | [
"Apache-2.0"
] | 10 | 2021-10-08T20:03:59.000Z | 2022-03-18T18:28:09.000Z | tests/superset_test_config.py | manueliglesiasgarcia/superset-api-client | 268b36d3b9694895f0e4a9595af7b592ac7c5b77 | [
"Apache-2.0"
] | 6 | 2021-07-09T18:23:09.000Z | 2022-03-19T09:23:19.000Z | """Configuration for tests"""
import tempfile
DEBUG = True
TESTING = True
WTF_CSRF_ENABLED = False
# APP CONFIG
# Creating a tempfile
SQLALCHEMY_DATABASE_URI = f"sqlite://{tempfile.mkdtemp()}/test.db"
# WEBSERVER
SUPERSET_WEBSERVER_ADDRESS = "0.0.0.0"
SUPERSET_WEBSERVER_PORT = 8080
| 19.066667 | 66 | 0.765734 |
e4d7188d1126cf74926c3e66a423812722a2540a | 22,051 | py | Python | special_k/tests/test_signing.py | namoopsoo/special_k | 816ad200e8608d862e20971dc2bc4d2724aaf0bc | [
"Apache-2.0"
] | null | null | null | special_k/tests/test_signing.py | namoopsoo/special_k | 816ad200e8608d862e20971dc2bc4d2724aaf0bc | [
"Apache-2.0"
] | null | null | null | special_k/tests/test_signing.py | namoopsoo/special_k | 816ad200e8608d862e20971dc2bc4d2724aaf0bc | [
"Apache-2.0"
] | null | null | null | # Copyright 2020-present Kensho Technologies, LLC.
from datetime import datetime
import glob
import os
import time
from unittest.mock import Mock
import funcy
import gpg
import pytest
from . import _UNSAFE_KEY_PASSPHRASE, FAKE_KEYS_DIR, TESTING_ENVVAR, TRUSTED_DIR_ENVVAR
from ..check_gpg_keys import (
_verify_tru... | 42.984405 | 100 | 0.655072 |
e4d7579cdae9a7c92d24f6e21579f1d1d07cf7c1 | 4,054 | py | Python | setup.py | crcrewso/qatrackplus | b9da3bc542d9e3eca8b7291bb631d1c7255d528e | [
"MIT"
] | 20 | 2021-03-11T18:37:32.000Z | 2022-03-23T19:38:07.000Z | setup.py | crcrewso/qatrackplus | b9da3bc542d9e3eca8b7291bb631d1c7255d528e | [
"MIT"
] | 75 | 2021-02-12T02:37:33.000Z | 2022-03-29T20:56:16.000Z | setup.py | crcrewso/qatrackplus | b9da3bc542d9e3eca8b7291bb631d1c7255d528e | [
"MIT"
] | 5 | 2021-04-07T15:46:53.000Z | 2021-09-18T16:55:00.000Z | import os
import re
from setuptools import find_packages, setup
root = os.path.dirname(__file__)
settingsf = open(os.path.join(root, 'qatrack', 'settings.py'), 'r')
__version__ = re.findall(r"""VERSION\s+=\s+['"]+(.*)['"]""", settingsf.read())[0]
setup(
name='qatrackplus',
version=__version__,
packages... | 37.192661 | 149 | 0.580168 |
e4d7953efcb7408bce5180ef4d3341f1a6b7b1ad | 4,603 | py | Python | src/models/CORAL-LM/coral/interactive.py | behavioral-data/multiverse | 82b7265de0aa3e9d229ce9f3f86b8b48435ca365 | [
"MIT"
] | null | null | null | src/models/CORAL-LM/coral/interactive.py | behavioral-data/multiverse | 82b7265de0aa3e9d229ce9f3f86b8b48435ca365 | [
"MIT"
] | null | null | null | src/models/CORAL-LM/coral/interactive.py | behavioral-data/multiverse | 82b7265de0aa3e9d229ce9f3f86b8b48435ca365 | [
"MIT"
] | 1 | 2021-08-19T15:21:50.000Z | 2021-08-19T15:21:50.000Z | import argparse
from torch.utils.data import DataLoader
from .model import BERT
from .trainer import BERTTrainer
from .dataset import DataReader, UnitedVocab, CORALDataset, my_collate, key_lib
import pdb
import os
import json
import torch
if __name__ == '__main__':
main() | 38.358333 | 142 | 0.582663 |
e4d9a9c56221ae7e0e31c377fd09796258aef2bc | 532 | py | Python | tutorials/conversational_search/Tutorial6_Binary_Passage_Retriever.py | giguru/converse | bfe5ccc0af50455074abf7926a31145ac96834a5 | [
"Apache-2.0"
] | 9 | 2020-10-23T14:39:45.000Z | 2021-11-16T10:37:11.000Z | tutorials/conversational_search/Tutorial6_Binary_Passage_Retriever.py | giguru/converse | bfe5ccc0af50455074abf7926a31145ac96834a5 | [
"Apache-2.0"
] | 12 | 2020-10-07T08:07:51.000Z | 2020-10-22T14:20:19.000Z | tutorials/conversational_search/Tutorial6_Binary_Passage_Retriever.py | giguru/converse | bfe5ccc0af50455074abf7926a31145ac96834a5 | [
"Apache-2.0"
] | null | null | null | from haystack import Pipeline
from haystack.retriever.anserini import DenseAnseriniRetriever
# LOAD COMPONENTS
retriever = DenseAnseriniRetriever(prebuilt_index_name="wikipedia-bpr-single-nq-hash",
binary=True,
query_encoder="castorini/bpr-nq-questi... | 31.294118 | 86 | 0.682331 |
e4da6f2e214530239d7254ffdc625a7c298a5b02 | 854 | py | Python | ros_system_ws/src/vector79/scripts/voltage_monitor.py | DrClick/ARCRacing | 4428a244c5a4627f4550eba066657b5a87ff0602 | [
"MIT"
] | 7 | 2016-12-15T22:24:04.000Z | 2018-12-27T05:48:45.000Z | ros_system_ws/src/vector79/scripts/voltage_monitor.py | DrClick/ARCRacing | 4428a244c5a4627f4550eba066657b5a87ff0602 | [
"MIT"
] | null | null | null | ros_system_ws/src/vector79/scripts/voltage_monitor.py | DrClick/ARCRacing | 4428a244c5a4627f4550eba066657b5a87ff0602 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import rospy
from std_msgs.msg import String, Float32
import time
import subprocess
if __name__ == '__main__':
voltage_monitor()
| 27.548387 | 124 | 0.661593 |
e4db245f6a04cd11be89f16f10ad98de90bdf524 | 2,739 | py | Python | spark_auto_mapper_fhir/value_sets/entity_name_use.py | icanbwell/SparkAutoMapper.FHIR | 98f368e781b46523142c7cb513c670d659a93c9b | [
"Apache-2.0"
] | 1 | 2021-11-18T18:06:45.000Z | 2021-11-18T18:06:45.000Z | spark_auto_mapper_fhir/value_sets/entity_name_use.py | icanbwell/SparkAutoMapper.FHIR | 98f368e781b46523142c7cb513c670d659a93c9b | [
"Apache-2.0"
] | null | null | null | spark_auto_mapper_fhir/value_sets/entity_name_use.py | icanbwell/SparkAutoMapper.FHIR | 98f368e781b46523142c7cb513c670d659a93c9b | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
from spark_auto_mapper_fhir.fhir_types.uri import FhirUri
from spark_auto_mapper_fhir.value_sets.generic_type import GenericTypeCode
from spark_auto_mapper.type_definitions.defined_types import AutoMapperTextInputType
# This file is auto-generated by generate_classes so do not edi... | 36.52 | 86 | 0.717415 |
e4dde971f2e70ab06559858e0fab7f650c0ab505 | 94,984 | py | Python | ktapp/models.py | cu2/KT | 8a0964b77dce150358637faa679d969a07e42f07 | [
"CC-BY-3.0"
] | 5 | 2015-04-13T09:44:31.000Z | 2017-10-19T01:07:58.000Z | ktapp/models.py | cu2/KT | 8a0964b77dce150358637faa679d969a07e42f07 | [
"CC-BY-3.0"
] | 49 | 2015-02-15T07:12:05.000Z | 2022-03-11T23:11:43.000Z | ktapp/models.py | cu2/KT | 8a0964b77dce150358637faa679d969a07e42f07 | [
"CC-BY-3.0"
] | null | null | null | import datetime
import hashlib
import json
import os
import random
import string
from PIL import Image
from urlparse import urlparse
from django.conf import settings
from django.db import models, connection
from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin, UserManager
from django.core.mail imp... | 43.411335 | 186 | 0.685263 |
e4de17c6c2bcdd5dac773b36cd590020f73017b2 | 322 | py | Python | ntsa/models/__init__.py | d3sm0/ntsa | cf5680c20fec3316eef90af86014f642b88bfbf2 | [
"MIT"
] | 15 | 2018-11-26T14:35:29.000Z | 2021-06-07T04:48:42.000Z | ntsa/models/__init__.py | d3sm0/ntsa | cf5680c20fec3316eef90af86014f642b88bfbf2 | [
"MIT"
] | 10 | 2020-01-28T22:29:29.000Z | 2021-12-13T19:52:10.000Z | ntsa/models/__init__.py | d3sm0/ntsa | cf5680c20fec3316eef90af86014f642b88bfbf2 | [
"MIT"
] | 4 | 2020-02-14T13:01:57.000Z | 2021-01-01T19:06:38.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from .model import Base
from .model import Dense
from .model import SeriesNet
from .model import NP
from .model import CNP
from .model import RNN
from .model import Seq2Seq
from .model import DARNN
from .model import RGAN
from .model import CRGAN
from .model import CGAN... | 16.947368 | 28 | 0.748447 |
e4de733e5c0ae2e4678e9cda8d9bbc096dd360a5 | 594 | py | Python | server/grpc/pyserver.py | Panthereum/DigitalBeing | 7fda011f34dd62c03d1072035ae0ad2a129281a7 | [
"MIT"
] | 53 | 2021-07-20T04:01:57.000Z | 2022-03-13T17:31:08.000Z | server/grpc/pyserver.py | Panthereum/DigitalBeing | 7fda011f34dd62c03d1072035ae0ad2a129281a7 | [
"MIT"
] | 58 | 2021-08-20T02:22:16.000Z | 2021-12-13T10:38:58.000Z | server/grpc/pyserver.py | Panthereum/DigitalBeing | 7fda011f34dd62c03d1072035ae0ad2a129281a7 | [
"MIT"
] | 13 | 2021-08-23T20:16:14.000Z | 2022-01-31T23:59:21.000Z | import logging
import time
# import the original example.py
from handler import DigitalBeing as DB
logger = logging.getLogger('server_logger')
logger.setLevel(logging.DEBUG)
# create file handler which logs even debug messages
fh = logging.FileHandler('grpc_server.log')
fh.setLevel(logging.DEBUG)
logger.addHandler(f... | 22.846154 | 61 | 0.754209 |
e4debd4280513f51ffae81a74e479547f07c0088 | 2,679 | py | Python | app/tg/routes.py | EeOneDown/spbu4u | 2ad01088fb167c80c53b757a0247fc5cde34c20f | [
"Apache-2.0"
] | 30 | 2017-09-14T20:25:43.000Z | 2022-03-12T09:55:35.000Z | app/tg/routes.py | EeOneDown/spbu4u | 2ad01088fb167c80c53b757a0247fc5cde34c20f | [
"Apache-2.0"
] | 59 | 2018-01-12T18:29:24.000Z | 2019-03-08T21:08:40.000Z | app/tg/routes.py | EeOneDown/spbu4u | 2ad01088fb167c80c53b757a0247fc5cde34c20f | [
"Apache-2.0"
] | 8 | 2017-12-01T18:36:04.000Z | 2020-11-22T00:36:15.000Z | import logging
from json import loads
from time import time
from flask import request, abort
from telebot.apihelper import ApiException
from telebot.types import Update
from app import db, new_functions as nf
from app.constants import (
webhook_url_base, webhook_url_path, ids, other_error_answer
)
from app.models... | 28.806452 | 75 | 0.591639 |
e4df95cc2cdc1f1463a8b2b8946b91a69dbe5207 | 7,391 | py | Python | prysm/segmented.py | deisenroth/prysm | 53a400ef89697041f67192e879e61ad28c451318 | [
"MIT"
] | 110 | 2017-09-28T05:24:22.000Z | 2022-03-17T17:34:08.000Z | prysm/segmented.py | mjhoptics/prysm | 5dea335e068d04d1006741d8eb02278181751f73 | [
"MIT"
] | 82 | 2018-01-03T03:52:42.000Z | 2022-02-02T02:30:19.000Z | prysm/segmented.py | mjhoptics/prysm | 5dea335e068d04d1006741d8eb02278181751f73 | [
"MIT"
] | 28 | 2017-12-28T02:47:55.000Z | 2022-03-29T02:10:11.000Z | """Tools for working with segmented systems."""
from collections import namedtuple
import numpy as truenp
from .geometry import regular_polygon
from .mathops import np
Hex = namedtuple('Hex', ['q', 'r', 's'])
def add_hex(h1, h2):
"""Add two hex coordinates together."""
q = h1.q + h2.q
r = h1.r + h2.r
... | 32.134783 | 117 | 0.613043 |
e4dfb95f04467bee0420411aa09bbdd150a3b575 | 1,156 | py | Python | Projects/multiple_args_curvefit/python/src/model.py | basavyr/curve-fitting | 0c7f93b7764d9ddc3e2860e5f20d21bf30256f58 | [
"MIT"
] | null | null | null | Projects/multiple_args_curvefit/python/src/model.py | basavyr/curve-fitting | 0c7f93b7764d9ddc3e2860e5f20d21bf30256f58 | [
"MIT"
] | null | null | null | Projects/multiple_args_curvefit/python/src/model.py | basavyr/curve-fitting | 0c7f93b7764d9ddc3e2860e5f20d21bf30256f58 | [
"MIT"
] | null | null | null | import numpy as np
from matplotlib import pyplot as plt
from scipy.optimize import curve_fit
import random as rd
import plotter
def model_function(X, a, b, c):
"""
- the analytical expression for the model that aims at describing the experimental data
- the X argument is an array of tuples of the form X=... | 23.12 | 91 | 0.624567 |
e4e259912dc8fab0fc123e2bde02cc765fe32ec1 | 3,740 | py | Python | src/text_computation/computeCorrs.py | levon003/wiki-ores-feedback | 29e7f1a41b16a7c57448d5bbc5801653debbc115 | [
"MIT"
] | 2 | 2022-03-27T19:24:30.000Z | 2022-03-29T16:15:31.000Z | src/text_computation/computeCorrs.py | levon003/wiki-ores-feedback | 29e7f1a41b16a7c57448d5bbc5801653debbc115 | [
"MIT"
] | 1 | 2021-04-23T21:03:45.000Z | 2021-04-23T21:03:45.000Z | src/text_computation/computeCorrs.py | levon003/wiki-ores-feedback | 29e7f1a41b16a7c57448d5bbc5801653debbc115 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Simple script to compute correlations for inserted and removed tokens
import numpy as np
import pandas as pd
from tqdm import tqdm
import os
import sqlite3
from datetime import datetime
import scipy.stats
import scipy.sparse
if __name__ == "__main__":
main()
| 46.17284 | 191 | 0.699465 |
e4e47a927be1df6a8c7ab23bada3a5ee286f11b3 | 590 | py | Python | bootstrapvz/plugins/insecure/tasks.py | null0000/bootstrap-vz | 003cdd9808bac90383b4c46738507bd7e1daa268 | [
"Apache-2.0"
] | null | null | null | bootstrapvz/plugins/insecure/tasks.py | null0000/bootstrap-vz | 003cdd9808bac90383b4c46738507bd7e1daa268 | [
"Apache-2.0"
] | null | null | null | bootstrapvz/plugins/insecure/tasks.py | null0000/bootstrap-vz | 003cdd9808bac90383b4c46738507bd7e1daa268 | [
"Apache-2.0"
] | null | null | null | from bootstrapvz.base import Task
from bootstrapvz.common import phases
import os
import shutil
| 31.052632 | 81 | 0.754237 |
e4e647dd3b9fc6ab9ed936f939be2c4d02a9c3ed | 446,260 | py | Python | rl_agents/awac_agent_4_20_1_norm_v1-225_deterministic.py | IsaiahPressman/Kaggle_Santa_2020 | ff5c6aa78dbe234cef338f4c721cc30d7dbc3df8 | [
"MIT"
] | null | null | null | rl_agents/awac_agent_4_20_1_norm_v1-225_deterministic.py | IsaiahPressman/Kaggle_Santa_2020 | ff5c6aa78dbe234cef338f4c721cc30d7dbc3df8 | [
"MIT"
] | null | null | null | rl_agents/awac_agent_4_20_1_norm_v1-225_deterministic.py | IsaiahPressman/Kaggle_Santa_2020 | ff5c6aa78dbe234cef338f4c721cc30d7dbc3df8 | [
"MIT"
] | null | null | null | serialized_string = b'gAN9cQBYEAAAAG1vZGVsX3N0YXRlX2RpY3RxAWNjb2xsZWN0aW9ucwpPcmRlcmVkRGljdApxAilScQMoWCEAAABiYXNlLmxheWVycy4wLm1lc3NhZ2VfcGFzc2luZ19tYXRxBGN0b3JjaC5fdXRpbHMKX3JlYnVpbGRfdGVuc29yX3YyCnEFKGN0b3JjaC5zdG9yYWdlCl9sb2FkX2Zyb21fYnl0ZXMKcQZCPJ0AAIACigps/JxG+SBqqFAZLoACTekDLoACfXEAKFgQAAAAcHJvdG9jb2xfdmVyc2lvbn... | 1,576.890459 | 434,799 | 0.935325 |
e4e8ee9a0f629d72298e4d9e7b1a98a2e8e24f7f | 368 | py | Python | server/apps/gallery/models.py | arthamtrust/backend | d1981766297b1cf2888b37af927f69fde750a23e | [
"MIT"
] | null | null | null | server/apps/gallery/models.py | arthamtrust/backend | d1981766297b1cf2888b37af927f69fde750a23e | [
"MIT"
] | null | null | null | server/apps/gallery/models.py | arthamtrust/backend | d1981766297b1cf2888b37af927f69fde750a23e | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
| 21.647059 | 53 | 0.682065 |
e4ea2ae722c04bf641f0c113ed3f17b5c66cdf13 | 1,687 | py | Python | CandCPP/exp.py | Mem2019/MyCTFChallenges | cae1e7435739b9949610771cea7771014e896b18 | [
"MIT"
] | 6 | 2018-06-21T00:50:23.000Z | 2021-07-06T06:21:04.000Z | CandCPP/exp.py | Mem2019/MyCTFChallenges | cae1e7435739b9949610771cea7771014e896b18 | [
"MIT"
] | null | null | null | CandCPP/exp.py | Mem2019/MyCTFChallenges | cae1e7435739b9949610771cea7771014e896b18 | [
"MIT"
] | 3 | 2018-10-27T13:12:49.000Z | 2021-06-02T05:37:12.000Z | from pwn import *
g_local=False
e=ELF('/lib/x86_64-linux-gnu/libc-2.23.so')
context.log_level='debug'
if g_local:
sh = process('./candcpp')#, env={'LD_PRELOAD':'./libc-2.23.so'})
gdb.attach(sh)
else:
sh = remote('154.8.222.144', 9999)
MAIN_FUNC = 0x4009A0
LEAK_FUNC = 0x400E10
NAME_BUF = 0x602328
malloc = lambda ... | 20.325301 | 65 | 0.665086 |
e4ea6b87c9f84a19ddcae37e83769662706b405e | 2,164 | py | Python | test_interactions.py | testlnord/bomberman | 15d52073f26df970a0548e07b79514061017c73e | [
"Apache-2.0"
] | null | null | null | test_interactions.py | testlnord/bomberman | 15d52073f26df970a0548e07b79514061017c73e | [
"Apache-2.0"
] | null | null | null | test_interactions.py | testlnord/bomberman | 15d52073f26df970a0548e07b79514061017c73e | [
"Apache-2.0"
] | null | null | null |
################3
old_objects = []
game_objects = {
('wall', 0): {'position': (0, 0), 'passable': False, 'interactable': False, 'char': '#'},
('wall', 1): {'position': (0, 1), 'passable': False, 'interactable': False, 'char': '#'},
('coin', 2): {'position': (2, 1), 'passable': True, 'interactable': Tr... | 26.390244 | 103 | 0.636322 |
e4eb75089052398010f0fca752c0fa03e64af7f4 | 206 | py | Python | trade_system/users/admin.py | Artsiom-Shlapakou/trade-system | 41c7bd6779b159d1c867968f5230d4ccbc37995a | [
"MIT"
] | null | null | null | trade_system/users/admin.py | Artsiom-Shlapakou/trade-system | 41c7bd6779b159d1c867968f5230d4ccbc37995a | [
"MIT"
] | null | null | null | trade_system/users/admin.py | Artsiom-Shlapakou/trade-system | 41c7bd6779b159d1c867968f5230d4ccbc37995a | [
"MIT"
] | null | null | null | from django.contrib import admin
from trade_system.users.models import Wallet
from django.contrib.auth import get_user_model
User = get_user_model()
admin.site.register(User)
admin.site.register(Wallet)
| 20.6 | 46 | 0.825243 |
e4ec28c7bf7bd90f9b875de7df12fd87fba4eede | 4,961 | py | Python | atlas/foundations_contrib/src/test/models/test_queued_job.py | DeepLearnI/atlas | 8aca652d7e647b4e88530b93e265b536de7055ed | [
"Apache-2.0"
] | 296 | 2020-03-16T19:55:00.000Z | 2022-01-10T19:46:05.000Z | atlas/foundations_contrib/src/test/models/test_queued_job.py | DeepLearnI/atlas | 8aca652d7e647b4e88530b93e265b536de7055ed | [
"Apache-2.0"
] | 57 | 2020-03-17T11:15:57.000Z | 2021-07-10T14:42:27.000Z | atlas/foundations_contrib/src/test/models/test_queued_job.py | DeepLearnI/atlas | 8aca652d7e647b4e88530b93e265b536de7055ed | [
"Apache-2.0"
] | 38 | 2020-03-17T21:06:05.000Z | 2022-02-08T03:19:34.000Z |
import unittest
from mock import Mock
from foundations_spec.helpers import let, let_patch_mock, let_patch_instance, set_up
from foundations_spec.helpers.spec import Spec
from foundations_contrib.models.queued_job import QueuedJob
from fakeredis import FakeRedis
| 31.598726 | 97 | 0.702882 |
e4efdb84b5f54430d099fe1b59a9b2291a76ef7a | 1,400 | py | Python | cidc_utils/caching/credential_cache.py | CIMAC-CIDC/cidc-utils | 2f2cf82007a3a67971293752e1dc168a7aad10e3 | [
"MIT"
] | null | null | null | cidc_utils/caching/credential_cache.py | CIMAC-CIDC/cidc-utils | 2f2cf82007a3a67971293752e1dc168a7aad10e3 | [
"MIT"
] | null | null | null | cidc_utils/caching/credential_cache.py | CIMAC-CIDC/cidc-utils | 2f2cf82007a3a67971293752e1dc168a7aad10e3 | [
"MIT"
] | null | null | null | """
Defines caching before for user preferences
"""
import jwt
import time
from cachetools import TTLCache
from typing import Optional
| 27.45098 | 102 | 0.534286 |
e4f1e6378706bc71078bf3d61ef72f03d3aa0d3c | 3,013 | py | Python | tests/test_simple_polygon.py | CompMaterSci/python-geometry | 403244252b9d8521cd4d001ec63cd768d75f5393 | [
"BSD-3-Clause"
] | 3 | 2016-07-12T13:22:53.000Z | 2019-09-20T07:48:02.000Z | tests/test_simple_polygon.py | CompMaterSci/python-geometry | 403244252b9d8521cd4d001ec63cd768d75f5393 | [
"BSD-3-Clause"
] | 3 | 2016-12-07T07:20:33.000Z | 2017-02-08T09:14:58.000Z | tests/test_simple_polygon.py | CompMaterSci/python-geometry | 403244252b9d8521cd4d001ec63cd768d75f5393 | [
"BSD-3-Clause"
] | 5 | 2016-07-13T10:40:29.000Z | 2020-07-01T07:20:41.000Z | # -*- coding: utf-8 -*-
from numpy import array
from numpy.testing import assert_allclose
from python_geometry.simple_polygon import SimplePolygon
| 27.144144 | 71 | 0.419184 |
e4f26ad224253d8b9e159c457b1fb5ec0f23c562 | 3,432 | py | Python | docs/api/model_selection/validation_curve.py | souravsingh/yellowbrick | a5941a6c47fbe5264f3622bc15276ba618bbe1d0 | [
"Apache-2.0"
] | 1 | 2019-01-02T20:18:17.000Z | 2019-01-02T20:18:17.000Z | docs/api/model_selection/validation_curve.py | souravsingh/yellowbrick | a5941a6c47fbe5264f3622bc15276ba618bbe1d0 | [
"Apache-2.0"
] | 1 | 2018-12-26T19:50:41.000Z | 2018-12-30T18:51:43.000Z | docs/api/model_selection/validation_curve.py | souravsingh/yellowbrick | a5941a6c47fbe5264f3622bc15276ba618bbe1d0 | [
"Apache-2.0"
] | 1 | 2021-08-19T02:29:43.000Z | 2021-08-19T02:29:43.000Z | #!/usr/bin/env python3
# validation_curve.py
"""
Generates the validation curve visualizations for the documentation
"""
##########################################################################
## Imports
##########################################################################
import os
import numpy as np
import... | 28.840336 | 89 | 0.595862 |
e4f3f5b2d09517330825637d500809f9259e85f8 | 14,722 | py | Python | eval/vqa_data_provider_layer.py | minsuu/vqa_mcb | cb04e7cd1ceba4e7508024e5dbdfe08d1575b007 | [
"BSD-2-Clause"
] | 214 | 2016-07-13T00:17:44.000Z | 2022-01-28T07:06:07.000Z | eval/vqa_data_provider_layer.py | afcarl/vqa-mcb | 172775b2ec927456eecbe1aa5878b673482f2a54 | [
"BSD-2-Clause"
] | 23 | 2016-07-14T07:45:59.000Z | 2019-08-15T02:56:34.000Z | eval/vqa_data_provider_layer.py | afcarl/vqa-mcb | 172775b2ec927456eecbe1aa5878b673482f2a54 | [
"BSD-2-Clause"
] | 87 | 2016-07-12T18:20:32.000Z | 2021-10-30T16:44:33.000Z | import caffe
import numpy as np
import random
import os
import sys
import re
import json
import spacy
from operator import mul
GLOVE_EMBEDDING_SIZE = 300
CURRENT_DATA_SHAPE = None
SPATIAL_COORD = None
GLOVE = None
| 35.73301 | 111 | 0.53831 |
e4f43253efd72ee6f97db976bf7d874a78157c8f | 347 | py | Python | psim/packages/tictoc/__init__.py | bburns/psimPython | 610321313a220bc413560daaf64ff2274ae05c02 | [
"MIT"
] | null | null | null | psim/packages/tictoc/__init__.py | bburns/psimPython | 610321313a220bc413560daaf64ff2274ae05c02 | [
"MIT"
] | null | null | null | psim/packages/tictoc/__init__.py | bburns/psimPython | 610321313a220bc413560daaf64ff2274ae05c02 | [
"MIT"
] | null | null | null | """
tictoc
matlab-like tic and toc functions
see https://stackoverflow.com/questions/5849800/what-is-the-python-equivalent-of-matlabs-tic-and-toc-functions
"""
import time
tics = []
| 17.35 | 110 | 0.665706 |
e4fbf9c4787bd6c823e79265ebbbdf508f8294f4 | 4,200 | py | Python | src/openclimategis/util/ncconv/experimental/ocg_converter/csv_.py | Peshal1067/OpenClimateGIS | 297db6ae1f6dd8459ede6bed905c8d85bd93c5d6 | [
"BSD-3-Clause"
] | 3 | 2015-04-23T09:09:04.000Z | 2020-02-26T17:40:19.000Z | src/openclimategis/util/ncconv/experimental/ocg_converter/csv_.py | arthur-e/OpenClimateGIS | 297db6ae1f6dd8459ede6bed905c8d85bd93c5d6 | [
"BSD-3-Clause"
] | null | null | null | src/openclimategis/util/ncconv/experimental/ocg_converter/csv_.py | arthur-e/OpenClimateGIS | 297db6ae1f6dd8459ede6bed905c8d85bd93c5d6 | [
"BSD-3-Clause"
] | 2 | 2017-05-30T10:27:36.000Z | 2020-11-09T13:52:58.000Z | import io
import zipfile
import csv
from util.ncconv.experimental.ocg_converter.subocg_converter import SubOcgConverter
| 37.837838 | 97 | 0.553095 |
9001723e3ad1821cbe597698ec69edc8b0731984 | 839 | py | Python | uninas/modules/modules/cnn.py | cogsys-tuebingen/uninas | 06729b9cf517ec416fb798ae387c5bd9c3a278ac | [
"MIT"
] | 18 | 2020-11-22T16:03:08.000Z | 2022-03-15T12:11:46.000Z | uninas/modules/modules/cnn.py | cogsys-tuebingen/uninas | 06729b9cf517ec416fb798ae387c5bd9c3a278ac | [
"MIT"
] | 2 | 2022-01-04T08:10:17.000Z | 2022-01-05T08:13:14.000Z | uninas/modules/modules/cnn.py | cogsys-tuebingen/uninas | 06729b9cf517ec416fb798ae387c5bd9c3a278ac | [
"MIT"
] | 6 | 2021-03-08T07:08:52.000Z | 2022-02-24T12:00:43.000Z | import torch
import torch.nn as nn
| 27.064516 | 95 | 0.640048 |
9003b0f6d049c9acbb898890fc3e7195ecd16b28 | 1,634 | py | Python | arcade/gui/examples/anchor_widgets.py | akapkotel/arcade | 6e43ec53e7bfa3dee1aa574404794e3695aad381 | [
"MIT"
] | null | null | null | arcade/gui/examples/anchor_widgets.py | akapkotel/arcade | 6e43ec53e7bfa3dee1aa574404794e3695aad381 | [
"MIT"
] | 1 | 2022-03-21T06:24:29.000Z | 2022-03-21T06:24:29.000Z | arcade/gui/examples/anchor_widgets.py | Ibrahim2750mi/arcade | bf3229e64117931bffb8e50926a996a7a8fc9b8b | [
"MIT"
] | null | null | null | """
Example shows how to use UIAnchorWidget to position widgets on screen.
Dummy widgets indicate hovered, pressed and clicked.
"""
import arcade
from arcade.gui import UIManager
from arcade.gui.widgets import UIDummy
from arcade.gui.widgets.layout import UIAnchorLayout
window = UIMockup()
arcade.run()
| 24.38806 | 70 | 0.570991 |
90041b2eae192a57fb04bf6a09bec2f9aae7dce1 | 3,897 | py | Python | tools/e2e_inference.py | nanit/deep-high-resolution-net.pytorch | 17226df8effda518c47355e85f4733638c20297a | [
"MIT"
] | null | null | null | tools/e2e_inference.py | nanit/deep-high-resolution-net.pytorch | 17226df8effda518c47355e85f4733638c20297a | [
"MIT"
] | 2 | 2021-09-23T12:59:27.000Z | 2021-11-01T12:21:51.000Z | tools/e2e_inference.py | nanit/deep-high-resolution-net.pytorch | 17226df8effda518c47355e85f4733638c20297a | [
"MIT"
] | null | null | null | import os
import glob
import pickle
import sys
import tensorflow as tf
from numba import cuda
from python_tools.OSUtils import ensure_dir
from offline_predict import get_boxes_from_detection_predictions_data, convert_boxes_to_bboxes, predict_on_image_list, load_skeleton_model
DETECTION_RESEARCH_FOLDER = os.path.expand... | 45.847059 | 138 | 0.744419 |
9007054fb0674671d547ac9d0adee85e1c24f33c | 1,234 | py | Python | analytics/extract/bare/funds-explorer/scrap_ranking.py | vicmattos/data-invest | 4318a33117583bf492b45c69c957fd0ea2c455e1 | [
"MIT"
] | null | null | null | analytics/extract/bare/funds-explorer/scrap_ranking.py | vicmattos/data-invest | 4318a33117583bf492b45c69c957fd0ea2c455e1 | [
"MIT"
] | null | null | null | analytics/extract/bare/funds-explorer/scrap_ranking.py | vicmattos/data-invest | 4318a33117583bf492b45c69c957fd0ea2c455e1 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import os
import csv
import time
from datetime import datetime
import requests
from bs4 import BeautifulSoup
url = 'https://www.fundsexplorer.com.br/ranking'
# Data Cleansing
# 'R$' => ''
# '%' => ''
# '.0' => ''
# '.' => ''
# ',' => '.'
# 'N/A' => ''
print("Starting...{}".format(datetime.now())... | 20.915254 | 147 | 0.627229 |
9009e3424db2d10a8ac51689c842cea2498a6040 | 14,546 | py | Python | stentseg/apps/_3DPointSelector.py | almarklein/stentseg | 48255fffdc2394d1dc4ce2208c9a91e1d4c35a46 | [
"BSD-3-Clause"
] | 1 | 2020-08-28T16:34:10.000Z | 2020-08-28T16:34:10.000Z | stentseg/apps/_3DPointSelector.py | almarklein/stentseg | 48255fffdc2394d1dc4ce2208c9a91e1d4c35a46 | [
"BSD-3-Clause"
] | null | null | null | stentseg/apps/_3DPointSelector.py | almarklein/stentseg | 48255fffdc2394d1dc4ce2208c9a91e1d4c35a46 | [
"BSD-3-Clause"
] | 1 | 2021-04-25T06:59:36.000Z | 2021-04-25T06:59:36.000Z | """ Module 3D Point Selector
Provides functionality view slices and to select points in multiplanar reconstructions.
"""
import os, time, sys
import numpy as np
import visvis as vv
from visvis.utils.pypoints import Point, Pointset, Aarray
import OpenGL.GL as gl
import OpenGL.GLU as glu
def select3d... | 36.732323 | 110 | 0.564691 |
900c0768bdb748b6c9e90f7a675de1895a6d4acc | 4,386 | py | Python | app/api/V1/views/auth_endpoints.py | eduhmik/Store-Manager-api | 50395d39758800784fbd0b3e516b8bedc900cdeb | [
"MIT"
] | null | null | null | app/api/V1/views/auth_endpoints.py | eduhmik/Store-Manager-api | 50395d39758800784fbd0b3e516b8bedc900cdeb | [
"MIT"
] | 8 | 2018-10-24T01:33:32.000Z | 2019-10-21T17:36:01.000Z | app/api/V1/views/auth_endpoints.py | eduhmik/Store-Manager-api | 50395d39758800784fbd0b3e516b8bedc900cdeb | [
"MIT"
] | 1 | 2018-10-19T21:57:48.000Z | 2018-10-19T21:57:48.000Z | from flask import Flask, request, jsonify, Blueprint, json, make_response
from flask_restplus import Resource, reqparse, Api, Namespace, fields
from ..models.user_model import User
api = Namespace('Register Endpoint', description='A collection of register endpoints for the user model')
ns = Namespace('Users Endpoints... | 33.227273 | 105 | 0.559052 |
900d82f05310f821f29ddc9642e0427552a38aae | 2,687 | py | Python | wolfram/wolfram.py | Wyn10/aikaterna-cogs | a7fd5930f90b4046296ce98406639219c38302a7 | [
"MIT"
] | null | null | null | wolfram/wolfram.py | Wyn10/aikaterna-cogs | a7fd5930f90b4046296ce98406639219c38302a7 | [
"MIT"
] | null | null | null | wolfram/wolfram.py | Wyn10/aikaterna-cogs | a7fd5930f90b4046296ce98406639219c38302a7 | [
"MIT"
] | 1 | 2019-03-30T05:18:42.000Z | 2019-03-30T05:18:42.000Z | import os
import aiohttp
from discord.ext import commands
import xml.etree.ElementTree as ET
from cogs.utils.dataIO import dataIO
from .utils import checks
from .utils.chat_formatting import escape_mass_mentions
from .utils.chat_formatting import box
from __main__ import send_cmd_help
| 32.373494 | 100 | 0.593971 |
900e83820d1dd64bbe34d301bee0ba27a36ecb07 | 176 | py | Python | Servers/ProbabilisticServer.py | MartinHex/master-thesis | b5077d9acce60fd42467f73df6e39c61fd3e19b2 | [
"MIT"
] | null | null | null | Servers/ProbabilisticServer.py | MartinHex/master-thesis | b5077d9acce60fd42467f73df6e39c61fd3e19b2 | [
"MIT"
] | 2 | 2022-02-22T11:48:21.000Z | 2022-02-28T15:49:47.000Z | Servers/ProbabilisticServer.py | MartinHex/master-thesis | b5077d9acce60fd42467f73df6e39c61fd3e19b2 | [
"MIT"
] | null | null | null | from abc import ABC,abstractmethod
from Servers.ABCServer import ABCServer
| 19.555556 | 39 | 0.767045 |
900fb0840db60165c43f29441d88fb00f6f55c09 | 718 | py | Python | fastapi_crud/fastapicrud.py | miikapo/fastapi-crud | d8517d93068b0e71fb114a695a41f48570387b9a | [
"Apache-2.0"
] | 5 | 2021-11-02T20:13:41.000Z | 2022-03-19T00:01:53.000Z | fastapi_crud/fastapicrud.py | miikapo/fastapi-crud | d8517d93068b0e71fb114a695a41f48570387b9a | [
"Apache-2.0"
] | null | null | null | fastapi_crud/fastapicrud.py | miikapo/fastapi-crud | d8517d93068b0e71fb114a695a41f48570387b9a | [
"Apache-2.0"
] | null | null | null | from fastapi import Depends
from sqlalchemy.ext.asyncio import AsyncEngine
from sqlalchemy.orm import sessionmaker
from typing import AsyncGenerator
from fastapi_crud.session import Session
from fastapi_crud.router import ModelRouter
from fastapi_crud.types import Model
| 32.636364 | 66 | 0.754875 |
900fd7a3396de18f3541a06d832b5444ad752082 | 671 | py | Python | migrations/versions/98f3e3ad195c_update_blog_to_add_a_title.py | Josephat-n/myBlog | d2e3b368617cd3ca55b6bd40e6950122967e1d9f | [
"MIT"
] | null | null | null | migrations/versions/98f3e3ad195c_update_blog_to_add_a_title.py | Josephat-n/myBlog | d2e3b368617cd3ca55b6bd40e6950122967e1d9f | [
"MIT"
] | null | null | null | migrations/versions/98f3e3ad195c_update_blog_to_add_a_title.py | Josephat-n/myBlog | d2e3b368617cd3ca55b6bd40e6950122967e1d9f | [
"MIT"
] | null | null | null | """update blog to add a title.
Revision ID: 98f3e3ad195c
Revises: 2d98c5165674
Create Date: 2019-12-02 22:58:10.377423
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '98f3e3ad195c'
down_revision = '2d98c5165674'
branch_labels = None
depends_on = None
| 23.137931 | 84 | 0.690015 |
901066d43a75d83ccca11050c805f23f07e56a57 | 2,691 | py | Python | message/views.py | ThusharaX/mumbleapi | 8435fe9d86869cce81961f42c9860fa3810c171b | [
"Apache-2.0"
] | 187 | 2021-04-24T14:49:44.000Z | 2022-03-31T14:25:22.000Z | message/views.py | ThusharaX/mumbleapi | 8435fe9d86869cce81961f42c9860fa3810c171b | [
"Apache-2.0"
] | 119 | 2021-04-24T18:08:43.000Z | 2022-01-09T00:57:19.000Z | message/views.py | ThusharaX/mumbleapi | 8435fe9d86869cce81961f42c9860fa3810c171b | [
"Apache-2.0"
] | 174 | 2021-04-24T15:57:23.000Z | 2022-03-11T02:09:04.000Z | from rest_framework.decorators import api_view, permission_classes
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
from rest_framework import status
from users.models import UserProfile
from .serializers import MessageSerializer , ThreadSerializer
from .models import ... | 39 | 94 | 0.687105 |
9010af2b84b0a8a7a8c133b624651330f5e4d485 | 3,691 | py | Python | widgets/dialogs/transactions_editor.py | redstorm45/money_analyst | 9ccf8aa4cd7bad7aff21a82ce4219406009f126a | [
"Apache-2.0"
] | null | null | null | widgets/dialogs/transactions_editor.py | redstorm45/money_analyst | 9ccf8aa4cd7bad7aff21a82ce4219406009f126a | [
"Apache-2.0"
] | null | null | null | widgets/dialogs/transactions_editor.py | redstorm45/money_analyst | 9ccf8aa4cd7bad7aff21a82ce4219406009f126a | [
"Apache-2.0"
] | null | null | null | import PyQt5.QtWidgets as Qtw
import PyQt5.QtCore as QtCore
from widgets.labels import LabelsWidget
DATE_FORMAT = 'yyyy-MM-dd'
| 38.051546 | 83 | 0.648605 |
9010dcd0fdbf2d57ab797fb8bac064a9780ede3f | 20,416 | py | Python | octue/cloud/pub_sub/service.py | octue/octue-sdk-python | 31c6e9358d3401ca708f5b3da702bfe3be3e52ce | [
"MIT"
] | 5 | 2020-10-01T12:43:10.000Z | 2022-03-14T17:26:25.000Z | octue/cloud/pub_sub/service.py | octue/octue-sdk-python | 31c6e9358d3401ca708f5b3da702bfe3be3e52ce | [
"MIT"
] | 322 | 2020-06-24T15:55:22.000Z | 2022-03-30T11:49:28.000Z | octue/cloud/pub_sub/service.py | octue/octue-sdk-python | 31c6e9358d3401ca708f5b3da702bfe3be3e52ce | [
"MIT"
] | null | null | null | import base64
import concurrent.futures
import json
import logging
import sys
import time
import traceback as tb
import uuid
from google.api_core import retry
from google.cloud import pubsub_v1
import octue.exceptions
import twined.exceptions
from octue.cloud.credentials import GCPCredentialsManager
from octue.cloud.p... | 43.162791 | 208 | 0.653556 |
90124bdf01042879c8d23bc0de43bbfc19264166 | 1,978 | py | Python | Tareas/DistanciaGrafos.py | A01746540/SEM9Algoritmos | 2aaf1a344413dfbece77022a5b34e0c5318aa5e5 | [
"MIT"
] | null | null | null | Tareas/DistanciaGrafos.py | A01746540/SEM9Algoritmos | 2aaf1a344413dfbece77022a5b34e0c5318aa5e5 | [
"MIT"
] | null | null | null | Tareas/DistanciaGrafos.py | A01746540/SEM9Algoritmos | 2aaf1a344413dfbece77022a5b34e0c5318aa5e5 | [
"MIT"
] | null | null | null | from collections import defaultdict
g = Graph()
g.addEdge(0, [1, 2])
g.addEdge(1, [14, 15])
g.addEdge(2, [3, 4])
g.addEdge(3, [11, 12])
g.addEdge(4, [5, 6, 9])
g.addEdge(5, [8, 9])
g.addEdge(6, [7])
g.addEdge(7, [25])
g.addEdge(8, [10, 21, 25, 26])
g.addEdge(9, [3, 10])
g.addEdge(11, [10, 21])
g.addEdge(12, [13, 14]... | 25.688312 | 110 | 0.517695 |
9012c72f255c969953043607b7f84aeb3ccb4764 | 9,807 | py | Python | octopus_deploy_swagger_client/models/artifact_resource.py | cvent/octopus-deploy-api-client | 0e03e842e1beb29b132776aee077df570b88366a | [
"Apache-2.0"
] | null | null | null | octopus_deploy_swagger_client/models/artifact_resource.py | cvent/octopus-deploy-api-client | 0e03e842e1beb29b132776aee077df570b88366a | [
"Apache-2.0"
] | null | null | null | octopus_deploy_swagger_client/models/artifact_resource.py | cvent/octopus-deploy-api-client | 0e03e842e1beb29b132776aee077df570b88366a | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Octopus Server API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 2019.6.7+Branch.tags-2019.6.7.Sha.aa18dc6809953218c66f57eff7d26481d9b23d6a
Generated by: https://github.com/swagger-api... | 27.940171 | 207 | 0.597634 |
9012e5a8ed3f5ec28adee161865cc14545390e2d | 1,691 | py | Python | lab04/submited/utils.py | Battleman/InternetAnalyticsW | 005e5de6c0e591be6dc303ec46cc82249e70f666 | [
"MIT"
] | null | null | null | lab04/submited/utils.py | Battleman/InternetAnalyticsW | 005e5de6c0e591be6dc303ec46cc82249e70f666 | [
"MIT"
] | null | null | null | lab04/submited/utils.py | Battleman/InternetAnalyticsW | 005e5de6c0e591be6dc303ec46cc82249e70f666 | [
"MIT"
] | null | null | null | # ######################
# Some useful utilities.
# ######################
import json, os, pickle
def listPrettyPrint(l, n):
"""Prints a list l on n columns to improve readability"""
if(n == 5):
for a,b,c,d,e in zip(l[::5],l[1::5],l[2::5],l[3::5],l[4::5]):
print('{:<22}{:<22}{:<22}{:<22}... | 25.621212 | 69 | 0.474867 |
9012f44f49fd46b9f38512bc6891494632f15f28 | 489 | py | Python | primes/factorisation.py | miloszlakomy/algutils | f83c330a0ca31cdac536de811f447820c70ecb38 | [
"MIT"
] | null | null | null | primes/factorisation.py | miloszlakomy/algutils | f83c330a0ca31cdac536de811f447820c70ecb38 | [
"MIT"
] | null | null | null | primes/factorisation.py | miloszlakomy/algutils | f83c330a0ca31cdac536de811f447820c70ecb38 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from algutils.primes import cached_primes
| 13.971429 | 60 | 0.492843 |
901370bb81cfb113acd130dc5b682b50dbdb76b2 | 1,133 | py | Python | NLP/DuSQL-Baseline/text2sql/models/grammar/__init__.py | pkulzb/Research | 88da4910a356f1e95e1e1e05316500055533683d | [
"Apache-2.0"
] | 53 | 2020-03-31T16:20:53.000Z | 2021-11-16T11:48:38.000Z | NLP/DuSQL-Baseline/text2sql/models/grammar/__init__.py | pkulzb/Research | 88da4910a356f1e95e1e1e05316500055533683d | [
"Apache-2.0"
] | 1 | 2020-04-06T08:10:12.000Z | 2020-04-06T08:10:12.000Z | NLP/DuSQL-Baseline/text2sql/models/grammar/__init__.py | pkulzb/Research | 88da4910a356f1e95e1e1e05316500055533683d | [
"Apache-2.0"
] | 53 | 2020-04-01T01:59:08.000Z | 2022-03-14T07:59:58.000Z | # -*- coding:utf8 -*-
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | 41.962963 | 103 | 0.770521 |
9015d694e84b3f0cc392aae6d053e1e708a338df | 627 | py | Python | verifai/samplers/__init__.py | jst-qaml/VerifAI | d91bc1289d720c055a36fa0e1ad9f68b986ca1a4 | [
"BSD-3-Clause"
] | 1 | 2020-07-27T13:32:01.000Z | 2020-07-27T13:32:01.000Z | verifai/samplers/__init__.py | shromonag/VerifAI | ace214d1c3282ed5ea63ee3f52457e35f54ebb62 | [
"BSD-3-Clause"
] | null | null | null | verifai/samplers/__init__.py | shromonag/VerifAI | ace214d1c3282ed5ea63ee3f52457e35f54ebb62 | [
"BSD-3-Clause"
] | null | null | null | from .domain_sampler import SamplingError, SplitSampler
from .feature_sampler import FeatureSampler, LateFeatureSampler
from .halton import HaltonSampler
from .cross_entropy import (CrossEntropySampler, ContinuousCrossEntropySampler,
DiscreteCrossEntropySampler)
from .random_sampler import RandomSampler
from .bayes... | 36.882353 | 79 | 0.845295 |
90171f9ff5db50b3b195ffb3fb8c3f04d8941fed | 159 | py | Python | sb3_training/gym-iotmarket/setup.py | prasoonpatidar/multiagentRL-resource-sharing | e63ba7fc3c7ab019e9fd109cd45b739e3322152f | [
"MIT"
] | null | null | null | sb3_training/gym-iotmarket/setup.py | prasoonpatidar/multiagentRL-resource-sharing | e63ba7fc3c7ab019e9fd109cd45b739e3322152f | [
"MIT"
] | null | null | null | sb3_training/gym-iotmarket/setup.py | prasoonpatidar/multiagentRL-resource-sharing | e63ba7fc3c7ab019e9fd109cd45b739e3322152f | [
"MIT"
] | null | null | null | from setuptools import setup
setup(name='gym_iotmarket',
version='0.0.1',
install_requires=['gym','scipy','numpy'] # And any other dependencies
) | 26.5 | 76 | 0.685535 |
901749f4d47b3e2fe3385b589ae5e10eae1bbab0 | 13,064 | py | Python | mcd2c/cfile/__init__.py | Asdew95/mcd2c | bcec95276a45b4bfd90ece5569246bd5a247368b | [
"Zlib"
] | 3 | 2020-08-18T19:11:39.000Z | 2021-06-13T12:16:41.000Z | mcd2c/cfile/__init__.py | Asdew95/mcd2c | bcec95276a45b4bfd90ece5569246bd5a247368b | [
"Zlib"
] | null | null | null | mcd2c/cfile/__init__.py | Asdew95/mcd2c | bcec95276a45b4bfd90ece5569246bd5a247368b | [
"Zlib"
] | 2 | 2021-06-13T12:16:47.000Z | 2021-12-07T18:52:43.000Z | # Inspired by https://github.com/cogu/cfile
c_indent_char = ' '
# line and its subclasses can be used as container classes for sequences, which
# can span multiple lines. When used on its own though it's a single line
class statement(line):
class returnval(line):
class typedef(line):
class linecomment(line)... | 26.770492 | 79 | 0.606782 |
90179942b479c02a62c0f83dc133fc47dd16d363 | 906 | py | Python | typed_python/compiler/tests/subclass_of_test.py | APrioriInvestments/nativepython | 94e6b09d788e49cbe34b9b0d3c948218d7a8dcc5 | [
"Apache-2.0"
] | 52 | 2019-04-12T18:07:56.000Z | 2019-10-07T10:26:19.000Z | typed_python/compiler/tests/subclass_of_test.py | APrioriInvestments/nativepython | 94e6b09d788e49cbe34b9b0d3c948218d7a8dcc5 | [
"Apache-2.0"
] | 135 | 2019-04-15T12:52:56.000Z | 2019-10-08T18:39:58.000Z | typed_python/compiler/tests/subclass_of_test.py | APrioriInvestments/nativepython | 94e6b09d788e49cbe34b9b0d3c948218d7a8dcc5 | [
"Apache-2.0"
] | 1 | 2019-04-12T13:03:38.000Z | 2019-04-12T13:03:38.000Z | from typed_python import Entrypoint, SubclassOf, Class, Final, Function, ListOf
def test_can_cast_subclass_of_correctly():
def checkIt():
assert f(C) == "C", f(C)
assert f(B) == "B", f(B)
assert f(A) == "A", f(A)
checkIt()
Entrypoint(checkIt)()
assert checkItList(ListOf(... | 18.12 | 79 | 0.540839 |
9017a7257730a81fd99b9ead002708bc4ceba13e | 1,442 | py | Python | experiments/toy.py | jcrickmer/pyvision | 5aea7cd9a85d7d26196c375275e7bf00c27a8ac8 | [
"MIT"
] | 53 | 2015-03-10T06:20:50.000Z | 2021-06-07T07:34:02.000Z | experiments/toy.py | jcrickmer/pyvision | 5aea7cd9a85d7d26196c375275e7bf00c27a8ac8 | [
"MIT"
] | 1 | 2016-11-20T14:28:38.000Z | 2016-11-20T14:28:38.000Z | experiments/toy.py | jcrickmer/pyvision | 5aea7cd9a85d7d26196c375275e7bf00c27a8ac8 | [
"MIT"
] | 56 | 2015-02-10T20:49:42.000Z | 2021-04-03T05:41:09.000Z | from vision import *
from vision.track import alearn, interpolation
from vision import visualize
from vision.toymaker import *
import os
import multiprocessing
g = Geppetto()
b = Rectangle()
b = b.linear((300,300), 100)
b = b.linear((0,300), 200)
b = b.linear((300,0), 300)
g.add(b)
path = b.groundtruth()
pathdict = d... | 30.041667 | 71 | 0.585298 |
90192683a9596914db24fa7e2c76ff1a12788127 | 355 | py | Python | angr/engines/soot/statements/goto.py | Kyle-Kyle/angr | 345b2131a7a67e3a6ffc7d9fd475146a3e12f837 | [
"BSD-2-Clause"
] | 6,132 | 2015-08-06T23:24:47.000Z | 2022-03-31T21:49:34.000Z | angr/engines/soot/statements/goto.py | Kyle-Kyle/angr | 345b2131a7a67e3a6ffc7d9fd475146a3e12f837 | [
"BSD-2-Clause"
] | 2,272 | 2015-08-10T08:40:07.000Z | 2022-03-31T23:46:44.000Z | angr/engines/soot/statements/goto.py | Kyle-Kyle/angr | 345b2131a7a67e3a6ffc7d9fd475146a3e12f837 | [
"BSD-2-Clause"
] | 1,155 | 2015-08-06T23:37:39.000Z | 2022-03-31T05:54:11.000Z |
import logging
from .base import SimSootStmt
l = logging.getLogger('angr.engines.soot.statements.goto')
| 25.357143 | 73 | 0.704225 |
901943c57d651786afa2ce40b989408f3ebb4e7f | 979 | py | Python | game/entity/player.py | fisher60/pyweek-2021 | 294b45d768a7e0d85ac67dc4b12384e68fc4f399 | [
"MIT"
] | 8 | 2021-03-27T21:20:28.000Z | 2021-03-31T08:09:26.000Z | game/entity/player.py | fisher60/pyweek-2021 | 294b45d768a7e0d85ac67dc4b12384e68fc4f399 | [
"MIT"
] | 49 | 2021-03-27T21:18:08.000Z | 2021-04-03T02:53:53.000Z | game/entity/player.py | fisher60/pyweek-2021 | 294b45d768a7e0d85ac67dc4b12384e68fc4f399 | [
"MIT"
] | 1 | 2021-04-02T21:58:39.000Z | 2021-04-02T21:58:39.000Z | import arcade
from ..constants import TILE_SIZE, PLAYER_SCALING
from ..utils import Vector
| 25.763158 | 77 | 0.597549 |
901a2b9dfc7f70764388119a93640679584d1a0d | 112 | py | Python | scikits/datasmooth/__init__.py | jjstickel/scikit-datasmooth | 976ab86998d1648506684360ab9d65b8a3ccf078 | [
"BSD-3-Clause"
] | 7 | 2015-06-18T15:34:28.000Z | 2021-09-14T13:04:08.000Z | scikits/datasmooth/__init__.py | jjstickel/scikit-datasmooth | 976ab86998d1648506684360ab9d65b8a3ccf078 | [
"BSD-3-Clause"
] | 2 | 2018-03-10T03:46:39.000Z | 2018-11-27T18:55:13.000Z | scikits/datasmooth/__init__.py | jjstickel/scikit-datasmooth | 976ab86998d1648506684360ab9d65b8a3ccf078 | [
"BSD-3-Clause"
] | 6 | 2015-03-29T07:36:18.000Z | 2020-09-15T16:25:06.000Z | __version__ = '0.7.1'
try:
from regularsmooth import *
except ImportError:
from .regularsmooth import *
| 18.666667 | 32 | 0.714286 |
901cb3458a6cbbc2527b80d00c06a9a4f1e903b2 | 2,389 | py | Python | code/tfidf/tfidf.py | vadlamak/strata-teaching-the-elephant-to-read | 5f3963c90c520ac1b7b41d21939230ef5df6414f | [
"Apache-2.0"
] | null | null | null | code/tfidf/tfidf.py | vadlamak/strata-teaching-the-elephant-to-read | 5f3963c90c520ac1b7b41d21939230ef5df6414f | [
"Apache-2.0"
] | 1 | 2021-03-26T00:26:00.000Z | 2021-03-26T00:26:00.000Z | code/tfidf/tfidf.py | vadlamak/strata-teaching-the-elephant-to-read | 5f3963c90c520ac1b7b41d21939230ef5df6414f | [
"Apache-2.0"
] | null | null | null | import math
import string
from itertools import groupby
from operator import itemgetter
from nltk.corpus import stopwords
from nltk.tokenize import wordpunct_tokenize
N = 10788.0 # Number of documents, in float to make division work.
def runner(job):
job.additer(TermMapper, SumReducer, combiner=SumReducer)
... | 25.688172 | 72 | 0.612809 |
901d3f9a5542e6bed0daf35f7574ccf1740c36b8 | 1,046 | py | Python | game-watch-api/games/admin.py | fouadsan/game_watch | ca38d283ef8f55499ea520eb52a78ebfac8a77a4 | [
"MIT"
] | null | null | null | game-watch-api/games/admin.py | fouadsan/game_watch | ca38d283ef8f55499ea520eb52a78ebfac8a77a4 | [
"MIT"
] | null | null | null | game-watch-api/games/admin.py | fouadsan/game_watch | ca38d283ef8f55499ea520eb52a78ebfac8a77a4 | [
"MIT"
] | null | null | null | from django.contrib import admin
from admin_interface.models import Theme as Th
from .models import Genre, Platform, Screenshot, Artwork, Mode, PlayerPerspective, Engine, Theme, Game
admin.site.unregister(Th)
admin.site.register(Genre)
admin.site.register(Platform)
admin.site.register(Mode)
admin.site.register(Playe... | 32.6875 | 209 | 0.711281 |
901eab214940948112dfada28e162b16759ac77e | 589 | py | Python | plot-wbgt.py | tanupoo/tools-pubsec | 3dfea4b677226395eff89f90aebec3105ba4f4d5 | [
"MIT"
] | 1 | 2021-05-27T21:10:04.000Z | 2021-05-27T21:10:04.000Z | plot-wbgt.py | tanupoo/pubsec-tools | 3dfea4b677226395eff89f90aebec3105ba4f4d5 | [
"MIT"
] | null | null | null | plot-wbgt.py | tanupoo/pubsec-tools | 3dfea4b677226395eff89f90aebec3105ba4f4d5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
import json
import matplotlib.pyplot as plt
result = json.load(sys.stdin)
x = result["hour"]
y = result["wbgt"]
fig = plt.figure(figsize=(8, 4))
ax1 = fig.add_subplot(1,1,1)
ax1.set_xlabel("hour")
ax1.set_ylabel("wbgt")
ax1.set_xticks(list(range(0,24,1)))
ax1.set_yticks(list(range(1... | 21.035714 | 48 | 0.696095 |
90204f12090cacf498331393d685af08f22c49b2 | 1,005 | py | Python | day_07/day_07.py | GuillaumeGandon/advent-of-code-2015 | ff4201a9a27d1ca7f687a613eeec72dd12fe1487 | [
"MIT"
] | null | null | null | day_07/day_07.py | GuillaumeGandon/advent-of-code-2015 | ff4201a9a27d1ca7f687a613eeec72dd12fe1487 | [
"MIT"
] | null | null | null | day_07/day_07.py | GuillaumeGandon/advent-of-code-2015 | ff4201a9a27d1ca7f687a613eeec72dd12fe1487 | [
"MIT"
] | null | null | null | from functools import cache
circuit = dict(map(split_row, open('input').read().splitlines()))
print(f"Answer part one: {solve('a')}")
solve.cache_clear()
circuit['b'] = ('16076',)
print(f"Answer part two: {solve('a')}")
| 25.769231 | 65 | 0.536318 |
90215693db46543c286a97842122238df6972cc0 | 523 | py | Python | noteout/tests/test_nb_only.py | stefanv/noteout | b76b35c675fa1221be35835d56c2937e3f56b317 | [
"BSD-2-Clause"
] | 3 | 2021-08-14T19:35:37.000Z | 2021-08-23T16:53:51.000Z | noteout/tests/test_nb_only.py | stefanv/noteout | b76b35c675fa1221be35835d56c2937e3f56b317 | [
"BSD-2-Clause"
] | 1 | 2021-11-23T18:40:45.000Z | 2021-11-23T20:40:48.000Z | noteout/tests/test_nb_only.py | stefanv/noteout | b76b35c675fa1221be35835d56c2937e3f56b317 | [
"BSD-2-Clause"
] | 1 | 2021-11-23T18:33:58.000Z | 2021-11-23T18:33:58.000Z | """ Test nb-only filter
"""
from io import StringIO
from noteout.nb_only import NbonlyFilter as nnbo
from .tutils import (read_md, assert_json_equal, filter_doc)
| 17.433333 | 60 | 0.692161 |
9021b355ad9a734bb50dcef4f74291f2233e5506 | 1,386 | py | Python | spectrocrunch/utils/comparable.py | woutdenolf/spectrocrunch | fde4b6e0f462f464ce7af6a942b355d3d8f39f77 | [
"MIT"
] | 3 | 2018-04-16T15:51:36.000Z | 2019-12-16T11:21:05.000Z | spectrocrunch/utils/comparable.py | woutdenolf/spectrocrunch | fde4b6e0f462f464ce7af6a942b355d3d8f39f77 | [
"MIT"
] | null | null | null | spectrocrunch/utils/comparable.py | woutdenolf/spectrocrunch | fde4b6e0f462f464ce7af6a942b355d3d8f39f77 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import operator
| 23.491525 | 59 | 0.591631 |
9021bc3863fa351375d2c840439601cf105a7273 | 3,241 | py | Python | backend/fastspider.py | wakeblade/weiboSpiderAndCook | b5ca0708abd0a938eb0ac611d037a5d3daf9384f | [
"MIT"
] | 1 | 2020-02-08T16:22:19.000Z | 2020-02-08T16:22:19.000Z | backend/fastspider.py | wakeblade/weiboWordCount | b5ca0708abd0a938eb0ac611d037a5d3daf9384f | [
"MIT"
] | null | null | null | backend/fastspider.py | wakeblade/weiboWordCount | b5ca0708abd0a938eb0ac611d037a5d3daf9384f | [
"MIT"
] | null | null | null | # !/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
from gevent import monkey
monkey.patch_all()
from gevent.queue import Queue
"""
import requests
import time
import random
proxies=[]
with open('./ips.txt') as f:
proxies = [line.split('@')[0] for line in f]
"""
url = 'http://icanhazip.com'
header ={
'Accept'... | 28.429825 | 142 | 0.573588 |
9021ca74c4cfd208803fde68aec8f4729d95dd36 | 1,156 | py | Python | setup.py | loic-simon/asyncode | 5f9873acf93f1a3ae6d4ca0b3dfc55acc7598969 | [
"MIT"
] | 1 | 2021-12-22T16:09:52.000Z | 2021-12-22T16:09:52.000Z | setup.py | loic-simon/asyncode | 5f9873acf93f1a3ae6d4ca0b3dfc55acc7598969 | [
"MIT"
] | null | null | null | setup.py | loic-simon/asyncode | 5f9873acf93f1a3ae6d4ca0b3dfc55acc7598969 | [
"MIT"
] | null | null | null | import setuptools
version = "1.0.0"
with open("README.md", "r", encoding="utf-8") as fh:
readme = fh.read()
setuptools.setup(
name="asyncode",
version=version,
author="Loc Simon",
author_email="loic.simon@espci.org",
description="Emulating Python's interactive interpreter in asynchronous cont... | 31.243243 | 86 | 0.634948 |
9021dafddba10ec136860876afbe1b58c1dcc7f4 | 1,926 | py | Python | test_image.py | GSM-Festival-2021/Prettier-photo-plus-Server | 98c30d5c8379491d12a4cfd4ed880fd800c40a7c | [
"MIT"
] | null | null | null | test_image.py | GSM-Festival-2021/Prettier-photo-plus-Server | 98c30d5c8379491d12a4cfd4ed880fd800c40a7c | [
"MIT"
] | null | null | null | test_image.py | GSM-Festival-2021/Prettier-photo-plus-Server | 98c30d5c8379491d12a4cfd4ed880fd800c40a7c | [
"MIT"
] | null | null | null | function solution(x1, y1, x2, y2) {
const x1 = 8;
const y1 = 4;
const x2 = 8;
const y2 = 10;
let soundSum = 0;
// 5
if (Math.abs(x1 - x2) + Math.abs(y1 - y2) < 4) return -1;
if (3 < x1 && x1 < 13 && 3 < x2 && x2 < 13 && 3 < y1 && y1 < 13 && 3 < y2 && y2 < 13) {
// 80 .
... | 21.164835 | 91 | 0.450156 |
9022b8901ebe6c1ee9599a4efe5b224353a4bd15 | 8,328 | py | Python | crops/command_line/crops-cropstr.py | jjavier-bm/crops | 658a98f9c168cc27b3f967e7a60a0df896ef5ac6 | [
"BSD-3-Clause"
] | null | null | null | crops/command_line/crops-cropstr.py | jjavier-bm/crops | 658a98f9c168cc27b3f967e7a60a0df896ef5ac6 | [
"BSD-3-Clause"
] | 5 | 2020-07-17T08:45:22.000Z | 2022-03-11T13:39:26.000Z | crops/command_line/crops-cropstr.py | jjavier-bm/crops | 658a98f9c168cc27b3f967e7a60a0df896ef5ac6 | [
"BSD-3-Clause"
] | 1 | 2020-07-07T15:42:07.000Z | 2020-07-07T15:42:07.000Z | """==========
This script will remove a number of residues from a sequence file
in agreement to the intervals and other details supplied.
"""
from crops.about import __prog__, __description__, __author__, __date__, __version__
import argparse
import os
from crops.io import check_path
from crops.io import outpathgen... | 47.862069 | 289 | 0.635687 |
90251fea4bf1c0681bcedcffe3e8a599e9d53e72 | 13,189 | py | Python | DSDM_Assignment2_final.py | antonyjames1996/time-series-analysis-agrotech | 1e2abfe07f0e82c7a6f5cc01a268826fb2d29635 | [
"MIT"
] | null | null | null | DSDM_Assignment2_final.py | antonyjames1996/time-series-analysis-agrotech | 1e2abfe07f0e82c7a6f5cc01a268826fb2d29635 | [
"MIT"
] | null | null | null | DSDM_Assignment2_final.py | antonyjames1996/time-series-analysis-agrotech | 1e2abfe07f0e82c7a6f5cc01a268826fb2d29635 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[95]:
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
# get_ipython().run_line_magic('matplotlib', 'inline')
from sklearn.neighbors import LocalOutlierFactor
from sklearn.model_selection import train_test_split
from sklearn.line... | 26.116832 | 119 | 0.679506 |
902524521dfdcde30b78e79a7e608392d647a998 | 6,127 | py | Python | modules/msa/msa/contrib/uniqauth/views.py | haoyutan/MSA-Framework | 7c5553b244347f26029729161e15e60b0cc805f5 | [
"MIT"
] | 2 | 2016-11-22T11:44:52.000Z | 2017-08-29T02:38:01.000Z | modules/msa/msa/contrib/uniqauth/views.py | haoyutan/MSA-Framework | 7c5553b244347f26029729161e15e60b0cc805f5 | [
"MIT"
] | null | null | null | modules/msa/msa/contrib/uniqauth/views.py | haoyutan/MSA-Framework | 7c5553b244347f26029729161e15e60b0cc805f5 | [
"MIT"
] | null | null | null | from django.contrib.auth import authenticate
from msa.utils.ipware import get_ip
from msa.views import LoggedAPIView
from rest_framework import status
from rest_framework.authentication import TokenAuthentication, BasicAuthentication
from rest_framework.authtoken.models import Token
from rest_framework.permissions impo... | 37.588957 | 110 | 0.647299 |
9025967f892fe7e0100f3ff33e467fab11a11531 | 4,830 | py | Python | dcm2niix.py | rhancockn/dcm2bids | 16597eeb20edfa0ec707c9bd0bf8468d94e0c925 | [
"MIT"
] | null | null | null | dcm2niix.py | rhancockn/dcm2bids | 16597eeb20edfa0ec707c9bd0bf8468d94e0c925 | [
"MIT"
] | null | null | null | dcm2niix.py | rhancockn/dcm2bids | 16597eeb20edfa0ec707c9bd0bf8468d94e0c925 | [
"MIT"
] | null | null | null | #!/use/bin/python
import tempfile
import os
import dicom
import pandas
import json
import numpy as np
from os.path import join
import glob
import errno
import shutil
| 32.2 | 285 | 0.695238 |
902da8cbd33808618399125bb013b3cfef957b80 | 4,479 | py | Python | src/sss/genkey.py | foundriesio/plug-and-trust-ssscli | f77c65d5b3de649d7db1c023ee41d871f77cd224 | [
"Apache-2.0"
] | null | null | null | src/sss/genkey.py | foundriesio/plug-and-trust-ssscli | f77c65d5b3de649d7db1c023ee41d871f77cd224 | [
"Apache-2.0"
] | null | null | null | src/sss/genkey.py | foundriesio/plug-and-trust-ssscli | f77c65d5b3de649d7db1c023ee41d871f77cd224 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2018-2020 NXP
# SPDX-License-Identifier: Apache-2.0
#
#
"""License text"""
import logging
from . import sss_api as apis
from .keystore import KeyStore
from .keyobject import KeyObject
from .getkey import Get
from .util import get_ecc_cypher_type
log = logging.getLogger(__name__)
| 33.177778 | 124 | 0.621121 |
902e9315b6728c26e93d095508b7d9dca413b5b0 | 979 | py | Python | Python/uds/uds_client.py | kaehsu/template-bash | f8a8a4babb8537622a4e4246701761a9832d6aeb | [
"MIT"
] | null | null | null | Python/uds/uds_client.py | kaehsu/template-bash | f8a8a4babb8537622a4e4246701761a9832d6aeb | [
"MIT"
] | null | null | null | Python/uds/uds_client.py | kaehsu/template-bash | f8a8a4babb8537622a4e4246701761a9832d6aeb | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# To communicate with UDS server by nc: "echo -e "string\c" | sudo nc -q 1 -U /var/run/uds_led"
import socket
serverAddress = '/tmp/portex_tmp'
if __name__ == '__main__':
main()
| 28.794118 | 95 | 0.507661 |
902fb2aef8b4515b1af62bd380980dd14457df65 | 502 | py | Python | apps/workspaces/migrations/0007_workspacegeneralsettings_auto_map_employees.py | fylein/fyle-xero-api | ba81af058dc413fc801d4cf7d1a8961bd42df469 | [
"MIT"
] | null | null | null | apps/workspaces/migrations/0007_workspacegeneralsettings_auto_map_employees.py | fylein/fyle-xero-api | ba81af058dc413fc801d4cf7d1a8961bd42df469 | [
"MIT"
] | 6 | 2020-12-24T10:24:02.000Z | 2021-11-30T05:04:53.000Z | apps/workspaces/migrations/0007_workspacegeneralsettings_auto_map_employees.py | fylein/fyle-xero-api | ba81af058dc413fc801d4cf7d1a8961bd42df469 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.3 on 2021-02-19 18:04
from django.db import migrations, models
| 26.421053 | 111 | 0.663347 |
903025199c8cb18d7b43068916c16d96cb4139f2 | 2,967 | py | Python | 0x06-python-classes/100-singly_linked_list.py | Trice254/alx-higher_level_programming | b49b7adaf2c3faa290b3652ad703914f8013c67c | [
"MIT"
] | null | null | null | 0x06-python-classes/100-singly_linked_list.py | Trice254/alx-higher_level_programming | b49b7adaf2c3faa290b3652ad703914f8013c67c | [
"MIT"
] | null | null | null | 0x06-python-classes/100-singly_linked_list.py | Trice254/alx-higher_level_programming | b49b7adaf2c3faa290b3652ad703914f8013c67c | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""
Module 100-singly_linked_list
Defines class Node (with private data and next_node)
Defines class SinglyLinkedList (with private head and public sorted_insert)
"""
| 23.179688 | 78 | 0.532524 |
90303a8de55d76b20b74b604783236c6d15111a5 | 310 | py | Python | BI-IOS/semester-project/webapp/beecon/campaigns/urls.py | josefdolezal/fit-cvut | 6b6abea4232b946246d33290718d6c5007926b63 | [
"MIT"
] | 20 | 2016-05-15T10:39:53.000Z | 2022-03-29T00:06:06.000Z | BI-IOS/semester-project/webapp/beecon/campaigns/urls.py | josefdolezal/fit-cvut | 6b6abea4232b946246d33290718d6c5007926b63 | [
"MIT"
] | 3 | 2017-05-27T16:44:01.000Z | 2019-01-02T21:02:59.000Z | BI-IOS/semester-project/webapp/beecon/campaigns/urls.py | josefdolezal/fit-cvut | 6b6abea4232b946246d33290718d6c5007926b63 | [
"MIT"
] | 11 | 2018-08-22T21:16:32.000Z | 2021-04-10T22:42:34.000Z | from django.conf.urls import url
from . import views
app_name = 'campaigns'
urlpatterns = [
url( r'^$', views.JsonView.response, name='index' ),
url( r'^(?P<app_code>[a-zA-Z0-9]+)/info/$', views.info, name='info' ),
url( r'^(?P<app_code>[a-zA-Z0-9]+)/services/$', views.services, name='services' ),
]
| 25.833333 | 84 | 0.632258 |
9032381dcc04f711d03772a06dc91a54a4d1b366 | 5,802 | py | Python | models/joint_representation.py | ybCliff/VideoCaptioning | 93fc3b095c970e51e1e24909163a827df98d6ef3 | [
"MIT"
] | 3 | 2020-05-16T23:59:57.000Z | 2021-06-14T01:59:41.000Z | models/joint_representation.py | ybCliff/VideoCaptioning | 93fc3b095c970e51e1e24909163a827df98d6ef3 | [
"MIT"
] | null | null | null | models/joint_representation.py | ybCliff/VideoCaptioning | 93fc3b095c970e51e1e24909163a827df98d6ef3 | [
"MIT"
] | 3 | 2020-05-17T00:01:01.000Z | 2020-07-28T18:04:05.000Z | import torch
import torch.nn as nn
| 39.739726 | 146 | 0.601344 |
9034fc76134be07855830d17f0d402a691811b26 | 2,489 | py | Python | scream/monorepo.py | r-kells/scream | 3f5d325cd05a0f3eccc4b579b4929be49029ab09 | [
"MIT"
] | 26 | 2018-11-29T13:33:25.000Z | 2021-11-22T18:45:19.000Z | scream/monorepo.py | r-kells/scream | 3f5d325cd05a0f3eccc4b579b4929be49029ab09 | [
"MIT"
] | 14 | 2019-01-20T00:07:13.000Z | 2020-07-15T13:19:29.000Z | scream/monorepo.py | r-kells/scream | 3f5d325cd05a0f3eccc4b579b4929be49029ab09 | [
"MIT"
] | 2 | 2019-02-25T17:31:47.000Z | 2020-01-22T22:10:41.000Z | import collections
from scream.files import Docs, Scream, Tox
| 34.09589 | 107 | 0.627561 |
9036fe41e979c0dcc374002d6e7021871b3e9ae0 | 9,837 | py | Python | src/oddball/oddball.py | stillarrow/NetworkAnomalyDetection | f41fd6b6d7cb302dc2eaa4c0f8d7b04b7ed4fd3c | [
"MIT"
] | 1 | 2021-05-12T09:37:47.000Z | 2021-05-12T09:37:47.000Z | src/oddball/oddball.py | stillarrow/NetworkAnomalyDetection | f41fd6b6d7cb302dc2eaa4c0f8d7b04b7ed4fd3c | [
"MIT"
] | null | null | null | src/oddball/oddball.py | stillarrow/NetworkAnomalyDetection | f41fd6b6d7cb302dc2eaa4c0f8d7b04b7ed4fd3c | [
"MIT"
] | null | null | null | '''
Python3 implementation of oddball
@author:
Tao Yu (gloooryyt@gmail.com)
'''
import numpy as np
from sklearn.linear_model import LinearRegression
from sklearn.neighbors import LocalOutlierFactor
# feature dictionary which format is {node i's id:Ni, Ei, Wi, w,i}
| 31.630225 | 125 | 0.620718 |
9037bc76d22fa05dd0f3bfed5e08c4fd3d0cc516 | 538 | py | Python | tbase/common/logger.py | iminders/TradeBaselines | 26eb87f2bcd5f6ff479149219b38b17002be6a40 | [
"MIT"
] | 16 | 2020-03-19T15:12:28.000Z | 2021-12-20T06:02:32.000Z | tbase/common/logger.py | iminders/TradeBaselines | 26eb87f2bcd5f6ff479149219b38b17002be6a40 | [
"MIT"
] | 14 | 2020-03-23T03:57:00.000Z | 2021-12-20T05:53:33.000Z | tbase/common/logger.py | iminders/TradeBaselines | 26eb87f2bcd5f6ff479149219b38b17002be6a40 | [
"MIT"
] | 7 | 2020-03-25T00:30:18.000Z | 2021-01-31T18:45:09.000Z | import logging
import os
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s %(filename)s[%(lineno)d] %(levelname)s %(message)s')
logger = logging.getLogger()
dir_name = os.path.join("/tmp", "tbase")
if not os.path.exists(dir_name):
os.makedirs(dir_name)
handler = logging.FileHandler(os.path.jo... | 26.9 | 76 | 0.723048 |
9037ec295216061bb4362e12f89dff7a2894c6f3 | 3,125 | py | Python | profesionales/migrations/0005_auto_20190928_2338.py | cluster311/ggg | 262173c66fe40ada30083d439a79f16f841f5772 | [
"BSD-3-Clause"
] | 6 | 2020-03-16T02:51:16.000Z | 2020-11-10T00:58:01.000Z | profesionales/migrations/0005_auto_20190928_2338.py | cluster311/ggg | 262173c66fe40ada30083d439a79f16f841f5772 | [
"BSD-3-Clause"
] | 204 | 2019-09-19T02:00:57.000Z | 2022-02-10T10:48:52.000Z | profesionales/migrations/0005_auto_20190928_2338.py | cluster311/ggg | 262173c66fe40ada30083d439a79f16f841f5772 | [
"BSD-3-Clause"
] | 3 | 2019-09-16T22:59:24.000Z | 2022-03-21T22:52:44.000Z | # Generated by Django 2.2.4 on 2019-09-28 23:38
import address.models
from django.db import migrations, models
import django.db.models.deletion
| 38.580247 | 377 | 0.57824 |
903b18672626ab4ad3a5e3aded8aea7688abd5d5 | 757 | py | Python | standards/tests/models.py | GROCCAD/groccad | 1d461043030bebe277d74b1c9df9877436baa270 | [
"MIT"
] | 1 | 2022-03-05T03:11:51.000Z | 2022-03-05T03:11:51.000Z | standards/tests/models.py | rocdata/rocserver | 1d461043030bebe277d74b1c9df9877436baa270 | [
"MIT"
] | null | null | null | standards/tests/models.py | rocdata/rocserver | 1d461043030bebe277d74b1c9df9877436baa270 | [
"MIT"
] | null | null | null | from functools import partial
from django.db import models
from standards.fields import CharIdField
# MODEL FIXTURES
################################################################################
| 23.65625 | 80 | 0.698811 |
903bd4a9af5949595a7b7528cd44f5048565dedd | 10,070 | py | Python | torchsrc/models/fcn32s_BN.py | yuankaihuo/MedPhysics | 94d8c5357b76658b9b161b541a1f195c6550ce55 | [
"Apache-2.0"
] | null | null | null | torchsrc/models/fcn32s_BN.py | yuankaihuo/MedPhysics | 94d8c5357b76658b9b161b541a1f195c6550ce55 | [
"Apache-2.0"
] | null | null | null | torchsrc/models/fcn32s_BN.py | yuankaihuo/MedPhysics | 94d8c5357b76658b9b161b541a1f195c6550ce55 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
# https://github.com/shelhamer/fcn.berkeleyvision.org/blob/master/surgery.py
def get_upsample_filter(size):
"""Make a 2D bilinear kernel suitable for upsampling"""
factor = (size + 1) // 2
if size % 2 == 1:
... | 36.751825 | 101 | 0.523932 |
903c7397f31fe34f15318c7f6541642d7c880c26 | 1,067 | py | Python | src/schema/models.py | prashant0079/metabolic_assignment | 9660ef06e6015833e3c64de9c3fe34927c85ba49 | [
"MIT"
] | null | null | null | src/schema/models.py | prashant0079/metabolic_assignment | 9660ef06e6015833e3c64de9c3fe34927c85ba49 | [
"MIT"
] | 1 | 2021-09-05T15:39:56.000Z | 2021-09-05T20:26:39.000Z | src/schema/models.py | prashant0079/metabolic_assignment | 9660ef06e6015833e3c64de9c3fe34927c85ba49 | [
"MIT"
] | null | null | null | from pydantic import BaseModel
from typing import List
# The models used in this module are being used by the API
# for type validation using Pydantic as FastAPI is reliant
# on pydantic for Data validation
| 17.209677 | 58 | 0.68135 |
903c8cc3beaefd54c725e04177cee3cf91f69504 | 348 | py | Python | myproject/myapp/admin.py | wasit7/cs459_2018 | 78243bbc939fcc2ed7528df8c14ad75e4b78d9a2 | [
"BSD-2-Clause"
] | null | null | null | myproject/myapp/admin.py | wasit7/cs459_2018 | 78243bbc939fcc2ed7528df8c14ad75e4b78d9a2 | [
"BSD-2-Clause"
] | null | null | null | myproject/myapp/admin.py | wasit7/cs459_2018 | 78243bbc939fcc2ed7528df8c14ad75e4b78d9a2 | [
"BSD-2-Clause"
] | null | null | null | from django.contrib import admin
from .models import Product
admin.site.register(Product, ProductAdmin) | 34.8 | 57 | 0.678161 |
903de14b44d3f2b0857467165c0169f5dac5d5b8 | 404 | py | Python | app.py | 923310233/APk-Down-Load | e7c3e4fdfbf9f7d8398d91ce0c5c028dfc685f3a | [
"MIT"
] | 2 | 2021-07-28T07:06:55.000Z | 2021-07-28T07:08:19.000Z | app.py | 923310233/APk-Down-Load | e7c3e4fdfbf9f7d8398d91ce0c5c028dfc685f3a | [
"MIT"
] | null | null | null | app.py | 923310233/APk-Down-Load | e7c3e4fdfbf9f7d8398d91ce0c5c028dfc685f3a | [
"MIT"
] | null | null | null | import subprocess
f = open("app_list.csv","r")
lines = f.readlines()
for line in lines:
print(line.strip())
command = "node app.js " + line.strip();
display = subprocess.run(command, stdout=subprocess.PIPE, shell=True)
# display = subprocess.run(["sudo","-u",username,"tshark", "-r", pcapname, "-Y", disp... | 31.076923 | 126 | 0.680693 |