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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
17108f80d9976671704207b0f343135d3f08816f | 34,227 | py | Python | src/cachew/__init__.py | karlicoss/cachew | 49d349f5c32ae25d6f5a36279c8f0c5090242da2 | [
"MIT"
] | 177 | 2019-08-20T18:42:12.000Z | 2022-02-24T11:47:07.000Z | src/cachew/__init__.py | karlicoss/cachew | 49d349f5c32ae25d6f5a36279c8f0c5090242da2 | [
"MIT"
] | 11 | 2020-01-05T13:33:26.000Z | 2021-07-06T14:52:19.000Z | src/cachew/__init__.py | karlicoss/cachew | 49d349f5c32ae25d6f5a36279c8f0c5090242da2 | [
"MIT"
] | 4 | 2020-01-09T13:03:19.000Z | 2022-02-13T02:03:23.000Z | from pkg_resources import get_distribution, DistributionNotFound
try:
# Change here if project is renamed and does not equal the package name
dist_name = __name__
__version__ = get_distribution(dist_name).version
except DistributionNotFound:
__version__ = 'unknown'
finally:
del get_distribution, Di... | 33.359649 | 229 | 0.599381 |
bd530f2a6b0312a06d5c95a19dfe8e1bffcb31ba | 4,314 | py | Python | glow/core/wrap/concurrency.py | arquolo/glow | c4c63e36551cd1eec2e34129dbc0f06c788099de | [
"MIT"
] | null | null | null | glow/core/wrap/concurrency.py | arquolo/glow | c4c63e36551cd1eec2e34129dbc0f06c788099de | [
"MIT"
] | null | null | null | glow/core/wrap/concurrency.py | arquolo/glow | c4c63e36551cd1eec2e34129dbc0f06c788099de | [
"MIT"
] | null | null | null | __all__ = ['stream_batched', 'call_once', 'threadlocal', 'shared_call']
import functools
import threading
import time
from collections.abc import Callable, Sequence
from concurrent.futures import Future
from contextlib import ExitStack
from queue import Empty, SimpleQueue
from threading import Thread
from typing impor... | 30.167832 | 76 | 0.613584 |
c48039ec1f9239f30efaa83dfd2e4e178c253158 | 3,666 | py | Python | huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_flight_itinerary_request.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | 1 | 2021-11-03T07:54:50.000Z | 2021-11-03T07:54:50.000Z | huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_flight_itinerary_request.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_flight_itinerary_request.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
import pprint
import re
import six
class RecognizeFlightItineraryRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
... | 27.155556 | 87 | 0.574741 |
cffdf6602d27715086ed526881c0421338842249 | 462 | py | Python | example/python/pipelines/convert/save_vocab_from_dict.py | SidaZh/EET | 6414faa734abfdb666556304ca3df5b7f5e54c38 | [
"Apache-2.0"
] | null | null | null | example/python/pipelines/convert/save_vocab_from_dict.py | SidaZh/EET | 6414faa734abfdb666556304ca3df5b7f5e54c38 | [
"Apache-2.0"
] | null | null | null | example/python/pipelines/convert/save_vocab_from_dict.py | SidaZh/EET | 6414faa734abfdb666556304ca3df5b7f5e54c38 | [
"Apache-2.0"
] | null | null | null | save_file = open("../../resource/vocab.txt","w")
dict_file = open('../../resource/dict.txt', 'r')
pre_file = open('./Special_Symbols.txt', 'r')
contents=pre_file.readlines() #读取全部行
for content in contents: #显示一行
save_file.write(content)
save_file.write('\n')
pre_file.close()
contents=dict_file.readli... | 28.875 | 49 | 0.658009 |
c7623a9e5a4d37fad4d933fe46938a8553cb616e | 521 | py | Python | Emailer/main/migrations/0009_alter_receiver_email.py | Pavel-Petkov03/Emailer | 8f2b73e82136374e3f8b86537740ae0a2244c03d | [
"MIT"
] | null | null | null | Emailer/main/migrations/0009_alter_receiver_email.py | Pavel-Petkov03/Emailer | 8f2b73e82136374e3f8b86537740ae0a2244c03d | [
"MIT"
] | 8 | 2022-02-20T03:17:56.000Z | 2022-03-29T17:20:14.000Z | Emailer/main/migrations/0009_alter_receiver_email.py | Pavel-Petkov03/Emailer | 8f2b73e82136374e3f8b86537740ae0a2244c03d | [
"MIT"
] | null | null | null | # Generated by Django 4.0.2 on 2022-04-08 20:39
import Emailer.authentication.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0008_alter_receiver_preferences'),
]
operations = [
migrations.AlterField(
... | 26.05 | 120 | 0.642994 |
cf61ceaefe5a3a9c04e58c67d56431c6c3554a68 | 15,020 | py | Python | applications/app2/languages/ar.py | udaay7446/uday_python | 2c8adf1652004582482c9ffed2d5d73c70da5819 | [
"BSD-3-Clause"
] | null | null | null | applications/app2/languages/ar.py | udaay7446/uday_python | 2c8adf1652004582482c9ffed2d5d73c70da5819 | [
"BSD-3-Clause"
] | null | null | null | applications/app2/languages/ar.py | udaay7446/uday_python | 2c8adf1652004582482c9ffed2d5d73c70da5819 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
{
'!langcode!': 'ar',
'!langname!': 'Arabic',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN',
'%s %%(shop)': '%s... | 51.61512 | 281 | 0.654128 |
ddd0889901c97ae271e4ac063acc90cc02f4611f | 7,023 | py | Python | kymatio/backend/torch_backend.py | GReguig/kymatio | e0fc10057f5f8bb947068bc40afff8d3d3729052 | [
"BSD-3-Clause"
] | 516 | 2018-11-18T06:11:16.000Z | 2022-03-21T22:35:06.000Z | kymatio/backend/torch_backend.py | GReguig/kymatio | e0fc10057f5f8bb947068bc40afff8d3d3729052 | [
"BSD-3-Clause"
] | 558 | 2018-11-19T22:21:12.000Z | 2022-03-28T14:59:15.000Z | kymatio/backend/torch_backend.py | GReguig/kymatio | e0fc10057f5f8bb947068bc40afff8d3d3729052 | [
"BSD-3-Clause"
] | 119 | 2018-11-18T06:05:39.000Z | 2022-03-26T06:59:37.000Z | from torch.autograd import Function
import torch
BACKEND_NAME = 'torch'
def input_checks(x):
if x is None:
raise TypeError('The input should be not empty.')
if not x.is_contiguous():
raise RuntimeError('The input must be contiguous.')
def _is_complex(x):
return x.shape[-1] == 2
def _is_... | 28.54878 | 82 | 0.569415 |
38ea223a0ad4adb15de02f0c71ec07de02f5868d | 2,238 | py | Python | src/main/resources/docs/tests/B304.py | paulopontesm/codacy-bandit | 38a1637717652efbc865badd43f336398881680b | [
"Apache-2.0"
] | 6 | 2016-08-31T07:55:40.000Z | 2020-01-20T08:32:50.000Z | src/main/resources/docs/tests/B304.py | Acidburn0zzz/codacy-bandit | 92b65ec73b89a915127e1b29a4fcc8e2a7b64943 | [
"Apache-2.0"
] | 20 | 2017-06-23T11:58:11.000Z | 2022-03-07T02:17:43.000Z | src/main/resources/docs/tests/B304.py | Acidburn0zzz/codacy-bandit | 92b65ec73b89a915127e1b29a4fcc8e2a7b64943 | [
"Apache-2.0"
] | 15 | 2016-10-07T13:38:57.000Z | 2021-02-14T21:54:25.000Z | ##Patterns: B304
from Crypto.Cipher import ARC2
from Crypto.Cipher import ARC4
from Crypto.Cipher import Blowfish
from Crypto.Cipher import DES
from Crypto.Cipher import XOR
from Crypto.Hash import SHA
from Crypto import Random
from Crypto.Util import Counter
from cryptography.hazmat.primitives.ciphers import Cipher
f... | 30.243243 | 79 | 0.74933 |
32367af1812a8bb8f33893d90cbedf35aed58692 | 2,950 | py | Python | tests/test_sim_procedure.py | fmagin/angr | c41563b0f82a3d031c3aa482ebe2973c87ec4adb | [
"BSD-2-Clause"
] | null | null | null | tests/test_sim_procedure.py | fmagin/angr | c41563b0f82a3d031c3aa482ebe2973c87ec4adb | [
"BSD-2-Clause"
] | null | null | null | tests/test_sim_procedure.py | fmagin/angr | c41563b0f82a3d031c3aa482ebe2973c87ec4adb | [
"BSD-2-Clause"
] | null | null | null | import os
import angr
import claripy
import nose
from angr.codenode import BlockNode, HookNode, SyscallNode
BIN_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'binaries')
def test_ret_float():
p = angr.load_shellcode(b'X', arch='i386')
class F1(angr.SimProcedure):
def ru... | 37.820513 | 98 | 0.721695 |
561e6ae194a39c24e67b338515d18648565ef77a | 3,450 | py | Python | tests/test_cairo.py | evanblank3/ethpm-types | 129bb7d95e93ca7bd135908d62474e9af131e1df | [
"Apache-2.0"
] | null | null | null | tests/test_cairo.py | evanblank3/ethpm-types | 129bb7d95e93ca7bd135908d62474e9af131e1df | [
"Apache-2.0"
] | 9 | 2022-01-28T22:38:49.000Z | 2022-03-31T21:29:15.000Z | tests/test_cairo.py | evanblank3/ethpm-types | 129bb7d95e93ca7bd135908d62474e9af131e1df | [
"Apache-2.0"
] | 1 | 2022-01-05T22:33:08.000Z | 2022-01-05T22:33:08.000Z | from ethpm_types import ContractType
CAIRO_ABI = [
{
"type": "struct",
"name": "MyStruct",
"members": [
{"name": "foo", "type": "felt", "offset": 0},
{"name": "bar", "type": "felt", "offset": 1},
],
"size": 2,
},
{"type": "event", "name": "Upg... | 31.363636 | 100 | 0.518551 |
c390688e9872884fd42b9d94b174373b2101ee02 | 1,865 | py | Python | hangman.py | Coskntkk/Hangman-Game | 46876f19c989fac2b713d35fe33005db24951d95 | [
"MIT"
] | null | null | null | hangman.py | Coskntkk/Hangman-Game | 46876f19c989fac2b713d35fe33005db24951d95 | [
"MIT"
] | null | null | null | hangman.py | Coskntkk/Hangman-Game | 46876f19c989fac2b713d35fe33005db24951d95 | [
"MIT"
] | 1 | 2021-03-08T00:46:02.000Z | 2021-03-08T00:46:02.000Z | from random import choice
# read word list from words.txt
def readFile(file_name):
wordList = []
with open(file_name, 'r', encoding='utf8') as myFile:
for row in myFile:
data=row.rstrip('\n')
wordList.append(data)
return wordList
# to find given letter in the ... | 25.547945 | 73 | 0.52118 |
6e4e1904f57a3c92fb4945d01753bd19c0611cb1 | 3,598 | py | Python | python/tvm/relax/op/base.py | psrivas2/relax | 4329af78eb1dc4c4ff8a61d3bf39aa4034e9cb2a | [
"Apache-2.0"
] | 90 | 2021-11-30T11:58:10.000Z | 2022-03-31T02:24:04.000Z | python/tvm/relax/op/base.py | psrivas2/relax | 4329af78eb1dc4c4ff8a61d3bf39aa4034e9cb2a | [
"Apache-2.0"
] | 64 | 2021-11-22T23:58:23.000Z | 2022-03-31T03:19:22.000Z | python/tvm/relax/op/base.py | psrivas2/relax | 4329af78eb1dc4c4ff8a61d3bf39aa4034e9cb2a | [
"Apache-2.0"
] | 27 | 2021-12-09T22:39:27.000Z | 2022-03-24T23:21:48.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... | 27.465649 | 99 | 0.659255 |
9c4bb5e842b11791f01ed35469b0f53b7d68715f | 2,679 | py | Python | metrics.py | elitonfilho/segsr | 74ee5a4794f0894cffbb08f696f601b7d914513c | [
"MIT"
] | null | null | null | metrics.py | elitonfilho/segsr | 74ee5a4794f0894cffbb08f696f601b7d914513c | [
"MIT"
] | null | null | null | metrics.py | elitonfilho/segsr | 74ee5a4794f0894cffbb08f696f601b7d914513c | [
"MIT"
] | null | null | null | import math
import numpy as np
from PIL import Image
import cv2
def calculate_psnr(img1, img2):
# img1 and img2 have range [0, 255]
img1 = img1.astype(np.float64)
img2 = img2.astype(np.float64)
mse = np.mean((img1 - img2)**2)
if mse == 0:
return float('inf')
return 20 * math... | 35.72 | 96 | 0.564016 |
e18e97e79c4a2450e3bc06f3bd224b40036c94d0 | 14,747 | py | Python | tensorflow_quantum/python/differentiators/gradient_test.py | dlyongemallo/tensorflow-quantum | 22cf3058ae5bfb4f0ca7ed70cb691bd7be650e61 | [
"Apache-2.0"
] | 1 | 2020-09-25T14:01:24.000Z | 2020-09-25T14:01:24.000Z | tensorflow_quantum/python/differentiators/gradient_test.py | dlyongemallo/tensorflow-quantum | 22cf3058ae5bfb4f0ca7ed70cb691bd7be650e61 | [
"Apache-2.0"
] | 1 | 2022-02-10T02:16:17.000Z | 2022-02-10T02:16:17.000Z | tensorflow_quantum/python/differentiators/gradient_test.py | dlyongemallo/tensorflow-quantum | 22cf3058ae5bfb4f0ca7ed70cb691bd7be650e61 | [
"Apache-2.0"
] | 1 | 2020-08-03T20:20:26.000Z | 2020-08-03T20:20:26.000Z | # Copyright 2020 The TensorFlow Quantum 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... | 44.418675 | 80 | 0.605004 |
d00db8408e17563988be0779872e006b18097475 | 460 | py | Python | data/scripts/templates/object/static/structure/naboo/shared_wall_naboo_theed_style_1.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/static/structure/naboo/shared_wall_naboo_theed_style_1.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/static/structure/naboo/shared_wall_naboo_theed_style_1.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Static()
result.template = "object/static/structure/naboo/shared_wall_naboo_theed_style_1.iff"
result.attribute_t... | 27.058824 | 86 | 0.732609 |
3a1dc568e9964dfab166f2834652a89752cd23d9 | 17,083 | py | Python | datacube_ows/styles/colormap.py | FlexiGroBots-H2020/datacube-ows | 8e3e1343582c00ae46b498247ac98d8e98bd000f | [
"Apache-2.0"
] | 4 | 2017-11-02T04:22:30.000Z | 2018-05-01T14:16:23.000Z | datacube_ows/styles/colormap.py | FlexiGroBots-H2020/datacube-ows | 8e3e1343582c00ae46b498247ac98d8e98bd000f | [
"Apache-2.0"
] | 33 | 2018-05-23T01:32:06.000Z | 2018-11-05T01:07:09.000Z | datacube_ows/styles/colormap.py | FlexiGroBots-H2020/datacube-ows | 8e3e1343582c00ae46b498247ac98d8e98bd000f | [
"Apache-2.0"
] | 7 | 2017-10-09T00:09:44.000Z | 2018-07-27T00:41:19.000Z | # This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
import io
import logging
from datetime import datetime
from typing import Callable, List, MutableMapping, Optio... | 39.543981 | 162 | 0.584733 |
1d128c5247002692c94e8ec909209b34e8347a2a | 597 | py | Python | models/__init__.py | PistonY/ModelZoo.pytorch | eb4cc16bfbb6bdf1c021f5f6faba7fbfc8c04612 | [
"MIT"
] | 41 | 2019-11-13T02:09:47.000Z | 2022-02-20T11:31:18.000Z | models/__init__.py | PistonY/ModelZoo.pytorch | eb4cc16bfbb6bdf1c021f5f6faba7fbfc8c04612 | [
"MIT"
] | 5 | 2020-09-22T10:47:22.000Z | 2021-05-11T10:10:37.000Z | models/__init__.py | PistonY/ModelZoo.pytorch | eb4cc16bfbb6bdf1c021f5f6faba7fbfc8c04612 | [
"MIT"
] | 5 | 2020-07-07T13:27:04.000Z | 2021-06-09T03:21:27.000Z | # -*- coding: utf-8 -*-
# @Author : DevinYang(pistonyang@gmail.com)
from .oct_resnet_re import *
from .resnet import *
from .fairnet import *
from .mobilenet import *
from .proxyless_nas import *
from .efficientnet import *
from .evo_norm import *
from .resnest import *
from .regnet import *
from .ghostnet import *
f... | 28.428571 | 45 | 0.773869 |
b322d454002e8672ff18f237ed6d1dd5392a3d0b | 5,005 | py | Python | homeassistant/components/tahoma/__init__.py | tbarbette/core | 8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c | [
"Apache-2.0"
] | 1 | 2017-05-30T22:21:05.000Z | 2017-05-30T22:21:05.000Z | homeassistant/components/tahoma/__init__.py | tbarbette/core | 8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c | [
"Apache-2.0"
] | 51 | 2020-10-14T01:19:07.000Z | 2022-03-31T06:02:48.000Z | homeassistant/components/tahoma/__init__.py | tbarbette/core | 8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c | [
"Apache-2.0"
] | 1 | 2021-08-16T02:53:15.000Z | 2021-08-16T02:53:15.000Z | """Support for Tahoma devices."""
from collections import defaultdict
import logging
from requests.exceptions import RequestException
from tahoma_api import Action, TahomaApi
import voluptuous as vol
from homeassistant.const import CONF_EXCLUDE, CONF_PASSWORD, CONF_USERNAME
from homeassistant.helpers import config_va... | 33.366667 | 87 | 0.668531 |
ed1133dfcc828c717240d84d1ca1c8e6c2baf1e3 | 15,704 | py | Python | pylr/parser.py | NPRA/PyLR | 063f308c81fe3d0b765c6459d7ea609b50d2d503 | [
"Apache-2.0"
] | 7 | 2015-02-15T06:11:37.000Z | 2019-10-07T12:29:20.000Z | pylr/parser.py | NPRA/PyLR | 063f308c81fe3d0b765c6459d7ea609b50d2d503 | [
"Apache-2.0"
] | 1 | 2018-03-08T16:35:41.000Z | 2019-08-19T10:48:19.000Z | pylr/parser.py | NPRA/PyLR | 063f308c81fe3d0b765c6459d7ea609b50d2d503 | [
"Apache-2.0"
] | 12 | 2016-05-21T09:55:44.000Z | 2020-12-15T03:42:28.000Z | # -*- coding: utf-8 -*-
''' Location parser
.. moduleauthor:: David Marteau <david.marteau@mappy.com>
'''
from collections import namedtuple
from bitstring import BitStream
from .utils import lazyproperty
from .constants import (LATEST_BINARY_VERSION,
BINARY_VERSION_2,
... | 30.974359 | 122 | 0.628884 |
e3cc0185664cb8f16eb0487687628879a801c77c | 21,028 | py | Python | xfel/merging/application/phil/phil.py | TiankunZhou/cctbx_project | 373f302f00c12d7239f8e37e3165e62bc1d852cc | [
"BSD-3-Clause-LBNL"
] | null | null | null | xfel/merging/application/phil/phil.py | TiankunZhou/cctbx_project | 373f302f00c12d7239f8e37e3165e62bc1d852cc | [
"BSD-3-Clause-LBNL"
] | 1 | 2020-05-26T17:46:17.000Z | 2020-05-26T17:55:19.000Z | xfel/merging/application/phil/phil.py | TiankunZhou/cctbx_project | 373f302f00c12d7239f8e37e3165e62bc1d852cc | [
"BSD-3-Clause-LBNL"
] | 1 | 2022-02-08T10:11:07.000Z | 2022-02-08T10:11:07.000Z | from __future__ import absolute_import, division, print_function
from iotbx.phil import parse
help_message = '''
Redesign script for merging xfel data
'''
dispatch_phil = """
dispatch {
step_list = None
.type = strings
.help = List of steps to use. None means use the full set of steps to merge.
}
"""
inpu... | 38.442413 | 156 | 0.687464 |
900e1e2e1d6e2765ccc894ebea17d630a61be6d0 | 8,120 | py | Python | reinforce_baselines.py | DaehanKim/attention-learn-to-route | 9ce4fa9a3a136768f92adf3d1e7d62620442f1b7 | [
"MIT"
] | null | null | null | reinforce_baselines.py | DaehanKim/attention-learn-to-route | 9ce4fa9a3a136768f92adf3d1e7d62620442f1b7 | [
"MIT"
] | null | null | null | reinforce_baselines.py | DaehanKim/attention-learn-to-route | 9ce4fa9a3a136768f92adf3d1e7d62620442f1b7 | [
"MIT"
] | null | null | null | import torch
import torch.nn.functional as F
from torch.utils.data import Dataset
from scipy.stats import ttest_rel
import copy
from train import rollout, get_inner_model
class Baseline(object):
def wrap_dataset(self, dataset):
return dataset
def unwrap_batch(self, batch):
return batch, None
... | 32.874494 | 115 | 0.626355 |
3a53ce562b53befac9d849b4672272b230c1ce52 | 1,702 | py | Python | check_weight.py | jeongjuns/Control_yolact | dad800dcc1aa0b02445e302256b4508b7688880c | [
"MIT"
] | null | null | null | check_weight.py | jeongjuns/Control_yolact | dad800dcc1aa0b02445e302256b4508b7688880c | [
"MIT"
] | null | null | null | check_weight.py | jeongjuns/Control_yolact | dad800dcc1aa0b02445e302256b4508b7688880c | [
"MIT"
] | null | null | null | import torch, torchvision
import torch.nn as nn
import torch.nn.functional as F
from torchvision.models.resnet import Bottleneck
import numpy as np
from itertools import product
from math import sqrt
from typing import List
from collections import defaultdict
from data.config import cfg, mask_type
from laye... | 27.015873 | 89 | 0.720917 |
837ec818d9a80cb92448390cda728b2d45999869 | 1,525 | py | Python | bbb-exporter/settings.py | icts-ca/bigbluebutton-exporter | f3d73639c002b27a09973681c1c9d560086b7bd8 | [
"MIT"
] | 1 | 2020-05-26T19:19:17.000Z | 2020-05-26T19:19:17.000Z | bbb-exporter/settings.py | man10to/bigbluebutton-exporter | 56a9fdf5390b63a9b82e5b3098f897fc3be29fd2 | [
"MIT"
] | null | null | null | bbb-exporter/settings.py | man10to/bigbluebutton-exporter | 56a9fdf5390b63a9b82e5b3098f897fc3be29fd2 | [
"MIT"
] | 1 | 2021-05-07T06:48:52.000Z | 2021-05-07T06:48:52.000Z | import os
import api_lib
from helpers import validate_api_base_url, validate_buckets
MAJOR = 0
MINOR = 4
BUGFIX = 0
INFO = ""
VERSION = "{}.{}.{}".format(MAJOR, MINOR, BUGFIX)
if INFO:
VERSION += "-" + INFO
debug_env = os.getenv("DEBUG", "false")
DEBUG = True if debug_env.lower() == "true" else False
API_BASE_U... | 39.102564 | 129 | 0.772459 |
8dc86e14e6ff2c69f607a84e5037ce8a6727cf1b | 212 | py | Python | rafiki/model/__init__.py | Yirui-Wang/rafiki | 22a58d592e6aa49f41ad895c94f099a30dc2023b | [
"Apache-2.0"
] | 1 | 2018-12-19T13:14:34.000Z | 2018-12-19T13:14:34.000Z | rafiki/model/__init__.py | Yirui-Wang/rafiki | 22a58d592e6aa49f41ad895c94f099a30dc2023b | [
"Apache-2.0"
] | null | null | null | rafiki/model/__init__.py | Yirui-Wang/rafiki | 22a58d592e6aa49f41ad895c94f099a30dc2023b | [
"Apache-2.0"
] | null | null | null | from .model import BaseModel, test_model_class, load_model_class, \
parse_model_install_command, InvalidModelClassException, InvalidModelParamsException, \
ModelUtils
from .log import ModelLogUtilsLogger
| 42.4 | 91 | 0.839623 |
5569100dea9e3e64d5696807912b32ce853dec37 | 12,029 | py | Python | src/gdata/sample_util.py | morrison12/gdata-python-client | d11a5f0b333f6ec5e519d96b131c5100c9518feb | [
"Apache-2.0"
] | null | null | null | src/gdata/sample_util.py | morrison12/gdata-python-client | d11a5f0b333f6ec5e519d96b131c5100c9518feb | [
"Apache-2.0"
] | null | null | null | src/gdata/sample_util.py | morrison12/gdata-python-client | d11a5f0b333f6ec5e519d96b131c5100c9518feb | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (C) 2009 Google 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 ... | 39.831126 | 86 | 0.632388 |
01a9c875c36dbb33509a8197f73fbad745f7987f | 2,977 | py | Python | gaetk2/views/backup.py | mdornseif/appengine-toolkit2 | 47ee6bf99b8e461ee64eae75bf24fb462d99b0ab | [
"MIT"
] | 1 | 2018-08-16T16:15:30.000Z | 2018-08-16T16:15:30.000Z | gaetk2/views/backup.py | mdornseif/appengine-toolkit2 | 47ee6bf99b8e461ee64eae75bf24fb462d99b0ab | [
"MIT"
] | 3 | 2018-08-14T09:52:11.000Z | 2021-12-13T19:54:07.000Z | gaetk2/views/backup.py | mdornseif/appengine-toolkit2 | 47ee6bf99b8e461ee64eae75bf24fb462d99b0ab | [
"MIT"
] | 1 | 2018-09-28T05:55:27.000Z | 2018-09-28T05:55:27.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
backup.py - Trigger scheduled Backups via Cron.
See :ref:`backupreplication` for further Information.
See https://cloud.google.com/appengine/articles/scheduled_backups
also https://cloud.google.com/datastore/docs/schedule-export
Created by Christian Klein on 2017-02-... | 31.010417 | 107 | 0.668122 |
145cf8059ae363602529f873bb1f041108962451 | 2,414 | py | Python | sync_clusters.py | mvxxx/cluster_utils | 84fc4dcd78768eb5f8058d05f5e82192c0ce77a5 | [
"MIT"
] | null | null | null | sync_clusters.py | mvxxx/cluster_utils | 84fc4dcd78768eb5f8058d05f5e82192c0ce77a5 | [
"MIT"
] | null | null | null | sync_clusters.py | mvxxx/cluster_utils | 84fc4dcd78768eb5f8058d05f5e82192c0ce77a5 | [
"MIT"
] | null | null | null | import argparse
import json
from uuid import uuid4
import shutil
import os
from utils.communication import exec_on_rem_workspace
_USERNAME_REMOTE = 'username@remote'
_TREE_ROOT = 'tree_root'
def sync_clusters(target_cluster: str, local_path: str, exclude_cmd: str):
target_cluster_host = cfg['clusters'][target_clu... | 39.57377 | 153 | 0.699254 |
eabb799e00d489d65c491c9c376f9b9ff167f9c0 | 313 | py | Python | designs/config/docs.py | ahmadRagheb/designs | 7aa567ddc78d3c73167b0b92ced2ceb5e8db0cdb | [
"MIT"
] | null | null | null | designs/config/docs.py | ahmadRagheb/designs | 7aa567ddc78d3c73167b0b92ced2ceb5e8db0cdb | [
"MIT"
] | null | null | null | designs/config/docs.py | ahmadRagheb/designs | 7aa567ddc78d3c73167b0b92ced2ceb5e8db0cdb | [
"MIT"
] | null | null | null | """
Configuration for docs
"""
# source_link = "https://github.com/[org_name]/designs"
# docs_base_url = "https://[org_name].github.io/designs"
# headline = "App that does everything"
# sub_heading = "Yes, you got that right the first time, everything"
def get_context(context):
context.brand_html = "Designs"
| 26.083333 | 68 | 0.722045 |
b8bcd878acb9cb9415e841b609833a97498d8829 | 7,346 | py | Python | lost/modes/office_gui.py | carstenfuchs/LoST | 7a88057808b4973d1b182d0efd7e145dbd898cd1 | [
"MIT"
] | null | null | null | lost/modes/office_gui.py | carstenfuchs/LoST | 7a88057808b4973d1b182d0efd7e145dbd898cd1 | [
"MIT"
] | null | null | null | lost/modes/office_gui.py | carstenfuchs/LoST | 7a88057808b4973d1b182d0efd7e145dbd898cd1 | [
"MIT"
] | null | null | null | from babel.dates import format_datetime
from datetime import datetime
from tkinter import *
# from tkinter import ttk
from lost.modes.office_terminal import State
from lost.widgets import adjust_wraplength, cp, fp, DisplayServerReplyFrame, PauseButtonsRow, SystemPanelFrame, TitleBar, TouchButton, WaitForServerFrame
... | 43.211765 | 153 | 0.633678 |
86aab671e0bff8603bff554a2086fb86d2d4c283 | 10,727 | py | Python | sdk/python/pulumi_azure_native/consumption/v20181001/budget_by_resource_group_name.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/consumption/v20181001/budget_by_resource_group_name.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/consumption/v20181001/budget_by_resource_group_name.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** 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, _tables
from... | 51.325359 | 1,126 | 0.671856 |
965029dc8c9fb652f674bf01136879ca51b92682 | 3,419 | py | Python | karbor-1.3.0/karbor/services/protection/flows/protect.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 1 | 2021-05-23T01:48:25.000Z | 2021-05-23T01:48:25.000Z | karbor-1.3.0/karbor/services/protection/flows/protect.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | karbor-1.3.0/karbor/services/protection/flows/protect.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 2 | 2020-03-15T01:24:15.000Z | 2020-07-22T20:34:26.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
# distributed under the Li... | 38.852273 | 76 | 0.708102 |
91c350495f90aeb093d65ec853f11a5a85bf1598 | 3,195 | py | Python | tests/flows/test_saml-saml.py | mrkday/SATOSA | 43fd13273d7633b1d496d9c9aaef97c472ebd448 | [
"Apache-2.0"
] | 92 | 2017-11-08T08:01:27.000Z | 2022-03-14T09:44:09.000Z | tests/flows/test_saml-saml.py | mrkday/SATOSA | 43fd13273d7633b1d496d9c9aaef97c472ebd448 | [
"Apache-2.0"
] | 155 | 2017-10-31T15:11:06.000Z | 2022-03-11T16:59:23.000Z | tests/flows/test_saml-saml.py | mrkday/SATOSA | 43fd13273d7633b1d496d9c9aaef97c472ebd448 | [
"Apache-2.0"
] | 73 | 2017-11-05T13:53:40.000Z | 2022-03-23T15:34:00.000Z | from urllib.parse import parse_qsl, urlparse, urlencode
from saml2 import BINDING_HTTP_REDIRECT
from saml2.config import SPConfig, IdPConfig
from werkzeug.test import Client
from werkzeug.wrappers import Response
from satosa.metadata_creation.saml_metadata import create_entity_descriptors
from satosa.proxy_server imp... | 46.304348 | 116 | 0.703599 |
36afcae81724dc2fa68893bcb232e5af68f295d3 | 2,109 | py | Python | backend/apps/dapps/validators.py | grinay/smartz | 44ca50ebcac26d5776b90b4fc96c63edfe804dfe | [
"Apache-2.0"
] | null | null | null | backend/apps/dapps/validators.py | grinay/smartz | 44ca50ebcac26d5776b90b4fc96c63edfe804dfe | [
"Apache-2.0"
] | null | null | null | backend/apps/dapps/validators.py | grinay/smartz | 44ca50ebcac26d5776b90b4fc96c63edfe804dfe | [
"Apache-2.0"
] | 1 | 2018-10-23T15:04:52.000Z | 2018-10-23T15:04:52.000Z | from django.core.exceptions import ValidationError
from smartz.json_schema import is_conforms2schema_part, load_schema, is_conforms2schema
def validate_function_args(value):
schema = {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Function argument",
"type": "array",
... | 31.014706 | 87 | 0.512091 |
5f00205518f8b24ec1fe48be103d509ecc19d8e9 | 5,964 | py | Python | lib/galaxy/openid/providers.py | rikeshi/galaxy | c536a877e4a9b3d12aa0d00fd4d5e705109a0d0a | [
"CC-BY-3.0"
] | 4 | 2015-05-12T20:36:41.000Z | 2017-06-26T15:34:02.000Z | lib/galaxy/openid/providers.py | rikeshi/galaxy | c536a877e4a9b3d12aa0d00fd4d5e705109a0d0a | [
"CC-BY-3.0"
] | 52 | 2015-03-16T14:02:14.000Z | 2021-12-24T09:50:23.000Z | lib/galaxy/openid/providers.py | rikeshi/galaxy | c536a877e4a9b3d12aa0d00fd4d5e705109a0d0a | [
"CC-BY-3.0"
] | 1 | 2016-03-21T12:54:06.000Z | 2016-03-21T12:54:06.000Z | """
Contains OpenID provider functionality
"""
import logging
import os
from collections import OrderedDict
from galaxy.util import parse_xml, string_as_bool
log = logging.getLogger(__name__)
NO_PROVIDER_ID = 'None'
RESERVED_PROVIDER_IDS = [NO_PROVIDER_ID]
class OpenIDProvider:
'''An OpenID Provider object.'... | 40.849315 | 236 | 0.654091 |
ade49b8116e4b3381701fe51cba248aafc3bb7ef | 6,979 | py | Python | homeassistant/components/media_player/volumio.py | adolfoeliazat/voidhomecontrol | 6d733253811c553912e46e24debec818b28b0688 | [
"Apache-2.0"
] | 1 | 2021-08-06T09:54:39.000Z | 2021-08-06T09:54:39.000Z | homeassistant/components/media_player/volumio.py | adolfoeliazat/voidhomecontrol | 6d733253811c553912e46e24debec818b28b0688 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/media_player/volumio.py | adolfoeliazat/voidhomecontrol | 6d733253811c553912e46e24debec818b28b0688 | [
"Apache-2.0"
] | 1 | 2020-11-04T07:34:41.000Z | 2020-11-04T07:34:41.000Z | """
Volumio Platform.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/media_player.volumio/
"""
import logging
import asyncio
import aiohttp
import voluptuous as vol
from homeassistant.components.media_player import (
SUPPORT_NEXT_TRACK, SUPPORT_PAU... | 32.765258 | 79 | 0.631036 |
a9ab7b1982b1e938678d3ac601ff21b9bda16125 | 3,683 | py | Python | app.py | aikagari/tornado_test | 5d5e218df56e46711106cffd2886bdfcabfd8046 | [
"MIT"
] | null | null | null | app.py | aikagari/tornado_test | 5d5e218df56e46711106cffd2886bdfcabfd8046 | [
"MIT"
] | null | null | null | app.py | aikagari/tornado_test | 5d5e218df56e46711106cffd2886bdfcabfd8046 | [
"MIT"
] | null | null | null | import asyncio
from tornado import websocket, web, ioloop
import aioredis
import os
import time
status_source_dict = {'\x01': 'IDLE', '\x02': 'ACTIVE', '\x03': 'RECHARGE'}
connections = []
last_msg = {}
class BaseSocket(websocket.WebSocketHandler):
async def open(self):
connections.append(self)
s... | 32.883929 | 134 | 0.594624 |
01c7f8220b79bd0c492602fc4c7f8f5cb494f650 | 9,772 | py | Python | timml/util.py | raoulcollenteur/timml | 1d393e73c03e62b836678d156dec19bd38d64b2e | [
"MIT"
] | null | null | null | timml/util.py | raoulcollenteur/timml | 1d393e73c03e62b836678d156dec19bd38d64b2e | [
"MIT"
] | null | null | null | timml/util.py | raoulcollenteur/timml | 1d393e73c03e62b836678d156dec19bd38d64b2e | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from matplotlib.collections import LineCollection
from .trace import timtracelines, timtraceline
plt.rcParams['contour.negative_linestyle'] = 'solid'
class PlotTim:
def plot(self, win=None, newfig=True, figsize=None, orientation='hor', topfigfrac=0.8):
"""... | 40.04918 | 106 | 0.486901 |
fbc3abfb2de8de62fde84c96b35e81332de95df5 | 137 | py | Python | Utils/Utils.py | dgod1028/SBass_Project | cdfd13a6876ef54621c3486ac89ad3bd50f23158 | [
"MIT"
] | null | null | null | Utils/Utils.py | dgod1028/SBass_Project | cdfd13a6876ef54621c3486ac89ad3bd50f23158 | [
"MIT"
] | null | null | null | Utils/Utils.py | dgod1028/SBass_Project | cdfd13a6876ef54621c3486ac89ad3bd50f23158 | [
"MIT"
] | null | null | null | import pickle
def load_object( p):
return pickle.load(open(p, "rb"))
def save_object( obj, p):
pickle.dump(obj, open(p, "wb"))
| 17.125 | 37 | 0.642336 |
79abf4a0ac2acf21bc4fb786c4af4638105db35a | 3,171 | py | Python | models_modified.py | atul2099/squad | 7901894c0db3aad097a0f61279dff96b142c1b01 | [
"MIT"
] | null | null | null | models_modified.py | atul2099/squad | 7901894c0db3aad097a0f61279dff96b142c1b01 | [
"MIT"
] | null | null | null | models_modified.py | atul2099/squad | 7901894c0db3aad097a0f61279dff96b142c1b01 | [
"MIT"
] | null | null | null | """Top-level model classes.
Author:
Chris Chute (chute@stanford.edu)
"""
import layers_modified as layers
import torch
import torch.nn as nn
class BiDAF(nn.Module):
"""Baseline BiDAF model for SQuAD.
Based on the paper:
"Bidirectional Attention Flow for Machine Comprehension"
by Minjoon Seo, An... | 41.723684 | 123 | 0.583097 |
5bdbfabb1867fb7ba328d7dd199b9ffa2be94092 | 13,897 | py | Python | subwabbit/base.py | Venousek/subwabbit | fc04616a51e7d13982f6d462de2c0b17150231fb | [
"BSD-3-Clause"
] | 12 | 2019-06-03T04:10:50.000Z | 2021-10-01T18:24:23.000Z | subwabbit/base.py | Venousek/subwabbit | fc04616a51e7d13982f6d462de2c0b17150231fb | [
"BSD-3-Clause"
] | 3 | 2019-10-17T17:57:03.000Z | 2021-10-02T07:48:55.000Z | subwabbit/base.py | Venousek/subwabbit | fc04616a51e7d13982f6d462de2c0b17150231fb | [
"BSD-3-Clause"
] | 7 | 2019-09-06T19:15:16.000Z | 2021-10-01T18:24:24.000Z | from abc import ABC, abstractmethod
from typing import Dict, List, Tuple, Iterable, Any, Optional, Union
class VowpalWabbitError(Exception):
pass
class VowpalWabbitBaseFormatter(ABC):
"""
Formatter translates structured information about context and items to
Vowpal Wabbit's input format: https://git... | 45.415033 | 120 | 0.593941 |
16c92621e4747e30ba53fb4c1306c488f52ef2ef | 1,290 | py | Python | textGen.py | JackToaster/Reassuring-Parable-Generator | 50a86793dfe81337c457a2ee373cfeb71af98c4a | [
"MIT"
] | 47 | 2017-06-12T03:51:15.000Z | 2021-06-15T04:59:55.000Z | textGen.py | bigDonJuan/Reassuring-Parable-Generator | 50a86793dfe81337c457a2ee373cfeb71af98c4a | [
"MIT"
] | 2 | 2017-07-11T18:56:06.000Z | 2017-07-26T02:44:39.000Z | textGen.py | bigDonJuan/Reassuring-Parable-Generator | 50a86793dfe81337c457a2ee373cfeb71af98c4a | [
"MIT"
] | 5 | 2017-06-12T07:17:40.000Z | 2021-03-14T00:11:50.000Z |
import time
from config import config
def fixFormat(input_string):
return input_string
#evaluate and replace a string
def evaluatePhrase(inputString, config):
if inputString.find('{') == -1:
return inputString
else:
index1 = inputString.find('{')
index2 = inputString.find('}')
... | 29.318182 | 91 | 0.68062 |
c63b4459240ef0c1227f2dbef865bd2309e344cb | 1,606 | py | Python | workspacePrior/ParsedTwitterScripts/AddRetweetsBotCSV.py | sai6kiran/TwitterBotFarms | cf6bfddda9fac1e27477186fd4f4b086ac711781 | [
"MIT"
] | null | null | null | workspacePrior/ParsedTwitterScripts/AddRetweetsBotCSV.py | sai6kiran/TwitterBotFarms | cf6bfddda9fac1e27477186fd4f4b086ac711781 | [
"MIT"
] | null | null | null | workspacePrior/ParsedTwitterScripts/AddRetweetsBotCSV.py | sai6kiran/TwitterBotFarms | cf6bfddda9fac1e27477186fd4f4b086ac711781 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import csv
import pandas as pd
import time
import pdb #Debugger Library
#Load main csv file into a pandas datframe. The dataframe is essentially an array containing sub dataframes. The sub dataframes contain 2000 tweets [rows] each. This is done using "chunksize" = 2000.
df = pd.read_csv("/roo... | 51.806452 | 298 | 0.729141 |
ca31d138d1d8a59348afc47059befc8b1266f420 | 9,247 | py | Python | tests/pytests/test_issues.py | bhagathsagar/RediSearch | 6baec33dc4cc594947c074768991bcf353fe07db | [
"MIT",
"Ruby",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | tests/pytests/test_issues.py | bhagathsagar/RediSearch | 6baec33dc4cc594947c074768991bcf353fe07db | [
"MIT",
"Ruby",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | tests/pytests/test_issues.py | bhagathsagar/RediSearch | 6baec33dc4cc594947c074768991bcf353fe07db | [
"MIT",
"Ruby",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | from common import getConnectionByEnv, waitForIndex, sortedResults, toSortedFlatList
def test_1282(env):
env.expect('FT.CREATE idx ON HASH SCHEMA txt1 TEXT').equal('OK')
env.expect('FT.ADD idx doc1 1.0 FIELDS txt1 foo').equal('OK')
# optional search for new word would crash server
env.expect('FT.SEARCH idx', ... | 48.161458 | 130 | 0.622364 |
14fc46c8980b1dbc95155fe5277b9f23aed5bd3c | 6,304 | py | Python | acs_test_suites/OTC/libs/testlib/base/base_step.py | wangji1/test-framework-and-suites-for-android | 59564f826f205fe7fab64f45b88b1a6dde6900af | [
"Apache-2.0"
] | 8 | 2018-09-14T01:34:01.000Z | 2021-07-01T02:00:23.000Z | acs_test_suites/OTC/libs/testlib/base/base_step.py | wangji1/test-framework-and-suites-for-android | 59564f826f205fe7fab64f45b88b1a6dde6900af | [
"Apache-2.0"
] | 3 | 2019-09-10T11:39:50.000Z | 2019-10-10T08:26:22.000Z | acs_test_suites/OTC/libs/testlib/base/base_step.py | wangji1/test-framework-and-suites-for-android | 59564f826f205fe7fab64f45b88b1a6dde6900af | [
"Apache-2.0"
] | 9 | 2018-10-11T15:14:03.000Z | 2021-02-17T11:37:20.000Z | #!/usr/bin/env python
"""
Copyright (C) 2018 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 ag... | 34.637363 | 112 | 0.577253 |
48436779d8b00b815c6ec79abd982f3b01a3dc18 | 17,797 | py | Python | marconi/queues/storage/base.py | andrew-vant/marconi | 9afe7ba27efe597cca8baac77fd0aa387c75001a | [
"Apache-2.0"
] | null | null | null | marconi/queues/storage/base.py | andrew-vant/marconi | 9afe7ba27efe597cca8baac77fd0aa387c75001a | [
"Apache-2.0"
] | null | null | null | marconi/queues/storage/base.py | andrew-vant/marconi | 9afe7ba27efe597cca8baac77fd0aa387c75001a | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2013 Red Hat, 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 law or agreed to in writ... | 31.222807 | 78 | 0.643704 |
1a09aaa9e9d157b76bb9c97209f91769a6afb1db | 1,759 | py | Python | wlanpi_commands/speedtest.py | nigelbowden/wlanpi-chat-bot | cedab0e83d6e33d47f66c1a3be202564f95ac408 | [
"MIT"
] | null | null | null | wlanpi_commands/speedtest.py | nigelbowden/wlanpi-chat-bot | cedab0e83d6e33d47f66c1a3be202564f95ac408 | [
"MIT"
] | null | null | null | wlanpi_commands/speedtest.py | nigelbowden/wlanpi-chat-bot | cedab0e83d6e33d47f66c1a3be202564f95ac408 | [
"MIT"
] | null | null | null | from .command import Command
import os
import subprocess
from utils.emojis import graph, hour_glass
class Speedtest(Command):
def __init__(self, telegram_object, conf_obj):
super().__init__(telegram_object, conf_obj)
self.command_name = "speedtest"
def run(self, args_list):
... | 34.490196 | 181 | 0.630472 |
88edd213aca8b71e3060d9d6dd952f7b197bfab3 | 3,500 | py | Python | src/zsl/application/modules/web/web_context_module.py | AtteqCom/zsl | 0d418ef957c9780263b1031dbc59482cd974bc04 | [
"MIT"
] | 2 | 2017-05-17T08:08:52.000Z | 2019-03-25T00:24:51.000Z | src/zsl/application/modules/web/web_context_module.py | AtteqCom/zsl | 0d418ef957c9780263b1031dbc59482cd974bc04 | [
"MIT"
] | 100 | 2017-01-11T13:43:11.000Z | 2022-02-10T09:27:18.000Z | src/zsl/application/modules/web/web_context_module.py | AtteqCom/zsl | 0d418ef957c9780263b1031dbc59482cd974bc04 | [
"MIT"
] | 1 | 2017-05-10T10:27:01.000Z | 2017-05-10T10:27:01.000Z | from __future__ import absolute_import, division, print_function, unicode_literals
from builtins import *
import logging
from typing import Any
import click
from injector import Binder, provides, singleton
from zsl import Config, Zsl, inject
from zsl.application.initialization_context import InitializationContext
fr... | 33.980583 | 119 | 0.697143 |
fd5981b17d5f559e447a63bf1ddade523794b2db | 5,077 | py | Python | geosnap/tests/test_clusters.py | WawNun/geosnap | 9838498b89d42c94fef73ee2983dd385dab17345 | [
"BSD-3-Clause"
] | 14 | 2018-09-19T22:34:44.000Z | 2019-04-03T17:18:22.000Z | geosnap/tests/test_clusters.py | WawNun/geosnap | 9838498b89d42c94fef73ee2983dd385dab17345 | [
"BSD-3-Clause"
] | 55 | 2018-10-01T18:31:25.000Z | 2019-04-08T16:23:46.000Z | geosnap/tests/test_clusters.py | WawNun/geosnap | 9838498b89d42c94fef73ee2983dd385dab17345 | [
"BSD-3-Clause"
] | 5 | 2018-10-02T21:41:46.000Z | 2019-01-25T02:59:16.000Z | from geosnap import Community
import numpy as np
from geosnap import DataStore
from numpy.testing import assert_array_equal, assert_array_almost_equal
reno = Community.from_census(msa_fips="39900", datastore=DataStore())
columns = [
"median_household_income",
"p_poverty_rate",
"p_unemployment_rate",
]
# A... | 30.584337 | 88 | 0.553673 |
5a1c1de93f29ecbb1fd93c684fcf1cef51cfa52e | 15,215 | py | Python | private/templates/CRMT/controllers.py | arnavsharma93/eden | 2e559a277c4144ba4f4cdcd108460d025923671d | [
"MIT"
] | null | null | null | private/templates/CRMT/controllers.py | arnavsharma93/eden | 2e559a277c4144ba4f4cdcd108460d025923671d | [
"MIT"
] | null | null | null | private/templates/CRMT/controllers.py | arnavsharma93/eden | 2e559a277c4144ba4f4cdcd108460d025923671d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from os import path
from urllib import urlencode
try:
import json # try stdlib (Python 2.6)
except ImportError:
try:
import simplejson as json # try external module
except:
import gluon.contrib.simplejson as json # fallback to pure-Python module
from gluon import c... | 37.383292 | 108 | 0.455012 |
5a888c40b74a3b4e893bb69ea1069e0f5cec5f25 | 2,084 | py | Python | src/raiden_libs/contract_info.py | karlb/raiden-services | 6f77784395b15ffb612b47bd4c88268cdff01da2 | [
"MIT"
] | null | null | null | src/raiden_libs/contract_info.py | karlb/raiden-services | 6f77784395b15ffb612b47bd4c88268cdff01da2 | [
"MIT"
] | null | null | null | src/raiden_libs/contract_info.py | karlb/raiden-services | 6f77784395b15ffb612b47bd4c88268cdff01da2 | [
"MIT"
] | null | null | null | import sys
from typing import Dict, List, Tuple
import structlog
from eth_utils import decode_hex
from raiden.utils.typing import Address, BlockNumber, ChainID
from raiden_contracts.contract_manager import (
ContractManager,
contracts_precompiled_path,
get_contracts_deployment_info,
)
log = structlog.get... | 34.733333 | 99 | 0.721209 |
1fd6fd94690cc893e6df64d26e6776ddc66866b1 | 5,451 | py | Python | selectable/base.py | zeehio/django-selectable | 40c44559320a98229091b56c034e145eb77e24af | [
"BSD-2-Clause"
] | null | null | null | selectable/base.py | zeehio/django-selectable | 40c44559320a98229091b56c034e145eb77e24af | [
"BSD-2-Clause"
] | null | null | null | selectable/base.py | zeehio/django-selectable | 40c44559320a98229091b56c034e145eb77e24af | [
"BSD-2-Clause"
] | null | null | null | "Base classes for lookup creation."
from __future__ import unicode_literals
import json
import operator
import re
from functools import reduce
from django.conf import settings
from django.core.paginator import Paginator, InvalidPage, EmptyPage
from django.core.urlresolvers import reverse
from django.core.serializers.... | 30.971591 | 84 | 0.629242 |
7e5a23d85e5f844ea598e7a01274c0dc95b781aa | 293 | py | Python | domain/model/remote_account/remote_account.py | agiledragon/transfer-money-python | a8f7520c37f75e098623e58e269d3fccf11cb205 | [
"MIT"
] | 5 | 2019-08-07T05:53:39.000Z | 2021-11-18T07:02:02.000Z | domain/model/remote_account/remote_account.py | agiledragon/transfer-money-python | a8f7520c37f75e098623e58e269d3fccf11cb205 | [
"MIT"
] | null | null | null | domain/model/remote_account/remote_account.py | agiledragon/transfer-money-python | a8f7520c37f75e098623e58e269d3fccf11cb205 | [
"MIT"
] | 5 | 2019-08-07T05:53:53.000Z | 2020-05-18T16:45:54.000Z | from domain.model.base.aggregate_root import AggregateRoot
from domain.model.comm_role.account_info import AccountInfo
class RemoteAccount(AggregateRoot):
def __init__(self, account_id):
AggregateRoot.__init__(self, account_id)
self.account_info = AccountInfo(account_id) | 36.625 | 59 | 0.795222 |
4aeac305a6f98a219baa617d4da0a5583920d685 | 1,803 | py | Python | hiector/ssrdd/utils/box/bbox_np.py | sentinel-hub/hiector | 95102c1fcfa63d127a389262e9d569e3aa3495cc | [
"MIT"
] | 3 | 2022-03-15T11:19:27.000Z | 2022-03-24T15:59:49.000Z | hiector/ssrdd/utils/box/bbox_np.py | sentinel-hub/hiector | 95102c1fcfa63d127a389262e9d569e3aa3495cc | [
"MIT"
] | null | null | null | hiector/ssrdd/utils/box/bbox_np.py | sentinel-hub/hiector | 95102c1fcfa63d127a389262e9d569e3aa3495cc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# File : bbox_np.py
# Author : Kai Ao
# Email : capino627@163.com
# Date : 2020/12/12 11:08
#
# This file is part of Rotation-Decoupled Detector.
# https://github.com/Capino512/pytorch-rotation-decoupled-detector
# Distributed under MIT License.
import numpy as np
def bbox_switch(bbox, i... | 32.781818 | 114 | 0.511925 |
852bd277c89bf5d8ea47e58b3428828d7ae66c42 | 2,561 | py | Python | utilities/writer.py | Nniy/lark | 09a9ee45006ebf07ad8abe6f03384cac7f407cc1 | [
"Apache-2.0"
] | 1 | 2018-11-11T23:05:34.000Z | 2018-11-11T23:05:34.000Z | utilities/writer.py | Nniy/lark | 09a9ee45006ebf07ad8abe6f03384cac7f407cc1 | [
"Apache-2.0"
] | null | null | null | utilities/writer.py | Nniy/lark | 09a9ee45006ebf07ad8abe6f03384cac7f407cc1 | [
"Apache-2.0"
] | null | null | null | import os.path
import pretty_midi as pm
import numpy as np
import matplotlib.pyplot as plt
import h5py
np.set_printoptions(threshold=np.nan)
def save_midi(piano_roll, filename):
midi_output = pm.PrettyMIDI()
guitar = pm.Instrument(program=25)
bass = pm.Instrument(program=33)
string = pm.Instrument(pr... | 33.697368 | 101 | 0.4631 |
a8ba74364bc2649f230de77ac57da9bb46893cf7 | 13,025 | py | Python | tools/clusterfuzz/v8_foozzie_test.py | EXHades/v8 | 5fe0aa3bc79c0a9d3ad546b79211f07105f09585 | [
"BSD-3-Clause"
] | 20,995 | 2015-01-01T05:12:40.000Z | 2022-03-31T21:39:18.000Z | tools/clusterfuzz/v8_foozzie_test.py | Andrea-MariaDB-2/v8 | a0f0ebd7a876e8cb2210115adbfcffe900e99540 | [
"BSD-3-Clause"
] | 333 | 2020-07-15T17:06:05.000Z | 2021-03-15T12:13:09.000Z | tools/clusterfuzz/v8_foozzie_test.py | Andrea-MariaDB-2/v8 | a0f0ebd7a876e8cb2210115adbfcffe900e99540 | [
"BSD-3-Clause"
] | 4,523 | 2015-01-01T15:12:34.000Z | 2022-03-28T06:23:41.000Z | #!/usr/bin/env python
# Copyright 2016 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import random
import subprocess
import sys
import unittest
import v8_commands
import v8_foozzie
import v8_fuzz_config
impo... | 34.640957 | 79 | 0.655125 |
959c74a05efc151fb41ded6466bcb7c4002dc3f9 | 1,669 | py | Python | Funky Sentence Gen/Funky Sentence Generator.py | Software-Cat/Python-Mini-Projects | 3e8a150758eddfc2b21a5e8c665fd6eca850e55d | [
"MIT"
] | null | null | null | Funky Sentence Gen/Funky Sentence Generator.py | Software-Cat/Python-Mini-Projects | 3e8a150758eddfc2b21a5e8c665fd6eca850e55d | [
"MIT"
] | null | null | null | Funky Sentence Gen/Funky Sentence Generator.py | Software-Cat/Python-Mini-Projects | 3e8a150758eddfc2b21a5e8c665fd6eca850e55d | [
"MIT"
] | null | null | null | import random
adjectives = ["abandoned", "baffled", "cringy", "dazzling", "eccentric", "fancy", "generous", "happy", "ill", "jocose", "kind", "lazy", "magical", "naked",
"obstinate", "patriotic", "queasy", "raging", "savage", "talented", "unlucky", "vegetarian", "white", "xenophobic", "yawning", "zippy"]
... | 75.863636 | 166 | 0.615339 |
98f9e6e2736f68e5ba5898d7aba94a096b0231eb | 1,471 | py | Python | bloggitt/core/urls.py | SubhradeepSS/Bloggitt | fb9131765519e55a19164b2637ad9d4821dbac5e | [
"MIT"
] | 33 | 2020-11-22T11:25:11.000Z | 2022-01-06T20:05:14.000Z | bloggitt/core/urls.py | SubhradeepSS/Bloggitt | fb9131765519e55a19164b2637ad9d4821dbac5e | [
"MIT"
] | 72 | 2020-11-22T20:31:00.000Z | 2021-08-16T00:47:17.000Z | bloggitt/core/urls.py | SubhradeepSS/Bloggitt | fb9131765519e55a19164b2637ad9d4821dbac5e | [
"MIT"
] | 39 | 2020-11-22T17:57:06.000Z | 2021-05-31T05:13:26.000Z | from . import views
from django.urls import path
from .views import PostLikeToggle , PostLikeAPIToggle,ProfileUpdateView,ProfileView,PostUpdateView
urlpatterns = [
path('login/', views.loginUser, name='login'),
path('signup/', views.signup, name='signup'),
path('logout/', views.logoutUser, name='logout'),
... | 50.724138 | 98 | 0.687288 |
3e54c328cb59e4a6c5c0c47007d72bbd0e99b973 | 15,659 | py | Python | tests/test_overlap.py | opendatacube/odc-geo | 4f9004720d899dff4bf0b208e4fe602790d055d7 | [
"Apache-2.0"
] | 5 | 2021-12-22T01:32:24.000Z | 2022-03-10T07:50:34.000Z | tests/test_overlap.py | opendatacube/odc-geo | 4f9004720d899dff4bf0b208e4fe602790d055d7 | [
"Apache-2.0"
] | 29 | 2022-01-11T08:48:23.000Z | 2022-03-29T09:03:42.000Z | tests/test_overlap.py | opendatacube/odc-geo | 4f9004720d899dff4bf0b208e4fe602790d055d7 | [
"Apache-2.0"
] | 2 | 2022-01-26T23:20:34.000Z | 2022-03-21T16:54:00.000Z | # This file is part of the Open Data Cube, see https://opendatacube.org for more information
#
# Copyright (c) 2015-2020 ODC Contributors
# SPDX-License-Identifier: Apache-2.0
import math
from random import uniform
import numpy as np
import pytest
from affine import Affine
from odc.geo import CRS, geom, resyx_, wh_, ... | 32.154004 | 92 | 0.618494 |
f7e0bdf4dd0c4a996fd33c5a8938691ee792308f | 397 | py | Python | pcts_users/asgi.py | fga-eps-mds/2021.1-PCTs-Users | 627114bfe10e943a30dda0c54f4d57ba927d6cc1 | [
"MIT"
] | null | null | null | pcts_users/asgi.py | fga-eps-mds/2021.1-PCTs-Users | 627114bfe10e943a30dda0c54f4d57ba927d6cc1 | [
"MIT"
] | 9 | 2021-09-04T14:30:51.000Z | 2021-11-07T21:46:38.000Z | pcts_users/asgi.py | fga-eps-mds/2021.1-PCTs-Users | 627114bfe10e943a30dda0c54f4d57ba927d6cc1 | [
"MIT"
] | null | null | null | """
ASGI config for pcts_users project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SE... | 23.352941 | 78 | 0.788413 |
703954ba1d64e684839af55e869a1aaab4162322 | 432 | py | Python | Ex019.py | devwill77/Python | 585d6197ab561c9c8813fa87682b3ff4f141319e | [
"MIT"
] | null | null | null | Ex019.py | devwill77/Python | 585d6197ab561c9c8813fa87682b3ff4f141319e | [
"MIT"
] | null | null | null | Ex019.py | devwill77/Python | 585d6197ab561c9c8813fa87682b3ff4f141319e | [
"MIT"
] | null | null | null | '''
- DESAFIO 019
- Um professor quer sortear um dos seus quatro alunos para apagar o quadro.
Faça um programa que ajude ele , lendo o nome deles e escrevendo o nome do escolhido.
'''
from random import choice
a1 = str(input('Aluno 1: '))
a2 = str(input('Aluno 2: '))
a3 = str(input('Aluno 3: '))
a4 = str(input('Aluno 4... | 18.782609 | 85 | 0.668981 |
a7e0211905005a1d1d2975f1b8296e8ebbf0892c | 65,161 | py | Python | anchorecli/cli/utils.py | tehlingchu/anchore-cli | b0df36337f443749991a49263227c1d40989debb | [
"Apache-2.0"
] | 110 | 2017-09-14T02:15:15.000Z | 2022-03-30T20:14:21.000Z | anchorecli/cli/utils.py | tehlingchu/anchore-cli | b0df36337f443749991a49263227c1d40989debb | [
"Apache-2.0"
] | 115 | 2017-09-22T12:15:30.000Z | 2022-01-17T12:31:21.000Z | anchorecli/cli/utils.py | tehlingchu/anchore-cli | b0df36337f443749991a49263227c1d40989debb | [
"Apache-2.0"
] | 56 | 2017-09-22T11:26:25.000Z | 2022-03-03T14:14:58.000Z | import os
import re
import sys
import copy
import json
import yaml
import logging
import dateutil.parser
import textwrap
import base64
try:
from urllib.parse import quote_plus, unquote_plus
except ImportError:
from urllib import quote_plus, unquote_plus
from prettytable import PrettyTable, PLAIN_COLUMNS, ALL
... | 37.578431 | 118 | 0.449517 |
85baf3a534d283793d04761bbe1c93ea3351fcd4 | 13,516 | py | Python | tflearn/models/generator.py | AnshulBasia/tflearn | e6f1aa8c19f90cfb2d4b0b03133c434ee1dba376 | [
"MIT"
] | 1 | 2017-05-12T07:26:14.000Z | 2017-05-12T07:26:14.000Z | tflearn/models/generator.py | mathematiguy/tflearn | 095cf976f4a79ef5da8a970fec7ab533707c6c59 | [
"MIT"
] | null | null | null | tflearn/models/generator.py | mathematiguy/tflearn | 095cf976f4a79ef5da8a970fec7ab533707c6c59 | [
"MIT"
] | 1 | 2018-12-25T07:18:57.000Z | 2018-12-25T07:18:57.000Z | from __future__ import division, print_function, absolute_import
import sys
import numpy as np
import tensorflow as tf
from ..helpers.trainer import Trainer, evaluate as eval
from ..helpers.evaluator import Evaluator
from ..utils import feed_dict_builder, is_none
class SequenceGenerator(object):
""" Sequence Ge... | 39.752941 | 90 | 0.580423 |
a6ce11cbc3c2ea782fc3581c0d2c70d18a0d1f30 | 2,078 | py | Python | ip_generators.py | G4LD0R/spoofDos | c7302fb18aca6196f87c13d38b8f6559c5c4ef89 | [
"MIT"
] | null | null | null | ip_generators.py | G4LD0R/spoofDos | c7302fb18aca6196f87c13d38b8f6559c5c4ef89 | [
"MIT"
] | null | null | null | ip_generators.py | G4LD0R/spoofDos | c7302fb18aca6196f87c13d38b8f6559c5c4ef89 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
#-*- coding: utf-8 -*-
#ip_generators.py
from bs4 import BeautifulSoup
import requests
import random
import socket
import os, sys
import re
class generator:
def __cinit__(self):
self.data=None
#Generate to random ip addresses according to given sample ip address
def random_ip(self, ipaddre... | 21.42268 | 108 | 0.630414 |
c92811fe253586cdc3b5ec07843671845bb1a6c7 | 1,277 | py | Python | Proper/proper/examples/talbot.py | RupertDodkins/medis | bdb1f00fb93506da2a1f251bc6780e70e97a16c5 | [
"MIT"
] | 1 | 2021-06-25T17:35:56.000Z | 2021-06-25T17:35:56.000Z | Proper/proper/examples/talbot.py | RupertDodkins/medis | bdb1f00fb93506da2a1f251bc6780e70e97a16c5 | [
"MIT"
] | null | null | null | Proper/proper/examples/talbot.py | RupertDodkins/medis | bdb1f00fb93506da2a1f251bc6780e70e97a16c5 | [
"MIT"
] | 2 | 2018-12-08T15:05:13.000Z | 2019-08-08T17:28:24.000Z | # Copyright 2016, 2017 California Institute of Technology
# Users must agree to abide by the restrictions listed in the
# file "LegalStuff.txt" in the PROPER library directory.
#
# PROPER developed at Jet Propulsion Laboratory/California Inst. Technology
# Original IDL version by John Krist
# Python transla... | 32.74359 | 92 | 0.661707 |
79db95ba61c2e66c512d1f44e65dba6d1d783045 | 7,590 | py | Python | desdeo_tools/interaction/validators.py | aswinmurali-io/desdeo-tools | 86d4792ded3383f43658832d7f5dca69f236d61b | [
"MIT"
] | 1 | 2021-04-26T13:59:19.000Z | 2021-04-26T13:59:19.000Z | desdeo_tools/interaction/validators.py | aswinmurali-io/desdeo-tools | 86d4792ded3383f43658832d7f5dca69f236d61b | [
"MIT"
] | 13 | 2020-05-11T13:05:22.000Z | 2022-03-12T01:02:01.000Z | desdeo_tools/interaction/validators.py | aswinmurali-io/desdeo-tools | 86d4792ded3383f43658832d7f5dca69f236d61b | [
"MIT"
] | 9 | 2019-11-05T14:30:26.000Z | 2021-08-28T11:57:43.000Z | import pandas as pd
import numpy as np
class ValidationError(Exception):
"""Raised when an error related to the validation is encountered.
"""
def validate_ref_point_with_ideal_and_nadir(
dimensions_data: pd.DataFrame, reference_point: pd.DataFrame
):
validate_ref_point_dimensions(dimensions_data, r... | 46.564417 | 123 | 0.66166 |
40253dbb09ff601dee43edf16be33a3d5289bf8c | 511 | py | Python | bbs/migrations/0006_userprofile_friends.py | luo1fly/s10day12bbs | ae927f0f3d9f5a09863e06bf894ac53cac83a61f | [
"Apache-2.0"
] | null | null | null | bbs/migrations/0006_userprofile_friends.py | luo1fly/s10day12bbs | ae927f0f3d9f5a09863e06bf894ac53cac83a61f | [
"Apache-2.0"
] | null | null | null | bbs/migrations/0006_userprofile_friends.py | luo1fly/s10day12bbs | ae927f0f3d9f5a09863e06bf894ac53cac83a61f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.8 on 2016-08-04 06:30
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('bbs', '0005_auto_20160804_0405'),
]
operations = [
migrations.AddField(
... | 24.333333 | 111 | 0.637965 |
373b0547bc90a6e757715731adfb8c34c6b31bc4 | 175 | py | Python | Chapter02/musicterminal/pytify/auth/authorization.py | ariwells2001/Python-Programming-Blueprints | 23981ab304e65bcc24560393c75fd5ee85c96ce5 | [
"MIT"
] | 72 | 2017-12-19T09:19:40.000Z | 2021-11-08T13:13:34.000Z | Chapter02/musicterminal/pytify/auth/authorization.py | ariwells2001/Python-Programming-Blueprints | 23981ab304e65bcc24560393c75fd5ee85c96ce5 | [
"MIT"
] | 20 | 2018-03-21T01:15:27.000Z | 2021-09-08T00:59:40.000Z | Chapter02/musicterminal/pytify/auth/authorization.py | ariwells2001/Python-Programming-Blueprints | 23981ab304e65bcc24560393c75fd5ee85c96ce5 | [
"MIT"
] | 53 | 2017-12-19T09:19:42.000Z | 2022-03-06T02:21:10.000Z | from collections import namedtuple
Authorization = namedtuple('Authorization', [
'access_token',
'token_type',
'expires_in',
'scope',
'refresh_token',
]) | 17.5 | 45 | 0.668571 |
54895cac576ba3204649cfc456309d2fd8787518 | 2,139 | py | Python | setup.py | raghavven/molssi_bestpractices_2021 | e43bd7e269ed0f75f44107736bc5111fd5e21aaf | [
"BSD-3-Clause"
] | null | null | null | setup.py | raghavven/molssi_bestpractices_2021 | e43bd7e269ed0f75f44107736bc5111fd5e21aaf | [
"BSD-3-Clause"
] | null | null | null | setup.py | raghavven/molssi_bestpractices_2021 | e43bd7e269ed0f75f44107736bc5111fd5e21aaf | [
"BSD-3-Clause"
] | null | null | null | """
molecool
Visualization
"""
import sys
from setuptools import setup, find_packages
import versioneer
short_description = __doc__.split("\n")
# from https://github.com/pytest-dev/pytest-runner#conditional-requirement
needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv)
pytest_runner = ['pytest-runner'] i... | 35.65 | 118 | 0.69799 |
45f5a2edaf4165fd8feac8e72c172a520bfa0b33 | 384 | py | Python | 01.py | Shourov1702040/hpylearners_Python | aa13010318995af8088a60bff321950ce60c2a9b | [
"MIT"
] | 7 | 2021-10-02T06:46:35.000Z | 2022-02-11T01:13:28.000Z | 01.py | Mohadeb-Kumar/hpylearners_Python | 5f2d2b0a14a357a0a2538196586f34e721ee097f | [
"MIT"
] | null | null | null | 01.py | Mohadeb-Kumar/hpylearners_Python | 5f2d2b0a14a357a0a2538196586f34e721ee097f | [
"MIT"
] | 6 | 2021-05-11T20:06:23.000Z | 2022-02-14T23:31:14.000Z | # Python program to display the Fibonacci sequence
def recur_fibo(n):
if n <= 1:
return n
else:
return(recur_fibo(n-1) + recur_fibo(n-2))
nterms = 10
# check if the number of terms is valid
if nterms <= 0:
print("Plese enter a positive integer")
else:
print("Fibonacci sequence... | 20.210526 | 51 | 0.619792 |
d8d365543e6c683b47f2e8ae1e88a320b32c85e5 | 18,037 | py | Python | pyspeckit/spectrum/measurements.py | glangsto/pyspeckit | 346b24fb828d1d33c7891cdde7609723e51af34c | [
"MIT"
] | null | null | null | pyspeckit/spectrum/measurements.py | glangsto/pyspeckit | 346b24fb828d1d33c7891cdde7609723e51af34c | [
"MIT"
] | 1 | 2021-05-14T19:17:41.000Z | 2021-05-14T19:17:41.000Z | pyspeckit/spectrum/measurements.py | glangsto/pyspeckit | 346b24fb828d1d33c7891cdde7609723e51af34c | [
"MIT"
] | 1 | 2018-10-02T15:11:17.000Z | 2018-10-02T15:11:17.000Z | from __future__ import print_function
import numpy as np
from astropy.extern.six.moves import xrange
import itertools
from . import cosmology
from collections import OrderedDict
"""
To test:
import spectrum
spec = spectrum.Spectrum('sample_sdss.txt')
spec.plotter(xmin = 6400, xmax = 6800)
spec.specfit(guesses = [20, ... | 36.961066 | 118 | 0.550202 |
6169c77d05545f1f532003d1f71c2b3e32d7c56d | 1,145 | py | Python | polkadot_prometheus_exporter/_utils.py | w3f-community/polkadot-prometheus-exporter | b1ee5608572533a27a2aa6d9523a84a05249073c | [
"Apache-2.0"
] | 8 | 2019-06-10T08:38:56.000Z | 2021-04-16T17:52:54.000Z | polkadot_prometheus_exporter/_utils.py | w3f-community/polkadot-prometheus-exporter | b1ee5608572533a27a2aa6d9523a84a05249073c | [
"Apache-2.0"
] | null | null | null | polkadot_prometheus_exporter/_utils.py | w3f-community/polkadot-prometheus-exporter | b1ee5608572533a27a2aa6d9523a84a05249073c | [
"Apache-2.0"
] | 1 | 2021-03-03T18:23:38.000Z | 2021-03-03T18:23:38.000Z | # Copyright (C) 2019 MixBytes, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT... | 28.625 | 111 | 0.704803 |
400eb450484d415ed23eea86cc637a288cf7cd62 | 230 | py | Python | polymetis/polymetis/python/torchcontrol/utils/__init__.py | ali-senguel/fairo | 1ec5d8ecbdfc782de63a92aad9bf8534110ce762 | [
"MIT"
] | 669 | 2020-11-21T01:20:20.000Z | 2021-09-13T13:25:16.000Z | polymetis/polymetis/python/torchcontrol/utils/__init__.py | ali-senguel/fairo | 1ec5d8ecbdfc782de63a92aad9bf8534110ce762 | [
"MIT"
] | 324 | 2020-12-07T18:20:34.000Z | 2021-09-14T17:17:18.000Z | polymetis/polymetis/python/torchcontrol/utils/__init__.py | ali-senguel/fairo | 1ec5d8ecbdfc782de63a92aad9bf8534110ce762 | [
"MIT"
] | 56 | 2021-01-04T19:57:40.000Z | 2021-09-13T21:20:08.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from .tensor_utils import *
from .time_utils import *
| 32.857143 | 65 | 0.765217 |
d75c2df82fdb86d324a6ad0f066d09e8f491cbd9 | 1,509 | py | Python | tpdatasrc/co8infra/scr/Spell192 - Gentle Repose.py | edoipi/TemplePlus | f0e552289822fea908f16daa379fa568b1bd286d | [
"MIT"
] | 69 | 2015-05-05T14:09:25.000Z | 2022-02-15T06:13:04.000Z | tpdatasrc/co8infra/scr/Spell192 - Gentle Repose.py | edoipi/TemplePlus | f0e552289822fea908f16daa379fa568b1bd286d | [
"MIT"
] | 457 | 2015-05-01T22:07:45.000Z | 2022-03-31T02:19:10.000Z | tpdatasrc/co8infra/scr/Spell192 - Gentle Repose.py | edoipi/TemplePlus | f0e552289822fea908f16daa379fa568b1bd286d | [
"MIT"
] | 25 | 2016-02-04T21:19:53.000Z | 2021-11-15T23:14:51.000Z | from toee import *
def OnBeginSpellCast( spell ):
print "Gentle Repose OnBeginSpellCast"
print "spell.target_list=", spell.target_list
print "spell.caster=", spell.caster, " caster.level= ", spell.caster_level
game.particles( "sp-necromancy-conjure", spell.caster )
def OnSpellEffect( spell ):
print "Gentle Repos... | 32.106383 | 105 | 0.743539 |
d0d7a67d80a981d4a1937e5c8ed4c1243eb68765 | 40,245 | py | Python | ansible/roles/lib_openshift_3.2/library/oc_serviceaccount.py | rhdedgar/openshift-tools | 3c077d905688c3d4477bbd4ca48977b705f7e779 | [
"Apache-2.0"
] | null | null | null | ansible/roles/lib_openshift_3.2/library/oc_serviceaccount.py | rhdedgar/openshift-tools | 3c077d905688c3d4477bbd4ca48977b705f7e779 | [
"Apache-2.0"
] | 3 | 2016-12-01T23:01:36.000Z | 2016-12-02T00:16:48.000Z | ansible/roles/lib_openshift_3.2/library/oc_serviceaccount.py | rhdedgar/openshift-tools | 3c077d905688c3d4477bbd4ca48977b705f7e779 | [
"Apache-2.0"
] | 1 | 2018-01-30T05:44:59.000Z | 2018-01-30T05:44:59.000Z | #!/usr/bin/env python # pylint: disable=too-many-lines
# ___ ___ _ _ ___ ___ _ _____ ___ ___
# / __| __| \| | __| _ \ /_\_ _| __| \
# | (_ | _|| .` | _|| / / _ \| | | _|| |) |
# \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____
# | \ / _ \ | \| |/ _ \_ _| | __| \_ _|_ _|
# | |) | (_) ... | 32.960688 | 118 | 0.543422 |
db9c0e81e8be7893916f9a25f4259ff582cf47ba | 1,725 | py | Python | hashes/enigma_machine.py | sourcery-ai-bot/Python | f1444aca73068e0c55f60ec63b12c53b402e54dd | [
"MIT"
] | null | null | null | hashes/enigma_machine.py | sourcery-ai-bot/Python | f1444aca73068e0c55f60ec63b12c53b402e54dd | [
"MIT"
] | null | null | null | hashes/enigma_machine.py | sourcery-ai-bot/Python | f1444aca73068e0c55f60ec63b12c53b402e54dd | [
"MIT"
] | null | null | null | alphabets = [chr(i) for i in range(32, 126)]
gear_one = [i for i in range(len(alphabets))]
gear_two = [i for i in range(len(alphabets))]
gear_three = [i for i in range(len(alphabets))]
reflector = [i for i in reversed(range(len(alphabets)))]
code = []
gear_one_pos = gear_two_pos = gear_three_pos = 0
def rotator():
... | 28.278689 | 80 | 0.615652 |
fc97eefbe4c3977895035b4f16235ebc3369fe71 | 3,953 | py | Python | awacs/dms.py | michael-k/awacs | ed3dc822d268f10b0cd83feb90fd279277e54ed4 | [
"BSD-2-Clause"
] | 358 | 2015-01-01T05:11:05.000Z | 2022-03-20T14:11:39.000Z | awacs/dms.py | cloudtools/awacs | f66550a812073f4e3ebd545279a5a1e6856cf39d | [
"BSD-2-Clause"
] | 171 | 2015-01-17T00:32:48.000Z | 2022-03-28T02:02:57.000Z | awacs/dms.py | michael-k/awacs | ed3dc822d268f10b0cd83feb90fd279277e54ed4 | [
"BSD-2-Clause"
] | 100 | 2015-01-04T16:34:34.000Z | 2022-02-21T06:17:17.000Z | # Copyright (c) 2012-2021, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
from .aws import Action as BaseAction
from .aws import BaseARN
service_name = "AWS Database Migration Service"
prefix = "dms"
class Action(BaseAction):
def __init__(self, action: str = None) -> Non... | 46.505882 | 88 | 0.835568 |
42825043ccd94812fab101d89114fc62554fbf22 | 13,660 | py | Python | coherence/backends/lolcats_storage.py | crass/coherence | d1cf150f5fa4a4bd75c7ec682ef2a2783ccf50ca | [
"MIT"
] | null | null | null | coherence/backends/lolcats_storage.py | crass/coherence | d1cf150f5fa4a4bd75c7ec682ef2a2783ccf50ca | [
"MIT"
] | null | null | null | coherence/backends/lolcats_storage.py | crass/coherence | d1cf150f5fa4a4bd75c7ec682ef2a2783ccf50ca | [
"MIT"
] | 1 | 2019-09-18T05:33:39.000Z | 2019-09-18T05:33:39.000Z | # -*- coding: utf-8 -*-
# Licensed under the MIT license
# http://opensource.org/licenses/mit-license.php
# Copyright 2008, Benjamin Kampmann <ben.kampmann@googlemail.com>
"""
This is a Media Backend that allows you to access the cool and cute pictures
from lolcats.com. This is mainly meant as a Sample Media Backend... | 39.94152 | 146 | 0.658199 |
91bb65fbfc70390417fc8db21c253c4b9f4a0765 | 821 | py | Python | client/verta/verta/_swagger/_public/artifactstore/model/ArtifactstoreStoreArtifactWithStreamResponse.py | stefan-petrov-toptal/modeldb | a8a9b9da6ed964c91351230b2f0d2703c75794de | [
"Apache-2.0"
] | 835 | 2017-02-08T20:14:24.000Z | 2020-03-12T17:37:49.000Z | client/verta/verta/_swagger/_public/artifactstore/model/ArtifactstoreStoreArtifactWithStreamResponse.py | stefan-petrov-toptal/modeldb | a8a9b9da6ed964c91351230b2f0d2703c75794de | [
"Apache-2.0"
] | 651 | 2019-04-18T12:55:07.000Z | 2022-03-31T23:45:09.000Z | client/verta/verta/_swagger/_public/artifactstore/model/ArtifactstoreStoreArtifactWithStreamResponse.py | stefan-petrov-toptal/modeldb | a8a9b9da6ed964c91351230b2f0d2703c75794de | [
"Apache-2.0"
] | 170 | 2017-02-13T14:49:22.000Z | 2020-02-19T17:59:12.000Z | # THIS FILE IS AUTO-GENERATED. DO NOT EDIT
from verta._swagger.base_type import BaseType
class ArtifactstoreStoreArtifactWithStreamResponse(BaseType):
def __init__(self, cloud_file_key=None, cloud_file_path=None):
required = {
"cloud_file_key": False,
"cloud_file_path": False,
}
self.cloud_fi... | 27.366667 | 64 | 0.686967 |
0ff6e7bb30fc0f6021605e9cb3d2bc5aae0259d6 | 7,604 | py | Python | python-real-time-application/feature_extractor.py | italogsfernandes/emg-moviments-classifier | 7a58f162fa6c5bc1a2906c539dac3e0210115522 | [
"MIT"
] | 2 | 2018-12-16T16:48:17.000Z | 2019-02-09T15:03:30.000Z | python-real-time-application/feature_extractor.py | italogsfernandes/emg-moviments-classifier | 7a58f162fa6c5bc1a2906c539dac3e0210115522 | [
"MIT"
] | 3 | 2018-05-16T20:12:15.000Z | 2018-05-16T20:12:57.000Z | python-real-time-application/feature_extractor.py | italogsfernandes/emg-moviments-classifier | 7a58f162fa6c5bc1a2906c539dac3e0210115522 | [
"MIT"
] | 1 | 2019-01-17T15:23:33.000Z | 2019-01-17T15:23:33.000Z | # codded as pressas por @italogsfernandes 13 de dezembro as 5:53 da manhã
# escutando:
# The Spinners - The Rubberband Man,
# The staple singers - Chica Boom
# None of us are free - Solomon Burke
# Logo depois de uma playlist de Sweatting bullets
# Detailled Description:
# RMS:
# sqrt(mean(square(vetor)))
# ... | 29.937008 | 95 | 0.600605 |
c34cefc0ae9538174866b5c17604ba2b30139f05 | 4,568 | py | Python | hb/build/build.py | openharmony-sig-ci/build_lite | 833511a697ab640c444055c279822e16b6cbde5f | [
"Apache-2.0"
] | null | null | null | hb/build/build.py | openharmony-sig-ci/build_lite | 833511a697ab640c444055c279822e16b6cbde5f | [
"Apache-2.0"
] | null | null | null | hb/build/build.py | openharmony-sig-ci/build_lite | 833511a697ab640c444055c279822e16b6cbde5f | [
"Apache-2.0"
] | 1 | 2021-09-13T11:57:24.000Z | 2021-09-13T11:57:24.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2020 Huawei Device Co., 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
... | 40.070175 | 79 | 0.610333 |
ccddcdfbf9225f776f44934ac11a429110c00f58 | 467 | py | Python | backend/api/models/icbc_upload_date.py | kuanfan99/zeva | 57b506a108fe57438506569d5503c90c52216b2f | [
"Apache-2.0"
] | 3 | 2020-03-25T03:06:20.000Z | 2021-01-20T23:36:03.000Z | backend/api/models/icbc_upload_date.py | kuanfan99/zeva | 57b506a108fe57438506569d5503c90c52216b2f | [
"Apache-2.0"
] | 740 | 2019-12-16T15:53:39.000Z | 2022-03-26T08:25:10.000Z | backend/api/models/icbc_upload_date.py | kuanfan99/zeva | 57b506a108fe57438506569d5503c90c52216b2f | [
"Apache-2.0"
] | 11 | 2019-11-28T20:39:15.000Z | 2022-01-31T17:53:31.000Z | from django.db import models
from auditable.models import Auditable
class IcbcUploadDate(Auditable):
upload_date = models.DateField(
blank=False,
db_comment="the date the icbc data is current to",
null=False,
auto_now=False)
class Meta:
db_table = 'icbc_upload_date'
... | 29.1875 | 79 | 0.691649 |
cce9ca9cf6bdcc43e18b16cd370236fc3b15c484 | 5,250 | py | Python | moldynquick/namd.py | akey7/moldynquick | 1cfe78f331a47ff6a31226dc8f3cf8f30bc694c4 | [
"MIT"
] | null | null | null | moldynquick/namd.py | akey7/moldynquick | 1cfe78f331a47ff6a31226dc8f3cf8f30bc694c4 | [
"MIT"
] | 8 | 2020-04-01T03:25:28.000Z | 2020-04-21T23:14:34.000Z | moldynquick/namd.py | akey7/moldynquick | 1cfe78f331a47ff6a31226dc8f3cf8f30bc694c4 | [
"MIT"
] | null | null | null | """
This module extracts data from NAMD formatted files
"""
from typing import List, Dict, Any
import pandas as pd
import MDAnalysis as mda
from MDAnalysis.analysis import align, rms
import numpy as np
class NAMDLog:
"""
This class extracts data from a NAMD log file.
"""
def __init__(self, log_filen... | 31.437126 | 103 | 0.532 |
3e1974a913d437c7d8b3fda1354ab5d72f763074 | 40,277 | py | Python | auth-api/src/auth_api/services/org.py | mengdong19/sbc-auth | 66fbd94a79d6de18102d3db29743ffeab89ea161 | [
"Apache-2.0"
] | null | null | null | auth-api/src/auth_api/services/org.py | mengdong19/sbc-auth | 66fbd94a79d6de18102d3db29743ffeab89ea161 | [
"Apache-2.0"
] | null | null | null | auth-api/src/auth_api/services/org.py | mengdong19/sbc-auth | 66fbd94a79d6de18102d3db29743ffeab89ea161 | [
"Apache-2.0"
] | 1 | 2019-07-25T18:20:41.000Z | 2019-07-25T18:20:41.000Z | # Copyright © 2019 Province of British Columbia
#
# 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 agr... | 46.563006 | 120 | 0.66708 |
2c18a86fc7c2e479b6b9e067dd868cbd770aa1fc | 9,985 | py | Python | app/geobox/lib/context.py | omniscale/gbi-client | c8af68ede195150b2aca0516ac8e030fe4ba1f6d | [
"Apache-2.0"
] | 2 | 2018-10-24T06:32:42.000Z | 2021-01-20T02:25:05.000Z | app/geobox/lib/context.py | omniscale/gbi-client | c8af68ede195150b2aca0516ac8e030fe4ba1f6d | [
"Apache-2.0"
] | null | null | null | app/geobox/lib/context.py | omniscale/gbi-client | c8af68ede195150b2aca0516ac8e030fe4ba1f6d | [
"Apache-2.0"
] | 17 | 2018-10-24T06:32:45.000Z | 2022-02-09T13:10:54.000Z | # This file is part of the GBI project.
# Copyright (C) 2012 Omniscale GmbH & Co. KG <http://omniscale.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/licens... | 32.313916 | 116 | 0.658988 |
ae4e65b50588649a40260a74e43166822822e6ad | 4,398 | py | Python | src/lr-mnist.py | kah109xq/MalteHBy | f7761c1c8ed31a2501612302bc1fd80ca14b2d22 | [
"MIT"
] | 1 | 2021-02-07T17:44:11.000Z | 2021-02-07T17:44:11.000Z | src/lr-mnist.py | MalteHB/visual_analytics_cds | e1f569e41260eecd8b460c43ee5d27952cd0fd7c | [
"MIT"
] | null | null | null | src/lr-mnist.py | MalteHB/visual_analytics_cds | e1f569e41260eecd8b460c43ee5d27952cd0fd7c | [
"MIT"
] | null | null | null |
import argparse
from utils.utils import fetch_mnist
import numpy as np
# Import sklearn
from sklearn import metrics
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LogisticRegression
def main(args):
print("Initiating some awesome logistic regression classification!")
... | 29.516779 | 100 | 0.510687 |
c0acacf94130e4c154fb991f218261717dac2497 | 7,420 | py | Python | tests/test_regression.py | ogrisel/viztracer | 4815724081b0dcb6416775962c9eb4638dc577be | [
"Apache-2.0"
] | null | null | null | tests/test_regression.py | ogrisel/viztracer | 4815724081b0dcb6416775962c9eb4638dc577be | [
"Apache-2.0"
] | null | null | null | tests/test_regression.py | ogrisel/viztracer | 4815724081b0dcb6416775962c9eb4638dc577be | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://github.com/gaogaotiantian/viztracer/blob/master/NOTICE.txt
import multiprocessing
import os
import subprocess
import sys
import tempfile
import time
import viztracer
from viztracer import VizTracer, ignore_function... | 27.179487 | 110 | 0.5969 |
46bc8661df8cc14506220a61bef680975b106f21 | 388 | py | Python | apps/brew/management/commands/ingredients/style.py | martync/zython | e008bbb33e212f0856e85b8594003402e0a635c0 | [
"Beerware"
] | null | null | null | apps/brew/management/commands/ingredients/style.py | martync/zython | e008bbb33e212f0856e85b8594003402e0a635c0 | [
"Beerware"
] | 5 | 2020-06-05T21:26:16.000Z | 2022-01-13T01:21:27.000Z | apps/brew/management/commands/ingredients/style.py | martync/zython | e008bbb33e212f0856e85b8594003402e0a635c0 | [
"Beerware"
] | null | null | null | from django.conf import settings
from brew.models import BeerStyle
from brew.helpers import xml_import
from brew.beer_xml import STYLE_FIELDS
def do_import():
xml_file = "%sapps/brew/fixtures/Style.xml" % settings.ROOT_PROJECT
model_class = BeerStyle
parent_loop = "STYLES"
item_loop = "STYLE"
xml_i... | 29.846154 | 75 | 0.770619 |
18538acaddea2930045c5afa0b134e385ffcd14d | 1,779 | py | Python | TraFlow/utils/loger.py | Herding/SeeST | 6a0a9fea2e0abe91bc30785f769eefb1ccba07b3 | [
"MIT"
] | null | null | null | TraFlow/utils/loger.py | Herding/SeeST | 6a0a9fea2e0abe91bc30785f769eefb1ccba07b3 | [
"MIT"
] | null | null | null | TraFlow/utils/loger.py | Herding/SeeST | 6a0a9fea2e0abe91bc30785f769eefb1ccba07b3 | [
"MIT"
] | null | null | null | """日志相关操作
"""
import logging
# https://www.cnblogs.com/qianyuliang/p/7234217.html
LEVER = {
'DEBUG': logging.DEBUG,
'INFO': logging.INFO,
'WARNING': logging.WARNING,
'ERROR': logging.ERROR,
'CRITICAL': logging.CRITICAL
}
class Loger():
"""日志管理
Attributes:
_loger: 生成可管理日志的对象
"... | 26.954545 | 98 | 0.555368 |
ba3b2a49b109f1892d3b47eb767aaca6c47bb2cb | 7,680 | py | Python | nova/tests/unit/virt/libvirt/fake_imagebackend.py | cloud-zuiwanyuan/nova | 0b59a2d9dc22e4fb172810019dba5ece09bb4526 | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/virt/libvirt/fake_imagebackend.py | cloud-zuiwanyuan/nova | 0b59a2d9dc22e4fb172810019dba5ece09bb4526 | [
"Apache-2.0"
] | 1 | 2016-04-04T18:41:59.000Z | 2016-04-04T18:41:59.000Z | nova/tests/unit/virt/libvirt/fake_imagebackend.py | cloud-zuiwanyuan/nova | 0b59a2d9dc22e4fb172810019dba5ece09bb4526 | [
"Apache-2.0"
] | 2 | 2015-12-04T23:51:46.000Z | 2016-06-07T20:01:59.000Z | # Copyright 2012 Grid Dynamics
# 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... | 42.197802 | 79 | 0.649479 |
621e1201cc22d3d2426938ede9040621af195228 | 426 | py | Python | env/Lib/site-packages/plotly/validators/choroplethmapbox/_showscale.py | andresgreen-byte/Laboratorio-1--Inversion-de-Capital | 8a4707301d19c3826c31026c4077930bcd6a8182 | [
"MIT"
] | 11,750 | 2015-10-12T07:03:39.000Z | 2022-03-31T20:43:15.000Z | venv/Lib/site-packages/plotly/validators/choroplethmapbox/_showscale.py | wakisalvador/constructed-misdirection | 74779e9ec640a11bc08d5d1967c85ac4fa44ea5e | [
"Unlicense"
] | 2,951 | 2015-10-12T00:41:25.000Z | 2022-03-31T22:19:26.000Z | venv/Lib/site-packages/plotly/validators/choroplethmapbox/_showscale.py | wakisalvador/constructed-misdirection | 74779e9ec640a11bc08d5d1967c85ac4fa44ea5e | [
"Unlicense"
] | 2,623 | 2015-10-15T14:40:27.000Z | 2022-03-28T16:05:50.000Z | import _plotly_utils.basevalidators
class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(
self, plotly_name="showscale", parent_name="choroplethmapbox", **kwargs
):
super(ShowscaleValidator, self).__init__(
plotly_name=plotly_name,
paren... | 30.428571 | 79 | 0.664319 |
c70131190d386bb470e376512237454dc57ad9b4 | 739 | py | Python | events/api/urls.py | dynamicguy/treeio | 4f674898cff2331711639a9b5f6812c874a2cb25 | [
"MIT"
] | 2 | 2019-02-22T16:02:19.000Z | 2019-02-23T19:27:34.000Z | events/api/urls.py | dewmal/treeio | 6299fbe7826800d576f7ab68b4c1996b7194540f | [
"MIT"
] | null | null | null | events/api/urls.py | dewmal/treeio | 6299fbe7826800d576f7ab68b4c1996b7194540f | [
"MIT"
] | 1 | 2019-02-03T03:54:06.000Z | 2019-02-03T03:54:06.000Z | # encoding: utf-8
# Copyright 2011 Tree.io Limited
# This file is part of Treeio.
# License www.tree.io/license
#-*- coding: utf-8 -*-
import handlers
from django.conf.urls.defaults import *
from treeio.core.api.auth import auth_engine
from treeio.core.api.doc import documentation_view
from treeio.core.api.resource i... | 27.37037 | 90 | 0.737483 |
81f14fd292ee4ff20b53492f12715ee5b681c8b5 | 308 | py | Python | xchainpy/xchainpy_thorchain/xchainpy_thorchain/cosmos/message.py | SLjavad/xchainpy-lib | e79b1fd341adaf9267964f3368500dd48de60917 | [
"MIT"
] | 8 | 2021-02-16T23:14:14.000Z | 2022-03-22T09:35:58.000Z | xchainpy/xchainpy_thorchain/xchainpy_thorchain/cosmos/message.py | SLjavad/xchainpy-lib | e79b1fd341adaf9267964f3368500dd48de60917 | [
"MIT"
] | 12 | 2021-04-06T19:31:46.000Z | 2022-03-22T14:34:13.000Z | xchainpy/xchainpy_thorchain/xchainpy_thorchain/cosmos/message.py | SLjavad/xchainpy-lib | e79b1fd341adaf9267964f3368500dd48de60917 | [
"MIT"
] | 10 | 2021-03-04T05:45:31.000Z | 2022-03-31T14:44:01.000Z | from typing import List
from .models.MsgCoin import MsgCoin
from .models.MsgNativeTx import MsgNativeTx
def msg_native_tx_from_json(coins : List[MsgCoin] , memo : str , signer : str) -> MsgNativeTx :
# return MsgNativeTx(coins , memo , frombech32(signer))
return MsgNativeTx(coins , memo , signer)
| 34.222222 | 95 | 0.75 |
ed17df3bebf6688c1bbef92e9ecacebd3a38d332 | 6,412 | py | Python | collection/collect2.py | aytimothy/3804ict-fandoms-connect | 412e320030d62753ccffbaa82e71468e7b98d0ae | [
"MIT"
] | null | null | null | collection/collect2.py | aytimothy/3804ict-fandoms-connect | 412e320030d62753ccffbaa82e71468e7b98d0ae | [
"MIT"
] | null | null | null | collection/collect2.py | aytimothy/3804ict-fandoms-connect | 412e320030d62753ccffbaa82e71468e7b98d0ae | [
"MIT"
] | null | null | null | # Import Configuration Variables (See config.py)
from config import *
# Import Libraries
import datetime
import mysql.connector
import praw
from praw.models import MoreComments
import pytz
import time
import traceback
import sys
'''
Basics of what it does:
1. Read existing data and work out who to start with.
2. Dow... | 36.022472 | 230 | 0.627417 |
76c6d8e74fd7165ce56b262fab9e33b085f80965 | 2,365 | py | Python | solvebio/contrib/dash/tests/utils.py | PolinaBevad/solvebio-python | f6c736baa01b5a868a385cb0baf8f9dc2007cec3 | [
"MIT"
] | 14 | 2015-01-07T15:31:00.000Z | 2021-11-02T10:03:28.000Z | solvebio/contrib/dash/tests/utils.py | PolinaBevad/solvebio-python | f6c736baa01b5a868a385cb0baf8f9dc2007cec3 | [
"MIT"
] | 200 | 2015-01-26T17:12:21.000Z | 2022-01-14T08:59:30.000Z | solvebio/contrib/dash/tests/utils.py | PolinaBevad/solvebio-python | f6c736baa01b5a868a385cb0baf8f9dc2007cec3 | [
"MIT"
] | 9 | 2015-02-18T22:49:28.000Z | 2020-09-01T17:48:35.000Z | import time
TIMEOUT = 20 # Seconds
def clean_history(driver, domains):
temp = driver.get_location()
for domain in domains:
driver.open(domain)
driver.delete_all_visible_cookies()
driver.open(temp)
def invincible(func):
def wrap():
try:
return func()
exc... | 29.197531 | 78 | 0.640592 |
d99ba822561f5aeffc6903b0a7a381c266526d24 | 867 | py | Python | setup.py | drizzi-novalabs/avatar2 | 503e94c61224e1c1619c97f544a205fd51e57afb | [
"Apache-2.0"
] | null | null | null | setup.py | drizzi-novalabs/avatar2 | 503e94c61224e1c1619c97f544a205fd51e57afb | [
"Apache-2.0"
] | null | null | null | setup.py | drizzi-novalabs/avatar2 | 503e94c61224e1c1619c97f544a205fd51e57afb | [
"Apache-2.0"
] | null | null | null | from setuptools import setup
from sys import version_info
setup(
name='avatar2',
version='1.2.2',
packages=['avatar2',
'avatar2/archs',
'avatar2/targets',
'avatar2/protocols',
'avatar2/peripherals',
'avatar2/plugins',
'ava... | 24.771429 | 65 | 0.534025 |
37488a8e4993edd72d3c72e28e63b69986c5cf7c | 39,398 | py | Python | pandas/core/groupby/ops.py | Digres45/pandas | 3aa2f3556a42371cf0fe0f102ab33226b0a5b7ab | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/core/groupby/ops.py | Digres45/pandas | 3aa2f3556a42371cf0fe0f102ab33226b0a5b7ab | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/core/groupby/ops.py | Digres45/pandas | 3aa2f3556a42371cf0fe0f102ab33226b0a5b7ab | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | """
Provide classes to perform the groupby aggregate operations.
These are not exposed to the user and provide implementations of the grouping
operations, primarily in cython. These classes (BaseGrouper and BinGrouper)
are contained *in* the SeriesGroupBy and DataFrameGroupBy objects.
"""
from __future__ import annota... | 31.2187 | 88 | 0.588532 |
fbceb01f7ef2b0c2b67ffdf02f48066e8e078922 | 7,055 | py | Python | sdg/schemas/SchemaInputBase.py | Defra-Data-Science-Centre-of-Excellence/sdg-build | 716a7597e5cb7de248915b21fa1a9e4a5cd1e0e0 | [
"MIT"
] | 7 | 2019-02-25T03:50:17.000Z | 2022-03-31T12:58:42.000Z | sdg/schemas/SchemaInputBase.py | Defra-Data-Science-Centre-of-Excellence/sdg-build | 716a7597e5cb7de248915b21fa1a9e4a5cd1e0e0 | [
"MIT"
] | 185 | 2019-01-14T15:35:53.000Z | 2022-03-28T19:16:37.000Z | sdg/schemas/SchemaInputBase.py | Defra-Data-Science-Centre-of-Excellence/sdg-build | 716a7597e5cb7de248915b21fa1a9e4a5cd1e0e0 | [
"MIT"
] | 18 | 2019-01-14T11:20:05.000Z | 2022-02-08T14:10:17.000Z | # -*- coding: utf-8 -*-
import os
import json
import jsonschema
from sdg import check_csv
from sdg.Loggable import Loggable
class SchemaInputBase(Loggable):
"""A base class for importing a schema, querying it, and validating with it.
This class assumes imported schema (self.schema) are valid JSON Schema."""
... | 30.673913 | 98 | 0.568816 |
8b39ed9e4cfe4d86b1e16224e4e55b1820c54173 | 888 | py | Python | bookchook/forms.py | tombasche/BookChook | 2b1b28c0156754da75e100e2f4ba9ada7b8be31d | [
"MIT"
] | 7 | 2017-12-12T08:33:05.000Z | 2019-07-29T14:14:53.000Z | bookchook/forms.py | tombasche/BookChook | 2b1b28c0156754da75e100e2f4ba9ada7b8be31d | [
"MIT"
] | 20 | 2016-10-16T03:43:15.000Z | 2018-10-29T00:14:23.000Z | bookchook/forms.py | tombasche/BookChook | 2b1b28c0156754da75e100e2f4ba9ada7b8be31d | [
"MIT"
] | 1 | 2018-10-23T04:06:59.000Z | 2018-10-23T04:06:59.000Z | from django import forms
from django.contrib.auth.models import User
from .models import Book, Series
from taggit.forms import *
class BookForm(forms.ModelForm):
class Meta:
model = Book
fields = ('name', 'author', 'number', 'series', 'location', 'comment')
widgets = {
'series' ... | 28.645161 | 140 | 0.61036 |
1f1337f7df33adfddbde2a50c6ac19e05b1e95a6 | 16,027 | py | Python | rb/cluster.py | commonlims/rb | e9ab7769760d05f1c9bbd2c983f94a22f52aa225 | [
"Apache-2.0"
] | null | null | null | rb/cluster.py | commonlims/rb | e9ab7769760d05f1c9bbd2c983f94a22f52aa225 | [
"Apache-2.0"
] | null | null | null | rb/cluster.py | commonlims/rb | e9ab7769760d05f1c9bbd2c983f94a22f52aa225 | [
"Apache-2.0"
] | null | null | null | from redis.client import Script
from redis.connection import ConnectionPool, UnixDomainSocketConnection
try:
from redis.connection import SSLConnection
except ImportError:
SSLConnection = None
import functools
from hashlib import sha1
from threading import Lock
from rb.router import PartitionRouter
from rb.cl... | 40.370277 | 116 | 0.564173 |
ac87290eec352e4f3b5b73f3da2d2d0d66946331 | 6,875 | py | Python | tests/test_http.py | polyfemos/atavism | d5c7cbb2d861ac800bbf19f7a1504cf966f0deef | [
"Unlicense"
] | null | null | null | tests/test_http.py | polyfemos/atavism | d5c7cbb2d861ac800bbf19f7a1504cf966f0deef | [
"Unlicense"
] | null | null | null | tests/test_http.py | polyfemos/atavism | d5c7cbb2d861ac800bbf19f7a1504cf966f0deef | [
"Unlicense"
] | 1 | 2022-02-01T10:26:45.000Z | 2022-02-01T10:26:45.000Z | import os
import unittest
from atavism.http11.client import HttpClient
from atavism.http11.content import Content, FileContent
from atavism.http11.headers import Headers
from atavism.http11.objects import HttpRequest
class TestHeaders(unittest.TestCase):
def test_001_creation(self):
hb = Headers()
... | 35.807292 | 101 | 0.588509 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.