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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0c084907ab6f7a66d8c89aefdff3de051c8499ac | 1,406 | py | Python | encryption_client.py | salmanhiro/fernet-rabbitmq | 8130514e6d21b7df9c78a28130c603512f500a23 | [
"MIT"
] | null | null | null | encryption_client.py | salmanhiro/fernet-rabbitmq | 8130514e6d21b7df9c78a28130c603512f500a23 | [
"MIT"
] | null | null | null | encryption_client.py | salmanhiro/fernet-rabbitmq | 8130514e6d21b7df9c78a28130c603512f500a23 | [
"MIT"
] | null | null | null | import pika
import uuid
import time
import json
message = {"text":"kulikuli"}
fernet_result = FernetRpc()
print(" [x] Requesting user")
start = time.time()
response = fernet_result.call(message)
end = time.time() - start
print(" [v] Got %r" % response)
print(" [.] Time elapsed %r s" %end) | 26.528302 | 69 | 0.619488 |
0c0862941d8ae706603317f21fde751ca0bd01fb | 3,225 | py | Python | services/cert_server/project/tests/test_cert_server.py | EvaldoNeto/openvpn-http | 73d75a990d5d7ed7f89a526c0ce324db42c37f1f | [
"MIT"
] | 5 | 2019-11-19T02:54:05.000Z | 2020-03-03T19:48:41.000Z | services/cert_server/project/tests/test_cert_server.py | EvaldoNeto/openvpn-http | 73d75a990d5d7ed7f89a526c0ce324db42c37f1f | [
"MIT"
] | 23 | 2019-10-31T12:00:37.000Z | 2019-11-22T21:00:28.000Z | services/cert_server/project/tests/test_cert_server.py | EvaldoNeto/openvpn-http | 73d75a990d5d7ed7f89a526c0ce324db42c37f1f | [
"MIT"
] | null | null | null | # services/ovpn_server/project/tests/test_ovpn_server.py
import os
import json
import io
from flask import current_app
from project.tests.base import BaseTestCase
| 37.068966 | 78 | 0.556279 |
0c08971682b47651e14df294d06cff25310ada7b | 956 | py | Python | powerline/lib/watcher/stat.py | MrFishFinger/powerline | 361534bafecf836e100eaff257c93eb4805f48db | [
"MIT"
] | 11,435 | 2015-01-01T03:32:34.000Z | 2022-03-31T20:39:05.000Z | powerline/lib/watcher/stat.py | ritiek/powerline | 82c1373ba0b424c57e8c12cb5f6f1a7ee3829c27 | [
"MIT"
] | 879 | 2015-01-02T11:59:30.000Z | 2022-03-24T09:52:17.000Z | powerline/lib/watcher/stat.py | ritiek/powerline | 82c1373ba0b424c57e8c12cb5f6f1a7ee3829c27 | [
"MIT"
] | 1,044 | 2015-01-05T22:37:53.000Z | 2022-03-17T19:43:16.000Z | # vim:fileencoding=utf-8:noet
from __future__ import (unicode_literals, division, absolute_import, print_function)
import os
from threading import RLock
from powerline.lib.path import realpath
| 21.244444 | 84 | 0.706067 |
0c08a69ecbe4701e579ed0c55e6c61397156d087 | 2,531 | py | Python | refData/mlpy/mlpy-3.5.0/mlpy/bordacount/borda.py | xrick/DTW-Tutorial | bbbce1c2beff91384cdcb7dbf503f93ad2fa285c | [
"MIT"
] | null | null | null | refData/mlpy/mlpy-3.5.0/mlpy/bordacount/borda.py | xrick/DTW-Tutorial | bbbce1c2beff91384cdcb7dbf503f93ad2fa285c | [
"MIT"
] | null | null | null | refData/mlpy/mlpy-3.5.0/mlpy/bordacount/borda.py | xrick/DTW-Tutorial | bbbce1c2beff91384cdcb7dbf503f93ad2fa285c | [
"MIT"
] | null | null | null | ## This code is written by Davide Albanese, <albanese@fbk.eu>.
## (C) 2010 mlpy Developers.
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your op... | 32.448718 | 126 | 0.614382 |
0c08ae96e8b31b452042a012ea2cbfe21f5f54d5 | 2,641 | py | Python | envs/base_mujoco_env.py | zaynahjaved/AWAC | e225eeb8c0cd3498ab55ce15a9de60cb4e957c50 | [
"MIT"
] | null | null | null | envs/base_mujoco_env.py | zaynahjaved/AWAC | e225eeb8c0cd3498ab55ce15a9de60cb4e957c50 | [
"MIT"
] | null | null | null | envs/base_mujoco_env.py | zaynahjaved/AWAC | e225eeb8c0cd3498ab55ce15a9de60cb4e957c50 | [
"MIT"
] | null | null | null | '''
All cartgripper env modules built on cartrgipper implementation in
https://github.com/SudeepDasari/visual_foresight
'''
from abc import ABC
from mujoco_py import load_model_from_path, MjSim
import numpy as np
from base_env import BaseEnv
| 29.344444 | 96 | 0.632336 |
0c097274adeceb2e1e44250ea00c4016e23c60ed | 191 | py | Python | Desafios/desafio009.py | LucasHenrique-dev/Exercicios-Python | b1f6ca56ea8e197a89a044245419dc6079bdb9c7 | [
"MIT"
] | 1 | 2020-04-09T23:18:03.000Z | 2020-04-09T23:18:03.000Z | Desafios/desafio009.py | LucasHenrique-dev/Exercicios-Python | b1f6ca56ea8e197a89a044245419dc6079bdb9c7 | [
"MIT"
] | null | null | null | Desafios/desafio009.py | LucasHenrique-dev/Exercicios-Python | b1f6ca56ea8e197a89a044245419dc6079bdb9c7 | [
"MIT"
] | null | null | null | n1 = int(input('Digite um nmero e veja qual a sua tabuada: '))
n = 0
print('{} X {:2} = {:2}'.format(n1, 0, n1*n))
while n < 10:
n += 1
print('{} X {:2} = {:2}'.format(n1, n, n1*n))
| 27.285714 | 63 | 0.502618 |
0c09891ffb40760a1dcac5e46984a7d055ce0caf | 2,587 | py | Python | web/app/djrq/admin/admin.py | bmillham/djrq2 | c84283b75a7c15da1902ebfc32b7d75159c09e20 | [
"MIT"
] | 1 | 2016-11-23T20:50:00.000Z | 2016-11-23T20:50:00.000Z | web/app/djrq/admin/admin.py | bmillham/djrq2 | c84283b75a7c15da1902ebfc32b7d75159c09e20 | [
"MIT"
] | 15 | 2017-01-15T04:18:40.000Z | 2017-02-25T04:13:06.000Z | web/app/djrq/admin/admin.py | bmillham/djrq2 | c84283b75a7c15da1902ebfc32b7d75159c09e20 | [
"MIT"
] | null | null | null | # encoding: utf-8
from web.ext.acl import when
from ..templates.admin.admintemplate import page as _page
from ..templates.admin.requests import requeststemplate, requestrow
from ..templates.requests import requestrow as rr
from ..send_update import send_update
import cinje
| 43.847458 | 198 | 0.709702 |
0c0c0154d635c140279cd61ef15b6dfc6c89cd23 | 755 | py | Python | test_knot_hasher.py | mmokko/aoc2017 | 0732ac440775f9e6bd4a8447c665c9b0e6969f74 | [
"MIT"
] | null | null | null | test_knot_hasher.py | mmokko/aoc2017 | 0732ac440775f9e6bd4a8447c665c9b0e6969f74 | [
"MIT"
] | null | null | null | test_knot_hasher.py | mmokko/aoc2017 | 0732ac440775f9e6bd4a8447c665c9b0e6969f74 | [
"MIT"
] | null | null | null | from unittest import TestCase
from day10 import KnotHasher
| 30.2 | 72 | 0.658278 |
0c0c55cfe0bc18dae70bf566cb7d439dd048fafe | 602 | py | Python | udp/src/server.py | matthewchute/net-prot | 82d2d92b3c88afb245161780fdd7909d7bf15eb1 | [
"MIT"
] | null | null | null | udp/src/server.py | matthewchute/net-prot | 82d2d92b3c88afb245161780fdd7909d7bf15eb1 | [
"MIT"
] | null | null | null | udp/src/server.py | matthewchute/net-prot | 82d2d92b3c88afb245161780fdd7909d7bf15eb1 | [
"MIT"
] | null | null | null | import constants, helpers, os
temp_msg = None
whole_msg = b''
file_path = None
helpers.sock.bind(constants.IP_PORT)
print "Server Ready"
# recieve
while temp_msg != constants.EOF:
datagram = helpers.sock.recvfrom(constants.BUFFER_SIZE)
temp_msg = datagram[0]
if file_path is None:
print("Receiv... | 22.296296 | 79 | 0.696013 |
0c0dcfc232bbe604e854e762de0825bd246ecc01 | 3,697 | py | Python | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/hostname_configuration.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/hostname_configuration.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/hostname_configuration.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 48.012987 | 94 | 0.678117 |
0c0decf0160c2c2495315ba2014b0b8cb06458ac | 4,717 | py | Python | src/interactive_conditional_samples.py | 50417/gpt-2 | 0e0b3c97efb0048abffb2947aaa8573a783706ed | [
"MIT"
] | null | null | null | src/interactive_conditional_samples.py | 50417/gpt-2 | 0e0b3c97efb0048abffb2947aaa8573a783706ed | [
"MIT"
] | null | null | null | src/interactive_conditional_samples.py | 50417/gpt-2 | 0e0b3c97efb0048abffb2947aaa8573a783706ed | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import fire
import json
import os
import numpy as np
import tensorflow as tf
import model, sample, encoder
def interact_model(
model_name='117M',
seed=None,
nsamples=1000,
batch_size=1,
length=None,
temperature=1,
top_k=0,
top_p=0.0
):
"""
Interactively ... | 38.349593 | 116 | 0.606954 |
0c0e5be12d46a3b1b4e3d634643649fcf6a3f4da | 291 | py | Python | todofy/tests/conftest.py | bokiex/eti_todo | 1c636d0973c57d4253440b4528185dba0ecb9d05 | [
"BSD-3-Clause"
] | 1 | 2019-11-29T09:52:19.000Z | 2019-11-29T09:52:19.000Z | todofy/tests/conftest.py | bokiex/eti_todo | 1c636d0973c57d4253440b4528185dba0ecb9d05 | [
"BSD-3-Clause"
] | 28 | 2019-11-28T20:02:48.000Z | 2022-02-10T14:04:45.000Z | todofy/tests/conftest.py | bokiex/eti_todo | 1c636d0973c57d4253440b4528185dba0ecb9d05 | [
"BSD-3-Clause"
] | null | null | null | import pytest
| 16.166667 | 46 | 0.704467 |
0c0e6124651142c0387644ad144cc2392388c0c5 | 33 | py | Python | Fase 4 - Temas avanzados/Tema 11 - Modulos/Leccion 01 - Modulos/Saludos/test.py | ruben69695/python-course | a3d3532279510fa0315a7636c373016c7abe4f0a | [
"MIT"
] | 1 | 2019-01-27T20:44:53.000Z | 2019-01-27T20:44:53.000Z | Fase 4 - Temas avanzados/Tema 11 - Modulos/Leccion 01 - Modulos/Saludos/test.py | ruben69695/python-course | a3d3532279510fa0315a7636c373016c7abe4f0a | [
"MIT"
] | null | null | null | Fase 4 - Temas avanzados/Tema 11 - Modulos/Leccion 01 - Modulos/Saludos/test.py | ruben69695/python-course | a3d3532279510fa0315a7636c373016c7abe4f0a | [
"MIT"
] | null | null | null | import saludos
saludos.saludar() | 11 | 17 | 0.818182 |
0c0ea1386a3f6993039b27ca1ae2f4e56ebc457c | 1,033 | py | Python | question_bank/split-array-into-fibonacci-sequence/split-array-into-fibonacci-sequence.py | yatengLG/leetcode-python | 5d48aecb578c86d69835368fad3d9cc21961c226 | [
"Apache-2.0"
] | 9 | 2020-08-12T10:01:00.000Z | 2022-01-05T04:37:48.000Z | question_bank/split-array-into-fibonacci-sequence/split-array-into-fibonacci-sequence.py | yatengLG/leetcode-python | 5d48aecb578c86d69835368fad3d9cc21961c226 | [
"Apache-2.0"
] | 1 | 2021-02-16T10:19:31.000Z | 2021-02-16T10:19:31.000Z | question_bank/split-array-into-fibonacci-sequence/split-array-into-fibonacci-sequence.py | yatengLG/leetcode-python | 5d48aecb578c86d69835368fad3d9cc21961c226 | [
"Apache-2.0"
] | 4 | 2020-08-12T10:13:31.000Z | 2021-11-05T01:26:58.000Z | # -*- coding: utf-8 -*-
# @Author : LG
"""
148 ms, Python3 35.57%
13.7 MB, Python3 36.81%
""" | 30.382353 | 159 | 0.460794 |
0c111c07238e7921c9ce9cb0615b8ac96b16babf | 2,771 | py | Python | convert_bootswatch_vurple.py | douglaskastle/bootswatch | cb8f368c8d3671afddae487736d7cba6509b7f5b | [
"MIT"
] | null | null | null | convert_bootswatch_vurple.py | douglaskastle/bootswatch | cb8f368c8d3671afddae487736d7cba6509b7f5b | [
"MIT"
] | null | null | null | convert_bootswatch_vurple.py | douglaskastle/bootswatch | cb8f368c8d3671afddae487736d7cba6509b7f5b | [
"MIT"
] | null | null | null | import re
import os
values = {
'uc': 'Vurple',
'lc': 'vurple',
'cl': '#116BB7',
}
if __name__ == '__main__':
main()
| 35.075949 | 139 | 0.587153 |
0c117a09b3c94bdc715dd3e404e0bc7ed330ac20 | 721 | py | Python | python/interface_getPixel.py | BulliB/PixelTable | f08ff3a7908857583f3cbc1b689abf2e8739f7d8 | [
"BSD-2-Clause"
] | 2 | 2019-10-28T14:33:31.000Z | 2019-10-30T10:08:58.000Z | python/interface_getPixel.py | BulliB/PixelTable | f08ff3a7908857583f3cbc1b689abf2e8739f7d8 | [
"BSD-2-Clause"
] | 33 | 2019-10-28T14:17:26.000Z | 2020-02-22T11:04:02.000Z | python/interface_getPixel.py | BulliB/PixelTable | f08ff3a7908857583f3cbc1b689abf2e8739f7d8 | [
"BSD-2-Clause"
] | 2 | 2019-11-08T11:14:33.000Z | 2019-11-19T21:22:54.000Z | #!/usr/bin/python3
from validData import *
from command import *
from readback import *
import sys
import time
# Expected Input
# 1: Row -> 0 to 9
# 2: Column -> 0 to 19
if (
isInt(sys.argv[1]) and strLengthIs(sys.argv[1],1) and
isInt(sys.argv[2]) and (strLengthIs(sys.argv[2],1) or strLengthIs(sys.ar... | 21.848485 | 89 | 0.601942 |
0c11d6edd1fa7404e67e7a29c7dcaef50cd598a8 | 1,834 | py | Python | FunTOTP/interface.py | Z33DD/FunTOTP | 912c1a4a307af6a495f12a82305ae7dbf49916a2 | [
"Unlicense"
] | 3 | 2020-01-19T17:10:37.000Z | 2022-02-19T18:39:20.000Z | FunTOTP/interface.py | Z33DD/FunTOTP | 912c1a4a307af6a495f12a82305ae7dbf49916a2 | [
"Unlicense"
] | null | null | null | FunTOTP/interface.py | Z33DD/FunTOTP | 912c1a4a307af6a495f12a82305ae7dbf49916a2 | [
"Unlicense"
] | 1 | 2020-01-19T20:25:18.000Z | 2020-01-19T20:25:18.000Z | from getpass import getpass
from colorama import init, Fore, Back, Style
yes = ['Y', 'y', 'YES', 'yes', 'Yes']
| 25.123288 | 76 | 0.490185 |
0c1456a33812aa7157896227520f3def0676ad91 | 885 | py | Python | envdsys/envcontacts/apps.py | NOAA-PMEL/envDataSystem | 4db4a3569d2329658799a3eef06ce36dd5c0597d | [
"Unlicense"
] | 1 | 2021-11-06T19:22:53.000Z | 2021-11-06T19:22:53.000Z | envdsys/envcontacts/apps.py | NOAA-PMEL/envDataSystem | 4db4a3569d2329658799a3eef06ce36dd5c0597d | [
"Unlicense"
] | 25 | 2019-06-18T20:40:36.000Z | 2021-07-23T20:56:48.000Z | envdsys/envcontacts/apps.py | NOAA-PMEL/envDataSystem | 4db4a3569d2329658799a3eef06ce36dd5c0597d | [
"Unlicense"
] | null | null | null | from django.apps import AppConfig
| 29.5 | 64 | 0.523164 |
0c16dc36c44b72bd40c213bf05ac31ec7273fca3 | 8,053 | py | Python | tests/interpreter.py | AndrejHatzi/Haya | 31291142decf6a172149516f08a2f2d68115e2dc | [
"MIT"
] | null | null | null | tests/interpreter.py | AndrejHatzi/Haya | 31291142decf6a172149516f08a2f2d68115e2dc | [
"MIT"
] | 1 | 2019-02-14T16:47:10.000Z | 2019-02-14T16:47:10.000Z | tests/interpreter.py | AndrejHatzi/Haya | 31291142decf6a172149516f08a2f2d68115e2dc | [
"MIT"
] | null | null | null | from sly import Lexer
from sly import Parser
import sys
#--------------------------
# While Loop
# Del Var
# Print stmt
# EQEQ, LEQ
#--------------------------
#=> This version has parenthesis precedence!
if __name__ == '__main__':
lexer = BasicLexer()
parser = BasicParser()
env = {}
... | 27.768966 | 83 | 0.46343 |
0c16fa03a21f3d8b261783bab62dd87a48e2c16d | 1,012 | py | Python | braintree/apple_pay_card.py | futureironman/braintree_python | 26bb8a857bc29322a8bca2e8e0fe6d99cfe6a1ac | [
"MIT"
] | 182 | 2015-01-09T05:26:46.000Z | 2022-03-16T14:10:06.000Z | braintree/apple_pay_card.py | futureironman/braintree_python | 26bb8a857bc29322a8bca2e8e0fe6d99cfe6a1ac | [
"MIT"
] | 95 | 2015-02-24T23:29:56.000Z | 2022-03-13T03:27:58.000Z | braintree/apple_pay_card.py | futureironman/braintree_python | 26bb8a857bc29322a8bca2e8e0fe6d99cfe6a1ac | [
"MIT"
] | 93 | 2015-02-19T17:59:06.000Z | 2022-03-19T17:01:25.000Z | import braintree
from braintree.resource import Resource
| 30.666667 | 132 | 0.662055 |
0c1758002a3f4c2e5686dc0e50493960b4c98bea | 4,054 | py | Python | src/lda_without_tf_idf_sports.py | mspkvp/MiningOpinionTweets | 23f05b4cea22254748675e03a51844da1dff70ac | [
"MIT"
] | 1 | 2016-01-18T14:30:31.000Z | 2016-01-18T14:30:31.000Z | src/lda_without_tf_idf_sports.py | mspkvp/MiningOpinionTweets | 23f05b4cea22254748675e03a51844da1dff70ac | [
"MIT"
] | null | null | null | src/lda_without_tf_idf_sports.py | mspkvp/MiningOpinionTweets | 23f05b4cea22254748675e03a51844da1dff70ac | [
"MIT"
] | null | null | null | from __future__ import print_function
from time import time
import csv
import sys
import os
from sklearn.feature_extraction.text import CountVectorizer
import numpy as np
import lda
import logging
logging.basicConfig(filename='lda_analyser.log', level=logging.DEBUG)
entities = ['jose_mourinho',
'cristia... | 37.192661 | 129 | 0.561914 |
0c18dab0a973e417315a5c146525d7d91b9da0fe | 4,476 | py | Python | glab_common/allsummary.py | gentnerlab/glab-common-py | 9ff87ac6ca5f07c0d550594da38080bd3ee916db | [
"BSD-3-Clause"
] | 3 | 2016-03-07T19:51:32.000Z | 2018-11-08T22:34:14.000Z | glab_common/allsummary.py | gentnerlab/glab-common-py | 9ff87ac6ca5f07c0d550594da38080bd3ee916db | [
"BSD-3-Clause"
] | 16 | 2015-02-19T04:32:01.000Z | 2018-11-14T20:09:09.000Z | glab_common/allsummary.py | gentnerlab/glab-common-py | 9ff87ac6ca5f07c0d550594da38080bd3ee916db | [
"BSD-3-Clause"
] | 4 | 2015-04-01T23:55:25.000Z | 2018-02-28T18:23:29.000Z | from __future__ import print_function
import re
import datetime as dt
from behav.loading import load_data_pandas
import warnings
import subprocess
import os
import sys
process_fname = "/home/bird/opdat/panel_subject_behavior"
box_nums = []
bird_nums = []
processes = []
with open(process_fname, "rt") as psb_file:
... | 38.921739 | 122 | 0.50849 |
0c194bbda6bf427b571869e7619f91e9298b8f04 | 2,239 | py | Python | api/v1/circuits.py | tahoe/janitor | b6ce73bddc13c70079bdc7ba4c7a9b3ee0cad0bd | [
"Apache-2.0"
] | 52 | 2019-08-14T10:48:26.000Z | 2022-03-30T18:09:08.000Z | api/v1/circuits.py | tahoe/janitor | b6ce73bddc13c70079bdc7ba4c7a9b3ee0cad0bd | [
"Apache-2.0"
] | 18 | 2019-08-20T04:13:37.000Z | 2022-01-31T12:40:12.000Z | api/v1/circuits.py | tahoe/janitor | b6ce73bddc13c70079bdc7ba4c7a9b3ee0cad0bd | [
"Apache-2.0"
] | 12 | 2019-08-14T10:49:11.000Z | 2020-09-02T18:56:34.000Z | from app.models import Circuit, CircuitSchema, Provider
from flask import make_response, jsonify
from app import db
def read_all():
"""
This function responds to a request for /circuits
with the complete lists of circuits
:return: sorted list of circuits
"""
circuits = Circuit.query.al... | 26.341176 | 85 | 0.676195 |
0c1a66a69d47f4abcbb592a1b69142a384d2f89b | 2,311 | py | Python | youtube_related/client.py | kijk2869/youtube-related | daabefc60277653098e1d8e266258b71567796d8 | [
"MIT"
] | 7 | 2020-07-13T00:15:37.000Z | 2021-12-06T14:35:14.000Z | youtube_related/client.py | kijk2869/youtube-related | daabefc60277653098e1d8e266258b71567796d8 | [
"MIT"
] | 11 | 2020-07-17T16:11:16.000Z | 2022-03-01T23:02:54.000Z | youtube_related/client.py | kijk2869/youtube-related | daabefc60277653098e1d8e266258b71567796d8 | [
"MIT"
] | 3 | 2020-11-04T11:44:50.000Z | 2022-01-11T04:21:01.000Z | import asyncio
import json
import re
from collections import deque
from typing import Deque, Dict, List, Match, Pattern
import aiohttp
from .error import RateLimited
headers: dict = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
}
DATA_JSON: Pattern = re.compile(
r'(... | 29.253165 | 89 | 0.63479 |
0c1b29cfd60d9ee7d4e6451a8264af9459d2ddcb | 2,522 | py | Python | app/request/migrations/0001_initial.py | contestcrew/2019SeoulContest-Backend | 2e99cc6ec6a712911da3b79412ae84a9d35453e1 | [
"MIT"
] | null | null | null | app/request/migrations/0001_initial.py | contestcrew/2019SeoulContest-Backend | 2e99cc6ec6a712911da3b79412ae84a9d35453e1 | [
"MIT"
] | 32 | 2019-08-30T13:09:28.000Z | 2021-06-10T19:07:56.000Z | app/request/migrations/0001_initial.py | contestcrew/2019SeoulContest-Backend | 2e99cc6ec6a712911da3b79412ae84a9d35453e1 | [
"MIT"
] | 3 | 2019-09-19T10:12:50.000Z | 2019-09-30T15:59:13.000Z | # Generated by Django 2.2.5 on 2019-09-24 09:11
from django.db import migrations, models
import django.db.models.deletion
| 50.44 | 179 | 0.596352 |
0c1bfa28ddb2f6e0a2bc571eb9a019b7ef92cb0d | 690 | py | Python | field/FieldFactory.py | goph-R/NodeEditor | 5cc4749785bbd348f3db01b27c1533b4caadb920 | [
"Apache-2.0"
] | null | null | null | field/FieldFactory.py | goph-R/NodeEditor | 5cc4749785bbd348f3db01b27c1533b4caadb920 | [
"Apache-2.0"
] | null | null | null | field/FieldFactory.py | goph-R/NodeEditor | 5cc4749785bbd348f3db01b27c1533b4caadb920 | [
"Apache-2.0"
] | null | null | null | from PySide2.QtGui import QVector3D, QColor
from field.ColorField import ColorField
from field.FloatField import FloatField
from field.StringField import StringField
from field.Vector3Field import Vector3Field
| 23 | 44 | 0.618841 |
0c1cee1a04ba87b43d0454e7e5294887e53530fd | 1,348 | py | Python | scrapy/utils/engine.py | sulochanaviji/scrapy | 6071c82e7ac80136e844b56a09d5d31aa8f41296 | [
"BSD-3-Clause"
] | 8 | 2021-02-01T07:55:19.000Z | 2021-03-22T18:17:47.000Z | scrapy/utils/engine.py | sulochanaviji/scrapy | 6071c82e7ac80136e844b56a09d5d31aa8f41296 | [
"BSD-3-Clause"
] | 30 | 2021-02-17T14:17:57.000Z | 2021-03-03T16:57:16.000Z | scrapy/utils/engine.py | sulochanaviji/scrapy | 6071c82e7ac80136e844b56a09d5d31aa8f41296 | [
"BSD-3-Clause"
] | 3 | 2021-08-21T04:09:17.000Z | 2021-08-25T01:00:41.000Z | """Some debugging functions for working with the Scrapy engine"""
# used in global tests code
from time import time # noqa: F401
def get_engine_status(engine):
"""Return a report of the current engine status"""
tests = [
"time()-engine.start_time",
"engine.has_capacity()",
"len(engin... | 27.510204 | 65 | 0.609792 |
0c1da110a449d15b92ca6653ffd9fc76029d3fee | 2,588 | py | Python | share/pegasus/init/population/scripts/full_res_pop_raster.py | hariharan-devarajan/pegasus | d0641541f2eccc69dd6cc5a09b0b51303686d3ac | [
"Apache-2.0"
] | null | null | null | share/pegasus/init/population/scripts/full_res_pop_raster.py | hariharan-devarajan/pegasus | d0641541f2eccc69dd6cc5a09b0b51303686d3ac | [
"Apache-2.0"
] | null | null | null | share/pegasus/init/population/scripts/full_res_pop_raster.py | hariharan-devarajan/pegasus | d0641541f2eccc69dd6cc5a09b0b51303686d3ac | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
from typing import Dict
import optparse
import numpy as np
import rasterio
from rasterio import features
def main(county_pop_file, spatial_dist_file, fname_out, no_data_val=-9999):
'''
county_pop_file: County level population estimates
spatial_dist_file: Spatial projection of populati... | 33.179487 | 75 | 0.63524 |
0c1e7c3ccf6eceb66230761a4bde8362593a8064 | 9,557 | py | Python | TestCase/pr_test_case.py | openeuler-mirror/ci-bot | c50056ff73670bc0382e72cf8c653c01e1aed5e1 | [
"MulanPSL-1.0"
] | 1 | 2020-01-12T07:35:34.000Z | 2020-01-12T07:35:34.000Z | TestCase/pr_test_case.py | openeuler-mirror/ci-bot | c50056ff73670bc0382e72cf8c653c01e1aed5e1 | [
"MulanPSL-1.0"
] | null | null | null | TestCase/pr_test_case.py | openeuler-mirror/ci-bot | c50056ff73670bc0382e72cf8c653c01e1aed5e1 | [
"MulanPSL-1.0"
] | 2 | 2020-03-04T02:09:14.000Z | 2020-03-07T03:00:40.000Z | import os
import requests
import subprocess
import time
import yaml
if __name__ == '__main__':
with open('config.yaml', 'r') as f:
info = yaml.load(f.read())['test case']
owner = info[0]['owner']
repo = info[1]['repo']
local_owner = info[2]['local_owner']
pr = PullRequestO... | 38.381526 | 206 | 0.548917 |
0c1eb2fd9329de0c031fe686c52f4c0e67ec1227 | 1,103 | py | Python | tempest/api/hybrid_cloud/compute/flavors/test_flavors_operations.py | Hybrid-Cloud/hybrid-tempest | 319e90c6fa6e46925b495c93cd5258f088a30ec0 | [
"Apache-2.0"
] | null | null | null | tempest/api/hybrid_cloud/compute/flavors/test_flavors_operations.py | Hybrid-Cloud/hybrid-tempest | 319e90c6fa6e46925b495c93cd5258f088a30ec0 | [
"Apache-2.0"
] | null | null | null | tempest/api/hybrid_cloud/compute/flavors/test_flavors_operations.py | Hybrid-Cloud/hybrid-tempest | 319e90c6fa6e46925b495c93cd5258f088a30ec0 | [
"Apache-2.0"
] | null | null | null | import testtools
from oslo_log import log
from tempest.api.compute import base
import tempest.api.compute.flavors.test_flavors as FlavorsV2Test
import tempest.api.compute.flavors.test_flavors_negative as FlavorsListWithDetailsNegativeTest
import tempest.api.compute.flavors.test_flavors_negative as FlavorDetailsNegativ... | 36.766667 | 126 | 0.853128 |
0c1f09091be19e77ace869bcb2f31a8df0eb57b2 | 8,910 | py | Python | dycall/exports.py | demberto/DyCall | b234e7ba535eae71234723bb3d645eb986f96a30 | [
"MIT"
] | null | null | null | dycall/exports.py | demberto/DyCall | b234e7ba535eae71234723bb3d645eb986f96a30 | [
"MIT"
] | null | null | null | dycall/exports.py | demberto/DyCall | b234e7ba535eae71234723bb3d645eb986f96a30 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
dycall.exports
~~~~~~~~~~~~~~
Contains `ExportsFrame` and `ExportsTreeView`.
"""
from __future__ import annotations
import logging
import pathlib
from typing import TYPE_CHECKING
import ttkbootstrap as tk
from ttkbootstrap import ttk
from ttkbootstrap.dialogs import Messagebox
from ttkbo... | 34.534884 | 86 | 0.579237 |
0c1fb0aec727010060874060c9a7121a40357346 | 1,899 | py | Python | src/homologs/filter_by_occupancy.py | jlanga/smsk_selection | 08070c6d4a6fbd9320265e1e698c95ba80f81123 | [
"MIT"
] | 4 | 2021-07-18T05:20:20.000Z | 2022-01-03T10:22:33.000Z | src/homologs/filter_by_occupancy.py | jlanga/smsk_selection | 08070c6d4a6fbd9320265e1e698c95ba80f81123 | [
"MIT"
] | 1 | 2017-08-21T07:26:13.000Z | 2018-11-08T13:59:48.000Z | src/homologs/filter_by_occupancy.py | jlanga/smsk_orthofinder | 08070c6d4a6fbd9320265e1e698c95ba80f81123 | [
"MIT"
] | 2 | 2021-07-18T05:20:26.000Z | 2022-03-31T18:23:31.000Z | #!/usr/bin/env python
"""
Filter a fasta alignment according to its occupancy:
filter_by_occupancy.py fasta_raw.fa fasta_trimmed.fa 0.5
"""
import os
import sys
from helpers import fasta_to_dict
def filter_by_occupancy(filename_in, filename_out, min_occupancy=0.5):
"""
Filter an alignment in fasta format ... | 28.772727 | 85 | 0.664034 |
0c20b529cd83a9fd598afa8e482ff4d521f8b78a | 954 | py | Python | setup.py | eppeters/xontrib-dotenv | f866f557592d822d1ecb2b607c63c4cdecb580e4 | [
"BSD-2-Clause"
] | null | null | null | setup.py | eppeters/xontrib-dotenv | f866f557592d822d1ecb2b607c63c4cdecb580e4 | [
"BSD-2-Clause"
] | null | null | null | setup.py | eppeters/xontrib-dotenv | f866f557592d822d1ecb2b607c63c4cdecb580e4 | [
"BSD-2-Clause"
] | 1 | 2020-03-16T00:39:57.000Z | 2020-03-16T00:39:57.000Z | #!/usr/bin/env python
"""
xontrib-dotenv
-----
Automatically reads .env file from current working directory
or parentdirectories and push variables to environment.
"""
from setuptools import setup
setup(
name='xontrib-dotenv',
version='0.1',
description='Reads .env files into environment',
long_descr... | 25.105263 | 60 | 0.631027 |
0c20b7c255ec391f7dad36b9c36ded1071de5e8b | 222 | py | Python | tests/sample_app/urls.py | dreipol/meta-tagger | c1a2f1f8b0c051018a5bb75d4e579d27bd2c27b2 | [
"BSD-3-Clause"
] | 3 | 2016-05-30T07:48:54.000Z | 2017-02-08T21:16:03.000Z | tests/sample_app/urls.py | dreipol/meta-tagger | c1a2f1f8b0c051018a5bb75d4e579d27bd2c27b2 | [
"BSD-3-Clause"
] | null | null | null | tests/sample_app/urls.py | dreipol/meta-tagger | c1a2f1f8b0c051018a5bb75d4e579d27bd2c27b2 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from django.conf.urls import url
from tests.sample_app.views import NewsArticleDetailView
urlpatterns = [
url(r'^(?P<pk>\d+)/$', NewsArticleDetailView.as_view(), name='news-article-detail'),
]
| 27.75 | 88 | 0.702703 |
0c23261891d98100b6ddda0879a36f77857b6f48 | 624 | py | Python | utils/bbox_utils/center_to_corner.py | Jaskaran197/Red-blood-cell-detection-SSD | a33b330ad17454a7425aa7f57818c0a41b4e0ff9 | [
"MIT"
] | null | null | null | utils/bbox_utils/center_to_corner.py | Jaskaran197/Red-blood-cell-detection-SSD | a33b330ad17454a7425aa7f57818c0a41b4e0ff9 | [
"MIT"
] | null | null | null | utils/bbox_utils/center_to_corner.py | Jaskaran197/Red-blood-cell-detection-SSD | a33b330ad17454a7425aa7f57818c0a41b4e0ff9 | [
"MIT"
] | null | null | null | import numpy as np
def center_to_corner(boxes):
""" Convert bounding boxes from center format (cx, cy, width, height) to corner format (xmin, ymin, xmax, ymax)
Args:
- boxes: numpy array of tensor containing all the boxes to be converted
Returns:
- A numpy array or tensor of converted bo... | 32.842105 | 115 | 0.535256 |
0c24e2918c9577a7b38b38b7b54cfb7d7c91ca26 | 337 | py | Python | pytest/np.py | i0Ek3/disintegration | b59307f8166b93d76fab35af180a5cf3ffa51b09 | [
"MIT"
] | null | null | null | pytest/np.py | i0Ek3/disintegration | b59307f8166b93d76fab35af180a5cf3ffa51b09 | [
"MIT"
] | null | null | null | pytest/np.py | i0Ek3/disintegration | b59307f8166b93d76fab35af180a5cf3ffa51b09 | [
"MIT"
] | null | null | null | import numpy as np
list = [np.linspace([1,2,3], 3),\
np.array([1,2,3]),\
np.arange(3),\
np.arange(8).reshape(2,4),\
np.zeros((2,3)),\
np.zeros((2,3)).T,\
np.ones((3,1)),\
np.eye(3),\
np.full((3,3), 1),\
np.random.rand(3),\
np.random.rand(3,3),\
np.random.uniform(5,15,3),\
np.random.randn(3),\
np.random.normal(3, 2.5, ... | 17.736842 | 33 | 0.590504 |
0c25a90b221d6137090c0e77b536a592e4921a3d | 337 | py | Python | api/data_explorer/models/__init__.py | karamalhotra/data-explorer | 317f4d7330887969ab6bfe2ca23ec24163472c55 | [
"BSD-3-Clause"
] | null | null | null | api/data_explorer/models/__init__.py | karamalhotra/data-explorer | 317f4d7330887969ab6bfe2ca23ec24163472c55 | [
"BSD-3-Clause"
] | null | null | null | api/data_explorer/models/__init__.py | karamalhotra/data-explorer | 317f4d7330887969ab6bfe2ca23ec24163472c55 | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# flake8: noqa
from __future__ import absolute_import
# import models into model package
from data_explorer.models.dataset_response import DatasetResponse
from data_explorer.models.facet import Facet
from data_explorer.models.facet_value import FacetValue
from data_explorer.models.facets_response impor... | 33.7 | 65 | 0.860534 |
0c2791187a63a4bcc6905cd731c3e9fbdcde2c2b | 2,288 | py | Python | seabird/cli.py | nicholas512/seabird | 23073b2b9a550b86ec155cbe43be9b50e50b8310 | [
"BSD-3-Clause"
] | 38 | 2015-04-15T08:57:44.000Z | 2022-03-13T02:51:53.000Z | seabird/cli.py | nicholas512/seabird | 23073b2b9a550b86ec155cbe43be9b50e50b8310 | [
"BSD-3-Clause"
] | 54 | 2015-01-28T03:53:43.000Z | 2021-12-11T07:37:24.000Z | seabird/cli.py | nicholas512/seabird | 23073b2b9a550b86ec155cbe43be9b50e50b8310 | [
"BSD-3-Clause"
] | 22 | 2015-09-22T12:24:22.000Z | 2022-01-31T22:27:16.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Command line utilities for package Seabird
"""
import click
from seabird.exceptions import CNVError
from .cnv import fCNV
from .netcdf import cnv2nc
| 28.962025 | 68 | 0.645979 |
0c2931d41844c5cadfbc0f4d8cd12cf1c0991cb4 | 1,752 | py | Python | main.py | Mitch-the-Fridge/pi | 70ab24dab9b06722084e93f783dc541747d46720 | [
"MIT"
] | null | null | null | main.py | Mitch-the-Fridge/pi | 70ab24dab9b06722084e93f783dc541747d46720 | [
"MIT"
] | null | null | null | main.py | Mitch-the-Fridge/pi | 70ab24dab9b06722084e93f783dc541747d46720 | [
"MIT"
] | 1 | 2020-05-31T17:13:42.000Z | 2020-05-31T17:13:42.000Z | #!/usr/bin/env python3
#import face_recognition
import cv2
import numpy as np
from datetime import datetime, timedelta
from buffer import Buffer
from collections import deque
import os
from copy import copy
import archive
WEIGHT_EPS = 5
TIMEOUT = 5 # in seconds
# with an fps we then have a "before" duration of 15 se... | 23.36 | 87 | 0.660388 |
0c2a0afb31018189385f06e7bd9d48b8c0f6df9c | 2,895 | py | Python | OpenPNM/Network/models/pore_topology.py | Eng-RSMY/OpenPNM | a0a057d0f6346c515792459b1da97f05bab383c1 | [
"MIT"
] | 1 | 2021-03-30T21:38:26.000Z | 2021-03-30T21:38:26.000Z | OpenPNM/Network/models/pore_topology.py | Eng-RSMY/OpenPNM | a0a057d0f6346c515792459b1da97f05bab383c1 | [
"MIT"
] | null | null | null | OpenPNM/Network/models/pore_topology.py | Eng-RSMY/OpenPNM | a0a057d0f6346c515792459b1da97f05bab383c1 | [
"MIT"
] | null | null | null | r"""
===============================================================================
pore_topology -- functions for monitoring and adjusting topology
===============================================================================
"""
import scipy as _sp
def get_subscripts(network, shape, **kwargs):
r"""
Retu... | 29.242424 | 79 | 0.587219 |
0c2a4b436c5eaf17c454eecf85f7cdb41e8c152f | 9,559 | py | Python | contrib/workflow/SpiffWorkflow/src/SpiffWorkflow/Tasks/Join.py | gonicus/clacks | da579f0acc4e48cf2e9451417ac6792282cf7ab6 | [
"ZPL-2.1"
] | 2 | 2015-01-26T07:15:19.000Z | 2015-11-09T13:42:11.000Z | contrib/workflow/SpiffWorkflow/src/SpiffWorkflow/Tasks/Join.py | gonicus/clacks | da579f0acc4e48cf2e9451417ac6792282cf7ab6 | [
"ZPL-2.1"
] | null | null | null | contrib/workflow/SpiffWorkflow/src/SpiffWorkflow/Tasks/Join.py | gonicus/clacks | da579f0acc4e48cf2e9451417ac6792282cf7ab6 | [
"ZPL-2.1"
] | null | null | null | # Copyright (C) 2007 Samuel Abels
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distri... | 37.93254 | 80 | 0.61293 |
0c2c64f073f540439acf039ecdc1016885d5eb85 | 5,763 | py | Python | covsirphy/visualization/bar_plot.py | ardhanii/covid19-sir | 87881963c49a2fc5b6235c8b21269d216acaa941 | [
"Apache-2.0"
] | 97 | 2020-05-15T15:20:15.000Z | 2022-03-18T02:55:54.000Z | covsirphy/visualization/bar_plot.py | ardhanii/covid19-sir | 87881963c49a2fc5b6235c8b21269d216acaa941 | [
"Apache-2.0"
] | 970 | 2020-06-01T13:48:34.000Z | 2022-03-29T08:20:49.000Z | covsirphy/visualization/bar_plot.py | ardhani31/Covid19-SIRV-v3 | 59d95156b375c41259c46ce4e656b86903f92ec2 | [
"Apache-2.0"
] | 36 | 2020-05-15T15:36:43.000Z | 2022-02-25T17:59:08.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from matplotlib import pyplot as plt
from matplotlib.ticker import ScalarFormatter
import pandas as pd
from covsirphy.util.argument import find_args
from covsirphy.visualization.vbase import VisualizeBase
def bar_plot(df, title=None, filename=None, show_legend=True, **k... | 36.942308 | 152 | 0.599167 |
0c2c8fc01f580afd1e737eea2d3f4a891285699e | 3,342 | py | Python | 03-process-unsplash-dataset.py | l294265421/natural-language-image-search | 71621f2208f345b922ed0f82d406526cef456d48 | [
"MIT"
] | null | null | null | 03-process-unsplash-dataset.py | l294265421/natural-language-image-search | 71621f2208f345b922ed0f82d406526cef456d48 | [
"MIT"
] | null | null | null | 03-process-unsplash-dataset.py | l294265421/natural-language-image-search | 71621f2208f345b922ed0f82d406526cef456d48 | [
"MIT"
] | null | null | null | import os
import math
from pathlib import Path
import clip
import torch
from PIL import Image
import numpy as np
import pandas as pd
from common import common_path
# Set the path to the photos
# dataset_version = "lite" # Use "lite" or "full"
# photos_path = Path("unsplash-dataset") / dataset_version / "photos"
ph... | 36.326087 | 118 | 0.718731 |
0c2caff0890d29c7f470b93cedd466717f34705f | 4,612 | py | Python | treadmill_pipeline/treadmill.py | ttngu207/project-treadmill | 55b5241b1c0b2634da8c153bf9aaeb511f28b07f | [
"MIT"
] | null | null | null | treadmill_pipeline/treadmill.py | ttngu207/project-treadmill | 55b5241b1c0b2634da8c153bf9aaeb511f28b07f | [
"MIT"
] | null | null | null | treadmill_pipeline/treadmill.py | ttngu207/project-treadmill | 55b5241b1c0b2634da8c153bf9aaeb511f28b07f | [
"MIT"
] | 4 | 2020-03-05T15:44:36.000Z | 2020-03-18T15:18:11.000Z | import numpy as np
import datajoint as dj
from treadmill_pipeline import project_database_prefix
from ephys.utilities import ingestion, time_sync
from ephys import get_schema_name
schema = dj.schema(project_database_prefix + 'treadmill_pipeline')
reference = dj.create_virtual_module('reference', get_schema_name('re... | 50.681319 | 130 | 0.624892 |
0c3043c88aed8f6a40aafefe3d1e9548537a28e3 | 1,324 | py | Python | management/api/v1/serializers.py | bwksoftware/cypetulip | 4ea5c56d2d48a311220e144d094280a275109316 | [
"MIT"
] | 3 | 2019-08-03T12:00:22.000Z | 2020-02-02T08:37:09.000Z | management/api/v1/serializers.py | basetwode/cypetulip | d6be294a288706c5661afb433215fe6c3ffea92b | [
"MIT"
] | 47 | 2019-08-03T16:17:41.000Z | 2022-03-11T23:15:48.000Z | management/api/v1/serializers.py | basetwode/cypetulip | d6be294a288706c5661afb433215fe6c3ffea92b | [
"MIT"
] | null | null | null | from rest_framework import serializers
from management.models.main import MailSetting, LdapSetting, ShopSetting, LegalSetting, Header, CacheSetting, Footer
| 22.066667 | 116 | 0.702417 |
0c309ee4537295e1c6db342512009ad9c9a55328 | 9,854 | py | Python | tests/test_optimal.py | craffer/fantasy-coty | 08903cb138fa1c2d160b90fc028c8ec55901040b | [
"MIT"
] | null | null | null | tests/test_optimal.py | craffer/fantasy-coty | 08903cb138fa1c2d160b90fc028c8ec55901040b | [
"MIT"
] | 2 | 2019-12-21T18:48:40.000Z | 2019-12-22T20:19:20.000Z | tests/test_optimal.py | craffer/fantasy-coty | 08903cb138fa1c2d160b90fc028c8ec55901040b | [
"MIT"
] | null | null | null | """Unit test optimal lineup functions."""
import unittest
import copy
import ff_espn_api # pylint: disable=import-error
from collections import defaultdict
from fantasy_coty.main import add_to_optimal
if __name__ == "__main__":
unittest.main()
| 46.046729 | 100 | 0.623909 |
0c31fa4744359e49cd3c719e5fe2aae79bc7f68a | 5,391 | py | Python | spark/explorer.py | Elavarasan17/Stack-Overflow-Data-Dump-Analysis | 3742a1eef17b211ddcda4bd5f41d8a8c42ec228f | [
"zlib-acknowledgement",
"RSA-MD"
] | null | null | null | spark/explorer.py | Elavarasan17/Stack-Overflow-Data-Dump-Analysis | 3742a1eef17b211ddcda4bd5f41d8a8c42ec228f | [
"zlib-acknowledgement",
"RSA-MD"
] | null | null | null | spark/explorer.py | Elavarasan17/Stack-Overflow-Data-Dump-Analysis | 3742a1eef17b211ddcda4bd5f41d8a8c42ec228f | [
"zlib-acknowledgement",
"RSA-MD"
] | null | null | null | from pyspark import SparkConf, SparkContext
from pyspark.sql import SparkSession, functions, types
from pyspark.sql.functions import date_format
from pyspark.sql.functions import year, month, dayofmonth
import sys
import json
import argparse
assert sys.version_info >= (3, 5) # make sure we have Python 3.5+
# add more ... | 70.012987 | 325 | 0.725654 |
0c32795d8af79fcf1c3d723adbd4971a62b457ad | 2,177 | py | Python | self_supervised/loss.py | ravidziv/self-supervised-learning | f02c1639ce3c2119afa522e400d793e741fb68a0 | [
"MIT"
] | null | null | null | self_supervised/loss.py | ravidziv/self-supervised-learning | f02c1639ce3c2119afa522e400d793e741fb68a0 | [
"MIT"
] | null | null | null | self_supervised/loss.py | ravidziv/self-supervised-learning | f02c1639ce3c2119afa522e400d793e741fb68a0 | [
"MIT"
] | null | null | null | """Contrastive loss functions."""
from functools import partial
import tensorflow as tf
LARGE_NUM = 1e9
def add_supervised_loss(labels: tf.Tensor, logits: tf.Tensor):
"""Compute mean supervised loss over local batch."""
losses = tf.keras.losses.CategoricalCrossentropy(
from_logits=True, reduction=t... | 36.283333 | 81 | 0.683969 |
0c336dedc298c3448acb41a9e995e66ab5dfe2bf | 3,391 | py | Python | suzieq/engines/pandas/tables.py | zxiiro/suzieq | eca92820201c05bc80081599f69e41cd6b991107 | [
"Apache-2.0"
] | null | null | null | suzieq/engines/pandas/tables.py | zxiiro/suzieq | eca92820201c05bc80081599f69e41cd6b991107 | [
"Apache-2.0"
] | null | null | null | suzieq/engines/pandas/tables.py | zxiiro/suzieq | eca92820201c05bc80081599f69e41cd6b991107 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
from suzieq.engines.pandas.engineobj import SqPandasEngine
from suzieq.sqobjects import get_sqobject
| 34.252525 | 76 | 0.529932 |
0c34007b8ed98fbad90350a4894f2960e309e1be | 3,306 | py | Python | connect_box/data.py | jtru/python-connect-box | 2d26923e966fbb319760da82e3e71103018ded0b | [
"MIT"
] | null | null | null | connect_box/data.py | jtru/python-connect-box | 2d26923e966fbb319760da82e3e71103018ded0b | [
"MIT"
] | null | null | null | connect_box/data.py | jtru/python-connect-box | 2d26923e966fbb319760da82e3e71103018ded0b | [
"MIT"
] | null | null | null | """Handle Data attributes."""
from datetime import datetime
from ipaddress import IPv4Address, IPv6Address, ip_address as convert_ip
from typing import Iterable, Union
import attr
| 24.857143 | 82 | 0.635209 |
0c34fc08f42c8637a1d795a07180d44a6de5c252 | 4,946 | py | Python | components/server/src/data_model/sources/jenkins.py | m-zakeri/quality-time | 531931f0d8d4f5d262ea98445868158e41d268da | [
"Apache-2.0"
] | null | null | null | components/server/src/data_model/sources/jenkins.py | m-zakeri/quality-time | 531931f0d8d4f5d262ea98445868158e41d268da | [
"Apache-2.0"
] | null | null | null | components/server/src/data_model/sources/jenkins.py | m-zakeri/quality-time | 531931f0d8d4f5d262ea98445868158e41d268da | [
"Apache-2.0"
] | null | null | null | """Jenkins source."""
from ..meta.entity import Color, EntityAttributeType
from ..parameters import (
access_parameters,
Days,
FailureType,
MultipleChoiceParameter,
MultipleChoiceWithAdditionParameter,
TestResult,
)
from ..meta.source import Source
def jenkins_access_parameters(*args, **kwarg... | 38.640625 | 119 | 0.603114 |
0c3529b1f848cd4aef129f241e7149c8c46fd8c6 | 3,155 | py | Python | tests/test_transducer.py | dandersonw/myouji-kenchi | 6a373d8626995bf5d4383dcac4fc8e6372135640 | [
"MIT"
] | 7 | 2019-10-22T10:09:12.000Z | 2022-01-31T07:49:07.000Z | tests/test_transducer.py | dandersonw/myouji-kenchi | 6a373d8626995bf5d4383dcac4fc8e6372135640 | [
"MIT"
] | null | null | null | tests/test_transducer.py | dandersonw/myouji-kenchi | 6a373d8626995bf5d4383dcac4fc8e6372135640 | [
"MIT"
] | 1 | 2021-07-09T18:10:17.000Z | 2021-07-09T18:10:17.000Z | import myouji_kenchi
# Given that the output depends on what goes into the attested myouji file I'm
# hesitant to write too many tests in the blast radius of changes to that file
| 44.43662 | 78 | 0.66878 |
0c36ba1ececdebf56f9ae6696bc5d261578450ca | 1,668 | py | Python | algorithms/named/mergesort.py | thundergolfer/uni | e604d1edd8e5085f0ae1c0211015db38c07fc926 | [
"MIT"
] | 1 | 2022-01-06T04:50:09.000Z | 2022-01-06T04:50:09.000Z | algorithms/named/mergesort.py | thundergolfer/uni | e604d1edd8e5085f0ae1c0211015db38c07fc926 | [
"MIT"
] | 1 | 2022-01-23T06:09:21.000Z | 2022-01-23T06:14:17.000Z | algorithms/named/mergesort.py | thundergolfer/uni | e604d1edd8e5085f0ae1c0211015db38c07fc926 | [
"MIT"
] | null | null | null | import unittest
from typing import List, Optional
# Consider making generic with:
# https://stackoverflow.com/a/47970232/4885590
if __name__ == "__main__":
x = [10, 5, 9, 10, 3]
print(x)
merge_sort(x)
print(x)
unittest.main()
| 24.895522 | 80 | 0.576739 |
0c380570b168add317dd67b7037f3b6ec7e93c2b | 392 | py | Python | pages/main_page.py | thaidem/selenium-training-page-objects | 1f37a2b5287a502295bb57050c95455d68c2d3eb | [
"Apache-2.0"
] | null | null | null | pages/main_page.py | thaidem/selenium-training-page-objects | 1f37a2b5287a502295bb57050c95455d68c2d3eb | [
"Apache-2.0"
] | null | null | null | pages/main_page.py | thaidem/selenium-training-page-objects | 1f37a2b5287a502295bb57050c95455d68c2d3eb | [
"Apache-2.0"
] | null | null | null | from selenium.webdriver.support.wait import WebDriverWait
| 23.058824 | 67 | 0.670918 |
0c39dce08e2639d2b8e9721a52545154b1694858 | 196 | py | Python | src/frr/tests/lib/test_nexthop_iter.py | zhouhaifeng/vpe | 9c644ffd561988e5740021ed26e0f7739844353d | [
"Apache-2.0"
] | null | null | null | src/frr/tests/lib/test_nexthop_iter.py | zhouhaifeng/vpe | 9c644ffd561988e5740021ed26e0f7739844353d | [
"Apache-2.0"
] | null | null | null | src/frr/tests/lib/test_nexthop_iter.py | zhouhaifeng/vpe | 9c644ffd561988e5740021ed26e0f7739844353d | [
"Apache-2.0"
] | null | null | null | import frrtest
TestNexthopIter.onesimple("Simple test passed.")
TestNexthopIter.onesimple("PRNG test passed.")
| 19.6 | 48 | 0.785714 |
0c3b154bc332d251c3e35e98a56001cf94c27a53 | 1,319 | py | Python | setup.py | themis-project/themis-finals-checker-app-py | 12e70102bcca3d6e4082d96e676e364176c0da67 | [
"MIT"
] | null | null | null | setup.py | themis-project/themis-finals-checker-app-py | 12e70102bcca3d6e4082d96e676e364176c0da67 | [
"MIT"
] | null | null | null | setup.py | themis-project/themis-finals-checker-app-py | 12e70102bcca3d6e4082d96e676e364176c0da67 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import io
import os
about = {}
about_filename = os.path.join(
os.path.dirname(os.path.realpath(__file__)),
'themis', 'finals', 'checker', 'app', '__about__.py')
with io.open(about_filename, 'rb') as fp:
exec(fp.read(), about)
setup(
... | 26.918367 | 87 | 0.581501 |
0c3b1affbabd1c858deb93d0a0302a8d675091d1 | 8,090 | py | Python | tools/xenserver/cleanup_sm_locks.py | bopopescu/nova-token | ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2 | [
"Apache-2.0"
] | null | null | null | tools/xenserver/cleanup_sm_locks.py | bopopescu/nova-token | ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2 | [
"Apache-2.0"
] | null | null | null | tools/xenserver/cleanup_sm_locks.py | bopopescu/nova-token | ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2 | [
"Apache-2.0"
] | 2 | 2017-07-20T17:31:34.000Z | 2020-07-24T02:42:19.000Z | begin_unit
comment|'#!/usr/bin/env python'
nl|'\n'
nl|'\n'
comment|'# Copyright 2013 OpenStack Foundation'
nl|'\n'
comment|'#'
nl|'\n'
comment|'# Licensed under the Apache License, Version 2.0 (the "License");'
nl|'\n'
comment|'# you may not use this file except in compliance with the License.'
nl|'\n'
comment|'# You m... | 13.758503 | 495 | 0.591595 |
0c3c5abd70c1f21c01879c6ec3f584ca3464ae2e | 13,324 | py | Python | clifun.py | tdimiduk/clifun | d7e5acae0a76506d9440ae86a15341b6cc1cf25e | [
"MIT"
] | 1 | 2022-01-04T17:58:19.000Z | 2022-01-04T17:58:19.000Z | clifun.py | tdimiduk/clifun | d7e5acae0a76506d9440ae86a15341b6cc1cf25e | [
"MIT"
] | 4 | 2022-01-04T17:17:33.000Z | 2022-01-04T17:26:12.000Z | clifun.py | tdimiduk/clifun | d7e5acae0a76506d9440ae86a15341b6cc1cf25e | [
"MIT"
] | null | null | null | import datetime as dt
import importlib.util
import inspect
import itertools
import json
import os
import pathlib
import sys
import types
import typing
from typing import (
Any,
Callable,
Dict,
Generic,
Iterable,
Iterator,
List,
Optional,
Set,
Tuple,
Type,
TypeVar,
Uni... | 29.283516 | 120 | 0.590513 |
0c3c8f51e10f9073a8d53d99be68ca016464578d | 2,758 | py | Python | pages/views.py | joshua-hashimoto/eigo-of-the-day-django | 68ec7fe4257c67689de596cf34e991a3750b7f36 | [
"MIT"
] | null | null | null | pages/views.py | joshua-hashimoto/eigo-of-the-day-django | 68ec7fe4257c67689de596cf34e991a3750b7f36 | [
"MIT"
] | 8 | 2021-04-08T19:45:15.000Z | 2022-03-12T00:49:25.000Z | pages/views.py | joshua-hashimoto/eigo-of-the-day-django | 68ec7fe4257c67689de596cf34e991a3750b7f36 | [
"MIT"
] | null | null | null | import os
import json
import uuid
from django.conf import settings
from django.http import HttpResponse
from django.utils.translation import ugettext_lazy as _
from django.views.generic import View
import cloudinary
| 34.049383 | 85 | 0.591008 |
0c3e673531e09903ae71e40dc82ffb45887a73df | 1,776 | py | Python | shc/log/in_memory.py | fabaff/smarthomeconnect | 611cd0f372d03b5fc5798a2a9a5f962d1da72799 | [
"Apache-2.0"
] | 5 | 2021-07-02T21:48:45.000Z | 2021-12-12T21:55:42.000Z | shc/log/in_memory.py | fabaff/smarthomeconnect | 611cd0f372d03b5fc5798a2a9a5f962d1da72799 | [
"Apache-2.0"
] | 49 | 2020-09-18T20:05:55.000Z | 2022-03-05T19:51:33.000Z | shc/log/in_memory.py | fabaff/smarthomeconnect | 611cd0f372d03b5fc5798a2a9a5f962d1da72799 | [
"Apache-2.0"
] | 1 | 2021-12-10T14:50:43.000Z | 2021-12-10T14:50:43.000Z | import datetime
from typing import Optional, Type, Generic, List, Tuple
from ..base import T
from .generic import PersistenceVariable
| 36.244898 | 96 | 0.606419 |
0c3ec0f29f7bce414073cc341dd9839fbf5fca06 | 1,393 | py | Python | guts/api/contrib/type_actions.py | smallwormer/stable-liberty-guts | e635b710cdd210f70e9d50c3b85fffdeb53e8f01 | [
"Apache-2.0"
] | null | null | null | guts/api/contrib/type_actions.py | smallwormer/stable-liberty-guts | e635b710cdd210f70e9d50c3b85fffdeb53e8f01 | [
"Apache-2.0"
] | null | null | null | guts/api/contrib/type_actions.py | smallwormer/stable-liberty-guts | e635b710cdd210f70e9d50c3b85fffdeb53e8f01 | [
"Apache-2.0"
] | 1 | 2022-03-03T05:41:31.000Z | 2022-03-03T05:41:31.000Z | # Copyright (c) 2015 Aptira Pty Ltd.
# 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 requi... | 29.638298 | 78 | 0.724336 |
0c4122d4f0b749136bdf171cdb6e696eecf404bd | 8,579 | py | Python | models/StyleTransfer/AdaIN.py | mtroym/pytorch-train | 3b303b6c7e364a58cb88d7142da942a30cc2b255 | [
"Apache-2.0"
] | 2 | 2019-12-21T14:40:11.000Z | 2020-05-26T09:26:52.000Z | models/StyleTransfer/AdaIN.py | mtroym/pytorch-train | 3b303b6c7e364a58cb88d7142da942a30cc2b255 | [
"Apache-2.0"
] | null | null | null | models/StyleTransfer/AdaIN.py | mtroym/pytorch-train | 3b303b6c7e364a58cb88d7142da942a30cc2b255 | [
"Apache-2.0"
] | 1 | 2020-10-16T12:03:19.000Z | 2020-10-16T12:03:19.000Z | """
Author: Yiming Mao - mtroym@github
Description: Transplant from "https://github.com/xunhuang1995/AdaIN-style/blob/master/train.lua"
"""
import functools
import os
from collections import OrderedDict
import torch
import torch.nn as nn
from torchvision.models import vgg19
from datasets.utils import deno... | 40.852381 | 115 | 0.602518 |
0c418b56746d824c2d98f37af03cc0b209cd7415 | 1,099 | py | Python | airflow/migrations/versions/52d714495f0_job_id_indices.py | rubeshdcube/incubator-airflow | 5419fbb78a2ea2388456c356d2f899ea1991b2de | [
"Apache-2.0"
] | 6 | 2016-04-20T20:40:43.000Z | 2022-02-20T10:32:00.000Z | airflow/migrations/versions/52d714495f0_job_id_indices.py | curest0x1021/incubator-airflow | e6d3160a061dbaa6042d524095dcd1cbc15e0bcd | [
"Apache-2.0"
] | 13 | 2018-11-30T18:18:32.000Z | 2021-02-19T17:04:12.000Z | airflow/migrations/versions/52d714495f0_job_id_indices.py | curest0x1021/incubator-airflow | e6d3160a061dbaa6042d524095dcd1cbc15e0bcd | [
"Apache-2.0"
] | 9 | 2017-08-24T15:47:44.000Z | 2022-02-14T03:30:49.000Z | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | 27.475 | 98 | 0.755232 |
0c42822d78adfa0e7f0264f5d356cb0270939941 | 7,836 | py | Python | deep_semantic_similarity_keras.py | viksit/Deep-Semantic-Similarity-Model | 1dc94346801e711125fb573284a1984ce17fb90e | [
"MIT"
] | 3 | 2016-05-26T00:04:38.000Z | 2019-10-22T09:52:39.000Z | deep_semantic_similarity_keras.py | viksit/Deep-Semantic-Similarity-Model | 1dc94346801e711125fb573284a1984ce17fb90e | [
"MIT"
] | null | null | null | deep_semantic_similarity_keras.py | viksit/Deep-Semantic-Similarity-Model | 1dc94346801e711125fb573284a1984ce17fb90e | [
"MIT"
] | 1 | 2019-10-22T09:59:04.000Z | 2019-10-22T09:59:04.000Z | # Michael A. Alcorn (malcorn@redhat.com)
# An implementation of the Deep Semantic Similarity Model (DSSM) found in [1].
# [1] Shen, Y., He, X., Gao, J., Deng, L., and Mesnil, G. 2014. A latent semantic model
# with convolutional-pooling structure for information retrieval. In CIKM, pp. 101-110.
# http:/... | 49.910828 | 148 | 0.732006 |
0c4483174d1c4ff711dd1bd4cb802a150131d7f7 | 469 | py | Python | posthog/migrations/0087_fix_annotation_created_at.py | avoajaugochukwu/posthog | 7e7fd42b0542ebc4734aedb926df11d462e3dd4f | [
"MIT"
] | 7,409 | 2020-02-09T23:18:10.000Z | 2022-03-31T22:36:25.000Z | posthog/migrations/0087_fix_annotation_created_at.py | avoajaugochukwu/posthog | 7e7fd42b0542ebc4734aedb926df11d462e3dd4f | [
"MIT"
] | 5,709 | 2020-02-09T23:26:13.000Z | 2022-03-31T20:20:01.000Z | posthog/migrations/0087_fix_annotation_created_at.py | avoajaugochukwu/posthog | 7e7fd42b0542ebc4734aedb926df11d462e3dd4f | [
"MIT"
] | 647 | 2020-02-13T17:50:55.000Z | 2022-03-31T11:24:19.000Z | # Generated by Django 3.0.7 on 2020-10-14 07:46
import django.utils.timezone
from django.db import migrations, models
| 23.45 | 85 | 0.648188 |
0c476cbc9139db2d5b5477a2919a3f47a83b94b5 | 4,723 | py | Python | tumorevo/tumorfig/main.py | pedrofale/tumorevo | cf43f3854f6815c822cf4df71be82fc6dbae065b | [
"MIT"
] | 2 | 2022-02-08T12:54:58.000Z | 2022-03-04T12:21:06.000Z | tumorevo/tumorfig/main.py | pedrofale/tumorevo | cf43f3854f6815c822cf4df71be82fc6dbae065b | [
"MIT"
] | null | null | null | tumorevo/tumorfig/main.py | pedrofale/tumorevo | cf43f3854f6815c822cf4df71be82fc6dbae065b | [
"MIT"
] | null | null | null | """
Create a cartoon of a tumor given the frequencies of different genotypes.
"""
from .util import *
import pandas as pd
import matplotlib.pyplot as plt
import click
import os
from pathlib import Path
from pymuller import muller
if __name__ == "__main__":
main()
| 28.624242 | 85 | 0.547957 |
0c48b673acc0ea7efa42fafb3fba6d032e5deab7 | 196 | py | Python | src/brouwers/online_users/urls.py | modelbrouwers/modelbrouwers | e0ba4819bf726d6144c0a648fdd4731cdc098a52 | [
"MIT"
] | 6 | 2015-03-03T13:23:07.000Z | 2021-12-19T18:12:41.000Z | src/brouwers/online_users/urls.py | modelbrouwers/modelbrouwers | e0ba4819bf726d6144c0a648fdd4731cdc098a52 | [
"MIT"
] | 95 | 2015-02-07T00:55:39.000Z | 2022-02-08T20:22:05.000Z | src/brouwers/online_users/urls.py | modelbrouwers/modelbrouwers | e0ba4819bf726d6144c0a648fdd4731cdc098a52 | [
"MIT"
] | 2 | 2016-03-22T16:53:26.000Z | 2019-02-09T22:46:04.000Z | from django.conf.urls import url
from .views import get_online_users, set_online
app_name = 'online_users'
urlpatterns = [
url(r'^so/$', set_online),
url(r'^ous/$', get_online_users),
]
| 19.6 | 47 | 0.704082 |
0c49d08e42802a84e6d6315644d21f43e88ce921 | 5,881 | py | Python | dftb+/plot_spline.py | hsulab/DailyScripts | 26b03cfb721fd66f39c86df50d2ec5866e651d6e | [
"MIT"
] | 2 | 2020-06-08T21:39:44.000Z | 2020-10-18T15:12:47.000Z | dftb+/plot_spline.py | hsulab/DailyScripts | 26b03cfb721fd66f39c86df50d2ec5866e651d6e | [
"MIT"
] | null | null | null | dftb+/plot_spline.py | hsulab/DailyScripts | 26b03cfb721fd66f39c86df50d2ec5866e651d6e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import argparse
import numpy as np
import matplotlib as mpl
mpl.use('Agg') #silent mode
from matplotlib import pyplot as plt
from mpl_toolkits.axes_grid1.inset_locator import inset_axes, InsetPosition, zoomed_inset_axes, mark_inset
MAXLINE = 10000
def plo... | 29.70202 | 106 | 0.530012 |
0c4b5ba22b3ba7761012b4918404bffd6258a269 | 370 | py | Python | network_monitor/__init__.py | brennanhfredericks/network-monitor-client | 618d222bb015662c3958f0100a965f3c71b29d32 | [
"MIT"
] | null | null | null | network_monitor/__init__.py | brennanhfredericks/network-monitor-client | 618d222bb015662c3958f0100a965f3c71b29d32 | [
"MIT"
] | null | null | null | network_monitor/__init__.py | brennanhfredericks/network-monitor-client | 618d222bb015662c3958f0100a965f3c71b29d32 | [
"MIT"
] | null | null | null | import argparse
import netifaces
import sys
import signal
import os
import asyncio
from asyncio import CancelledError, Task
from typing import Optional, List, Any
from .services import (
Service_Manager,
Packet_Parser,
Packet_Submitter,
Packet_Filter,
)
from .configurations import generate_configu... | 16.818182 | 93 | 0.802703 |
0c4c75e50a5aeb0f4d0c50388de64676ac264483 | 1,516 | py | Python | investing_com/cs_pattern_list.py | filipecn/maldives | f20f17d817fc3dcad7f9674753744716d1d4c821 | [
"MIT"
] | 1 | 2021-09-17T18:04:33.000Z | 2021-09-17T18:04:33.000Z | investing_com/cs_pattern_list.py | filipecn/maldives | f20f17d817fc3dcad7f9674753744716d1d4c821 | [
"MIT"
] | null | null | null | investing_com/cs_pattern_list.py | filipecn/maldives | f20f17d817fc3dcad7f9674753744716d1d4c821 | [
"MIT"
] | 3 | 2021-09-17T18:04:43.000Z | 2022-03-18T20:04:07.000Z | #!/usr/bin/py
import pandas as pd
import os
# Holds investing.com candlestick patterns
| 29.72549 | 73 | 0.513852 |
0c4cdf64475499e51798185a532224a138493103 | 1,113 | py | Python | simpleTest04Client_.py | LaplaceKorea/APIClient | e772482c3d9cbedee98f46a3529dca5acc254f3c | [
"MIT"
] | null | null | null | simpleTest04Client_.py | LaplaceKorea/APIClient | e772482c3d9cbedee98f46a3529dca5acc254f3c | [
"MIT"
] | null | null | null | simpleTest04Client_.py | LaplaceKorea/APIClient | e772482c3d9cbedee98f46a3529dca5acc254f3c | [
"MIT"
] | null | null | null | from LaplaceWSAPIClient import *
from MarkowitzSerde import *
from TargetSerde import *
from Operators import *
from TargetOperators import *
from RLStructure import *
from ClientConfig import client_config
query = RLQuery("default", datetime(2021,1,1), datetime(2021,1,21), {
"BankAccount": 100000.0,
... | 27.146341 | 123 | 0.442947 |
0c4fdea50a153837205a14c5c61c7d560b9d7a43 | 14,406 | py | Python | vdisk.py | cookpan001/vdisk | 1414e5c20eba3722ce99818fe48ddf0217fb25ca | [
"BSD-3-Clause"
] | 1 | 2016-01-11T06:46:11.000Z | 2016-01-11T06:46:11.000Z | vdisk.py | cookpan001/vdisk | 1414e5c20eba3722ce99818fe48ddf0217fb25ca | [
"BSD-3-Clause"
] | null | null | null | vdisk.py | cookpan001/vdisk | 1414e5c20eba3722ce99818fe48ddf0217fb25ca | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
# author: cookpan001
import sys
import logging
import time
import mimetypes
import urllib
import urllib2
"""
oauth2 client
"""
"""
All the responses will be a Response object
"""
"""
The vdisk(weipan) client.
"""
| 36.470886 | 115 | 0.521102 |
0c50ef47cd53ea48685602b6b3d98c7fea184c96 | 263 | py | Python | setup.py | thevoxium/netspeed | 9e16a49d64da90a173ef9eaf491d4245c1023105 | [
"MIT"
] | null | null | null | setup.py | thevoxium/netspeed | 9e16a49d64da90a173ef9eaf491d4245c1023105 | [
"MIT"
] | null | null | null | setup.py | thevoxium/netspeed | 9e16a49d64da90a173ef9eaf491d4245c1023105 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name='netspeed',
version='0.1',
py_modules=['netspeed'],
install_requires=[
'Click',
'pyspeedtest'
],
entry_points='''
[console_scripts]
netspeed=netspeed:cli
''',
)
| 16.4375 | 29 | 0.558935 |
0c51490cf6a9e00d3f171f44d583a875d050c2af | 244 | py | Python | store/admin.py | salemzii/ChopFast | 95ea88387ecfdb56bd643970b69425b1a1c6f388 | [
"MIT"
] | null | null | null | store/admin.py | salemzii/ChopFast | 95ea88387ecfdb56bd643970b69425b1a1c6f388 | [
"MIT"
] | null | null | null | store/admin.py | salemzii/ChopFast | 95ea88387ecfdb56bd643970b69425b1a1c6f388 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import (Dish, Payments, Order, Delivery, OrderItem)
admin.site.register(Dish)
admin.site.register(Payments)
admin.site.register(Order)
admin.site.register(Delivery)
admin.site.register(OrderItem)
| 24.4 | 64 | 0.807377 |
0c517d2c976cb6c4a933b0a237cbe0bcc83aaacb | 31,109 | py | Python | hpedockerplugin/request_context.py | renovate-bot/python-hpedockerplugin | b7fa6b3193fa6dd42574585b4c621ff6a16babc9 | [
"Apache-2.0"
] | 49 | 2016-06-14T22:25:40.000Z | 2021-04-05T05:00:59.000Z | hpedockerplugin/request_context.py | imran-ansari/python-hpedockerplugin | e2726f48ac793dc894100e3772c40ce89bfe9bb8 | [
"Apache-2.0"
] | 550 | 2016-07-25T12:01:12.000Z | 2021-11-15T17:52:40.000Z | hpedockerplugin/request_context.py | imran-ansari/python-hpedockerplugin | e2726f48ac793dc894100e3772c40ce89bfe9bb8 | [
"Apache-2.0"
] | 96 | 2016-06-01T22:07:03.000Z | 2021-06-22T09:05:05.000Z | import abc
import json
import re
from collections import OrderedDict
from oslo_log import log as logging
import hpedockerplugin.exception as exception
from hpedockerplugin.hpe import share
LOG = logging.getLogger(__name__)
# To be implemented by derived class
def _default_req_ctxt_creator(self, contents... | 43.387727 | 79 | 0.567746 |
0c51d4fd680a6be2f21491d3d55f99e1a13769ea | 32,369 | py | Python | scripts/train_image_.py | shafieelab/SPyDERMAN | 1b3fe1d0fcb33dcaed85fb110c88575ffa6fb7b6 | [
"MIT"
] | 1 | 2021-01-26T18:07:56.000Z | 2021-01-26T18:07:56.000Z | scripts/train_image_.py | Deeksha-K/SPyDERMAN | 8cb4a3efc2b8706133f81e7bf878439110402434 | [
"MIT"
] | null | null | null | scripts/train_image_.py | Deeksha-K/SPyDERMAN | 8cb4a3efc2b8706133f81e7bf878439110402434 | [
"MIT"
] | 3 | 2021-01-26T18:07:39.000Z | 2021-04-07T22:07:01.000Z | import argparse
import csv
import os
import os.path as osp
import statistics
import tqdm
import time
from datetime import datetime
import copy
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
import helper_utils.network as network
import helper_utils.loss as loss
import helper_utils.pre... | 42.646904 | 170 | 0.575489 |
0c51eb0b9b67869087426ffee62488bbc0029d3f | 1,230 | py | Python | src/freshchat/client/configuration.py | twyla-ai/python-freshchat | 5bb0ea730f82b63292688be61315b6b880896e1f | [
"MIT"
] | 4 | 2019-10-15T11:03:28.000Z | 2021-08-19T01:14:12.000Z | src/freshchat/client/configuration.py | twyla-ai/python-freshchat | 5bb0ea730f82b63292688be61315b6b880896e1f | [
"MIT"
] | 137 | 2019-10-18T04:36:21.000Z | 2022-03-21T04:11:18.000Z | src/freshchat/client/configuration.py | twyla-ai/python-freshchat | 5bb0ea730f82b63292688be61315b6b880896e1f | [
"MIT"
] | 1 | 2021-08-19T01:14:14.000Z | 2021-08-19T01:14:14.000Z | import os
from dataclasses import dataclass, field
from typing import AnyStr, Dict, Optional
from urllib.parse import urljoin
| 28.604651 | 80 | 0.64065 |
0c521cb77fbca7152db05ece3eddd9a49ae59322 | 20,120 | py | Python | get_headers.py | rupendrab/py_unstr_parse | 3cece3fb7ca969734bf5e60fe5846a7148ce8be4 | [
"MIT"
] | null | null | null | get_headers.py | rupendrab/py_unstr_parse | 3cece3fb7ca969734bf5e60fe5846a7148ce8be4 | [
"MIT"
] | null | null | null | get_headers.py | rupendrab/py_unstr_parse | 3cece3fb7ca969734bf5e60fe5846a7148ce8be4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3.5
import sys
import re
import os
import csv
import numpy as np
from operator import itemgetter
from time import time
from multiprocessing import Pool
from extract_toc import parseargs
from predict_using_toc_mapper import Mapper, get_topic, read_model_file
from find_topics import toc_entries, ge... | 31.885895 | 174 | 0.655964 |
0c52238d0be9f0af598966fd7664c6c79e85f8cb | 6,214 | py | Python | dalle_pytorch/dalle_pytorch.py | tensorfork/DALLE-pytorch | 0e8f5d9a7fe054c587ed91d9c9616c7a883f393b | [
"MIT"
] | 1 | 2021-06-22T08:26:20.000Z | 2021-06-22T08:26:20.000Z | dalle_pytorch/dalle_pytorch.py | tensorfork/DALLE-pytorch | 0e8f5d9a7fe054c587ed91d9c9616c7a883f393b | [
"MIT"
] | null | null | null | dalle_pytorch/dalle_pytorch.py | tensorfork/DALLE-pytorch | 0e8f5d9a7fe054c587ed91d9c9616c7a883f393b | [
"MIT"
] | null | null | null | from math import log2
import torch
from torch import nn, einsum
import torch.nn.functional as F
from einops import rearrange
from x_transformers import Encoder, Decoder
# helpers
# classes
# main classes
| 30.019324 | 117 | 0.587383 |
0c52795432861cbcf4e3ec45d893ec1acc331585 | 7,668 | py | Python | aiida_phonopy/parsers/phonopy.py | giovannipizzi/aiida-phonopy | 26e419c34415c68f815fa81ce2ac644aa387ae72 | [
"MIT"
] | null | null | null | aiida_phonopy/parsers/phonopy.py | giovannipizzi/aiida-phonopy | 26e419c34415c68f815fa81ce2ac644aa387ae72 | [
"MIT"
] | null | null | null | aiida_phonopy/parsers/phonopy.py | giovannipizzi/aiida-phonopy | 26e419c34415c68f815fa81ce2ac644aa387ae72 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from aiida.orm.data.folder import FolderData
from aiida.parsers.parser import Parser
from aiida.common.datastructures import calc_states
from aiida.parsers.exceptions import OutputParsingError
from aiida.common.exceptions import UniquenessError
import numpy
from aiida.orm.data.array import Arra... | 36.865385 | 185 | 0.594027 |
0c52883ec5869dd4ebaf9438c8845a04d78492ff | 1,128 | py | Python | bagua/bagua_define.py | jphgxq/bagua | 3444f79b8fe9c9d2975a8994a1a613ebd14c3d33 | [
"MIT"
] | 1 | 2021-07-12T03:33:38.000Z | 2021-07-12T03:33:38.000Z | bagua/bagua_define.py | jphgxq/bagua | 3444f79b8fe9c9d2975a8994a1a613ebd14c3d33 | [
"MIT"
] | null | null | null | bagua/bagua_define.py | jphgxq/bagua | 3444f79b8fe9c9d2975a8994a1a613ebd14c3d33 | [
"MIT"
] | null | null | null | import enum
from typing import List
import sys
if sys.version_info >= (3, 9):
from typing import TypedDict # pytype: disable=not-supported-yet
else:
from typing_extensions import TypedDict # pytype: disable=not-supported-yet
from pydantic import BaseModel
def get_tensor_declaration_bytes(td: TensorDeclar... | 22.56 | 80 | 0.656915 |
0c53db086eb0eb7f6a00e60d3b14eacbfe7ba92e | 97 | py | Python | instaphotos/apps.py | LekamCharity/insta-IG | 0302440df3b2029297af54eb9c56090f82232973 | [
"MIT"
] | null | null | null | instaphotos/apps.py | LekamCharity/insta-IG | 0302440df3b2029297af54eb9c56090f82232973 | [
"MIT"
] | null | null | null | instaphotos/apps.py | LekamCharity/insta-IG | 0302440df3b2029297af54eb9c56090f82232973 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
| 16.166667 | 35 | 0.773196 |
0c5539475c0da1f3dfc53cbf5dc335c43077d9cf | 2,835 | py | Python | services/backend/expiring_links/tests/test_expiring_link_generator_serializer.py | patpio/drf_images_api | ef689bac10ce8b9d2f03d6b647fa4bbd70b02f1c | [
"Beerware"
] | 1 | 2022-02-27T16:34:46.000Z | 2022-02-27T16:34:46.000Z | services/backend/expiring_links/tests/test_expiring_link_generator_serializer.py | patpio/drf_images_api | ef689bac10ce8b9d2f03d6b647fa4bbd70b02f1c | [
"Beerware"
] | null | null | null | services/backend/expiring_links/tests/test_expiring_link_generator_serializer.py | patpio/drf_images_api | ef689bac10ce8b9d2f03d6b647fa4bbd70b02f1c | [
"Beerware"
] | null | null | null | import pytest
from expiring_links.serializers import ExpiringLinkGeneratorSerializer
| 42.954545 | 118 | 0.71358 |
0c553d8f4165e63fa177620f1fa3f79bb1b9cb45 | 91,609 | py | Python | com/vmware/nsx/trust_management_client.py | adammillerio/vsphere-automation-sdk-python | c07e1be98615201139b26c28db3aa584c4254b66 | [
"MIT"
] | null | null | null | com/vmware/nsx/trust_management_client.py | adammillerio/vsphere-automation-sdk-python | c07e1be98615201139b26c28db3aa584c4254b66 | [
"MIT"
] | null | null | null | com/vmware/nsx/trust_management_client.py | adammillerio/vsphere-automation-sdk-python | c07e1be98615201139b26c28db3aa584c4254b66 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#---------------------------------------------------------------------------
# Copyright 2020 VMware, Inc. All rights reserved.
# AUTO GENERATED FILE -- DO NOT MODIFY!
#
# vAPI stub file for package com.vmware.nsx.trust_management.
#-------------------------------------------------------------... | 44.40572 | 156 | 0.596492 |
0c5549700625606ae1bd959bf730c22c941eb303 | 4,255 | py | Python | bottleneck/tests/list_input_test.py | stroxler/bottleneck | 6e91bcb8a21170588ee9a3f2c425a4e307ae05de | [
"BSD-2-Clause"
] | 2 | 2015-05-26T09:06:32.000Z | 2015-05-26T09:06:46.000Z | bottleneck/tests/list_input_test.py | stroxler/bottleneck | 6e91bcb8a21170588ee9a3f2c425a4e307ae05de | [
"BSD-2-Clause"
] | null | null | null | bottleneck/tests/list_input_test.py | stroxler/bottleneck | 6e91bcb8a21170588ee9a3f2c425a4e307ae05de | [
"BSD-2-Clause"
] | null | null | null | "Test list input."
# For support of python 2.5
from __future__ import with_statement
import numpy as np
from numpy.testing import assert_equal, assert_array_almost_equal
import bottleneck as bn
# ---------------------------------------------------------------------------
# Check that functions can handle list input
... | 22.632979 | 77 | 0.636193 |
0c587de94c3ee270415110f012b7d77cb256c5a4 | 1,475 | py | Python | hanzo/warcindex.py | ukwa/warctools | f74061382d6bc37b6eec889a3aec26c5748d90d3 | [
"MIT"
] | 1 | 2020-09-03T00:51:50.000Z | 2020-09-03T00:51:50.000Z | hanzo/warcindex.py | martinsbalodis/warc-tools | d9d5e708e00bd0f6d9d0c2d95cbc9332f51b05e4 | [
"MIT"
] | null | null | null | hanzo/warcindex.py | martinsbalodis/warc-tools | d9d5e708e00bd0f6d9d0c2d95cbc9332f51b05e4 | [
"MIT"
] | 1 | 2021-04-12T01:45:14.000Z | 2021-04-12T01:45:14.000Z | #!/usr/bin/env python
"""warcindex - dump warc index"""
import os
import sys
import sys
import os.path
from optparse import OptionParser
from .warctools import WarcRecord, expand_files
parser = OptionParser(usage="%prog [options] warc warc warc")
parser.add_option("-l", "--limit", dest="limit")
parser.add_option(... | 23.412698 | 114 | 0.633898 |
0c599f149ff2c8a006a46a9e33e3ef181a3cc037 | 1,469 | py | Python | tsdata/migrations/0001_initial.py | OpenDataPolicingNC/Traffic-Stops | 74e0d16ad2ac32addca6f04d34c2ddf36d023990 | [
"MIT"
] | 25 | 2015-09-12T23:10:52.000Z | 2021-03-24T08:39:46.000Z | tsdata/migrations/0001_initial.py | OpenDataPolicingNC/Traffic-Stops | 74e0d16ad2ac32addca6f04d34c2ddf36d023990 | [
"MIT"
] | 159 | 2015-07-01T03:57:23.000Z | 2021-04-17T21:09:19.000Z | tsdata/migrations/0001_initial.py | copelco/NC-Traffic-Stops | 74e0d16ad2ac32addca6f04d34c2ddf36d023990 | [
"MIT"
] | 8 | 2015-10-02T16:56:40.000Z | 2020-10-18T01:16:29.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
| 40.805556 | 153 | 0.582709 |
0c5b11a856de6baa5333d1f6f60e74187acb3fcd | 1,836 | py | Python | api/tests/opentrons/protocol_engine/execution/test_run_control_handler.py | mrod0101/opentrons | 6450edb0421f1c2484c292f8583602d8f6fd13b8 | [
"Apache-2.0"
] | 235 | 2017-10-27T20:37:27.000Z | 2022-03-30T14:09:49.000Z | api/tests/opentrons/protocol_engine/execution/test_run_control_handler.py | koji/opentrons | 0f339f45de238183b2c433e67f839363d5177582 | [
"Apache-2.0"
] | 8,425 | 2017-10-26T15:25:43.000Z | 2022-03-31T23:54:26.000Z | api/tests/opentrons/protocol_engine/execution/test_run_control_handler.py | mrod0101/opentrons | 6450edb0421f1c2484c292f8583602d8f6fd13b8 | [
"Apache-2.0"
] | 130 | 2017-11-09T21:02:37.000Z | 2022-03-15T18:01:24.000Z | """Run control side-effect handler."""
import pytest
from decoy import Decoy
from opentrons.protocol_engine.state import StateStore
from opentrons.protocol_engine.actions import ActionDispatcher, PauseAction
from opentrons.protocol_engine.execution.run_control import RunControlHandler
from opentrons.protocol_engine.st... | 30.6 | 88 | 0.751634 |
0c5b7ae73a2b618a79092df65cc9600f76dbf5e0 | 510 | py | Python | Datasets/Generator/Healthcare/mergedrug.py | undraaa/m2bench | b661b61ca04470ed1c9c50531ce760a2cd5000d9 | [
"RSA-MD"
] | null | null | null | Datasets/Generator/Healthcare/mergedrug.py | undraaa/m2bench | b661b61ca04470ed1c9c50531ce760a2cd5000d9 | [
"RSA-MD"
] | null | null | null | Datasets/Generator/Healthcare/mergedrug.py | undraaa/m2bench | b661b61ca04470ed1c9c50531ce760a2cd5000d9 | [
"RSA-MD"
] | 1 | 2021-11-29T10:31:36.000Z | 2021-11-29T10:31:36.000Z | import json
import glob
| 26.842105 | 76 | 0.592157 |
0c5c225bea97b848df7068538bc1df5271634638 | 10,326 | py | Python | tests/test_rundramatiq_command.py | BradleyKirton/django_dramatiq | 93a4a9ae39aee643cc4a987b18030ad8d1fc8480 | [
"Apache-2.0"
] | null | null | null | tests/test_rundramatiq_command.py | BradleyKirton/django_dramatiq | 93a4a9ae39aee643cc4a987b18030ad8d1fc8480 | [
"Apache-2.0"
] | null | null | null | tests/test_rundramatiq_command.py | BradleyKirton/django_dramatiq | 93a4a9ae39aee643cc4a987b18030ad8d1fc8480 | [
"Apache-2.0"
] | null | null | null | import os
import sys
from io import StringIO
from unittest.mock import patch
from django.core.management import call_command
from django_dramatiq.management.commands import rundramatiq
def test_rundramatiq_command_autodiscovers_additional_modules(settings):
settings.DRAMATIQ_AUTODISCOVER_MODULES = ("ser... | 35.122449 | 93 | 0.673833 |
0c5c924b0477b69417c6a0474627207f48573e2f | 3,620 | py | Python | WordRPG/data/states/new_game.py | ChristopherLBruce/WordRPG | e545cf313afc430e8191a7c813db9ee9759a6fd4 | [
"Apache-2.0"
] | 2 | 2018-12-15T15:06:35.000Z | 2022-02-09T00:19:28.000Z | WordRPG/data/states/new_game.py | ChristopherLBruce/WordRPG | e545cf313afc430e8191a7c813db9ee9759a6fd4 | [
"Apache-2.0"
] | null | null | null | WordRPG/data/states/new_game.py | ChristopherLBruce/WordRPG | e545cf313afc430e8191a7c813db9ee9759a6fd4 | [
"Apache-2.0"
] | null | null | null | """ 'new_game' state. Includes character creation. """
from ...engine.gui.screen import const, Screen
from ...engine.state_machine import State
| 27.424242 | 86 | 0.551381 |
0c5da302d0cfb597c70f8c34fe51028d86ae2e18 | 2,106 | py | Python | guestbook.py | Tycx2ry/FKRTimeline | 11e784f4a3800336abf19c42c15a06c86af970bd | [
"Apache-2.0"
] | null | null | null | guestbook.py | Tycx2ry/FKRTimeline | 11e784f4a3800336abf19c42c15a06c86af970bd | [
"Apache-2.0"
] | null | null | null | guestbook.py | Tycx2ry/FKRTimeline | 11e784f4a3800336abf19c42c15a06c86af970bd | [
"Apache-2.0"
] | null | null | null | #!/usr /bin/env python
# -*- coding: utf-8 -*-
__author__ = 'jiangge'
from flask_sqlalchemy import SQLAlchemy
from datetime import datetime
from flask import Flask, request, render_template, redirect
application = Flask(__name__)
application.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///guestbook.db'
app... | 27.350649 | 73 | 0.632479 |
0c5db28673060acc0246927ee800263dd3a7f124 | 707 | py | Python | dash_test_runner/testapp/migrations/0001_initial.py | Ilhasoft/dash | d9b900cc08d9238304a226d837a4c90dec6b46fc | [
"BSD-3-Clause"
] | null | null | null | dash_test_runner/testapp/migrations/0001_initial.py | Ilhasoft/dash | d9b900cc08d9238304a226d837a4c90dec6b46fc | [
"BSD-3-Clause"
] | null | null | null | dash_test_runner/testapp/migrations/0001_initial.py | Ilhasoft/dash | d9b900cc08d9238304a226d837a4c90dec6b46fc | [
"BSD-3-Clause"
] | 1 | 2018-04-12T20:18:34.000Z | 2018-04-12T20:18:34.000Z | from django.db import migrations, models
| 32.136364 | 114 | 0.575672 |
0c5e4893a61a507b2525a971a14202b85e75581a | 6,596 | py | Python | tests/test_integration.py | Radico/business-rules | 7dd0551e8b33234fcea0abaf04f9982eb6f3426f | [
"MIT"
] | null | null | null | tests/test_integration.py | Radico/business-rules | 7dd0551e8b33234fcea0abaf04f9982eb6f3426f | [
"MIT"
] | null | null | null | tests/test_integration.py | Radico/business-rules | 7dd0551e8b33234fcea0abaf04f9982eb6f3426f | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from business_rules.actions import rule_action, BaseActions
from business_rules.engine import check_condition, run_all
from business_rules.fields import FIELD_TEXT, FIELD_NUMERIC, FIELD_SELECT
from business_rules.variables import BaseVariables, string_rule_variable, numeric_rule_v... | 27.256198 | 118 | 0.575045 |
0c5f5d9ac8242efc8ccf5bafaa6e567b8ee2cc86 | 5,808 | py | Python | cog/cli/user_argparser.py | Demonware/cog | b206066ebfd5faae000b1a1708988db8ca592b94 | [
"BSD-3-Clause"
] | 2 | 2016-06-02T02:15:56.000Z | 2016-08-16T08:37:27.000Z | cog/cli/user_argparser.py | Demonware/cog | b206066ebfd5faae000b1a1708988db8ca592b94 | [
"BSD-3-Clause"
] | null | null | null | cog/cli/user_argparser.py | Demonware/cog | b206066ebfd5faae000b1a1708988db8ca592b94 | [
"BSD-3-Clause"
] | null | null | null |
# -*- coding: utf-8 -*-
import sys
import argparse
arg_no = len(sys.argv)
tool_parser = argparse.ArgumentParser(add_help=False)
tool_subparsers = tool_parser.add_subparsers(help='commands', dest='command')
# The rename command.
rename_parser = tool_subparsers.add_parser('rename', help='rename an existing user acco... | 35.2 | 118 | 0.722968 |
0c605a349671fad2588ca9a0e3c2afed9c2453f5 | 6,235 | py | Python | custom_components/wisersmart/climate.py | tomtomfx/wiserSmartForHA | 9878840b073250302e583bd2f6040a825de97803 | [
"MIT"
] | 1 | 2020-10-06T19:49:59.000Z | 2020-10-06T19:49:59.000Z | custom_components/wisersmart/climate.py | tomtomfx/wiserSmartForHA | 9878840b073250302e583bd2f6040a825de97803 | [
"MIT"
] | 1 | 2020-10-06T20:18:32.000Z | 2020-10-24T19:50:53.000Z | custom_components/wisersmart/climate.py | tomtomfx/wiserSmartForHA | 9878840b073250302e583bd2f6040a825de97803 | [
"MIT"
] | 1 | 2021-04-12T16:37:40.000Z | 2021-04-12T16:37:40.000Z | """
Climate Platform Device for Wiser Smart
https://github.com/tomtomfx/wiserSmartForHA
thomas.fayoux@gmail.com
"""
import asyncio
import logging
import voluptuous as vol
from functools import partial
from ruamel.yaml import YAML as yaml
from homeassistant.components.climate import ClimateEntity
from homeassistant... | 28.865741 | 94 | 0.645549 |
0c60917a4d7a8f1d00442aa352ab85caf9e37f11 | 4,765 | py | Python | src/dataset/utils/process_df.py | Fkaneko/kaggle_g2net_gravitational_wave_detection- | 8bb32cc675e6b56171da8a3754fffeda41e934bb | [
"Apache-2.0"
] | null | null | null | src/dataset/utils/process_df.py | Fkaneko/kaggle_g2net_gravitational_wave_detection- | 8bb32cc675e6b56171da8a3754fffeda41e934bb | [
"Apache-2.0"
] | null | null | null | src/dataset/utils/process_df.py | Fkaneko/kaggle_g2net_gravitational_wave_detection- | 8bb32cc675e6b56171da8a3754fffeda41e934bb | [
"Apache-2.0"
] | null | null | null | import os
from functools import partial
from multiprocessing import Pool
from typing import Any, Callable, Dict, List, Optional
import numpy as np
import pandas as pd
from tqdm import tqdm
from src.dataset.utils.waveform_preprocessings import preprocess_strain
def id_2_path(
image_id: str,
is_train: bool = ... | 28.532934 | 87 | 0.570619 |
0c60c978bb3233d48fef80aac1fbd85b7650f54f | 637 | py | Python | sa/migrations/0051_managedobject_set_profile.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 84 | 2017-10-22T11:01:39.000Z | 2022-02-27T03:43:48.000Z | sa/migrations/0051_managedobject_set_profile.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 22 | 2017-12-11T07:21:56.000Z | 2021-09-23T02:53:50.000Z | sa/migrations/0051_managedobject_set_profile.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 23 | 2017-12-06T06:59:52.000Z | 2022-02-24T00:02:25.000Z | # ----------------------------------------------------------------------
# managedobject set profile
# ----------------------------------------------------------------------
# Copyright (C) 2007-2019 The NOC Project
# See LICENSE for details
# ----------------------------------------------------------------------
# NO... | 37.470588 | 90 | 0.470958 |
0c6180591c4611e118c4ac0d8c026f5d2d7c99fa | 305 | py | Python | oct2py/compat.py | sdvillal/oct2py | f7aa89b909cbb5959ddedf3ab3e743898eac3d45 | [
"MIT"
] | 8 | 2015-10-16T23:28:16.000Z | 2020-06-19T18:49:18.000Z | oct2py/compat.py | sdvillal/oct2py | f7aa89b909cbb5959ddedf3ab3e743898eac3d45 | [
"MIT"
] | 8 | 2015-06-25T20:57:56.000Z | 2020-04-03T22:33:16.000Z | oct2py/compat.py | sdvillal/oct2py | f7aa89b909cbb5959ddedf3ab3e743898eac3d45 | [
"MIT"
] | 6 | 2015-04-21T12:23:44.000Z | 2021-10-01T00:08:47.000Z | # -*- coding: utf-8 -*-
import sys
PY2 = sys.version[0] == '2'
PY3 = sys.version[0] == '3'
if PY2:
unicode = unicode
long = long
from StringIO import StringIO
import Queue as queue
else: # pragma : no cover
unicode = str
long = int
from io import StringIO
import queue
| 16.944444 | 33 | 0.606557 |
0c61d0a37539223a22a77c96706aa91e5bab6637 | 1,563 | py | Python | lambda_functions/compute/campaign/aws.py | pierrealixt/MapCampaigner | 7845bda4b0f6ccb7d18905a8c77d91ba6a4f78ad | [
"BSD-3-Clause"
] | null | null | null | lambda_functions/compute/campaign/aws.py | pierrealixt/MapCampaigner | 7845bda4b0f6ccb7d18905a8c77d91ba6a4f78ad | [
"BSD-3-Clause"
] | 1 | 2018-07-24T13:57:03.000Z | 2018-07-24T13:57:03.000Z | lambda_functions/compute/campaign/aws.py | pierrealixt/MapCampaigner | 7845bda4b0f6ccb7d18905a8c77d91ba6a4f78ad | [
"BSD-3-Clause"
] | null | null | null | import os
import json
import boto3
| 24.809524 | 78 | 0.515035 |