hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | 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 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7b4f80cffeab03970d45e2719bf3cfd815720f37 | 7,916 | py | Python | handsomeware.py | lord-aceldama/HandsomeWare | 6b9bc79752c4c93267466347dc54f5f7c21f5f1c | [
"MIT"
] | 1 | 2020-11-11T05:50:27.000Z | 2020-11-11T05:50:27.000Z | handsomeware.py | lord-aceldama/HandsomeWare | 6b9bc79752c4c93267466347dc54f5f7c21f5f1c | [
"MIT"
] | null | null | null | handsomeware.py | lord-aceldama/HandsomeWare | 6b9bc79752c4c93267466347dc54f5f7c21f5f1c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import sys
import random
try:
import pyAesCrypt
except ImportError:
print("Error importing pyAesCrypt. Please run 'pip install pyAesCrypt'.")
sys.exit(-1)
VERSION = "0.9.2"
BUFFER_SIZE = 64 * 1024
DEFAULT_PASSWORD = None # if you want you can use a... | 32.846473 | 106 | 0.52615 |
99182095224a64253fe6880da6072387781fa38e | 3,447 | py | Python | benchmarks/ltl_infinite_state/bounded_counter/f3/constant_bound.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 3 | 2021-04-23T23:29:26.000Z | 2022-03-23T10:00:30.000Z | benchmarks/ltl_infinite_state/bounded_counter/f3/constant_bound.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | null | null | null | benchmarks/ltl_infinite_state/bounded_counter/f3/constant_bound.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 1 | 2021-11-17T22:02:56.000Z | 2021-11-17T22:02:56.000Z | from collections import Iterable
from mathsat import msat_term, msat_env
from mathsat import msat_make_constant, msat_declare_function
from mathsat import msat_get_integer_type, msat_get_rational_type
from mathsat import msat_make_and, msat_make_not, msat_make_or
from mathsat import msat_make_leq, msat_make_equal
from ... | 38.3 | 74 | 0.682042 |
d501ff0661361dd656b12388dd1e0d47e3aae354 | 1,365 | py | Python | congruencial_multiplicativo.py | NicolasImplant/Pseudoaleaorios_Python | 87ff8a020bcf6776b968f020facae00ee37f779e | [
"MIT"
] | null | null | null | congruencial_multiplicativo.py | NicolasImplant/Pseudoaleaorios_Python | 87ff8a020bcf6776b968f020facae00ee37f779e | [
"MIT"
] | null | null | null | congruencial_multiplicativo.py | NicolasImplant/Pseudoaleaorios_Python | 87ff8a020bcf6776b968f020facae00ee37f779e | [
"MIT"
] | null | null | null | from functions import multiplicativo
# Función que ejecuta de manera cíclica y recursiva el algoritmo congruencial multiplicativo, los parámetros k y g se manipularon
# para garantizar el ciclo de vida máximo del generador
# Function that cyclically and recursively executes the multiplicative congruential algorithm... | 36.891892 | 134 | 0.668132 |
b1bba88d24e60a3b511875c6ac56c4bf8d3ce6a3 | 2,371 | py | Python | leetcode_python/Depth-First-Search/increasing_subsequences.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | 18 | 2019-08-01T07:45:02.000Z | 2022-03-31T18:05:44.000Z | leetcode_python/Depth-First-Search/increasing_subsequences.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Depth-First-Search/increasing_subsequences.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | 15 | 2019-12-29T08:46:20.000Z | 2022-03-08T14:14:05.000Z | # V0
# IDEA : DFS
class Solution(object):
def findSubsequences(self, nums):
"""
:type nums: List[int]
:rtype: List[List[int]]
"""
res = set()
self.dfs(nums, 0, res, [])
return map(list, res)
def dfs(self, nums, index, res, path):
if len(path... | 28.22619 | 86 | 0.486293 |
705f11c61375d9e525605f2ed6f4b810b17cfbd0 | 4,998 | py | Python | vrpy/greedy.py | samuelefiorini/vrpy | ad3232b9e9ee9276c9c799d16b4a4a8c2b41eef1 | [
"MIT"
] | 83 | 2020-04-01T06:39:11.000Z | 2022-03-25T01:33:19.000Z | vrpy/greedy.py | samuelefiorini/vrpy | ad3232b9e9ee9276c9c799d16b4a4a8c2b41eef1 | [
"MIT"
] | 111 | 2020-04-01T17:11:30.000Z | 2022-03-31T02:22:53.000Z | vrpy/greedy.py | samuelefiorini/vrpy | ad3232b9e9ee9276c9c799d16b4a4a8c2b41eef1 | [
"MIT"
] | 37 | 2020-04-01T08:59:38.000Z | 2022-03-30T03:04:39.000Z | import logging
logger = logging.getLogger(__name__)
class _Greedy:
"""
Greedy algorithm. Iteratively adds closest feasible node to current path.
Args:
G (DiGraph): Graph on which algorithm is run.
load_capacity (int, optional) : Maximum load per route. Defaults to None.
num_stops... | 34.708333 | 81 | 0.577431 |
3b15cdc0205d0ad3e33f8ec356e34290e28d3889 | 11,826 | py | Python | st2actions/tests/unit/test_pythonrunner.py | totalkyos/stack-storm | b89bc648d53dae03c7484d22abd771edfe45bbb8 | [
"Apache-2.0"
] | null | null | null | st2actions/tests/unit/test_pythonrunner.py | totalkyos/stack-storm | b89bc648d53dae03c7484d22abd771edfe45bbb8 | [
"Apache-2.0"
] | null | null | null | st2actions/tests/unit/test_pythonrunner.py | totalkyos/stack-storm | b89bc648d53dae03c7484d22abd771edfe45bbb8 | [
"Apache-2.0"
] | null | null | null | # Licensed to the StackStorm, Inc ('StackStorm') 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 use th... | 43.638376 | 98 | 0.660917 |
3f48b6d775632a099bf722c13f9ead1d522dc270 | 452 | py | Python | ex063.py | rafaelclemes81/Python | 0e685b4e528a29bb23ecf11c9ccdbae8730b3ac3 | [
"MIT"
] | null | null | null | ex063.py | rafaelclemes81/Python | 0e685b4e528a29bb23ecf11c9ccdbae8730b3ac3 | [
"MIT"
] | null | null | null | ex063.py | rafaelclemes81/Python | 0e685b4e528a29bb23ecf11c9ccdbae8730b3ac3 | [
"MIT"
] | null | null | null | '''ESCREVA UM PROGRAMA QUE LEIA UM NÚMERO INTEIRO E MOSTRE NA TELA A QUANTIDADE DE
ELEMENTO DA SEQUENCIA FEBONACCI QUE O USUÁRIO SOLICITAR'''
from time import sleep
e = int(input('Quantos elementos da série Febonacci você quer exibir? '))
i = 4
a = 0
b = 1
c = a + b
print(a, end=' ')
sleep(0.2)
print(b, end=' ')
sleep(... | 20.545455 | 82 | 0.610619 |
bd30ed9b7f2e9132c4a409b2e0f00c098d1a1e8e | 2,300 | py | Python | aliyun-python-sdk-cdn/aliyunsdkcdn/request/v20180510/DescribeTagResourcesRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-cdn/aliyunsdkcdn/request/v20180510/DescribeTagResourcesRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-cdn/aliyunsdkcdn/request/v20180510/DescribeTagResourcesRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.000Z | # 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... | 37.096774 | 89 | 0.737391 |
eb09cc29aae600ced76ac9ebf7acc380c1f43c1f | 3,272 | py | Python | contrib/RemoteSensing/predict_demo.py | tianlanshidai/PaddleSeg | f506494b20b93de74b21237f70b76097755da786 | [
"Apache-2.0"
] | 1 | 2022-02-08T02:14:54.000Z | 2022-02-08T02:14:54.000Z | contrib/RemoteSensing/predict_demo.py | tianlanshidai/PaddleSeg | f506494b20b93de74b21237f70b76097755da786 | [
"Apache-2.0"
] | null | null | null | contrib/RemoteSensing/predict_demo.py | tianlanshidai/PaddleSeg | f506494b20b93de74b21237f70b76097755da786 | [
"Apache-2.0"
] | 2 | 2021-07-07T02:23:16.000Z | 2022-02-08T02:14:58.000Z | # coding: utf8
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve.
#
# 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... | 31.161905 | 100 | 0.659535 |
6484075cbd86178b17c7dcb20424eab0f939915b | 831 | py | Python | Scraping/Locators/Xpath-locator.py | koshchii/WebAppTesting-Selenium | 9cd8673fdd16e2ffe176ccf1c0df3ad49c19e46b | [
"MIT"
] | null | null | null | Scraping/Locators/Xpath-locator.py | koshchii/WebAppTesting-Selenium | 9cd8673fdd16e2ffe176ccf1c0df3ad49c19e46b | [
"MIT"
] | null | null | null | Scraping/Locators/Xpath-locator.py | koshchii/WebAppTesting-Selenium | 9cd8673fdd16e2ffe176ccf1c0df3ad49c19e46b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Sep 1 13:35:09 2021
@author: alexk
Relative Xpath basic structure:
//tag[@attribute="value"]
"""
import time
from selenium import webdriver
#Initialize driver
driver = webdriver.Chrome()
#Open URL and maximize window
url = "http://automationpractice.com/index.php"
driver... | 21.868421 | 75 | 0.749699 |
28a0f4692e9f9bc29d42941b6274b5cba999dfbf | 20,571 | py | Python | selfdrive/car/hyundai/carstate.py | sky84ky/neokii_EN | 219526b585719ca5503c3a9accbd673ed63343f8 | [
"MIT"
] | 1 | 2020-12-26T07:03:55.000Z | 2020-12-26T07:03:55.000Z | selfdrive/car/hyundai/carstate.py | choDeaJang/neokii_KR | 18394262c09091a90ef6eed067eee2760cca3f75 | [
"MIT"
] | null | null | null | selfdrive/car/hyundai/carstate.py | choDeaJang/neokii_KR | 18394262c09091a90ef6eed067eee2760cca3f75 | [
"MIT"
] | 9 | 2021-08-15T13:11:02.000Z | 2021-09-19T09:43:57.000Z | from cereal import car
from selfdrive.car.hyundai.values import DBC, STEER_THRESHOLD, FEATURES, CAR, HYBRID_CAR, EV_CAR
from selfdrive.car.interfaces import CarStateBase
from opendbc.can.parser import CANParser
from opendbc.can.can_define import CANDefine
from selfdrive.config import Conversions as CV
from common.param... | 34.631313 | 141 | 0.576588 |
580517a0bd6b87cfac9286c860e745c7b8446167 | 6,411 | py | Python | dataio.py | mfs6174/Deep6174 | 92e2ceb48134e0cf003f130aef8d838a7a16c27d | [
"Apache-2.0"
] | null | null | null | dataio.py | mfs6174/Deep6174 | 92e2ceb48134e0cf003f130aef8d838a7a16c27d | [
"Apache-2.0"
] | null | null | null | dataio.py | mfs6174/Deep6174 | 92e2ceb48134e0cf003f130aef8d838a7a16c27d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
# File: dataio.py
# Date: Thu Sep 18 10:23:38 2014 -0700
# Author: Yuxin Wu <ppwwyyxxc@gmail.com>
# Author: Xi-Jin Zhang <zhangxijin91@gmail.com>
import gzip
import cPickle as pickle
import operator
#from IPython.core.debugger import Tracer
from itertools import izip, cou... | 30.822115 | 71 | 0.5854 |
0cd267b2f165ee7d5e689be3ef728a8f778d1a28 | 1,769 | py | Python | src/recipes/index.py | brysontyrrell/MacAdminsChickenWings | 7263e431c1f28006935d7dc6e851642c6926b5cb | [
"MIT"
] | null | null | null | src/recipes/index.py | brysontyrrell/MacAdminsChickenWings | 7263e431c1f28006935d7dc6e851642c6926b5cb | [
"MIT"
] | null | null | null | src/recipes/index.py | brysontyrrell/MacAdminsChickenWings | 7263e431c1f28006935d7dc6e851642c6926b5cb | [
"MIT"
] | null | null | null | import decimal
import json
import os
import random
import boto3
from boto3.dynamodb.conditions import Key
dynamodb_table = boto3.resource("dynamodb").Table(os.getenv("TABLE"))
def lambda_handler(event, context):
params = event.get("queryStringParameters", {})
response = {"method": random_component_by_key("c... | 29 | 88 | 0.64952 |
c4addb15f53c8f5bd55d72a78eaa3f71e2b57b08 | 5,182 | py | Python | rmnd_lca/export.py | xiaoshir/rmnd-lca | 9831d59361ec7afbb6ff69e318eb225fd7ae7aaf | [
"BSD-3-Clause"
] | 2 | 2021-02-02T13:17:56.000Z | 2021-02-03T13:20:49.000Z | rmnd_lca/export.py | xiaoshir/rmnd-lca | 9831d59361ec7afbb6ff69e318eb225fd7ae7aaf | [
"BSD-3-Clause"
] | null | null | null | rmnd_lca/export.py | xiaoshir/rmnd-lca | 9831d59361ec7afbb6ff69e318eb225fd7ae7aaf | [
"BSD-3-Clause"
] | null | null | null | import os
from . import DATA_DIR
import csv
FILEPATH_BIOSPHERE_FLOWS = (DATA_DIR / "flows_biosphere.csv")
class Export:
"""
Class that exports the transformed data into matrices:
* A matrix: contains products exchanges
* B matrix: contains exchanges activities and the biosphere
The A and B matric... | 38.671642 | 121 | 0.533771 |
e3bf49c21133fa2b1adc31a5f5ab0c39ddad9eb8 | 1,446 | py | Python | xlsxwriter/test/comparison/test_chart_axis20.py | hugovk/XlsxWriter | e97cc66637d9895480ee32cfb5e561d652d3787b | [
"BSD-2-Clause"
] | null | null | null | xlsxwriter/test/comparison/test_chart_axis20.py | hugovk/XlsxWriter | e97cc66637d9895480ee32cfb5e561d652d3787b | [
"BSD-2-Clause"
] | null | null | null | xlsxwriter/test/comparison/test_chart_axis20.py | hugovk/XlsxWriter | e97cc66637d9895480ee32cfb5e561d652d3787b | [
"BSD-2-Clause"
] | null | null | null | ###############################################################################
#
# Tests for XlsxWriter.
#
# SPDX-License-Identifier: BSD-2-Clause
# Copyright (c), 2013-2022, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparison_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompar... | 25.821429 | 79 | 0.570539 |
0ece52f4b017eea88f1d7e5090852bb153576624 | 2,332 | py | Python | python/leetcode/easy/ex0053.py | vilisimo/ads | cba2b04db6fd2755e32d0e3f2e4480fd808155f5 | [
"MIT"
] | null | null | null | python/leetcode/easy/ex0053.py | vilisimo/ads | cba2b04db6fd2755e32d0e3f2e4480fd808155f5 | [
"MIT"
] | null | null | null | python/leetcode/easy/ex0053.py | vilisimo/ads | cba2b04db6fd2755e32d0e3f2e4480fd808155f5 | [
"MIT"
] | null | null | null | # Given an integer array nums, find the contiguous subarray (containing at least one number)
# which has the largest sum and return its sum.
# A subarray is a contiguous part of an array.
# Example 1:
# Input: nums = [-2,1,-3,4,-1,2,1,-5,4]
# Output: 6
# Explanation: [4,-1,2,1] has the largest sum = 6.
# Example... | 27.761905 | 92 | 0.583619 |
da6615b53ab23e1d7a9e92f35c52d1b335367b2f | 959 | py | Python | schemas/orders.py | rimtzg/supertpv-branch-server | c8ebf8b1d43c90d964a3f26c195b7078a573adb7 | [
"MIT"
] | null | null | null | schemas/orders.py | rimtzg/supertpv-branch-server | c8ebf8b1d43c90d964a3f26c195b7078a573adb7 | [
"MIT"
] | 1 | 2022-02-26T17:28:54.000Z | 2022-02-26T17:28:54.000Z | schemas/orders.py | rimtzg/supertpv-branch-server | c8ebf8b1d43c90d964a3f26c195b7078a573adb7 | [
"MIT"
] | null | null | null | from schema import Schema, Optional, Use, Or
from datetime import datetime
from bson import ObjectId
# from order_templates import schema as order_template
schema = Schema({
'_id' : Use(ObjectId),
'client_id' : Use(ObjectId),
'client_name' : Use(str.lower),
'date' : Use(datet... | 29.060606 | 56 | 0.459854 |
14870081e93874284d534b3eff7241fd341f862c | 335 | py | Python | info_screen/urls.py | OPpuolitaival/django-info-screen | 63f65b08d4dcb463b6f17f840ca39979d2784685 | [
"MIT"
] | 1 | 2017-01-13T19:31:26.000Z | 2017-01-13T19:31:26.000Z | info_screen/urls.py | OPpuolitaival/django-info-screen | 63f65b08d4dcb463b6f17f840ca39979d2784685 | [
"MIT"
] | null | null | null | info_screen/urls.py | OPpuolitaival/django-info-screen | 63f65b08d4dcb463b6f17f840ca39979d2784685 | [
"MIT"
] | null | null | null | # coding: utf-8
from django.conf.urls import url
from . import views
app_name = 'info_screen'
urlpatterns = [
url(r'^api/', views.ScreenJsonView.as_view(), name='api'),
url(r'^image/(?P<page_uuid>.*)', views.ImageView.as_view(), name='image'),
url(r'^(?P<screen_uuid>.*)/', views.ScreenView.as_view(), nam... | 25.769231 | 78 | 0.653731 |
185dfe17f7670bdeaa1027d96a75f762fdba37ab | 615 | py | Python | docker/optimization/pyOpt/tags/v1.2.0/pyOpt/pyCONMIN/setup.py | liujiamingustc/phd | 4f815a738abad43531d02ac66f5bd0d9a1def52a | [
"Apache-2.0"
] | 3 | 2021-01-06T03:01:18.000Z | 2022-03-21T03:02:55.000Z | docker/optimization/pyOpt/tags/v1.2.0/pyOpt/pyCONMIN/setup.py | liujiamingustc/phd | 4f815a738abad43531d02ac66f5bd0d9a1def52a | [
"Apache-2.0"
] | null | null | null | docker/optimization/pyOpt/tags/v1.2.0/pyOpt/pyCONMIN/setup.py | liujiamingustc/phd | 4f815a738abad43531d02ac66f5bd0d9a1def52a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os,sys
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('pyCONMIN',parent_package,top_path)
config.add_library('conmin',
sources=[os.path.join('source', '*.f')])
config.ad... | 23.653846 | 62 | 0.656911 |
66e2a742e4812a6c81a0def32deddbd512ac23d0 | 4,541 | py | Python | naff/api/http/http_requests/reactions.py | Kigstn/Dis-Snek | efbf5a39ac550e5f04d0e11edf733ce312ccc0bf | [
"MIT"
] | 64 | 2021-10-12T15:31:36.000Z | 2022-03-29T18:25:47.000Z | naff/api/http/http_requests/reactions.py | Kigstn/Dis-Snek | efbf5a39ac550e5f04d0e11edf733ce312ccc0bf | [
"MIT"
] | 166 | 2021-10-10T16:27:52.000Z | 2022-03-30T09:04:54.000Z | naff/api/http/http_requests/reactions.py | Kigstn/Dis-Snek | efbf5a39ac550e5f04d0e11edf733ce312ccc0bf | [
"MIT"
] | 34 | 2021-10-10T13:26:41.000Z | 2022-03-23T13:59:35.000Z | from typing import TYPE_CHECKING, Any, List
import discord_typings
from naff.client.const import MISSING, Absent
from ..route import Route
__all__ = ("ReactionRequests",)
if TYPE_CHECKING:
from naff.models.discord.snowflake import Snowflake_Type
class ReactionRequests:
request: Any
async def create_... | 31.317241 | 116 | 0.560669 |
02189c6c5dda9396f32a238074fc4c4d240ef7e6 | 8,538 | py | Python | netmiko/huawei/huawei.py | dBitech/netmiko | 72dae46bef4727e288b6a7d6b0119b25d44e1471 | [
"MIT"
] | null | null | null | netmiko/huawei/huawei.py | dBitech/netmiko | 72dae46bef4727e288b6a7d6b0119b25d44e1471 | [
"MIT"
] | null | null | null | netmiko/huawei/huawei.py | dBitech/netmiko | 72dae46bef4727e288b6a7d6b0119b25d44e1471 | [
"MIT"
] | null | null | null | from typing import Optional, Any
import time
import re
import warnings
from netmiko.no_enable import NoEnable
from netmiko.base_connection import DELAY_FACTOR_DEPR_SIMPLE_MSG
from netmiko.cisco_base_connection import CiscoBaseConnection
from netmiko.exceptions import NetmikoAuthenticationException
from netmiko import ... | 35.427386 | 88 | 0.613024 |
397f999a7513bf4407dd5181b9b32797dbf26b0d | 2,754 | py | Python | test/functional/mempool_limit.py | RitoProject/Ritocoin | 6950104b40ca6bec36ec98ea2046ea2fdcf4e92a | [
"MIT"
] | 18 | 2018-11-30T19:07:06.000Z | 2021-05-17T11:06:12.000Z | test/functional/mempool_limit.py | RitoProject/Ravencoin | 6950104b40ca6bec36ec98ea2046ea2fdcf4e92a | [
"MIT"
] | 1 | 2018-12-08T19:41:43.000Z | 2018-12-08T19:41:43.000Z | test/functional/mempool_limit.py | RitoProject/Ravencoin | 6950104b40ca6bec36ec98ea2046ea2fdcf4e92a | [
"MIT"
] | 17 | 2018-11-30T17:16:21.000Z | 2021-10-30T17:33:14.000Z | #!/usr/bin/env python3
# Copyright (c) 2017-2019 The Bitcoin Core developers
# Copyright (c) 2017 The Raven Core developers
# Copyright (c) 2018 The Rito Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test mempo... | 43.714286 | 132 | 0.669572 |
cd3239dd479f60b0123273982321f2edbc4a3720 | 1,059 | py | Python | nf_common_source/code/services/input_output_service/sql_server/sql_server_metadata_recogniser.py | boro-alpha/nf_common | 66d6844d9ae9a86a3e5b461f92e1ba0ec15e85ef | [
"MIT"
] | null | null | null | nf_common_source/code/services/input_output_service/sql_server/sql_server_metadata_recogniser.py | boro-alpha/nf_common | 66d6844d9ae9a86a3e5b461f92e1ba0ec15e85ef | [
"MIT"
] | null | null | null | nf_common_source/code/services/input_output_service/sql_server/sql_server_metadata_recogniser.py | boro-alpha/nf_common | 66d6844d9ae9a86a3e5b461f92e1ba0ec15e85ef | [
"MIT"
] | null | null | null | import re
table_pattern = \
r'TABLE (.+) \((.+) CONSTRAINT (.+)\)'
column_pattern = \
r'[(.+)] [(.+)]'
def find_all_tables_from_schema_via_regex(
schema_file_path: str):
schema = \
__read_schema(
schema_file_path)
table_compiled_pattern= \
re.compile(
... | 19.981132 | 77 | 0.570349 |
dcc749a995d8d81e9c8117b05c83fb3458dde7a8 | 1,812 | py | Python | pybtex/style/__init__.py | chfritz/pybtex | 1649bb985602ceb800c4fcb7d9a9ed0191f34504 | [
"MIT"
] | 1 | 2020-06-11T20:23:45.000Z | 2020-06-11T20:23:45.000Z | pybtex/style/__init__.py | chfritz/pybtex | 1649bb985602ceb800c4fcb7d9a9ed0191f34504 | [
"MIT"
] | null | null | null | pybtex/style/__init__.py | chfritz/pybtex | 1649bb985602ceb800c4fcb7d9a9ed0191f34504 | [
"MIT"
] | null | null | null | # Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Andrey Golovizin
#
# 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 ... | 39.391304 | 74 | 0.730684 |
04eacfc94159cd312cd4976e4fb22ca2752cd35e | 503 | py | Python | inhandpy/setup.py | psodhi/tactile-in-hand | 0bde0889e331bca0159a0254e38626da21d620c1 | [
"BSD-3-Clause"
] | 7 | 2021-11-16T21:55:01.000Z | 2022-02-09T10:26:04.000Z | inhandpy/setup.py | psodhi/tactile-in-hand | 0bde0889e331bca0159a0254e38626da21d620c1 | [
"BSD-3-Clause"
] | null | null | null | inhandpy/setup.py | psodhi/tactile-in-hand | 0bde0889e331bca0159a0254e38626da21d620c1 | [
"BSD-3-Clause"
] | 2 | 2022-02-09T02:07:18.000Z | 2022-03-09T16:24:32.000Z | from setuptools import setup, find_packages
install_requires = [line.rstrip() for line in open("requirements/requirements.txt", "r")]
setup(
name="inhandpy",
version="0.0.1",
description="PatchGraph: In-hand tactile tracking with learned surface normals",
url="",
author="Paloma Sodhi",
author_... | 29.588235 | 89 | 0.687873 |
d51462f8003439e709bcd154bf4d62cb34ac621d | 1,186 | py | Python | run_all_tests.py | RAbraham/logica | 9bb24de465a5363b2a045fd985198a6beb4f8ec2 | [
"Apache-2.0"
] | 1,434 | 2020-10-10T19:28:17.000Z | 2022-03-31T08:23:05.000Z | run_all_tests.py | RAbraham/logica | 9bb24de465a5363b2a045fd985198a6beb4f8ec2 | [
"Apache-2.0"
] | 55 | 2020-10-22T12:33:50.000Z | 2022-03-14T18:57:15.000Z | run_all_tests.py | RAbraham/logica | 9bb24de465a5363b2a045fd985198a6beb4f8ec2 | [
"Apache-2.0"
] | 79 | 2021-04-13T10:43:34.000Z | 2022-03-28T21:39:11.000Z | #!/usr/bin/python
#
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 29.65 | 74 | 0.771501 |
de1e22da84df9ac0ab287e30a697e7496fcb30a9 | 8,956 | py | Python | docs/tutorials/action_recognition/dive_deep_tsn_ucf101.py | Kentwhf/gluon-cv | bab5c029793d4da20b5c14846a0db58cfbe21d6d | [
"Apache-2.0"
] | null | null | null | docs/tutorials/action_recognition/dive_deep_tsn_ucf101.py | Kentwhf/gluon-cv | bab5c029793d4da20b5c14846a0db58cfbe21d6d | [
"Apache-2.0"
] | null | null | null | docs/tutorials/action_recognition/dive_deep_tsn_ucf101.py | Kentwhf/gluon-cv | bab5c029793d4da20b5c14846a0db58cfbe21d6d | [
"Apache-2.0"
] | null | null | null | """2. Dive Deep into Training TSN mdoels on UCF101
==================================================
This is a video action recognition tutorial using Gluon CV toolkit, a step-by-step example.
The readers should have basic knowledge of deep learning and should be familiar with Gluon API.
New users may first go throug... | 39.10917 | 186 | 0.663801 |
40bde87c5a8c55517f3d008efc863a25c71c78c6 | 2,526 | py | Python | venv/lib/python3.7/site-packages/logging2/handlers/streaming.py | QinshanSun/timezoneSpider | 4ce0e5f84cf34d2b4fe7be3ec068209ec1c0333f | [
"MIT"
] | null | null | null | venv/lib/python3.7/site-packages/logging2/handlers/streaming.py | QinshanSun/timezoneSpider | 4ce0e5f84cf34d2b4fe7be3ec068209ec1c0333f | [
"MIT"
] | null | null | null | venv/lib/python3.7/site-packages/logging2/handlers/streaming.py | QinshanSun/timezoneSpider | 4ce0e5f84cf34d2b4fe7be3ec068209ec1c0333f | [
"MIT"
] | null | null | null | from io import TextIOWrapper
from sys import stderr, stdout
from typing import Optional
from logging2.handlers.abc import Handler
from logging2.levels import LogLevel
class StreamingHandler(Handler):
"""A generic ``Handler`` for writing log entries to a streaming endpoint such as STDOUT or STDERR.
"""
d... | 31.974684 | 104 | 0.634996 |
f5e859ada6fc0f55528d53245baaf324106b2e5f | 5,127 | py | Python | doc/source/conf.py | awesome-archive/HarvestText | 0d537f190a1f4b00b1ea06ef2d51e9efac4249a0 | [
"MIT"
] | 14 | 2019-10-29T03:24:18.000Z | 2022-03-21T06:19:13.000Z | doc/source/conf.py | BoChen-Daniel/HarvestText | bc32dfed5b6d5123a9f4b065fb37089d21c979da | [
"MIT"
] | null | null | null | doc/source/conf.py | BoChen-Daniel/HarvestText | bc32dfed5b6d5123a9f4b065fb37089d21c979da | [
"MIT"
] | 6 | 2019-10-04T10:25:58.000Z | 2020-10-23T09:55:06.000Z | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | 30.517857 | 79 | 0.646187 |
009bd2b1d52343f97a348e3772bbed98b43048f9 | 114 | py | Python | test_contest/solutions/facts.py | tbuzzelli/Veris | b2e9bd5f944a60365de8c18f17e041fa65f9e74a | [
"Apache-2.0"
] | 7 | 2018-09-26T17:17:01.000Z | 2020-12-20T17:23:33.000Z | test_contest/solutions/facts.py | tbuzzelli/Veris | b2e9bd5f944a60365de8c18f17e041fa65f9e74a | [
"Apache-2.0"
] | 4 | 2018-09-26T17:49:24.000Z | 2020-12-20T17:15:37.000Z | test_contest/solutions/facts.py | tbuzzelli/Veris | b2e9bd5f944a60365de8c18f17e041fa65f9e74a | [
"Apache-2.0"
] | 1 | 2021-12-03T17:49:50.000Z | 2021-12-03T17:49:50.000Z |
n = int(input())
for testCase in range(n):
# Negate each answer
a = int(input())
print(-a)
| 12.666667 | 26 | 0.517544 |
346a15ac44941142a84961bab0bd3c314190955b | 6,035 | py | Python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_06_01/operations/_private_link_resources_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_06_01/operations/_private_link_resources_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_06_01/operations/_private_link_resources_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.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 may ... | 44.051095 | 211 | 0.706877 |
1ba11c52a4b6c44296bf489c8c3a020349fa6de4 | 5,184 | py | Python | lib/python3.8/site-packages/ansible_collections/community/network/tests/unit/plugins/modules/network/slxos/test_slxos_interface.py | cjsteel/python3-venv-ansible-2.10.5 | c95395c4cae844dc66fddde9b4343966f4b2ecd5 | [
"Apache-1.1"
] | null | null | null | lib/python3.8/site-packages/ansible_collections/community/network/tests/unit/plugins/modules/network/slxos/test_slxos_interface.py | cjsteel/python3-venv-ansible-2.10.5 | c95395c4cae844dc66fddde9b4343966f4b2ecd5 | [
"Apache-1.1"
] | null | null | null | lib/python3.8/site-packages/ansible_collections/community/network/tests/unit/plugins/modules/network/slxos/test_slxos_interface.py | cjsteel/python3-venv-ansible-2.10.5 | c95395c4cae844dc66fddde9b4343966f4b2ecd5 | [
"Apache-1.1"
] | null | null | null | #
# (c) 2018 Extreme Networks Inc.
#
# This file is part of Ansible
#
# Ansible 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 option) any later version.
#
# Ans... | 33.230769 | 110 | 0.595679 |
fe240d5869bdc012e5080a75df9b239069a5fbf3 | 1,797 | py | Python | demo/memory_tree/xml_amazoncat_13K_script.py | Ark-kun/vowpal_wabbit | d811c93fa6adbb513729698202984e3662a3d8df | [
"BSD-3-Clause"
] | 4,332 | 2015-01-01T10:26:51.000Z | 2018-10-01T14:05:43.000Z | demo/memory_tree/xml_amazoncat_13K_script.py | chrinide/vowpal_wabbit | 40e1fef676ca6a461d71cf0631ab5c63d1af5d8a | [
"BSD-3-Clause"
] | 1,004 | 2015-01-01T12:00:54.000Z | 2018-09-30T22:13:42.000Z | demo/memory_tree/xml_amazoncat_13K_script.py | chrinide/vowpal_wabbit | 40e1fef676ca6a461d71cf0631ab5c63d1af5d8a | [
"BSD-3-Clause"
] | 1,182 | 2015-01-02T20:38:55.000Z | 2018-09-26T02:47:37.000Z | import os
import time
import numpy as np
# from IPython import embed
print("perform experiments on amazoncat 13K (multilabel)")
leaf_example_multiplier = 2
lr = 1
bits = 30
alpha = 0.1 # 0.3
passes = 4
learn_at_leaf = True
use_oas = True
# num_queries = 1 #does not really use
dream_at_update = 1
# hal_version = 1 #... | 32.089286 | 171 | 0.703395 |
5f238a849f9b853516f555f676663299345c2f96 | 17,089 | py | Python | tests/testenv/__init__.py | konradxyz/dev_fileserver | 2c57520c447fc4bfda78668df575431be5c39276 | [
"Apache-2.0"
] | null | null | null | tests/testenv/__init__.py | konradxyz/dev_fileserver | 2c57520c447fc4bfda78668df575431be5c39276 | [
"Apache-2.0"
] | null | null | null | tests/testenv/__init__.py | konradxyz/dev_fileserver | 2c57520c447fc4bfda78668df575431be5c39276 | [
"Apache-2.0"
] | null | null | null | ########
# Copyright (c) 2013 GigaSpaces Technologies 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 requir... | 35.162551 | 79 | 0.636374 |
b52de0945309f71cb0ebe333bee64345934f7a35 | 10,422 | py | Python | src/cryptography/hazmat/backends/openssl/ciphers.py | andrewjroth/cryptography | 2dbc6bbf19274f768f03ea82dcf59c371951ad2c | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/cryptography/hazmat/backends/openssl/ciphers.py | andrewjroth/cryptography | 2dbc6bbf19274f768f03ea82dcf59c371951ad2c | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2022-01-19T01:52:49.000Z | 2022-01-20T14:14:46.000Z | src/cryptography/hazmat/backends/openssl/ciphers.py | messense/cryptography | 44f9703906d118cf689ce964cd310445e44b8853 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
import typing
from cryptography import utils
from cryptography.exceptions import InvalidTag, UnsupportedAlgorithm, _Reasons
from cryptogra... | 36.957447 | 79 | 0.567645 |
5d86bbb7d45b07807b8d2a8bfb782d7715928191 | 31,428 | py | Python | espnet2/train/trainer.py | lahiruts/espnet | 0afa20fa1d5105374f8998fba596b01b04dea6c3 | [
"Apache-2.0"
] | 1 | 2021-09-29T03:14:14.000Z | 2021-09-29T03:14:14.000Z | espnet2/train/trainer.py | xbsdsongnan/espnet | 1dc734839d34e2f2dd13cfa375713aecf232ae25 | [
"Apache-2.0"
] | 83 | 2020-09-14T15:28:59.000Z | 2021-04-19T23:07:45.000Z | espnet2/train/trainer.py | xbsdsongnan/espnet | 1dc734839d34e2f2dd13cfa375713aecf232ae25 | [
"Apache-2.0"
] | 1 | 2021-11-27T03:10:00.000Z | 2021-11-27T03:10:00.000Z | import argparse
from contextlib import contextmanager
import dataclasses
from dataclasses import is_dataclass
from distutils.version import LooseVersion
import logging
from pathlib import Path
import time
from typing import Dict
from typing import Iterable
from typing import List
from typing import Optional
from typing... | 40.709845 | 88 | 0.534905 |
0cd6d2490cc5f724f149a5963c423f99a0ac90ec | 3,424 | py | Python | asterioids-pygame-project/source_code_step_10/space_rocks/game.py | syberflea/materials | 54f44725b40edf00c1b523d7a85b34a85014d7eb | [
"MIT"
] | 3,682 | 2018-05-07T19:45:24.000Z | 2022-03-31T15:19:10.000Z | asterioids-pygame-project/source_code_step_10/space_rocks/game.py | sribarrow/materials | c17c4a4d6f8487e59eac1df8c88ca92b73d6d2a5 | [
"MIT"
] | 148 | 2018-05-15T21:18:49.000Z | 2022-03-21T11:25:39.000Z | asterioids-pygame-project/source_code_step_10/space_rocks/game.py | sribarrow/materials | c17c4a4d6f8487e59eac1df8c88ca92b73d6d2a5 | [
"MIT"
] | 5,535 | 2018-05-25T23:36:08.000Z | 2022-03-31T16:55:52.000Z | import pygame
from models import Asteroid, Spaceship
from utils import get_random_position, load_sprite, print_text
class SpaceRocks:
MIN_ASTEROID_DISTANCE = 250
def __init__(self):
self._init_pygame()
self.screen = pygame.display.set_mode((800, 600))
self.background = load_sprite("s... | 30.846847 | 77 | 0.5625 |
6770b06296751a6cab58a0ea73c68da5469d8880 | 89 | py | Python | app/main/__init__.py | DennisKipkirui/Pitch_app | d2272b12c61df545bf4a16e7235631becbf2a901 | [
"Unlicense"
] | 1 | 2020-07-17T06:52:43.000Z | 2020-07-17T06:52:43.000Z | app/main/__init__.py | DennisKipkirui/Pitch_app | d2272b12c61df545bf4a16e7235631becbf2a901 | [
"Unlicense"
] | null | null | null | app/main/__init__.py | DennisKipkirui/Pitch_app | d2272b12c61df545bf4a16e7235631becbf2a901 | [
"Unlicense"
] | 1 | 2020-07-18T10:58:43.000Z | 2020-07-18T10:58:43.000Z | from flask import Blueprint
main = Blueprint('main',__name__)
from .import errors,views | 17.8 | 33 | 0.786517 |
7c9c871ce31cd4de64d9c67717fb566efbbe4da2 | 96 | py | Python | sample_dashboard/google_analytics/apps.py | Georgitanev/django_dashboard | 5be2680712fcedf33965fd66a69d46e1e32ab04b | [
"MIT"
] | null | null | null | sample_dashboard/google_analytics/apps.py | Georgitanev/django_dashboard | 5be2680712fcedf33965fd66a69d46e1e32ab04b | [
"MIT"
] | null | null | null | sample_dashboard/google_analytics/apps.py | Georgitanev/django_dashboard | 5be2680712fcedf33965fd66a69d46e1e32ab04b | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class SalesConfig(AppConfig):
name = "google_analytics"
| 16 | 33 | 0.770833 |
4d4bf1a1e81845f3b9b84d3b4b6b336dbb4c4bfd | 1,914 | py | Python | scripts/generate_meta_info_pairdata.py | wacky6/Real-ESRGAN | c9023b3d7a5b711b0505a3e39671e3faab9de1fe | [
"BSD-3-Clause"
] | 58 | 2021-12-21T03:57:31.000Z | 2022-03-26T15:04:02.000Z | scripts/generate_meta_info_pairdata.py | wacky6/Real-ESRGAN | c9023b3d7a5b711b0505a3e39671e3faab9de1fe | [
"BSD-3-Clause"
] | 5 | 2021-12-24T07:11:50.000Z | 2022-02-10T01:20:27.000Z | scripts/generate_meta_info_pairdata.py | wacky6/Real-ESRGAN | c9023b3d7a5b711b0505a3e39671e3faab9de1fe | [
"BSD-3-Clause"
] | 4 | 2022-01-27T14:46:35.000Z | 2022-02-13T11:52:10.000Z | import argparse
import glob
import os
def main(args):
txt_file = open(args.meta_info, 'w')
img_paths_gt = sorted(glob.glob(os.path.join(args.input[0], '*')))
img_paths_lq = sorted(glob.glob(os.path.join(args.input[1], '*')))
assert len(img_paths_gt) == len(img_paths_lq), ('GT folder and LQ folder sho... | 39.875 | 115 | 0.634796 |
3f6cf3d4f6ebdc61a5f730f6eb99f2f0bc0b2325 | 1,738 | py | Python | torchlib/module/layers/fft_layers.py | antsfamily/torchtool | fd0d6e6fe6701206b15f95af145d6178a87233f9 | [
"MIT"
] | 1 | 2019-08-15T15:32:36.000Z | 2019-08-15T15:32:36.000Z | torchlib/module/layers/fft_layers.py | antsfamily/torchtool | fd0d6e6fe6701206b15f95af145d6178a87233f9 | [
"MIT"
] | null | null | null | torchlib/module/layers/fft_layers.py | antsfamily/torchtool | fd0d6e6fe6701206b15f95af145d6178a87233f9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date : 2019-11-07 17:00:48
# @Author : Zhi Liu (zhiliu.mind@gmail.com)
# @Link : http://iridescent.ink
# @Version : $1.0$
import torch as th
import torch.nn.functional as F
import torchlib as tl
class FFTLayer1d(th.nn.Module):
def __init__(self, nfft=None)... | 23.808219 | 78 | 0.546605 |
c69bcd062fd2add7775ac68577ec73f3dd41e27e | 1,566 | py | Python | dask/dataframe/tests/test_extensions.py | srijan-deepsource/dask | 0673d9084e02f985f3fdf5ba6ede80e8de5ac15c | [
"BSD-3-Clause"
] | 20 | 2015-01-19T14:04:10.000Z | 2020-01-14T03:43:19.000Z | dask/dataframe/tests/test_extensions.py | srijan-deepsource/dask | 0673d9084e02f985f3fdf5ba6ede80e8de5ac15c | [
"BSD-3-Clause"
] | 12 | 2015-01-22T22:00:43.000Z | 2020-07-28T19:22:16.000Z | dask/dataframe/tests/test_extensions.py | srijan-deepsource/dask | 0673d9084e02f985f3fdf5ba6ede80e8de5ac15c | [
"BSD-3-Clause"
] | 7 | 2015-01-04T18:50:00.000Z | 2020-07-29T11:00:04.000Z | from decimal import Decimal
import pytest
import dask.dataframe as dd
from dask.dataframe.utils import assert_eq, PANDAS_VERSION
pd = pytest.importorskip("pandas", minversion="0.23.4")
from pandas.tests.extension.decimal.array import DecimalArray, DecimalDtype
from dask.dataframe.extensions import make_array_nonempt... | 29 | 86 | 0.706897 |
a7f4c3629119458d22490618c7884c0009b8900d | 24,201 | py | Python | eodatasets3/wagl.py | ohehir/eo-datasets | 836bb8613e1549b8ae82a5ac1198a99bbdf08a4d | [
"Apache-2.0"
] | null | null | null | eodatasets3/wagl.py | ohehir/eo-datasets | 836bb8613e1549b8ae82a5ac1198a99bbdf08a4d | [
"Apache-2.0"
] | null | null | null | eodatasets3/wagl.py | ohehir/eo-datasets | 836bb8613e1549b8ae82a5ac1198a99bbdf08a4d | [
"Apache-2.0"
] | null | null | null | """
Package WAGL HDF5 Outputs
This will convert the HDF5 file (and sibling fmask/gqa files) into
GeoTIFFS (COGs) with datacube metadata using the DEA naming conventions
for files.
"""
import contextlib
import os
import re
import sys
from datetime import timedelta, datetime
from pathlib import Path
from typing import L... | 33.990169 | 115 | 0.592455 |
e86e3281a2bd23a8c454b2a18ba951459b01645e | 3,265 | py | Python | antareslauncher/use_cases/launch/launch_controller.py | AntaresSimulatorTeam/antares-launcher | 8915f4ef0ce88565bd130b1230574247a9685a65 | [
"Apache-2.0"
] | null | null | null | antareslauncher/use_cases/launch/launch_controller.py | AntaresSimulatorTeam/antares-launcher | 8915f4ef0ce88565bd130b1230574247a9685a65 | [
"Apache-2.0"
] | 8 | 2021-04-02T12:16:28.000Z | 2021-09-17T08:19:56.000Z | antareslauncher/use_cases/launch/launch_controller.py | AntaresSimulatorTeam/antares-launcher | 8915f4ef0ce88565bd130b1230574247a9685a65 | [
"Apache-2.0"
] | 1 | 2021-03-11T09:08:43.000Z | 2021-03-11T09:08:43.000Z | from antareslauncher.data_repo.data_reporter import DataReporter
from antareslauncher.data_repo.idata_repo import IDataRepo
from antareslauncher.display.idisplay import IDisplay
from antareslauncher.file_manager.file_manager import FileManager
from antareslauncher.remote_environnement.iremote_environment import (
I... | 33.316327 | 83 | 0.700459 |
04c290c738ba877afac3d8f11b1780922c3cd131 | 3,071 | py | Python | src/components/game-server/juego/partida.py | adp1002/practica-dms-2019-2020 | 9ae0c71140d537bb43c0f8ec8a81b8fff38dec21 | [
"MIT"
] | null | null | null | src/components/game-server/juego/partida.py | adp1002/practica-dms-2019-2020 | 9ae0c71140d537bb43c0f8ec8a81b8fff38dec21 | [
"MIT"
] | null | null | null | src/components/game-server/juego/partida.py | adp1002/practica-dms-2019-2020 | 9ae0c71140d537bb43c0f8ec8a81b8fff38dec21 | [
"MIT"
] | null | null | null | from juego.fabrica_abstracta_juegos import FabricaJuegoMesa
class Partida:
""" Partida de un juego entre dos jugadores.
---
La clase almacena el estado de la partida.
"""
def __init__(self, fabrica_juego):
""" Constructor.
---
Parámetros:
- fabrica_juego... | 30.71 | 80 | 0.558776 |
0c94e762abb81b50821fbe97b1a44d6b42e9e2ad | 14,588 | py | Python | tensorflow/python/keras/utils/losses_utils.py | jay-jang/tensorflow | 6c3b7f4c3e89718c1812e9132a3546cb0dc8f53c | [
"Apache-2.0"
] | 5 | 2021-04-01T15:14:48.000Z | 2021-04-02T02:56:07.000Z | tensorflow/python/keras/utils/losses_utils.py | jay-jang/tensorflow | 6c3b7f4c3e89718c1812e9132a3546cb0dc8f53c | [
"Apache-2.0"
] | 2 | 2021-01-26T13:15:46.000Z | 2021-01-26T16:46:46.000Z | tensorflow/python/keras/utils/losses_utils.py | jay-jang/tensorflow | 6c3b7f4c3e89718c1812e9132a3546cb0dc8f53c | [
"Apache-2.0"
] | 3 | 2021-01-26T11:51:18.000Z | 2021-01-26T12:13:40.000Z | # Copyright 2018 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... | 40.635097 | 106 | 0.714834 |
6e102e78b755b61883a9eb060938da9674e1e10c | 7,544 | py | Python | neutron/api/rpc/agentnotifiers/l3_rpc_agent_api.py | congnt95/neutron | 6a73a362c5ff5b7c28c15a49f47a9900c0d2b4e1 | [
"Apache-2.0"
] | 1,080 | 2015-01-04T08:35:00.000Z | 2022-03-27T09:15:52.000Z | neutron/api/rpc/agentnotifiers/l3_rpc_agent_api.py | congnt95/neutron | 6a73a362c5ff5b7c28c15a49f47a9900c0d2b4e1 | [
"Apache-2.0"
] | 24 | 2015-02-21T01:48:28.000Z | 2021-11-26T02:38:56.000Z | neutron/api/rpc/agentnotifiers/l3_rpc_agent_api.py | congnt95/neutron | 6a73a362c5ff5b7c28c15a49f47a9900c0d2b4e1 | [
"Apache-2.0"
] | 1,241 | 2015-01-02T10:47:10.000Z | 2022-03-27T09:42:23.000Z | # Copyright (c) 2013 OpenStack Foundation.
#
# 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... | 44.639053 | 78 | 0.621023 |
d85061cfb9c89e8c95868604a1eabdb6053b235a | 26,925 | py | Python | metalibm_core/targets/common/llvm_ir.py | metalibm/metalibm | e3133bb95e13f797bb902ef7cd1d2f8f352c4454 | [
"MIT"
] | 12 | 2019-10-29T21:30:58.000Z | 2022-02-05T16:28:01.000Z | metalibm_core/targets/common/llvm_ir.py | metalibm/metalibm | e3133bb95e13f797bb902ef7cd1d2f8f352c4454 | [
"MIT"
] | 20 | 2021-03-11T19:46:48.000Z | 2022-02-05T16:03:29.000Z | metalibm_core/targets/common/llvm_ir.py | metalibm/metalibm | e3133bb95e13f797bb902ef7cd1d2f8f352c4454 | [
"MIT"
] | 4 | 2021-03-10T15:06:58.000Z | 2021-07-14T17:39:53.000Z | # -*- coding: utf-8 -*-
###############################################################################
# This file is part of metalibm (https://github.com/kalray/metalibm)
###############################################################################
# MIT License
#
# Copyright (c) 2018 Kalray
#
# Permission is here... | 36.044177 | 134 | 0.542433 |
e0c49ab82e41f935037eeed7ccd2b76334f0dbd4 | 1,062 | py | Python | scripts/python/sequencer_tcs_start_of_night.py | lsst-ts/ts_ocs_sequencer | e99b43e5264bcc22d664c12f1988c42411c73d5a | [
"BSD-3-Clause"
] | null | null | null | scripts/python/sequencer_tcs_start_of_night.py | lsst-ts/ts_ocs_sequencer | e99b43e5264bcc22d664c12f1988c42411c73d5a | [
"BSD-3-Clause"
] | null | null | null | scripts/python/sequencer_tcs_start_of_night.py | lsst-ts/ts_ocs_sequencer | e99b43e5264bcc22d664c12f1988c42411c73d5a | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# +
# import(s)
# -
from OcsSequencerEntity import *
# +
# main()
# -
if __name__ == '__main__':
sequencer = None
try:
sequencer = OcsSequencerEntity('OCS', 'Sequencer', False)
except OcsGenericEntityException as e:
print(e.errstr)
if se... | 23.6 | 65 | 0.584746 |
c86d85d5bb02074e6751c1de1bc341e5e4c579f0 | 5,669 | py | Python | Reproduction package/RQ3_CoM_Testing.py | lhmtriet/MSR2019 | ff5100c9ae3c8180852df92134a0b090d9b420ab | [
"MIT"
] | 2 | 2020-10-28T01:05:52.000Z | 2022-03-18T02:34:20.000Z | Reproduction package/RQ3_CoM_Testing.py | lhmtriet/MSR2019 | ff5100c9ae3c8180852df92134a0b090d9b420ab | [
"MIT"
] | null | null | null | Reproduction package/RQ3_CoM_Testing.py | lhmtriet/MSR2019 | ff5100c9ae3c8180852df92134a0b090d9b420ab | [
"MIT"
] | 2 | 2019-12-02T17:11:08.000Z | 2022-02-20T15:34:15.000Z | # Import libraries
import pandas as pd
import numpy as np
import time
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics import accuracy_score, f1_score
from xgboost import XGBClassifier
from sklearn.linear_model import LogisticRegression
from lightgbm import LGBMClassifier
# Load data... | 34.150602 | 151 | 0.676486 |
fa46355eed5d812ea7495975171cd9f431b80973 | 2,730 | py | Python | lib/surface/app/instances/list.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | lib/surface/app/instances/list.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | lib/surface/app/instances/list.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*- #
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 33.703704 | 79 | 0.668498 |
780e27e9b11b1b098fe321c0a2854c70068ce2c0 | 6,259 | py | Python | check_distro.py | ros-arch/arch_ros_package_monitor | 8940d98b672b3897ae66395da7d2336b9fb0a191 | [
"BSD-3-Clause"
] | 1 | 2022-02-16T03:29:15.000Z | 2022-02-16T03:29:15.000Z | check_distro.py | ros-arch/arch_ros_package_monitor | 8940d98b672b3897ae66395da7d2336b9fb0a191 | [
"BSD-3-Clause"
] | null | null | null | check_distro.py | ros-arch/arch_ros_package_monitor | 8940d98b672b3897ae66395da7d2336b9fb0a191 | [
"BSD-3-Clause"
] | 1 | 2020-06-27T06:28:04.000Z | 2020-06-27T06:28:04.000Z | #!/usr/bin/env python3
# Copyright © 2020 Felix Exner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of co... | 40.121795 | 100 | 0.657134 |
bfb506356bd2c436fa4d4c4afcf6d107334152c3 | 1,063 | py | Python | textprase/spiders/hexun.py | miemiekurisu/fnews | 33560d0561c1cf7d1a828df5e46a2d7475e39c4e | [
"Apache-2.0"
] | null | null | null | textprase/spiders/hexun.py | miemiekurisu/fnews | 33560d0561c1cf7d1a828df5e46a2d7475e39c4e | [
"Apache-2.0"
] | null | null | null | textprase/spiders/hexun.py | miemiekurisu/fnews | 33560d0561c1cf7d1a828df5e46a2d7475e39c4e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import scrapy
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from textprase.items import TextpraseItem
from scrapy.selector import HtmlXPathSelector
class HexunSpider... | 27.25641 | 82 | 0.665099 |
868f2a5e16a6efc1b29e9f1c076fcd182c5714c5 | 3,297 | py | Python | test/algorithms/excited_state_solvers/eigensolver_factories/test_numpy_eigensolver_factory.py | divshacker/qiskit-nature | 08f6dcec5e4ac8c08f5b84e764ee78cc3d12facb | [
"Apache-2.0"
] | 1 | 2021-06-20T15:31:01.000Z | 2021-06-20T15:31:01.000Z | test/algorithms/excited_state_solvers/eigensolver_factories/test_numpy_eigensolver_factory.py | divshacker/qiskit-nature | 08f6dcec5e4ac8c08f5b84e764ee78cc3d12facb | [
"Apache-2.0"
] | null | null | null | test/algorithms/excited_state_solvers/eigensolver_factories/test_numpy_eigensolver_factory.py | divshacker/qiskit-nature | 08f6dcec5e4ac8c08f5b84e764ee78cc3d12facb | [
"Apache-2.0"
] | 3 | 2021-07-02T06:57:58.000Z | 2021-07-06T12:32:38.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | 37.896552 | 96 | 0.721868 |
f194c4bf6074fd7e61553317d507b1801868edd2 | 3,690 | py | Python | lesson_3_shortest_path_GMNS/FIFO label correcting algorithm.py | asu-trans-ai-lab/traffic-engineering-and-analysis | 19e5718dabee7e3eb200937b5ce2d7e5e2d3fbf1 | [
"CC0-1.0"
] | null | null | null | lesson_3_shortest_path_GMNS/FIFO label correcting algorithm.py | asu-trans-ai-lab/traffic-engineering-and-analysis | 19e5718dabee7e3eb200937b5ce2d7e5e2d3fbf1 | [
"CC0-1.0"
] | null | null | null | lesson_3_shortest_path_GMNS/FIFO label correcting algorithm.py | asu-trans-ai-lab/traffic-engineering-and-analysis | 19e5718dabee7e3eb200937b5ce2d7e5e2d3fbf1 | [
"CC0-1.0"
] | 1 | 2020-12-03T16:01:35.000Z | 2020-12-03T16:01:35.000Z | # _*_coding:utf-8 _*_
# @Time :2020/3/1/10:47
# @Author : Dr.Prase
#@ File :modified label correcting algorithm.py
#@Software :PyCharm
"""import basic packages"""
import pandas as pd
import numpy as np
import copy
g_node_list=[] #set of nodes
g_node_zone={} #set of node types
g_link_list=[] #set of arcs
g_adjacen... | 41.931818 | 106 | 0.707046 |
dcc7bb9224b03a7fdab09143ec06101a0af9c212 | 2,152 | py | Python | Day-31/FlashCard.py | Nishi-16-K/100DaysCodeChallenge-Python- | 96df953bbc60c2bf8802cf31ed6c593469521482 | [
"MIT"
] | 1 | 2021-08-29T12:44:23.000Z | 2021-08-29T12:44:23.000Z | Day-31/FlashCard.py | Nishi-16-K/100DaysofCodeChallenge-Python | 96df953bbc60c2bf8802cf31ed6c593469521482 | [
"MIT"
] | null | null | null | Day-31/FlashCard.py | Nishi-16-K/100DaysofCodeChallenge-Python | 96df953bbc60c2bf8802cf31ed6c593469521482 | [
"MIT"
] | null | null | null | from tkinter import *
import pandas
import random
BACKGROUND_COLOR = "#B1DDC6"
current_card = {}
to_learn = {}
try:
data = pandas.read_csv("data/french_words.csv")
except FileNotFoundError:
original_data = pandas.read_csv("data/french_words.csv")
to_learn = original_data.to_dict(orient="records")
else:
... | 34.709677 | 86 | 0.748606 |
d50d67041b9607f0dc098311df82e24073f1282e | 4,423 | py | Python | huaweicloud-sdk-vpc/huaweicloudsdkvpc/v3/model/page_info.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 64 | 2020-06-12T07:05:07.000Z | 2022-03-30T03:32:50.000Z | huaweicloud-sdk-vpc/huaweicloudsdkvpc/v3/model/page_info.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 11 | 2020-07-06T07:56:54.000Z | 2022-01-11T11:14:40.000Z | huaweicloud-sdk-vpc/huaweicloudsdkvpc/v3/model/page_info.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 24 | 2020-06-08T11:42:13.000Z | 2022-03-04T06:44:08.000Z | # coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class PageInfo:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attrib... | 26.48503 | 83 | 0.574271 |
44e34702007d7bcbf4c4ebe247c1f4559a51392b | 7,809 | py | Python | decitala/hm/contour.py | Luke-Poeppel/decitala | dc5e26123605606014e32f44bde11a7f85cc93b1 | [
"MIT"
] | 6 | 2021-03-24T13:43:10.000Z | 2021-07-22T08:00:35.000Z | decitala/hm/contour.py | Luke-Poeppel/decitala | dc5e26123605606014e32f44bde11a7f85cc93b1 | [
"MIT"
] | 177 | 2021-03-22T17:17:40.000Z | 2021-09-22T12:56:45.000Z | decitala/hm/contour.py | Luke-Poeppel/decitala | dc5e26123605606014e32f44bde11a7f85cc93b1 | [
"MIT"
] | null | null | null | ####################################################################################################
# File: contour.py
# Purpose: Pitch contour tools for the birdsong transcriptions.
#
# Author: Luke Poeppel
#
# Location: Kent, 2021
###############################################################################... | 30.267442 | 100 | 0.663977 |
9c3a8f5a65502481cfed8f9e37c869d8c274d48c | 1,984 | py | Python | hop/subscribe.py | lpsinger/hop-client | d9cc7a7257a06dcaf192ef06f7ec360912aefe8e | [
"BSD-3-Clause"
] | 9 | 2020-05-13T20:26:33.000Z | 2022-02-02T22:31:24.000Z | hop/subscribe.py | lpsinger/hop-client | d9cc7a7257a06dcaf192ef06f7ec360912aefe8e | [
"BSD-3-Clause"
] | 108 | 2020-04-10T19:18:39.000Z | 2022-03-07T19:57:49.000Z | hop/subscribe.py | lpsinger/hop-client | d9cc7a7257a06dcaf192ef06f7ec360912aefe8e | [
"BSD-3-Clause"
] | 3 | 2021-03-08T16:44:53.000Z | 2022-02-02T22:30:50.000Z | import json
import logging
import sys
from . import cli
from . import io
from . import models
logger = logging.getLogger("hop")
def print_message(message, json_dump=False):
"""Print the content of a message.
Args:
message: message to print
json_dump: boolean indicating whether to print as raw ... | 26.453333 | 100 | 0.632056 |
72700fb9663d318c52738b2b555a4a99415b5a4f | 6,385 | py | Python | ros/src/tl_detector/dashboard.py | aj2020tls/CarND-Capstone | 31b7cacb6da32d2008d14851f34c3e9ba6b94041 | [
"MIT"
] | null | null | null | ros/src/tl_detector/dashboard.py | aj2020tls/CarND-Capstone | 31b7cacb6da32d2008d14851f34c3e9ba6b94041 | [
"MIT"
] | 2 | 2018-05-09T13:17:48.000Z | 2018-06-05T16:57:58.000Z | ros/src/tl_detector/dashboard.py | aj2020tls/CarND-Capstone | 31b7cacb6da32d2008d14851f34c3e9ba6b94041 | [
"MIT"
] | 4 | 2018-05-09T13:07:28.000Z | 2018-06-05T06:35:38.000Z | #!/usr/bin/env python
import numpy as np
import rospy
from std_msgs.msg import Int32
from styx_msgs.msg import Lane, Waypoint
from geometry_msgs.msg import PoseStamped
from styx_msgs.msg import TrafficLightArray, TrafficLight
from sensor_msgs.msg import Image as msgImage
from cv_bridge import CvBridge
import Tkinter... | 36.907514 | 149 | 0.592796 |
11b690d91e2ef552d0aa52577a98229db58e3f94 | 4,158 | py | Python | examples/model_selection/grid_search_text_feature_extraction.py | ZiBuDo/MyCareer | 41a686f199e5e88ff4d863c54304b8128bd87580 | [
"CC0-1.0"
] | null | null | null | examples/model_selection/grid_search_text_feature_extraction.py | ZiBuDo/MyCareer | 41a686f199e5e88ff4d863c54304b8128bd87580 | [
"CC0-1.0"
] | null | null | null | examples/model_selection/grid_search_text_feature_extraction.py | ZiBuDo/MyCareer | 41a686f199e5e88ff4d863c54304b8128bd87580 | [
"CC0-1.0"
] | null | null | null | """
==========================================================
Sample pipeline for text feature extraction and evaluation
==========================================================
The dataset used in this example is the 20 newsgroups dataset which will be
automatically downloaded and then cached and reused for the do... | 31.984615 | 79 | 0.660654 |
a5fb1075b4a45be1c719b027a7635c5da0f5b577 | 2,404 | py | Python | data.py | Seth-Scott/quiz_game | 01fa0a33d114432df6f6e12a2da88328ba0572c3 | [
"MIT"
] | null | null | null | data.py | Seth-Scott/quiz_game | 01fa0a33d114432df6f6e12a2da88328ba0572c3 | [
"MIT"
] | null | null | null | data.py | Seth-Scott/quiz_game | 01fa0a33d114432df6f6e12a2da88328ba0572c3 | [
"MIT"
] | null | null | null | question_data = [
{"category": "Science: Computers", "type": "boolean", "difficulty": "easy",
"question": "Linus Torvalds created Linux and Git.", "correct_answer": "True", "incorrect_answers": ["False"]},
{"category": "Science: Computers", "type": "boolean", "difficulty": "easy",
"question": "The log... | 89.037037 | 121 | 0.619384 |
9b568bcb7588be6f3cc066e7d5fbc2d7a50ed8bf | 1,450 | py | Python | MiGRIDS/Analyzer/PerformanceAnalyzers/getPrimaryREContribution.py | mmuellerstoffels/GBSTools | aebd8aa6667a2284aaa16424f9b9d22ca3a2a375 | [
"MIT"
] | 8 | 2019-02-18T14:18:55.000Z | 2022-03-04T12:34:24.000Z | MiGRIDS/Analyzer/PerformanceAnalyzers/getPrimaryREContribution.py | mmuellerstoffels/GBSTools | aebd8aa6667a2284aaa16424f9b9d22ca3a2a375 | [
"MIT"
] | 3 | 2019-02-13T09:42:08.000Z | 2019-05-10T16:59:02.000Z | MiGRIDS/Analyzer/PerformanceAnalyzers/getPrimaryREContribution.py | acep-uaf/GBSTools | aebd8aa6667a2284aaa16424f9b9d22ca3a2a375 | [
"MIT"
] | 3 | 2019-06-10T19:49:22.000Z | 2021-05-08T08:42:57.000Z | # Project: GBS Tool
# Author: Dr. Marc Mueller-Stoffels, marc@denamics.com, denamics GmbH
# Date: May 8, 2018
# License: MIT License (see LICENSE file of this package for more information)
def getPrimaryREContribution(time, firmLoadP, firmGenP, varGenP):
'''
Calculates the contribution of renewable generation ... | 45.3125 | 119 | 0.722069 |
dc3e91b6326909a3a07b4ef17050d08cbe9d0fed | 1,955 | py | Python | FWCore/Integration/test/testDropOnInputRead2001_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | FWCore/Integration/test/testDropOnInputRead2001_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | FWCore/Integration/test/testDropOnInputRead2001_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
process = cms.Process("TEST3")
process.source = cms.Source("PoolSource",
fileNames = cms.untracked.vstring(
'file:testDropOnInput2001.root'
),
inputCommands = cms.untracked.vstring(
'keep *',
'drop *_prodA_*_*',
'drop *_prodD_*_*',
... | 30.546875 | 79 | 0.533504 |
5d70f60d02c2b9fd2e8f72a85f67ec7e093033e9 | 9,155 | py | Python | allennlp/predictors/semantic_role_labeler.py | justindujardin/allennlp | c4559f3751775aa8bc018db417edc119d29d8051 | [
"Apache-2.0"
] | 2 | 2021-04-27T19:56:28.000Z | 2021-08-19T05:34:37.000Z | allennlp/predictors/semantic_role_labeler.py | justindujardin/allennlp | c4559f3751775aa8bc018db417edc119d29d8051 | [
"Apache-2.0"
] | 5 | 2021-05-03T14:40:33.000Z | 2021-05-03T14:40:34.000Z | allennlp/predictors/semantic_role_labeler.py | justindujardin/allennlp | c4559f3751775aa8bc018db417edc119d29d8051 | [
"Apache-2.0"
] | 1 | 2020-03-01T13:01:34.000Z | 2020-03-01T13:01:34.000Z | from typing import List
from overrides import overrides
from spacy.tokens import Doc
from allennlp.common.util import JsonDict, sanitize, group_by_count
from allennlp.data import DatasetReader, Instance
from allennlp.data.tokenizers.spacy_tokenizer import SpacyTokenizer
from allennlp.models import Model
from allennlp... | 36.62 | 100 | 0.566029 |
47f70adc8d023abced9af78b56c196206ecdbc40 | 3,208 | py | Python | models/conta.py | danilo-aalmeida/python-simple-bank | 44780c568994d97323099b0a33cd085723c7834d | [
"MIT"
] | null | null | null | models/conta.py | danilo-aalmeida/python-simple-bank | 44780c568994d97323099b0a33cd085723c7834d | [
"MIT"
] | null | null | null | models/conta.py | danilo-aalmeida/python-simple-bank | 44780c568994d97323099b0a33cd085723c7834d | [
"MIT"
] | null | null | null | from models.cliente import Cliente
from utils.helper import formata_float_str_moeda
class Conta:
codigo: int = 1001
def __init__(self: object, cliente: Cliente) -> None:
self.__numero: int = Conta.codigo
self.__cliente: Cliente = cliente
self.__saldo: float = 0.0
self.__limite... | 33.416667 | 83 | 0.598192 |
7ea6156b6b77f86227a21724bfb6005664ac0a9d | 8,579 | py | Python | os_brick/encryptors/cryptsetup.py | zoharm/os-brick | 6c3a89d8e6cb3ea5729e29b447b824d4067e9284 | [
"Apache-2.0"
] | null | null | null | os_brick/encryptors/cryptsetup.py | zoharm/os-brick | 6c3a89d8e6cb3ea5729e29b447b824d4067e9284 | [
"Apache-2.0"
] | null | null | null | os_brick/encryptors/cryptsetup.py | zoharm/os-brick | 6c3a89d8e6cb3ea5729e29b447b824d4067e9284 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory
# 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/... | 43.994872 | 78 | 0.630726 |
e6acb439b3e07667b8914ace465fe5857b5b6a9a | 3,359 | py | Python | IPython/frontend/qt/console/tests/test_ansi_code_processor.py | wackywendell/ipyurwid | c4b45eab791bc23aac99e3b6d9b89d0c265bace2 | [
"BSD-3-Clause"
] | 1 | 2016-06-22T11:43:13.000Z | 2016-06-22T11:43:13.000Z | IPython/frontend/qt/console/tests/test_ansi_code_processor.py | 08saikiranreddy/ipython | 3498382180ad409592f46a9dd0d190ca917bfbff | [
"BSD-3-Clause-Clear"
] | null | null | null | IPython/frontend/qt/console/tests/test_ansi_code_processor.py | 08saikiranreddy/ipython | 3498382180ad409592f46a9dd0d190ca917bfbff | [
"BSD-3-Clause-Clear"
] | null | null | null | # Standard library imports
import unittest
# Local imports
from IPython.frontend.qt.console.ansi_code_processor import AnsiCodeProcessor
class TestAnsiCodeProcessor(unittest.TestCase):
def setUp(self):
self.processor = AnsiCodeProcessor()
def testClear(self):
string = '\x1b[2J\x1b[K'
... | 39.517647 | 77 | 0.579041 |
5a72221c5a6b303441a8a54de31c055b41f58a75 | 5,451 | py | Python | nicos_mlz/stressi/setups/monochromator.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 12 | 2019-11-06T15:40:36.000Z | 2022-01-01T16:23:00.000Z | nicos_mlz/stressi/setups/monochromator.py | ess-dmsc/nicos | 755d61d403ff7123f804c45fc80c7ff4d762993b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 91 | 2020-08-18T09:20:26.000Z | 2022-02-01T11:07:14.000Z | nicos_mlz/stressi/setups/monochromator.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | description = 'Monochromator CARESS HWB Devices'
group = 'lowlevel'
tango_base = 'tango://motorbox04.stressi.frm2.tum.de:10000/box/'
devices = dict(
omgm_m = device('nicos.devices.entangle.Motor',
tangodevice = tango_base + 'channel1/motor',
fmtstr = '%.2f',
lowlevel = True,
requi... | 31.148571 | 79 | 0.545588 |
dce719b520bb21f21a27fda10f9e9d5ac9a7b954 | 3,945 | py | Python | StandardDataSets/1_5/collada/library_effects/effect/profile_COMMON/technique/constant/transparent/effect_constant_transparent_default/effect_constant_transparent_default.py | KhronosGroup/COLLADA-CTS | 61f2a560cbb2a06ee62da8025241f6b08d06bfd9 | [
"MIT"
] | 20 | 2015-03-19T08:02:57.000Z | 2020-10-16T15:16:11.000Z | StandardDataSets/collada/library_effects/effect/profile_COMMON/technique/constant/transparent/effect_constant_transparent_default/effect_constant_transparent_default.py | Acidburn0zzz/COLLADA-CTS | 39a36188cf8710bbc003df43ed70b965eb4386bd | [
"MIT"
] | 4 | 2017-04-19T18:42:05.000Z | 2017-06-17T03:03:28.000Z | StandardDataSets/collada/library_effects/effect/profile_COMMON/technique/constant/transparent/effect_constant_transparent_default/effect_constant_transparent_default.py | Acidburn0zzz/COLLADA-CTS | 39a36188cf8710bbc003df43ed70b965eb4386bd | [
"MIT"
] | 10 | 2015-03-26T02:52:24.000Z | 2022-02-24T08:43:48.000Z |
# Copyright (c) 2012 The Khronos Group Inc.
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and /or associated documentation files (the "Materials "), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publ... | 52.6 | 467 | 0.72294 |
3b4c90e5511aea9d541a73fb6a5a0a52b6fa236a | 1,855 | py | Python | lib/serialize.py | scudette/grr | d4257c5259af881e28a7d62e9837fa13352e2bf6 | [
"Apache-2.0"
] | 6 | 2015-04-03T02:25:28.000Z | 2021-11-17T21:42:59.000Z | lib/serialize.py | defaultnamehere/grr | ba1648b97a76f844ffb8e1891cc9e2680f9b1c6e | [
"Apache-2.0"
] | null | null | null | lib/serialize.py | defaultnamehere/grr | ba1648b97a76f844ffb8e1891cc9e2680f9b1c6e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""This module serializes AFF4 objects in various ways."""
import yaml
from grr.lib import aff4
from grr.lib import rdfvalue
def YamlDumper(aff4object):
"""Dumps the given aff4object into a yaml representation."""
aff4object.Flush()
result = {}
for attribute, values in aff4object.sync... | 31.982759 | 80 | 0.702965 |
4d14653b91366e8c87a7fba7e8e938463e096660 | 1,043 | py | Python | python_module/test/unit/core/test_zeros_ones.py | stoneMo/MegEngine | 4b55350dd0a5e7d9aef3c25f10c4b6c0d47f7ac7 | [
"Apache-2.0"
] | 2 | 2021-09-25T15:33:37.000Z | 2022-02-08T11:06:35.000Z | python_module/test/unit/core/test_zeros_ones.py | ted51/MegEngine | f91881ffdc051ab49314b1bd12c4a07a862dc9c6 | [
"Apache-2.0"
] | null | null | null | python_module/test/unit/core/test_zeros_ones.py | ted51/MegEngine | f91881ffdc051ab49314b1bd12c4a07a862dc9c6 | [
"Apache-2.0"
] | 1 | 2020-11-09T06:29:51.000Z | 2020-11-09T06:29:51.000Z | # -*- coding: utf-8 -*-
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2020 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTI... | 28.972222 | 88 | 0.661553 |
53534bed9d2d5de84b6e818e5de9b2f86e63dcf5 | 974 | py | Python | content/code/python/fizzbuzz.py | transferorbit/coderefinery_testing | b1011345cd6ed614e702b372bd2d987521bba130 | [
"CC-BY-4.0"
] | 8 | 2019-03-11T12:36:25.000Z | 2021-09-30T00:32:11.000Z | content/code/python/fizzbuzz.py | transferorbit/coderefinery_testing | b1011345cd6ed614e702b372bd2d987521bba130 | [
"CC-BY-4.0"
] | 126 | 2016-12-13T11:12:23.000Z | 2022-03-30T20:17:17.000Z | content/code/python/fizzbuzz.py | transferorbit/coderefinery_testing | b1011345cd6ed614e702b372bd2d987521bba130 | [
"CC-BY-4.0"
] | 37 | 2016-12-13T11:00:28.000Z | 2022-01-18T13:53:07.000Z | import pytest
def fizzbuzz(number):
if not isinstance(number, int):
raise TypeError
if number < 1:
raise ValueError
elif number % 15 == 0:
return "FizzBuzz"
elif number % 3 == 0:
return "Fizz"
elif number % 5 == 0:
return "Buzz"
else:
return numbe... | 23.756098 | 70 | 0.556468 |
d207b319b66dd41c9e6fbec9a707c84087815b3e | 22,004 | py | Python | python/infernal_cmscan.py | SamFent/webservice-clients | b4c1ab0d4e0535cc8e79a0d5e731aaafef3193f2 | [
"Apache-2.0"
] | 1 | 2020-06-04T12:31:32.000Z | 2020-06-04T12:31:32.000Z | python/infernal_cmscan.py | SamFent/webservice-clients | b4c1ab0d4e0535cc8e79a0d5e731aaafef3193f2 | [
"Apache-2.0"
] | 1 | 2020-06-04T07:48:54.000Z | 2020-06-04T07:48:54.000Z | python/infernal_cmscan.py | SamFent/webservice-clients | b4c1ab0d4e0535cc8e79a0d5e731aaafef3193f2 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
#
# Copyright 2012-2018 EMBL - European Bioinformatics Institute
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Li... | 38.334495 | 131 | 0.647928 |
748eadf58002ff3b772e775c841222885b270ad5 | 1,990 | py | Python | n_utils/ecr_utils.py | MarkusNousiainenWebscale/nameless-deploy-tools | f39060d4c6835f1d2236d5ce236d7da09318e01e | [
"Apache-2.0"
] | null | null | null | n_utils/ecr_utils.py | MarkusNousiainenWebscale/nameless-deploy-tools | f39060d4c6835f1d2236d5ce236d7da09318e01e | [
"Apache-2.0"
] | null | null | null | n_utils/ecr_utils.py | MarkusNousiainenWebscale/nameless-deploy-tools | f39060d4c6835f1d2236d5ce236d7da09318e01e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import base64
# Copyright 2016-2017 Nitor Creations Oy
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | 38.269231 | 97 | 0.693467 |
786f5232b2636b8835a6b0f90c8e4423855c8b88 | 2,330 | py | Python | synapse/replication/http/login.py | V02460/synapse | 782dd72037cf71fb3f9e4922b07c56df2f59de75 | [
"Apache-2.0"
] | null | null | null | synapse/replication/http/login.py | V02460/synapse | 782dd72037cf71fb3f9e4922b07c56df2f59de75 | [
"Apache-2.0"
] | null | null | null | synapse/replication/http/login.py | V02460/synapse | 782dd72037cf71fb3f9e4922b07c56df2f59de75 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2019 New Vector Ltd
#
# 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 la... | 32.361111 | 82 | 0.704292 |
ff23d3e29c767fcde0cf4ba60e413663c08b9702 | 538 | py | Python | workflow/torch/to_shapes.py | Aiwizo/ml-workflow | 88e104fce571dd3b76914626a52f9001342c07cc | [
"Apache-2.0"
] | 4 | 2020-09-23T15:39:24.000Z | 2021-09-12T22:11:00.000Z | workflow/torch/to_shapes.py | Aiwizo/ml-workflow | 88e104fce571dd3b76914626a52f9001342c07cc | [
"Apache-2.0"
] | 4 | 2020-09-23T15:07:39.000Z | 2020-10-30T10:26:24.000Z | workflow/torch/to_shapes.py | Aiwizo/ml-workflow | 88e104fce571dd3b76914626a52f9001342c07cc | [
"Apache-2.0"
] | null | null | null | import torch
def to_shapes(*args):
'''
Helper function to convert nested dict / list of tensors to shapes
for debugging
'''
if len(args) == 1:
x = args[0]
else:
x = args
if type(x) == tuple:
return tuple(to_shapes(value) for value in x)
if type(x) == list:
... | 22.416667 | 70 | 0.563197 |
e5c78b6ea9a29ac85fc62369e512b620fc87a34e | 12,592 | py | Python | python/cudf/cudf/tests/test_testing.py | Ahsantw/cudf | e099688d5ca7dd20104930485a829881a68c522a | [
"Apache-2.0"
] | 239 | 2018-10-10T09:55:22.000Z | 2018-10-28T20:47:23.000Z | python/cudf/cudf/tests/test_testing.py | Ahsantw/cudf | e099688d5ca7dd20104930485a829881a68c522a | [
"Apache-2.0"
] | 25 | 2018-10-10T14:46:32.000Z | 2018-10-28T22:16:14.000Z | python/cudf/cudf/tests/test_testing.py | Ahsantw/cudf | e099688d5ca7dd20104930485a829881a68c522a | [
"Apache-2.0"
] | 19 | 2018-10-10T12:42:51.000Z | 2018-10-26T16:33:22.000Z | # Copyright (c) 2020-2022, NVIDIA CORPORATION.
import numpy as np
import pandas as pd
import pyarrow as pa
import pytest
import cudf
from cudf.core.column.column import as_column, full
from cudf.testing import (
assert_frame_equal,
assert_index_equal,
assert_series_equal,
)
from cudf.testing._utils import... | 28.618182 | 79 | 0.609752 |
3c7beec56c5900b409b6d556995444302deb1182 | 290 | py | Python | mmdet/core/post_processing/__init__.py | MinliangLin/TSD | d84ddc049d6b18c3a2408c90d2b7dd63b4e2d3a1 | [
"Apache-2.0"
] | 454 | 2020-04-17T10:58:36.000Z | 2022-03-16T13:04:33.000Z | mmdet/core/post_processing/__init__.py | MinliangLin/TSD | d84ddc049d6b18c3a2408c90d2b7dd63b4e2d3a1 | [
"Apache-2.0"
] | 37 | 2020-04-29T12:37:54.000Z | 2022-01-26T21:10:42.000Z | mmdet/core/post_processing/__init__.py | MinliangLin/TSD | d84ddc049d6b18c3a2408c90d2b7dd63b4e2d3a1 | [
"Apache-2.0"
] | 61 | 2020-04-30T04:28:08.000Z | 2022-01-26T08:14:13.000Z | from .bbox_nms import multiclass_nms
from .merge_augs import (
merge_aug_bboxes,
merge_aug_masks,
merge_aug_proposals,
merge_aug_scores,
)
__all__ = [
"multiclass_nms",
"merge_aug_proposals",
"merge_aug_bboxes",
"merge_aug_scores",
"merge_aug_masks",
]
| 18.125 | 36 | 0.706897 |
5f77edb71a23c595cfc35f9c866d54e037d8fbf8 | 4,356 | py | Python | kubernetes/client/models/v1beta1_job_template_spec.py | jashandeep-sohi/kubernetes-python | e057f273069de445a2d5a250ac5fe37d79671f3b | [
"Apache-2.0"
] | 1 | 2020-05-08T12:41:04.000Z | 2020-05-08T12:41:04.000Z | kubernetes/client/models/v1beta1_job_template_spec.py | jashandeep-sohi/kubernetes-python | e057f273069de445a2d5a250ac5fe37d79671f3b | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1beta1_job_template_spec.py | jashandeep-sohi/kubernetes-python | e057f273069de445a2d5a250ac5fe37d79671f3b | [
"Apache-2.0"
] | 2 | 2021-07-09T08:49:05.000Z | 2021-08-03T18:08:36.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.10.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re... | 28.103226 | 161 | 0.582415 |
5739e6b213c90874615c85e9ee59c655d7f6bbe9 | 302 | py | Python | test.py | DanielDobromylskyj/Custom-Multi-Network-Interface-idk | fc77f79c0997739cdd4c966bc6ab6af3185d3154 | [
"MIT"
] | null | null | null | test.py | DanielDobromylskyj/Custom-Multi-Network-Interface-idk | fc77f79c0997739cdd4c966bc6ab6af3185d3154 | [
"MIT"
] | null | null | null | test.py | DanielDobromylskyj/Custom-Multi-Network-Interface-idk | fc77f79c0997739cdd4c966bc6ab6af3185d3154 | [
"MIT"
] | null | null | null | from CMNI import network
def test(server, socket_number):
print("Test Function Called")
server.Send(socket_number, "123")
data = server.Recv(socket_number)
print("Recved: ", data)
if __name__ == "__main__":
server = network.Server()
server.Setup(8776)
server.Run(test)
| 18.875 | 37 | 0.672185 |
1bcdf03a5c917faeb18c980a450d724c2f510e1b | 19,769 | py | Python | captum/_utils/common.py | greentfrapp/captum | 03f89a5825ae389d117ebdb6b9924e97bc311a4b | [
"BSD-3-Clause"
] | 1 | 2020-12-23T14:00:26.000Z | 2020-12-23T14:00:26.000Z | captum/_utils/common.py | greentfrapp/captum | 03f89a5825ae389d117ebdb6b9924e97bc311a4b | [
"BSD-3-Clause"
] | 4 | 2020-11-20T21:05:39.000Z | 2022-03-18T15:28:01.000Z | captum/_utils/common.py | greentfrapp/captum | 03f89a5825ae389d117ebdb6b9924e97bc311a4b | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import typing
from enum import Enum
from inspect import signature
from typing import Any, Callable, Dict, List, Tuple, Union, cast, overload
import numpy as np
import torch
from torch import Tensor, device
from torch.nn import Module
from captum._utils.typing import (
BaselineType,
Lite... | 33.281145 | 88 | 0.647175 |
a563e0a497cf6a3f4e485360459bfdc04f0e6b70 | 350 | py | Python | my_code.py | athenian-computational-thinking/add-n-numbers-assignment-template | e4ba92e3b56b8f67ee654cc738b6f6fa1981825d | [
"Apache-2.0"
] | null | null | null | my_code.py | athenian-computational-thinking/add-n-numbers-assignment-template | e4ba92e3b56b8f67ee654cc738b6f6fa1981825d | [
"Apache-2.0"
] | null | null | null | my_code.py | athenian-computational-thinking/add-n-numbers-assignment-template | e4ba92e3b56b8f67ee654cc738b6f6fa1981825d | [
"Apache-2.0"
] | null | null | null | def add_n(n):
# add code here
return total
if __name__ == '__main__':
# Test your code with this first
# Change the argument to try different values
print(add_n(4))
# After you are satisfied with your results, use input() to prompt the user for a value:
# num = int(input("Enter a number:... | 21.875 | 92 | 0.642857 |
f4c52a1a37b3c0c489f5f34128df077e75d5d2a1 | 1,126 | py | Python | datadog_checks_dev/tests/tooling/commands/test_create.py | justinsousa/integrations-core | 223e337492a04de517bc35ec85ddf921108fd8d2 | [
"BSD-3-Clause"
] | 2 | 2019-05-28T03:48:29.000Z | 2019-07-05T07:05:58.000Z | datadog_checks_dev/tests/tooling/commands/test_create.py | justinsousa/integrations-core | 223e337492a04de517bc35ec85ddf921108fd8d2 | [
"BSD-3-Clause"
] | 4 | 2019-07-03T02:53:19.000Z | 2019-07-10T14:52:14.000Z | datadog_checks_dev/tests/tooling/commands/test_create.py | justinsousa/integrations-core | 223e337492a04de517bc35ec85ddf921108fd8d2 | [
"BSD-3-Clause"
] | 1 | 2020-01-15T16:58:51.000Z | 2020-01-15T16:58:51.000Z | # (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import os
import sys
from datadog_checks.dev import EnvVars, run_command
from datadog_checks.dev._env import TESTING_PLUGIN
from datadog_checks.dev.utils import chdir, remove_path
HERE = os.path.dirname(os.path.... | 34.121212 | 107 | 0.659858 |
ea4bf810f01e2033ab62dd16a4e00aafbbc32f1d | 1,118 | py | Python | app/config/setting.py | Allen7D/mini-shop-server | 5f3ddd5a4e5e99a1e005f11abc620cefff2493fc | [
"MIT"
] | 533 | 2019-01-19T07:12:00.000Z | 2022-03-30T09:08:46.000Z | app/config/setting.py | Alimazing/mini-shop-server | 5f3ddd5a4e5e99a1e005f11abc620cefff2493fc | [
"MIT"
] | 8 | 2019-06-10T03:58:54.000Z | 2021-06-10T08:21:19.000Z | app/config/setting.py | Allen7D/mini-shop-server | 5f3ddd5a4e5e99a1e005f11abc620cefff2493fc | [
"MIT"
] | 161 | 2019-01-24T04:06:21.000Z | 2022-03-14T06:05:16.000Z | # _*_ coding: utf-8 _*_
"""
Created by Allen7D on 2018/4/2.
Flask 对配置项的限制,你必须保证命名全都大写,才能注入到current_app.config中
"""
from app.libs.enums import ClientTypeEnum
__author__ = 'Allen7D'
'''
应用于Swagger的URL,会自动添加协议前缀(http://或者https://),因为会切换协议前缀
local_setting.py中 SERVER_URL = '127.0.0.1:8010'
'''
SERVER_URL = 'server.min... | 27.95 | 119 | 0.660107 |
77f44f88ddb974a13969ee206d0a6ea0cca4b136 | 9,000 | py | Python | train.py | helloful/AlphaZero_Gomoku-master | 17361edcd8d6c11416d92c160466c79f07545487 | [
"MIT"
] | null | null | null | train.py | helloful/AlphaZero_Gomoku-master | 17361edcd8d6c11416d92c160466c79f07545487 | [
"MIT"
] | null | null | null | train.py | helloful/AlphaZero_Gomoku-master | 17361edcd8d6c11416d92c160466c79f07545487 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
An implementation of the training pipeline of AlphaZero for Gomoku
@author: Junxiao Song
"""
from __future__ import print_function
import random
import numpy as np
from collections import defaultdict, deque
from game import Board, Game
from mcts_pure import MCTSPlayer as MCTS_Pure
from mct... | 45 | 92 | 0.544333 |
ce8d8cd4404dcccc5cbed645f24cb6c45dba7e81 | 3,237 | py | Python | examples/train_iseg2017_new.py | McMasterAI/RadiologyandAI-MedicalZooPytorch | 606a1654f08b8bae7c265608694d55fecc1001ed | [
"MIT"
] | 995 | 2019-07-23T11:34:22.000Z | 2022-03-30T21:10:52.000Z | examples/train_iseg2017_new.py | pyushkevich/MedicalZooPytorch | c6831d8ddebfbc1b33c04f8cec0d01c2ceb828f6 | [
"MIT"
] | 18 | 2020-04-27T03:38:22.000Z | 2022-01-18T20:55:20.000Z | examples/train_iseg2017_new.py | pyushkevich/MedicalZooPytorch | c6831d8ddebfbc1b33c04f8cec0d01c2ceb828f6 | [
"MIT"
] | 209 | 2019-08-21T13:41:13.000Z | 2022-03-30T08:01:52.000Z | # Python libraries
import argparse
import os
# Lib files
import lib.medloaders as medical_loaders
import lib.medzoo as medzoo
import lib.train as train
import lib.utils as utils
from lib.losses3D import DiceLoss
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
seed = 1777777
def main():
args = get_arguments()
util... | 42.038961 | 116 | 0.638554 |
cdb9abba889c12ada5738c27aa7b2aeece393648 | 2,128 | py | Python | tests/parsers/winreg_plugins/mountpoints.py | kiddinn/plaso | c7d955724cfeeea09ce6166609fd4d3c77a99fc6 | [
"Apache-2.0"
] | null | null | null | tests/parsers/winreg_plugins/mountpoints.py | kiddinn/plaso | c7d955724cfeeea09ce6166609fd4d3c77a99fc6 | [
"Apache-2.0"
] | null | null | null | tests/parsers/winreg_plugins/mountpoints.py | kiddinn/plaso | c7d955724cfeeea09ce6166609fd4d3c77a99fc6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Tests for the MountPoints2 Windows Registry plugin."""
import unittest
from plaso.parsers.winreg_plugins import mountpoints
from tests.parsers.winreg_plugins import test_lib
class MountPoints2PluginTest(test_lib.RegistryPluginTestCase):
"""Tests for the MountPoin... | 33.25 | 77 | 0.710996 |
59b82942aff9e77c846ed3095ed8e44b609cd489 | 621 | py | Python | migrations/versions/612cb7862395_.py | jhwhite/ability-score-calc-api | cca22fd8e04299069af43f2c2a4473159271eb00 | [
"MIT"
] | null | null | null | migrations/versions/612cb7862395_.py | jhwhite/ability-score-calc-api | cca22fd8e04299069af43f2c2a4473159271eb00 | [
"MIT"
] | 1 | 2016-04-19T01:55:25.000Z | 2016-04-19T01:55:25.000Z | migrations/versions/612cb7862395_.py | jhwhite/ability-score-calc-api | cca22fd8e04299069af43f2c2a4473159271eb00 | [
"MIT"
] | null | null | null | """empty message
Revision ID: 612cb7862395
Revises: 9336b2f5a1c7
Create Date: 2016-04-18 20:07:41.402402
"""
# revision identifiers, used by Alembic.
revision = '612cb7862395'
down_revision = '9336b2f5a1c7'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - ... | 23 | 89 | 0.698873 |
96db3dd3377f00590d74f03db2559a2a1704ed94 | 3,520 | py | Python | examples/csc_readout.py | AdamVStephen/gatt-python | 20fc809c83655a88616e1fd523d993014f906c25 | [
"MIT"
] | null | null | null | examples/csc_readout.py | AdamVStephen/gatt-python | 20fc809c83655a88616e1fd523d993014f906c25 | [
"MIT"
] | null | null | null | examples/csc_readout.py | AdamVStephen/gatt-python | 20fc809c83655a88616e1fd523d993014f906c25 | [
"MIT"
] | null | null | null | import pdb
import gatt
csc_measurement_service_uuid = "00001816-0000-1000-8000-00805f9b34fb"
csc_measurement_characteristic_uuid = "00002a5b-0000-1000-8000-00805f9b34fb"
class AnyDeviceManager(gatt.DeviceManager):
def device_discovered(self, device):
print("Discovered [%s] %s" % (device.mac_address, devi... | 46.315789 | 121 | 0.650568 |
6304fe02499e3d3c66cf0e80917f4b9e20770f56 | 4,138 | py | Python | spectralcluster/autotune.py | ericwxia/SpectralCluster | 3adca51e967c5b2407a1f92a630f299cb06e64ba | [
"Apache-2.0"
] | 327 | 2019-01-19T00:41:14.000Z | 2022-03-31T12:48:23.000Z | spectralcluster/autotune.py | ericwxia/SpectralCluster | 3adca51e967c5b2407a1f92a630f299cb06e64ba | [
"Apache-2.0"
] | 33 | 2019-01-25T02:21:18.000Z | 2022-01-30T20:28:15.000Z | spectralcluster/autotune.py | ericwxia/SpectralCluster | 3adca51e967c5b2407a1f92a630f299cb06e64ba | [
"Apache-2.0"
] | 65 | 2019-01-19T00:46:35.000Z | 2022-03-15T18:28:46.000Z | """Auto-tuning hyper-parameters."""
import numpy as np
MIN_SEARCH_STEP = 1e-04
class AutoTune:
"""AutoTune Class.
This auto-tuning method is implemented based on this paper:
Park, Tae Jin, et al. "Auto-tuning spectral clustering for speaker
diarization using normalized maximum eigengap." IEEE Signal Proces... | 38.672897 | 80 | 0.681005 |
50d02e4a8d601dbde6c210f4c971565703823c23 | 1,212 | py | Python | mwaa/mwaa-cdk/dags/timestream-backfill.py | 094459/time-series-and-data-lakes | 75540661764b8bca91debf625278985ceba7b5ca | [
"MIT"
] | 9 | 2021-12-03T17:51:42.000Z | 2022-03-17T08:45:05.000Z | mwaa/mwaa-cdk/dags/timestream-backfill.py | 094459/time-series-and-data-lakes | 75540661764b8bca91debf625278985ceba7b5ca | [
"MIT"
] | null | null | null | mwaa/mwaa-cdk/dags/timestream-backfill.py | 094459/time-series-and-data-lakes | 75540661764b8bca91debf625278985ceba7b5ca | [
"MIT"
] | 1 | 2021-12-12T16:00:31.000Z | 2021-12-12T16:00:31.000Z | #Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#SPDX-License-Identifier: Apache-2.0
# when running this DAG make sure you select the backfill command
# {"command": "backfill -s 2021-09-10 -e 2021-10-10 timestream-airflow-demo"} #mwaa 1.x
# {"command": "dags backfill -s 2021-09-10 -e 2021-10-10 ti... | 31.894737 | 97 | 0.673267 |
9df3d1591314bfbb9d52b17a073013383d77afd6 | 2,850 | py | Python | dual_tape_ez/dual_tape_ez.py | cmcmarrow/dual_tape_ez | 4028c82ee43677b016cb106206412b86f812cc76 | [
"Apache-2.0"
] | null | null | null | dual_tape_ez/dual_tape_ez.py | cmcmarrow/dual_tape_ez | 4028c82ee43677b016cb106206412b86f812cc76 | [
"Apache-2.0"
] | null | null | null | dual_tape_ez/dual_tape_ez.py | cmcmarrow/dual_tape_ez | 4028c82ee43677b016cb106206412b86f812cc76 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2021 Charles McMarrow
"""
# built-in
import argparse
from typing import List, Generator, Optional, Tuple, Union
# dual_tape_ez
import dual_tape_ez as dte
from . import assembler
from . import error
from . import vm
from .log import enable_log
class DualTapeEzAPI(error.DualTapeEzError):
@classmetho... | 32.386364 | 83 | 0.525965 |
7e233e99dcb4d33f00b918bc73aa319c23cb8580 | 8,193 | py | Python | lasertool.py | jpirnay/gui-files-meerk40t | 1f22252162be5d2a4e788990f8070b75ada4a0c9 | [
"MIT"
] | null | null | null | lasertool.py | jpirnay/gui-files-meerk40t | 1f22252162be5d2a4e788990f8070b75ada4a0c9 | [
"MIT"
] | null | null | null | lasertool.py | jpirnay/gui-files-meerk40t | 1f22252162be5d2a4e788990f8070b75ada4a0c9 | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
#
# generated by wxGlade 1.1.0pre on Mon Apr 11 12:41:47 2022
#
import wx
# begin wxGlade: dependencies
# end wxGlade
# begin wxGlade: extracode
# end wxGlade
class clsLasertools(wx.Panel):
def __init__(self, *args, **kwds):
# begin wxGlade: clsLasertools.__init_... | 41.80102 | 292 | 0.646894 |
fd21a7de107bc1a07a308fd965350e4dcf26e924 | 1,234 | py | Python | tests/numpy/matmul_delegation_test.py | targetsm/dace | 297b12804a334df8cc6fad5250d5fb0cce20dc6e | [
"BSD-3-Clause"
] | null | null | null | tests/numpy/matmul_delegation_test.py | targetsm/dace | 297b12804a334df8cc6fad5250d5fb0cce20dc6e | [
"BSD-3-Clause"
] | null | null | null | tests/numpy/matmul_delegation_test.py | targetsm/dace | 297b12804a334df8cc6fad5250d5fb0cce20dc6e | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2019-2020 ETH Zurich and the DaCe authors. All rights reserved.
import numpy as np
import dace
N, K, M = 24, 12, 48
@dace.program
def matmul_delegation_test(matrix0: dace.float32[N, K],
matrix1: dace.float32[K, M],
vector0: dace.float32[M], vector1: d... | 32.473684 | 78 | 0.613452 |
455b36728b70ddee669ac2b247448f30d2f1013f | 515 | py | Python | pipescaler/core/sorter.py | KarlTDebiec/PipeScaler | b990ece8f3dd2c3506c226ed871871997fc57beb | [
"BSD-3-Clause"
] | 1 | 2022-02-07T03:47:53.000Z | 2022-02-07T03:47:53.000Z | pipescaler/core/sorter.py | KarlTDebiec/PipeScaler | b990ece8f3dd2c3506c226ed871871997fc57beb | [
"BSD-3-Clause"
] | 49 | 2022-01-17T15:16:22.000Z | 2022-03-28T03:00:39.000Z | pipescaler/core/sorter.py | KarlTDebiec/PipeScaler | b990ece8f3dd2c3506c226ed871871997fc57beb | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# pipescaler/core/sorter.py
#
# Copyright (C) 2020-2021 Karl T Debiec
# All rights reserved.
#
# This software may be modified and distributed under the terms of the
# BSD license.
from __future__ import annotations
from abc import ABC
from pipescaler.core.stage import Stage
class So... | 20.6 | 72 | 0.683495 |
4afaba4ce292a938627179964132a28df32548d5 | 709 | py | Python | samples/invoice/search_pages.py | Hey-Marvelous/PayPal-Python-SDK | c56069f8971877e0632c1d58fdf240de9320ece3 | [
"BSD-Source-Code"
] | 653 | 2015-01-07T21:40:11.000Z | 2022-03-07T18:25:27.000Z | samples/invoice/search_pages.py | sucithrashanu/PayPal-Python-SDK | a129190dc105941b11340659c028385cdceea192 | [
"BSD-Source-Code"
] | 214 | 2015-01-05T15:42:18.000Z | 2020-05-05T13:15:12.000Z | samples/invoice/search_pages.py | sucithrashanu/PayPal-Python-SDK | a129190dc105941b11340659c028385cdceea192 | [
"BSD-Source-Code"
] | 300 | 2015-01-05T07:29:23.000Z | 2022-03-22T14:25:02.000Z | from paypalrestsdk import Invoice
import logging
import json
logging.basicConfig(level=logging.INFO)
my_invoices = []
page_size = 2
for i in range(3):
options = {
"start_invoice_date": "2016-01-01 PST",
"end_invoice_date": "2030-03-26 PST",
"status": ["SENT", "DRAFT", "PAID", "CANCEL... | 22.870968 | 57 | 0.624824 |
b60301bf340cafccf362e196b4472354b0556a54 | 38,058 | py | Python | kornia/enhance/adjust.py | mitmul/kornia | b0fe723269e635f4652c182297a6db3146f4929b | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2021-03-24T12:43:02.000Z | 2021-03-24T12:43:08.000Z | kornia/enhance/adjust.py | cceyda/kornia | 810e5189408cf97e81449e4a11454d803038a3f6 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | kornia/enhance/adjust.py | cceyda/kornia | 810e5189408cf97e81449e4a11454d803038a3f6 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | from typing import Union, Optional
from math import pi
import torch
import torch.nn as nn
import torch.nn.functional as F
from kornia.color.hsv import rgb_to_hsv, hsv_to_rgb
from kornia.utils.image import _to_bchw, _to_bcdhw
from kornia.utils.helpers import _torch_histc_cast
__all__ = [
"adjust_brightness",
... | 37.755952 | 132 | 0.606101 |
b2d071fe6103517635db7532a7bb05d01f8d3629 | 2,999 | py | Python | testQA.py | yachee-gupta/Factoid-based-Question-Answer-Chatbot | edb3f58f5ecd417942b62142f73dbdc2b78c7fdc | [
"MIT"
] | 45 | 2018-04-04T04:45:17.000Z | 2021-11-29T22:21:37.000Z | testQA.py | yachee-gupta/Factoid-based-Question-Answer-Chatbot | edb3f58f5ecd417942b62142f73dbdc2b78c7fdc | [
"MIT"
] | 4 | 2018-10-01T17:12:57.000Z | 2018-10-02T01:20:25.000Z | testQA.py | yachee-gupta/Factoid-based-Question-Answer-Chatbot | edb3f58f5ecd417942b62142f73dbdc2b78c7fdc | [
"MIT"
] | 18 | 2018-04-04T04:45:45.000Z | 2022-02-16T07:07:34.000Z | from DocumentRetrievalModel import DocumentRetrievalModel
from ProcessedQuestion import ProcessedQuestion
from StanfordDataset import StanfordDataset
from nltk.tokenize import word_tokenize
import csv
import math
def computeAccuracy(topic,sd = StanfordDataset()):
testPara = sd.getParagraph(topic)
drm... | 35.282353 | 255 | 0.560854 |
e48aac964678939d8a791493fb6e0243dc8e3c6d | 8,511 | py | Python | dragonflow/conf/df_common_params.py | anlaneg/dragonflow | f684fd721cb953f4d0320725d708e79c9f35ef6c | [
"Apache-2.0"
] | null | null | null | dragonflow/conf/df_common_params.py | anlaneg/dragonflow | f684fd721cb953f4d0320725d708e79c9f35ef6c | [
"Apache-2.0"
] | null | null | null | dragonflow/conf/df_common_params.py | anlaneg/dragonflow | f684fd721cb953f4d0320725d708e79c9f35ef6c | [
"Apache-2.0"
] | null | null | null | # 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.343284 | 79 | 0.585713 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.