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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
895d842bfc897627a79eb5fa98161a381e6ef77f | 3,925 | py | Python | venv/Lib/site-packages/caffe2/python/serialized_test/coverage.py | Westlanderz/AI-Plat1 | 1187c22819e5135e8e8189c99b86a93a0d66b8d8 | [
"MIT"
] | 1 | 2022-01-08T12:30:44.000Z | 2022-01-08T12:30:44.000Z | venv/Lib/site-packages/caffe2/python/serialized_test/coverage.py | Westlanderz/AI-Plat1 | 1187c22819e5135e8e8189c99b86a93a0d66b8d8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/caffe2/python/serialized_test/coverage.py | Westlanderz/AI-Plat1 | 1187c22819e5135e8e8189c99b86a93a0d66b8d8 | [
"MIT"
] | null | null | null |
from caffe2.proto import caffe2_pb2
from caffe2.python import core, workspace
import os
import tempfile
from zipfile import ZipFile
'''
Generates a document in markdown format summrizing the coverage of serialized
testing. The document lives in
`caffe2/python/serialized_test/SerializedTestCoverage.m... | 33.547009 | 81 | 0.581401 |
895d85c3848fdf650e4c05e01cd969f8ec991a9c | 3,081 | py | Python | phylib/electrode/tests/test_mea.py | kushbanga/phylib | a4c7262b4ebcd6edb29409e2c08c5870fc9444eb | [
"BSD-3-Clause"
] | 6 | 2019-05-06T19:05:59.000Z | 2020-11-20T03:21:01.000Z | phylib/electrode/tests/test_mea.py | kushbanga/phylib | a4c7262b4ebcd6edb29409e2c08c5870fc9444eb | [
"BSD-3-Clause"
] | 31 | 2019-05-13T14:14:57.000Z | 2021-08-08T15:52:55.000Z | phylib/electrode/tests/test_mea.py | kushbanga/phylib | a4c7262b4ebcd6edb29409e2c08c5870fc9444eb | [
"BSD-3-Clause"
] | 14 | 2019-05-09T12:09:37.000Z | 2021-06-17T12:42:47.000Z | # -*- coding: utf-8 -*-
"""Test MEA."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
from pathlib import Path
from pytest import raises
import numpy as np
from numpy.testing import assert_arr... | 28.527778 | 79 | 0.506654 |
895e4c63f5ae467a6f1d90d9268cfad2b249e278 | 4,233 | py | Python | brownies/legacy/endl/endlmath.py | brown170/fudge | 4f818b0e0b0de52bc127dd77285b20ce3568c97a | [
"BSD-3-Clause"
] | 14 | 2019-08-29T23:46:24.000Z | 2022-03-21T10:16:25.000Z | brownies/legacy/endl/endlmath.py | brown170/fudge | 4f818b0e0b0de52bc127dd77285b20ce3568c97a | [
"BSD-3-Clause"
] | 1 | 2020-08-04T16:14:45.000Z | 2021-12-01T01:54:34.000Z | brownies/legacy/endl/endlmath.py | brown170/fudge | 4f818b0e0b0de52bc127dd77285b20ce3568c97a | [
"BSD-3-Clause"
] | 2 | 2022-03-03T22:41:41.000Z | 2022-03-03T22:54:43.000Z | # <<BEGIN-copyright>>
# Copyright 2021, Lawrence Livermore National Security, LLC.
# See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: BSD-3-Clause
# <<END-copyright>>
"""
This module contains useful fudge math routines that do not fit into any other module.
"""
from pqu import PQU
from fudg... | 32.068182 | 115 | 0.584692 |
896328ad1b36a8f2472f83b37ee24bfcae36a1c4 | 14 | py | Python | object-oriented-design/python/jigsaw.py | DatGreekChick/ctci | b165bd529fe3ca32cc5c95ea274080bd5689501d | [
"MIT"
] | null | null | null | object-oriented-design/python/jigsaw.py | DatGreekChick/ctci | b165bd529fe3ca32cc5c95ea274080bd5689501d | [
"MIT"
] | null | null | null | object-oriented-design/python/jigsaw.py | DatGreekChick/ctci | b165bd529fe3ca32cc5c95ea274080bd5689501d | [
"MIT"
] | null | null | null | # 7.6: Jigsaw
| 7 | 13 | 0.571429 |
89633e1d922672b9a497cfb56951f732f39ebba2 | 9,502 | py | Python | kyk/kyk.py | atrautsch/kyk | 9f843bf9503a3da3669fa5d18e43cfdf5c4207ba | [
"MIT"
] | null | null | null | kyk/kyk.py | atrautsch/kyk | 9f843bf9503a3da3669fa5d18e43cfdf5c4207ba | [
"MIT"
] | 1 | 2021-03-25T22:02:54.000Z | 2021-03-25T22:02:54.000Z | kyk/kyk.py | atrautsch/kyk | 9f843bf9503a3da3669fa5d18e43cfdf5c4207ba | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import time
import shutil
import signal
import yaml
import sass
import pyinotify
from colorama import init, Fore, Style
from jsmin import jsmin
from csscompressor import compress
VERSION = '1.4.7'
| 37.262745 | 162 | 0.537676 |
8963fdbff15b6cc0ff84b30bac45aa1b2f8b6b3e | 1,311 | py | Python | Ejercicios Entrada y Salida de Datos/Ejercicio 03.py | jaramosperez/Pythonizando | 3571a6451b383ed5fea35f84e3444fd946c6560d | [
"MIT"
] | 1 | 2020-07-13T04:34:34.000Z | 2020-07-13T04:34:34.000Z | Ejercicios Entrada y Salida de Datos/Ejercicio 03.py | jaramosperez/Pythonizando | 3571a6451b383ed5fea35f84e3444fd946c6560d | [
"MIT"
] | null | null | null | Ejercicios Entrada y Salida de Datos/Ejercicio 03.py | jaramosperez/Pythonizando | 3571a6451b383ed5fea35f84e3444fd946c6560d | [
"MIT"
] | null | null | null | # Ejercicio 3
# Crea un script llamado descomposicion.py que realice las siguientes tareas:
#
# Debe tomar 1 argumento que ser un nmero entero positivo.
# En caso de no recibir un argumento, debe mostrar informacin acerca de cmo utilizar el script.
# El objetivo del script es descomponer el nmero en unidades, decenas, ... | 31.97561 | 117 | 0.701754 |
89643825185d3b753c782bbf4419c3b345d1d58b | 2,616 | py | Python | ansiscaf/ansiscaf.py | terryshi96/ansi | 6292277c54057bef13c56184467c1de2e8a69136 | [
"MIT"
] | 3 | 2017-02-10T07:40:16.000Z | 2017-12-08T01:56:25.000Z | ansiscaf/ansiscaf.py | terryshi96/ansiscaf | 6292277c54057bef13c56184467c1de2e8a69136 | [
"MIT"
] | null | null | null | ansiscaf/ansiscaf.py | terryshi96/ansiscaf | 6292277c54057bef13c56184467c1de2e8a69136 | [
"MIT"
] | null | null | null | import os
import sys
import argparse
_version_ = '0.0.1'
if __name__ == '__main__':
ansi = scaffold()
ansi.parse_opt()
| 29.393258 | 102 | 0.546254 |
896451db24951d71242afacbaa48addf165d4f98 | 7,131 | py | Python | server.py | alexa-griffin/shared-folders | 78224b4bc74be55ce58ed2f448e6c1cbcd69752e | [
"CC0-1.0"
] | null | null | null | server.py | alexa-griffin/shared-folders | 78224b4bc74be55ce58ed2f448e6c1cbcd69752e | [
"CC0-1.0"
] | null | null | null | server.py | alexa-griffin/shared-folders | 78224b4bc74be55ce58ed2f448e6c1cbcd69752e | [
"CC0-1.0"
] | null | null | null | import os
import socket
import threading
import json
import sys
import math
IP = socket.gethostbyname_ex(socket.gethostname())[-1][-1]
PORT = 4450
ADDR = (IP, PORT)
SIZE = 2**10
FORMAT = "utf-8"
SERVER_PATH = "server"
LOGIN = "admin"
PASS = "admin"
if __name__ == "__main__":
main()
| 33.957143 | 170 | 0.51816 |
8965115c33b6d2c569416895234b50bcedd7ba26 | 1,160 | py | Python | test/time_model_fitting.py | gaybro8777/pyPhenology | 2a58654126170eb304c71c5d453745c66058bd83 | [
"MIT"
] | 15 | 2018-11-22T16:36:27.000Z | 2022-02-14T10:58:40.000Z | test/time_model_fitting.py | gaybro8777/pyPhenology | 2a58654126170eb304c71c5d453745c66058bd83 | [
"MIT"
] | 52 | 2017-12-12T17:23:59.000Z | 2021-09-08T01:20:28.000Z | test/time_model_fitting.py | sdtaylor/phenology | 72d1d07dfc1a628a29de77447066ead23ee8b1ec | [
"MIT"
] | 8 | 2018-02-15T12:54:10.000Z | 2021-03-01T22:23:52.000Z | from pyPhenology import utils
observations, temp = utils.load_test_data(name='vaccinium')
import pandas as pd
import time
models_to_use = ['ThermalTime','Alternating','Uniforc','MSB','Unichill']
methods_to_use = ['DE','BF']
sensible_defaults = ['testing','practical','intensive']
timings=[]
for m in models_to_use:
... | 36.25 | 94 | 0.576724 |
896518b91cc64ccabd9d1d0b09a31f091b4c06f2 | 9,394 | py | Python | BioExp/RCT/rct.py | parthnatekar/BioExp | 4d426b8f4d38be1d673e4371e5a5b34c7cabf770 | [
"MIT"
] | 9 | 2019-11-16T04:02:53.000Z | 2022-02-10T13:23:52.000Z | BioExp/RCT/rct.py | parthnatekar/BioExp | 4d426b8f4d38be1d673e4371e5a5b34c7cabf770 | [
"MIT"
] | 5 | 2020-01-28T22:17:05.000Z | 2022-02-09T23:40:53.000Z | BioExp/RCT/rct.py | parthnatekar/BioExp | 4d426b8f4d38be1d673e4371e5a5b34c7cabf770 | [
"MIT"
] | 6 | 2019-11-17T01:31:51.000Z | 2020-12-03T21:15:48.000Z | import keras
import random
import numpy as np
from glob import glob
from keras.models import Model
from keras.utils import np_utils
from keras.models import load_model
import matplotlib.pyplot as plt
import os
import keras.backend as K
import tensorflow as tf
from keras.utils import to_categorical
from tqdm import tqdm... | 34.284672 | 143 | 0.678838 |
896699d0cdac3f9975a021f32ab3c6fa4c1799b6 | 758 | py | Python | convolut/metric/loss.py | convolut/convolut | e7168ace62f70f9df084a652a2b8fa70a6902e55 | [
"Apache-2.0"
] | 9 | 2020-01-07T06:05:58.000Z | 2020-07-03T12:24:31.000Z | convolut/metric/loss.py | convolut/convolut | e7168ace62f70f9df084a652a2b8fa70a6902e55 | [
"Apache-2.0"
] | null | null | null | convolut/metric/loss.py | convolut/convolut | e7168ace62f70f9df084a652a2b8fa70a6902e55 | [
"Apache-2.0"
] | null | null | null | from decouple import Module
from .events import MetricEvent
from ..model import ModelLossEndEvent
| 31.583333 | 66 | 0.51715 |
896a754ac448192eaca4541a428db50fe08184cd | 303 | py | Python | inputs/json_file.py | Eugene-Kuzmenko/render_html_from_json | c3c3152b3c9969f4f54874d361a81d5e5b7f33a0 | [
"MIT"
] | null | null | null | inputs/json_file.py | Eugene-Kuzmenko/render_html_from_json | c3c3152b3c9969f4f54874d361a81d5e5b7f33a0 | [
"MIT"
] | null | null | null | inputs/json_file.py | Eugene-Kuzmenko/render_html_from_json | c3c3152b3c9969f4f54874d361a81d5e5b7f33a0 | [
"MIT"
] | null | null | null | import json
from collections import OrderedDict
| 23.307692 | 98 | 0.650165 |
896aca4891e1316e8534c9060978e02eed953f41 | 1,963 | py | Python | board.py | screw-pack/MacGyver | 04ae8ac78168393c6c607ca792026dc71a5c2905 | [
"MIT"
] | null | null | null | board.py | screw-pack/MacGyver | 04ae8ac78168393c6c607ca792026dc71a5c2905 | [
"MIT"
] | null | null | null | board.py | screw-pack/MacGyver | 04ae8ac78168393c6c607ca792026dc71a5c2905 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# board.py
# Author: Germain GAILLARD <gaillard.germain@gmail.com>
# Version: 0.1
# License: MIT
"""Import modules"""
from random import sample
def set_components(self):
"""randomly pick-up 3 coordinates in a list of available tiles
and create a... | 33.271186 | 79 | 0.529292 |
896dffe0883e57092304362b802eda6ae2176fcc | 9,362 | py | Python | services/core/DNP3Agent/tests/unit_test_point_definitions.py | rmay-intwine/volttron | a449f70e32f73ff0136a838d0feddb928ede6298 | [
"Apache-2.0"
] | 406 | 2015-01-20T03:08:53.000Z | 2022-03-31T20:59:07.000Z | services/core/DNP3Agent/tests/unit_test_point_definitions.py | rmay-intwine/volttron | a449f70e32f73ff0136a838d0feddb928ede6298 | [
"Apache-2.0"
] | 2,031 | 2015-01-05T21:35:45.000Z | 2022-03-29T21:44:36.000Z | services/core/DNP3Agent/tests/unit_test_point_definitions.py | rmay-intwine/volttron | a449f70e32f73ff0136a838d0feddb928ede6298 | [
"Apache-2.0"
] | 219 | 2015-01-20T14:53:57.000Z | 2022-03-06T00:37:41.000Z | # -*- coding: utf-8 -*- {{{
# vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et:
#
# Copyright 2018, 8minutenergy / Kisensum.
#
# 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.apa... | 43.953052 | 120 | 0.638112 |
89738170301569f699c91bba33c6010b3ec65d70 | 430 | py | Python | misago/misago/core/tests/test_frontendcontext_middleware.py | vascoalramos/misago-deployment | 20226072138403108046c0afad9d99eb4163cedc | [
"MIT"
] | 2 | 2021-03-06T21:06:13.000Z | 2021-03-09T15:05:12.000Z | misago/misago/core/tests/test_frontendcontext_middleware.py | vascoalramos/misago-deployment | 20226072138403108046c0afad9d99eb4163cedc | [
"MIT"
] | null | null | null | misago/misago/core/tests/test_frontendcontext_middleware.py | vascoalramos/misago-deployment | 20226072138403108046c0afad9d99eb4163cedc | [
"MIT"
] | null | null | null | from django.test import TestCase
from ..middleware import FrontendContextMiddleware
| 25.294118 | 62 | 0.75814 |
8974ae2b1100d7ceb895be22b8023f6f5d9849a1 | 11,589 | py | Python | tests/test_schema.py | repole/drowsy | 1360068c52d4ef4fbb7bcb2db2e4a5ce9c3c7294 | [
"MIT"
] | 4 | 2016-06-16T20:16:38.000Z | 2020-08-18T19:51:40.000Z | tests/test_schema.py | repole/drowsy | 1360068c52d4ef4fbb7bcb2db2e4a5ce9c3c7294 | [
"MIT"
] | 2 | 2017-10-05T11:14:39.000Z | 2018-04-15T00:54:35.000Z | tests/test_schema.py | repole/drowsy | 1360068c52d4ef4fbb7bcb2db2e4a5ce9c3c7294 | [
"MIT"
] | null | null | null | """
tests.test_parser
~~~~~~~~~~~~~~~~~
Parser tests for Drowsy.
"""
# :copyright: (c) 2016-2020 by Nicholas Repole and contributors.
# See AUTHORS for more details.
# :license: MIT - See LICENSE for more details.
from marshmallow import fields
from marshmallow.exceptions import ValidationErro... | 32.923295 | 74 | 0.592199 |
8975af95154909e66feae919c1c23a3719a39dc8 | 66,893 | py | Python | Assignment2_lastrun.py | iamnavya-agg/Emotion-Categorization-experiemnt | c7cc1a17cbdb414a07cecddb88b4299a1ba51629 | [
"MIT"
] | null | null | null | Assignment2_lastrun.py | iamnavya-agg/Emotion-Categorization-experiemnt | c7cc1a17cbdb414a07cecddb88b4299a1ba51629 | [
"MIT"
] | 4 | 2020-03-12T19:22:46.000Z | 2022-03-12T00:09:38.000Z | Assignment2_lastrun.py | iamnavya-agg/Emotion-Categorization-experiemnt | c7cc1a17cbdb414a07cecddb88b4299a1ba51629 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This experiment was created using PsychoPy3 Experiment Builder (v3.2.3),
on Sun Oct 13 21:34:23 2019
If you publish work using this script the most relevant publication is:
Peirce J, Gray JR, Simpson S, MacAskill M, Hchenberger R, Sogo H, Kastman E, Lindelv JK.... | 44.358753 | 375 | 0.663956 |
8976ac3ed7f5bc537c2e56c41551cfde83e492fd | 1,996 | py | Python | two-phase-v2/OPE-master/run_ope.py | zizuzi/DeepEmbedding | d8762a94863fadced35b1dcc59996dcd02b1acaf | [
"MIT"
] | 1 | 2019-07-10T05:59:26.000Z | 2019-07-10T05:59:26.000Z | two-phase-v2/OPE-master/run_ope.py | zizuzi/DeepEmbedding | d8762a94863fadced35b1dcc59996dcd02b1acaf | [
"MIT"
] | 7 | 2019-03-20T00:28:15.000Z | 2021-09-07T23:48:46.000Z | two-phase-v2/OPE-master/run_ope.py | thaihungle/DeepTopicEmbedding | d8762a94863fadced35b1dcc59996dcd02b1acaf | [
"MIT"
] | null | null | null | import sys
sys.path.insert(0, './')
sys.path.insert(0, './common')
sys.path.insert(0, './ML-FW')
sys.path.insert(0, './ML-OPE')
sys.path.insert(0, './Online-FW')
sys.path.insert(0, './Online-OPE')
sys.path.insert(0, './Streaming-FW')
sys.path.insert(0, './Streaming-OPE')
import time
import shutil
import utilities as ut... | 30.707692 | 70 | 0.726954 |
8976b5f8cdf877569418f78ed284774690ac4102 | 1,006 | py | Python | tests/test_helper.py | swills/pykwalify | f96b76efb810d7d559254d0ec58de628e09f525a | [
"MIT"
] | 275 | 2015-01-03T18:22:05.000Z | 2022-03-29T13:18:28.000Z | tests/test_helper.py | swills/pykwalify | f96b76efb810d7d559254d0ec58de628e09f525a | [
"MIT"
] | 172 | 2015-01-15T11:17:23.000Z | 2022-03-25T13:49:06.000Z | tests/test_helper.py | swills/pykwalify | f96b76efb810d7d559254d0ec58de628e09f525a | [
"MIT"
] | 90 | 2015-01-15T09:00:15.000Z | 2021-07-17T00:23:00.000Z | # -*- coding: utf-8 -*-
# python std lib
import logging
import logging.config
log = logging.getLogger()
# Set the root logger to be silent so all code that uses the python logger
# will not print anything unless we want it to, then it should be specified
# in each test and reseted after that test
def _set_log_lv(le... | 29.588235 | 84 | 0.66998 |
8977bd7b64038385d9857845a7707789f51dd14d | 216 | py | Python | setup.py | mechyai/RL-EmsPy | 01984a9bc37f35991073e17cf715687896d6ea8d | [
"Apache-2.0"
] | 8 | 2022-03-15T13:22:22.000Z | 2022-03-30T09:58:04.000Z | setup.py | mechyai/RL-EmsPy | 01984a9bc37f35991073e17cf715687896d6ea8d | [
"Apache-2.0"
] | null | null | null | setup.py | mechyai/RL-EmsPy | 01984a9bc37f35991073e17cf715687896d6ea8d | [
"Apache-2.0"
] | null | null | null | from distutils.core import setup
setup(
name='RL-EmsPy',
version='0.0.1',
packages=['emspy'],
url='https://github.com/mechyai/RL-EmsPy',
license='Apache License 2.0',
author='Chris Eubel',
)
| 19.636364 | 46 | 0.62963 |
897a56ea0416972cc519745819a41aaa3ab7c3b3 | 2,017 | py | Python | src/hyperloop/geometry/inlet.py | uwhl/Hyperloop | b00a1a6570e1c3d94b3e0ce95bad75892eb6caec | [
"Apache-2.0"
] | 1 | 2016-09-03T09:46:04.000Z | 2016-09-03T09:46:04.000Z | src/hyperloop/geometry/inlet.py | uwhl/Hyperloop | b00a1a6570e1c3d94b3e0ce95bad75892eb6caec | [
"Apache-2.0"
] | null | null | null | src/hyperloop/geometry/inlet.py | uwhl/Hyperloop | b00a1a6570e1c3d94b3e0ce95bad75892eb6caec | [
"Apache-2.0"
] | null | null | null | from math import pi, sqrt
from openmdao.core.component import Component
if __name__ == '__main__':
from openmdao.core.problem import Problem
from openmdao.core.group import Group
p = Problem(root=Group())
p.root.add('comp', InletGeom())
p.setup()
p.run()
for var_name, units in (('r_back_... | 53.078947 | 125 | 0.655429 |
897b0d5575db6738618190b9753ec16b27afe1e4 | 2,988 | py | Python | gza/gzatcp.py | ynadji/drop | 848107d4869963170a0c5e8c70ad3f53792d5e6f | [
"Unlicense"
] | 6 | 2015-04-13T16:51:13.000Z | 2019-04-21T12:10:55.000Z | gza/gzatcp.py | ynadji/drop | 848107d4869963170a0c5e8c70ad3f53792d5e6f | [
"Unlicense"
] | null | null | null | gza/gzatcp.py | ynadji/drop | 848107d4869963170a0c5e8c70ad3f53792d5e6f | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
#
# DNS gameplay
from scapy.all import *
import sys,os,time
import nfqueue
import socket
from gzacommon import GZA
# time.windows, damballa, damballa, local
WHITELIST_IPS = ["207.46.232.", "172.22.0.", "172.22.10.", "192.168.", "0.0.0.0", "255.255.255.255"]
seen_ips = []
| 31.125 | 100 | 0.553548 |
897b4e6d0cd4fcb2d42922fef3503586389e4297 | 170 | py | Python | static/images/uploads/convert-to-web.py | KrishSkywalker/krishgoel.com-v2 | a27f6bd9541f354a6ded37e6dcd9ca930c2264ff | [
"MIT"
] | null | null | null | static/images/uploads/convert-to-web.py | KrishSkywalker/krishgoel.com-v2 | a27f6bd9541f354a6ded37e6dcd9ca930c2264ff | [
"MIT"
] | 2 | 2021-10-09T06:50:53.000Z | 2021-10-09T06:56:21.000Z | static/images/uploads/convert-to-web.py | KrishSkywalker/krishgoel.com-v2 | a27f6bd9541f354a6ded37e6dcd9ca930c2264ff | [
"MIT"
] | null | null | null | import os
from cv2 import cv2
for d in os.listdir():
if not d.endswith(".png"): continue
img = cv2.imread(d)
cv2.imwrite(d.replace(".png",".webp"), img)
os.remove(d) | 21.25 | 44 | 0.670588 |
897b64057889d6f4e8ff4affe28b5a7f47a4113d | 16,328 | bzl | Python | test/internal/opts/process_compiler_opts_tests.bzl | buildbuddy-io/rules_xcodeproj | 79a54779d530d3907a69a7910c71c06fec4aefeb | [
"MIT"
] | 30 | 2022-02-11T16:36:24.000Z | 2022-03-31T18:18:06.000Z | test/internal/opts/process_compiler_opts_tests.bzl | buildbuddy-io/rules_xcodeproj | 79a54779d530d3907a69a7910c71c06fec4aefeb | [
"MIT"
] | 93 | 2022-02-10T23:46:22.000Z | 2022-03-30T14:57:40.000Z | test/internal/opts/process_compiler_opts_tests.bzl | buildbuddy-io/rules_xcodeproj | 79a54779d530d3907a69a7910c71c06fec4aefeb | [
"MIT"
] | 3 | 2022-03-09T00:14:47.000Z | 2022-03-31T11:16:16.000Z | """Tests for compiler options processing functions."""
load("@bazel_skylib//lib:unittest.bzl", "asserts", "unittest")
load("//test:utils.bzl", "stringify_dict")
# buildifier: disable=bzl-visibility
load("//xcodeproj/internal:opts.bzl", "testable")
process_compiler_opts = testable.process_compiler_opts
process_compi... | 28.545455 | 171 | 0.524008 |
897d57f6cf656888dc6cf65082c8947d3a604a80 | 58,821 | py | Python | nltk-drt/src/presuppdrt.py | napsternxg/nltk-drt | 71a1218847b5bcc623f72151d36cad8528ee2b19 | [
"Apache-2.0"
] | 1 | 2017-06-22T17:11:23.000Z | 2017-06-22T17:11:23.000Z | nltk-drt/src/presuppdrt.py | napsternxg/nltk-drt | 71a1218847b5bcc623f72151d36cad8528ee2b19 | [
"Apache-2.0"
] | null | null | null | nltk-drt/src/presuppdrt.py | napsternxg/nltk-drt | 71a1218847b5bcc623f72151d36cad8528ee2b19 | [
"Apache-2.0"
] | 3 | 2021-11-20T09:52:59.000Z | 2022-03-31T13:09:48.000Z | """
NLTK DRT module extended with presuppositions
"""
__author__ = "Alex Kislev, Emma Li, Peter Makarov"
__version__ = "1.0"
__date__ = "Tue, 24 Aug 2010"
import re
import operator
from nltk.sem.logic import Variable
from nltk.sem.logic import EqualityExpression, ApplicationExpression, ExistsExpression, AndExpress... | 44.527631 | 197 | 0.629639 |
897de8f5d65cb6ce9cd237f74627ca6c99222851 | 1,669 | py | Python | deploy_python/openem/Detect/__init__.py | bryan-flywire/openem | 1510ecbbb6b4a43b9f1f9503c87ec66216200677 | [
"MIT"
] | 10 | 2019-01-23T23:58:01.000Z | 2021-08-30T19:42:35.000Z | deploy_python/openem/Detect/__init__.py | bryan-flywire/openem | 1510ecbbb6b4a43b9f1f9503c87ec66216200677 | [
"MIT"
] | 3 | 2020-03-20T15:21:41.000Z | 2020-09-18T18:49:38.000Z | deploy_python/openem/Detect/__init__.py | bryan-flywire/openem | 1510ecbbb6b4a43b9f1f9503c87ec66216200677 | [
"MIT"
] | 2 | 2020-05-08T17:39:12.000Z | 2020-10-09T01:27:17.000Z | from openem.models import ImageModel
from openem.models import Preprocessor
import cv2
import numpy as np
import tensorflow as tf
from collections import namedtuple
import csv
Detection=namedtuple('Detection', ['location',
'confidence',
'species',... | 34.061224 | 78 | 0.460755 |
898103c6939f84b86c66b0636276a738603f0eb9 | 515 | py | Python | convert.py | FrilledShark/pi_graph | e5bb85d6f507f252ddad3375b7d24270cd4dcbb4 | [
"MIT"
] | null | null | null | convert.py | FrilledShark/pi_graph | e5bb85d6f507f252ddad3375b7d24270cd4dcbb4 | [
"MIT"
] | null | null | null | convert.py | FrilledShark/pi_graph | e5bb85d6f507f252ddad3375b7d24270cd4dcbb4 | [
"MIT"
] | null | null | null | import os
import re
filenames = sorted([frame for frame in os.listdir("frames")], key=lambda x: int(re.search(r'\d+', os.path.splitext(x)[0]).group()))
print("creating gif")
import imageio
with imageio.get_writer('storage/pi.gif', mode='I') as writer:
for filename in filenames:
image = imageio.imread(os.p... | 32.1875 | 131 | 0.712621 |
89814cfc0355efd923e5153ed731438042bdc436 | 2,283 | py | Python | module2-sql-for-analysis/insert_titanic.py | nsriniva/DS-Unit-3-Sprint-2-SQL-and-Databases | e5a2b5acb6a6b962a7206334f3efb79c1c65f6ed | [
"MIT"
] | null | null | null | module2-sql-for-analysis/insert_titanic.py | nsriniva/DS-Unit-3-Sprint-2-SQL-and-Databases | e5a2b5acb6a6b962a7206334f3efb79c1c65f6ed | [
"MIT"
] | null | null | null | module2-sql-for-analysis/insert_titanic.py | nsriniva/DS-Unit-3-Sprint-2-SQL-and-Databases | e5a2b5acb6a6b962a7206334f3efb79c1c65f6ed | [
"MIT"
] | null | null | null | import os
import psycopg2
from psycopg2 import extras
import json
import pandas as pd
from dotenv import load_dotenv
def execute_values(conn, df, table):
"""
Using psycopg2.extras.execute_values() to insert the dataframe
"""
# Create a list of tupples from the dataframe values
tuples = [tuple(x) ... | 24.031579 | 132 | 0.676741 |
8981fdc323f9b82729d0de70d9c1a8da39c46c47 | 118,682 | py | Python | modules/bot.py | RkyFissy/Fortnite-LobbyBot-v2 | ea37b1b193cd80bbf6499cca51764dd642670d85 | [
"MIT"
] | 1 | 2022-03-15T00:48:50.000Z | 2022-03-15T00:48:50.000Z | modules/bot.py | namakemono-san/Fortnite-LobbyBot-v2 | ea37b1b193cd80bbf6499cca51764dd642670d85 | [
"MIT"
] | null | null | null | modules/bot.py | namakemono-san/Fortnite-LobbyBot-v2 | ea37b1b193cd80bbf6499cca51764dd642670d85 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import asyncio
import datetime
import importlib
import io
import json
import logging
import os
import platform
import re
import subprocess
import sys
import textwrap
import traceback
from contextlib import redirect_stderr, redirect_stdout
from functools import partial
from glob i... | 42.568867 | 218 | 0.469296 |
8981fe86ea2397da714b6b0b5707eb9553a6410d | 1,573 | py | Python | metagraph/tests/translators/test_matrix.py | paul-tqh-nguyen/metagraph | 362f97059f8344042d376edc5b470e27bd69b46e | [
"Apache-2.0"
] | 18 | 2020-08-07T19:15:46.000Z | 2022-01-25T09:24:18.000Z | metagraph/tests/translators/test_matrix.py | paul-tqh-nguyen/metagraph | 362f97059f8344042d376edc5b470e27bd69b46e | [
"Apache-2.0"
] | 49 | 2020-08-07T20:05:11.000Z | 2022-03-24T20:46:31.000Z | metagraph/tests/translators/test_matrix.py | paul-tqh-nguyen/metagraph | 362f97059f8344042d376edc5b470e27bd69b46e | [
"Apache-2.0"
] | 9 | 2020-08-07T19:15:56.000Z | 2022-01-19T01:45:05.000Z | import pytest
grblas = pytest.importorskip("grblas")
from metagraph.tests.util import default_plugin_resolver
from . import RoundTripper
from metagraph.plugins.numpy.types import NumpyMatrixType
from metagraph.plugins.graphblas.types import GrblasMatrixType
import numpy as np
| 32.770833 | 78 | 0.649078 |
89828c0654558e8c377c4fd94ac3978afd1581ea | 1,259 | py | Python | src/by_hand_code/acm.py | vishalbelsare/parametric_modeling | 9bfe5df35671930043215c8f6c855af8f49e28bf | [
"BSD-3-Clause"
] | 37 | 2015-02-01T12:03:48.000Z | 2021-12-23T14:38:38.000Z | src/by_hand_code/acm.py | vishalbelsare/parametric_modeling | 9bfe5df35671930043215c8f6c855af8f49e28bf | [
"BSD-3-Clause"
] | 2 | 2015-07-27T11:34:24.000Z | 2019-12-11T13:39:18.000Z | src/by_hand_code/acm.py | vishalbelsare/parametric_modeling | 9bfe5df35671930043215c8f6c855af8f49e28bf | [
"BSD-3-Clause"
] | 19 | 2016-09-06T20:23:19.000Z | 2021-11-07T16:07:40.000Z | #!/usr/bin/env python
""" This file is a Python translation of the MATLAB file acm.m
Python version by RDL 29 Mar 2012
Copyright notice from acm.m:
copyright 1996, by M.H. Hayes. For use with the book
"Statistical Digital Signal Processing and Modeling"
(John Wiley & Sons, 1996).
"""
from __future__ import prin... | 28.613636 | 63 | 0.629071 |
898370d5e67056fc24a2ff2429d8f2a713ae1d63 | 9,153 | py | Python | crds/tests/test_checksum.py | sean-lockwood/crds | f071f59deca98aac4bee04d688805a127761f3d2 | [
"BSD-3-Clause"
] | null | null | null | crds/tests/test_checksum.py | sean-lockwood/crds | f071f59deca98aac4bee04d688805a127761f3d2 | [
"BSD-3-Clause"
] | 1 | 2019-04-11T18:19:16.000Z | 2019-04-11T18:19:16.000Z | crds/tests/test_checksum.py | sean-lockwood/crds | f071f59deca98aac4bee04d688805a127761f3d2 | [
"BSD-3-Clause"
] | null | null | null | import os
import shutil
import doctest
from crds.core import log, utils
from crds import tests, data_file
from crds.tests import test_config
from crds.refactoring import checksum
from crds.refactoring.checksum import ChecksumScript
def dt_checksum_script_fits_add():
"""
>>> old_state = test_config.setup()
... | 39.623377 | 131 | 0.662843 |
8984014330a4fe7c818a1839453bfab2acca57d7 | 2,955 | py | Python | fspipe/pipe.py | adamvinueza/fspipe | 9df2d42c6907e851a39d4823b98aa26086ec4c96 | [
"MIT"
] | null | null | null | fspipe/pipe.py | adamvinueza/fspipe | 9df2d42c6907e851a39d4823b98aa26086ec4c96 | [
"MIT"
] | null | null | null | fspipe/pipe.py | adamvinueza/fspipe | 9df2d42c6907e851a39d4823b98aa26086ec4c96 | [
"MIT"
] | null | null | null | from fsspec import AbstractFileSystem # type: ignore
from fsspec.implementations.local import LocalFileSystem # type: ignore
from typing import Callable, Optional
| 40.479452 | 79 | 0.611168 |
8985b0fa229c59111784df2a65cc9891d6eea937 | 2,677 | py | Python | gitsy.py | GINMOT/GITSY | 8ef7fcbbcdd33ee6afd0692ab53e092ade7a5c6c | [
"MIT"
] | 1 | 2021-05-30T16:09:42.000Z | 2021-05-30T16:09:42.000Z | gitsy.py | GINMOT/GITSY | 8ef7fcbbcdd33ee6afd0692ab53e092ade7a5c6c | [
"MIT"
] | null | null | null | gitsy.py | GINMOT/GITSY | 8ef7fcbbcdd33ee6afd0692ab53e092ade7a5c6c | [
"MIT"
] | null | null | null | import os
from time import sleep
import sys
from sys import platform
import subprocess
import platform
#Main Service Initalizations
#def upcred():
#def multirep():
#Main screen
sclear()
mainlaunch()
mainopt()
| 20.914063 | 53 | 0.415017 |
8986e74c9d5d0f3e83c77fa1bbe488f8b8c7d861 | 1,163 | py | Python | convert.py | 9Knight9n/crawler-legislation-uk | 6f91ccf8323933a1926245a6dd0de747658ec6dd | [
"MIT"
] | null | null | null | convert.py | 9Knight9n/crawler-legislation-uk | 6f91ccf8323933a1926245a6dd0de747658ec6dd | [
"MIT"
] | null | null | null | convert.py | 9Knight9n/crawler-legislation-uk | 6f91ccf8323933a1926245a6dd0de747658ec6dd | [
"MIT"
] | null | null | null | # from os import listdir
# from os.path import isfile, join
#
# from save import xht_files_dir, txt_files_dir_converted
# from utils import convert_xht_to_txt,convert_xht_to_txt_2
# only_files = [f for f in listdir(xht_files_dir) if isfile(join(xht_files_dir, f))]
# for index,file_ in enumerate(only_files):
# pri... | 30.605263 | 145 | 0.656062 |
898730ea9a49096e8b6161edc2af4f23006465d6 | 2,757 | py | Python | tests/regressiontests/custom_managers_regress/models.py | huicheese/Django-test3 | ac11d2dce245b48392e52d1f4acfd5e7433b243e | [
"BSD-3-Clause"
] | 19 | 2015-05-01T19:59:03.000Z | 2021-12-09T08:03:16.000Z | tests/regressiontests/custom_managers_regress/models.py | joetyson/django | c3699190186561d5c216b2a77ecbfc487d42a734 | [
"BSD-3-Clause"
] | 1 | 2018-01-03T15:26:49.000Z | 2018-01-03T15:26:49.000Z | tests/regressiontests/custom_managers_regress/models.py | joetyson/django | c3699190186561d5c216b2a77ecbfc487d42a734 | [
"BSD-3-Clause"
] | 30 | 2015-03-25T19:40:07.000Z | 2021-05-28T22:59:26.000Z | """
Regression tests for custom manager classes.
"""
from django.db import models
__test__ = {"tests": """
Even though the default manager filters out some records, we must still be able
to save (particularly, save by updating existing records) those filtered
instances. This is a regression test for #8990, #9527
>>> ... | 33.216867 | 88 | 0.730141 |
8987a8a45d351bbfef65dc5938b0c5ab50967bd0 | 1,685 | py | Python | test_code/python-plotter-serial-beta/plotter_freq_checker.py | ithallojunior/data_transmission | eaf1ef81c018dc5a42f1756b39e19bfaa7f34ed5 | [
"MIT"
] | null | null | null | test_code/python-plotter-serial-beta/plotter_freq_checker.py | ithallojunior/data_transmission | eaf1ef81c018dc5a42f1756b39e19bfaa7f34ed5 | [
"MIT"
] | null | null | null | test_code/python-plotter-serial-beta/plotter_freq_checker.py | ithallojunior/data_transmission | eaf1ef81c018dc5a42f1756b39e19bfaa7f34ed5 | [
"MIT"
] | null | null | null | import serial
import matplotlib.pyplot as plt
import numpy as np
import time
pd = "/dev/tty.wchusbserial1410"
#pd = "/dev/tty.usbmodem1421"
p = serial.Serial(port=pd, baudrate=115200,
bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE)
p.flush()
time.sleep(0.5)
#plt.axis([0, 10, 0, 1])
plt.ion()
s... | 26.328125 | 71 | 0.516914 |
89881e729e1c5b8ecc3806d72f395c7bedce5068 | 2,203 | py | Python | leetcode/207_course_schedule.py | coocos/leetcode | 007bbeb46fa4b32e1c92fc894edeb2100eb6ba21 | [
"MIT"
] | null | null | null | leetcode/207_course_schedule.py | coocos/leetcode | 007bbeb46fa4b32e1c92fc894edeb2100eb6ba21 | [
"MIT"
] | null | null | null | leetcode/207_course_schedule.py | coocos/leetcode | 007bbeb46fa4b32e1c92fc894edeb2100eb6ba21 | [
"MIT"
] | null | null | null | import unittest
import collections
from typing import List
| 36.716667 | 86 | 0.66364 |
8988728d0b2235f53cc08dcd048278808b2a69e7 | 425 | py | Python | investment_report/migrations/0026_remove_howwecanhelp_sector.py | uktrade/pir-api | 79747ceab042c42c287e2b7471f6dade70f68693 | [
"MIT"
] | 1 | 2021-02-02T19:08:55.000Z | 2021-02-02T19:08:55.000Z | investment_report/migrations/0026_remove_howwecanhelp_sector.py | uktrade/invest-pir-api | be56efddf9dfdf81c8557441a9a54d9a4dd4bab1 | [
"MIT"
] | 21 | 2018-07-10T10:20:47.000Z | 2022-03-24T09:36:29.000Z | investment_report/migrations/0026_remove_howwecanhelp_sector.py | uktrade/pir-api | 79747ceab042c42c287e2b7471f6dade70f68693 | [
"MIT"
] | 1 | 2021-02-04T11:28:37.000Z | 2021-02-04T11:28:37.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2020-09-01 14:28
from __future__ import unicode_literals
from django.db import migrations
| 21.25 | 72 | 0.642353 |
898a1ef53ea78c92b3aad4b4f4f400878c4c775b | 3,740 | py | Python | src/models/transformer_encoder.py | sanket-pixel/attentive-mot | d9cdfadd6471524c835cb95f5789414afb6649d7 | [
"MIT"
] | 1 | 2021-08-14T20:09:55.000Z | 2021-08-14T20:09:55.000Z | src/models/transformer_encoder.py | sanket-pixel/attentive-mot | d9cdfadd6471524c835cb95f5789414afb6649d7 | [
"MIT"
] | null | null | null | src/models/transformer_encoder.py | sanket-pixel/attentive-mot | d9cdfadd6471524c835cb95f5789414afb6649d7 | [
"MIT"
] | null | null | null | import torch
import torch.nn.functional as f
from torch import nn
from einops import rearrange
def feed_forward(dim_input, dim_feedforward):
return nn.Sequential(
nn.Linear(dim_input, dim_feedforward),
nn.ReLU(),
nn.Linear(dim_feedforward, dim_input),
)
# # head_params
# num_h... | 30.16129 | 86 | 0.619786 |
898a5306afa3764a7edd628eb316f44d5054d18e | 628 | py | Python | src/default_parameters.py | Vivswan/ECE-2162-Tomasulo | 85a12be0d49a1229da062caa076321a6d2d5204c | [
"MIT"
] | null | null | null | src/default_parameters.py | Vivswan/ECE-2162-Tomasulo | 85a12be0d49a1229da062caa076321a6d2d5204c | [
"MIT"
] | null | null | null | src/default_parameters.py | Vivswan/ECE-2162-Tomasulo | 85a12be0d49a1229da062caa076321a6d2d5204c | [
"MIT"
] | null | null | null | TOMASULO_DEFAULT_PARAMETERS = {
"num_register": 32,
"num_rob": 128,
"num_cdb": 1,
"cdb_buffer_size": 0,
"nop_latency": 1,
"nop_unit_pipelined": 1,
"integer_adder_latency": 1,
"integer_adder_rs": 5,
"integer_adder_pipelined": 0,
"float_adder_latency": 3,
"float_adder_rs": 3... | 22.428571 | 36 | 0.66242 |
898a5a3fc36cd33bb17ecf41c7c2ed55175536af | 639 | py | Python | hanlp/utils/__init__.py | antfootAlex/HanLP | e8044b27ae1de54b9070db08549853d3ca8271e2 | [
"Apache-2.0"
] | 27,208 | 2015-03-27T10:25:45.000Z | 2022-03-31T13:26:32.000Z | hanlp/utils/__init__.py | hushaoyun/HanLP | 967b52404c9d0adbc0cff2699690c127ecfca36e | [
"Apache-2.0"
] | 1,674 | 2015-03-30T06:36:44.000Z | 2022-03-16T01:52:56.000Z | hanlp/utils/__init__.py | hushaoyun/HanLP | 967b52404c9d0adbc0cff2699690c127ecfca36e | [
"Apache-2.0"
] | 7,710 | 2015-03-27T08:07:57.000Z | 2022-03-31T14:57:23.000Z | # -*- coding:utf-8 -*-
# Author: hankcs
# Date: 2019-08-24 22:12
from . import rules
| 31.95 | 110 | 0.577465 |
898a6e4ec452715bf2182d06be96a7c637b49645 | 1,174 | py | Python | microbots/signup/crud.py | Varun11940/voice-enabled-chatbot | 0f6ed534adfd95139f817a033fcbf3f749738339 | [
"MIT"
] | 36 | 2019-05-07T16:26:35.000Z | 2022-02-08T06:02:45.000Z | microbots/signup/crud.py | Varun11940/voice-enabled-chatbot | 0f6ed534adfd95139f817a033fcbf3f749738339 | [
"MIT"
] | 53 | 2019-06-01T15:55:17.000Z | 2020-10-01T15:35:48.000Z | microbots/signup/crud.py | Varun11940/voice-enabled-chatbot | 0f6ed534adfd95139f817a033fcbf3f749738339 | [
"MIT"
] | 73 | 2019-05-08T03:16:04.000Z | 2022-01-17T05:56:59.000Z | import config
import models
from sqlalchemy.orm import sessionmaker
from sqlalchemy import create_engine, inspect
engine = create_engine(config.DATABASE_URI)
Session = sessionmaker(bind=engine)
a = crudOps()
# Checking if register table present or not
inspector = inspect(engine)
table_present = False
for table_nam... | 23.019608 | 47 | 0.640545 |
898a7838615f25b4e91899e45ef134b30353cc97 | 14,270 | py | Python | capsNet.py | zhaoaite/ASTCapsNet | b9a13df952af65f13d3006df923d0ed5646915d4 | [
"MIT"
] | null | null | null | capsNet.py | zhaoaite/ASTCapsNet | b9a13df952af65f13d3006df923d0ed5646915d4 | [
"MIT"
] | null | null | null | capsNet.py | zhaoaite/ASTCapsNet | b9a13df952af65f13d3006df923d0ed5646915d4 | [
"MIT"
] | null | null | null | """
License: Apache-2.0
Author: Aite Zhao
E-mail: aitezhao@qq.com
"""
import tensorflow as tf
import rnn_cell_GRU as rnn_cell
import rnn
import numpy as np
from config import cfg
from utils import get_batch_data
from capsLayer import CapsLayer
from sklearn import metrics
import pickle
from sklearn.cross_validation i... | 49.206897 | 212 | 0.632586 |
898b4036b6c035a6ca0b7f4734119239d1a58055 | 1,001 | py | Python | settings.py | jjeejj/alien_invasion | 446bb46f67cefd02660a44bdeff6e78ee697e828 | [
"MIT"
] | 1 | 2019-06-23T13:42:06.000Z | 2019-06-23T13:42:06.000Z | settings.py | jjeejj/alien_invasion | 446bb46f67cefd02660a44bdeff6e78ee697e828 | [
"MIT"
] | null | null | null | settings.py | jjeejj/alien_invasion | 446bb46f67cefd02660a44bdeff6e78ee697e828 | [
"MIT"
] | null | null | null | #
| 27.805556 | 54 | 0.58042 |
898b41882896a96530a97d73e69f44d73c15b034 | 11,564 | py | Python | stream.py | MusikPolice/picamera-web-interface | c10f50fb394fd1089c69ef0faaa523c8ec98604d | [
"Apache-2.0"
] | null | null | null | stream.py | MusikPolice/picamera-web-interface | c10f50fb394fd1089c69ef0faaa523c8ec98604d | [
"Apache-2.0"
] | null | null | null | stream.py | MusikPolice/picamera-web-interface | c10f50fb394fd1089c69ef0faaa523c8ec98604d | [
"Apache-2.0"
] | null | null | null | # Based on code shamelessly stolen from https://picamera.readthedocs.io/en/latest/recipes2.html#web-streaming
import io
import picamera
import logging
import socketserver
import configparser
import json
from threading import Condition
from http import server
from string import Template
from gpiozero import LED
PAGE="... | 29.804124 | 120 | 0.579557 |
898c77e492dd4a9d199a1a4723672c492bb1ddb8 | 3,811 | py | Python | downloader.py | mathieuhendey/lastfm_downloader | 616ed6edad171e6eda05fd48b07a237d7c788fd5 | [
"MIT"
] | 3 | 2019-06-06T08:59:18.000Z | 2021-07-16T06:43:24.000Z | downloader.py | mathieuhendey/lastfm_downloader | 616ed6edad171e6eda05fd48b07a237d7c788fd5 | [
"MIT"
] | 1 | 2021-08-23T14:33:09.000Z | 2021-08-23T14:33:09.000Z | downloader.py | mathieuhendey/lastfm_downloader | 616ed6edad171e6eda05fd48b07a237d7c788fd5 | [
"MIT"
] | 1 | 2020-10-15T08:40:55.000Z | 2020-10-15T08:40:55.000Z | import sys
import pandas as pd
import requests
import pprint
from requests_toolbelt.threaded import pool
# Generate your own at https://www.last.fm/api/account/create
LASTFM_API_KEY = None
LASTFM_USER_NAME = None
TEXT = "#text"
ESTIMATED_TIME_FOR_PROCESSING_PAGE = 352
ESTIMATED_TIME_FOR_PROCESSING_DATAFRAME_PER_PAGE_... | 32.02521 | 92 | 0.649173 |
898eb33546671a512a010d7eaa79d1cab11f0acf | 1,652 | py | Python | src/trainer/fasttexttrainer.py | liuweiping2020/pyml | 0b9a7a307b93f9313d7e1bb92b33ae330d681c73 | [
"Apache-2.0"
] | null | null | null | src/trainer/fasttexttrainer.py | liuweiping2020/pyml | 0b9a7a307b93f9313d7e1bb92b33ae330d681c73 | [
"Apache-2.0"
] | null | null | null | src/trainer/fasttexttrainer.py | liuweiping2020/pyml | 0b9a7a307b93f9313d7e1bb92b33ae330d681c73 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from modeler.fasttextmodel import FastTextModel
from trainer.tftrainer import TFTrainer
if __name__ == '__main__':
FastTextTrainer = FastTextTrainer()
FastTextTrainer.run()
pass
| 34.416667 | 111 | 0.631961 |
898f280dfba7fad802966aff1e0af5464f293a16 | 13,358 | py | Python | release/stubs.min/Autodesk/Revit/DB/Structure/__init__.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | release/stubs.min/Autodesk/Revit/DB/Structure/__init__.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | release/stubs.min/Autodesk/Revit/DB/Structure/__init__.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | # encoding: utf-8
# module Autodesk.Revit.DB.Structure calls itself Structure
# from RevitAPI,Version=17.0.0.0,Culture=neutral,PublicKeyToken=null
# by generator 1.145
# no doc
# no imports
# no functions
# classes
from __init___parts.AnalyticalAlignmentMethod import AnalyticalAlignmentMethod
from __init___p... | 57.577586 | 89 | 0.897365 |
898fd3519ea3c73d1cfaf184b707740b9eadcd70 | 1,700 | py | Python | katana/pedals/booster.py | leon3110l/katana_tsl_patch | a88cb35f524ba1941ccb4f94e0dcaa02df11fd18 | [
"MIT"
] | null | null | null | katana/pedals/booster.py | leon3110l/katana_tsl_patch | a88cb35f524ba1941ccb4f94e0dcaa02df11fd18 | [
"MIT"
] | null | null | null | katana/pedals/booster.py | leon3110l/katana_tsl_patch | a88cb35f524ba1941ccb4f94e0dcaa02df11fd18 | [
"MIT"
] | null | null | null | from .pedal import BasePedal
from enum import IntEnum | 26.153846 | 57 | 0.531765 |
899136c30078eb7beeeeeeb4e5ad870501ebb8f3 | 867 | py | Python | OpenCV/task5.py | Vishwajeetiitb/Autumn-of-Automation | bd8c78662734f867b6aa6fd9179a12913387a01c | [
"MIT"
] | null | null | null | OpenCV/task5.py | Vishwajeetiitb/Autumn-of-Automation | bd8c78662734f867b6aa6fd9179a12913387a01c | [
"MIT"
] | null | null | null | OpenCV/task5.py | Vishwajeetiitb/Autumn-of-Automation | bd8c78662734f867b6aa6fd9179a12913387a01c | [
"MIT"
] | null | null | null | import numpy as np
import cv2
img = cv2.imread("test_image.jpg")
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
eye_cascade = cv2.CascadeClassifier('haarcascade_eye.xml')
faces = face_cascade.detectMultiScale(gray, 1.3, 5)
camera = cv2.VideoCaptu... | 32.111111 | 75 | 0.701269 |
8992dfa1462e52b04396648a85e1fba269dd606d | 9,159 | py | Python | src/models/ns.py | mhw32/meta-inference-public | 3cad0b84acd407f3d790f3d75d3045f62bdbf250 | [
"MIT"
] | 11 | 2019-11-16T02:01:38.000Z | 2022-03-19T08:19:21.000Z | src/models/ns.py | mhw32/meta-inference-public | 3cad0b84acd407f3d790f3d75d3045f62bdbf250 | [
"MIT"
] | null | null | null | src/models/ns.py | mhw32/meta-inference-public | 3cad0b84acd407f3d790f3d75d3045f62bdbf250 | [
"MIT"
] | 1 | 2020-05-01T12:44:40.000Z | 2020-05-01T12:44:40.000Z | import os
import sys
import torch
from torch import nn
from torch.nn import functional as F, init
from src.utils import bernoulli_log_pdf
from src.objectives.elbo import \
log_bernoulli_marginal_estimate_sets
class LinearStatisticNetwork(nn.Module):
def pool(self, e):
"""
average pooling WIT... | 33.064982 | 99 | 0.611639 |
8992e36f7d78153b1e0074a9172a102ef80e8d67 | 3,795 | py | Python | posts/views.py | Agiruskiy/yatube | 57e3e7deaf87f8fc2fdb4b53e4daa632f1dc43f5 | [
"BSD-3-Clause"
] | null | null | null | posts/views.py | Agiruskiy/yatube | 57e3e7deaf87f8fc2fdb4b53e4daa632f1dc43f5 | [
"BSD-3-Clause"
] | null | null | null | posts/views.py | Agiruskiy/yatube | 57e3e7deaf87f8fc2fdb4b53e4daa632f1dc43f5 | [
"BSD-3-Clause"
] | null | null | null | from django.core.paginator import Paginator
from django.shortcuts import render, get_object_or_404, redirect
from .models import Post, Groups
from django.contrib.auth import get_user_model, get_user
from .forms import NewPost
from django.contrib.auth.decorators import login_required
# Create your views here.
| 32.435897 | 92 | 0.674835 |
89933c1df7105a66426ac059f6d21de37d3ae93b | 291,404 | py | Python | tests/examples/minlplib/robot200.py | ouyang-w-19/decogo | 52546480e49776251d4d27856e18a46f40c824a1 | [
"MIT"
] | 2 | 2021-07-03T13:19:10.000Z | 2022-02-06T10:48:13.000Z | tests/examples/minlplib/robot200.py | ouyang-w-19/decogo | 52546480e49776251d4d27856e18a46f40c824a1 | [
"MIT"
] | 1 | 2021-07-04T14:52:14.000Z | 2021-07-15T10:17:11.000Z | tests/examples/minlplib/robot200.py | ouyang-w-19/decogo | 52546480e49776251d4d27856e18a46f40c824a1 | [
"MIT"
] | null | null | null | # NLP written by GAMS Convert at 04/21/18 13:54:04
#
# Equation counts
# Total E G L N X C B
# 1603 1603 0 0 0 0 0 0
#
# Variable counts
# x b i s1s s2s sc ... | 53.537387 | 102 | 0.688542 |
8994560794eac403f32c84dae0fea83d1c5d480e | 3,379 | py | Python | nonconformist/base.py | smazzanti/nonconformist | 5ed072c82ae6d923eb6063a6a5c8fa664fbf729c | [
"MIT"
] | 301 | 2015-03-18T01:47:37.000Z | 2022-03-11T14:50:55.000Z | nonconformist/base.py | smazzanti/nonconformist | 5ed072c82ae6d923eb6063a6a5c8fa664fbf729c | [
"MIT"
] | 25 | 2016-07-25T21:36:26.000Z | 2022-02-23T00:39:07.000Z | nonconformist/base.py | smazzanti/nonconformist | 5ed072c82ae6d923eb6063a6a5c8fa664fbf729c | [
"MIT"
] | 91 | 2015-03-19T08:25:16.000Z | 2022-03-08T08:31:38.000Z | #!/usr/bin/env python
"""
docstring
"""
# Authors: Henrik Linusson
import abc
import numpy as np
from sklearn.base import BaseEstimator
| 21.522293 | 63 | 0.718556 |
8995599b49ae65bec50e95a8d6ce10788f734c9e | 1,890 | py | Python | corehq/apps/receiverwrapper/rate_limiter.py | dborowiecki/commcare-hq | f2f4fa67faec09040a98502f5657444075b63f2e | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/receiverwrapper/rate_limiter.py | dborowiecki/commcare-hq | f2f4fa67faec09040a98502f5657444075b63f2e | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/receiverwrapper/rate_limiter.py | dborowiecki/commcare-hq | f2f4fa67faec09040a98502f5657444075b63f2e | [
"BSD-3-Clause"
] | null | null | null | from corehq.project_limits.rate_limiter import RateDefinition, RateLimiter, \
PerUserRateDefinition
from corehq.util.datadog.gauges import datadog_counter
from corehq.util.datadog.utils import bucket_value
from corehq.util.decorators import silence_and_report_error, enterprise_skip
from corehq.util.timer import Ti... | 33.75 | 86 | 0.74127 |
89970080ba2f0570c2f1e353abfb492b88c1cf1e | 2,263 | py | Python | ShareSpace/views.py | BNordstrom16/ShareSpaceWeb | 676ddbc52f745d4b8a17f18f26a15329ad91ebfa | [
"MIT"
] | null | null | null | ShareSpace/views.py | BNordstrom16/ShareSpaceWeb | 676ddbc52f745d4b8a17f18f26a15329ad91ebfa | [
"MIT"
] | null | null | null | ShareSpace/views.py | BNordstrom16/ShareSpaceWeb | 676ddbc52f745d4b8a17f18f26a15329ad91ebfa | [
"MIT"
] | null | null | null | from django.shortcuts import render, redirect
from django.views.generic import UpdateView, DeleteView
from .models import Storage
from django_tables2 import RequestConfig
from .tables import StorageTable
from django.contrib.auth.decorators import login_required
from .forms import StorageForm, QuestionForm
def s... | 28.2875 | 86 | 0.696421 |
899a40a76b3d46b1165d8bfc6e8d1efe16d93e6b | 1,282 | py | Python | rest_framework_security/deny_repeat_password/signals.py | RubenEu/django-rest-framework-security | 638cf271c51a5bafd434a6b6a9c25a7c4849b485 | [
"MIT"
] | 7 | 2020-09-01T09:55:25.000Z | 2021-11-04T06:59:04.000Z | rest_framework_security/deny_repeat_password/signals.py | RubenEu/django-rest-framework-security | 638cf271c51a5bafd434a6b6a9c25a7c4849b485 | [
"MIT"
] | 32 | 2020-10-28T17:09:18.000Z | 2022-03-12T00:55:09.000Z | rest_framework_security/deny_repeat_password/signals.py | RubenEu/django-rest-framework-security | 638cf271c51a5bafd434a6b6a9c25a7c4849b485 | [
"MIT"
] | 2 | 2020-12-18T01:26:53.000Z | 2021-11-04T06:59:07.000Z | from django.apps import apps
from django.contrib.auth import get_user_model
from django.db.models.signals import post_save
from django.dispatch import receiver, Signal
from rest_framework_security.deny_repeat_password import config
from rest_framework_security.deny_repeat_password.emails import ChangedPasswordEmail
fr... | 34.648649 | 84 | 0.789392 |
899a7241af6e0b8cdd621ac196abec7ab6dcaa11 | 1,085 | py | Python | tests/test_post.py | DerrickOdhiambo/Flask-IP3 | 9861d49152bced9d8ddda7783628451e5af10323 | [
"MIT"
] | null | null | null | tests/test_post.py | DerrickOdhiambo/Flask-IP3 | 9861d49152bced9d8ddda7783628451e5af10323 | [
"MIT"
] | null | null | null | tests/test_post.py | DerrickOdhiambo/Flask-IP3 | 9861d49152bced9d8ddda7783628451e5af10323 | [
"MIT"
] | null | null | null | import unittest
from app.models import User,Post,Comments
from app import db
| 31.911765 | 104 | 0.669124 |
899b5c413125fdcd4f43aed55ea491b6d8e91b33 | 4,335 | py | Python | ivi/agilent/agilent34410A.py | sacherjj/python-ivi | 6dd1ba93d65dc30a652a3a1b34c66921d94315e8 | [
"MIT"
] | 161 | 2015-01-23T17:43:01.000Z | 2022-03-29T14:42:42.000Z | ivi/agilent/agilent34410A.py | sacherjj/python-ivi | 6dd1ba93d65dc30a652a3a1b34c66921d94315e8 | [
"MIT"
] | 45 | 2015-01-15T13:35:04.000Z | 2021-06-03T01:58:55.000Z | ivi/agilent/agilent34410A.py | sacherjj/python-ivi | 6dd1ba93d65dc30a652a3a1b34c66921d94315e8 | [
"MIT"
] | 87 | 2015-01-31T10:55:23.000Z | 2022-03-17T08:18:47.000Z | """
Python Interchangeable Virtual Instrument Library
Copyright (c) 2012-2017 Alex Forencich
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the... | 35.532787 | 99 | 0.649135 |
899b81f532a64949fdb793eda26c5264788f0f7f | 2,650 | py | Python | python/add_two_numbers.py | babibo180918/leetcode | d9f414beef4bf6d26ec11d2dd925086fd719ab4b | [
"MIT"
] | null | null | null | python/add_two_numbers.py | babibo180918/leetcode | d9f414beef4bf6d26ec11d2dd925086fd719ab4b | [
"MIT"
] | null | null | null | python/add_two_numbers.py | babibo180918/leetcode | d9f414beef4bf6d26ec11d2dd925086fd719ab4b | [
"MIT"
] | null | null | null | # Definition for singly-linked list.
def printList(head):
while head is not None:
print(head.val, end=' ')
head = head.next
print()
sol = Solution()
one=makeList([1,2,3])
two=makeList([4,5,6])
expect=makeList([5,7,9])
result=sol.addTwoNumbers(one, two)
print('Expect:')
printList... | 20.703125 | 54 | 0.58717 |
899c26a988f10b6faf552e41fc9a11aea4981d87 | 3,313 | py | Python | ConvertCase.py | GuilhermeSenna/Streamlit-Apps | b44dee1369886f2db79404b7ac03c488d2fd0ffd | [
"MIT"
] | null | null | null | ConvertCase.py | GuilhermeSenna/Streamlit-Apps | b44dee1369886f2db79404b7ac03c488d2fd0ffd | [
"MIT"
] | null | null | null | ConvertCase.py | GuilhermeSenna/Streamlit-Apps | b44dee1369886f2db79404b7ac03c488d2fd0ffd | [
"MIT"
] | null | null | null | import SessionState
import base64
import streamlit as st
import pyperclip
# The input stores the string that is in text_area
# The output stores the conversion with the input
# This storage is needed because textarea comes before the button
session_state = SessionState.get(input='', output='', key=0)
# Function use... | 37.224719 | 116 | 0.689707 |
899e05d154700b28dc0f00552d97ba1b87816851 | 3,474 | py | Python | biblio/my_secondary_verifications.py | lokal-profil/isfdb_site | 0ce20d6347849926d4eda961ea9249c31519eea5 | [
"BSD-3-Clause"
] | null | null | null | biblio/my_secondary_verifications.py | lokal-profil/isfdb_site | 0ce20d6347849926d4eda961ea9249c31519eea5 | [
"BSD-3-Clause"
] | null | null | null | biblio/my_secondary_verifications.py | lokal-profil/isfdb_site | 0ce20d6347849926d4eda961ea9249c31519eea5 | [
"BSD-3-Clause"
] | null | null | null | #!_PYTHONLOC
#
# (C) COPYRIGHT 2020-2021 Ahasuerus
# ALL RIGHTS RESERVED
#
# The copyright notice above does not evidence any actual or
# intended publication of such source code.
#
# Version: $Revision: 571 $
# Date: $Date: 2020-11-19 15:53:08 -0500 (Thu, 19 Nov 2020) $
from isfdb impor... | 35.44898 | 107 | 0.531952 |
899e62389d7e3e73d0a9cac9e6a927bac137f515 | 1,523 | py | Python | extended_uva_judge/utilities.py | fritogotlayed/Extended-UVA-Judge | 7f4b04052429374d90597757c5bfb2a0a5bfe2ba | [
"MIT"
] | null | null | null | extended_uva_judge/utilities.py | fritogotlayed/Extended-UVA-Judge | 7f4b04052429374d90597757c5bfb2a0a5bfe2ba | [
"MIT"
] | null | null | null | extended_uva_judge/utilities.py | fritogotlayed/Extended-UVA-Judge | 7f4b04052429374d90597757c5bfb2a0a5bfe2ba | [
"MIT"
] | null | null | null | import os
import yaml
from extended_uva_judge import errors
def get_problem_directory(app_config):
"""Gets the directory containing the problem configs.
:return: The path to the problem configs.
:rtype: str
"""
problem_directory = app_config['problem_directory']
if not problem_directory:
... | 29.288462 | 75 | 0.730138 |
89a03ad3a212cac804b72e4c7b59a7674d2cca45 | 2,729 | py | Python | reshade/pooling/l2norm.py | jamesjiang52/Reshade | ddc87424c50030b4606c4eb5ec61b4be1d4cad98 | [
"MIT"
] | null | null | null | reshade/pooling/l2norm.py | jamesjiang52/Reshade | ddc87424c50030b4606c4eb5ec61b4be1d4cad98 | [
"MIT"
] | null | null | null | reshade/pooling/l2norm.py | jamesjiang52/Reshade | ddc87424c50030b4606c4eb5ec61b4be1d4cad98 | [
"MIT"
] | null | null | null | """
The following classes are defined:
L2NormPoolingNeuron
L2NormPoolingLayer
"""
from math import sqrt
from ..utils.validate import *
from ..utils.flatten import *
| 31.011364 | 78 | 0.614877 |
89a059a7191529c20325397e8137136f297d1f83 | 57 | py | Python | sisy/__main__.py | qorrect/sisy | 4c279f3a47109395d57521b5c8144b18693737fc | [
"Apache-2.0"
] | 6 | 2017-09-15T03:14:10.000Z | 2019-12-03T04:15:21.000Z | sisy/__main__.py | qorrect/sisy | 4c279f3a47109395d57521b5c8144b18693737fc | [
"Apache-2.0"
] | 2 | 2017-09-21T01:49:42.000Z | 2017-09-23T16:33:01.000Z | sisy/__main__.py | qorrect/sisy | 4c279f3a47109395d57521b5c8144b18693737fc | [
"Apache-2.0"
] | null | null | null | from sisy import ui
if __name__ == "__main__":
ui()
| 11.4 | 26 | 0.631579 |
89a0e886b154e2d90823978c34e848f5d1927982 | 18,885 | py | Python | scripts/ur5_open_loop.py | lar-deeufba/real_time_grasp | d5ba0253bc42103b3dc5135d345c3a650f0bd64f | [
"BSD-3-Clause"
] | 27 | 2020-05-26T23:48:12.000Z | 2022-01-21T09:33:11.000Z | scripts/ur5_open_loop.py | lar-deeufba/real-time-grasp | d5ba0253bc42103b3dc5135d345c3a650f0bd64f | [
"BSD-3-Clause"
] | null | null | null | scripts/ur5_open_loop.py | lar-deeufba/real-time-grasp | d5ba0253bc42103b3dc5135d345c3a650f0bd64f | [
"BSD-3-Clause"
] | 8 | 2020-05-20T03:29:20.000Z | 2021-12-21T13:40:10.000Z | #!/usr/bin/python
import rospy
import actionlib
import numpy as np
import argparse
import copy
from copy import deepcopy
import rosservice
import sys
import re
from std_msgs.msg import Float64MultiArray, Float32MultiArray
from control_msgs.msg import FollowJointTrajectoryAction, FollowJointTrajectoryGoal, JointTolera... | 35.365169 | 133 | 0.714112 |
89a1c74f6ff7daea200b8e6b6423ed86d7bc83ec | 2,936 | py | Python | certbot_dns_corenetworks/test/unit/test_dns_corenetwork.py | xoxys/certbot-dns-ispconfig | 8d5c0a9df72342ce55db6469d10cdd69ce3bb024 | [
"MIT"
] | 1 | 2021-03-19T00:29:39.000Z | 2021-03-19T00:29:39.000Z | certbot_dns_corenetworks/test/unit/test_dns_corenetwork.py | xoxys/certbot-dns-ispconfig | 8d5c0a9df72342ce55db6469d10cdd69ce3bb024 | [
"MIT"
] | 6 | 2020-11-11T21:32:23.000Z | 2021-03-20T16:00:17.000Z | certbot_dns_corenetworks/test/unit/test_dns_corenetwork.py | thegeeklab/certbot-dns-corenetworks | 8d5c0a9df72342ce55db6469d10cdd69ce3bb024 | [
"MIT"
] | null | null | null | """Tests for certbot_dns_corenetworks.dns_corenetworks."""
import unittest
import mock
from certbot import errors
from certbot.compat import os
from certbot.plugins import dns_test_common
from certbot.plugins.dns_test_common import DOMAIN
from certbot.tests import util as test_util
API_USER = "my_user"
API_PASSWORD ... | 35.373494 | 93 | 0.68733 |
89a2045cc532ad4eb8b579a9b93af35ce91d0c11 | 5,068 | py | Python | examples/monitor.py | zhuxuanxuan23/ksc-sdk-python | 7159953c36cab0ca2eeb27fbc337f96cce0771cd | [
"Apache-2.0"
] | 53 | 2016-09-21T15:52:14.000Z | 2021-12-23T09:23:00.000Z | examples/monitor.py | zhuxuanxuan23/ksc-sdk-python | 7159953c36cab0ca2eeb27fbc337f96cce0771cd | [
"Apache-2.0"
] | 27 | 2016-09-21T15:24:43.000Z | 2021-11-18T08:38:38.000Z | examples/monitor.py | zhuxuanxuan23/ksc-sdk-python | 7159953c36cab0ca2eeb27fbc337f96cce0771cd | [
"Apache-2.0"
] | 68 | 2016-09-06T10:33:09.000Z | 2021-11-16T07:13:03.000Z | # -*- encoding:utf-8 -*-
from kscore.session import get_session
import json
if __name__ == "__main__":
s = get_session()
client = s.create_client("monitor", "cn-beijing-6", use_ssl=True)
clientv2 = s.create_client("monitorv2", "cn-beijing-6", use_ssl=True)
'''
docker
'''
#ListMetrics
... | 31.283951 | 82 | 0.583662 |
89a2a4399e10100131e600830518389f72bbc22b | 787 | py | Python | malware_rl/envs/utils/sorel.py | xenoxine/malware_rl | 6a316caae02491404cb5d335735c22a74269e01f | [
"MIT"
] | 61 | 2020-08-28T19:33:07.000Z | 2022-03-26T06:38:29.000Z | malware_rl/envs/utils/sorel.py | xenoxine/malware_rl | 6a316caae02491404cb5d335735c22a74269e01f | [
"MIT"
] | 11 | 2020-09-25T18:59:41.000Z | 2022-01-31T11:39:57.000Z | malware_rl/envs/utils/sorel.py | xenoxine/malware_rl | 6a316caae02491404cb5d335735c22a74269e01f | [
"MIT"
] | 12 | 2020-08-29T01:35:05.000Z | 2022-02-07T02:56:35.000Z | import os
import sys
import lightgbm as lgb
import numpy as np
from malware_rl.envs.utils.ember import PEFeatureExtractor
module_path = os.path.split(os.path.abspath(sys.modules[__name__].__file__))[0]
try:
model_path = os.path.join(module_path, "sorel.model")
except ValueError:
print("The model path provid... | 27.137931 | 79 | 0.717916 |
89a2ae50c2ab46fa15f409a4fc5b32e4fd3a7ad0 | 732 | py | Python | hummingbot/connector/exchange/bittrex/bittrex_utils.py | joedomino874/hummingbot | cb3ee5a30a2feb0a55ceca9d200c59662d7e3057 | [
"Apache-2.0"
] | 3,027 | 2019-04-04T18:52:17.000Z | 2022-03-30T09:38:34.000Z | hummingbot/connector/exchange/bittrex/bittrex_utils.py | joedomino874/hummingbot | cb3ee5a30a2feb0a55ceca9d200c59662d7e3057 | [
"Apache-2.0"
] | 4,080 | 2019-04-04T19:51:11.000Z | 2022-03-31T23:45:21.000Z | hummingbot/connector/exchange/bittrex/bittrex_utils.py | joedomino874/hummingbot | cb3ee5a30a2feb0a55ceca9d200c59662d7e3057 | [
"Apache-2.0"
] | 1,342 | 2019-04-04T20:50:53.000Z | 2022-03-31T15:22:36.000Z | from hummingbot.client.config.config_var import ConfigVar
from hummingbot.client.config.config_methods import using_exchange
CENTRALIZED = True
EXAMPLE_PAIR = "ZRX-ETH"
DEFAULT_FEES = [0.25, 0.25]
KEYS = {
"bittrex_api_key":
ConfigVar(key="bittrex_api_key",
prompt="Enter your Bittrex ... | 29.28 | 66 | 0.602459 |
89a5548ef4bf1d2363f4677b23a160ba481678ba | 1,142 | py | Python | actions/list_members.py | stackstorm-enhancements/stackstorm-github | e2ef6ece6b34e50755ec3174ebbe0a42a16f9941 | [
"Apache-2.0"
] | 1 | 2020-07-23T21:04:39.000Z | 2020-07-23T21:04:39.000Z | actions/list_members.py | ncskier/stackstorm-github | e2ef6ece6b34e50755ec3174ebbe0a42a16f9941 | [
"Apache-2.0"
] | 7 | 2020-07-24T00:09:58.000Z | 2020-08-11T11:47:39.000Z | actions/list_members.py | stackstorm-enhancements/stackstorm-github | e2ef6ece6b34e50755ec3174ebbe0a42a16f9941 | [
"Apache-2.0"
] | null | null | null | import datetime
from github.GithubException import UnknownObjectException
from lib.base import BaseGithubAction
from lib.formatters import user_to_dict
__all__ = [
'ListMembersAction'
]
| 26.55814 | 68 | 0.568301 |
89a5c2838a442d78a5960f630f0b8be24007cf8e | 1,405 | py | Python | src/calrissian/regularization/regularize_orthogonal.py | awlange/brainsparks | 05baff28da347172083672c940406f5696893201 | [
"MIT"
] | 3 | 2015-10-30T04:04:02.000Z | 2020-02-13T19:08:42.000Z | src/calrissian/regularization/regularize_orthogonal.py | awlange/brainsparks | 05baff28da347172083672c940406f5696893201 | [
"MIT"
] | null | null | null | src/calrissian/regularization/regularize_orthogonal.py | awlange/brainsparks | 05baff28da347172083672c940406f5696893201 | [
"MIT"
] | null | null | null | import numpy as np
| 31.222222 | 68 | 0.458363 |
89a6fed9b1397a9b14c141ea4b85328623a63382 | 7,839 | py | Python | data/external/repositories/113677/KaggleBillionWordImputation-master/scripts/util.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories/113677/KaggleBillionWordImputation-master/scripts/util.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories/113677/KaggleBillionWordImputation-master/scripts/util.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | 1 | 2019-12-04T08:23:33.000Z | 2019-12-04T08:23:33.000Z | import sys, bisect
from collections import defaultdict
from itertools import islice, izip
import numpy as np
from scipy.misc import logsumexp
from scipy.spatial import distance
import Levenshtein
PUNCTUATION = set(("'", '"', ',', '.', '!', '?', ';', ':', '-', '--', '(', ')',
'/', '_', '\\', '+', '<... | 33.075949 | 223 | 0.56474 |
89a7d7559cda29135a7e7a156417c45617de279f | 485 | py | Python | Search_DnaA_trios/9_adjust_box_mismatch.py | DongMeiJing/DnaA-trios | 573c8664515989c2f1f53b7fcc1c3fb928aadbce | [
"Apache-2.0"
] | null | null | null | Search_DnaA_trios/9_adjust_box_mismatch.py | DongMeiJing/DnaA-trios | 573c8664515989c2f1f53b7fcc1c3fb928aadbce | [
"Apache-2.0"
] | null | null | null | Search_DnaA_trios/9_adjust_box_mismatch.py | DongMeiJing/DnaA-trios | 573c8664515989c2f1f53b7fcc1c3fb928aadbce | [
"Apache-2.0"
] | null | null | null | import pandas as pd
file = r'8_calculate_spacer_len.csv'
with open(file, 'r') as f:
data = pd.read_csv(f)
for i in data.index:
box_motif = data.at[i, 'box motif']
if '[' in box_motif:
data.at[i, 'Upstream mismatch'] = data.at[i, 'Upstream mismatch'] + 0.5
data.at[i, 'Downstream... | 30.3125 | 81 | 0.562887 |
89a8b28d63bb94947dfc6a9846e9c93c4d60b60d | 845 | py | Python | creatDjangoApp1/accounts/migrations/0006_auto_20201130_2119.py | imxiaow/django-xw-project | 06d97b7d3701422b08720e00e87f6c471461c19a | [
"MIT"
] | 1 | 2020-11-25T17:33:31.000Z | 2020-11-25T17:33:31.000Z | creatDjangoApp1/accounts/migrations/0006_auto_20201130_2119.py | imxiaow/django-xw-project | 06d97b7d3701422b08720e00e87f6c471461c19a | [
"MIT"
] | null | null | null | creatDjangoApp1/accounts/migrations/0006_auto_20201130_2119.py | imxiaow/django-xw-project | 06d97b7d3701422b08720e00e87f6c471461c19a | [
"MIT"
] | null | null | null | # Generated by Django 3.1.3 on 2020-11-30 21:19
from django.db import migrations, models
| 29.137931 | 166 | 0.581065 |
89a8d67890dba5fcad6eb3055086bfd2d086adc8 | 647 | py | Python | HelloWorld/guessinggame.py | zahraaliaghazadeh/python | 2f2d0141a916c99e8724f803bd4e5c7246a7a02e | [
"MIT"
] | null | null | null | HelloWorld/guessinggame.py | zahraaliaghazadeh/python | 2f2d0141a916c99e8724f803bd4e5c7246a7a02e | [
"MIT"
] | null | null | null | HelloWorld/guessinggame.py | zahraaliaghazadeh/python | 2f2d0141a916c99e8724f803bd4e5c7246a7a02e | [
"MIT"
] | null | null | null | # answer = 5
# print("please guess number between 1 and 10: ")
# guess = int(input())
#
# if guess < answer:
# print("Please guess higher")
# elif guess > answer:
# print ( "Please guess lower")
# else:
# print("You got it first time")
answer = 5
print ("Please guess number between 1 and 10: ")
guess = in... | 23.107143 | 54 | 0.615147 |
89a90718d7e650fc2ad039e8e167881489e64001 | 2,820 | py | Python | spandex/tests/test_io.py | UDST/spandex | 2f485b190d521bc84e9a66d71c8161b5214570d8 | [
"BSD-3-Clause"
] | 21 | 2015-09-24T08:20:13.000Z | 2020-08-10T16:15:03.000Z | spandex/tests/test_io.py | UDST/spandex | 2f485b190d521bc84e9a66d71c8161b5214570d8 | [
"BSD-3-Clause"
] | 3 | 2018-05-22T21:04:48.000Z | 2018-05-30T20:40:44.000Z | spandex/tests/test_io.py | UDST/spandex | 2f485b190d521bc84e9a66d71c8161b5214570d8 | [
"BSD-3-Clause"
] | 14 | 2015-09-21T17:59:02.000Z | 2020-05-06T05:12:40.000Z | import numpy as np
import pandas as pd
from pandas.util import testing as pdt
import pytest
from spandex import TableFrame
from spandex.io import db_to_df, df_to_db
| 34.814815 | 75 | 0.664184 |
89aa44250287866cbb838c9fe67275c1ccae22e7 | 2,471 | py | Python | cohesity_management_sdk/models/vserver_network_interface.py | sachinthakare-cohesity/management-sdk-python | c95f67b7d387d5bab8392be43190e598280ae7b5 | [
"MIT"
] | null | null | null | cohesity_management_sdk/models/vserver_network_interface.py | sachinthakare-cohesity/management-sdk-python | c95f67b7d387d5bab8392be43190e598280ae7b5 | [
"MIT"
] | null | null | null | cohesity_management_sdk/models/vserver_network_interface.py | sachinthakare-cohesity/management-sdk-python | c95f67b7d387d5bab8392be43190e598280ae7b5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2019 Cohesity Inc.
| 33.391892 | 81 | 0.632942 |
89ac931b692c43514c36ae03212d4c0af12bbef1 | 4,877 | py | Python | clld/lib/wordpress.py | Woseseltops/clld | 5ba065f35b7e6f68b8638d86550e6f0f597ff02d | [
"MIT"
] | 1 | 2019-08-12T15:43:56.000Z | 2019-08-12T15:43:56.000Z | clld/lib/wordpress.py | Woseseltops/clld | 5ba065f35b7e6f68b8638d86550e6f0f597ff02d | [
"MIT"
] | null | null | null | clld/lib/wordpress.py | Woseseltops/clld | 5ba065f35b7e6f68b8638d86550e6f0f597ff02d | [
"MIT"
] | null | null | null | """
Client for the xmlrpc API of a wordpress blog.
.. note::
we ignore blog_id altogether, see
http://joseph.randomnetworks.com/archives/2008/06/10/\
blog-id-in-wordpress-and-xml-rpc-blog-apis/
thus, rely on identifying the appropriate blog by xmlrpc endpoint.
"""
import re
import xmlrpclib
import re... | 34.34507 | 90 | 0.541726 |
89ad3ad12dbbb7451941460b3c2d3ac8663e01da | 1,370 | py | Python | deprecated_examples_robust/multimedia/avmnist_MFM_robust.py | TianhaoFu/MultiBench | b174a3187124d6f92be1ff3b487eef292f7883bb | [
"MIT"
] | null | null | null | deprecated_examples_robust/multimedia/avmnist_MFM_robust.py | TianhaoFu/MultiBench | b174a3187124d6f92be1ff3b487eef292f7883bb | [
"MIT"
] | null | null | null | deprecated_examples_robust/multimedia/avmnist_MFM_robust.py | TianhaoFu/MultiBench | b174a3187124d6f92be1ff3b487eef292f7883bb | [
"MIT"
] | null | null | null | import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.getcwd())))
from training_structures.MFM import train_MFM,test_MFM
from fusions.common_fusions import Concat
from unimodals.MVAE import LeNetEncoder,DeLeNet
from unimodals.common_models import MLP
from torch import nn
import torch
from objective_fu... | 37.027027 | 149 | 0.806569 |
89b0fc36687c8a1bd3480464b1aa7545c9ee615d | 2,327 | py | Python | src/JyCnTwTranslator.py | jackychu0830/jy-cn-tw-translattor | 8ee4a367ba35fe5af43d07fc865bf6eea9ef4864 | [
"Apache-2.0"
] | 3 | 2021-04-10T03:48:34.000Z | 2021-07-21T08:39:54.000Z | src/JyCnTwTranslator.py | jackychu0830/jy-cn-tw-translattor | 8ee4a367ba35fe5af43d07fc865bf6eea9ef4864 | [
"Apache-2.0"
] | null | null | null | src/JyCnTwTranslator.py | jackychu0830/jy-cn-tw-translattor | 8ee4a367ba35fe5af43d07fc865bf6eea9ef4864 | [
"Apache-2.0"
] | 5 | 2021-04-27T06:45:59.000Z | 2022-03-28T12:44:49.000Z | import json
import os
from pygoogletranslation import Translator
JY_PATH = os.path.expanduser('~') + '/Movies/JianyingPro/videocut/'
def get_video_texts(filename):
"""
Get all text content from video
:param filename: file name
:return: all subtitle in list format
"""
f = open(filename, encod... | 22.375 | 85 | 0.634293 |
89b1a7985acccd182bc360d4370b40a665ed42c6 | 1,352 | py | Python | pygame_template.py | Pittsy24/pygame_template | b72397a37610fc267870151e0141de0d15793b7c | [
"MIT"
] | null | null | null | pygame_template.py | Pittsy24/pygame_template | b72397a37610fc267870151e0141de0d15793b7c | [
"MIT"
] | null | null | null | pygame_template.py | Pittsy24/pygame_template | b72397a37610fc267870151e0141de0d15793b7c | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# By Joseph Pitts
import sys
import random
import pygame
from pygame.locals import *
| 23.719298 | 94 | 0.513314 |
89b39f158be90401b4ca2e91fcd18a6a3a99d8f3 | 799 | py | Python | Python3/0234-Palindrome-Linked-List/soln-1.py | wyaadarsh/LeetCode-Solutions | 3719f5cb059eefd66b83eb8ae990652f4b7fd124 | [
"MIT"
] | 5 | 2020-07-24T17:48:59.000Z | 2020-12-21T05:56:00.000Z | Python3/0234-Palindrome-Linked-List/soln-1.py | zhangyaqi1989/LeetCode-Solutions | 2655a1ffc8678ad1de6c24295071308a18c5dc6e | [
"MIT"
] | null | null | null | Python3/0234-Palindrome-Linked-List/soln-1.py | zhangyaqi1989/LeetCode-Solutions | 2655a1ffc8678ad1de6c24295071308a18c5dc6e | [
"MIT"
] | 2 | 2020-07-24T17:49:01.000Z | 2020-08-31T19:57:35.000Z | # Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None | 26.633333 | 50 | 0.490613 |
89b442a2aa83173bfb33cd89737f11e8446730f6 | 3,336 | py | Python | dataset/ucmayo4.py | GorkemP/labeled-images-for-ulcerative-colitis | 83dd4221e9bb6f4a441cafb6ddd74dad0d5f0e55 | [
"MIT"
] | 2 | 2022-03-15T19:59:15.000Z | 2022-03-17T07:37:08.000Z | dataset/ucmayo4.py | GorkemP/labeled-images-for-ulcerative-colitis | 83dd4221e9bb6f4a441cafb6ddd74dad0d5f0e55 | [
"MIT"
] | null | null | null | dataset/ucmayo4.py | GorkemP/labeled-images-for-ulcerative-colitis | 83dd4221e9bb6f4a441cafb6ddd74dad0d5f0e55 | [
"MIT"
] | null | null | null | import torch
from torch.utils.data import Dataset
from PIL import Image
import os
import glob
| 32.38835 | 97 | 0.601019 |
89b51e36ce9bdb63aea671028674c6ceed809072 | 698 | py | Python | Python Programs/binarysea.py | Chibi-Shem/Hacktoberfest2020-Expert | 324843464aec039e130e85a16e74b76d310f1497 | [
"MIT"
] | 77 | 2020-10-01T10:06:59.000Z | 2021-11-08T08:57:18.000Z | Python Programs/binarysea.py | Chibi-Shem/Hacktoberfest2020-Expert | 324843464aec039e130e85a16e74b76d310f1497 | [
"MIT"
] | 46 | 2020-09-27T04:55:36.000Z | 2021-05-14T18:49:06.000Z | Python Programs/binarysea.py | Chibi-Shem/Hacktoberfest2020-Expert | 324843464aec039e130e85a16e74b76d310f1497 | [
"MIT"
] | 327 | 2020-09-26T17:06:03.000Z | 2021-10-09T06:04:39.000Z | print("linear search")
si=int(input("\nEnter the size:"))
data=list()
for i in range(0,si):
n=int(input())
data.append(n)
cot=0
print("\nEnter the number you want to search:")
val=int(input())
for i in range(0,len(data)):
if(data[i]==val):
break;
else:
cot=co... | 21.151515 | 48 | 0.54298 |
89b658139c87c2cd2b91a286d57e79315f172227 | 6,240 | py | Python | inferqueue.py | AndreasMerentitis/TfLambdaDemo-tfraw | 1fa3d7b170076b8afd5065f680ee305f232fbbf5 | [
"MIT"
] | null | null | null | inferqueue.py | AndreasMerentitis/TfLambdaDemo-tfraw | 1fa3d7b170076b8afd5065f680ee305f232fbbf5 | [
"MIT"
] | 5 | 2020-09-26T01:25:45.000Z | 2022-02-10T02:13:54.000Z | inferqueue.py | AndreasMerentitis/TfLambdaDemo-tfraw | 1fa3d7b170076b8afd5065f680ee305f232fbbf5 | [
"MIT"
] | null | null | null | try:
import unzip_requirements
except ImportError:
pass
import json
import os
import tarfile
import boto3
import tensorflow as tf
import numpy as np
import census_data
import logging
logger = logging.getLogger()
logger.setLevel(logging.WARNING)
FILE_DIR = '/tmp/'
BUCKET = os.environ['BUCKET']
import queue
im... | 34.475138 | 122 | 0.616346 |
89b73d7d48109d66259c6829ecf5a9a833671f92 | 11,282 | py | Python | sailbot_ws/src/sailbot/sailbot/control_system.py | wpisailbot/sailbot21-22 | e4993b6077798e6df4f631d4f4cd69ef0b474b41 | [
"Apache-2.0"
] | 1 | 2022-01-25T18:26:17.000Z | 2022-01-25T18:26:17.000Z | sailbot_ws/src/sailbot/sailbot/control_system.py | wpisailbot/sailbot21-22 | e4993b6077798e6df4f631d4f4cd69ef0b474b41 | [
"Apache-2.0"
] | 1 | 2022-01-23T20:51:42.000Z | 2022-01-23T20:51:42.000Z | sailbot_ws/src/sailbot/sailbot/control_system.py | wpisailbot/sailbot21-22 | e4993b6077798e6df4f631d4f4cd69ef0b474b41 | [
"Apache-2.0"
] | 1 | 2021-11-18T21:15:15.000Z | 2021-11-18T21:15:15.000Z | from time import time
import rclpy
from rclpy.node import Node
import json
from std_msgs.msg import String, Float32, Int8, Int16
import sailbot.autonomous.p2p as p2p
from collections import deque
if __name__ == '__main__':
main()
| 43.728682 | 186 | 0.60016 |
89b8b74f1ee518f5d1b44c2b1c318c3869dd4dbd | 192 | py | Python | tracedump/pwn_wrapper.py | Mic92/tracedumpd | a84eac58106f1f1d7a82f5dee2a327861e763e4e | [
"MIT"
] | 1 | 2021-03-22T18:04:53.000Z | 2021-03-22T18:04:53.000Z | tracedump/pwn_wrapper.py | Mic92/tracedump | a84eac58106f1f1d7a82f5dee2a327861e763e4e | [
"MIT"
] | null | null | null | tracedump/pwn_wrapper.py | Mic92/tracedump | a84eac58106f1f1d7a82f5dee2a327861e763e4e | [
"MIT"
] | null | null | null | import os
# stop pwnlib from doing fancy things
os.environ["PWNLIB_NOTERM"] = "1"
from pwnlib.elf.corefile import Coredump, Mapping # noqa: E402
from pwnlib.elf.elf import ELF # noqa: E402
| 27.428571 | 63 | 0.75 |
89b92883d95ad1fae64e88b91d6848733b211d86 | 4,609 | py | Python | postcodeinfo/apps/postcode_api/admin.py | UKHomeOffice/postcodeinfo | f268a6b6d6d7ac55cb2fb307e98275348e30a287 | [
"MIT"
] | null | null | null | postcodeinfo/apps/postcode_api/admin.py | UKHomeOffice/postcodeinfo | f268a6b6d6d7ac55cb2fb307e98275348e30a287 | [
"MIT"
] | null | null | null | postcodeinfo/apps/postcode_api/admin.py | UKHomeOffice/postcodeinfo | f268a6b6d6d7ac55cb2fb307e98275348e30a287 | [
"MIT"
] | 1 | 2021-04-11T09:12:19.000Z | 2021-04-11T09:12:19.000Z | import django
from django.contrib.gis import admin
from .models import Address
# from https://djangosnippets.org/snippets/2593/
from django.contrib.admin.options import IncorrectLookupParameters
from django.contrib.admin.views.main import ChangeList
from django.core.paginator import InvalidPage, Paginator
from djan... | 36.872 | 94 | 0.632024 |
89b95121aacfb7a7ea543fd31b9769da68cb3cfc | 1,083 | py | Python | tests/molecular/bonds/bond/with_ids/test_with_ids.py | stevenbennett96/stk | 6e5af87625b83e0bfc7243bc42d8c7a860cbeb76 | [
"MIT"
] | null | null | null | tests/molecular/bonds/bond/with_ids/test_with_ids.py | stevenbennett96/stk | 6e5af87625b83e0bfc7243bc42d8c7a860cbeb76 | [
"MIT"
] | null | null | null | tests/molecular/bonds/bond/with_ids/test_with_ids.py | stevenbennett96/stk | 6e5af87625b83e0bfc7243bc42d8c7a860cbeb76 | [
"MIT"
] | null | null | null | from __future__ import annotations
from typing import Callable
import stk
def test_with_ids(
bond: stk.Bond,
get_id_map: Callable[[stk.Bond], dict[int, int]],
) -> None:
"""
Test :meth:`.Bond.with_ids`.
Parameters:
bond : :class:`.Bond`
The bond to test.
get_id_map... | 23.543478 | 66 | 0.615882 |
89b954dd1798885bb3507d31ac4569dbd6df2065 | 4,131 | py | Python | app/services.py | fabl1106/emoji_rank | f3fa50b00d34092fe6b7317a1e85829c8647b574 | [
"MIT"
] | 10 | 2021-04-15T14:17:54.000Z | 2022-02-09T07:53:27.000Z | app/services.py | fabl1106/emoji_rank | f3fa50b00d34092fe6b7317a1e85829c8647b574 | [
"MIT"
] | null | null | null | app/services.py | fabl1106/emoji_rank | f3fa50b00d34092fe6b7317a1e85829c8647b574 | [
"MIT"
] | 4 | 2021-08-12T09:09:14.000Z | 2022-02-03T08:18:48.000Z | from dataclasses import dataclass
from app import crud
from app.schemas import UserCreate, SlackEventHook
from app.settings import REACTION_LIST, DAY_MAX_REACTION
# about reaction
REMOVED_REACTION = 'reaction_removed'
ADDED_REACTION = 'reaction_added'
APP_MENTION_REACTION = 'app_mention'
# about command
CREATE_USER... | 33.860656 | 106 | 0.616074 |
89baa3cabe37903c188fd9cb2212f197553a6887 | 2,010 | py | Python | util/build_tests.py | skruger/AVWX-Engine | c3c0b90a3aa57d43bea47d07b977d71b90f987b9 | [
"MIT"
] | null | null | null | util/build_tests.py | skruger/AVWX-Engine | c3c0b90a3aa57d43bea47d07b977d71b90f987b9 | [
"MIT"
] | 3 | 2019-11-21T17:59:14.000Z | 2019-12-04T03:45:05.000Z | util/build_tests.py | AirbusDriver/avwx-engine | e3fed8f744a48faca58c3e94ddbf214f9c719d3d | [
"MIT"
] | null | null | null | """
Creates files for end-to-end tests
python util/build_tests.py
"""
# stdlib
import json
from dataclasses import asdict
# module
import avwx
def make_metar_test(station: str) -> dict:
"""
Builds METAR test file for station
"""
m = avwx.Metar(station)
m.update()
# Clear timestamp due to pa... | 25.443038 | 73 | 0.58607 |
89baa670798425bdbbb997843280bd98d927b769 | 42 | py | Python | pacote-download/ex(1-100)/ex112/utilidadescev/__init__.py | gssouza2051/python-exercicios | 81e87fed7ead0adf58473a741aaa3c83064f6cb5 | [
"MIT"
] | null | null | null | pacote-download/ex(1-100)/ex112/utilidadescev/__init__.py | gssouza2051/python-exercicios | 81e87fed7ead0adf58473a741aaa3c83064f6cb5 | [
"MIT"
] | null | null | null | pacote-download/ex(1-100)/ex112/utilidadescev/__init__.py | gssouza2051/python-exercicios | 81e87fed7ead0adf58473a741aaa3c83064f6cb5 | [
"MIT"
] | null | null | null | from ex111.utilidadescev import moeda,dado | 42 | 42 | 0.880952 |
89bb8aec70dc5ddd26138767ff03178f1d8f86d1 | 830 | py | Python | sdk/pyseele/clazz.py | rinkako/SeeleFlow | 4b8858f367ef02a568c03c8114e1c1b221208feb | [
"MIT"
] | 3 | 2019-12-20T13:32:34.000Z | 2021-04-27T06:02:28.000Z | sdk/pyseele/clazz.py | rinkako/SeeleFlow | 4b8858f367ef02a568c03c8114e1c1b221208feb | [
"MIT"
] | null | null | null | sdk/pyseele/clazz.py | rinkako/SeeleFlow | 4b8858f367ef02a568c03c8114e1c1b221208feb | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
"""
Project Seele
@author : Rinka
@date : 2019/12/17
"""
from pyseele.workitem import Workitem
| 23.055556 | 101 | 0.624096 |
89bec5ceb25cd9718ad4b6c93d9467f0e3ef9ba6 | 34,847 | py | Python | scripts/python/turtleRelated/circleint.py | jeremiahmarks/dangerzone | fe2946b8463ed018d2136ca0eb178161ad370565 | [
"MIT"
] | 1 | 2015-08-15T05:25:35.000Z | 2015-08-15T05:25:35.000Z | scripts/python/turtleRelated/circleint.py | jeremiahmarks/dangerzone | fe2946b8463ed018d2136ca0eb178161ad370565 | [
"MIT"
] | null | null | null | scripts/python/turtleRelated/circleint.py | jeremiahmarks/dangerzone | fe2946b8463ed018d2136ca0eb178161ad370565 | [
"MIT"
] | null | null | null | import math
import fvh2, fvh
import supercircle
masterCircleSet=set()
circlecalled = 0
checkcirclescalled = 0
MINOFFSET=5
def circleinter((x0, y0), r0, (x1, y1), r1):
"""
This modules accepts two circles and then determines where they meet.
the circles are submitted as x,y,r where x,y is the center of... | 34.130264 | 257 | 0.662697 |
89bed3c6f4358ea5beffd07b449a6c39b7b53e4d | 392 | py | Python | test_calculations.py | joshmgrant/pybay-pytest-the-awesome-parts-code | 4b9fccb8b561e5745c2498fb4360c40a5944694c | [
"Unlicense"
] | null | null | null | test_calculations.py | joshmgrant/pybay-pytest-the-awesome-parts-code | 4b9fccb8b561e5745c2498fb4360c40a5944694c | [
"Unlicense"
] | null | null | null | test_calculations.py | joshmgrant/pybay-pytest-the-awesome-parts-code | 4b9fccb8b561e5745c2498fb4360c40a5944694c | [
"Unlicense"
] | null | null | null | from calculations import TemperatureConverter
| 20.631579 | 45 | 0.714286 |
981ec4cd5715c632ca338d47553a10ae304b14da | 12,359 | py | Python | utils.py | xdr940/cc | a98fe9b6c33c332a4c399f968032a90989c55672 | [
"MIT"
] | null | null | null | utils.py | xdr940/cc | a98fe9b6c33c332a4c399f968032a90989c55672 | [
"MIT"
] | 1 | 2019-08-16T07:09:22.000Z | 2019-09-04T04:59:51.000Z | utils.py | xdr940/cc | a98fe9b6c33c332a4c399f968032a90989c55672 | [
"MIT"
] | 1 | 2020-01-13T04:51:22.000Z | 2020-01-13T04:51:22.000Z | from __future__ import division
import shutil
import numpy as np
import torch
import torch.nn as nn
from torch.autograd import Variable
from matplotlib import cm
from matplotlib.colors import ListedColormap, LinearSegmentedColormap
from path import Path
from collections import OrderedDict
import datetime
epsilon = 1e-... | 35.719653 | 130 | 0.631524 |
981f4131a08264f22a6b10de9d991012715fd4c7 | 966 | py | Python | oops_fhir/r4/value_set/provenance_activity_type.py | Mikuana/oops_fhir | 77963315d123756b7d21ae881f433778096a1d25 | [
"MIT"
] | null | null | null | oops_fhir/r4/value_set/provenance_activity_type.py | Mikuana/oops_fhir | 77963315d123756b7d21ae881f433778096a1d25 | [
"MIT"
] | null | null | null | oops_fhir/r4/value_set/provenance_activity_type.py | Mikuana/oops_fhir | 77963315d123756b7d21ae881f433778096a1d25 | [
"MIT"
] | null | null | null | from pathlib import Path
from fhir.resources.valueset import ValueSet as _ValueSet
from oops_fhir.utils import ValueSet
from oops_fhir.r4.code_system.v3_participation_type import v3ParticipationType
__all__ = ["ProvenanceActivityType"]
_resource = _ValueSet.parse_file(Path(__file__).with_suffix(".json"))
| 26.108108 | 78 | 0.773292 |
981f6d8c4555ef92f86c7b62daf2e7f20eb0fb71 | 3,312 | py | Python | py/adafruit-circuitpython-bundle-7.x-mpy-20211104/examples/is31fl3731_rgbmatrix5x5_rainbow.py | ParentZap/micro-projects | b260ac09057935f44d3d00ff96670fabfd567aac | [
"Apache-2.0"
] | null | null | null | py/adafruit-circuitpython-bundle-7.x-mpy-20211104/examples/is31fl3731_rgbmatrix5x5_rainbow.py | ParentZap/micro-projects | b260ac09057935f44d3d00ff96670fabfd567aac | [
"Apache-2.0"
] | null | null | null | py/adafruit-circuitpython-bundle-7.x-mpy-20211104/examples/is31fl3731_rgbmatrix5x5_rainbow.py | ParentZap/micro-projects | b260ac09057935f44d3d00ff96670fabfd567aac | [
"Apache-2.0"
] | null | null | null | # SPDX-FileCopyrightText: 2021 Sandy Macdonald, David Glaude, James Carr
# SPDX-License-Identifier: MIT
"""
Example to display a rainbow animation on the 5x5 RGB Matrix Breakout.
Usage:
Rename this file code.py and pop it on your Raspberry Pico's
CIRCUITPY drive.
This example is for use on the Pico Explore... | 24.533333 | 96 | 0.536534 |