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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
931d21150c4fef29838bf9c36548a5b31d001040 | 5,165 | py | Python | ip_allow_lists/ip_compare.py | PaloAltoNetworks/pcs-migration-management | 766c8c861befa92e593b23ad6d248e33f62054bb | [
"ISC"
] | 1 | 2022-03-17T12:51:45.000Z | 2022-03-17T12:51:45.000Z | ip_allow_lists/ip_compare.py | PaloAltoNetworks/pcs-migration-management | 766c8c861befa92e593b23ad6d248e33f62054bb | [
"ISC"
] | 2 | 2021-11-03T15:34:40.000Z | 2021-12-14T19:50:20.000Z | ip_allow_lists/ip_compare.py | PaloAltoNetworks/pcs-migration-management | 766c8c861befa92e593b23ad6d248e33f62054bb | [
"ISC"
] | 4 | 2021-11-09T17:57:01.000Z | 2022-01-24T17:41:21.000Z | from sdk.color_print import c_print
from tqdm import tqdm
#Migrate
def compare_trusted_networks(source_networks, clone_networks):
'''
Accepts the source trusted alert network list and a clone trusted alert network list.
Compares the source tenants network list to a clone tenant networks list.
'''
... | 40.992063 | 134 | 0.634656 |
931dd502335fb2a0b22db32c479212aa84cc2649 | 4,004 | py | Python | lib/surface/source/captures/upload.py | bopopescu/SDK | e6d9aaee2456f706d1d86e8ec2a41d146e33550d | [
"Apache-2.0"
] | null | null | null | lib/surface/source/captures/upload.py | bopopescu/SDK | e6d9aaee2456f706d1d86e8ec2a41d146e33550d | [
"Apache-2.0"
] | null | null | null | lib/surface/source/captures/upload.py | bopopescu/SDK | e6d9aaee2456f706d1d86e8ec2a41d146e33550d | [
"Apache-2.0"
] | 2 | 2020-11-04T03:08:21.000Z | 2020-11-05T08:14:41.000Z | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 37.074074 | 80 | 0.665085 |
931f2ac2304379a993c5a0b48864b82b64c72225 | 7,047 | py | Python | pyk/src/pyk/tests/test_kcfg.py | runtimeverification/k | 044c49e535516c1d142206795bf1d8b2c0fcbf0d | [
"BSD-3-Clause"
] | 23 | 2017-02-26T10:49:29.000Z | 2022-03-22T20:32:10.000Z | pyk/src/pyk/tests/test_kcfg.py | runtimeverification/k | 044c49e535516c1d142206795bf1d8b2c0fcbf0d | [
"BSD-3-Clause"
] | 112 | 2016-01-20T16:23:47.000Z | 2022-03-31T21:54:59.000Z | pyk/src/pyk/tests/test_kcfg.py | runtimeverification/k | 044c49e535516c1d142206795bf1d8b2c0fcbf0d | [
"BSD-3-Clause"
] | 6 | 2016-02-23T19:12:26.000Z | 2022-03-31T01:53:24.000Z | from typing import Any, Dict, List, Tuple
from unittest import TestCase
from ..cterm import CTerm
from ..kast import TRUE, KApply, KInner, KVariable
from ..kcfg import KCFG
from ..prelude import token
# over 10 is variables
| 28.301205 | 97 | 0.548744 |
931f8afd4a5774ac2d04ce2cc9a73a4ae7812abb | 645 | py | Python | tests/test_unit/test_graph/test_tesserae.py | karljohanw/cortexpy | 70dcce771136f98edb5250ad8abd2a46bda7f0a6 | [
"Apache-2.0"
] | null | null | null | tests/test_unit/test_graph/test_tesserae.py | karljohanw/cortexpy | 70dcce771136f98edb5250ad8abd2a46bda7f0a6 | [
"Apache-2.0"
] | null | null | null | tests/test_unit/test_graph/test_tesserae.py | karljohanw/cortexpy | 70dcce771136f98edb5250ad8abd2a46bda7f0a6 | [
"Apache-2.0"
] | null | null | null | from cortexpy.tesserae import Tesserae
| 24.807692 | 69 | 0.541085 |
93208a4a4fa8500fdf154d105073add88c48b822 | 151 | py | Python | napari_bb_annotations/__init__.py | czbiohub/napari-bb-annotation | c316931de363e41c702e69316933b486d5f38cb2 | [
"BSD-3-Clause"
] | 3 | 2021-03-12T18:13:40.000Z | 2021-04-27T00:22:03.000Z | napari_bb_annotations/__init__.py | czbiohub/napari-bb-annotation | c316931de363e41c702e69316933b486d5f38cb2 | [
"BSD-3-Clause"
] | 13 | 2021-04-05T20:32:08.000Z | 2021-06-23T05:35:37.000Z | napari_bb_annotations/__init__.py | czbiohub/napari-bb-annotations | c316931de363e41c702e69316933b486d5f38cb2 | [
"BSD-3-Clause"
] | null | null | null | try:
from ._version import version as __version__
except ImportError:
__version__ = "unknown"
from . import _key_bindings
del _key_bindings
| 15.1 | 48 | 0.761589 |
9320c7176b7d0f5a4f94419ff900dc0287dd18c3 | 8,544 | py | Python | tests/l_layer/backward.py | felix990302/nnlib | 618c9f860ff2298ed2e0bbcb249ae74eeb8a408b | [
"Apache-2.0"
] | 1 | 2019-03-27T17:02:50.000Z | 2019-03-27T17:02:50.000Z | tests/l_layer/backward.py | felix990302/nnlib | 618c9f860ff2298ed2e0bbcb249ae74eeb8a408b | [
"Apache-2.0"
] | null | null | null | tests/l_layer/backward.py | felix990302/nnlib | 618c9f860ff2298ed2e0bbcb249ae74eeb8a408b | [
"Apache-2.0"
] | null | null | null | import numpy as np
from numpy.random import RandomState
from numpy.testing import assert_allclose
from nnlib.l_layer.backward import linear_backward, linear_backward_activation, model_backward
from nnlib.utils.derivative import sigmoid_backward, relu_backward
from nnlib.utils.activation import sigmoid, relu
| 37.147826 | 122 | 0.508544 |
93220f73e54d4401d09974fa1a394a20787d5fd3 | 137 | py | Python | src/news_lk/upload_data.py | nuuuwan/news_lk | a2e60fd2dfb49f7c5e8d432cdd5fad0511575197 | [
"MIT"
] | null | null | null | src/news_lk/upload_data.py | nuuuwan/news_lk | a2e60fd2dfb49f7c5e8d432cdd5fad0511575197 | [
"MIT"
] | null | null | null | src/news_lk/upload_data.py | nuuuwan/news_lk | a2e60fd2dfb49f7c5e8d432cdd5fad0511575197 | [
"MIT"
] | null | null | null | """Uploaded data to nuuuwan/news_lk:data branch."""
from news_lk import scrape
if __name__ == '__main__':
scrape.scrape_and_dump()
| 19.571429 | 51 | 0.729927 |
932270b633249ca330baa6276f57f5c2b0d91f48 | 1,814 | py | Python | deli_counter/http/mounts/root/routes/v1/validation_models/regions.py | sandwichcloud/deli-counter | e72ee3966f4457ffbd1d432b3516965075c7c86e | [
"MIT"
] | 1 | 2017-10-19T09:25:29.000Z | 2017-10-19T09:25:29.000Z | deli_counter/http/mounts/root/routes/v1/validation_models/regions.py | sandwichcloud/deli-counter | e72ee3966f4457ffbd1d432b3516965075c7c86e | [
"MIT"
] | null | null | null | deli_counter/http/mounts/root/routes/v1/validation_models/regions.py | sandwichcloud/deli-counter | e72ee3966f4457ffbd1d432b3516965075c7c86e | [
"MIT"
] | null | null | null | from schematics import Model
from schematics.types import IntType, UUIDType, StringType, BooleanType
from ingredients_db.models.region import RegionState, Region
from ingredients_http.schematics.types import ArrowType, EnumType
| 31.275862 | 71 | 0.738699 |
932632d6c40f6be38b39dba6166b3aebd0e53a0b | 257 | py | Python | winremoteenum.py | simondotsh/WinRemoteEnum | f40cff76788709e54e7ed19157870dacfcaa0bc3 | [
"MIT"
] | 2 | 2021-11-25T14:15:12.000Z | 2022-02-02T04:27:17.000Z | winremoteenum.py | simondotsh/WinRemoteEnum | f40cff76788709e54e7ed19157870dacfcaa0bc3 | [
"MIT"
] | null | null | null | winremoteenum.py | simondotsh/WinRemoteEnum | f40cff76788709e54e7ed19157870dacfcaa0bc3 | [
"MIT"
] | 2 | 2021-11-03T18:11:40.000Z | 2022-02-02T15:11:30.000Z | #!/usr/bin/env python3
from src.cli import Cli
from src.core import Orchestrator
if __name__ == '__main__':
main() | 23.363636 | 79 | 0.727626 |
93280c05a831eacbb39a47e2e89a3ee261d3a78f | 1,696 | py | Python | setup.py | easyScience/easyCore | 5d16d5b27803277d0c44886f94dab599f764ae0b | [
"BSD-3-Clause"
] | 2 | 2021-11-02T10:22:45.000Z | 2022-02-18T23:41:19.000Z | setup.py | easyScience/easyCore | 5d16d5b27803277d0c44886f94dab599f764ae0b | [
"BSD-3-Clause"
] | 114 | 2020-06-30T08:52:27.000Z | 2022-03-30T20:47:56.000Z | setup.py | easyScience/easyCore | 5d16d5b27803277d0c44886f94dab599f764ae0b | [
"BSD-3-Clause"
] | 1 | 2022-03-04T13:01:09.000Z | 2022-03-04T13:01:09.000Z |
# -*- coding: utf-8 -*-
# DO NOT EDIT THIS FILE!
# This file has been autogenerated by dephell <3
# https://github.com/dephell/dephell
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import os.path
readme = ''
here = os.path.abspath(os.path.dirname(__file__))
readme_... | 43.487179 | 266 | 0.661557 |
9328e23e8d93546efc5261e03fba860e2483f556 | 1,505 | py | Python | submit_scripts/mizuRoute/mizuRoute_wrapper.py | BrisClimate/flood-cascade | 660c29275a87785153d0f107ed23104fcbcbddee | [
"MIT"
] | null | null | null | submit_scripts/mizuRoute/mizuRoute_wrapper.py | BrisClimate/flood-cascade | 660c29275a87785153d0f107ed23104fcbcbddee | [
"MIT"
] | null | null | null | submit_scripts/mizuRoute/mizuRoute_wrapper.py | BrisClimate/flood-cascade | 660c29275a87785153d0f107ed23104fcbcbddee | [
"MIT"
] | 3 | 2020-11-08T16:01:47.000Z | 2021-01-13T17:13:32.000Z | #!/cm/shared/languages/python-3.3.2/bin/python
# submit script for submission of mizuRoute simualtions
# Peter Uhe Oct 29 2019
#
# call this script from 'run_mizuRoute_templated_mswep050calib.py which creates a qsub job to submit to the HPC queue
# This script is actually called from 'call_pythonscript.sh' (which is n... | 35 | 120 | 0.765449 |
932c68f3bfdd0fa4f25517ebea01555ab01db520 | 17,968 | py | Python | txml.py | jdelgit/txml | 07c28962a34397b546d56c1adb60c0ef20f71c22 | [
"MIT"
] | null | null | null | txml.py | jdelgit/txml | 07c28962a34397b546d56c1adb60c0ef20f71c22 | [
"MIT"
] | null | null | null | txml.py | jdelgit/txml | 07c28962a34397b546d56c1adb60c0ef20f71c22 | [
"MIT"
] | null | null | null | from xml.etree.ElementTree import iterparse, ParseError
from io import StringIO
from os.path import isfile
from re import findall
| 37.668763 | 105 | 0.509016 |
932d1dd3f28fbe11836dbddd059b224fbf55e0a8 | 1,404 | py | Python | app/orders.py | Gabkings/fast-food-api1 | 129bea30cfa0ecb017f2f26bb34a6aa2716f9f04 | [
"MIT"
] | null | null | null | app/orders.py | Gabkings/fast-food-api1 | 129bea30cfa0ecb017f2f26bb34a6aa2716f9f04 | [
"MIT"
] | null | null | null | app/orders.py | Gabkings/fast-food-api1 | 129bea30cfa0ecb017f2f26bb34a6aa2716f9f04 | [
"MIT"
] | null | null | null | from flask import Flask, request
from flask_restful import Resource
from .models import Order, orders
| 25.527273 | 78 | 0.58547 |
932e05da095fad449ca578a15a6dc14375d17137 | 5,198 | py | Python | python/storyboard/bias_optimizer.py | stanford-futuredata/sketchstore | c209e4d01343a05dc5aecdb7a9801fc639019fd3 | [
"Apache-2.0"
] | 5 | 2020-05-07T02:25:01.000Z | 2021-05-25T07:54:42.000Z | python/storyboard/bias_optimizer.py | stanford-futuredata/sketchstore | c209e4d01343a05dc5aecdb7a9801fc639019fd3 | [
"Apache-2.0"
] | 1 | 2020-07-31T20:04:59.000Z | 2020-07-31T20:04:59.000Z | python/storyboard/bias_optimizer.py | stanford-futuredata/sketchstore | c209e4d01343a05dc5aecdb7a9801fc639019fd3 | [
"Apache-2.0"
] | 1 | 2020-07-06T20:39:05.000Z | 2020-07-06T20:39:05.000Z | from typing import Mapping, Any, Sequence
import numpy as np
import heapq
import math
from tqdm import tqdm
import scipy.optimize
import cvxpy as cvx
base = 2.0
| 29.039106 | 93 | 0.55329 |
932e5914cfad78eadac43b5ef29f6ed1ab78376e | 874 | py | Python | config/conf.d/04-spawner-common.py | possiblyMikeB/davidson-jupyter | 8980c1249756d421b70950b9895b75e16d7e68c0 | [
"BSD-3-Clause"
] | null | null | null | config/conf.d/04-spawner-common.py | possiblyMikeB/davidson-jupyter | 8980c1249756d421b70950b9895b75e16d7e68c0 | [
"BSD-3-Clause"
] | null | null | null | config/conf.d/04-spawner-common.py | possiblyMikeB/davidson-jupyter | 8980c1249756d421b70950b9895b75e16d7e68c0 | [
"BSD-3-Clause"
] | null | null | null | import json, os
## base spawner config
try:
c.Spawner.cmd = \
json.loads(os.environ['SPAWNER_CMD'])
except KeyError:
c.Spawner.cmd = [
'jupyterhub-singleuser', # OAuth wrapped jupyter instance server
'--KernelManager.transport=ipc', # -- all kernel comms over UNIX sockets
'--Ma... | 33.615385 | 114 | 0.693364 |
932fbbd3b2489556c428736a9418ed424b87b707 | 339 | py | Python | datasets/__init__.py | radarsat1/latentspace | e651dc14ed7b4dd3f28577639a06b7160c5fca5e | [
"MIT"
] | null | null | null | datasets/__init__.py | radarsat1/latentspace | e651dc14ed7b4dd3f28577639a06b7160c5fca5e | [
"MIT"
] | null | null | null | datasets/__init__.py | radarsat1/latentspace | e651dc14ed7b4dd3f28577639a06b7160c5fca5e | [
"MIT"
] | null | null | null |
__all__ = ['get_dataset']
| 28.25 | 59 | 0.675516 |
932fd6103c8719c4b707f1914eddb51377cb4198 | 8,419 | py | Python | memsource_cli/models/async_request_dto.py | unofficial-memsource/memsource-cli-client | a6639506b74e95476da87f4375953448b76ea90c | [
"Apache-2.0"
] | 16 | 2019-09-25T00:20:38.000Z | 2021-05-04T05:56:10.000Z | memsource_cli/models/async_request_dto.py | zerodayz/memsource-cli-client | c2574f1467539a49e6637c874e88d75c7ef789b3 | [
"Apache-2.0"
] | 26 | 2019-09-30T14:00:03.000Z | 2021-05-12T11:15:18.000Z | memsource_cli/models/async_request_dto.py | zerodayz/memsource-cli-client | c2574f1467539a49e6637c874e88d75c7ef789b3 | [
"Apache-2.0"
] | 1 | 2021-05-24T16:19:14.000Z | 2021-05-24T16:19:14.000Z | # coding: utf-8
"""
Memsource REST API
Welcome to Memsource's API documentation. To view our legacy APIs please [visit our documentation](https://wiki.memsource.com/wiki/Memsource_API) and for more information about our new APIs, [visit our blog](https://www.memsource.com/blog/2017/10/24/introducing-rest-apis... | 29.749117 | 421 | 0.602328 |
932ff6498e2e97f5e213cd233e1d1ac08b819528 | 188 | py | Python | python/p.py | gmasching/project-euler | b4afa94f83756f3a44667ec2d7fcb5bca4304825 | [
"MIT"
] | 2 | 2020-06-03T20:55:27.000Z | 2021-04-17T10:10:17.000Z | python/p.py | gmasching/project-euler | b4afa94f83756f3a44667ec2d7fcb5bca4304825 | [
"MIT"
] | null | null | null | python/p.py | gmasching/project-euler | b4afa94f83756f3a44667ec2d7fcb5bca4304825 | [
"MIT"
] | 2 | 2020-06-03T20:55:33.000Z | 2021-04-17T10:10:47.000Z |
print(f(2)-f(1))
#print((f(3.5) - f(0.5)) / -3)
#print(f(0.5)) | 23.5 | 44 | 0.457447 |
93319b806e1474fb346a2ce001af51f8482adee0 | 19,194 | py | Python | Inference_Model.py | CODEJIN/WaveRNN | 835462e71fd151c8ca0a0ed68f691089f1637851 | [
"MIT"
] | 1 | 2020-03-22T16:55:53.000Z | 2020-03-22T16:55:53.000Z | Inference_Model.py | CODEJIN/WaveRNN | 835462e71fd151c8ca0a0ed68f691089f1637851 | [
"MIT"
] | null | null | null | Inference_Model.py | CODEJIN/WaveRNN | 835462e71fd151c8ca0a0ed68f691089f1637851 | [
"MIT"
] | 1 | 2020-12-12T14:41:50.000Z | 2020-12-12T14:41:50.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections
import functools
import itertools
import threading
import numpy as np
from six.moves import zip # pylint: disable=redefined-builtin
from google.protobuf import json_format
from tensorflow.... | 53.022099 | 109 | 0.627019 |
9333f46a3199aee3308e67cf5584433366413e92 | 761 | py | Python | tests/test_net_sender_proxy.py | nicoddemus/aioworkers | 4ab85064844dc28141833d1348989d8c891f3d7d | [
"Apache-2.0"
] | 45 | 2017-04-26T23:50:30.000Z | 2021-12-29T03:21:06.000Z | tests/test_net_sender_proxy.py | nicoddemus/aioworkers | 4ab85064844dc28141833d1348989d8c891f3d7d | [
"Apache-2.0"
] | 63 | 2017-08-01T10:35:45.000Z | 2022-03-01T18:07:49.000Z | tests/test_net_sender_proxy.py | nicoddemus/aioworkers | 4ab85064844dc28141833d1348989d8c891f3d7d | [
"Apache-2.0"
] | 6 | 2017-10-19T08:21:23.000Z | 2021-12-29T03:25:32.000Z | import pytest
| 20.026316 | 47 | 0.603154 |
9335654c2c674182289730fd81c0651f4e53ee52 | 2,794 | py | Python | train.py | olavosamp/kaggle_isic_2020 | d4680251997b65987f25d66a6d1d8aec1e71adaa | [
"MIT"
] | null | null | null | train.py | olavosamp/kaggle_isic_2020 | d4680251997b65987f25d66a6d1d8aec1e71adaa | [
"MIT"
] | null | null | null | train.py | olavosamp/kaggle_isic_2020 | d4680251997b65987f25d66a6d1d8aec1e71adaa | [
"MIT"
] | null | null | null | import torch
import torchvision
import numpy as np
import lib.model
from lib.model import MetadataModel, train_model
import lib.dataset
import lib.dirs as dirs
import lib.utils as utils
import lib.vis_utils as vutils
import lib.defines as defs
if __name__ == "__main__":
data_path = dirs.data... | 39.914286 | 107 | 0.67287 |
9335a61ad4c952dbdf3a5969c7c3e1df83b69ab0 | 1,533 | py | Python | src/owncloud_rename.py | pzia/keepmydatas | 3783909119e7ece986a92b9e56ec53cddeb924e3 | [
"MIT"
] | 1 | 2020-07-17T02:14:39.000Z | 2020-07-17T02:14:39.000Z | src/owncloud_rename.py | pzia/keepmydatas | 3783909119e7ece986a92b9e56ec53cddeb924e3 | [
"MIT"
] | null | null | null | src/owncloud_rename.py | pzia/keepmydatas | 3783909119e7ece986a92b9e56ec53cddeb924e3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Parse tree and find files matching owncloud forbidden characters.
Rename in place or move into a specific folder
"""
import KmdCmd
import KmdFiles
import os, re
import logging
if __name__ == "__main__":
cmd = KmdOwncloudRename(__doc__)
cmd.run()
| 37.390244 | 133 | 0.55773 |
93367dc6cd9bf8f8bcaab3536826c212ad41d6ba | 13,975 | py | Python | gym_tetris/board.py | michielcx/Tetris-DQN | 66ee640aaa2068f3db4798ddf51f1518c3779cc6 | [
"MIT"
] | 13 | 2019-10-23T09:32:33.000Z | 2021-08-01T10:39:57.000Z | gym_tetris/board.py | michielcx/Tetris-DQN | 66ee640aaa2068f3db4798ddf51f1518c3779cc6 | [
"MIT"
] | 1 | 2022-02-10T00:29:36.000Z | 2022-02-10T00:29:36.000Z | gym_tetris/board.py | michielcx/Tetris-DQN | 66ee640aaa2068f3db4798ddf51f1518c3779cc6 | [
"MIT"
] | 6 | 2020-10-16T01:43:35.000Z | 2022-01-28T12:05:32.000Z | import random
def get_random_bag():
"""Returns a bag with unique pieces. (Bag randomizer)"""
random_shapes = list(SHAPES)
random.shuffle(random_shapes)
return [Piece(0, 0, shape) for shape in random_shapes]
SHAPE_I = Shape(1, [[
' ',
'####',
' ',
' ',
], [
' # ',
'... | 28.873967 | 115 | 0.536887 |
9336c65fb9f6e0d74ee67f3a8efdd3cd42889844 | 249 | py | Python | 03. DP/2xn tile 2.py | KLumy/Basic-Algorithm | e52e4200c1955a9062569814ff3418dd06666845 | [
"MIT"
] | 1 | 2021-01-22T15:58:32.000Z | 2021-01-22T15:58:32.000Z | 03. DP/2xn tile 2.py | KLumy/Basic-Algorithm | e52e4200c1955a9062569814ff3418dd06666845 | [
"MIT"
] | null | null | null | 03. DP/2xn tile 2.py | KLumy/Basic-Algorithm | e52e4200c1955a9062569814ff3418dd06666845 | [
"MIT"
] | null | null | null | import sys
input = sys.stdin.readline
n = int(input())
if n < 2:
print(n)
exit(0)
d = [0] * (n+1)
d[1] = 1
d[2] = 3
for i in range(n+1):
if i < 3:
continue
d[i] = (d[i-1] % 10007 + (d[i-2]*2) % 10007) % 10007
print(d[n])
| 13.105263 | 56 | 0.481928 |
93371a58fa9ad1c5d98cbf050ae2c7e71f6f8acc | 1,074 | py | Python | menu.py | dadiletta/Saber | 515751e7e9f0f12d97fa07606883eac73a352044 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | menu.py | dadiletta/Saber | 515751e7e9f0f12d97fa07606883eac73a352044 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | menu.py | dadiletta/Saber | 515751e7e9f0f12d97fa07606883eac73a352044 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | import Light
__author__ = 'adilettad'
print("---------------")
print("----Welcome----")
print("------to-------")
print("-----Saber-----")
print("---------------")
sab = Light.Saber()
while True:
command = raw_input('Your command:')
if command == "blink":
sab.demoLED()
elif command == "dist" or... | 22.851064 | 61 | 0.529795 |
93388ca96a9f3273e22a1cd4ed97d8092f0d63f7 | 739 | py | Python | a10/build/lib/a10/asvr/types.py | THS-on/AttestationEngine | 6746d602215df43056b04515bd9b831f0bb0ddbb | [
"BSD-3-Clause-Clear"
] | null | null | null | a10/build/lib/a10/asvr/types.py | THS-on/AttestationEngine | 6746d602215df43056b04515bd9b831f0bb0ddbb | [
"BSD-3-Clause-Clear"
] | 4 | 2021-11-08T19:47:56.000Z | 2021-11-25T10:30:50.000Z | a10/build/lib/a10/asvr/types.py | THS-on/AttestationEngine | 6746d602215df43056b04515bd9b831f0bb0ddbb | [
"BSD-3-Clause-Clear"
] | null | null | null | # Copyright 2021 Nokia
# Licensed under the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
import a10.structures.constants
import a10.structures.identity
import a10.structures.returncode
import a10.asvr.db.core
import a10.asvr.db.announce
import a10.asvr.elements
def getTypes():
"""Gets a list of... | 21.114286 | 50 | 0.630582 |
9338957c2d0434f6f713ebe7005892553e33c34d | 456 | py | Python | packages/migrations/0004_auto_20210416_1013.py | dandeduck/package-tracking-web | f7cb3dffd6f7f6b7ced5b1106a049c79c192dfa5 | [
"MIT"
] | 1 | 2021-02-11T22:16:51.000Z | 2021-02-11T22:16:51.000Z | packages/migrations/0004_auto_20210416_1013.py | dandeduck/package-tracking-web | f7cb3dffd6f7f6b7ced5b1106a049c79c192dfa5 | [
"MIT"
] | 54 | 2021-02-11T18:52:11.000Z | 2021-06-13T13:45:01.000Z | packages/migrations/0004_auto_20210416_1013.py | dandeduck/package-tracking-web | f7cb3dffd6f7f6b7ced5b1106a049c79c192dfa5 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.12 on 2021-04-16 10:13
from django.db import migrations, models
| 22.8 | 74 | 0.620614 |
933b4da8586a2940f3a4d00ebc21c1950b2eb3db | 241 | py | Python | website/music/views.py | mrsmartpants/DjangoTutorial-Beginners | 11e64f4f982a576f814db5ed466f8b31bba5ae5c | [
"MIT"
] | null | null | null | website/music/views.py | mrsmartpants/DjangoTutorial-Beginners | 11e64f4f982a576f814db5ed466f8b31bba5ae5c | [
"MIT"
] | null | null | null | website/music/views.py | mrsmartpants/DjangoTutorial-Beginners | 11e64f4f982a576f814db5ed466f8b31bba5ae5c | [
"MIT"
] | null | null | null | from django.shortcuts import render
# Python functions - user is going to request an url
# Create your views here.
from django.http import HttpResponse | 30.125 | 67 | 0.763485 |
933cd25c41f2ec4430b1ae8b3e9ce531b2bfd7b9 | 1,073 | py | Python | LeafNATS/modules/embedding/position_embedding.py | dumpmemory/AspDecSSCL | 004d73d3248e8fdee1336cfc6490ef4872583665 | [
"MIT"
] | 23 | 2020-12-16T15:50:07.000Z | 2022-03-17T05:51:20.000Z | LeafNATS/modules/embedding/position_embedding.py | dumpmemory/AspDecSSCL | 004d73d3248e8fdee1336cfc6490ef4872583665 | [
"MIT"
] | 3 | 2021-02-01T07:24:35.000Z | 2021-11-24T09:28:35.000Z | LeafNATS/modules/embedding/position_embedding.py | dumpmemory/AspDecSSCL | 004d73d3248e8fdee1336cfc6490ef4872583665 | [
"MIT"
] | 4 | 2021-05-12T06:49:43.000Z | 2021-10-04T04:41:08.000Z | '''
@author Tian Shi
Please contact tshi@vt.edu
'''
import math
import torch
| 26.170732 | 72 | 0.625349 |
933d30b34a1b5fd85d26dcd036d20209cd0759ee | 3,108 | py | Python | tests/tensor/sum_test.py | kbrodt/tor4 | d09740b746c534e67a72f492c7c03654f5888a46 | [
"MIT"
] | null | null | null | tests/tensor/sum_test.py | kbrodt/tor4 | d09740b746c534e67a72f492c7c03654f5888a46 | [
"MIT"
] | null | null | null | tests/tensor/sum_test.py | kbrodt/tor4 | d09740b746c534e67a72f492c7c03654f5888a46 | [
"MIT"
] | null | null | null | from tor4 import tensor
| 28.254545 | 78 | 0.560811 |
933e03200f3271fcfb99f615ab7c6f6d828aa8d2 | 3,150 | py | Python | Excite.py | JohnDoe2576/MyPythonCodes | 9d714bc9f9909af0ade4142439da518b30b7d51d | [
"MIT"
] | null | null | null | Excite.py | JohnDoe2576/MyPythonCodes | 9d714bc9f9909af0ade4142439da518b30b7d51d | [
"MIT"
] | null | null | null | Excite.py | JohnDoe2576/MyPythonCodes | 9d714bc9f9909af0ade4142439da518b30b7d51d | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
# Time parameters
t0 = 0. # Start time
dt = 0.01 # Time step
t1 = 100. # End time
# Time vector
t = np.arange(t0, t1, dt)
# Signal parameters
n_samples = len(t)
alpha = (-2.5, 2.5)
tau... | 35 | 94 | 0.634286 |
933e1d3bf96fcd6d9b9ec55a821268f440bca98b | 4,232 | py | Python | model.py | andriikushch/CarND-Behavioral-Cloning-P3 | 89bd19c3a52f1f34126c7aeb97e94437bde25e0c | [
"MIT"
] | 1 | 2019-09-19T04:10:30.000Z | 2019-09-19T04:10:30.000Z | model.py | andriikushch/CarND-Behavioral-Cloning-P3 | 89bd19c3a52f1f34126c7aeb97e94437bde25e0c | [
"MIT"
] | null | null | null | model.py | andriikushch/CarND-Behavioral-Cloning-P3 | 89bd19c3a52f1f34126c7aeb97e94437bde25e0c | [
"MIT"
] | null | null | null | import csv
from math import ceil
import cv2
import numpy as np
from sklearn.model_selection import train_test_split
import sklearn
from keras.models import Sequential
from keras.layers import Flatten, Dense, Lambda, BatchNormalization, Dropout, Cropping2D
from keras.layers.convolutional import Convolution2D
from keras... | 36.17094 | 110 | 0.688563 |
933e73421f8903c5d4b0d41ce7311e8338acfeb3 | 8,854 | py | Python | src/natcap/invest/__init__.py | dcdenu4/invest | 3d115d4d903674236f1e9e9962d737029ebd0701 | [
"BSD-3-Clause"
] | null | null | null | src/natcap/invest/__init__.py | dcdenu4/invest | 3d115d4d903674236f1e9e9962d737029ebd0701 | [
"BSD-3-Clause"
] | 28 | 2020-04-09T23:39:38.000Z | 2020-04-17T00:30:47.000Z | src/natcap/invest/__init__.py | dcdenu4/invest | 3d115d4d903674236f1e9e9962d737029ebd0701 | [
"BSD-3-Clause"
] | null | null | null | """init module for natcap.invest."""
import dataclasses
import logging
import os
import sys
import pkg_resources
LOGGER = logging.getLogger('natcap.invest')
LOGGER.addHandler(logging.NullHandler())
__all__ = ['local_dir', ]
try:
__version__ = pkg_resources.get_distribution(__name__).version
except pkg_resources... | 39.351111 | 79 | 0.660605 |
933f0720d869cc058a8608282bd4befb49d6a16b | 18,507 | py | Python | amnesia/modules/account/resources.py | silenius/amnesia | ba5e3ac79a89da599c22206ad1fd17541855f74c | [
"BSD-2-Clause"
] | 4 | 2015-05-08T10:57:56.000Z | 2021-05-17T04:32:11.000Z | amnesia/modules/account/resources.py | silenius/amnesia | ba5e3ac79a89da599c22206ad1fd17541855f74c | [
"BSD-2-Clause"
] | 6 | 2019-12-26T16:43:41.000Z | 2022-02-28T11:07:54.000Z | amnesia/modules/account/resources.py | silenius/amnesia | ba5e3ac79a89da599c22206ad1fd17541855f74c | [
"BSD-2-Clause"
] | 1 | 2019-09-23T14:08:11.000Z | 2019-09-23T14:08:11.000Z | # -*- coding: utf-8 -*-
# pylint: disable=E1101
import logging
import os
import operator
from binascii import hexlify
from pyramid.security import DENY_ALL
from pyramid.security import Everyone
from pyramid.security import Allow
from pyramid.settings import asbool
from pyramid_mailer.message import Message
from s... | 26.476395 | 92 | 0.580699 |
933f58e32e7a5ca6a9f6e5d52f172b36fc7b7210 | 5,013 | py | Python | unused/more_num.py | monadius/FPTaylor | 55214506eaf1a5fbbecf098221b81c4cc375ac6f | [
"MIT"
] | 21 | 2015-11-24T20:52:23.000Z | 2022-02-18T15:04:48.000Z | unused/more_num.py | monadius/FPTaylor | 55214506eaf1a5fbbecf098221b81c4cc375ac6f | [
"MIT"
] | 24 | 2016-10-31T16:46:00.000Z | 2021-04-07T04:35:37.000Z | unused/more_num.py | monadius/FPTaylor | 55214506eaf1a5fbbecf098221b81c4cc375ac6f | [
"MIT"
] | 7 | 2018-01-11T17:52:41.000Z | 2021-08-24T01:52:59.000Z | import math
import sys
from fractions import Fraction
from random import uniform, randint
import decimal as dec
# for i in range(20):
# f = 10 ** i
# print(f'{f}: {log10_floor(f)}, {log10_floor2(f)}')
# print(log10_floor2(100))
# sys.exit(0)
# print(str_of_pos_float_hi(2, 230454523525e+100))
tests(10000, ... | 24.940299 | 82 | 0.448235 |
934494c2a4fc3ddbe6eb8bc04fe6967de3193ecb | 876 | py | Python | setup.py | Vanderbeck/example_pkg | 542ae9f8b7283b2984cf569ee040fdcfc8c9d732 | [
"MIT"
] | null | null | null | setup.py | Vanderbeck/example_pkg | 542ae9f8b7283b2984cf569ee040fdcfc8c9d732 | [
"MIT"
] | null | null | null | setup.py | Vanderbeck/example_pkg | 542ae9f8b7283b2984cf569ee040fdcfc8c9d732 | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="example-pkg-vanderbeck", # Replace with your own username
version="0.0.1",
author="Lindsay Vanderbeck",
author_email="lindsay.vanderbeck@live.ca",
description="A small ex... | 30.206897 | 70 | 0.646119 |
9346f4ae3f51e0598235db78c109cd4747e2c15f | 1,820 | py | Python | wiki-parse/node.py | mvwicky/wiki-parse | 1c19e1c771b9dc96cf77fdaa4009dbd97619cc72 | [
"MIT"
] | null | null | null | wiki-parse/node.py | mvwicky/wiki-parse | 1c19e1c771b9dc96cf77fdaa4009dbd97619cc72 | [
"MIT"
] | null | null | null | wiki-parse/node.py | mvwicky/wiki-parse | 1c19e1c771b9dc96cf77fdaa4009dbd97619cc72 | [
"MIT"
] | null | null | null | import os
import random
import sys
import time
from typing import ClassVar, List
from urllib.parse import urlsplit
import attr
from bs4 import BeautifulSoup
import requests
# Epsilon value
EPS = sys.float_info.epsilon
def req(url, verbose=False):
"""Make a request, sleeping for a random period of time afterwar... | 26.376812 | 76 | 0.626374 |
934773febc7f5decd256c9aba66a91ef1956f628 | 761 | py | Python | setup.py | shubhamjain/quick-grayscale | 470f726ec93224ffff57a3d7ba58fcf849fb4617 | [
"MIT"
] | 14 | 2018-11-26T01:32:21.000Z | 2021-11-09T11:04:34.000Z | setup.py | shubhamjain/quick-grayscale | 470f726ec93224ffff57a3d7ba58fcf849fb4617 | [
"MIT"
] | 1 | 2019-03-28T21:38:56.000Z | 2019-03-30T21:34:05.000Z | setup.py | shubhamjain/quick-grayscale | 470f726ec93224ffff57a3d7ba58fcf849fb4617 | [
"MIT"
] | 1 | 2018-12-05T01:10:55.000Z | 2018-12-05T01:10:55.000Z | """
This is a setup.py script generated by py2applet
Usage:
python setup.py py2app
"""
from setuptools import setup
APP = ["quick-gray.py"]
APP_NAME = "QuickGrayscale"
DATA_FILES = ["status-bar-logo.png", "status-bar-logo--dark.png"]
OPTIONS = {
"iconfile":"./assets/gq.icns",
"plist": {
"CFBundl... | 23.060606 | 65 | 0.634691 |
9347f07741dc686da69f70ff599f8901c2b855b9 | 1,074 | py | Python | src/unsupervised_class3/test_stochastic_tensor.py | JouniVatanen/NLP-and-Deep-Learning | 2fddcc2c39787713d33d17e80565de4ed073ca60 | [
"MIT"
] | 1 | 2020-05-24T06:55:31.000Z | 2020-05-24T06:55:31.000Z | Machine Learning/unsupervised_class3/test_stochastic_tensor.py | Ashleshk/Machine-Learning-Data-Science-Deep-Learning | 03357ab98155bf73b8f1d2fd53255cc16bea2333 | [
"MIT"
] | null | null | null | Machine Learning/unsupervised_class3/test_stochastic_tensor.py | Ashleshk/Machine-Learning-Data-Science-Deep-Learning | 03357ab98155bf73b8f1d2fd53255cc16bea2333 | [
"MIT"
] | 1 | 2020-03-16T13:11:14.000Z | 2020-03-16T13:11:14.000Z | # https://deeplearningcourses.com/c/deep-learning-gans-and-variational-autoencoders
# https://www.udemy.com/deep-learning-gans-and-variational-autoencoders
# a simple script to see what StochasticTensor outputs
from __future__ import print_function, division
from builtins import range
# Note: you may need to update yo... | 24.409091 | 83 | 0.746741 |
934a29b592905e47673af9f0dc927945ba059a11 | 3,809 | py | Python | osu/apiV1.py | LostPy/osu-api.py | 695146217c56b7fe414e1c07cd97260a728d96d9 | [
"MIT"
] | 1 | 2021-01-13T00:18:42.000Z | 2021-01-13T00:18:42.000Z | osu/apiV1.py | LostPy/osu-api.py | 695146217c56b7fe414e1c07cd97260a728d96d9 | [
"MIT"
] | null | null | null | osu/apiV1.py | LostPy/osu-api.py | 695146217c56b7fe414e1c07cd97260a728d96d9 | [
"MIT"
] | 1 | 2021-04-13T01:45:19.000Z | 2021-04-13T01:45:19.000Z | """
Description: A Python module to use easily the osu!api V1.
Author: LostPy
License: MIT
Date: 2021-01-11
"""
import requests as req
import json
from . import from_json
base_url ='https://osu.ppy.sh/api'
urls = {
'beatmaps': base_url + '/get_beatmaps?',
'user': base_url + '/get_user?',
'scores': base_url + '/get... | 30.96748 | 134 | 0.664479 |
934a5376ef2352c58f4fb9ed7be8a3b25bbe9a22 | 572 | py | Python | apps/show_plots.py | avdmitry/convnet | 4ae77c04e898643bb476e0604fab5682f23069d7 | [
"BSD-2-Clause"
] | 293 | 2015-01-01T12:23:24.000Z | 2022-03-28T19:34:17.000Z | apps/show_plots.py | weilaiyxj/convnet | 4ae77c04e898643bb476e0604fab5682f23069d7 | [
"BSD-2-Clause"
] | 16 | 2015-01-05T17:46:04.000Z | 2017-08-13T17:20:26.000Z | apps/show_plots.py | weilaiyxj/convnet | 4ae77c04e898643bb476e0604fab5682f23069d7 | [
"BSD-2-Clause"
] | 181 | 2015-01-04T18:06:45.000Z | 2021-07-30T05:37:36.000Z | import glob
import matplotlib.pyplot as plt
import numpy as np
import sys
plt.ion()
data_files = list(glob.glob(sys.argv[1]+'/mnist_net_*_train.log'))
valid_data_files = list(glob.glob(sys.argv[1]+'/mnist_net_*_valid.log'))
for fname in data_files:
data = np.loadtxt(fname).reshape(-1, 3)
name = fname.split('/')[... | 23.833333 | 72 | 0.676573 |
934b9553c57c50df3dbe6b024a339fd09db698e0 | 2,395 | py | Python | props/graph_representation/proposition.py | kshabahang/props | d3cc981f778185769b4dc2816aecaf66d21d0e91 | [
"MIT"
] | null | null | null | props/graph_representation/proposition.py | kshabahang/props | d3cc981f778185769b4dc2816aecaf66d21d0e91 | [
"MIT"
] | null | null | null | props/graph_representation/proposition.py | kshabahang/props | d3cc981f778185769b4dc2816aecaf66d21d0e91 | [
"MIT"
] | null | null | null | from props.dependency_tree.definitions import subject_dependencies, ARG_LABEL,\
object_dependencies, SOURCE_LABEL, domain_label, POSSESSED_LABEL,\
POSSESSOR_LABEL
mapPossessive = {"my":"I",
"your":"you",
"its":"it",
"her":"she",
"his":"he",
... | 33.263889 | 159 | 0.499791 |
934bd76a6819cffc22fcfcbe6e22970e2f898fc2 | 4,263 | py | Python | hello.py | olibob/pyflasktuto | b49c435340bfe4346c4a91d8041dbf81d890d7d8 | [
"MIT"
] | null | null | null | hello.py | olibob/pyflasktuto | b49c435340bfe4346c4a91d8041dbf81d890d7d8 | [
"MIT"
] | null | null | null | hello.py | olibob/pyflasktuto | b49c435340bfe4346c4a91d8041dbf81d890d7d8 | [
"MIT"
] | null | null | null | from flask import Flask, request, render_template, session, redirect, url_for, flash
from flask_script import Manager, Shell
from flask_bootstrap import Bootstrap
from flask_moment import Moment
from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField
from wtforms.validators import Required
from fla... | 32.052632 | 94 | 0.683087 |
934c2f4590fdde4bb9eb55db3bd4e1d99170a2a3 | 2,799 | py | Python | tap/tests/test_result.py | cans/tappy-pkg | d147b67fc0219e08a1d64a2cd3cd0c844fbc5ce5 | [
"BSD-2-Clause"
] | null | null | null | tap/tests/test_result.py | cans/tappy-pkg | d147b67fc0219e08a1d64a2cd3cd0c844fbc5ce5 | [
"BSD-2-Clause"
] | null | null | null | tap/tests/test_result.py | cans/tappy-pkg | d147b67fc0219e08a1d64a2cd3cd0c844fbc5ce5 | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2015, Matt Layman
import os
import unittest
from tap.runner import TAPTestResult
| 33.321429 | 76 | 0.629511 |
934da82fb900c36fd86daeb41307bafc6afe8b8f | 390 | py | Python | 1068.py | destinationunknown/CSES | 692b84ee8d52c5266dc1825e7d5447424cb93690 | [
"MIT"
] | 2 | 2021-06-22T03:33:45.000Z | 2021-09-29T18:19:40.000Z | 1068.py | destinationunknown/CSES | 692b84ee8d52c5266dc1825e7d5447424cb93690 | [
"MIT"
] | null | null | null | 1068.py | destinationunknown/CSES | 692b84ee8d52c5266dc1825e7d5447424cb93690 | [
"MIT"
] | 2 | 2020-08-04T18:11:53.000Z | 2021-07-12T10:12:15.000Z | # Weird Algorithm
# Consider an algorithm that takes as input a positive integer n. If n is even, the algorithm divides it by two, and if n is odd, the algorithm multiplies it by three and adds one. The algorithm repeats this, until n is one.
n = int(input())
print(n, end=" ")
while n != 1:
if n % 2 == 0:
... | 26 | 224 | 0.607692 |
934dcd3bfdb0c7406bd85e5c81f4e80b7bdbab85 | 5,868 | py | Python | benchmark.py | ceshine/small-file-benchmark | 70c8e1c7400e45c7d99e7f89e77d510efa23fbfd | [
"MIT"
] | null | null | null | benchmark.py | ceshine/small-file-benchmark | 70c8e1c7400e45c7d99e7f89e77d510efa23fbfd | [
"MIT"
] | null | null | null | benchmark.py | ceshine/small-file-benchmark | 70c8e1c7400e45c7d99e7f89e77d510efa23fbfd | [
"MIT"
] | null | null | null | """Simple Benchmark of Reading Small Files From Disk
Usage:
benchmark.py (-h | --help)
benchmark.py init COUNT
benchmark.py (create|test) (flat|two_level|four_level|memmap) [--size=<size>]
Arguments:
COUNT The number of files to be created. Supports scientific notation (e.g. 3e5).
Options:
-h --help ... | 30.092308 | 89 | 0.579925 |
934e7112faa4303ecb5d8b5fd5fd635de5c0afd2 | 568 | py | Python | openpype/hosts/hiero/plugins/publish/integrate_version_up_workfile.py | jonclothcat/OpenPype | d1208cbebc0a7f378de0062ccd653295c6399195 | [
"MIT"
] | 87 | 2021-05-07T08:40:46.000Z | 2022-03-19T00:36:25.000Z | openpype/hosts/hiero/plugins/publish/integrate_version_up_workfile.py | zafrs/OpenPype | 4b8e7e1ed002fc55b31307efdea70b0feaed474f | [
"MIT"
] | 1,019 | 2021-04-26T06:22:56.000Z | 2022-03-31T16:30:43.000Z | openpype/hosts/hiero/plugins/publish/integrate_version_up_workfile.py | zafrs/OpenPype | 4b8e7e1ed002fc55b31307efdea70b0feaed474f | [
"MIT"
] | 33 | 2021-04-29T12:35:54.000Z | 2022-03-25T14:48:42.000Z | from pyblish import api
import openpype.api as pype
| 23.666667 | 58 | 0.653169 |
93504f36933a876f5106f9d86389b60f787974d5 | 1,321 | py | Python | bots/oauthbot.py | Git-Good-Team/zoomapi | 7fa0f318b9753dc742c46da4d33248bf4a5fadf3 | [
"Apache-2.0"
] | null | null | null | bots/oauthbot.py | Git-Good-Team/zoomapi | 7fa0f318b9753dc742c46da4d33248bf4a5fadf3 | [
"Apache-2.0"
] | 2 | 2020-04-04T00:30:29.000Z | 2020-04-04T00:31:51.000Z | bots/oauthbot.py | Git-Good-Team/zoomapi | 7fa0f318b9753dc742c46da4d33248bf4a5fadf3 | [
"Apache-2.0"
] | null | null | null | import sys, os
filename = os.path.join(os.path.dirname(__file__), '..')
sys.path.insert(1, filename)
from zoomapi import OAuthZoomClient
import json
from configparser import ConfigParser
from pyngrok import ngrok
parser = ConfigParser()
parser.read("bots/bot.ini")
client_id = parser.get("OAuth", "client_id")
client_s... | 31.452381 | 84 | 0.72218 |
9352862472804182f6ff78dfa5acae79e4f0c5ce | 476 | py | Python | gist_set.py | devnoname120/gist-alfred | 5e918566254b6891241be3ad6e2f6c77959052ff | [
"MIT"
] | 113 | 2015-06-24T19:36:22.000Z | 2022-03-05T05:15:49.000Z | gist_set.py | devnoname120/gist-alfred | 5e918566254b6891241be3ad6e2f6c77959052ff | [
"MIT"
] | 18 | 2016-05-03T08:21:54.000Z | 2022-03-26T18:24:21.000Z | gist_set.py | devnoname120/gist-alfred | 5e918566254b6891241be3ad6e2f6c77959052ff | [
"MIT"
] | 13 | 2015-07-02T03:16:04.000Z | 2022-03-15T10:42:38.000Z | #!/usr/bin/python
# encoding: utf-8
from collections import Counter
from gist import create_workflow
from pprint import pprint as pp
import sys
import workflow
from workflow import Workflow, web
from workflow.background import run_in_background, is_running
if __name__ == '__main__':
wf = create_workflow()
s... | 21.636364 | 74 | 0.735294 |
9357d0df25d16453f003333896fffe2c6ffc814d | 2,699 | py | Python | class_12/strategies/fixed_trade_price_strategy.py | taoranalex/course_codes | 75f76e61f560fb51e7db7bb3edbefaeaf01ead7e | [
"MIT"
] | 121 | 2020-12-12T02:21:21.000Z | 2022-03-29T06:43:42.000Z | class_12/strategies/fixed_trade_price_strategy.py | taoranalex/course_codes | 75f76e61f560fb51e7db7bb3edbefaeaf01ead7e | [
"MIT"
] | null | null | null | class_12/strategies/fixed_trade_price_strategy.py | taoranalex/course_codes | 75f76e61f560fb51e7db7bb3edbefaeaf01ead7e | [
"MIT"
] | 80 | 2020-12-20T09:41:46.000Z | 2022-03-22T10:00:16.000Z | from howtrader.app.cta_strategy import (
CtaTemplate,
StopOrder,
TickData,
BarData,
TradeData,
OrderData,
BarGenerator,
ArrayManager
)
from howtrader.trader.constant import Interval
from datetime import datetime
from howtrader.app.cta_strategy.engine import CtaEngine, EngineType
import ... | 24.761468 | 94 | 0.600963 |
9358a1bd65251378efa84d7f25d1fc162739f57e | 102 | py | Python | 3429.py | ssd352/quera-solutions | 7c7b572a26c3c1648f23528bcc661dec18b44943 | [
"MIT"
] | 1 | 2020-03-16T21:13:14.000Z | 2020-03-16T21:13:14.000Z | 3429.py | ssd352/quera-solutions | 7c7b572a26c3c1648f23528bcc661dec18b44943 | [
"MIT"
] | null | null | null | 3429.py | ssd352/quera-solutions | 7c7b572a26c3c1648f23528bcc661dec18b44943 | [
"MIT"
] | 2 | 2020-03-27T18:40:40.000Z | 2020-07-30T14:59:55.000Z | T = int(input())
if T > 100:
print('Steam')
elif T < 0:
print('Ice')
else:
print('Water')
| 12.75 | 18 | 0.519608 |
9358d7fabdaa2250dc44f570309b7f9d32d9b186 | 159 | py | Python | settings_template.py | WHOIGit/wip-comms-ifcb-imagedb | fa0fd9743e74d483e89cbd249519c8f70a1859d9 | [
"MIT"
] | null | null | null | settings_template.py | WHOIGit/wip-comms-ifcb-imagedb | fa0fd9743e74d483e89cbd249519c8f70a1859d9 | [
"MIT"
] | 1 | 2018-11-01T20:16:28.000Z | 2018-11-01T20:21:29.000Z | settings_template.py | WHOIGit/wip-comms-ifcb-imagedb | fa0fd9743e74d483e89cbd249519c8f70a1859d9 | [
"MIT"
] | null | null | null | PSQL_CONNECTION_PARAMS = {
'dbname': 'ifcb',
'user': '******',
'password': '******',
'host': '/var/run/postgresql/'
}
DATA_DIR = '/mnt/ifcb'
| 17.666667 | 34 | 0.496855 |
935a6e37fb1d18808927d59317499615e6e1d729 | 15,702 | py | Python | src/trainer.py | tpimentelms/neural-transducer | 6c99b0919aa84559b2c3aa970651f7d9696131e8 | [
"MIT"
] | null | null | null | src/trainer.py | tpimentelms/neural-transducer | 6c99b0919aa84559b2c3aa970651f7d9696131e8 | [
"MIT"
] | null | null | null | src/trainer.py | tpimentelms/neural-transducer | 6c99b0919aa84559b2c3aa970651f7d9696131e8 | [
"MIT"
] | null | null | null | import argparse
import glob
import os
import random
import re
from dataclasses import dataclass
from functools import partial
from math import ceil
from typing import List, Optional
import numpy as np
import torch
from torch.optim.lr_scheduler import ReduceLROnPlateau
from tqdm import tqdm
import util
tqdm.monitor_i... | 39.852792 | 136 | 0.606483 |
935c2fa61554e13fc7833d382f5ef594996fe9fc | 780 | py | Python | tools/opencv.py | michaelpdu/pytorch-CycleGAN-and-pix2pix | 7e7aa3fed935644f92c0e15f7de80ce0971bf510 | [
"BSD-3-Clause"
] | null | null | null | tools/opencv.py | michaelpdu/pytorch-CycleGAN-and-pix2pix | 7e7aa3fed935644f92c0e15f7de80ce0971bf510 | [
"BSD-3-Clause"
] | null | null | null | tools/opencv.py | michaelpdu/pytorch-CycleGAN-and-pix2pix | 7e7aa3fed935644f92c0e15f7de80ce0971bf510 | [
"BSD-3-Clause"
] | null | null | null | import cv2
import argparse
import numpy as np
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Command Usages of ImageHelper')
parser.add_argument("-i", "--input", type=str, help="input image dir")
parser.add_argument("-o", "--output", type=str, help="output image dir")
args = p... | 33.913043 | 81 | 0.680769 |
935c7d03b817d9b2ac9b204299f3a0bbc0e80536 | 2,354 | py | Python | UMS/views.py | rawheel/Django-User-Management-System | e5b14d2422fe5c5ea0359ded24ad229af1510050 | [
"MIT"
] | 2 | 2021-03-18T06:27:05.000Z | 2021-03-18T10:21:41.000Z | UMS/views.py | rawheel/Django-User-Management-System | e5b14d2422fe5c5ea0359ded24ad229af1510050 | [
"MIT"
] | null | null | null | UMS/views.py | rawheel/Django-User-Management-System | e5b14d2422fe5c5ea0359ded24ad229af1510050 | [
"MIT"
] | null | null | null | from django.shortcuts import render,redirect
from .forms import UserForm,RoleForm,RightsForm
from .models import UserTable,UserRole,UserRights | 31.810811 | 170 | 0.607901 |
935e4e7c33e3cd032008f714cbcd252ea376fad9 | 99 | py | Python | game/entities/ship.py | alucardzom/pyxeltron | 314e5e4801c412c9a68cc49fa3c8977bf8f6366d | [
"MIT"
] | 1 | 2021-11-11T03:04:07.000Z | 2021-11-11T03:04:07.000Z | game/entities/ship.py | truizsanchez/pyxeltron | a219b7ef250517fee15ab39ac63b82f2752e875e | [
"MIT"
] | null | null | null | game/entities/ship.py | truizsanchez/pyxeltron | a219b7ef250517fee15ab39ac63b82f2752e875e | [
"MIT"
] | 1 | 2021-08-15T17:47:54.000Z | 2021-08-15T17:47:54.000Z | from engine.entities.base import BaseEntity
| 14.142857 | 43 | 0.707071 |
935e6905b97081210e7bed7902277443d7f5464d | 3,201 | py | Python | tunacell/plotting/defs.py | HuggyHugMe/tunacell | 5a7a7a58bbb557098d6638e896aa784ecc37d639 | [
"MIT"
] | null | null | null | tunacell/plotting/defs.py | HuggyHugMe/tunacell | 5a7a7a58bbb557098d6638e896aa784ecc37d639 | [
"MIT"
] | 3 | 2017-08-10T11:19:01.000Z | 2019-08-11T11:11:00.000Z | tunacell/plotting/defs.py | HuggyHugMe/tunacell | 5a7a7a58bbb557098d6638e896aa784ecc37d639 | [
"MIT"
] | 5 | 2017-08-08T22:31:24.000Z | 2021-08-06T04:08:08.000Z | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
tunacell package
============
plotting/defs.py module
~~~~~~~~~~~~~~~~~~~~~~~~~~~
"""
DEFAULT_COLORS = ('red', 'blue', 'purple', 'green', 'yellowgreen', 'cyan',
'magenta',
'indigo', 'darkorange', 'pink', 'yellow')
colors = DEFAULT_... | 31.693069 | 74 | 0.219931 |
935ef32a8b82613d0863e4ef3259b0459d1157b4 | 7,109 | py | Python | scripts/ilqr/iLQR.py | leoking99-BIT/Constrained_ILQR | 08346c0aa9eeb035ae6e3d6643ac9c119cb893d2 | [
"Apache-2.0"
] | 42 | 2020-03-06T08:19:38.000Z | 2022-03-26T16:36:00.000Z | scripts/ilqr/iLQR.py | leoking99-BIT/Constrained_ILQR | 08346c0aa9eeb035ae6e3d6643ac9c119cb893d2 | [
"Apache-2.0"
] | 1 | 2022-01-10T12:59:04.000Z | 2022-02-01T00:43:52.000Z | scripts/ilqr/iLQR.py | mengxingshifen1218/Constrained_ILQR | 08346c0aa9eeb035ae6e3d6643ac9c119cb893d2 | [
"Apache-2.0"
] | 16 | 2020-08-17T08:32:51.000Z | 2022-02-10T14:49:00.000Z | import math
import numpy as np
import matplotlib.pyplot as plt
import scipy.integrate as integrate
import pdb
import sys
from ilqr.vehicle_model import Model
from ilqr.local_planner import LocalPlanner
from ilqr.constraints import Constraints
| 40.163842 | 124 | 0.573639 |
935fa4a7ed04d049f63c5a737cdba5df5fb7e88c | 25 | py | Python | src/engines/train/__init__.py | cr3ux53c/DenseNet-Tensorflow2 | 208143bf4086c407e524e01cd945fd3b0741b48d | [
"MIT"
] | 60 | 2020-07-08T02:39:06.000Z | 2022-03-28T14:26:34.000Z | src/engines/train/__init__.py | cr3ux53c/DenseNet-Tensorflow2 | 208143bf4086c407e524e01cd945fd3b0741b48d | [
"MIT"
] | 28 | 2019-08-13T22:20:46.000Z | 2020-02-17T19:27:32.000Z | src/engines/train/__init__.py | cr3ux53c/DenseNet-Tensorflow2 | 208143bf4086c407e524e01cd945fd3b0741b48d | [
"MIT"
] | 18 | 2020-08-26T02:06:32.000Z | 2022-03-22T03:04:40.000Z | from .train import train
| 12.5 | 24 | 0.8 |
93625b79b6238b332e1234a333a23eb72571d1f2 | 4,034 | py | Python | tordatahub/tests/create_topics.py | jasonz93/python-tordatahub | 3a9a497d5a0bebf915d7e24049dd8b06099e3c04 | [
"Apache-2.0"
] | null | null | null | tordatahub/tests/create_topics.py | jasonz93/python-tordatahub | 3a9a497d5a0bebf915d7e24049dd8b06099e3c04 | [
"Apache-2.0"
] | null | null | null | tordatahub/tests/create_topics.py | jasonz93/python-tordatahub | 3a9a497d5a0bebf915d7e24049dd8b06099e3c04 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License... | 45.840909 | 231 | 0.645513 |
9364fa85414e75b8108245e512d4d8a8d1ad59d1 | 494 | py | Python | config.py | didim99/FlaskLearning | 66d9de3729d372ec548ffbaaaff1d50797467361 | [
"MIT"
] | null | null | null | config.py | didim99/FlaskLearning | 66d9de3729d372ec548ffbaaaff1d50797467361 | [
"MIT"
] | null | null | null | config.py | didim99/FlaskLearning | 66d9de3729d372ec548ffbaaaff1d50797467361 | [
"MIT"
] | null | null | null | import os
from dotenv import load_dotenv
basedir = os.path.abspath(os.path.dirname(__file__))
load_dotenv(os.path.join(basedir, '.env'))
| 27.444444 | 78 | 0.643725 |
93699c5951eeec7f3f3c9e322a78230d739bef03 | 38,153 | py | Python | index_builder/topic_model.py | Klamann/search-index-builder | 86c0b48a70871085966a91e75cd97c6862f8e988 | [
"Apache-2.0"
] | null | null | null | index_builder/topic_model.py | Klamann/search-index-builder | 86c0b48a70871085966a91e75cd97c6862f8e988 | [
"Apache-2.0"
] | null | null | null | index_builder/topic_model.py | Klamann/search-index-builder | 86c0b48a70871085966a91e75cd97c6862f8e988 | [
"Apache-2.0"
] | null | null | null | import argparse
import itertools
import json
import logging
import os
import pickle
import time
import warnings
from collections import Counter, defaultdict
from typing import Dict, Any, List, Iterable, Tuple, Set
warnings.filterwarnings(action='ignore', category=UserWarning, module='gensim')
import langdetect
import... | 53.964639 | 140 | 0.627919 |
936b0f95e7f3ca1f6eafc51508f66b72158c5fa4 | 1,247 | py | Python | python/misc/switcharoo.py | christopher-burke/warmups | 140c96ada87ec5e9faa4622504ddee18840dce4a | [
"MIT"
] | null | null | null | python/misc/switcharoo.py | christopher-burke/warmups | 140c96ada87ec5e9faa4622504ddee18840dce4a | [
"MIT"
] | 2 | 2022-03-10T03:49:14.000Z | 2022-03-14T00:49:54.000Z | python/misc/switcharoo.py | christopher-burke/warmups | 140c96ada87ec5e9faa4622504ddee18840dce4a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Switcharoo.
Create a function that takes a string and returns a new string with its
first and last characters swapped, except under three conditions:
If the length of the string is less than two, return "Incompatible.".
If the argument is not a string, return "Incompatible.".
If the first a... | 31.175 | 75 | 0.655172 |
936be3218f3e880a40b9ff8cc02572fc2dea5387 | 2,212 | py | Python | external/unbound/libunbound/python/examples/async-lookup.py | simplixcurrency/simplix | dd313f6fe5a42cf508b19aea3f49cb8ba6b5dbf1 | [
"BSD-3-Clause"
] | 1,751 | 2016-11-03T18:25:34.000Z | 2022-03-30T17:43:26.000Z | external/unbound/libunbound/python/examples/async-lookup.py | simplixcurrency/simplix | dd313f6fe5a42cf508b19aea3f49cb8ba6b5dbf1 | [
"BSD-3-Clause"
] | 603 | 2017-03-03T19:51:58.000Z | 2022-03-31T12:56:58.000Z | external/unbound/libunbound/python/examples/async-lookup.py | simplixcurrency/simplix | dd313f6fe5a42cf508b19aea3f49cb8ba6b5dbf1 | [
"BSD-3-Clause"
] | 296 | 2016-11-14T07:00:11.000Z | 2022-03-29T00:56:58.000Z | #!/usr/bin/python
'''
async-lookup.py : This example shows how to use asynchronous lookups
Authors: Zdenek Vasicek (vasicek AT fit.vutbr.cz)
Marek Vavrusa (xvavru00 AT stud.fit.vutbr.cz)
Copyright (c) 2008. All rights reserved.
This software is open source.
Redistribution and use in source and bina... | 38.137931 | 110 | 0.758137 |
936be74b5161c4ea335dcc47745288106a326b76 | 244 | py | Python | 1/one.py | TheFrederick-git/adventofcode2021 | a320f3bba2655afab1aad8bf2520ccb705b2fd1e | [
"MIT"
] | null | null | null | 1/one.py | TheFrederick-git/adventofcode2021 | a320f3bba2655afab1aad8bf2520ccb705b2fd1e | [
"MIT"
] | null | null | null | 1/one.py | TheFrederick-git/adventofcode2021 | a320f3bba2655afab1aad8bf2520ccb705b2fd1e | [
"MIT"
] | null | null | null | """1/1 adventofcode"""
with open("input.txt", "r", encoding="UTF-8") as i_file:
data = list(map(int, i_file.read().splitlines()))
values = ["i" if data[i] > data[i - 1] else "d" for i in range(1, len(data))]
print(values.count("i"))
| 34.857143 | 78 | 0.598361 |
936c4abf26bcf5aae9aaddd431b1ecdde9736568 | 3,345 | py | Python | fcsgg/modeling/backbone/resnet.py | liuhengyue/fcsgg | 826c6e194270461a66ca5d048cb67f1ccf7ef387 | [
"MIT"
] | 9 | 2022-01-17T03:27:46.000Z | 2022-03-26T09:35:59.000Z | fcsgg/modeling/backbone/resnet.py | liuhengyue/fcsgg | 826c6e194270461a66ca5d048cb67f1ccf7ef387 | [
"MIT"
] | 3 | 2022-01-26T03:28:18.000Z | 2022-02-03T04:19:29.000Z | fcsgg/modeling/backbone/resnet.py | liuhengyue/fcsgg | 826c6e194270461a66ca5d048cb67f1ccf7ef387 | [
"MIT"
] | null | null | null | """
Simple ResNet FPN that only outputs p2.
Modified from https://github.com/HRNet/Higher-HRNet-Human-Pose-Estimation/blob/master/lib/models/pose_higher_hrnet.py
"""
__author__ = "Hengyue Liu"
__copyright__ = "Copyright (c) 2021 Futurewei Inc."
__credits__ = []
__license__ = "MIT License"
__version__ = "0.1"
__maintai... | 39.352941 | 117 | 0.6571 |
936c5a70ec50a4830edce31139219ee55e7967af | 198 | py | Python | musicdb/__init__.py | ieuan-jones/musicdb | e894614cb70881eca810d97f7362a68398c3c3b0 | [
"BSD-3-Clause"
] | null | null | null | musicdb/__init__.py | ieuan-jones/musicdb | e894614cb70881eca810d97f7362a68398c3c3b0 | [
"BSD-3-Clause"
] | null | null | null | musicdb/__init__.py | ieuan-jones/musicdb | e894614cb70881eca810d97f7362a68398c3c3b0 | [
"BSD-3-Clause"
] | null | null | null | import os
from flask import Flask
| 16.5 | 56 | 0.732323 |
936f55fdfaa40d9286b2780e20a668166b6fc40f | 273 | py | Python | backfill/save_to_gcs.py | grollins/quandl-gcp-pipeline | 1b6c247fb3ad1ee33bd3cf363d119c124b8e26b2 | [
"MIT"
] | null | null | null | backfill/save_to_gcs.py | grollins/quandl-gcp-pipeline | 1b6c247fb3ad1ee33bd3cf363d119c124b8e26b2 | [
"MIT"
] | null | null | null | backfill/save_to_gcs.py | grollins/quandl-gcp-pipeline | 1b6c247fb3ad1ee33bd3cf363d119c124b8e26b2 | [
"MIT"
] | null | null | null | from google.cloud import storage
GCS_CLIENT = storage.Client()
GCS_BUCKET = GCS_CLIENT.get_bucket('senpai-io.appspot.com')
path = 'quandl-stage/backfill_data_jan2015_mar2018.csv'
blob = GCS_BUCKET.blob(path)
blob.upload_from_filename(filename='data_jan2015_mar2018.csv')
| 30.333333 | 62 | 0.81685 |
93700816a23a94674ae0ee1adf228796c45d26ba | 740 | py | Python | CMS/test/mocks/search_mocks.py | office-for-students/wagtail-CMS | 98789c279edf48f2bbedb5415437da3317f0e12b | [
"MIT"
] | 4 | 2019-06-04T07:18:44.000Z | 2020-06-15T22:27:36.000Z | CMS/test/mocks/search_mocks.py | office-for-students/wagtail-CMS | 98789c279edf48f2bbedb5415437da3317f0e12b | [
"MIT"
] | 38 | 2019-05-09T13:14:56.000Z | 2022-03-12T00:54:57.000Z | CMS/test/mocks/search_mocks.py | office-for-students/wagtail-CMS | 98789c279edf48f2bbedb5415437da3317f0e12b | [
"MIT"
] | 3 | 2019-09-26T14:32:36.000Z | 2021-05-06T15:48:01.000Z | import json
from requests.models import Response
from http import HTTPStatus
from CMS.test.mocks.search_mocks_content import content
| 27.407407 | 89 | 0.714865 |
9370464ed328cc5d44014a45d60a36057d95bbda | 1,818 | py | Python | code/hw2/performance.py | edrebin/NLP-Course | 004af059e4a48b9086dc122d32c864799f1f16f1 | [
"Apache-2.0"
] | 9 | 2021-08-29T15:23:09.000Z | 2022-01-09T20:13:39.000Z | code/hw2/performance.py | edrebin/NLP-Course | 004af059e4a48b9086dc122d32c864799f1f16f1 | [
"Apache-2.0"
] | 1 | 2022-03-08T11:05:29.000Z | 2022-03-08T13:48:32.000Z | code/hw2/performance.py | edrebin/NLP-Course | 004af059e4a48b9086dc122d32c864799f1f16f1 | [
"Apache-2.0"
] | 2 | 2021-12-12T22:11:44.000Z | 2022-01-26T03:55:56.000Z | import numpy as np
from spacy.pipeline.sentencizer import Sentencizer
from glob import glob
from spacy.lang.en import English
if __name__ == "__main__":
from hw2 import ColgateSBD
from glob import glob
from spacy.lang.en import English
output = performance(ColgateSBD())
for input, perf, n_sent ... | 31.344828 | 95 | 0.608361 |
93706b196b7d6d2ef7011340df5c93edb90333c5 | 6,893 | py | Python | phonebook02/contact.py | pgThiago/saving-in-txt-python | dda28fb3c8033eb16650e630a579bc66e475465f | [
"MIT"
] | 1 | 2020-08-15T23:22:44.000Z | 2020-08-15T23:22:44.000Z | phonebook02/contact.py | pgThiago/saving-in-txt-python | dda28fb3c8033eb16650e630a579bc66e475465f | [
"MIT"
] | null | null | null | phonebook02/contact.py | pgThiago/saving-in-txt-python | dda28fb3c8033eb16650e630a579bc66e475465f | [
"MIT"
] | null | null | null | from os import path
from operator import itemgetter
from time import sleep
| 38.943503 | 123 | 0.526041 |
93717d5c39265a03944d975e47f65b92a746680b | 84 | py | Python | src/vpnchooser/__init__.py | cbrand/vpnchooser | 0982baeb14eff1e0b7ef5dbc8f11b3a7213f341c | [
"MIT"
] | null | null | null | src/vpnchooser/__init__.py | cbrand/vpnchooser | 0982baeb14eff1e0b7ef5dbc8f11b3a7213f341c | [
"MIT"
] | null | null | null | src/vpnchooser/__init__.py | cbrand/vpnchooser | 0982baeb14eff1e0b7ef5dbc8f11b3a7213f341c | [
"MIT"
] | 1 | 2016-05-31T16:14:37.000Z | 2016-05-31T16:14:37.000Z | # -*- encoding: utf-8 -*-
from .applicaton import app, api
from . import resources
| 16.8 | 32 | 0.678571 |
9371f372d231442d071f230b9b470e2409d71503 | 3,157 | py | Python | scripts/pughpore/passagetime-simple.py | jhwnkim/nanopores | 98b3dbb5d36464fbdc03f59d224d38e4255324ce | [
"MIT"
] | 8 | 2016-09-07T01:59:31.000Z | 2021-03-06T12:14:31.000Z | scripts/pughpore/passagetime-simple.py | jhwnkim/nanopores | 98b3dbb5d36464fbdc03f59d224d38e4255324ce | [
"MIT"
] | null | null | null | scripts/pughpore/passagetime-simple.py | jhwnkim/nanopores | 98b3dbb5d36464fbdc03f59d224d38e4255324ce | [
"MIT"
] | 4 | 2017-12-06T17:43:01.000Z | 2020-05-01T05:41:14.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
# (c) 2017 Gregor Mitscha-Baude
# TODO: obtain rD from actual simulation
from nanopores import fields, kT, eta, qq, savefigs
from numpy import exp, pi, sqrt, linspace, diff, array, dot
L = 46e-9 # length of pore
r = 2.0779e-9 # radius of protein trypsin... | 25.877049 | 74 | 0.596136 |
9372415bb53340040af72936577c024343d4574e | 15,605 | py | Python | IMU_algorithms/record_data.py | nesl/UnderwaterSensorTag | c0bf499b4bd7588d74bb2a0228f077d1fc38e7f5 | [
"BSD-3-Clause"
] | null | null | null | IMU_algorithms/record_data.py | nesl/UnderwaterSensorTag | c0bf499b4bd7588d74bb2a0228f077d1fc38e7f5 | [
"BSD-3-Clause"
] | null | null | null | IMU_algorithms/record_data.py | nesl/UnderwaterSensorTag | c0bf499b4bd7588d74bb2a0228f077d1fc38e7f5 | [
"BSD-3-Clause"
] | 1 | 2019-03-01T00:48:59.000Z | 2019-03-01T00:48:59.000Z | from modules.mpulib import computeheading, attitudefromCompassGravity, RP_calculate, MadgwickQuaternionUpdate, Euler2Quat, quaternion_to_euler_angle, MPU9250_computeEuler
import socket, traceback
import csv
import struct
import sys, time, string, pygame
import pygame
import pygame.draw
import pygame.time
import numpy ... | 20.890228 | 228 | 0.614418 |
9373256a577124b3122a3c2bb32ac8963415c16e | 5,229 | py | Python | rest_api/views/doc_users.py | AktanKasymaliev/django_MyDentKg_backend | ede10d33028d36035b22e1e1dec916d773fecff6 | [
"MIT"
] | null | null | null | rest_api/views/doc_users.py | AktanKasymaliev/django_MyDentKg_backend | ede10d33028d36035b22e1e1dec916d773fecff6 | [
"MIT"
] | null | null | null | rest_api/views/doc_users.py | AktanKasymaliev/django_MyDentKg_backend | ede10d33028d36035b22e1e1dec916d773fecff6 | [
"MIT"
] | null | null | null | from rest_framework import generics
from rest_framework import response
from rest_framework.permissions import AllowAny, IsAuthenticated
from rest_framework.views import APIView
from rest_api.serializers.doc_serializers import (DoctorRegisterSerializer,
DoctorUsersSerializer, DoctorLoginSerializer, Doct... | 43.214876 | 126 | 0.673934 |
937335c45d766563fe6c185b76d6ad2c9b3fea7a | 652 | py | Python | examples/plots/plot_quaternion_integrate.py | Mateus224/pytransform3d-1 | 26f1d39c5fa5f5c400fdabc7e58f645c7a35bee5 | [
"BSD-3-Clause"
] | null | null | null | examples/plots/plot_quaternion_integrate.py | Mateus224/pytransform3d-1 | 26f1d39c5fa5f5c400fdabc7e58f645c7a35bee5 | [
"BSD-3-Clause"
] | null | null | null | examples/plots/plot_quaternion_integrate.py | Mateus224/pytransform3d-1 | 26f1d39c5fa5f5c400fdabc7e58f645c7a35bee5 | [
"BSD-3-Clause"
] | null | null | null | """
======================
Quaternion Integration
======================
Integrate angular velocities to a sequence of quaternions.
"""
import numpy as np
import matplotlib.pyplot as plt
from pytransform3d.rotations import quaternion_integrate, matrix_from_quaternion, plot_basis
angular_velocities = np.empty((21, 3)... | 27.166667 | 92 | 0.654908 |
9373d6bbb7c1cbcacd636bf497c2f411b745ae3a | 188 | py | Python | 8kyu/Beginner Series #2 Clock.py | walkgo/codewars_tasks | 4c0ab6f0e1d2181318fc15b12dd55ef565ecd223 | [
"MIT"
] | null | null | null | 8kyu/Beginner Series #2 Clock.py | walkgo/codewars_tasks | 4c0ab6f0e1d2181318fc15b12dd55ef565ecd223 | [
"MIT"
] | null | null | null | 8kyu/Beginner Series #2 Clock.py | walkgo/codewars_tasks | 4c0ab6f0e1d2181318fc15b12dd55ef565ecd223 | [
"MIT"
] | null | null | null |
# Best Practices | 18.8 | 37 | 0.537234 |
93753504d8f288b3efbdb0fba48e17b67530926a | 1,071 | py | Python | examples/experimental/gmsh_api_test.py | Karl-Eriksson/calfem-python | e9a88a85d3a73877ec99f7fbd1a296a44c3c9b22 | [
"MIT"
] | 54 | 2016-04-11T19:12:13.000Z | 2022-02-22T07:15:39.000Z | examples/experimental/gmsh_api_test.py | Karl-Eriksson/calfem-python | e9a88a85d3a73877ec99f7fbd1a296a44c3c9b22 | [
"MIT"
] | 13 | 2019-07-01T19:48:38.000Z | 2022-02-11T12:50:02.000Z | examples/experimental/gmsh_api_test.py | Karl-Eriksson/calfem-python | e9a88a85d3a73877ec99f7fbd1a296a44c3c9b22 | [
"MIT"
] | 273 | 2017-08-01T10:29:09.000Z | 2022-02-16T14:02:36.000Z | import gmsh
import sys
import numpy as np
import calfem.mesh as cfm
import calfem.vis_mpl as cfv
if __name__ == "__main__":
gmsh.initialize(sys.argv)
gmsh.model.add("t1")
gmsh.model.geo.add_point(0.0, 0.0, 0.0)
gmsh.model.geo.add_point(1.0, 0.0, 0.0)
gmsh.model.geo.add_point(1.0, 1.0, 0.0)
gm... | 23.282609 | 56 | 0.660131 |
9376046268e91238a8435a22fb73b4a25cba7b36 | 1,495 | py | Python | bandera.py | lauralardies/recursividad | 940e4c5fb1da00a88f955624409e4dc49150717d | [
"Apache-2.0"
] | null | null | null | bandera.py | lauralardies/recursividad | 940e4c5fb1da00a88f955624409e4dc49150717d | [
"Apache-2.0"
] | null | null | null | bandera.py | lauralardies/recursividad | 940e4c5fb1da00a88f955624409e4dc49150717d | [
"Apache-2.0"
] | null | null | null | # En este problema vamos a resolver el problema de la bandera de Dijkstra.
# Tenemos una fila de fichas que cada una puede ser de un nico color: roja, verde o azul. Estn colocadas en un orden cualquiera
# y tenemos que ordenarlas de manera que quede, de izquierda a derecha, los colores ordenados primero en rojo, luego... | 38.333333 | 129 | 0.650167 |
9378f025d68dbd651d584bdfea07d35e9c5e3bf2 | 1,860 | py | Python | src/tests/test_download.py | dschon/rcp2 | b8a666d6a108c006aa1624944172af1f77bc0383 | [
"MIT"
] | 10 | 2019-02-22T03:48:16.000Z | 2022-02-06T00:23:53.000Z | src/tests/test_download.py | dschon/rcp2 | b8a666d6a108c006aa1624944172af1f77bc0383 | [
"MIT"
] | 82 | 2019-02-19T20:28:00.000Z | 2022-03-20T16:55:45.000Z | src/tests/test_download.py | dschon/rcp2 | b8a666d6a108c006aa1624944172af1f77bc0383 | [
"MIT"
] | 30 | 2019-02-18T17:25:31.000Z | 2022-01-22T14:38:29.000Z | import pytest
import responses
from src.data import download
def declare_action(fname, action, pooch):
"""Declare the download action taken.
This function helps us know if ``src.data.download.fetch`` downloaded a
missing file, fetched an available file, or updated on old file.
Args:
... | 31.525424 | 85 | 0.67957 |
937962d2ebcdc2a6b9460ca91cb7e76e7ac6b49e | 1,434 | py | Python | what.py | manastech/de-bee | 32d4084b7d765b2766a7b8b947e896bb6f81beb9 | [
"MIT"
] | 1 | 2015-07-30T07:37:20.000Z | 2015-07-30T07:37:20.000Z | what.py | manastech/de-bee | 32d4084b7d765b2766a7b8b947e896bb6f81beb9 | [
"MIT"
] | null | null | null | what.py | manastech/de-bee | 32d4084b7d765b2766a7b8b947e896bb6f81beb9 | [
"MIT"
] | null | null | null | from google.appengine.ext import webapp
from wsgiref.handlers import CGIHandler
from model import Membership
from model import Group
from model import Transaction
| 30.510638 | 93 | 0.535565 |
937c9982a5f43646604b5753ad9ccca9aeb1f6d9 | 1,191 | py | Python | semana_02/desafios/python-6/main.py | alexaldr/AceleraDev-Python | f655b31f5d672f617c43282dc91a19f761845f84 | [
"MIT"
] | null | null | null | semana_02/desafios/python-6/main.py | alexaldr/AceleraDev-Python | f655b31f5d672f617c43282dc91a19f761845f84 | [
"MIT"
] | 23 | 2021-03-19T04:59:51.000Z | 2022-02-10T15:15:12.000Z | semana_02/desafios/python-6/main.py | alexaldr/AceleraDev-Python | f655b31f5d672f617c43282dc91a19f761845f84 | [
"MIT"
] | null | null | null | from abc import ABCMeta, abstractmethod
| 22.903846 | 71 | 0.622166 |
937e0e4be5d04ed65cc13c12fe0380f70dc970f4 | 3,130 | py | Python | train.py | JackwithWilshere/FashionAI- | 9a7a30aa12035418c835cdb4e05641cdb7a456b3 | [
"MIT"
] | 5 | 2019-04-03T07:32:39.000Z | 2021-12-23T06:48:27.000Z | train.py | espectre/FashionAI | 9a7a30aa12035418c835cdb4e05641cdb7a456b3 | [
"MIT"
] | null | null | null | train.py | espectre/FashionAI | 9a7a30aa12035418c835cdb4e05641cdb7a456b3 | [
"MIT"
] | 4 | 2019-01-29T01:33:13.000Z | 2021-05-13T10:24:31.000Z | import torch
import torch.nn as nn
import torch.optim as optim
import torchvision.transforms as transforms
import os
from torch.autograd import Variable
import argparse
import numpy as np
from torch.optim.lr_scheduler import *
from model.resnet import resnet101
from data_pre.FashionAI import fashion
pa... | 32.947368 | 138 | 0.741534 |
937e540fc45ceb0533afb18ba69d5a86a510db61 | 7,363 | py | Python | Salami/Player.py | markjoshua12/game-jam-2020 | 846dd052d649a609ab7a52ac0f4dcbeb71781c3b | [
"MIT"
] | 15 | 2020-04-17T12:02:14.000Z | 2022-03-16T03:01:34.000Z | Salami/Player.py | markjoshua12/game-jam-2020 | 846dd052d649a609ab7a52ac0f4dcbeb71781c3b | [
"MIT"
] | 9 | 2020-04-25T01:57:16.000Z | 2020-04-29T11:42:34.000Z | Salami/Player.py | markjoshua12/game-jam-2020 | 846dd052d649a609ab7a52ac0f4dcbeb71781c3b | [
"MIT"
] | 55 | 2020-04-17T12:01:11.000Z | 2021-12-28T10:14:02.000Z |
import arcade
import math
import LevelGenerator
import Textures
import Sounds
from Constants import TILE_SIZE, ROOM_WIDTH, ROOM_HEIGHT
from Mob import Mob
from Projectile import Projectile | 34.568075 | 108 | 0.561184 |
938003c63346f324cd22abdc408302c529c5d8bc | 5,127 | py | Python | app/main/forms/direct_award_forms.py | pocketstefan/digitalmarketplace-buyer-frontend | f4d27f03d5f3accb29eaa61e5ec8d9e5eb60c306 | [
"MIT"
] | null | null | null | app/main/forms/direct_award_forms.py | pocketstefan/digitalmarketplace-buyer-frontend | f4d27f03d5f3accb29eaa61e5ec8d9e5eb60c306 | [
"MIT"
] | null | null | null | app/main/forms/direct_award_forms.py | pocketstefan/digitalmarketplace-buyer-frontend | f4d27f03d5f3accb29eaa61e5ec8d9e5eb60c306 | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from wtforms.validators import DataRequired, Length, NumberRange, InputRequired, ValidationError
from dmutils.forms.fields import (
DMBooleanField,
DMDateField,
DMPoundsField,
DMStripWhitespaceStringField,
DMRadioField,
)
from dmutils.forms.validators import Greater... | 33.953642 | 111 | 0.61771 |
938285bf3f7e333d883cb4b2288f0db4d00d5c14 | 5,093 | py | Python | dotstrings/parser.py | nickromano/dotstrings | c7d2a0771d9ba9c26902415524944aa603ad0271 | [
"MIT"
] | null | null | null | dotstrings/parser.py | nickromano/dotstrings | c7d2a0771d9ba9c26902415524944aa603ad0271 | [
"MIT"
] | null | null | null | dotstrings/parser.py | nickromano/dotstrings | c7d2a0771d9ba9c26902415524944aa603ad0271 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Utilities for dealing with .strings files"""
import re
from typing import List, Match, Optional, TextIO, Tuple, Union
from dotstrings.dot_strings_entry import DotStringsEntry
_ENTRY_REGEX = r'^"(.+)"\s?=\s?"(.*)";$'
_ENTRY_PATTERN = re.compile(_ENTRY_REGEX)
_NS_ENTRY_REGEX = r'^(NS[^ ]+)... | 28.452514 | 100 | 0.634793 |
fa7502cb66cc41fddb3ababb88dbe745379e17f4 | 1,249 | py | Python | source/timeseries/single/linear.py | supercoder3000/py_tensorflow_experiments | 01aebf681df25286cf4503661148203a03309b04 | [
"MIT"
] | null | null | null | source/timeseries/single/linear.py | supercoder3000/py_tensorflow_experiments | 01aebf681df25286cf4503661148203a03309b04 | [
"MIT"
] | null | null | null | source/timeseries/single/linear.py | supercoder3000/py_tensorflow_experiments | 01aebf681df25286cf4503661148203a03309b04 | [
"MIT"
] | null | null | null | import tensorflow as tf
from data_types.training_result import TrainingResult
from data_types.training_set import TrainingSet
from timeseries.build import compile_and_fit
from timeseries.window_generator import WindowGenerator
| 28.386364 | 86 | 0.709367 |
fa7568af8ff47dd33c5421737ba46eddde06e111 | 3,639 | py | Python | apps/sso/utils/email.py | g10f/sso | ba6eb712add388c69d4880f5620a2e4ce42d3fee | [
"BSD-3-Clause"
] | 3 | 2021-05-16T17:06:57.000Z | 2021-05-28T17:14:05.000Z | apps/sso/utils/email.py | g10f/sso | ba6eb712add388c69d4880f5620a2e4ce42d3fee | [
"BSD-3-Clause"
] | null | null | null | apps/sso/utils/email.py | g10f/sso | ba6eb712add388c69d4880f5620a2e4ce42d3fee | [
"BSD-3-Clause"
] | null | null | null | from email.mime.image import MIMEImage
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from django.conf import settings
from django.contrib.sites.shortcuts import get_current_site
from django.core.mail import get_connection
from django.core.mail.message import EmailMessage, EmailMul... | 40.88764 | 118 | 0.710085 |
fa794d632072a61bdf906bd8971ea8dd930b5c9a | 2,292 | py | Python | examples/paper/synthetic.py | wesselb/gpar | 70f5cb7cd2dec075e33dd7d9cd133b5bc1798777 | [
"MIT"
] | 49 | 2018-10-17T04:08:47.000Z | 2021-09-26T13:20:47.000Z | examples/paper/synthetic.py | wesselb/gpar | 70f5cb7cd2dec075e33dd7d9cd133b5bc1798777 | [
"MIT"
] | 3 | 2020-02-01T02:58:37.000Z | 2020-12-04T16:04:46.000Z | examples/paper/synthetic.py | wesselb/gpar | 70f5cb7cd2dec075e33dd7d9cd133b5bc1798777 | [
"MIT"
] | 10 | 2019-02-12T10:11:59.000Z | 2021-08-21T12:20:56.000Z | import matplotlib.pyplot as plt
import numpy as np
from gpar.regression import GPARRegressor
from wbml.experiment import WorkingDirectory
import wbml.plot
if __name__ == "__main__":
wd = WorkingDirectory("_experiments", "synthetic", seed=1)
# Create toy data set.
n = 200
x = np.linspace(0, 1, n)
n... | 27.95122 | 78 | 0.57199 |
fa7999e4d1ec2ca801d5ae696a83b8e1e2447b50 | 8,462 | py | Python | code/js/interactive_ecoli_data.py | cremerlab/ribosomal_allocation | a48828e00906c18bc3c49d109b3874c531098ce1 | [
"MIT"
] | null | null | null | code/js/interactive_ecoli_data.py | cremerlab/ribosomal_allocation | a48828e00906c18bc3c49d109b3874c531098ce1 | [
"MIT"
] | null | null | null | code/js/interactive_ecoli_data.py | cremerlab/ribosomal_allocation | a48828e00906c18bc3c49d109b3874c531098ce1 | [
"MIT"
] | null | null | null | #%%
import numpy as np
import pandas as pd
import bokeh.plotting
import bokeh.io
import bokeh.models
import growth.model
import growth.viz
const = growth.model.load_constants()
colors, palette = growth.viz.bokeh_style()
mapper = growth.viz.load_markercolors()
bokeh.io.output_file('../../figures/interactive/interac... | 51.284848 | 106 | 0.536162 |
fa79e9f429253026bc9c0f924d862a6178140da0 | 1,156 | py | Python | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/common/djangoapps/util/monitoring.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 3 | 2021-12-15T04:58:18.000Z | 2022-02-06T12:15:37.000Z | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/common/djangoapps/util/monitoring.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | null | null | null | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/common/djangoapps/util/monitoring.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 1 | 2019-01-02T14:38:50.000Z | 2019-01-02T14:38:50.000Z | """Helper methods for monitoring of events."""
from edx_django_utils.monitoring import set_custom_attribute, set_custom_attributes_for_course_key
def monitor_import_failure(course_key, import_step, message=None, exception=None):
"""
Helper method to add custom parameters to for import failures.
Arguments:... | 41.285714 | 98 | 0.745675 |
fa7a70aa8c051849cdc07367bdb4c7b9fe08c5bc | 24,725 | py | Python | Unidad3/H.hv6_toy/bin/quast-4.6.3/quast_libs/genome_analyzer.py | Melcatus/TallerBioinf | 4a3beb210ee277ce213609301ea160746d39b434 | [
"MIT"
] | null | null | null | Unidad3/H.hv6_toy/bin/quast-4.6.3/quast_libs/genome_analyzer.py | Melcatus/TallerBioinf | 4a3beb210ee277ce213609301ea160746d39b434 | [
"MIT"
] | null | null | null | Unidad3/H.hv6_toy/bin/quast-4.6.3/quast_libs/genome_analyzer.py | Melcatus/TallerBioinf | 4a3beb210ee277ce213609301ea160746d39b434 | [
"MIT"
] | null | null | null | ############################################################################
# Copyright (c) 2015-2017 Saint Petersburg State University
# Copyright (c) 2011-2015 Saint Petersburg Academic University
# All Rights Reserved
# See file LICENSE for details.
##################################################################... | 48.196881 | 141 | 0.621881 |
fa7a83fe53cfeb8f0635e9e1cf133b811d5394c2 | 3,713 | py | Python | app/auth/forms.py | blazejosojca/flask_blog | 2bac2f9c8bb60db8a5073147f35b9e088c97497b | [
"MIT"
] | null | null | null | app/auth/forms.py | blazejosojca/flask_blog | 2bac2f9c8bb60db8a5073147f35b9e088c97497b | [
"MIT"
] | 1 | 2021-06-01T23:21:11.000Z | 2021-06-01T23:21:11.000Z | app/auth/forms.py | blazejosojca/flask_blog | 2bac2f9c8bb60db8a5073147f35b9e088c97497b | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from flask_wtf.file import FileAllowed, FileField
from flask_babel import lazy_gettext as _l
from wtforms import StringField, TextAreaField, SubmitField, PasswordField, BooleanField
from wtforms.validators import DataRequired, Email, ValidationError, Length, EqualTo
from app.models impo... | 43.174419 | 111 | 0.664153 |
fa7b83f18dbaad2881ce921e1b1d08adbc4e3409 | 5,308 | py | Python | pointmap.py | quillford/twitchslam | c75c609b39b5d51b325fb2a8efd3402b7d29f37f | [
"MIT"
] | 1 | 2022-01-12T10:12:09.000Z | 2022-01-12T10:12:09.000Z | pointmap.py | quillford/twitchslam | c75c609b39b5d51b325fb2a8efd3402b7d29f37f | [
"MIT"
] | null | null | null | pointmap.py | quillford/twitchslam | c75c609b39b5d51b325fb2a8efd3402b7d29f37f | [
"MIT"
] | 1 | 2022-01-05T09:55:12.000Z | 2022-01-05T09:55:12.000Z | from helpers import poseRt
from frame import Frame
import time
import numpy as np
import g2o
import json
LOCAL_WINDOW = 20
#LOCAL_WINDOW = None
| 27.790576 | 103 | 0.58572 |
fa7c044effd2fd98d0d77b1344bdf8fa952165a5 | 482 | py | Python | day-02/python/part2.py | kayew/aoc-2020 | 55ea804c983aef4d3a7e159403247ec23a47aa10 | [
"MIT"
] | null | null | null | day-02/python/part2.py | kayew/aoc-2020 | 55ea804c983aef4d3a7e159403247ec23a47aa10 | [
"MIT"
] | null | null | null | day-02/python/part2.py | kayew/aoc-2020 | 55ea804c983aef4d3a7e159403247ec23a47aa10 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
file = open(sys.argv[1], "r")
total = 0
for line in file:
letterMatch = 0
param = line.split()
passIndex = [int(x) for x in param[0].split('-')]
targetLetter = param[1][0]
password = param[2]
if password[passIndex[0]-1] == targetLetter:
letterMatch +... | 19.28 | 53 | 0.591286 |
fa7f6dd4ea20017f1aa2340509ebc6691ac50171 | 3,165 | py | Python | handler.py | chiragjn/torchserve-t5-translation | ad8493302a405116c04fb2bea154412d051f27b8 | [
"MIT"
] | 3 | 2021-03-10T05:24:15.000Z | 2021-11-21T14:52:03.000Z | handler.py | chiragjn/torchserve-t5-translation | ad8493302a405116c04fb2bea154412d051f27b8 | [
"MIT"
] | null | null | null | handler.py | chiragjn/torchserve-t5-translation | ad8493302a405116c04fb2bea154412d051f27b8 | [
"MIT"
] | null | null | null | import torch
import os
import logging
import json
from abc import ABC
from ts.torch_handler.base_handler import BaseHandler
from transformers import T5Tokenizer, T5ForConditionalGeneration
logger = logging.getLogger(__name__)
| 39.5625 | 115 | 0.641706 |
fa7f8a320c3494838594cfc8dddc16eae8654412 | 1,114 | py | Python | api/pub/sensor/sensor.py | rtaft/pi-sensor-dashboard | e7f711e8ecd9e4c32976583c32dbc716b165d56a | [
"MIT"
] | null | null | null | api/pub/sensor/sensor.py | rtaft/pi-sensor-dashboard | e7f711e8ecd9e4c32976583c32dbc716b165d56a | [
"MIT"
] | null | null | null | api/pub/sensor/sensor.py | rtaft/pi-sensor-dashboard | e7f711e8ecd9e4c32976583c32dbc716b165d56a | [
"MIT"
] | null | null | null | import flask
from flask import request
import flask_restful as restful
from marshmallow import Schema, fields, validate
from api.helpers import success, created
from api.exceptions import NotFound
#from api.restful import API
#@API.route('/sensors', methods=['GET'], resource_class_kwargs={'test': 'foo'}) | 30.944444 | 79 | 0.692101 |
fa80141154a663ebd88b94d2fadc61b86d838ccf | 5,802 | py | Python | homework/week8/models.py | enigmacodemaster/Project_Of_Mask_Real_Time_Detection | a4d0123709315ab436318999aa758b5a0a5f61e8 | [
"Apache-2.0"
] | null | null | null | homework/week8/models.py | enigmacodemaster/Project_Of_Mask_Real_Time_Detection | a4d0123709315ab436318999aa758b5a0a5f61e8 | [
"Apache-2.0"
] | null | null | null | homework/week8/models.py | enigmacodemaster/Project_Of_Mask_Real_Time_Detection | a4d0123709315ab436318999aa758b5a0a5f61e8 | [
"Apache-2.0"
] | 1 | 2021-03-05T03:21:38.000Z | 2021-03-05T03:21:38.000Z | from __future__ import division
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import numpy as np
from utils.parse_config import *
from utils.utils import build_targets, to_cpu, non_max_suppression
import matplotlib.pyplot as plt
import matplotlib.patches as pa... | 39.739726 | 119 | 0.55636 |
fa8070ca6c33d7c997430f09e7d9b6f93e1c5af7 | 5,553 | py | Python | ggtools/gg/__init__.py | richannan/GGTOOLS | 7909da988d90de50c82532d97121a3fbcfc0263a | [
"MIT"
] | 22 | 2019-12-16T01:30:29.000Z | 2022-03-01T08:57:07.000Z | ggtools/gg/__init__.py | richannan/GGTOOLS | 7909da988d90de50c82532d97121a3fbcfc0263a | [
"MIT"
] | 3 | 2019-12-23T14:09:30.000Z | 2022-03-29T01:52:53.000Z | ggtools/gg/__init__.py | richannan/GGTOOLS | 7909da988d90de50c82532d97121a3fbcfc0263a | [
"MIT"
] | 13 | 2019-12-19T07:01:19.000Z | 2022-03-14T11:26:36.000Z | '''
ggtools gg subpackage
This subpackage defines the following functions:
# ====================== fitting function ==================== #
func - Define a linear function f(x) = a0 + a1/T*x to be fitted, where a0 and a1 are parameters for inter
# ====================== estinate lovebums =================== #
love... | 43.724409 | 193 | 0.715469 |
fa80d721e471bbc14b93aa5e1ca661ad13077c16 | 3,203 | py | Python | django_core_models/locations/urls.py | ajaniv/django-core-models | 7fde3792de745b5df875e8dc760096f5b10d46ce | [
"MIT"
] | null | null | null | django_core_models/locations/urls.py | ajaniv/django-core-models | 7fde3792de745b5df875e8dc760096f5b10d46ce | [
"MIT"
] | 15 | 2016-04-23T17:18:42.000Z | 2018-09-06T16:32:48.000Z | django_core_models/locations/urls.py | ajaniv/django-core-models | 7fde3792de745b5df875e8dc760096f5b10d46ce | [
"MIT"
] | null | null | null | """
.. module:: django_core_models.locations.urls
:synopsis: django_core_models locations application urls module
django_core_models *locations* application urls module.
"""
from __future__ import absolute_import
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^addresses/$',
... | 30.504762 | 67 | 0.596316 |