hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 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 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d9929b2974a50484aebf1dd099295fd25b742072 | 1,762 | py | Python | aliyun-python-sdk-live/aliyunsdklive/request/v20161101/DescribeForbidPushStreamRoomListRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | 1 | 2019-12-23T12:36:43.000Z | 2019-12-23T12:36:43.000Z | aliyun-python-sdk-live/aliyunsdklive/request/v20161101/DescribeForbidPushStreamRoomListRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-live/aliyunsdklive/request/v20161101/DescribeForbidPushStreamRoomListRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | null | null | null | # 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, Version 2.0 (the
# "License"); you may not u... | 32.62963 | 93 | 0.753689 |
e02f288051117ab4dc3224b75d67af6772f175fe | 263 | py | Python | Fizzbuzz/fizzbuzz.py | OlgaGesare/probable-memory | a0247a22e63c0f014f4e48fc3c44a73ef47f58a7 | [
"MIT"
] | null | null | null | Fizzbuzz/fizzbuzz.py | OlgaGesare/probable-memory | a0247a22e63c0f014f4e48fc3c44a73ef47f58a7 | [
"MIT"
] | null | null | null | Fizzbuzz/fizzbuzz.py | OlgaGesare/probable-memory | a0247a22e63c0f014f4e48fc3c44a73ef47f58a7 | [
"MIT"
] | null | null | null | def fizz_buzz(n):
""" return fizz when divisible by 3
return buzz when diviisible by 5
return fizzbuzz when divisible by both 3 and 5
"""
if n % 3 == 0 and n % 5 == 0:
return 'fizzbuzz'
elif n % 3 == 0:
return 'fizz'
elif n % 5 == 0:
return 'buzz' | 23.909091 | 47 | 0.619772 |
22ac28592d85d8d7aa545eab8d1aa6f685a0257f | 1,595 | py | Python | websocket_helper.py | Josverl/webrepl | 03492fef5c687e76057e6e93f6602b0a2dd5e660 | [
"MIT"
] | 494 | 2016-03-20T06:36:09.000Z | 2022-03-30T05:41:55.000Z | websocket_helper.py | Josverl/webrepl | 03492fef5c687e76057e6e93f6602b0a2dd5e660 | [
"MIT"
] | 58 | 2016-04-13T23:14:45.000Z | 2022-03-28T14:03:43.000Z | websocket_helper.py | Josverl/webrepl | 03492fef5c687e76057e6e93f6602b0a2dd5e660 | [
"MIT"
] | 272 | 2016-02-26T18:49:42.000Z | 2022-03-23T08:35:50.000Z | import sys
try:
import ubinascii as binascii
except:
import binascii
try:
import uhashlib as hashlib
except:
import hashlib
DEBUG = 0
def server_handshake(sock):
clr = sock.makefile("rwb", 0)
l = clr.readline()
#sys.stdout.write(repr(l))
webkey = None
while 1:
l = clr.rea... | 20.986842 | 62 | 0.594357 |
051ee17278479b4f25945d5666be9ade384f9852 | 8,772 | py | Python | naima/sherpa_models.py | DougBurke/naima | 7ac11246a8bca09d620a12a683e06bec6acb8ca4 | [
"BSD-3-Clause"
] | 1 | 2020-10-22T14:13:00.000Z | 2020-10-22T14:13:00.000Z | naima/sherpa_models.py | DougBurke/naima | 7ac11246a8bca09d620a12a683e06bec6acb8ca4 | [
"BSD-3-Clause"
] | null | null | null | naima/sherpa_models.py | DougBurke/naima | 7ac11246a8bca09d620a12a683e06bec6acb8ca4 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import numpy as np
import astropy.units as u
from sherpa.models.parameter import Parameter
from sherpa.models.model impor... | 35.370968 | 80 | 0.581737 |
8ed703f822943fca25bd3914394a358e20e187b7 | 775 | py | Python | pythonteste - aulas/Aula16Listas.py | freitasSystemOutPrint/Python3 | e5e88fbe8e7e0c5472573d2c901844270385194b | [
"MIT"
] | 1 | 2020-06-02T07:31:16.000Z | 2020-06-02T07:31:16.000Z | pythonteste - aulas/Aula16Listas.py | freitasSystemOutPrint/Python3 | e5e88fbe8e7e0c5472573d2c901844270385194b | [
"MIT"
] | null | null | null | pythonteste - aulas/Aula16Listas.py | freitasSystemOutPrint/Python3 | e5e88fbe8e7e0c5472573d2c901844270385194b | [
"MIT"
] | null | null | null | #num = (2, 5, 9, 1)
num = [2, 5, 9, 1]
num[2] = 3
num.append(7)
num.sort()
num.insert(2,9) #Insere o numero 9 na posicao 2
print(num)
num.pop() #Remove o utimo numero
num.pop(2) #Remove o 2 elemento
num.remove(2) #Remove o valor 2
if 4 in num:
num.remove(4)
else:
print('Não achei o numero 4')
num.sort(r... | 17.613636 | 51 | 0.630968 |
75519b6f917e02e459caf8015d8efe31c55829c6 | 1,443 | py | Python | neuralet-distancing.py | mdegans/smart-social-distancing | 91d52c4fe4fa8baba77596980ae84e79346a0a8f | [
"Apache-2.0"
] | null | null | null | neuralet-distancing.py | mdegans/smart-social-distancing | 91d52c4fe4fa8baba77596980ae84e79346a0a8f | [
"Apache-2.0"
] | null | null | null | neuralet-distancing.py | mdegans/smart-social-distancing | 91d52c4fe4fa8baba77596980ae84e79346a0a8f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
import argparse
from multiprocessing import Process
import threading
from libs.config_engine import ConfigEngine
import libs.pubsub
import logging
logger = logging.getLogger(__name__)
def start_engine(config, video_path):
from libs.core import Distancing as CvEngine
engine = CvEngine(confi... | 25.315789 | 77 | 0.71587 |
fc1cf08a66cc4e7684419f88186bed97f3285d40 | 377 | py | Python | network_billing_system/network_billing_system/doctype/internet_package_profile/internet_package_profile.py | muirawachanga/network_billing_management | 684321d9ead40a487636b1ee029b6c1f975427c1 | [
"MIT"
] | 1 | 2022-02-08T04:13:43.000Z | 2022-02-08T04:13:43.000Z | network_billing_system/network_billing_system/doctype/internet_package_profile/internet_package_profile.py | muirawachanga/network_billing_management | 684321d9ead40a487636b1ee029b6c1f975427c1 | [
"MIT"
] | null | null | null | network_billing_system/network_billing_system/doctype/internet_package_profile/internet_package_profile.py | muirawachanga/network_billing_management | 684321d9ead40a487636b1ee029b6c1f975427c1 | [
"MIT"
] | 3 | 2022-02-07T14:10:28.000Z | 2022-02-18T03:06:20.000Z | # Copyright (c) 2021, stephen and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
# from network_billing_system.kopokopo_integration import KopokopoConnector
# from frappe.utils import get_request_site_ad... | 26.928571 | 75 | 0.832891 |
22b2b1e5aff4e3c04aecf9c1d6bcc1dcb070ce15 | 776 | py | Python | scores/models/structure.py | danjpotter/footballdata | c06c6d389b37dca41a9bbbf0cd599de44add433f | [
"MIT"
] | null | null | null | scores/models/structure.py | danjpotter/footballdata | c06c6d389b37dca41a9bbbf0cd599de44add433f | [
"MIT"
] | null | null | null | scores/models/structure.py | danjpotter/footballdata | c06c6d389b37dca41a9bbbf0cd599de44add433f | [
"MIT"
] | null | null | null | from django.db import models
class Country(models.Model):
def __str__(self):
return self.name
name = models.CharField(max_length=50)
code = models.CharField(max_length=3)
class Competition(models.Model):
def __str__(self):
return self.name
name = models.CharField(max_length=50)... | 25.032258 | 79 | 0.685567 |
be74425bdd66266c94000168d6781dd7f3deab8d | 40 | py | Python | src/medical_metafeatures/feature_extraction/__init__.py | aquelemiguel/medical-mfe | 0e2937d0641656487c859009507850ebc9eaea78 | [
"MIT"
] | 2 | 2020-01-15T14:13:11.000Z | 2020-02-15T09:37:44.000Z | src/medical_metafeatures/feature_extraction/__init__.py | aquelemiguel/medical-mfe | 0e2937d0641656487c859009507850ebc9eaea78 | [
"MIT"
] | 4 | 2020-01-28T23:09:25.000Z | 2022-02-10T00:38:16.000Z | src/medical_metafeatures/feature_extraction/__init__.py | aquelemiguel/medical-mfe | 0e2937d0641656487c859009507850ebc9eaea78 | [
"MIT"
] | 2 | 2020-01-09T17:24:51.000Z | 2020-12-10T12:56:39.000Z | from .main import MetaFeatureExtraction
| 20 | 39 | 0.875 |
e48d4f0e6f575a9255b24a73844477dfb4af0e6e | 344 | py | Python | libbt/completedir/wincompletedirsetup.py | breezechen/zevent | f86219b3ce4afbb516b22c41ce125b0f916c490c | [
"Apache-2.0"
] | 1 | 2021-11-19T06:14:16.000Z | 2021-11-19T06:14:16.000Z | libbt/completedir/wincompletedirsetup.py | geniejl/zevent | 5dd3de57adf1deecc8f008db387ebfa460767fda | [
"Apache-2.0"
] | null | null | null | libbt/completedir/wincompletedirsetup.py | geniejl/zevent | 5dd3de57adf1deecc8f008db387ebfa460767fda | [
"Apache-2.0"
] | 2 | 2017-07-15T02:40:52.000Z | 2021-11-19T06:14:18.000Z | #!/usr/bin/env python
# Written by Bram Cohen
# see LICENSE.txt for license information
from distutils.core import setup
import py2exe
options = {'py2exe':{'compressed':1,'optimize':2,'bundle_files':1}}
setup(name='completedir',options=options,zipfile=None,
windows=[{'script':'btcompletedirgui.py','icon_resources'... | 28.666667 | 82 | 0.738372 |
86d4dbf40d3cd55e4bfefd7a90ecececa1fff84e | 23,170 | py | Python | tensorboard/plugins/hparams/summary_v2_test.py | kenfranko/tensorboard | 0b56d33ef422cdf7916e3ba2cb1674a669c42db7 | [
"Apache-2.0"
] | 1 | 2017-08-28T08:12:14.000Z | 2017-08-28T08:12:14.000Z | tensorboard/plugins/hparams/summary_v2_test.py | kenfranko/tensorboard | 0b56d33ef422cdf7916e3ba2cb1674a669c42db7 | [
"Apache-2.0"
] | 16 | 2017-08-31T05:13:08.000Z | 2020-07-09T03:22:14.000Z | tensorboard/plugins/hparams/summary_v2_test.py | kenfranko/tensorboard | 0b56d33ef422cdf7916e3ba2cb1674a669c42db7 | [
"Apache-2.0"
] | 1 | 2017-08-31T00:50:10.000Z | 2017-08-31T00:50:10.000Z | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 35.106061 | 120 | 0.591584 |
2e4d679e6c7f7289675be2aae92bbe7826466a0d | 6,335 | py | Python | neutronclient/common/exceptions.py | BobzhouCH/python-neutronclient-acc | ff58c60cc96c2e2a4e25088ae3ce5ff75ea42241 | [
"Apache-2.0"
] | null | null | null | neutronclient/common/exceptions.py | BobzhouCH/python-neutronclient-acc | ff58c60cc96c2e2a4e25088ae3ce5ff75ea42241 | [
"Apache-2.0"
] | null | null | null | neutronclient/common/exceptions.py | BobzhouCH/python-neutronclient-acc | ff58c60cc96c2e2a4e25088ae3ce5ff75ea42241 | [
"Apache-2.0"
] | null | null | null | # Copyright 2011 VMware, 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 a... | 26.069959 | 78 | 0.713181 |
3ceb9b91233d4db0df98b7fb14766c6d4e29299e | 6,171 | py | Python | pymatgen/io/abinit/tests/test_tasks.py | adozier/pymatgen | f1cc4d8db24ec11063be2fd84b4ea911f006eeb7 | [
"MIT"
] | null | null | null | pymatgen/io/abinit/tests/test_tasks.py | adozier/pymatgen | f1cc4d8db24ec11063be2fd84b4ea911f006eeb7 | [
"MIT"
] | null | null | null | pymatgen/io/abinit/tests/test_tasks.py | adozier/pymatgen | f1cc4d8db24ec11063be2fd84b4ea911f006eeb7 | [
"MIT"
] | 1 | 2018-04-09T21:49:14.000Z | 2018-04-09T21:49:14.000Z | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import unicode_literals, division, print_function
import os
from pymatgen.util.testing import PymatgenTest
from pymatgen.io.abinit.tasks import *
from pymatgen.io.abinit.tasks import TaskPolicy... | 33.177419 | 111 | 0.618538 |
c9e62641067a633d1b6b25f49ce15038814aa646 | 17,465 | py | Python | isi_sdk_8_2_2/isi_sdk_8_2_2/models/auth_user_create_params.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_2_2/isi_sdk_8_2_2/models/auth_user_create_params.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_2_2/isi_sdk_8_2_2/models/auth_user_create_params.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 9
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from isi_sdk_8_2_2.models.auth_ac... | 33.651252 | 252 | 0.610077 |
c95c7634326aa23940213a683ff6a88fe59a2104 | 23,769 | py | Python | tests/asp/AllAnswerSets/tight/graph.colouring.3.40.5_5.asp.test.py | bernardocuteri/wasp | 05c8f961776dbdbf7afbf905ee00fc262eba51ad | [
"Apache-2.0"
] | 19 | 2015-12-03T08:53:45.000Z | 2022-03-31T02:09:43.000Z | tests/asp/AllAnswerSets/tight/graph.colouring.3.40.5_5.asp.test.py | bernardocuteri/wasp | 05c8f961776dbdbf7afbf905ee00fc262eba51ad | [
"Apache-2.0"
] | 80 | 2017-11-25T07:57:32.000Z | 2018-06-10T19:03:30.000Z | tests/asp/AllAnswerSets/tight/graph.colouring.3.40.5_5.asp.test.py | bernardocuteri/wasp | 05c8f961776dbdbf7afbf905ee00fc262eba51ad | [
"Apache-2.0"
] | 6 | 2015-01-15T07:51:48.000Z | 2020-06-18T14:47:48.000Z | input = """
1 2 0 0
1 3 0 0
1 4 0 0
1 5 0 0
1 6 0 0
1 7 0 0
1 8 0 0
1 9 0 0
1 10 0 0
1 11 0 0
1 12 0 0
1 13 0 0
1 14 0 0
1 15 0 0
1 16 0 0
1 17 0 0
1 18 0 0
1 19 0 0
1 20 0 0
1 21 0 0
1 22 0 0
1 23 0 0
1 24 0 0
1 25 0 0
1 26 0 0
1 27 0 0
1 28 0 0
1 29 0 0
1 30 0 0
1 31 0 0
1 32 0 0
1 33 0 0
1 34 0 0
1 35 0 0
1 36 0 0
1... | 14.122995 | 17 | 0.626825 |
a788961ca835ba7c3b67df12e380f405d38877e1 | 1,035 | py | Python | morepath/tests/test_json_obj.py | DuncanBetts/morepath | acad10489b051df9c512f6735a9338854745a599 | [
"BSD-3-Clause"
] | null | null | null | morepath/tests/test_json_obj.py | DuncanBetts/morepath | acad10489b051df9c512f6735a9338854745a599 | [
"BSD-3-Clause"
] | null | null | null | morepath/tests/test_json_obj.py | DuncanBetts/morepath | acad10489b051df9c512f6735a9338854745a599 | [
"BSD-3-Clause"
] | null | null | null | import morepath
from webtest import TestApp as Client
def test_json_obj_dump():
class app(morepath.App):
pass
@app.path(path='/models/{x}')
class Model(object):
def __init__(self, x):
self.x = x
@app.json(model=Model)
def default(self, request):
return self
... | 20.7 | 43 | 0.584541 |
57ac21a89eff315f2290f0fef8c1a1c8bf7c2b50 | 9,066 | py | Python | ibmsecurity/isam/statistics.py | zone-zero/ibmsecurity | 7d3e38104b67e1b267e18a44845cb756a5302c3d | [
"Apache-2.0"
] | 46 | 2017-03-21T21:08:59.000Z | 2022-02-20T22:03:46.000Z | ibmsecurity/isam/statistics.py | zone-zero/ibmsecurity | 7d3e38104b67e1b267e18a44845cb756a5302c3d | [
"Apache-2.0"
] | 201 | 2017-03-21T21:25:52.000Z | 2022-03-30T21:38:20.000Z | ibmsecurity/isam/statistics.py | zone-zero/ibmsecurity | 7d3e38104b67e1b267e18a44845cb756a5302c3d | [
"Apache-2.0"
] | 91 | 2017-03-22T16:25:36.000Z | 2022-02-04T04:36:29.000Z | import logging
from ibmsecurity.utilities import tools
logger = logging.getLogger(__name__)
requires_model = "Appliance"
def get_network(isamAppliance, application_interface, statistics_duration, check_mode=False, force=False):
"""
Retrieving the Application Interface Statistics
"""
return isamApplian... | 56.6625 | 157 | 0.541584 |
35dae781752e7b04978f600a2c57dbcb9dbe70b8 | 2,658 | py | Python | src/scheduler/tests/test_sched.py | tessia-project/tessia-mesh | 571b9702247eb237258e9b03ad7440a29a6473b0 | [
"Apache-2.0"
] | 5 | 2020-06-04T10:20:33.000Z | 2020-10-26T15:09:19.000Z | mesh_components/scheduler/tests/test_sched.py | tessia-project/tessia | b9ded8dc7f0b9a7a0ea00d95b5ccc4af4d2e7540 | [
"Apache-2.0"
] | null | null | null | mesh_components/scheduler/tests/test_sched.py | tessia-project/tessia | b9ded8dc7f0b9a7a0ea00d95b5ccc4af4d2e7540 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 IBM Corp.
#
# 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, sof... | 26.316832 | 88 | 0.653875 |
8bbf31b2d616078238c259fbe500815a30df1c18 | 221 | py | Python | aula008 - UTILIZANDO MODULOS/ex021.py | miradouro/CursoEmVideo-Python | cc7b05a9a4aad8e6ef3b29453d83370094d75e41 | [
"MIT"
] | null | null | null | aula008 - UTILIZANDO MODULOS/ex021.py | miradouro/CursoEmVideo-Python | cc7b05a9a4aad8e6ef3b29453d83370094d75e41 | [
"MIT"
] | null | null | null | aula008 - UTILIZANDO MODULOS/ex021.py | miradouro/CursoEmVideo-Python | cc7b05a9a4aad8e6ef3b29453d83370094d75e41 | [
"MIT"
] | null | null | null | '''import pygame
pygame.init()
pygame.mixer.music.load('zzz.mp3')
pygame.mixer.music.play()
pygame.event.wait()
#este exemplo nao esta funcionando
'''
import os
import time
os.startfile(r'../ex/zzz.mp3')
time.sleep(10)
| 15.785714 | 34 | 0.728507 |
9e5f929f8102041cb2839d3810bd95dbe313e8bb | 1,665 | py | Python | managedtenants/utils/schema.py | sugarraysam/managed-tenants-cli | 59609583a86d1674f2c7376b601ce9ddfeee48de | [
"Apache-2.0"
] | null | null | null | managedtenants/utils/schema.py | sugarraysam/managed-tenants-cli | 59609583a86d1674f2c7376b601ce9ddfeee48de | [
"Apache-2.0"
] | null | null | null | managedtenants/utils/schema.py | sugarraysam/managed-tenants-cli | 59609583a86d1674f2c7376b601ce9ddfeee48de | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
import yaml
from jsonschema import Draft7Validator
from jsonschema.exceptions import SchemaError
from managedtenants.data.paths import DATA_DIR
def load_addon_metadata_schema():
"""
Wrapper that returns the addon metadata schema and utilizes
Singleton pattern for optimization.
... | 27.75 | 72 | 0.679279 |
87b067820524ae08d0c4d0f5103c1c13eee3a9f0 | 17,589 | py | Python | OnePy/fill/backtestfill.py | sibuzu/OnePy | 464fca1c68a10f90ad128da3bfb03f05d2fc24bc | [
"MIT"
] | null | null | null | OnePy/fill/backtestfill.py | sibuzu/OnePy | 464fca1c68a10f90ad128da3bfb03f05d2fc24bc | [
"MIT"
] | null | null | null | OnePy/fill/backtestfill.py | sibuzu/OnePy | 464fca1c68a10f90ad128da3bfb03f05d2fc24bc | [
"MIT"
] | null | null | null | from copy import copy
from OnePy.event import events
from OnePy.fill.fillbase import FillBase
class BacktestFill(FillBase):
def update_position(self, fillevent):
f = fillevent
last_position = self.position[-1]
if f.exectype in ["Limit", "Stop"]:
position = last_position
... | 38.40393 | 98 | 0.514469 |
9831f3a1a9ec4f899e28a11b9ae208f0d307ce66 | 2,430 | py | Python | setup.py | elenalape/http-prompt | 09fd0cce1f3d58bd945ab96a948456cb151ac28c | [
"MIT"
] | 1 | 2020-10-29T14:17:46.000Z | 2020-10-29T14:17:46.000Z | setup.py | elenalape/http-prompt | 09fd0cce1f3d58bd945ab96a948456cb151ac28c | [
"MIT"
] | null | null | null | setup.py | elenalape/http-prompt | 09fd0cce1f3d58bd945ab96a948456cb151ac28c | [
"MIT"
] | null | null | null | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import codecs
import os
import re
here = os.path.abspath(os.path.dirname(__file__))
# Read the version number from a source file.
# Why read it, and not import?
# see https://groups.google.com/d/topic/pypa-dev/0PkjVpcxTz... | 30.759494 | 74 | 0.633333 |
d6961cd8c056445b43bf1c5ab3e11701e4cc5615 | 1,442 | py | Python | model-optimizer/extensions/middle/FusedBatchNormTrainingCatch.py | zhoub/dldt | e42c01cf6e1d3aefa55e2c5df91f1054daddc575 | [
"Apache-2.0"
] | 3 | 2020-02-09T23:25:37.000Z | 2021-01-19T09:44:12.000Z | model-optimizer/extensions/middle/FusedBatchNormTrainingCatch.py | zhoub/dldt | e42c01cf6e1d3aefa55e2c5df91f1054daddc575 | [
"Apache-2.0"
] | null | null | null | model-optimizer/extensions/middle/FusedBatchNormTrainingCatch.py | zhoub/dldt | e42c01cf6e1d3aefa55e2c5df91f1054daddc575 | [
"Apache-2.0"
] | 2 | 2020-04-18T16:24:39.000Z | 2021-01-19T09:42:19.000Z | """
Copyright (c) 2018-2019 Intel Corporation
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 i... | 33.534884 | 103 | 0.720527 |
abda4393509c7f11816253f03d807925115099e5 | 7,355 | py | Python | TrainingExtensions/tensorflow/src/python/aimet_tensorflow/keras/adaround/adaround_wrapper.py | Lingkar/aimet | 2dff0d9bfafc164c97d591964cc2b0137964dd81 | [
"BSD-3-Clause"
] | null | null | null | TrainingExtensions/tensorflow/src/python/aimet_tensorflow/keras/adaround/adaround_wrapper.py | Lingkar/aimet | 2dff0d9bfafc164c97d591964cc2b0137964dd81 | [
"BSD-3-Clause"
] | null | null | null | TrainingExtensions/tensorflow/src/python/aimet_tensorflow/keras/adaround/adaround_wrapper.py | Lingkar/aimet | 2dff0d9bfafc164c97d591964cc2b0137964dd81 | [
"BSD-3-Clause"
] | null | null | null | # /usr/bin/env python3.6
# -*- mode: python -*-
# =============================================================================
# @@-COPYRIGHT-START-@@
#
# Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification,... | 42.761628 | 118 | 0.664582 |
cc76c4d10a40de9b90b708d59e4ebcf3ed92cd15 | 405 | py | Python | util/mat_ops/jacobian.py | jamesoneill12/LayerFusion | 99cba1030ed8c012a453bc7715830fc99fb980dc | [
"Apache-2.0"
] | null | null | null | util/mat_ops/jacobian.py | jamesoneill12/LayerFusion | 99cba1030ed8c012a453bc7715830fc99fb980dc | [
"Apache-2.0"
] | null | null | null | util/mat_ops/jacobian.py | jamesoneill12/LayerFusion | 99cba1030ed8c012a453bc7715830fc99fb980dc | [
"Apache-2.0"
] | null | null | null | import torch
def get_jacobian(net, x, noutputs):
x = x.squeeze()
n = x.size()[0]
x = x.repeat(noutputs, 1)
x.requires_grad_(True)
print(x.size())
y = net(x)
y.backward(torch.eye(noutputs))
return x.grad.data
if __name__ == "__main__":
from torch import nn
net, x, noutputs = ... | 21.315789 | 65 | 0.619753 |
e430225becde5cc28075c30a5f579b9aa56548b0 | 4,517 | py | Python | monodepth2/interior_dataset.py | rainfall1998/3D_reconstruction_system | 8cce44603f89623283e32c79be3db6131842137c | [
"Apache-2.0"
] | 1 | 2021-05-19T08:35:20.000Z | 2021-05-19T08:35:20.000Z | monodepth2/interior_dataset.py | rainfall1998/3D_reconstruction_system | 8cce44603f89623283e32c79be3db6131842137c | [
"Apache-2.0"
] | 4 | 2021-06-08T23:56:58.000Z | 2022-03-12T00:56:51.000Z | monodepth2/interior_dataset.py | rainfall1998/3D_reconstruction_system | 8cce44603f89623283e32c79be3db6131842137c | [
"Apache-2.0"
] | 1 | 2022-02-10T08:37:28.000Z | 2022-02-10T08:37:28.000Z | # Copyright Niantic 2020. Patent Pending. All rights reserved.
#
# This software is licensed under the terms of the Monodepth2 licence
# which allows for non-commercial use only, the full terms of which are made
# available in the LICENSE file.
from __future__ import absolute_import, division, print_function
... | 34.480916 | 133 | 0.578703 |
a3fe79fa7592dffd239672a48250de703ab0e2b2 | 8,335 | py | Python | ioos_qc/utils.py | glos/ioos_qc | 17e69ad582275be7ad0f5a2af40c11d810b344e8 | [
"Apache-2.0"
] | 31 | 2019-10-09T15:08:38.000Z | 2022-01-21T23:45:22.000Z | ioos_qc/utils.py | glos/ioos_qc | 17e69ad582275be7ad0f5a2af40c11d810b344e8 | [
"Apache-2.0"
] | 49 | 2019-10-09T18:58:29.000Z | 2022-02-08T22:52:34.000Z | ioos_qc/utils.py | glos/ioos_qc | 17e69ad582275be7ad0f5a2af40c11d810b344e8 | [
"Apache-2.0"
] | 13 | 2019-10-08T19:47:34.000Z | 2022-03-19T18:42:25.000Z | #!/usr/bin/env python
# coding=utf-8
import io
import logging
import simplejson as json
from typing import Any, Union
from numbers import Real
from pyproj import Geod
from pathlib import Path
from datetime import date, datetime
from collections import OrderedDict as odict
from collections.abc import Mapping
import num... | 31.100746 | 86 | 0.605519 |
814328217a58675fec028bc112543fb5f7bc4dc4 | 3,747 | py | Python | panoptic/pcv/components/ballot.py | pradeep-vishnu/pcv | b88e706f8c7a8649b29ea848ba8c7fbb5dfde359 | [
"MIT"
] | 23 | 2020-06-16T06:59:36.000Z | 2022-03-23T04:17:03.000Z | panoptic/pcv/components/ballot.py | pradeep-vishnu/pcv | b88e706f8c7a8649b29ea848ba8c7fbb5dfde359 | [
"MIT"
] | 2 | 2022-03-04T16:20:44.000Z | 2022-03-22T06:53:53.000Z | panoptic/pcv/components/ballot.py | pradeep-vishnu/pcv | b88e706f8c7a8649b29ea848ba8c7fbb5dfde359 | [
"MIT"
] | 3 | 2021-04-23T01:06:04.000Z | 2022-03-04T14:30:42.000Z | import numpy as np
import torch
import torch.nn as nn
from .snake import Snake
class Ballot(nn.Module):
def __init__(self, spec, num_groups):
super().__init__()
self.num_groups = num_groups
votes = []
smears = []
splits = []
acc_size = spec[0][0] # inner most siz... | 36.378641 | 82 | 0.555911 |
dee78170e8539d8476adf15cf44c5dbd3459b309 | 20,285 | py | Python | test_twarc.py | remagio/twarc | c2a04ac8a303f58c04b9a92d009ccd7ddd54f755 | [
"MIT"
] | null | null | null | test_twarc.py | remagio/twarc | c2a04ac8a303f58c04b9a92d009ccd7ddd54f755 | [
"MIT"
] | null | null | null | test_twarc.py | remagio/twarc | c2a04ac8a303f58c04b9a92d009ccd7ddd54f755 | [
"MIT"
] | 1 | 2020-05-23T18:44:52.000Z | 2020-05-23T18:44:52.000Z | import os
import re
import json
import time
import logging
import pytest
try:
from unittest.mock import patch, call, MagicMock # Python 3
except ImportError:
from mock import patch, call, MagicMock # Python 2
from requests_oauthlib import OAuth1Session
import requests
import twarc
"""
You will need to ha... | 31.596573 | 90 | 0.654079 |
b4f507a60dd624e7d6d265f26a01ff659f04e4eb | 1,020 | py | Python | homeassistant/components/sonos/__init__.py | kdschlosser/home-assistant | a94a24f6f83508642e220fadf2799789dc32a25b | [
"Apache-2.0"
] | 2 | 2020-06-17T01:23:01.000Z | 2020-06-18T22:17:14.000Z | homeassistant/components/sonos/__init__.py | kdschlosser/home-assistant | a94a24f6f83508642e220fadf2799789dc32a25b | [
"Apache-2.0"
] | 6 | 2021-02-08T21:02:40.000Z | 2022-03-12T00:52:16.000Z | homeassistant/components/sonos/__init__.py | kdschlosser/home-assistant | a94a24f6f83508642e220fadf2799789dc32a25b | [
"Apache-2.0"
] | 1 | 2019-08-13T11:54:30.000Z | 2019-08-13T11:54:30.000Z | """Component to embed Sonos."""
from homeassistant import config_entries
from homeassistant.helpers import config_entry_flow
DOMAIN = 'sonos'
REQUIREMENTS = ['pysonos==0.0.6']
async def async_setup(hass, config):
"""Set up the Sonos component."""
conf = config.get(DOMAIN)
hass.data[DOMAIN] = conf or {}... | 26.153846 | 78 | 0.729412 |
5c7dc8479c04f2d973747e2a77b5a99e7d14c813 | 8,576 | py | Python | autopxd/writer.py | elijahr/python-autopxd2 | 4675488de8227390f87e864c7da84d7ffcf32db7 | [
"MIT"
] | 25 | 2018-04-02T22:28:06.000Z | 2021-10-07T20:11:42.000Z | autopxd/writer.py | elijahr/python-autopxd2 | 4675488de8227390f87e864c7da84d7ffcf32db7 | [
"MIT"
] | 23 | 2019-01-21T17:50:48.000Z | 2021-12-14T16:24:59.000Z | autopxd/writer.py | elijahr/python-autopxd2 | 4675488de8227390f87e864c7da84d7ffcf32db7 | [
"MIT"
] | 5 | 2019-03-03T22:48:48.000Z | 2021-09-26T19:37:22.000Z | from pycparser import (
c_ast,
)
from .declarations import (
STDINT_DECLARATIONS,
)
from .keywords import (
keywords,
)
from .nodes import (
Array,
Block,
Enum,
Function,
IdentifierType,
Ptr,
PxdNode,
Type,
)
def escape(name, include_C_name=False):
... | 35.882845 | 99 | 0.540345 |
1aed2c4762b954c5ee18e7baee51167f6baa046f | 56 | py | Python | xshtoom/rtp/__init__.py | twisted/sine | a81b653641b559936bb35bb328eafe44d420b162 | [
"MIT"
] | 5 | 2015-08-11T02:21:46.000Z | 2018-12-03T17:20:37.000Z | xshtoom/rtp/__init__.py | DalavanCloud/sine | a81b653641b559936bb35bb328eafe44d420b162 | [
"MIT"
] | 1 | 2021-02-18T20:02:03.000Z | 2021-02-18T20:02:03.000Z | xshtoom/rtp/__init__.py | DalavanCloud/sine | a81b653641b559936bb35bb328eafe44d420b162 | [
"MIT"
] | 6 | 2015-05-22T07:52:59.000Z | 2018-12-03T17:20:26.000Z | # This file is needed to make this directory a package.
| 28 | 55 | 0.767857 |
3a5eb7c1ce8bb5c47b181dd9778527e343751d02 | 565 | py | Python | plotly/validators/histogram2dcontour/colorbar/_x.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 12 | 2020-04-18T18:10:22.000Z | 2021-12-06T10:11:15.000Z | plotly/validators/histogram2dcontour/colorbar/_x.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 27 | 2020-04-28T21:23:12.000Z | 2021-06-25T15:36:38.000Z | plotly/validators/histogram2dcontour/colorbar/_x.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 6 | 2020-04-18T23:07:08.000Z | 2021-11-18T07:53:06.000Z | import _plotly_utils.basevalidators
class XValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self,
plotly_name='x',
parent_name='histogram2dcontour.colorbar',
**kwargs
):
super(XValidator, self).__init__(
plotly_name=plotly_name,
... | 26.904762 | 63 | 0.578761 |
31f9a8e4dd63eb9e94143879dab2ca10b0e95f8e | 29 | py | Python | cobalt8/__init__.py | 8o-COLLECTIVE/cobalt8 | 3b9bff58e59d1b14e0d9ffc01b20e72cf6707b98 | [
"MIT"
] | null | null | null | cobalt8/__init__.py | 8o-COLLECTIVE/cobalt8 | 3b9bff58e59d1b14e0d9ffc01b20e72cf6707b98 | [
"MIT"
] | null | null | null | cobalt8/__init__.py | 8o-COLLECTIVE/cobalt8 | 3b9bff58e59d1b14e0d9ffc01b20e72cf6707b98 | [
"MIT"
] | null | null | null | from .cobalt8 import Cobalt8
| 14.5 | 28 | 0.827586 |
f82ab9e6650e8aeb298949230df0eaffe0d659c0 | 665 | py | Python | fulfillment/OrderReturn/OrderReturn.py | tat2ddaddy/EasyPost-Fulfillment | 4f04ac85e2da1054add8a7fed1a3bff65eea6214 | [
"MIT"
] | 1 | 2020-01-31T23:31:24.000Z | 2020-01-31T23:31:24.000Z | fulfillment/OrderReturn/OrderReturn.py | tat2ddaddy/EasyPost-Fulfillment | 4f04ac85e2da1054add8a7fed1a3bff65eea6214 | [
"MIT"
] | null | null | null | fulfillment/OrderReturn/OrderReturn.py | tat2ddaddy/EasyPost-Fulfillment | 4f04ac85e2da1054add8a7fed1a3bff65eea6214 | [
"MIT"
] | 1 | 2020-03-10T01:28:32.000Z | 2020-03-10T01:28:32.000Z | import fulfillment.core
base_url = 'order_returns/'
# order return functions to send to core
def create(order_id, line_items):
url = fulfillment.core.base_url + base_url
data = {'order_id': order_id, 'line_items': line_items}
fulfillment.core.Resource.create(url, data)
def retrieve(return_id):
url = ... | 30.227273 | 59 | 0.747368 |
8bb5eee59701b2ffa7d47679f843573b7da9744b | 153 | py | Python | src/ToolChainSCDG/procedures/linux/custom_package/clock.py | AnonymousSEMA/SEMA-ToolChain | 05d6a7e43e10d4b1f6c5dfb70fbabeab3d4daf82 | [
"BSD-2-Clause"
] | null | null | null | src/ToolChainSCDG/procedures/linux/custom_package/clock.py | AnonymousSEMA/SEMA-ToolChain | 05d6a7e43e10d4b1f6c5dfb70fbabeab3d4daf82 | [
"BSD-2-Clause"
] | null | null | null | src/ToolChainSCDG/procedures/linux/custom_package/clock.py | AnonymousSEMA/SEMA-ToolChain | 05d6a7e43e10d4b1f6c5dfb70fbabeab3d4daf82 | [
"BSD-2-Clause"
] | null | null | null | import angr
import time as timer
class clock(angr.SimProcedure):
def run(self):
n_clock = int(timer.clock() * 1000)
return n_clock
| 17 | 43 | 0.653595 |
7102b68a1b3a5dbef4f23d4b4263cd702452904a | 4,018 | py | Python | data/test/python/7102b68a1b3a5dbef4f23d4b4263cd702452904astoryxml.py | harshp8l/deep-learning-lang-detection | 2a54293181c1c2b1a2b840ddee4d4d80177efb33 | [
"MIT"
] | 84 | 2017-10-25T15:49:21.000Z | 2021-11-28T21:25:54.000Z | data/test/python/7102b68a1b3a5dbef4f23d4b4263cd702452904astoryxml.py | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 5 | 2018-03-29T11:50:46.000Z | 2021-04-26T13:33:18.000Z | data/test/python/7102b68a1b3a5dbef4f23d4b4263cd702452904astoryxml.py | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 24 | 2017-11-22T08:31:00.000Z | 2022-03-27T01:22:31.000Z | """ storyxml.py
Contains a "broker" class that makes it easy to access data in the story XML files uploaded by the Flash applet;
this class is separated from views_flash.py to improve readability of the code and to avoid introducing "non-django view"
functions/classes into that module (separation of concerns, thus).
"... | 43.673913 | 124 | 0.605525 |
f0d117bd8f36f523ce714a90db99cc7e04ae28d7 | 2,249 | py | Python | django_pymorphy2/templatetags/pymorphy_tags.py | ITrex/django-pymorphy2 | d3557da0f845c177367df948afddc106d48862f4 | [
"MIT"
] | 4 | 2017-07-25T16:28:37.000Z | 2021-07-08T06:31:23.000Z | django_pymorphy2/templatetags/pymorphy_tags.py | ITrex/django-pymorphy2 | d3557da0f845c177367df948afddc106d48862f4 | [
"MIT"
] | null | null | null | django_pymorphy2/templatetags/pymorphy_tags.py | ITrex/django-pymorphy2 | d3557da0f845c177367df948afddc106d48862f4 | [
"MIT"
] | 7 | 2015-05-07T08:47:51.000Z | 2020-07-06T12:40:58.000Z | #coding: utf-8
from __future__ import unicode_literals, absolute_import
"""
Создано на основе
https://github.com/kmike/pymorphy/blob/master/pymorphy/templatetags/pymorphy_tags.py
"""
import re
from django import template
from django.utils.text import force_text
from django_pymorphy2.config import MARKER_OPE... | 29.986667 | 108 | 0.734104 |
dcafa80f1b7a7a53bd57ffcecbaa64c90585414a | 1,065 | py | Python | anonlink/util.py | luyang1210/PPRL | 3e59ab82c4474efbcc88ab5c13b562d7e5a7ff87 | [
"Apache-2.0"
] | null | null | null | anonlink/util.py | luyang1210/PPRL | 3e59ab82c4474efbcc88ab5c13b562d7e5a7ff87 | [
"Apache-2.0"
] | null | null | null | anonlink/util.py | luyang1210/PPRL | 3e59ab82c4474efbcc88ab5c13b562d7e5a7ff87 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3.4
import os
import random
from bitarray import bitarray
def generate_bitarray(length):
a = bitarray(endian=['little', 'big'][random.randint(0, 1)])
a.frombytes(os.urandom(length//8))
return a
def generate_clks(n):
res = []
for i in range(n):
ba = generate_bitarray... | 24.767442 | 68 | 0.612207 |
f9790df657fddf2a6f8f4a028b7ef1ea564ecfd5 | 3,472 | py | Python | sdk/python/pulumi_packet/get_device_bgp_neighbors.py | pulumi/pulumi-packet | 2d72d0c426057d7cafeb518cd8c1ec5a402643fa | [
"ECL-2.0",
"Apache-2.0"
] | 9 | 2018-12-16T20:46:51.000Z | 2020-09-07T16:16:13.000Z | sdk/python/pulumi_packet/get_device_bgp_neighbors.py | pulumi/pulumi-packet | 2d72d0c426057d7cafeb518cd8c1ec5a402643fa | [
"ECL-2.0",
"Apache-2.0"
] | 14 | 2019-02-20T22:23:46.000Z | 2020-12-14T10:26:03.000Z | sdk/python/pulumi_packet/get_device_bgp_neighbors.py | pulumi/pulumi-packet | 2d72d0c426057d7cafeb518cd8c1ec5a402643fa | [
"ECL-2.0",
"Apache-2.0"
] | 3 | 2019-04-30T13:55:13.000Z | 2020-10-28T20:49:15.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from . import _utilities... | 34.376238 | 155 | 0.689804 |
02de1fe497ab8e1e58f0ae8e80805f7aaaa1b1b8 | 1,973 | py | Python | grapaold/layerfiles/gaddbias.py | psorus/grapa | 6af343bb35c466c971ded1876e7a9d00e77cef00 | [
"MIT"
] | null | null | null | grapaold/layerfiles/gaddbias.py | psorus/grapa | 6af343bb35c466c971ded1876e7a9d00e77cef00 | [
"MIT"
] | null | null | null | grapaold/layerfiles/gaddbias.py | psorus/grapa | 6af343bb35c466c971ded1876e7a9d00e77cef00 | [
"MIT"
] | null | null | null | import numpy as np
import math
from tensorflow.keras import backend as K
from tensorflow.keras.layers import Layer,Dense, Activation
import tensorflow.keras as keras# as k
import tensorflow as t
from tensorflow.keras.models import Sequential
from tensorflow.keras.optimizers import Adam,SGD
from tensorflow.linalg impor... | 23.771084 | 102 | 0.628991 |
1b5cca615be9b3c5bdee0a4617c056fb02e5b791 | 14,119 | py | Python | pysnmp-with-texts/CISCO-VIRTUAL-NW-IF-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/CISCO-VIRTUAL-NW-IF-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/CISCO-VIRTUAL-NW-IF-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module CISCO-VIRTUAL-NW-IF-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-VIRTUAL-NW-IF-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:18:19 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 ... | 170.108434 | 1,752 | 0.779588 |
b0bfde37f5717ae47efdfa529c266302219f9d37 | 108 | py | Python | ee/connectors/db/loaders/snowflake_loader.py | nogamenofun98/openreplay | 543384496fbfd5bd95482bd51b15865acba78bda | [
"MIT"
] | 3,614 | 2021-05-22T08:23:31.000Z | 2022-03-31T19:46:01.000Z | ee/connectors/db/loaders/snowflake_loader.py | tares003/openreplay | 098a0675286710f261425a2aece51644c86e1900 | [
"MIT"
] | 245 | 2021-05-25T14:49:35.000Z | 2022-03-30T22:15:28.000Z | ee/connectors/db/loaders/snowflake_loader.py | tares003/openreplay | 098a0675286710f261425a2aece51644c86e1900 | [
"MIT"
] | 151 | 2021-05-22T07:57:17.000Z | 2022-03-29T00:37:31.000Z |
def insert_to_snowflake(db, df, table):
df.to_sql(table, db.engine, if_exists='append', index=False)
| 18 | 64 | 0.712963 |
31d24307487b4c6d0f58f9543ab75e9025a9e144 | 783 | py | Python | ramp/RAMP_households/Urban/Inputs/Tier-1/input_file_10.py | giacfalk/M-LED | de52327272f11cd48f73bdb4c0b660fa2c6b0089 | [
"MIT"
] | 3 | 2021-02-18T15:15:30.000Z | 2021-05-07T07:48:50.000Z | ramp/RAMP_households/Urban/Inputs/Tier-1/input_file_3.py | giacfalk/M-LED | de52327272f11cd48f73bdb4c0b660fa2c6b0089 | [
"MIT"
] | null | null | null | ramp/RAMP_households/Urban/Inputs/Tier-1/input_file_3.py | giacfalk/M-LED | de52327272f11cd48f73bdb4c0b660fa2c6b0089 | [
"MIT"
] | 2 | 2020-08-23T20:30:14.000Z | 2022-01-16T16:36:44.000Z | # -*- coding: utf-8 -*-
#%% Definition of the inputs
'''
Input data definition
'''
from core import User, np
User_list = []
#Create new urban user classes
LIU = User("low income urban",100)
User_list.append(LIU)
#Create new appliances
#Low Income Urban
LIU_light_bulb = LIU.Appliance(LIU,3,20,3,120,0.2,10)
LIU... | 21.75 | 65 | 0.687101 |
e6931467e02a5dee50f6479b0aa9ac912fe33e53 | 22,843 | py | Python | qcodes/instrument_drivers/Keysight/Infiniium.py | qSaevar/Qcodes | 07b42534855aa545be528859b20a01e157b757ab | [
"MIT"
] | 1 | 2019-10-12T04:54:30.000Z | 2019-10-12T04:54:30.000Z | qcodes/instrument_drivers/Keysight/Infiniium.py | qSaevar/Qcodes | 07b42534855aa545be528859b20a01e157b757ab | [
"MIT"
] | null | null | null | qcodes/instrument_drivers/Keysight/Infiniium.py | qSaevar/Qcodes | 07b42534855aa545be528859b20a01e157b757ab | [
"MIT"
] | null | null | null | import logging
from typing import Dict, Callable
from functools import partial
import numpy as np
from qcodes import VisaInstrument, validators as vals
from qcodes import InstrumentChannel, ChannelList, Instrument
from qcodes import ArrayParameter
from qcodes.utils.validators import Enum, Numbers
log = logging.getL... | 41.158559 | 88 | 0.468152 |
abef1be58d24f675db28e9a6e741dcfcfead44f0 | 38,161 | py | Python | pyhap/hap_server.py | xdissent/HAP-python | c19a67f6815d3c208111c4d5ac34dc2b1265f069 | [
"Apache-2.0"
] | null | null | null | pyhap/hap_server.py | xdissent/HAP-python | c19a67f6815d3c208111c4d5ac34dc2b1265f069 | [
"Apache-2.0"
] | null | null | null | pyhap/hap_server.py | xdissent/HAP-python | c19a67f6815d3c208111c4d5ac34dc2b1265f069 | [
"Apache-2.0"
] | null | null | null | """This module implements the communication of HAP.
The HAPServer is the point of contact to and from the world.
The HAPServerHandler manages the state of the connection and handles incoming requests.
The HAPSocket is a socket implementation that manages the "TLS" of the connection.
"""
from http.server import HTTPSer... | 39.917364 | 91 | 0.643379 |
dfa6eda887c3616830a40b065b23f881d9b8b0a7 | 36,435 | py | Python | Tests/test_functions.py | DanielRosenwasser/Pyjion | 83899589fab56b7abef23c7207171fe2b954c37d | [
"MIT"
] | null | null | null | Tests/test_functions.py | DanielRosenwasser/Pyjion | 83899589fab56b7abef23c7207171fe2b954c37d | [
"MIT"
] | null | null | null | Tests/test_functions.py | DanielRosenwasser/Pyjion | 83899589fab56b7abef23c7207171fe2b954c37d | [
"MIT"
] | null | null | null | import gc
import sys
import pyjion
import pyjion.dis
import unittest
import math
import time
class ScopeLeaksTestCase(unittest.TestCase):
def setUp(self) -> None:
pyjion.enable()
def tearDown(self) -> None:
pyjion.disable()
gc.collect()
def test_slice(self):
a = "12345"
... | 33.4573 | 141 | 0.521833 |
d42b48a65bc1f3398c76f8c1fa9ffca187a4a8e6 | 1,623 | py | Python | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/cps/apis/CreateServerGroupRequest.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 14 | 2018-04-19T09:53:56.000Z | 2022-01-27T06:05:48.000Z | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/cps/apis/CreateServerGroupRequest.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 15 | 2018-09-11T05:39:54.000Z | 2021-07-02T12:38:02.000Z | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/cps/apis/CreateServerGroupRequest.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 33 | 2018-04-20T05:29:16.000Z | 2022-02-17T09:10:05.000Z | # coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# 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 ... | 30.622642 | 75 | 0.71411 |
9b7584433b9522854efd7a01ddcc30565c7e54f4 | 2,265 | py | Python | stellar_sdk/xdr/ledger_close_meta.py | JakeUrban/py-stellar-base | 819097df05c9af448f806657a3ff1b0d890f0ac4 | [
"Apache-2.0"
] | null | null | null | stellar_sdk/xdr/ledger_close_meta.py | JakeUrban/py-stellar-base | 819097df05c9af448f806657a3ff1b0d890f0ac4 | [
"Apache-2.0"
] | null | null | null | stellar_sdk/xdr/ledger_close_meta.py | JakeUrban/py-stellar-base | 819097df05c9af448f806657a3ff1b0d890f0ac4 | [
"Apache-2.0"
] | null | null | null | # This is an automatically generated file.
# DO NOT EDIT or your changes may be overwritten
import base64
from xdrlib import Packer, Unpacker
from .base import *
from .ledger_close_meta_v0 import LedgerCloseMetaV0
from ..exceptions import ValueError
__all__ = ["LedgerCloseMeta"]
class LedgerCloseMeta:
"""
X... | 29.415584 | 70 | 0.567329 |
c471b84933da4ef5831111a3071096d0a46c2389 | 2,030 | py | Python | userbot/utils/git_api.py | HitaloSama/PaperplaneMinimal | 5cf45ca4ae90ad4a52ee6d6dc679053a69fbed32 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 9 | 2020-06-11T18:47:48.000Z | 2021-11-08T18:05:37.000Z | userbot/utils/git_api.py | HitaloSama/PaperplaneMinimal | 5cf45ca4ae90ad4a52ee6d6dc679053a69fbed32 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 3 | 2020-08-28T18:37:46.000Z | 2020-09-25T15:32:29.000Z | userbot/utils/git_api.py | HitaloSama/PaperplaneMinimal | 5cf45ca4ae90ad4a52ee6d6dc679053a69fbed32 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 8 | 2020-06-14T02:08:41.000Z | 2020-12-15T13:25:15.000Z | # Copyright 2020 nunopenim @github
#
# Licensed under the PEL (Penim Enterprises License), v1.0
#
# You may not use this file or any of the content within it, unless in
# compliance with the PE License
"""
used to get github api information
for github module
"""
import json
import urllib.request as url
VERSION = "1.1... | 18.454545 | 70 | 0.679803 |
d696777f7ce2077e3642d761a8a234c49a76ae33 | 24,564 | py | Python | design_frame.py | Goodjooy/InternalDownloader | 5b009505f2067388911b6a25f52d7101c952f2ee | [
"MIT"
] | null | null | null | design_frame.py | Goodjooy/InternalDownloader | 5b009505f2067388911b6a25f52d7101c952f2ee | [
"MIT"
] | null | null | null | design_frame.py | Goodjooy/InternalDownloader | 5b009505f2067388911b6a25f52d7101c952f2ee | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
###########################################################################
## Python code generated with wxFormBuilder (version Oct 26 2018)
## http://www.wxformbuilder.org/
##
## PLEASE DO *NOT* EDIT THIS FILE!
###########################################################################
impor... | 37.617152 | 173 | 0.708394 |
6faf7533e9416d2985435f83c6f5c33081ecf5b3 | 50,613 | py | Python | pytests/security/x509_multiple_CA_util.py | mhocouchbase/testrunner | 10faf6955a905dee9a254daf90352881d4687735 | [
"Apache-2.0"
] | null | null | null | pytests/security/x509_multiple_CA_util.py | mhocouchbase/testrunner | 10faf6955a905dee9a254daf90352881d4687735 | [
"Apache-2.0"
] | null | null | null | pytests/security/x509_multiple_CA_util.py | mhocouchbase/testrunner | 10faf6955a905dee9a254daf90352881d4687735 | [
"Apache-2.0"
] | null | null | null | import base64
import importlib
import json
import random
import os
import copy
import string
import time
import requests
import logger
import httplib2
from shutil import copyfile
from lib.membase.api.rest_client import RestConnection
from lib.remote.remote_util import RemoteMachineShellConnection
class ServerInfo():... | 47.793201 | 115 | 0.574655 |
45000899f12804f8b715ed2722db64e34013920c | 222 | py | Python | bin/pi.py | vis2797/Python-Scripts | eb175dbcdd8fa94581e5553cb59b9652cdab7ea8 | [
"MIT"
] | 6 | 2018-03-19T13:35:39.000Z | 2020-03-03T09:28:16.000Z | pi.py | iamfeysal/Python_Projects | 73758eb57acdae26b58a14e6e4996919a7bdde43 | [
"MIT"
] | null | null | null | pi.py | iamfeysal/Python_Projects | 73758eb57acdae26b58a14e6e4996919a7bdde43 | [
"MIT"
] | 5 | 2018-03-19T15:06:02.000Z | 2020-02-12T17:34:41.000Z | import numpy as np
from numba import jit
@jit
def aprox_pi(N):
points = 2 * np.random.rand(N, 2) - 1
M = 0
for k in range(N):
if points[k,0]**2 + points[k,1]**2 < 1.:
M += 1
return 4.*M/N
print(aprox_pi(1e8))
| 13.875 | 42 | 0.594595 |
7102ae2e0b5ad8cc37991db19ed078ef0fbf3134 | 5,401 | py | Python | linen_examples/ppo/ppo_lib_test.py | bchetioui/flax | b9f57b4e3ce911699a84a8b382360867f1b4a6d3 | [
"Apache-2.0"
] | 1 | 2021-04-05T09:55:35.000Z | 2021-04-05T09:55:35.000Z | linen_examples/ppo/ppo_lib_test.py | nouraellm/flax | 9a0b06d24add079c9605e4ccb3cd36a370b56773 | [
"Apache-2.0"
] | null | null | null | linen_examples/ppo/ppo_lib_test.py | nouraellm/flax | 9a0b06d24add079c9605e4ccb3cd36a370b56773 | [
"Apache-2.0"
] | 2 | 2020-10-19T16:29:05.000Z | 2021-01-16T14:26:14.000Z | # Copyright 2020 The Flax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 38.578571 | 79 | 0.682651 |
63924dcd658ca44d05dcc8420bf4d9c90f47f870 | 1,189 | py | Python | out/python/test/test_inline_object1.py | energychain/corrently-api | 757b31214b1a82fed3bac4fcd1f51b54a58e7f8f | [
"MIT"
] | null | null | null | out/python/test/test_inline_object1.py | energychain/corrently-api | 757b31214b1a82fed3bac4fcd1f51b54a58e7f8f | [
"MIT"
] | null | null | null | out/python/test/test_inline_object1.py | energychain/corrently-api | 757b31214b1a82fed3bac4fcd1f51b54a58e7f8f | [
"MIT"
] | null | null | null | """
Corrently.io
*Corrently - from italian corrente, which is energy* # Introduction The Corrently ecosystem gets maintained by [STROMDAO GmbH](https://www.stromdao.de/) to support green energy services for prosumers, grid operators, regulators, integrators or any other party with an emerging need of consensus... | 32.135135 | 505 | 0.726661 |
1c06cc0d3f6fb97f352d589f160a3b80719e561c | 1,716 | py | Python | _static/src/python/SignalProcessing/Digital/TimeFrequencyAnalysis/Classical/STFT/demo_stft_gauss_nfft.py | metai/aitrace | 8e42001f5e3a187801764f413b6ee2f32476c6d1 | [
"MIT"
] | 1 | 2022-01-03T06:13:31.000Z | 2022-01-03T06:13:31.000Z | _static/src/python/SignalProcessing/Digital/TimeFrequencyAnalysis/Classical/STFT/demo_stft_gauss_nfft.py | metai/aitrace | 8e42001f5e3a187801764f413b6ee2f32476c6d1 | [
"MIT"
] | null | null | null | _static/src/python/SignalProcessing/Digital/TimeFrequencyAnalysis/Classical/STFT/demo_stft_gauss_nfft.py | metai/aitrace | 8e42001f5e3a187801764f413b6ee2f32476c6d1 | [
"MIT"
] | 1 | 2022-01-03T06:13:33.000Z | 2022-01-03T06:13:33.000Z | import numpy as np
from scipy import signal
import matplotlib.pyplot as plt
T = 5
Fs = 400.0
n = T * Fs
f1 = 10
f2 = 25
f3 = 50
f4 = 100
t1 = np.linspace(0, T, n)
x1 = np.cos(2 * np.pi * f1 * t1)
t2 = np.linspace(T, 2 * T, n)
x2 = np.cos(2 * np.pi * f2 * t2)
t3 = np.linspace(2 * T, 3 * T, n)
x3 = np.cos(2 * np.pi * ... | 24.169014 | 163 | 0.583333 |
9fa1ca40cd6d7cfd8c1b3be663b0469e015bff9e | 5,936 | py | Python | cogs/help.py | Manjot1151/Skybot-rewrite | ef1aa4b7ed391ad8620e0ae2406a979da37fa079 | [
"MIT"
] | 2 | 2021-03-02T09:36:18.000Z | 2021-04-16T11:34:25.000Z | cogs/help.py | zeffo/Skybot-rewrite | f86b3ffe4ba2b8f012348964cfed8ca74016e499 | [
"MIT"
] | null | null | null | cogs/help.py | zeffo/Skybot-rewrite | f86b3ffe4ba2b8f012348964cfed8ca74016e499 | [
"MIT"
] | null | null | null | from utils.embed import Embed
from utils.expander import Expander
from discord.ext import commands
from utils.util import has_is_staff, is_staff
class Help(commands.Cog):
def __init__(self, bot):
self.bot : commands.AutoShardedBot = bot
@commands.Cog.listener()
async def on_ready(self):
pa... | 45.312977 | 454 | 0.617588 |
4c7a2f7a180f0fc44891392f6ce4f791def9275f | 180 | py | Python | server/learning/signup/urls.py | kantanand/insmartapps | 4ab54bb41101e43b5edaac9795509584f01c5c92 | [
"MIT"
] | 3 | 2016-05-01T18:39:08.000Z | 2019-02-19T11:55:40.000Z | server/learning/signup/urls.py | kantanand/insmartapps | 4ab54bb41101e43b5edaac9795509584f01c5c92 | [
"MIT"
] | 1 | 2016-04-28T16:41:24.000Z | 2016-06-11T19:11:14.000Z | server/learning/signup/urls.py | kantanand/insmartapps | 4ab54bb41101e43b5edaac9795509584f01c5c92 | [
"MIT"
] | null | null | null | from django.conf.urls import url
from signup import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^ios_gurug/$', views.ios_gurug, name='ios_gurug'),
] | 25.714286 | 60 | 0.677778 |
eed3c48c82906df5c64821a9fc26dd5bc50af823 | 22,015 | py | Python | xrftomo/widgets/image_process_actions.py | decarlof/xfluo | 1b287bc0948ad761faef9cb378b70055498f7150 | [
"BSD-3-Clause"
] | null | null | null | xrftomo/widgets/image_process_actions.py | decarlof/xfluo | 1b287bc0948ad761faef9cb378b70055498f7150 | [
"BSD-3-Clause"
] | null | null | null | xrftomo/widgets/image_process_actions.py | decarlof/xfluo | 1b287bc0948ad761faef9cb378b70055498f7150 | [
"BSD-3-Clause"
] | null | null | null | # #########################################################################
# Copyright (c) 2018, UChicago Argonne, LLC. All rights reserved. #
# #
# Copyright 2018. UChicago Argonne, LLC. This software was produced #
# under U.S. Gov... | 33.457447 | 147 | 0.649057 |
583548a7481425a18fe60b7ab04756acae94f3e8 | 1,796 | py | Python | models/network.py | Cousin-Zan/Semantic-Segmentation-for-Steel-Strip-Surface-Defect-Detection | ae135743cc190cdf5a04b5d3ca04dde44f6dd58a | [
"Apache-2.0"
] | null | null | null | models/network.py | Cousin-Zan/Semantic-Segmentation-for-Steel-Strip-Surface-Defect-Detection | ae135743cc190cdf5a04b5d3ca04dde44f6dd58a | [
"Apache-2.0"
] | null | null | null | models/network.py | Cousin-Zan/Semantic-Segmentation-for-Steel-Strip-Surface-Defect-Detection | ae135743cc190cdf5a04b5d3ca04dde44f6dd58a | [
"Apache-2.0"
] | 1 | 2022-01-20T06:06:21.000Z | 2022-01-20T06:06:21.000Z | """
The implementation of Network based on Tensorflow.
@Author: Yang Lu
@Github: https://github.com/luyanger1799
@Project: https://github.com/luyanger1799/amazing-semantic-segmentation
"""
from base_models import *
class Network(object):
def __init__(self, num_classes, version='PAN', base_model='ResNet50', dila... | 38.212766 | 118 | 0.64755 |
b8fbaec7df7ec65d62ff1b02dfd7c2b6fa202a14 | 2,259 | py | Python | conduit/settings.py | rajdeepbharati/CI_CD_server_flask | b7747bfa95d72485dc3c523490292cdb4b193470 | [
"MIT"
] | 1 | 2020-04-04T11:23:55.000Z | 2020-04-04T11:23:55.000Z | conduit/settings.py | rajdeepbharati/CI_CD_server_flask | b7747bfa95d72485dc3c523490292cdb4b193470 | [
"MIT"
] | null | null | null | conduit/settings.py | rajdeepbharati/CI_CD_server_flask | b7747bfa95d72485dc3c523490292cdb4b193470 | [
"MIT"
] | 1 | 2020-04-15T01:13:40.000Z | 2020-04-15T01:13:40.000Z | # -*- coding: utf-8 -*-
"""Application configuration."""
import os
from datetime import timedelta
class Config(object):
"""Base configuration."""
SECRET_KEY = os.environ.get('MY_SECRET_KEY', 'secret-key') # TODO: Change me
APP_DIR = os.path.abspath(os.path.dirname(__file__)) # This directory
PROJEC... | 31.816901 | 81 | 0.61753 |
dc255d5d3c7304607e6aa0247e132043c6d3094f | 4,247 | py | Python | zvt/recorders/em/em_stock_ii_recorder.py | coolsnake/zvt | 6aa0435b1f6f34c8c5ff459e30caec55b8f72257 | [
"MIT"
] | null | null | null | zvt/recorders/em/em_stock_ii_recorder.py | coolsnake/zvt | 6aa0435b1f6f34c8c5ff459e30caec55b8f72257 | [
"MIT"
] | null | null | null | zvt/recorders/em/em_stock_ii_recorder.py | coolsnake/zvt | 6aa0435b1f6f34c8c5ff459e30caec55b8f72257 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from typing import List
import pandas as pd
from zvt.api.utils import to_report_period_type
from zvt.contract import ActorType
from zvt.contract.api import df_to_db
from zvt.contract.recorder import TimestampsDataRecorder
from zvt.domain import Stock, ActorMeta
from zvt.domain.actor.stock_acto... | 42.47 | 115 | 0.565105 |
34197f5900fc90594ad907a7dca4b6410799c4aa | 1,776 | py | Python | cart/cart.py | TeeblaQ1/flowerstalk | 71b8ecb542b153fd2709792555d334cc01e2cd99 | [
"MIT"
] | null | null | null | cart/cart.py | TeeblaQ1/flowerstalk | 71b8ecb542b153fd2709792555d334cc01e2cd99 | [
"MIT"
] | null | null | null | cart/cart.py | TeeblaQ1/flowerstalk | 71b8ecb542b153fd2709792555d334cc01e2cd99 | [
"MIT"
] | null | null | null | from decimal import Decimal
from django.conf import settings
from flowerstalk.models import Product
class Cart(object):
def __init__(self, request):
self.session = request.session
cart = self.session.get(settings.CART_SESSION_ID)
if not cart:
cart = self.session[settings.CART_S... | 31.714286 | 93 | 0.600788 |
6fd436a217576e5ac62aefbd817066c299437c28 | 8,789 | py | Python | chainer/distributions/independent.py | Lynkzhang/Chainer-UM | d3bea4c889a78d8a64b4d22c3d6a26102927f9f9 | [
"MIT"
] | 1 | 2019-03-09T07:39:07.000Z | 2019-03-09T07:39:07.000Z | chainer/distributions/independent.py | hitsgub/chainer | 20d4d70f5cdacc1f24f243443f5bebc2055c8f8e | [
"MIT"
] | null | null | null | chainer/distributions/independent.py | hitsgub/chainer | 20d4d70f5cdacc1f24f243443f5bebc2055c8f8e | [
"MIT"
] | null | null | null | import functools
import operator
import numpy
from chainer.backend import cuda
from chainer import distribution
from chainer.functions.array import repeat
from chainer.functions.array import reshape
from chainer.functions.array import transpose
from chainer.functions.math import sum as sum_mod
from chainer.functions.... | 35.439516 | 79 | 0.629537 |
31968c169e45d5a1826ac72413654835c4a6aa84 | 2,348 | py | Python | TemplateAPI/Node.py | M-Kokolich/PoVo | d72b8375a2662225299690a321979ac6988d229d | [
"MIT"
] | 4 | 2016-08-01T02:32:13.000Z | 2021-11-08T11:21:08.000Z | TemplateAPI/Node.py | gus-ball/gps_v4.9 | ed587bc6e49093603072d6d137d45d9b765bd73e | [
"MIT"
] | 1 | 2016-08-01T02:32:32.000Z | 2016-08-01T02:32:32.000Z | TemplateAPI/Node.py | gus-ball/gps_v4.9 | ed587bc6e49093603072d6d137d45d9b765bd73e | [
"MIT"
] | null | null | null | import cgi
### NODES ###
class Node(object):
'''Base Node Class.'''
def eval(self, context):
raise NotImplementedError()
class Group(Node):
'''Node class for grouping a number of elements.'''
def __init__(self):
self.children = []
def add_child(self, child):
self.children.append(child)
def eval(self, c... | 23.959184 | 69 | 0.698467 |
776ba6471779eec07d14839ed53b2ddd3275a61b | 409 | py | Python | implementation.py | EtzionR/Kmeans-Simulator | 60a2b781c86f7a166bea59072a6ff30cecc35e8b | [
"MIT"
] | null | null | null | implementation.py | EtzionR/Kmeans-Simulator | 60a2b781c86f7a166bea59072a6ff30cecc35e8b | [
"MIT"
] | null | null | null | implementation.py | EtzionR/Kmeans-Simulator | 60a2b781c86f7a166bea59072a6ff30cecc35e8b | [
"MIT"
] | null | null | null | from kmeans import Simulator
import pandas as pd
path = r'example\data_1.csv'
data = pd.read_csv(path)
Simulator(data[['first','second']],4).fit().create_gif('output_1')
path = r'example\data_2.csv'
data = pd.read_csv(path)[['a','b']]
Simulator(data,3).fit().create_gif('output_2')
path = r'example\data_3.... | 29.214286 | 67 | 0.679707 |
2178cefd3694e5cca3c1a325b3e4f865f81cedec | 7,580 | py | Python | fileio/AbstractMast.py | exoplanetvetting/DAVE | aea19a30d987b214fb4c0cf01aa733f127c411b9 | [
"MIT"
] | 7 | 2019-05-07T02:01:51.000Z | 2022-03-16T08:09:39.000Z | fileio/AbstractMast.py | barentsen/dave | 45ba97b7b535ad26dd555c33c963c6224a9af23c | [
"MIT"
] | 18 | 2015-12-09T22:18:59.000Z | 2017-04-26T13:11:44.000Z | fileio/AbstractMast.py | barentsen/dave | 45ba97b7b535ad26dd555c33c963c6224a9af23c | [
"MIT"
] | 5 | 2017-03-08T11:42:53.000Z | 2020-05-07T00:10:37.000Z |
"""
Abstract classes for interfacing with the Mast Kepler Data archives.
Used by mastio.py
"""
import urllib
import math
import os
import pyfits
class MastArchive():
"""Base class for queries of the MAST Kepler and K2 archives.
Handles submitting the URL, receiving and caching the results
The child ... | 31.583333 | 96 | 0.587467 |
8c6117363a5107396cc854e3d81148297a8b7e67 | 3,066 | py | Python | architect.py | aheuillet/D-DARTS | e3ad5d9fc4db3a987e4828361ccdba45f6261c08 | [
"Apache-2.0"
] | 1 | 2022-02-11T15:19:26.000Z | 2022-02-11T15:19:26.000Z | architect.py | aheuillet/D-DARTS | e3ad5d9fc4db3a987e4828361ccdba45f6261c08 | [
"Apache-2.0"
] | null | null | null | architect.py | aheuillet/D-DARTS | e3ad5d9fc4db3a987e4828361ccdba45f6261c08 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import torch
from torch.cuda.amp.autocast_mode import autocast
import torch.nn.functional as F
from numpy.linalg import eigvals
from separate_loss import ConvAblationLoss
def _concat(xs):
return torch.cat([x.view(-1) for x in xs])
class Architect(object):
def __init__(self, model, args):
s... | 32.967742 | 111 | 0.651663 |
a987ace9b86c2ba0db8531cb01f8892a55d04e4e | 725 | py | Python | bin/setup_db.py | rpetti/apollo | 1304d8623e6dfe8c9b269b7e90611b3688c0c61e | [
"MIT"
] | null | null | null | bin/setup_db.py | rpetti/apollo | 1304d8623e6dfe8c9b269b7e90611b3688c0c61e | [
"MIT"
] | null | null | null | bin/setup_db.py | rpetti/apollo | 1304d8623e6dfe8c9b269b7e90611b3688c0c61e | [
"MIT"
] | null | null | null | import os
import sys
from alembic.config import Config
from alembic import command
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.dirname(CURRENT_DIR))
from apollo.models import Base
db_user = os.getenv("D... | 26.851852 | 84 | 0.772414 |
69d2988dddc6b5fa0cd21a95d23bfc64a8094635 | 1,514 | py | Python | hackerrank_challenges/string_formatting.py | PitPietro/pascal-triangle | eb81e9fc4728f4e09a631922c470201a9f897195 | [
"MIT"
] | 1 | 2020-03-11T10:20:53.000Z | 2020-03-11T10:20:53.000Z | hackerrank_challenges/string_formatting.py | PitPietro/python-structure | eb81e9fc4728f4e09a631922c470201a9f897195 | [
"MIT"
] | 1 | 2020-07-06T15:45:01.000Z | 2020-07-06T15:50:32.000Z | hackerrank_challenges/string_formatting.py | PitPietro/python-structure | eb81e9fc4728f4e09a631922c470201a9f897195 | [
"MIT"
] | 1 | 2020-07-02T05:21:58.000Z | 2020-07-02T05:21:58.000Z | """
https://www.hackerrank.com/challenges/python-string-formatting/problem
> Problem
Given an integer n, print the following values for each integer i from 1 to n:
1. Decimal
2. Octal
3. Hexadecimal (capitalized)
4. Binary
The four values must be printed on a single line in the order specified above for each
i from 1 ... | 23.65625 | 112 | 0.556803 |
e0e64c0b8c55883a16b59f7473d5f4631c27c231 | 24,878 | py | Python | src/control/controller_testing/controller_testing/controller_testing_node.py | jiangtaojiang/AutowareAuto | 579bd5cec65859779d215c28c468b06de809749b | [
"Apache-2.0"
] | 4 | 2020-12-04T00:38:42.000Z | 2022-02-24T05:48:58.000Z | src/control/controller_testing/controller_testing/controller_testing_node.py | jiangtaojiang/AutowareAuto | 579bd5cec65859779d215c28c468b06de809749b | [
"Apache-2.0"
] | null | null | null | src/control/controller_testing/controller_testing/controller_testing_node.py | jiangtaojiang/AutowareAuto | 579bd5cec65859779d215c28c468b06de809749b | [
"Apache-2.0"
] | 1 | 2020-12-04T00:38:56.000Z | 2020-12-04T00:38:56.000Z | #!/usr/bin/env python3
# Copyright 2020 StreetScooter GmbH, Aachen, Germany
#
# 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 requ... | 43.876543 | 99 | 0.661589 |
adfe592319b553dc1049b1ac522e2587fcb05793 | 4,979 | py | Python | homeassistant/components/homeassistant/triggers/time.py | fanta759/core | fcdb54d8780900fb85e6c20d5382cfd13b69a0b3 | [
"Apache-2.0"
] | 1 | 2020-12-17T19:05:31.000Z | 2020-12-17T19:05:31.000Z | homeassistant/components/homeassistant/triggers/time.py | fanta759/core | fcdb54d8780900fb85e6c20d5382cfd13b69a0b3 | [
"Apache-2.0"
] | 52 | 2020-07-14T14:12:26.000Z | 2022-03-31T06:24:02.000Z | homeassistant/components/homeassistant/triggers/time.py | fanta759/core | fcdb54d8780900fb85e6c20d5382cfd13b69a0b3 | [
"Apache-2.0"
] | 1 | 2021-04-30T01:57:13.000Z | 2021-04-30T01:57:13.000Z | """Offer time listening automation rules."""
from datetime import datetime
from functools import partial
import voluptuous as vol
from homeassistant.const import CONF_AT, CONF_PLATFORM
from homeassistant.core import HassJob, callback
from homeassistant.helpers import config_validation as cv
from homeassistant.helpers... | 32.97351 | 86 | 0.548303 |
7c3c01b5413ad5ed59a8ae393563494cdd765eeb | 2,476 | py | Python | beautifulmind/mindmap/migrations/0002_auto__del_unique_mindmap_slug.py | ierror/BeautifulMind.io | 6a73e65b1a21233d67aa129f18da37e6ae44003a | [
"BSD-3-Clause"
] | 28 | 2015-04-03T10:11:28.000Z | 2022-02-03T02:45:02.000Z | beautifulmind/mindmap/migrations/0002_auto__del_unique_mindmap_slug.py | ierror/BeautifulMind.io | 6a73e65b1a21233d67aa129f18da37e6ae44003a | [
"BSD-3-Clause"
] | null | null | null | beautifulmind/mindmap/migrations/0002_auto__del_unique_mindmap_slug.py | ierror/BeautifulMind.io | 6a73e65b1a21233d67aa129f18da37e6ae44003a | [
"BSD-3-Clause"
] | 8 | 2015-06-24T05:12:07.000Z | 2019-07-10T08:41:20.000Z | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Removing unique constraint on 'MindMap', fields ['slug']
db.delete_unique('mindmap_mindmap', ['slug'])
... | 53.826087 | 163 | 0.578352 |
a5a592fc5c1b68be1ff0e2098fd1795ad5ed1ea5 | 1,007 | py | Python | download_weights.py | rolkon/PyTorch_CIFAR10 | a10fb36e8360d96bb000869d39db5859d04ed2fa | [
"MIT"
] | null | null | null | download_weights.py | rolkon/PyTorch_CIFAR10 | a10fb36e8360d96bb000869d39db5859d04ed2fa | [
"MIT"
] | null | null | null | download_weights.py | rolkon/PyTorch_CIFAR10 | a10fb36e8360d96bb000869d39db5859d04ed2fa | [
"MIT"
] | null | null | null | import os
import zipfile
import requests
from tqdm import tqdm
def main():
url = "https://rutgers.box.com/shared/static/gkw08ecs797j2et1ksmbg1w5t3idf5r5.zip"
# Streaming, so we can iterate over the response.
r = requests.get(url, stream=True)
# Total size in Mebibyte
total_size = int(r.headers.get("content-lengt... | 29.617647 | 83 | 0.727905 |
7367ccd752a5fd4e55cbf2630b856facc0b66cd3 | 2,882 | py | Python | config/settings/local.py | aprezcuba24/abuse_ip | 8121670605eee5a44b3d101c5719f3b02fab37cf | [
"MIT"
] | null | null | null | config/settings/local.py | aprezcuba24/abuse_ip | 8121670605eee5a44b3d101c5719f3b02fab37cf | [
"MIT"
] | null | null | null | config/settings/local.py | aprezcuba24/abuse_ip | 8121670605eee5a44b3d101c5719f3b02fab37cf | [
"MIT"
] | null | null | null | from .base import * # noqa
from .base import env
# GENERAL
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#debug
DEBUG = True
# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
SECRET_KEY = env(
"DJANGO_SECRET_KEY... | 41.768116 | 97 | 0.57703 |
27b8a82addcbbaea4a4d0929600b9f1acfbd82e2 | 46 | py | Python | modules/__init__.py | jixjia/fx-rate-alert | 4d8ac336045c2e38935349df6aaaa58ac71fd763 | [
"MIT"
] | null | null | null | modules/__init__.py | jixjia/fx-rate-alert | 4d8ac336045c2e38935349df6aaaa58ac71fd763 | [
"MIT"
] | null | null | null | modules/__init__.py | jixjia/fx-rate-alert | 4d8ac336045c2e38935349df6aaaa58ac71fd763 | [
"MIT"
] | null | null | null | from .sms_notification import SMSNotification
| 23 | 45 | 0.891304 |
17e4f3d3b1e2624c9ee4957da77eca872d060e2f | 7,551 | py | Python | contrib/opencensus-ext-azure/opencensus/ext/azure/trace_exporter/__init__.py | TheJokersThief/opencensus-python | 511289fa4cc4bbd6e013c8a33c5dc570a895ed2c | [
"Apache-2.0"
] | null | null | null | contrib/opencensus-ext-azure/opencensus/ext/azure/trace_exporter/__init__.py | TheJokersThief/opencensus-python | 511289fa4cc4bbd6e013c8a33c5dc570a895ed2c | [
"Apache-2.0"
] | null | null | null | contrib/opencensus-ext-azure/opencensus/ext/azure/trace_exporter/__init__.py | TheJokersThief/opencensus-python | 511289fa4cc4bbd6e013c8a33c5dc570a895ed2c | [
"Apache-2.0"
] | null | null | null | # Copyright 2019, OpenCensus Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | 40.379679 | 77 | 0.583764 |
d555612636cdf462a9c041400b3b7af96cd37223 | 323 | py | Python | comparision/voiceControl/speak.py | andylucny/Recognize4PC | 5f5344e14ed151e6a0a021b2af4179852d2f2e87 | [
"BSD-2-Clause"
] | null | null | null | comparision/voiceControl/speak.py | andylucny/Recognize4PC | 5f5344e14ed151e6a0a021b2af4179852d2f2e87 | [
"BSD-2-Clause"
] | null | null | null | comparision/voiceControl/speak.py | andylucny/Recognize4PC | 5f5344e14ed151e6a0a021b2af4179852d2f2e87 | [
"BSD-2-Clause"
] | null | null | null | import os
import sys
from agentspace import Agent,Space
def speak(text):
os.environ["ESPEAK_DATA_PATH"] = "."
Space.write('speaking',True)
os.system('espeak "'+text+'"')
Space.write('speaking',False)
if __name__ == "__main__":
text = sys.argv[1] if len(sys.argv) > 1 else "eee"
speak(text)
... | 23.071429 | 54 | 0.637771 |
27f3e1e7357e49cc1834af2f6ac3f7bfba327ce0 | 3,478 | py | Python | PYTHON_AUTOMATION/LianXi/weibo_search.py | sly1314sly/selenium_basic | 53bc2bf4d8a81bcd71f7fe5910cbc34ecfc6869a | [
"Apache-2.0"
] | 1 | 2019-08-03T04:24:13.000Z | 2019-08-03T04:24:13.000Z | PYTHON_AUTOMATION/LianXi/weibo_search.py | sly1314sly/selenium_basic | 53bc2bf4d8a81bcd71f7fe5910cbc34ecfc6869a | [
"Apache-2.0"
] | null | null | null | PYTHON_AUTOMATION/LianXi/weibo_search.py | sly1314sly/selenium_basic | 53bc2bf4d8a81bcd71f7fe5910cbc34ecfc6869a | [
"Apache-2.0"
] | null | null | null | # -*- coding:UTF-8 -*-
from selenium import webdriver
import selenium.webdriver.support.ui as ui
from selenium.webdriver.common.action_chains import ActionChains
from time import sleep
from random import choice
import re
#import pickle
browser = webdriver.Chrome() # 打开谷歌浏览器
wait = ui.WebDriverWait(browser,10) # 设定最长... | 40.917647 | 148 | 0.688614 |
4fceac59b27f5d2d20ee0cdf493476a3cb65a502 | 61,224 | py | Python | python/ccxt/qtrade.py | 0shimax/ccxt | 2fd7e65dc13800b331274cd4a73345de94ee3c9b | [
"MIT"
] | null | null | null | python/ccxt/qtrade.py | 0shimax/ccxt | 2fd7e65dc13800b331274cd4a73345de94ee3c9b | [
"MIT"
] | null | null | null | python/ccxt/qtrade.py | 0shimax/ccxt | 2fd7e65dc13800b331274cd4a73345de94ee3c9b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
# -----------------------------------------------------------------------------
try:
basestri... | 42.310988 | 279 | 0.43839 |
8602eba6eb33e62a509db5cb9ee87f2079c2ba93 | 1,839 | py | Python | saleor/core/views.py | chan007/karat-farms-server | 777035ab0655d87028d421fa5790fc21f4eb6fa6 | [
"CC-BY-4.0"
] | null | null | null | saleor/core/views.py | chan007/karat-farms-server | 777035ab0655d87028d421fa5790fc21f4eb6fa6 | [
"CC-BY-4.0"
] | null | null | null | saleor/core/views.py | chan007/karat-farms-server | 777035ab0655d87028d421fa5790fc21f4eb6fa6 | [
"CC-BY-4.0"
] | 1 | 2021-02-10T14:41:11.000Z | 2021-02-10T14:41:11.000Z | import json
from django.contrib import messages
from django.template.response import TemplateResponse
from django.utils.translation import pgettext_lazy
from draftjs_sanitizer import SafeJSONEncoder
from impersonate.views import impersonate as orig_impersonate
from ..account.models import User
from ..dashboard.views ... | 29.190476 | 86 | 0.704187 |
8540f5c0eba1013bd6cb38c3459e9c5d5de73cd3 | 15,587 | py | Python | tests/integration_tests/data_steward/bq_utils_test.py | dcarbone/curation | 68f9ba9466646d73509d424567b64566856fb8e8 | [
"MIT"
] | 1 | 2019-03-18T18:22:41.000Z | 2019-03-18T18:22:41.000Z | tests/integration_tests/data_steward/bq_utils_test.py | nishanthpp93/curation | ac9f38b2f4580ae806121dd929293159132c7d2a | [
"MIT"
] | null | null | null | tests/integration_tests/data_steward/bq_utils_test.py | nishanthpp93/curation | ac9f38b2f4580ae806121dd929293159132c7d2a | [
"MIT"
] | 1 | 2021-09-16T14:25:19.000Z | 2021-09-16T14:25:19.000Z | from __future__ import print_function
import csv
import os
import time
import unittest
from io import open
import bq_utils
import common
import app_identity
import gcs_utils
from gcloud.gcs import StorageClient
import resources
from tests import test_util
from tests.test_util import (FAKE_HPO_ID, FIVE_PERSONS_PERSON_C... | 40.803665 | 136 | 0.585809 |
701925f6749e36f8a51313405889d4050e48f7c5 | 860 | py | Python | lib/config.py | meigaoms/kinetics-downloader | 6b1433aa947f20e09954ba85f55b94660e43b5d1 | [
"MIT"
] | null | null | null | lib/config.py | meigaoms/kinetics-downloader | 6b1433aa947f20e09954ba85f55b94660e43b5d1 | [
"MIT"
] | null | null | null | lib/config.py | meigaoms/kinetics-downloader | 6b1433aa947f20e09954ba85f55b94660e43b5d1 | [
"MIT"
] | null | null | null | import os
DATASET_ROOT = "dataset"
TRAIN_ROOT = os.path.join(DATASET_ROOT, "train")
VALID_ROOT = os.path.join(DATASET_ROOT, "valid")
TEST_ROOT = os.path.join(DATASET_ROOT, "test")
TRAIN_FRAMES_ROOT = os.path.join(DATASET_ROOT, "train_frames")
VALID_FRAMES_ROOT = os.path.join(DATASET_ROOT, "valid_frames")
TEST_FRAMES_... | 35.833333 | 62 | 0.790698 |
3b3ca42afa284bed64406a019727dc03e551a9d6 | 773 | py | Python | MyGUIModule2.py | pbhandari9541/COSC-2347 | 6b19c73df203a9f54347a227cce8d97e5c1d4500 | [
"bzip2-1.0.6"
] | null | null | null | MyGUIModule2.py | pbhandari9541/COSC-2347 | 6b19c73df203a9f54347a227cce8d97e5c1d4500 | [
"bzip2-1.0.6"
] | null | null | null | MyGUIModule2.py | pbhandari9541/COSC-2347 | 6b19c73df203a9f54347a227cce8d97e5c1d4500 | [
"bzip2-1.0.6"
] | null | null | null | from tkinter import*
class MyGUICallbackFunctions:
def __init__(self):
window1 = Tk()
window1.title("Button event demo")
label = Label(window1,text = "Welcome to GUI tkinter demo")
btOk = Button(window1,text = "OK",bg = 'yellow',fg = 'red', command = self.processOK)
bt... | 38.65 | 94 | 0.584735 |
1d918b6da26b8463421b0daa13d2abb5d6c26671 | 1,794 | py | Python | data_service/api/api_authenticator.py | freelancing-solutions/GCP-Based-Database-as-a-Service | 7d6a12c33db238ca2f748bf4ddea6d2cf3c16da3 | [
"MIT"
] | 1 | 2021-04-15T19:45:04.000Z | 2021-04-15T19:45:04.000Z | data_service/api/api_authenticator.py | freelancing-solutions/pinydesk | 7d6a12c33db238ca2f748bf4ddea6d2cf3c16da3 | [
"MIT"
] | 516 | 2021-05-02T11:46:36.000Z | 2022-03-29T06:09:49.000Z | data_service/api/api_authenticator.py | freelancing-solutions/pinydesk | 7d6a12c33db238ca2f748bf4ddea6d2cf3c16da3 | [
"MIT"
] | 1 | 2021-09-04T22:40:14.000Z | 2021-09-04T22:40:14.000Z | import os
from flask import request
from werkzeug.exceptions import Unauthorized
from data_service.utils.utils import is_development
import functools
@functools.lru_cache(maxsize=1024)
def project_valid(project_name: str) -> bool:
authorized_projects = os.environ.get('AUTH_PROJECTS').split(",")
if not(isinsta... | 32.035714 | 73 | 0.665552 |
e43584f2475c8ec6a4e52592b78861762488f2bf | 15,753 | py | Python | cirq-core/cirq/protocols/apply_channel_protocol.py | Saibaba-Alapati/Cirq | 782efcd04c3bbf73a0d630306a3d1cfd9966521d | [
"Apache-2.0"
] | 2 | 2019-01-12T07:10:32.000Z | 2020-09-08T03:47:22.000Z | cirq-core/cirq/protocols/apply_channel_protocol.py | resduo/Cirq | 680f897345eb1c71c9242515edda8f04b8594319 | [
"Apache-2.0"
] | 2 | 2020-10-15T15:36:40.000Z | 2021-01-28T16:18:55.000Z | cirq-core/cirq/protocols/apply_channel_protocol.py | resduo/Cirq | 680f897345eb1c71c9242515edda8f04b8594319 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The Cirq Developers
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 43.880223 | 99 | 0.677458 |
62979bbc06c2865db787a21e2171994d4c44af16 | 7,163 | py | Python | senza/templates/_helper.py | mschwitalla/senza | 301a43fde41db194cbb80c68271692d1fe2212db | [
"Apache-2.0"
] | 106 | 2015-03-30T14:15:15.000Z | 2021-07-26T07:30:11.000Z | senza/templates/_helper.py | mschwitalla/senza | 301a43fde41db194cbb80c68271692d1fe2212db | [
"Apache-2.0"
] | 547 | 2015-04-13T09:58:50.000Z | 2021-01-26T11:20:35.000Z | senza/templates/_helper.py | mschwitalla/senza | 301a43fde41db194cbb80c68271692d1fe2212db | [
"Apache-2.0"
] | 102 | 2015-04-01T08:09:53.000Z | 2020-11-05T09:05:28.000Z | import json
import re
import boto3
import botocore.exceptions
import click
import clickclick
from click import confirm
from clickclick import Action
from senza.aws import get_account_alias, get_account_id, get_security_group
from ..manaus.boto_proxy import BotoClientProxy
def prompt(variables: dict, var_name, *args... | 32.707763 | 100 | 0.544325 |
6e53e3e4348eed765cd753d7307db1ebe0b83af9 | 4,174 | py | Python | tempest/lib/services/volume/v3/group_snapshots_client.py | Juniper/tempest | f8316c9c28e029063c036e1cf83947af068e7703 | [
"Apache-2.0"
] | null | null | null | tempest/lib/services/volume/v3/group_snapshots_client.py | Juniper/tempest | f8316c9c28e029063c036e1cf83947af068e7703 | [
"Apache-2.0"
] | null | null | null | tempest/lib/services/volume/v3/group_snapshots_client.py | Juniper/tempest | f8316c9c28e029063c036e1cf83947af068e7703 | [
"Apache-2.0"
] | 5 | 2016-06-24T20:03:52.000Z | 2020-02-05T10:14:54.000Z | # Copyright (C) 2017 Dell Inc. or its subsidiaries.
# 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
#
# ... | 40.524272 | 99 | 0.678965 |
1ca6139b5a1dd4dfaedc740ef31c4cad0b883441 | 16,201 | py | Python | custom_components/media_player/androidtv.py | JeffLIrion/addon-adb | d3237de6f8ab3d471fd6fe51afb7e006ccde9db4 | [
"MIT"
] | null | null | null | custom_components/media_player/androidtv.py | JeffLIrion/addon-adb | d3237de6f8ab3d471fd6fe51afb7e006ccde9db4 | [
"MIT"
] | null | null | null | custom_components/media_player/androidtv.py | JeffLIrion/addon-adb | d3237de6f8ab3d471fd6fe51afb7e006ccde9db4 | [
"MIT"
] | null | null | null | """
Provide functionality to interact with AndroidTv devices on the network.
Example config using an external ADB server:
media_player:
- platform: androidtv
host: 192.168.1.37
name: MIBOX3
adb_server_ip: 127.0.0.1
adb_server_port: 5037
apps:
"amazon": "Amazon Premium Video"
Example config... | 30.859048 | 79 | 0.599716 |
af43949e5054cc4cb7df1ddc4e63bf9d2612bd62 | 3,540 | py | Python | backdoor/backdoor-svhn/aver_weights.py | Bhaskers-Blu-Org1/model-sanitization | 1eff7e9f35e4fd194ffc83a55e4f6688ca9bb5c3 | [
"Apache-2.0"
] | 15 | 2020-05-04T15:28:36.000Z | 2021-12-31T02:34:12.000Z | backdoor/backdoor-svhn/aver_weights.py | Bhaskers-Blu-Org1/model-sanitization | 1eff7e9f35e4fd194ffc83a55e4f6688ca9bb5c3 | [
"Apache-2.0"
] | 1 | 2020-05-14T04:56:22.000Z | 2020-05-27T14:10:12.000Z | backdoor/backdoor-svhn/aver_weights.py | IBM/model-sanitization | 1eff7e9f35e4fd194ffc83a55e4f6688ca9bb5c3 | [
"Apache-2.0"
] | 4 | 2020-06-29T15:18:57.000Z | 2022-03-27T17:04:07.000Z | import argparse
import numpy as np
import os
import tabulate
import torch
import torch.nn.functional as F
import data
import models
import curves
import utils
parser = argparse.ArgumentParser(description='DNN curve evaluation')
parser.add_argument('--dir', type=str, default='VGG16_poi_single_target_5_2ba... | 36.875 | 113 | 0.674294 |
03e83d27576b86715e69de2ebe623b435bd51177 | 2,271 | py | Python | datamol/__init__.py | hadim/datamol | 2be77186fe06a75762cd49d10c3391f61b360664 | [
"Apache-2.0"
] | null | null | null | datamol/__init__.py | hadim/datamol | 2be77186fe06a75762cd49d10c3391f61b360664 | [
"Apache-2.0"
] | null | null | null | datamol/__init__.py | hadim/datamol | 2be77186fe06a75762cd49d10c3391f61b360664 | [
"Apache-2.0"
] | null | null | null | from ._version import __version__
from . import utils
from .utils import parallelized
from .utils import JobRunner
from .data import freesolv
from .log import enable_rdkit_log
from .log import disable_rdkit_log
from .log import without_rdkit_log
from .mol import PERIODIC_TABLE
from .mol import TRIPLE_BOND
from .mo... | 25.233333 | 43 | 0.830471 |
6672d297bf924d8d89939bbcb80a0e8caea49993 | 822 | py | Python | Section 6 - Modular Programming/Programming Exercises 6.3/Q5 - collatz.py | gitjot/python-for-lccs | a8a4ae8847abbc33361f80183c06d57b20523382 | [
"CC0-1.0"
] | 10 | 2020-02-14T14:28:15.000Z | 2022-02-02T18:44:11.000Z | Section 6 - Modular Programming/Programming Exercises 6.3/Q5 - collatz.py | gitjot/python-for-lccs | a8a4ae8847abbc33361f80183c06d57b20523382 | [
"CC0-1.0"
] | null | null | null | Section 6 - Modular Programming/Programming Exercises 6.3/Q5 - collatz.py | gitjot/python-for-lccs | a8a4ae8847abbc33361f80183c06d57b20523382 | [
"CC0-1.0"
] | 8 | 2020-03-25T09:27:42.000Z | 2021-11-03T15:24:38.000Z | # Event: LCCS Python Fundamental Skills Workshop
# Date: Dec 2018
# Author: Joe English, PDST
# eMail: computerscience@pdst.ie
# Solution: Programming Exercises 6.3 Q5
# Purpose: A program to implement the Collatz sequence
# Read a valid number
def get_number(prompt):
while True:
strN = input(p... | 21.631579 | 55 | 0.575426 |
67a72f35efe1bcdc52ed5f1cdd0c42e0e9d67e25 | 7,894 | py | Python | src/onelogin/saml2/logout_response.py | ceelias/python3-saml | f6ceae4c58534ea77774a9c034160fe9b41610d2 | [
"MIT"
] | null | null | null | src/onelogin/saml2/logout_response.py | ceelias/python3-saml | f6ceae4c58534ea77774a9c034160fe9b41610d2 | [
"MIT"
] | 1 | 2021-06-10T21:54:42.000Z | 2021-06-10T21:54:42.000Z | src/onelogin/saml2/logout_response.py | ceelias/python3-saml | f6ceae4c58534ea77774a9c034160fe9b41610d2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""" OneLogin_Saml2_Logout_Response class
Copyright (c) 2010-2018 OneLogin, Inc.
MIT License
Logout Response class of OneLogin's Python Toolkit.
"""
from onelogin.saml2 import compat
from onelogin.saml2.utils import OneLogin_Saml2_Utils, OneLogin_Saml2_ValidationError
from onelogin.saml2.xml... | 38.320388 | 165 | 0.598936 |
970aa632efd0f949f36e0f2c821109667b6c1a14 | 24,212 | py | Python | gnocchiclient/tests/functional/test_metric.py | andybotting/python-gnocchiclient | 8f257447e71a973e969b565f173f635a837b4bf0 | [
"Apache-2.0"
] | 14 | 2017-04-28T13:43:27.000Z | 2021-09-13T14:41:10.000Z | gnocchiclient/tests/functional/test_metric.py | andybotting/python-gnocchiclient | 8f257447e71a973e969b565f173f635a837b4bf0 | [
"Apache-2.0"
] | 91 | 2017-04-24T09:10:22.000Z | 2021-03-31T11:10:24.000Z | gnocchiclient/tests/functional/test_metric.py | andybotting/python-gnocchiclient | 8f257447e71a973e969b565f173f635a837b4bf0 | [
"Apache-2.0"
] | 28 | 2017-05-23T12:28:57.000Z | 2021-05-19T00:51:35.000Z | # 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
# d... | 42.402802 | 79 | 0.49207 |
a39813e86eeb8ef2897bcae1f12ce5574c835f48 | 5,024 | py | Python | IPython/utils/capture.py | EnjoyLifeFund/py36pkgs | 0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2 | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | 4 | 2018-01-19T17:15:06.000Z | 2018-01-24T00:06:42.000Z | Python/PythonProgrammingLanguage/Encapsulation/encap_env/lib/python3.5/site-packages/IPython/utils/capture.py | nitin-cherian/LifeLongLearning | 84084792058358365162c645742c70064a2d5fd6 | [
"MIT"
] | 26 | 2020-03-24T18:07:06.000Z | 2022-03-12T00:12:27.000Z | Python/PythonProgrammingLanguage/Encapsulation/encap_env/lib/python3.5/site-packages/IPython/utils/capture.py | nitin-cherian/LifeLongLearning | 84084792058358365162c645742c70064a2d5fd6 | [
"MIT"
] | 7 | 2017-08-01T04:02:07.000Z | 2018-10-06T21:07:20.000Z | # encoding: utf-8
"""IO capturing utilities."""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import sys
from io import StringIO
#-----------------------------------------------------------------------------
# Classes and functions
#----------------------------... | 30.083832 | 89 | 0.583997 |
894fe439f21971e2662116956ad2ab449b310d7b | 6,100 | py | Python | nssrc/com/citrix/netscaler/nitro/resource/config/rewrite/rewritepolicy_rewriteglobal_binding.py | benfinke/ns_python | d651d7aa01d7dc63c1cd435c7b3314d7f5b26659 | [
"Apache-2.0"
] | 1 | 2015-04-05T21:21:26.000Z | 2015-04-05T21:21:26.000Z | nssrc/com/citrix/netscaler/nitro/resource/config/rewrite/rewritepolicy_rewriteglobal_binding.py | benfinke/ns_python | d651d7aa01d7dc63c1cd435c7b3314d7f5b26659 | [
"Apache-2.0"
] | 1 | 2017-01-20T22:56:58.000Z | 2017-01-20T22:56:58.000Z | nssrc/com/citrix/netscaler/nitro/resource/config/rewrite/rewritepolicy_rewriteglobal_binding.py | benfinke/ns_python | d651d7aa01d7dc63c1cd435c7b3314d7f5b26659 | [
"Apache-2.0"
] | 6 | 2015-04-21T13:14:08.000Z | 2020-12-03T07:27:52.000Z | #
# Copyright (c) 2008-2015 Citrix Systems, Inc.
#
# 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 l... | 27.477477 | 137 | 0.722951 |
bb654bb12a339b93c4d355aebf4452bbd77d614a | 186 | py | Python | virtual/lib/python3.8/site-packages/vote/apps.py | erastus-1/GramApp | d926a8a894b5dc673d077b35f9df867dab737372 | [
"MIT"
] | 38 | 2020-05-13T08:09:42.000Z | 2022-03-19T13:16:59.000Z | virtual/lib/python3.8/site-packages/vote/apps.py | erastus-1/GramApp | d926a8a894b5dc673d077b35f9df867dab737372 | [
"MIT"
] | 17 | 2020-05-08T11:17:22.000Z | 2022-02-06T04:25:34.000Z | virtual/lib/python3.8/site-packages/vote/apps.py | erastus-1/GramApp | d926a8a894b5dc673d077b35f9df867dab737372 | [
"MIT"
] | 12 | 2020-05-26T18:14:15.000Z | 2022-02-03T20:07:16.000Z | from django.apps import AppConfig as BaseConfig
from django.utils.translation import ugettext_lazy as _
class VoteAppConfig(BaseConfig):
name = 'vote'
verbose_name = _('Vote')
| 23.25 | 55 | 0.763441 |
f18986d0f4b5f14693f12a9c8ed4718b250f0975 | 15,247 | py | Python | pyannote/audio/core/task.py | juanmc2005/pyannote-audio | 0b9be93ee1fb234c88f0e32163e9cce2a12ac8a9 | [
"MIT"
] | 1 | 2020-04-05T18:55:14.000Z | 2020-04-05T18:55:14.000Z | pyannote/audio/core/task.py | juanmc2005/pyannote-audio | 0b9be93ee1fb234c88f0e32163e9cce2a12ac8a9 | [
"MIT"
] | null | null | null | pyannote/audio/core/task.py | juanmc2005/pyannote-audio | 0b9be93ee1fb234c88f0e32163e9cce2a12ac8a9 | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2020 CNRS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish... | 32.166667 | 90 | 0.628779 |
06d58426b2b12c8f1fa1b6268d3f8749adad2569 | 5,059 | py | Python | VisitorAgent/RedLightExcitedVisitorAgent.py | LinghengMeng/ROM_Experiment | ffae4202eb9b324e0c67f74d0aa833f6324e6ff4 | [
"MIT"
] | 1 | 2019-10-26T06:01:57.000Z | 2019-10-26T06:01:57.000Z | VisitorAgent/RedLightExcitedVisitorAgent.py | LinghengMeng/ROM_Experiment | ffae4202eb9b324e0c67f74d0aa833f6324e6ff4 | [
"MIT"
] | 1 | 2018-05-08T20:28:32.000Z | 2018-05-08T20:28:32.000Z | VisitorAgent/RedLightExcitedVisitorAgent.py | UWaterloo-ASL/LAS_Gym | 916043d59aeca3deb8875abb280dcecbdcd50f0f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue May 8 14:35:52 2018
@author: jack.lingheng.meng
"""
import numpy as np
class RedLightExcitedVisitorAgent():
"""
Visitor who is only excited about red light.
Return:
name: visitor name
action: [move, x, y, z] if ... | 38.618321 | 135 | 0.58134 |
1d0aea64f019ebc2e1ccf4ea37b5b3667e32736d | 1,151 | py | Python | tensorstream/finance/sharpe_ratio.py | clems4ever/tensorstream | 61bff14f65f71bdd4ab58aefbd6eda79ec5863cb | [
"Apache-2.0"
] | 5 | 2019-04-10T03:51:13.000Z | 2020-07-12T10:50:24.000Z | tensorstream/finance/sharpe_ratio.py | clems4ever/tensorstream | 61bff14f65f71bdd4ab58aefbd6eda79ec5863cb | [
"Apache-2.0"
] | null | null | null | tensorstream/finance/sharpe_ratio.py | clems4ever/tensorstream | 61bff14f65f71bdd4ab58aefbd6eda79ec5863cb | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
from tensorstream.common import roll
from tensorstream.streamable import Streamable
class SharpeRatio(Streamable):
def __init__(self, period):
super().__init__()
self.period = period
def step(self, return_, risk_free_rate,
last_adjusted_values=None, iteration=None):
if ite... | 32.885714 | 96 | 0.706342 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.