hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ab4ace0c2b97881f932cbc8b88995787a69fd50f | 2,764 | py | Python | paddlevideo/loader/dataset/skeleton.py | shinichiye/PaddleVideo | e740cb816e31198bdaaa49b24939f52649b4248d | [
"Apache-2.0"
] | null | null | null | paddlevideo/loader/dataset/skeleton.py | shinichiye/PaddleVideo | e740cb816e31198bdaaa49b24939f52649b4248d | [
"Apache-2.0"
] | null | null | null | paddlevideo/loader/dataset/skeleton.py | shinichiye/PaddleVideo | e740cb816e31198bdaaa49b24939f52649b4248d | [
"Apache-2.0"
] | null | null | null | # copyright (c) 2021 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 required by applica... | 37.351351 | 90 | 0.663893 |
c4d44498b714d3157e2d401443f23d3d3777c4d8 | 680 | py | Python | helpful-stuff/shared/general-setup.py | LokotamaTheMastermind/useful-python-scripts | cc5e17d1b0ec57354ccf773fd4c55de3b5f7c461 | [
"MIT"
] | 1 | 2020-08-27T15:30:01.000Z | 2020-08-27T15:30:01.000Z | helpful-stuff/shared/general-setup.py | LokotamaTheMastermind/useful-python-scripts | cc5e17d1b0ec57354ccf773fd4c55de3b5f7c461 | [
"MIT"
] | 2 | 2020-08-27T15:25:16.000Z | 2020-08-28T08:52:43.000Z | helpful-stuff/shared/general-setup.py | LokotamaTheMastermind/useful-python-scripts | cc5e17d1b0ec57354ccf773fd4c55de3b5f7c461 | [
"MIT"
] | null | null | null | def main():
import platform
import os
print("Setting up shortcuts")
op = platform.system()
if op == "Windows":
os.system("doskey developer-search = python ../cmd-developer-search.py")
elif op == "Linux" or op == "Darwin":
""" Help wanted: Don't have / understand a Linux or MAC s... | 21.935484 | 98 | 0.601471 |
14d83fb3c81b819c6ae0453770de05373e487933 | 870 | py | Python | Modules/Scripted/EditorLib/__init__.py | forfullstack/slicersources-src | 91bcecf037a27f3fad4c0ab57e8286fc258bb0f5 | [
"Apache-2.0"
] | null | null | null | Modules/Scripted/EditorLib/__init__.py | forfullstack/slicersources-src | 91bcecf037a27f3fad4c0ab57e8286fc258bb0f5 | [
"Apache-2.0"
] | null | null | null | Modules/Scripted/EditorLib/__init__.py | forfullstack/slicersources-src | 91bcecf037a27f3fad4c0ab57e8286fc258bb0f5 | [
"Apache-2.0"
] | null | null | null |
import os
ICON_DIR = os.path.dirname(os.path.realpath(__file__)) + '/Resources/Icons/'
del os
from .ColorBox import ColorBox
from .EditUtil import EditUtil, UndoRedo
from .EditBox import EditBox
from .EditColor import EditColor
from .EditOptions import HelpButton, EditOptions
from .HelperBox import HelperBox
# Built... | 22.894737 | 80 | 0.736782 |
deea0d5fffa9fd9c2944334dd52971feaef3da25 | 527 | py | Python | detect-secrets-plugin/custom-secrete-plugin.py | yangsun0/lcodej-pre-commit | 669f691d0ddb62544b8417356e37927945fe8da3 | [
"MIT"
] | null | null | null | detect-secrets-plugin/custom-secrete-plugin.py | yangsun0/lcodej-pre-commit | 669f691d0ddb62544b8417356e37927945fe8da3 | [
"MIT"
] | null | null | null | detect-secrets-plugin/custom-secrete-plugin.py | yangsun0/lcodej-pre-commit | 669f691d0ddb62544b8417356e37927945fe8da3 | [
"MIT"
] | null | null | null | import re
from detect_secrets.plugins.base import classproperty
from detect_secrets.plugins.base import RegexBasedDetector
class CustomSecreteDetector(RegexBasedDetector):
"""Scans for custom secretes."""
secret_type = 'Custom Secrete'
@classproperty
def disable_flag_text(self):
return 'no-c... | 22.913043 | 58 | 0.650854 |
fe2defb0db906841fe8e6779eed3e8533959be69 | 459 | py | Python | data/scripts/templates/object/static/structure/naboo/shared_arch_bronze_naboo_theed.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_arch_bronze_naboo_theed.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/static/structure/naboo/shared_arch_bronze_naboo_theed.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_arch_bronze_naboo_theed.iff"
result.attribute_te... | 27 | 85 | 0.732026 |
fea40465033407d4ba496bc6e58ede3784357ec0 | 3,155 | py | Python | tests/test_lldp.py | GarrickHe/sonic-mgmt | 74c2ac63ad948227ac90d7ab89205cff08cc9833 | [
"Apache-2.0"
] | null | null | null | tests/test_lldp.py | GarrickHe/sonic-mgmt | 74c2ac63ad948227ac90d7ab89205cff08cc9833 | [
"Apache-2.0"
] | 11 | 2019-07-10T16:27:32.000Z | 2019-09-10T15:56:48.000Z | tests/test_lldp.py | GarrickHe/sonic-mgmt | 74c2ac63ad948227ac90d7ab89205cff08cc9833 | [
"Apache-2.0"
] | null | null | null | from ansible_host import AnsibleHost
def test_lldp(localhost, ansible_adhoc, testbed):
""" verify the LLDP message on DUT """
hostname = testbed['dut']
ans_host = AnsibleHost(ansible_adhoc, hostname)
mg_facts = ans_host.minigraph_facts(host=hostname)['ansible_facts']
lldp_facts = ans_host.lldp(... | 50.079365 | 134 | 0.680824 |
1c53e28a010aa8b826a82956e98b50309da8f1c6 | 64 | py | Python | flask-appointment-calendar/fbone/api/__init__.py | codyhan94/PMA-scheduler | 0984ea1350145b793e0932efd3869251069e681e | [
"MIT"
] | 1 | 2019-11-04T04:48:31.000Z | 2019-11-04T04:48:31.000Z | fbone/api/__init__.py | rams502/flask-appointment-calendar | 381012fa1c6a736e54505b44f06bca4dab4b3df6 | [
"BSD-3-Clause"
] | null | null | null | fbone/api/__init__.py | rams502/flask-appointment-calendar | 381012fa1c6a736e54505b44f06bca4dab4b3df6 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from .views import api # NOQA
| 16 | 38 | 0.5 |
fa88d0bd6d506e71c8cd90ec33ac5a7dd548a04a | 2,082 | py | Python | sources/en/i/inadequatetrans.py | Nyadist/lightnovel-crawler | 8a19b5bdddde2ace1a919abcc51143c450cf32d0 | [
"Apache-2.0"
] | 20 | 2018-02-09T07:13:49.000Z | 2018-10-31T00:15:53.000Z | sources/en/i/inadequatetrans.py | Nyadist/lightnovel-crawler | 8a19b5bdddde2ace1a919abcc51143c450cf32d0 | [
"Apache-2.0"
] | 21 | 2018-03-22T10:40:45.000Z | 2018-11-10T13:44:00.000Z | sources/en/i/inadequatetrans.py | Nyadist/lightnovel-crawler | 8a19b5bdddde2ace1a919abcc51143c450cf32d0 | [
"Apache-2.0"
] | 7 | 2018-03-22T10:40:08.000Z | 2018-10-28T12:18:06.000Z | # -*- coding: utf-8 -*-
import logging
from lncrawl.core.crawler import Crawler
logger = logging.getLogger(__name__)
class InadequateTranslations(Crawler):
base_url = 'https://inadequatetranslations.wordpress.com/'
def read_novel_info(self):
logger.debug('Visiting %s', self.novel_url)
s... | 32.030769 | 96 | 0.570125 |
8d4ba7ac61f086596ca1c0d2327845950c9425a1 | 2,174 | py | Python | python/oneflow/test/modules/test_expm1.py | LiPengze97/oneflow | 1c1d2d3faa1c02d20e009046a290cf1095ee12e0 | [
"Apache-2.0"
] | null | null | null | python/oneflow/test/modules/test_expm1.py | LiPengze97/oneflow | 1c1d2d3faa1c02d20e009046a290cf1095ee12e0 | [
"Apache-2.0"
] | null | null | null | python/oneflow/test/modules/test_expm1.py | LiPengze97/oneflow | 1c1d2d3faa1c02d20e009046a290cf1095ee12e0 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2020 The OneFlow 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 applicable law or agr... | 30.619718 | 88 | 0.689052 |
1e5b5f2692356e82ddc254816714b164138b296f | 970 | py | Python | 4-mnist/mnist/mnist_inference.py | astazyx/tensorflow_practice | dd7366e43117ef2da5a8ccad0321d220a9b8c8f0 | [
"MIT"
] | null | null | null | 4-mnist/mnist/mnist_inference.py | astazyx/tensorflow_practice | dd7366e43117ef2da5a8ccad0321d220a9b8c8f0 | [
"MIT"
] | null | null | null | 4-mnist/mnist/mnist_inference.py | astazyx/tensorflow_practice | dd7366e43117ef2da5a8ccad0321d220a9b8c8f0 | [
"MIT"
] | null | null | null | import tensorflow as tf
INPUT_NODE = 784
OUTPUT_NODE = 10
LAYER1_NODE = 500
def get_weight_variable(shape, regularizer):
weights = tf.get_variable('weights', shape, initializer=tf.truncated_normal_initializer(stddev=0.1))
if regularizer != None:
tf.add_to_collection('losses', regularizer(weights))
... | 35.925926 | 104 | 0.72268 |
804fb0c9794cc4bdf8bfff3b501c71474ac200c5 | 222 | py | Python | Some-Examples-of-Simple-Python-Script-master/kerwords/keyword-splitter.py | Aarif1430/Python-Awesome-notes-and-exercises-list | c8ad7f90ebd973025f37d4e79c2f1229a8a2915c | [
"MIT"
] | 2 | 2021-01-13T21:20:57.000Z | 2021-08-18T17:53:53.000Z | Some-Examples-of-Simple-Python-Script-master/kerwords/keyword-splitter.py | Aarif1430/Python-Awesome-notes-and-exercises-list | c8ad7f90ebd973025f37d4e79c2f1229a8a2915c | [
"MIT"
] | null | null | null | Some-Examples-of-Simple-Python-Script-master/kerwords/keyword-splitter.py | Aarif1430/Python-Awesome-notes-and-exercises-list | c8ad7f90ebd973025f37d4e79c2f1229a8a2915c | [
"MIT"
] | 1 | 2020-11-05T09:56:55.000Z | 2020-11-05T09:56:55.000Z | #usr/bin/python2.7
tmp = ''
with open('keywords.txt') as f:
for i in f:
tmp += i.replace('\n', ', ').replace('\r', '')
print (tmp)
saved = open('saved.txt', 'w')
saved.write(tmp)
saved.close()
| 20.181818 | 54 | 0.518018 |
f620c4a8a581f1dbda2dd3152280d0ff836317bc | 8,923 | py | Python | TrainingExtensions/torch/src/python/aimet_torch/defs.py | lipovsek/aimet | 236fb02cc6c45e65c067030416c49a09ace82045 | [
"BSD-3-Clause"
] | 945 | 2020-04-30T02:23:55.000Z | 2022-03-31T08:44:32.000Z | TrainingExtensions/torch/src/python/aimet_torch/defs.py | lipovsek/aimet | 236fb02cc6c45e65c067030416c49a09ace82045 | [
"BSD-3-Clause"
] | 563 | 2020-05-01T03:07:22.000Z | 2022-03-30T05:35:58.000Z | TrainingExtensions/torch/src/python/aimet_torch/defs.py | lipovsek/aimet | 236fb02cc6c45e65c067030416c49a09ace82045 | [
"BSD-3-Clause"
] | 186 | 2020-04-30T00:55:26.000Z | 2022-03-30T09:54:51.000Z | # /usr/bin/env python3.5
# -*- mode: python -*-
# =============================================================================
# @@-COPYRIGHT-START-@@
#
# Copyright (c) 2018, Qualcomm Innovation Center, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification,... | 37.649789 | 104 | 0.657178 |
cd398987af037fda126631254686c36296b555ed | 1,463 | py | Python | profiles_api/serializers.py | ivy-ajanga/profiles-rest-api | 4bdb754b3318cc03fb61ac8d3325310f1de95b97 | [
"MIT"
] | 1 | 2020-09-28T09:34:25.000Z | 2020-09-28T09:34:25.000Z | profiles_api/serializers.py | ivy-ajanga/profiles-rest-api | 4bdb754b3318cc03fb61ac8d3325310f1de95b97 | [
"MIT"
] | null | null | null | profiles_api/serializers.py | ivy-ajanga/profiles-rest-api | 4bdb754b3318cc03fb61ac8d3325310f1de95b97 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from profiles_api import models
class HelloSerializer(serializers.Serializer):
"""Serializes a name field for testing our APIView"""
name =serializers.CharField(max_length=10)
class UserProfileSerializer(serializers.ModelSerializer):
"""Serializes a user profile o... | 29.26 | 68 | 0.634997 |
1b1de0a74142b92dbb4b1a8f45c0a48759319fd2 | 805 | py | Python | script/clean/remove_empty_dicretory.py | ammeto/poetry | c732d85e83649eb390768eb5f2ad0c75ed6994db | [
"MIT"
] | null | null | null | script/clean/remove_empty_dicretory.py | ammeto/poetry | c732d85e83649eb390768eb5f2ad0c75ed6994db | [
"MIT"
] | null | null | null | script/clean/remove_empty_dicretory.py | ammeto/poetry | c732d85e83649eb390768eb5f2ad0c75ed6994db | [
"MIT"
] | null | null | null | """
Copyright (c) 2022 Hengyang Zhang
This software is released under the MIT License.
https://opensource.org/licenses/MIT
"""
import os
import sys
argv = sys.argv
if len(argv) > 1:
path = argv[1]
if not os.path.exists(path):
print('no directory')
quit()
for dir in os.listdir(path):
if '_' not i... | 22.361111 | 49 | 0.591304 |
f96589bdac4fe971b30e3b76301fc48211ddcc2e | 2,322 | py | Python | hTools2.roboFontExt/lib/hTools2/modules/pshinting.py | gferreira/hTools2_extension | 9e5150082a0a39847c1078aac3dc38d914a44f83 | [
"BSD-3-Clause"
] | 1 | 2015-02-10T14:47:39.000Z | 2015-02-10T14:47:39.000Z | hTools2.roboFontExt/lib/hTools2/modules/pshinting.py | gferreira/hTools2_extension | 9e5150082a0a39847c1078aac3dc38d914a44f83 | [
"BSD-3-Clause"
] | 2 | 2017-08-08T21:02:17.000Z | 2019-12-18T15:55:48.000Z | hTools2.roboFontExt/lib/hTools2/modules/pshinting.py | gferreira/hTools2_extension | 9e5150082a0a39847c1078aac3dc38d914a44f83 | [
"BSD-3-Clause"
] | 3 | 2015-08-17T04:09:05.000Z | 2021-08-09T20:22:04.000Z | # [h] hTools2.modules.pshinting
from robofab.pens.marginPen import MarginPen
#----------
# ps stems
#----------
def get_vstems(font, glyphs=['l', 'I']):
ref_y = font.info.xHeight / 2.0
stems = []
for glyph_name in glyphs:
if font.has_key(glyph_name):
g = font[glyph_name]
#... | 26.386364 | 57 | 0.561154 |
15cca92fad05636c08b48187490be464751aad74 | 2,108 | py | Python | pandas_plink/_bed_read.py | Horta/pandas-plink | b580df7f8d3c566f6cdf8da512c608fd76ff1f0c | [
"MIT"
] | 69 | 2017-07-03T03:34:55.000Z | 2022-03-08T19:35:35.000Z | pandas_plink/_bed_read.py | Horta/pandas-plink | b580df7f8d3c566f6cdf8da512c608fd76ff1f0c | [
"MIT"
] | 26 | 2017-08-23T13:57:07.000Z | 2022-02-26T00:19:28.000Z | pandas_plink/_bed_read.py | Horta/pandas-plink | b580df7f8d3c566f6cdf8da512c608fd76ff1f0c | [
"MIT"
] | 12 | 2018-01-06T18:39:13.000Z | 2022-03-17T01:44:18.000Z | from numpy import (
absolute,
ascontiguousarray,
empty,
float32,
memmap,
nan,
uint8,
uint64,
zeros,
)
from ._allele import Allele
__all__ = ["read_bed"]
def read_bed(filepath, nrows, ncols, row_chunk, col_chunk, ref: Allele):
from dask.array import concatenate, from_delayed
... | 23.685393 | 75 | 0.562619 |
b9457b7b7d92021ff8d9d82cd050722a8e7e0ceb | 6,162 | py | Python | homeassistant/components/lcn/light.py | kdschlosser/home-assistant | a94a24f6f83508642e220fadf2799789dc32a25b | [
"Apache-2.0"
] | 2 | 2020-06-17T01:23:01.000Z | 2020-06-18T22:17:14.000Z | homeassistant/components/lcn/light.py | kdschlosser/home-assistant | a94a24f6f83508642e220fadf2799789dc32a25b | [
"Apache-2.0"
] | 6 | 2021-02-08T21:02:40.000Z | 2022-03-12T00:52:16.000Z | homeassistant/components/lcn/light.py | kdschlosser/home-assistant | a94a24f6f83508642e220fadf2799789dc32a25b | [
"Apache-2.0"
] | 1 | 2019-08-13T11:54:30.000Z | 2019-08-13T11:54:30.000Z | """
Support for LCN lights.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/light.lcn/
"""
from homeassistant.components.lcn import (
CONF_CONNECTIONS, CONF_DIMMABLE, CONF_OUTPUT, CONF_TRANSITION, DATA_LCN,
OUTPUT_PORTS, LcnDevice, get_connection... | 33.672131 | 78 | 0.65628 |
98eb8164dba46077b981e2fa04bff7c3ed375aa6 | 114,801 | py | Python | nova/scheduler/client/report.py | ChameleonCloud/nova | 4bb9421b02b71f2b218278aa6f97abace871b111 | [
"Apache-2.0"
] | 1 | 2016-07-18T22:05:01.000Z | 2016-07-18T22:05:01.000Z | nova/scheduler/client/report.py | ChameleonCloud/nova | 4bb9421b02b71f2b218278aa6f97abace871b111 | [
"Apache-2.0"
] | null | null | null | nova/scheduler/client/report.py | ChameleonCloud/nova | 4bb9421b02b71f2b218278aa6f97abace871b111 | [
"Apache-2.0"
] | 1 | 2021-11-12T03:55:41.000Z | 2021-11-12T03:55:41.000Z | # Copyright (c) 2014 Red Hat, 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 require... | 48.398398 | 79 | 0.608122 |
bbc4ebff76e13cded04ea6a2bad649234e851a0c | 4,853 | py | Python | teraserver/python/examples/device_client/asyncio_client.py | introlab/opentera | bfc4de672c9de40b7c9a659be2138731e7ee4e94 | [
"Apache-2.0"
] | 10 | 2020-03-16T14:46:06.000Z | 2022-02-11T16:07:38.000Z | teraserver/python/examples/device_client/asyncio_client.py | introlab/opentera | bfc4de672c9de40b7c9a659be2138731e7ee4e94 | [
"Apache-2.0"
] | 114 | 2019-09-16T13:02:50.000Z | 2022-03-22T19:17:36.000Z | teraserver/python/examples/device_client/asyncio_client.py | introlab/opentera | bfc4de672c9de40b7c9a659be2138731e7ee4e94 | [
"Apache-2.0"
] | null | null | null | import aiohttp
import asyncio
import json
import opentera.messages.python as messages
from google.protobuf.json_format import ParseDict, ParseError
from google.protobuf.json_format import MessageToJson
login_api_endpoint = '/api/device/login'
status_api_endpoint = '/api/device/status'
async def fetch(client, url, p... | 35.683824 | 211 | 0.602926 |
730a38f3c101ad7a6f9d7f6b0059d59ddaaa9327 | 1,808 | py | Python | app/views.py | philmillman/memegen | 770fdd40c46e3cc1487c584a7a16a8a632345ddb | [
"MIT"
] | 1 | 2021-09-01T03:58:15.000Z | 2021-09-01T03:58:15.000Z | app/views.py | philmillman/memegen | 770fdd40c46e3cc1487c584a7a16a8a632345ddb | [
"MIT"
] | null | null | null | app/views.py | philmillman/memegen | 770fdd40c46e3cc1487c584a7a16a8a632345ddb | [
"MIT"
] | null | null | null | import asyncio
import random
import log
from sanic import Sanic, response
from sanic_openapi import doc
from app import helpers, settings, utils
app = Sanic(name="memegen")
helpers.configure(app)
@app.get("/")
@doc.exclude(True)
def index(request):
data = {
"templates": request.app.url_for("templates.i... | 26.202899 | 76 | 0.678097 |
473d42d9666d1049abf196b713e3ef3b49216118 | 19,008 | py | Python | keras-yolo3-master/yolo.py | dlsaavedra/Detector_GDXray | 1e120f8fa548819eef1b86ccfbbe306b44405b6f | [
"MIT"
] | 3 | 2021-05-27T07:27:44.000Z | 2022-02-19T05:20:16.000Z | keras-yolo3-master/yolo.py | dlsaavedra/Detector_GDXray | 1e120f8fa548819eef1b86ccfbbe306b44405b6f | [
"MIT"
] | 8 | 2020-09-25T22:34:27.000Z | 2022-02-10T01:09:19.000Z | keras-yolo3-master/yolo.py | dlsaavedra/Detector_GDXray | 1e120f8fa548819eef1b86ccfbbe306b44405b6f | [
"MIT"
] | 3 | 2020-03-18T20:27:18.000Z | 2021-11-03T03:10:11.000Z | from keras.layers import Conv2D, Input, BatchNormalization, LeakyReLU, ZeroPadding2D, UpSampling2D, Lambda
from keras.layers.merge import add, concatenate
from keras.models import Model
from keras.engine.topology import Layer
import tensorflow as tf
class YoloLayer(Layer):
def __init__(self, anchors, max_grid, bat... | 52.076712 | 150 | 0.546349 |
3a3e27d2fc7f9261fd79db634ef422caadeb673f | 2,431 | py | Python | Python2.7-Upload file by API GW/index.py | tencentyun/scf-demo-repo | c75f9b9e8be8d079f0510b14fb0c7098d0b6bb7e | [
"Python-2.0",
"OLDAP-2.7"
] | 46 | 2019-03-01T02:19:18.000Z | 2021-12-18T12:37:02.000Z | Python2.7-Upload file by API GW/index.py | tencentyun/scf-demo-repo | c75f9b9e8be8d079f0510b14fb0c7098d0b6bb7e | [
"Python-2.0",
"OLDAP-2.7"
] | 8 | 2019-01-22T10:46:43.000Z | 2020-12-30T13:03:04.000Z | Python2.7-Upload file by API GW/index.py | tencentyun/scf-demo-repo | c75f9b9e8be8d079f0510b14fb0c7098d0b6bb7e | [
"Python-2.0",
"OLDAP-2.7"
] | 67 | 2018-10-29T09:50:49.000Z | 2022-01-06T07:35:56.000Z | # -*- coding: utf-8 -*-
import os
import logging
import datetime
import base64
from qcloud_cos_v5 import CosConfig
from qcloud_cos_v5 import CosS3Client
from qcloud_cos_v5 import CosServiceError
from qcloud_cos_v5 import CosClientError
import sys
print('Loading function')
logging.basicConfig(level=logging.INFO, strea... | 32.413333 | 135 | 0.671329 |
05015fde2cd48b774cc727303822ab5353683e50 | 226 | py | Python | instagram/admin.py | JuneMuoti/Instagram-clone | aa48b9a337c56c6d0ff17b05e7a1aa990411a743 | [
"MIT"
] | null | null | null | instagram/admin.py | JuneMuoti/Instagram-clone | aa48b9a337c56c6d0ff17b05e7a1aa990411a743 | [
"MIT"
] | null | null | null | instagram/admin.py | JuneMuoti/Instagram-clone | aa48b9a337c56c6d0ff17b05e7a1aa990411a743 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Image,Profile,Likes,Comment
admin.site.register(Image)
admin.site.register(Profile)
admin.site.register(Likes)
admin.site.register(Comment)
# Register your models here.
| 18.833333 | 47 | 0.80531 |
25220ae344a18687359cf822f751f0f88a6d3cc6 | 448 | py | Python | tests/test.py | onna/amplitude-client | e5022605362c8fb5f7f54450462dd0e487312687 | [
"Apache-2.0"
] | null | null | null | tests/test.py | onna/amplitude-client | e5022605362c8fb5f7f54450462dd0e487312687 | [
"Apache-2.0"
] | null | null | null | tests/test.py | onna/amplitude-client | e5022605362c8fb5f7f54450462dd0e487312687 | [
"Apache-2.0"
] | null | null | null | from amplitude_client.logger import AmplitudeLogger
import asyncio
logger = AmplitudeLogger(api_key="YOUR_API_KEY")
async def run():
event_payload = {
"user_id": "user@example.com",
"event_type": "Performed some action",
"event_properties": {"load_time": 0.5},
}
await logger.log... | 21.333333 | 51 | 0.685268 |
c3f21b19ac75534521b9a0eae957e8ee454f1cd4 | 3,620 | py | Python | backbone/resnest/splat.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 1,329 | 2021-01-13T07:06:30.000Z | 2022-03-31T07:23:39.000Z | backbone/resnest/splat.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 115 | 2021-01-13T10:42:57.000Z | 2022-03-28T03:57:52.000Z | backbone/resnest/splat.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 351 | 2021-01-13T07:21:00.000Z | 2022-03-29T14:11:39.000Z | """Split-Attention"""
import torch
from torch import nn
import torch.nn.functional as F
from torch.nn import Conv2d, Module, Linear, BatchNorm2d, ReLU
from torch.nn.modules.utils import _pair
__all__ = ['SplAtConv2d']
class SplAtConv2d(Module):
"""Split-Attention Conv2d
"""
def __init__(self, in_channels... | 36.2 | 101 | 0.572099 |
72b2bfc04bcf10177389d1934d6e0b23c8d7aa62 | 25,797 | py | Python | src/ixypy/ixgbe/types.py | vsinitsyn/ixy.py | 0d10685fa9f77797eb55244205bffe357ddaeb36 | [
"MIT"
] | 29 | 2018-10-18T07:37:52.000Z | 2021-11-22T14:08:11.000Z | src/ixypy/ixgbe/types.py | vsinitsyn/ixy.py | 0d10685fa9f77797eb55244205bffe357ddaeb36 | [
"MIT"
] | null | null | null | src/ixypy/ixgbe/types.py | vsinitsyn/ixy.py | 0d10685fa9f77797eb55244205bffe357ddaeb36 | [
"MIT"
] | 4 | 2019-09-29T04:37:05.000Z | 2021-06-11T10:10:42.000Z | IXGBE_CTRL = 0x00000
IXGBE_STATUS = 0x00008
IXGBE_CTRL_EXT = 0x00018
IXGBE_ESDP = 0x00020
IXGBE_EODSDP = 0x00028
IXGBE_I2CCTL_82599 = 0x00028
IXGBE_EEC = 0x10010
# MAC Registers
IXGBE_PCS1GCFIG = 0x04200
IXGBE_PCS1GLCTL = 0x04208
IXGBE_PCS1GLSTA = 0x0420C
IXGBE_PCS1GDBG0 = 0x04210
IXGBE_PCS1GDBG1 = 0x04214
IXGBE_PCS1... | 25.874624 | 115 | 0.809978 |
71e239b3bd3bf9c4201660a9b396292261839315 | 12,467 | py | Python | data/templates/derived/events/detail.html.py | tonycai/pyfisheyes | 9080c340d6148b4036347edde3e0ece322f7808e | [
"Apache-2.0"
] | 3 | 2017-08-19T08:29:36.000Z | 2017-09-19T02:58:49.000Z | data/templates/derived/events/detail.html.py | tonycai/pyfisheyes | 9080c340d6148b4036347edde3e0ece322f7808e | [
"Apache-2.0"
] | null | null | null | data/templates/derived/events/detail.html.py | tonycai/pyfisheyes | 9080c340d6148b4036347edde3e0ece322f7808e | [
"Apache-2.0"
] | null | null | null | # -*- encoding:utf-8 -*-
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 5
_modified_time = 1318562283.686466
_template_filename='/home/tonycai/workspace/ops_repos/dev/pyfisheyes/pyfisheyes/templates/derived/events/detail.html'
_... | 46.174074 | 731 | 0.582819 |
87f0e94c86bd13b873ab6908c77b980ea4bc69aa | 8,873 | py | Python | kubernetes/client/models/v1beta1_daemon_set_spec.py | amanagarwal33/python | e31693557f75950805fb4dc5af4cb7434a470e26 | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1beta1_daemon_set_spec.py | amanagarwal33/python | e31693557f75950805fb4dc5af4cb7434a470e26 | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1beta1_daemon_set_spec.py | amanagarwal33/python | e31693557f75950805fb4dc5af4cb7434a470e26 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
<<<<<<< HEAD
OpenAPI spec version: v1.15.6
Generated by: https://openapi-generator.tech
=======
OpenAPI spec version: v1.5.3
Generated b... | 34.660156 | 254 | 0.651527 |
2389f57a0bee4c77b92d1219bbbc775e5984c3f5 | 1,424 | py | Python | ch06/myproject_virtualenv/src/django-myproject/myproject/apps/products/admin1.py | PacktPublishing/Django-3-Web-Development-Cookbook | 6ffe6e0add93a43a9abaff62e0147dc1f4f5351a | [
"MIT"
] | 159 | 2019-11-13T14:11:39.000Z | 2022-03-24T05:47:10.000Z | ch06/myproject_virtualenv/src/django-myproject/myproject/apps/products/admin1.py | PacktPublishing/Django-3-Web-Development-Cookbook | 6ffe6e0add93a43a9abaff62e0147dc1f4f5351a | [
"MIT"
] | 34 | 2019-11-06T08:32:48.000Z | 2022-01-14T11:31:29.000Z | ch06/myproject_virtualenv/src/django-myproject/myproject/apps/products/admin1.py | PacktPublishing/Django-3-Web-Development-Cookbook | 6ffe6e0add93a43a9abaff62e0147dc1f4f5351a | [
"MIT"
] | 103 | 2019-08-15T21:35:26.000Z | 2022-03-20T05:29:11.000Z | # myproject/apps/products/admin.py
from django.contrib import admin
from django.template.loader import render_to_string
from django.utils.html import mark_safe
from django.utils.translation import ugettext_lazy as _
from .models import Product, ProductPhoto
class ProductPhotoInline(admin.StackedInline):
model = ... | 33.116279 | 88 | 0.683989 |
5207529309cd41b79b76cd93b550a70994cef180 | 143 | py | Python | wgnlpy/__init__.py | liske/wgnlpy | 6ee9982da2df4c40470c31beb71723261cbb20bb | [
"MIT"
] | 33 | 2019-08-08T01:20:02.000Z | 2022-03-20T22:02:40.000Z | wgnlpy/__init__.py | liske/wgnlpy | 6ee9982da2df4c40470c31beb71723261cbb20bb | [
"MIT"
] | 4 | 2020-07-10T08:49:03.000Z | 2021-08-03T19:40:26.000Z | wgnlpy/__init__.py | liske/wgnlpy | 6ee9982da2df4c40470c31beb71723261cbb20bb | [
"MIT"
] | 4 | 2019-08-08T01:29:45.000Z | 2021-03-15T12:56:34.000Z | from .wireguard import WireGuard
from .preshared_key import PresharedKey
from .private_key import PrivateKey
from .public_key import PublicKey
| 28.6 | 39 | 0.86014 |
e53805edca913e0b940d1e07deb95a379f053855 | 8,390 | py | Python | tools/test.py | iskra3138/OpenPCDet | a6c817cfb9c1da6b7268d5ba4e40f83f1c1bbb99 | [
"Apache-2.0"
] | null | null | null | tools/test.py | iskra3138/OpenPCDet | a6c817cfb9c1da6b7268d5ba4e40f83f1c1bbb99 | [
"Apache-2.0"
] | 1 | 2022-02-22T09:39:49.000Z | 2022-02-23T19:38:31.000Z | tools/test.py | iskra3138/OpenPCDet | a6c817cfb9c1da6b7268d5ba4e40f83f1c1bbb99 | [
"Apache-2.0"
] | null | null | null | import _init_path
import argparse
import datetime
import glob
import os
import re
import time
from pathlib import Path
import numpy as np
import torch
from tensorboardX import SummaryWriter
from eval_utils import eval_utils
from pcdet.config import cfg, cfg_from_list, cfg_from_yaml_file, log_config_to_file
from pcdet... | 41.330049 | 120 | 0.678784 |
85c10770d50a826c38e1df695c2411142d2e05ed | 31,425 | py | Python | upload/utils.py | DevangS/CoralNet | 7c56d4ec95a771718175bd94c3ef51c4095082e3 | [
"BSD-2-Clause"
] | 4 | 2015-12-23T05:14:35.000Z | 2019-07-09T03:27:10.000Z | upload/utils.py | DevangS/CoralNet | 7c56d4ec95a771718175bd94c3ef51c4095082e3 | [
"BSD-2-Clause"
] | 3 | 2015-04-07T02:45:15.000Z | 2015-07-01T19:25:10.000Z | upload/utils.py | DevangS/CoralNet | 7c56d4ec95a771718175bd94c3ef51c4095082e3 | [
"BSD-2-Clause"
] | 2 | 2016-01-21T17:25:48.000Z | 2019-08-29T18:42:14.000Z | import codecs
import datetime
import os
import csv
from os.path import splitext
import shelve
from django.conf import settings
from django.core.urlresolvers import reverse
from accounts.utils import get_imported_user
from annotations.model_utils import AnnotationAreaUtils
from annotations.models import Label, Annotat... | 38.229927 | 191 | 0.633063 |
ba415dac1876bb81e77199f3ddebce313c81f3c5 | 1,883 | py | Python | lib/dnvgl/framework/app.py | berhoel/DNVGLPyFramework | 22b2a53ab580bc6aeff746a57fc1cae69f110f03 | [
"MIT"
] | 3 | 2019-10-06T12:19:41.000Z | 2021-11-14T19:41:53.000Z | lib/dnvgl/framework/app.py | berhoel/DNVGLPyFramework | 22b2a53ab580bc6aeff746a57fc1cae69f110f03 | [
"MIT"
] | null | null | null | lib/dnvgl/framework/app.py | berhoel/DNVGLPyFramework | 22b2a53ab580bc6aeff746a57fc1cae69f110f03 | [
"MIT"
] | 3 | 2019-03-29T16:20:32.000Z | 2021-05-03T11:25:16.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""A lightweight Application framwork.
"""
from __future__ import (
division, print_function, absolute_import, unicode_literals)
# Standard libraries.
import argparse
# ID: $Id$"
__date__ = "$Date$"[6:-1]
__scm_version__ = "$Revision$"[10:-1]
__author__ = "`Berthold... | 27.691176 | 75 | 0.659055 |
b33af9de56bd78f4c54f22dc69c2d45639f2b862 | 14,440 | py | Python | src/iris/service/content/petition/mapper.py | iris-dni/iris-backend | 680aadb1d9dd02e031b1902a4f9ef19440959465 | [
"Apache-2.0"
] | 2 | 2017-08-28T14:26:54.000Z | 2017-09-15T20:49:35.000Z | src/iris/service/content/petition/mapper.py | iris-dni/iris-backend | 680aadb1d9dd02e031b1902a4f9ef19440959465 | [
"Apache-2.0"
] | 27 | 2016-09-16T09:44:44.000Z | 2017-03-27T12:05:31.000Z | src/iris/service/content/petition/mapper.py | iris-dni/iris-backend | 680aadb1d9dd02e031b1902a4f9ef19440959465 | [
"Apache-2.0"
] | null | null | null | import time
import transitions
from transitions.extensions.nesting import NestedState
from iris.service.security import acl
from iris.service import rest
from iris.service.rest import queries
from iris.service.rest.extender import APIExtender
from iris.service.content.user import SessionUser, normalise_phone_number
... | 33.896714 | 78 | 0.536981 |
920c9f72bb4badc832d8a884357480c4e88ac22a | 391 | py | Python | wk_5/in_class/api.py | tnakatani/python2_ccac | 14317062548e41d7b4b842367865c54b0d9f5c05 | [
"MIT"
] | null | null | null | wk_5/in_class/api.py | tnakatani/python2_ccac | 14317062548e41d7b4b842367865c54b0d9f5c05 | [
"MIT"
] | null | null | null | wk_5/in_class/api.py | tnakatani/python2_ccac | 14317062548e41d7b4b842367865c54b0d9f5c05 | [
"MIT"
] | 1 | 2020-02-19T23:26:59.000Z | 2020-02-19T23:26:59.000Z | import requests
import json
company = 'saturn'
model = 'LS'
year = 2000
url = f'https://webapi.nhtsa.gov/api/Recalls/vehicle/modelyear/{year}/make/{company}/model/{model}?format=json'
req = requests.get(url)
if int(req.status_code) == 200:
apiDict = json.loads(req.text)
print(apiDict.keys())
results = ap... | 24.4375 | 111 | 0.680307 |
3cef4560e3f6f6881ca9574a8f84509c07584e9f | 366 | py | Python | tests/unit-test/catchthrow/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | 1 | 2019-01-17T20:07:19.000Z | 2019-01-17T20:07:19.000Z | tests/unit-test/catchthrow/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | null | null | null | tests/unit-test/catchthrow/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | 2 | 2019-08-06T18:13:57.000Z | 2021-11-05T18:19:49.000Z | #=========================#
# CATCHTHROW PACKAGE FILE #
#=========================#
from spack import *
class Catchthrow(MakefilePackage):
version('1.0', 'hpctest/tests/unit-tests/catchthrow')
url = 'hpctest/tests/unit-tests/catchthrow'
def install(self, spec, prefix):
mkdirp(prefix.bin)
... | 16.636364 | 57 | 0.560109 |
96f407478c178a5acfc91e6b4e7c79978eef20e3 | 452 | py | Python | tests/test_img_augment.py | louisfh/opensoundscape | 3a038e68297743d61338bc946e5577fc4d78d420 | [
"MIT"
] | 30 | 2019-02-21T16:51:51.000Z | 2022-03-17T22:32:10.000Z | tests/test_img_augment.py | louisfh/opensoundscape | 3a038e68297743d61338bc946e5577fc4d78d420 | [
"MIT"
] | 253 | 2019-03-04T17:58:18.000Z | 2022-03-30T23:04:49.000Z | tests/test_img_augment.py | louisfh/opensoundscape | 3a038e68297743d61338bc946e5577fc4d78d420 | [
"MIT"
] | 9 | 2019-08-20T17:14:45.000Z | 2022-03-28T19:33:11.000Z | import numpy as np
from PIL import Image
from opensoundscape.preprocess.img_augment import time_split
def test_basic_split():
shape = (1, 5, 3)
arr = np.array(
[0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4], dtype=np.uint8
).reshape(shape)
img = Image.fromarray(arr)
img = time_split(img, se... | 26.588235 | 69 | 0.630531 |
a8c130a4f961f5a2c771755ca756de8af7bf73c7 | 7,917 | py | Python | HyHelper/AutoSplit.py | aherrera1721/hyhelper | 73fccda145bcf1a979e646156343f56c40df0b61 | [
"MIT"
] | 2 | 2020-01-23T01:14:45.000Z | 2020-07-04T06:52:28.000Z | HyHelper/AutoSplit.py | aherrera1721/hyhelper | 73fccda145bcf1a979e646156343f56c40df0b61 | [
"MIT"
] | null | null | null | HyHelper/AutoSplit.py | aherrera1721/hyhelper | 73fccda145bcf1a979e646156343f56c40df0b61 | [
"MIT"
] | null | null | null | import urllib, os, datetime
from mechanize import Browser
def newpage(br):
print("Currently at: " + br.geturl())
br.select_form(nr=0)
br.set_all_readonly(False)
br.set_handle_robots(False)
class traj_request():
"""
traj_request(): Trajectory request package to be used by the get_traj function.... | 39 | 192 | 0.512694 |
7863ac6219764a4b82250089de1adae856f79675 | 35,071 | py | Python | selfdrive/controls/lib/events.py | boxkon/openpilot | aa93bbde06f045f6d5afcdc68f67a1a7b8c5fe71 | [
"MIT"
] | 1 | 2022-02-19T06:21:26.000Z | 2022-02-19T06:21:26.000Z | selfdrive/controls/lib/events.py | boxkon/openpilot | aa93bbde06f045f6d5afcdc68f67a1a7b8c5fe71 | [
"MIT"
] | null | null | null | selfdrive/controls/lib/events.py | boxkon/openpilot | aa93bbde06f045f6d5afcdc68f67a1a7b8c5fe71 | [
"MIT"
] | 1 | 2022-02-20T13:05:44.000Z | 2022-02-20T13:05:44.000Z | import os
from enum import IntEnum
from typing import Dict, Union, Callable, List, Optional
from cereal import log, car
import cereal.messaging as messaging
from common.conversions import Conversions as CV
from common.realtime import DT_CTRL
from selfdrive.locationd.calibrationd import MIN_SPEED_FILTER
from selfdrive.... | 36.305383 | 152 | 0.699866 |
13d413a8e575bc8a6359cf27d9b7fd25a7d78b91 | 4,657 | py | Python | exploring.py | othmanefc/bert-disaster | 616dea91feb8c6eea6e7a6f71118d21ecc1c717f | [
"MIT"
] | null | null | null | exploring.py | othmanefc/bert-disaster | 616dea91feb8c6eea6e7a6f71118d21ecc1c717f | [
"MIT"
] | 1 | 2021-06-02T01:03:16.000Z | 2021-06-02T01:03:16.000Z | exploring.py | othmanefc/bert-disaster | 616dea91feb8c6eea6e7a6f71118d21ecc1c717f | [
"MIT"
] | null | null | null | import io
import random
import os
import pandas as pd
import numpy as np
import mxnet as mx
import gluonnlp as nlp
from bert import data, model
DATA_PATH = "data"
train = pd.read_csv(os.path.join(DATA_PATH, "train.csv"))
test = pd.read_csv(os.path.join(DATA_PATH, "test.csv"))
np.random.seed(100)
random.seed(100)
m... | 33.503597 | 94 | 0.634314 |
fa4ebf8386c70e929dd465580271af6579dc4640 | 7,865 | py | Python | hermes-owner-migrator.py | cristaloleg/hermes-traverser | 533373e984ac2821f99c04210b140fe879e4fd32 | [
"Apache-2.0"
] | null | null | null | hermes-owner-migrator.py | cristaloleg/hermes-traverser | 533373e984ac2821f99c04210b140fe879e4fd32 | [
"Apache-2.0"
] | null | null | null | hermes-owner-migrator.py | cristaloleg/hermes-traverser | 533373e984ac2821f99c04210b140fe879e4fd32 | [
"Apache-2.0"
] | null | null | null | import click
import json
import csv
from kazoo.client import KazooClient
@click.command()
@click.option('--zookeeper', '-z', required = True, help = 'zookeeper connection string')
@click.option('--prefix', '-p', required = True, default = '/run/hermes', help = 'path prefix')
@click.option('--source', '-s', required = ... | 43.214286 | 150 | 0.547997 |
b25f7054ff0fd64310cea0c652dbc65e44bd7188 | 902 | py | Python | flat/video/views.py | bilbeyt/ITURO-Giant_Flat | 5a3f766ab1394cefd3589a30c07b5a68b48be00e | [
"MIT"
] | null | null | null | flat/video/views.py | bilbeyt/ITURO-Giant_Flat | 5a3f766ab1394cefd3589a30c07b5a68b48be00e | [
"MIT"
] | null | null | null | flat/video/views.py | bilbeyt/ITURO-Giant_Flat | 5a3f766ab1394cefd3589a30c07b5a68b48be00e | [
"MIT"
] | null | null | null | from django.views.generic.list import ListView
from video.models import Playlist, Video
class PlaylistDetailView(ListView):
model = Playlist
template_name = "video.html"
def get_context_data(self, **kwargs):
context = super(PlaylistDetailView, self).get_context_data(**kwargs)
playlist = P... | 33.407407 | 83 | 0.694013 |
64e1e34ec40e5fa591fdc7f6962a35761a6f0fb4 | 8,303 | py | Python | demo.py | nghialuffy/python-tips | de2ea4db8a5003ebbc473ae8f6a2cf84c0b23ab0 | [
"MIT"
] | 1 | 2021-11-15T10:25:09.000Z | 2021-11-15T10:25:09.000Z | demo.py | nghialuffy/python-tips | de2ea4db8a5003ebbc473ae8f6a2cf84c0b23ab0 | [
"MIT"
] | null | null | null | demo.py | nghialuffy/python-tips | de2ea4db8a5003ebbc473ae8f6a2cf84c0b23ab0 | [
"MIT"
] | null | null | null |
# coding: utf-8
# In[2]:
b'\xf0\xf1\xf2'.hex()
# In[24]:
bytearray(b'nghialuffy')
bytearray.fromhex('f0f1f2').hex()
# In[67]:
a = compile('print("Hello World")', '', 'exec')
dir(a)
for x in dir(a):
print(x, a.__getattribute__(x))
# print(getattr(a, x))
# In[41]:
complex(1, 2)
# In[42]:
dir()... | 13.815308 | 140 | 0.589185 |
a04f3ce674aeeaa901b8a3f3cd7950b16c3f8d5e | 5,218 | py | Python | RNN/configurations2.py | oncebasun/seq2seq-theano | 9d905ed2fb392193e28d67272d3e3f1b5da613ac | [
"MIT"
] | null | null | null | RNN/configurations2.py | oncebasun/seq2seq-theano | 9d905ed2fb392193e28d67272d3e3f1b5da613ac | [
"MIT"
] | null | null | null | RNN/configurations2.py | oncebasun/seq2seq-theano | 9d905ed2fb392193e28d67272d3e3f1b5da613ac | [
"MIT"
] | null | null | null | def get_config_cs2en():
config = {}
# Settings which should be given at start time, but are not, for convenience
config['the_task'] = 0
# Settings ----------------------------------------------------------------
config['allTagsSplit'] = 'allTagsSplit/' # can be 'allTagsSplit/', 'POSextra/' or ... | 37.811594 | 176 | 0.633576 |
7a395157362b26712722b94cf49ecb61863c61b7 | 416 | py | Python | data/scripts/templates/object/ship/shared_blacksun_medium_s03.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/ship/shared_blacksun_medium_s03.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/ship/shared_blacksun_medium_s03.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 = Ship()
result.template = "object/ship/shared_blacksun_medium_s03.iff"
result.attribute_template_id = -1
result.s... | 24.470588 | 63 | 0.709135 |
6d3c3415a11da26d9302bf1f0db0deb6e160484c | 20,709 | py | Python | SmartAPI/common/Tools.py | Kreastr/SmartAPI-HEILA | 97dbe9e6e27267c60a4f94f60692d5f391e2ef7f | [
"BSD-2-Clause"
] | null | null | null | SmartAPI/common/Tools.py | Kreastr/SmartAPI-HEILA | 97dbe9e6e27267c60a4f94f60692d5f391e2ef7f | [
"BSD-2-Clause"
] | null | null | null | SmartAPI/common/Tools.py | Kreastr/SmartAPI-HEILA | 97dbe9e6e27267c60a4f94f60692d5f391e2ef7f | [
"BSD-2-Clause"
] | null | null | null | from SmartAPI.factory.Factory import Factory
from SmartAPI.rdf.Property import Property
from SmartAPI.rdf.Resource import Resource
from SmartAPI.rdf.LinkedList import LinkedList
from SmartAPI.rdf.OrderedList import OrderedList
from SmartAPI.rdf.ItemizedList import ItemizedList
from SmartAPI.rdf.NudeList import NudeList... | 34.981419 | 171 | 0.734174 |
ab665e1dc9864a3331890e60942de5e49d0761f1 | 19 | py | Python | nmrglue/util/__init__.py | genematx/nmrglue | 8a24cf6cbd18451e552fc0673b84c42d1dcb69a2 | [
"BSD-3-Clause"
] | 194 | 2016-10-21T08:46:41.000Z | 2021-01-06T20:39:23.000Z | nmrglue/util/__init__.py | genematx/nmrglue | 8a24cf6cbd18451e552fc0673b84c42d1dcb69a2 | [
"BSD-3-Clause"
] | 463 | 2021-01-12T14:07:38.000Z | 2022-03-31T22:42:25.000Z | nmrglue/util/__init__.py | genematx/nmrglue | 8a24cf6cbd18451e552fc0673b84c42d1dcb69a2 | [
"BSD-3-Clause"
] | 88 | 2015-02-16T20:04:12.000Z | 2022-03-10T06:50:30.000Z | from . import misc
| 9.5 | 18 | 0.736842 |
b2feec4b68b6d6aad468322fee616444a3cf55da | 309 | py | Python | env/lib/python3.8/site-packages/plotly/validators/layout/ternary/caxis/title/__init__.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11,750 | 2015-10-12T07:03:39.000Z | 2022-03-31T20:43:15.000Z | env/lib/python3.8/site-packages/plotly/validators/layout/ternary/caxis/title/__init__.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 2,951 | 2015-10-12T00:41:25.000Z | 2022-03-31T22:19:26.000Z | env/lib/python3.8/site-packages/plotly/validators/layout/ternary/caxis/title/__init__.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 2,623 | 2015-10-15T14:40:27.000Z | 2022-03-28T16:05:50.000Z | import sys
if sys.version_info < (3, 7):
from ._text import TextValidator
from ._font import FontValidator
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(
__name__, [], ["._text.TextValidator", "._font.FontValidator"]
)
| 25.75 | 70 | 0.708738 |
dfcecc5cec2be265af96e10eec0698b92a2559b1 | 4,684 | py | Python | pygubu/widgets/dialog.py | danicotra/pygubu | 28585580e13825d8acc2c17ca35c1b3708cce73b | [
"MIT"
] | 1 | 2021-06-28T17:02:36.000Z | 2021-06-28T17:02:36.000Z | pygubu/widgets/dialog.py | timgates42/pygubu | 15c91f5402519ddf74c7212012c2e8d9f1889e5e | [
"MIT"
] | null | null | null | pygubu/widgets/dialog.py | timgates42/pygubu | 15c91f5402519ddf74c7212012c2e8d9f1889e5e | [
"MIT"
] | null | null | null | # encoding: UTF-8
from __future__ import unicode_literals
try:
import tkinter as tk
import tkinter.ttk as ttk
except:
import Tkinter as tk
import ttk
class Dialog(object):
"""
Virtual events:
<<DialogClose>>
"""
def __init__(self, parent, modal=False):
self.parent = pa... | 27.232558 | 86 | 0.579633 |
08c0cb6d38d964bfbd69b1c5e513dcc85d363652 | 3,405 | py | Python | imperative/python/test/integration/test_converge.py | chenls/MegEngine | 3f783aba4b81ab628ad911d0c66a49d163a8aaf6 | [
"Apache-2.0"
] | 3 | 2021-08-08T12:55:53.000Z | 2021-12-10T06:01:04.000Z | imperative/python/test/integration/test_converge.py | MediosZ/MegEngine | 5c775d02dd0b8f20b5acc6b400cf722e92f2e86b | [
"Apache-2.0"
] | 6 | 2020-04-24T08:52:06.000Z | 2021-08-16T06:38:23.000Z | imperative/python/test/integration/test_converge.py | MediosZ/MegEngine | 5c775d02dd0b8f20b5acc6b400cf722e92f2e86b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2021 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... | 29.868421 | 88 | 0.624963 |
5a29e6852db5f3f6f66d1816c2a7a4e07779f8ce | 17,068 | py | Python | cinder/db/sqlalchemy/models.py | Thingee/cinder | 721e657073d73d639619f839d935a463d32b59b5 | [
"Apache-2.0"
] | 1 | 2015-11-25T10:18:28.000Z | 2015-11-25T10:18:28.000Z | cinder/db/sqlalchemy/models.py | NeCTAR-RC/cinder | e01da23febc530de218ed8eed6737add150c1587 | [
"Apache-2.0"
] | null | null | null | cinder/db/sqlalchemy/models.py | NeCTAR-RC/cinder | e01da23febc530de218ed8eed6737add150c1587 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Piston Cloud Computing, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (... | 34.691057 | 78 | 0.635458 |
54176540a60adf6e3b22df517cd91e8eb5f1f68f | 1,909 | py | Python | deep-learning-algorithms/regressao-games.py | RichardOkubo/DS-Scripts | adf3845802b52e8901d381ffff60f9c1276dabe1 | [
"MIT"
] | null | null | null | deep-learning-algorithms/regressao-games.py | RichardOkubo/DS-Scripts | adf3845802b52e8901d381ffff60f9c1276dabe1 | [
"MIT"
] | null | null | null | deep-learning-algorithms/regressao-games.py | RichardOkubo/DS-Scripts | adf3845802b52e8901d381ffff60f9c1276dabe1 | [
"MIT"
] | null | null | null | import pandas as pd
from keras.layers import Dense, Dropout, Activation, Input
from keras.models import Model
base = pd.read_csv('games.csv')
base = base.drop('Other_Sales', axis = 1)
base = base.drop('Global_Sales', axis = 1)
base = base.drop('Developer', axis = 1)
base = base.dropna(axis = 0)
base = base.loc[base['... | 24.474359 | 74 | 0.705605 |
31a6aa13864cbde158bb3db2d6f548f46f294ab8 | 413,850 | py | Python | tests/python/unittest/test_operator.py | Rivendile/incubator-mxnet | b1b50210f3a9befe421063d3878d43d03c15cf1f | [
"Apache-2.0"
] | 1 | 2020-12-12T22:17:26.000Z | 2020-12-12T22:17:26.000Z | tests/python/unittest/test_operator.py | Rivendile/incubator-mxnet | b1b50210f3a9befe421063d3878d43d03c15cf1f | [
"Apache-2.0"
] | null | null | null | tests/python/unittest/test_operator.py | Rivendile/incubator-mxnet | b1b50210f3a9befe421063d3878d43d03c15cf1f | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 43.928458 | 173 | 0.574597 |
58d75031d15491108c1d4162b717da00e24a3f8c | 18,296 | py | Python | Scripts/Maperipy/gzip.py | cojalvo/Map | 50fcd7d33bfdaf63c014a53f57b898d146b80da0 | [
"MIT"
] | 2 | 2019-02-19T04:22:31.000Z | 2021-04-05T19:29:59.000Z | Scripts/Maperipy/gzip.py | cojalvo/Map | 50fcd7d33bfdaf63c014a53f57b898d146b80da0 | [
"MIT"
] | null | null | null | Scripts/Maperipy/gzip.py | cojalvo/Map | 50fcd7d33bfdaf63c014a53f57b898d146b80da0 | [
"MIT"
] | 2 | 2022-01-23T09:39:57.000Z | 2022-01-23T09:45:46.000Z | # https://bitbucket.org/jdhardy/ironpythonzlib/src/tip/tests/gzip.py
"""Functions that read and write gzipped files.
The user of the file doesn't have to worry about the compression,
but random access is not allowed."""
# based on Andrew Kuchling's minigzip.py distributed with the zlib module
import struct, sys, ti... | 35.734375 | 79 | 0.554875 |
1061dd55b30ce214a55ea77b3baf527027aa6194 | 2,318 | py | Python | data/p4VQE/R1/benchmark/startQiskit_Class8.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R1/benchmark/startQiskit_Class8.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R1/benchmark/startQiskit_Class8.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=3
# total number=7
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
import networkx as nx
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collection... | 26.953488 | 118 | 0.634167 |
fec819a88e07a8155dfa881805dbb97b12355b70 | 1,214 | py | Python | cirq-core/cirq/ops/tags.py | kevinsung/Cirq | 5ee7ff62428d7242ff041d00305116fc78d9f784 | [
"Apache-2.0"
] | 1 | 2022-02-02T07:13:54.000Z | 2022-02-02T07:13:54.000Z | cirq-core/cirq/ops/tags.py | bradyb/Cirq | 610b0d4ea3a7862169610797266734c844ddcc1f | [
"Apache-2.0"
] | 1 | 2021-03-11T21:05:42.000Z | 2021-03-17T19:44:34.000Z | cirq-core/cirq/ops/tags.py | bradyb/Cirq | 610b0d4ea3a7862169610797266734c844ddcc1f | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 32.810811 | 79 | 0.715815 |
cddd058e244da328ca61281ae4273b36b35dc16e | 4,972 | py | Python | Projects/Client-Server-Application/udp_client.py | CristianCotovanu/PCom | 359fe9f2043002e6cfec395660614b0cdb80b9e6 | [
"MIT"
] | null | null | null | Projects/Client-Server-Application/udp_client.py | CristianCotovanu/PCom | 359fe9f2043002e6cfec395660614b0cdb80b9e6 | [
"MIT"
] | null | null | null | Projects/Client-Server-Application/udp_client.py | CristianCotovanu/PCom | 359fe9f2043002e6cfec395660614b0cdb80b9e6 | [
"MIT"
] | null | null | null | import socket
import base64
import sys
import random
import time
import json
import os
import argparse
from ipaddress import ip_address
from utils.unpriv_port import unprivileged_port_type, get_unprivileged_port_meta
import textwrap
def setup_parser():
def get_mode_help():
return textwrap.dedent(
... | 38.542636 | 114 | 0.663113 |
7009116268b1f9c3624d5b7e4a3a48f82b020c14 | 22,726 | py | Python | satchmo/apps/payment/forms.py | funwhilelost/satchmo | 589a5d797533ea15dfde9af7f36e304092d22a94 | [
"BSD-3-Clause"
] | null | null | null | satchmo/apps/payment/forms.py | funwhilelost/satchmo | 589a5d797533ea15dfde9af7f36e304092d22a94 | [
"BSD-3-Clause"
] | null | null | null | satchmo/apps/payment/forms.py | funwhilelost/satchmo | 589a5d797533ea15dfde9af7f36e304092d22a94 | [
"BSD-3-Clause"
] | null | null | null | from decimal import Decimal
from django import forms
from django.template import loader
from django.template import RequestContext
from django.utils.translation import ugettext_lazy as _
from l10n.utils import moneyfmt
from livesettings import config_value, config_value_safe
from payment import signals
from payment.con... | 41.699083 | 155 | 0.628443 |
7212c2db91830da4f95a8439499b23937c88b2a2 | 713 | py | Python | trails/feeds/minerchk.py | prasanthc41m/nidds | 29da0b4e4640a439ec4b7c3ac9773136ccba9790 | [
"MIT"
] | 3 | 2021-05-30T20:06:23.000Z | 2022-02-09T11:28:42.000Z | trails/feeds/minerchk.py | prasanthc41m/nidds | 29da0b4e4640a439ec4b7c3ac9773136ccba9790 | [
"MIT"
] | null | null | null | trails/feeds/minerchk.py | prasanthc41m/nidds | 29da0b4e4640a439ec4b7c3ac9773136ccba9790 | [
"MIT"
] | 1 | 2021-04-27T04:17:58.000Z | 2021-04-27T04:17:58.000Z | #!/usr/bin/env python
"""
Copyright (c) 2020 NIDDS developers (https://github.com/prasanthc41m/nidds/)
See the file 'LICENSE' for copying permission
"""
from core.common import retrieve_content
__url__ = "https://raw.githubusercontent.com/Hestat/minerchk/master/hostslist.txt"
__check__ = ".com"
__info__ = "crypto mi... | 26.407407 | 82 | 0.660589 |
fbb8c33f865ec548617ec412db0150013858e6f7 | 1,516 | py | Python | utc_conversion.py | clinstid/energydash | cccba0bdb34659f4a57b85f286d34cb1252f9307 | [
"Apache-2.0"
] | null | null | null | utc_conversion.py | clinstid/energydash | cccba0bdb34659f4a57b85f286d34cb1252f9307 | [
"Apache-2.0"
] | null | null | null | utc_conversion.py | clinstid/energydash | cccba0bdb34659f4a57b85f286d34cb1252f9307 | [
"Apache-2.0"
] | 2 | 2019-03-10T12:45:30.000Z | 2019-09-07T06:42:24.000Z | #!/usr/bin/env python
################################################################################
# file: utc_conversion.py
# description: UTC and other date/time conversion utilities
################################################################################
# Copyright 2013 Chris Linstid
#
# License... | 38.871795 | 80 | 0.627309 |
9aed79e0a333762b9301764e9c5d096e67b37036 | 2,966 | py | Python | actions/host_get.py | lionelseydoux/stackstorm-vsphere | a001a54dfab844878473bf9b040cef0ec36fb210 | [
"Apache-2.0"
] | null | null | null | actions/host_get.py | lionelseydoux/stackstorm-vsphere | a001a54dfab844878473bf9b040cef0ec36fb210 | [
"Apache-2.0"
] | 2 | 2019-03-25T18:03:02.000Z | 2019-03-26T13:13:59.000Z | actions/host_get.py | lionelseydoux/stackstorm-vsphere | a001a54dfab844878473bf9b040cef0ec36fb210 | [
"Apache-2.0"
] | 1 | 2021-03-05T10:12:21.000Z | 2021-03-05T10:12:21.000Z | # 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... | 38.025641 | 91 | 0.624073 |
9e2184f1d82e7a429568d7e3c6bb4097d5d0cdbc | 18,500 | py | Python | trimesh/caching.py | hroncok/trimesh | 85c6af12f8bfdf7d3e6c0b8fa553142a9d4219fe | [
"MIT"
] | 1 | 2018-10-01T01:56:16.000Z | 2018-10-01T01:56:16.000Z | trimesh/caching.py | hroncok/trimesh | 85c6af12f8bfdf7d3e6c0b8fa553142a9d4219fe | [
"MIT"
] | null | null | null | trimesh/caching.py | hroncok/trimesh | 85c6af12f8bfdf7d3e6c0b8fa553142a9d4219fe | [
"MIT"
] | null | null | null | """
caching.py
-----------
Functions and classes that help with tracking changes in ndarrays
and clearing cached values based on those changes.
"""
import numpy as np
import zlib
import time
import hashlib
from functools import wraps
from .constants import log
from .util import is_sequence
try:
# xxhash is ro... | 29.505582 | 74 | 0.544811 |
62dab2b5546c275da8426483bc00f338c3449709 | 1,757 | py | Python | chaosimp/clients/cloud_formation.py | chaosops-oss/chaosimp | e5952b749d176ee6fce9b499b1fc471a8075df71 | [
"Apache-2.0"
] | 1 | 2021-04-16T20:23:11.000Z | 2021-04-16T20:23:11.000Z | chaosimp/clients/cloud_formation.py | chaosops-oss/chaosimp | e5952b749d176ee6fce9b499b1fc471a8075df71 | [
"Apache-2.0"
] | null | null | null | chaosimp/clients/cloud_formation.py | chaosops-oss/chaosimp | e5952b749d176ee6fce9b499b1fc471a8075df71 | [
"Apache-2.0"
] | null | null | null | import boto3
from troposphere import Template
from chaosimp.name_constants import *
from chaosimp.decorators import handle_exception
class CloudFormation:
def __init__(self):
self.cf_resource = boto3.resource('cloudformation')
self.cf_client = self.cf_resource.meta.client
@handle_exception
... | 30.824561 | 116 | 0.589641 |
98adf2065e6c428b036f09c360f2ed736aa0c12b | 5,495 | py | Python | csdn/blog_star_user.py | Adsryen/python-spiders | 005513c78e82eaa3671d584c58a35b009aa7fd01 | [
"MIT"
] | 31 | 2022-01-02T11:35:36.000Z | 2022-03-26T16:56:08.000Z | csdn/blog_star_user.py | Adsryen/python-spiders | 005513c78e82eaa3671d584c58a35b009aa7fd01 | [
"MIT"
] | null | null | null | csdn/blog_star_user.py | Adsryen/python-spiders | 005513c78e82eaa3671d584c58a35b009aa7fd01 | [
"MIT"
] | 12 | 2022-01-07T04:04:57.000Z | 2022-03-29T08:22:24.000Z | #!/usr/bin/env python
# encoding: utf-8
'''
#-------------------------------------------------------------------
# CONFIDENTIAL --- CUSTOM STUDIOS
#-------------------------------------------------------------------
#
# @Project Name : 导出2021博客之星给你点赞的用户
#
# ... | 37.896552 | 140 | 0.458599 |
bafcbec9acacab4beae89666255ecf5c33035107 | 120 | py | Python | webapp/admin.py | simo97/PushBack | 6d66c65d3c13956f33a2b723dd9159bf48deee12 | [
"MIT"
] | 14 | 2018-12-29T11:11:07.000Z | 2020-10-19T12:24:18.000Z | webapp/admin.py | simo97/PushBack | 6d66c65d3c13956f33a2b723dd9159bf48deee12 | [
"MIT"
] | 7 | 2019-01-03T00:17:55.000Z | 2022-02-11T03:41:45.000Z | webapp/admin.py | simo97/PushBack | 6d66c65d3c13956f33a2b723dd9159bf48deee12 | [
"MIT"
] | 3 | 2019-01-04T23:21:01.000Z | 2020-07-08T15:48:02.000Z | from django.contrib import admin
from .models import Account
# Register your models here.
admin.site.register(Account) | 20 | 32 | 0.808333 |
470b82a1389643eded862261d0f38a66e716c512 | 4,336 | py | Python | ameilisearch/_httprequests.py | SaidBySolo/ameilisearch | 017883b6c480e2e3633b8474060387c59588f357 | [
"MIT"
] | null | null | null | ameilisearch/_httprequests.py | SaidBySolo/ameilisearch | 017883b6c480e2e3633b8474060387c59588f357 | [
"MIT"
] | null | null | null | ameilisearch/_httprequests.py | SaidBySolo/ameilisearch | 017883b6c480e2e3633b8474060387c59588f357 | [
"MIT"
] | null | null | null | import json
from typing import Any, Dict, List, Optional, Type, Union
from types import TracebackType
from aiohttp.client_reqrep import ClientResponse
try:
from typing import Literal
except ImportError:
from typing_extensions import Literal
from aiohttp.client import ClientConnectionError, ClientResponseError... | 32.848485 | 91 | 0.594788 |
f4cb512abb0a211772db9370c16f72aaa5d63882 | 11,660 | py | Python | lsh-py/floky/__init__.py | bwindsor22/lsh-rs | c89ae534f25e286f8a5e164eb5a94d652e1a4d0a | [
"MIT"
] | 52 | 2020-04-06T19:37:50.000Z | 2022-02-21T18:41:35.000Z | lsh-py/floky/__init__.py | bwindsor22/lsh-rs | c89ae534f25e286f8a5e164eb5a94d652e1a4d0a | [
"MIT"
] | 11 | 2020-04-28T14:43:33.000Z | 2021-07-11T08:56:04.000Z | lsh-py/floky/__init__.py | bwindsor22/lsh-rs | c89ae534f25e286f8a5e164eb5a94d652e1a4d0a | [
"MIT"
] | 10 | 2020-04-27T20:16:52.000Z | 2021-10-13T03:23:08.000Z | from .floky import LshL2, LshSrp, LshSrpMem, LshL2Mem, sort_by_distances
from tqdm import tqdm
import numpy as np
import os
from collections import namedtuple
from typing import Union, List
QueryResult = namedtuple(
"QueryResult", ["index", "vectors", "n_collisions", "distances"]
)
class Base:
def __init__(... | 26.928406 | 112 | 0.523156 |
515f02eeb1e9d37ba799987998c7f66e7d6ba95c | 2,204 | py | Python | ucscsdk/mometa/vnic/VnicNetGroup.py | parag-may4/ucscsdk | 2ea762fa070330e3a4e2c21b46b157469555405b | [
"Apache-2.0"
] | 9 | 2016-12-22T08:39:25.000Z | 2019-09-10T15:36:19.000Z | ucscsdk/mometa/vnic/VnicNetGroup.py | parag-may4/ucscsdk | 2ea762fa070330e3a4e2c21b46b157469555405b | [
"Apache-2.0"
] | 10 | 2017-01-31T06:59:56.000Z | 2021-11-09T09:14:37.000Z | ucscsdk/mometa/vnic/VnicNetGroup.py | parag-may4/ucscsdk | 2ea762fa070330e3a4e2c21b46b157469555405b | [
"Apache-2.0"
] | 13 | 2016-11-14T07:42:58.000Z | 2022-02-10T17:32:05.000Z | """This module contains the general information for VnicNetGroup ManagedObject."""
from ...ucscmo import ManagedObject
from ...ucsccoremeta import UcscVersion, MoPropertyMeta, MoMeta
from ...ucscmeta import VersionMeta
class VnicNetGroupConsts():
pass
class VnicNetGroup(ManagedObject):
"""This is VnicNetGr... | 46.893617 | 249 | 0.65245 |
6cdbe34e121a0e9e2943b6c7bdfd3fbbf2ce0230 | 1,183 | py | Python | test/test_file_dto.py | unofficial-memsource/memsource-cli-client | a6639506b74e95476da87f4375953448b76ea90c | [
"Apache-2.0"
] | 16 | 2019-09-25T00:20:38.000Z | 2021-05-04T05:56:10.000Z | test/test_file_dto.py | zerodayz/memsource-cli-client | c2574f1467539a49e6637c874e88d75c7ef789b3 | [
"Apache-2.0"
] | 26 | 2019-09-30T14:00:03.000Z | 2021-05-12T11:15:18.000Z | test/test_file_dto.py | zerodayz/memsource-cli-client | c2574f1467539a49e6637c874e88d75c7ef789b3 | [
"Apache-2.0"
] | 1 | 2021-05-24T16:19:14.000Z | 2021-05-24T16:19:14.000Z | # coding: utf-8
"""
Memsource REST API
Welcome to Memsource's API documentation. To view our legacy APIs please [visit our documentation](https://wiki.memsource.com/wiki/Memsource_API) and for more information about our new APIs, [visit our blog](https://www.memsource.com/blog/2017/10/24/introducing-rest-apis... | 28.853659 | 421 | 0.71344 |
4785e2e2c56dc0a34b6061637163ea617c07d5d0 | 9,856 | py | Python | playGame.py | danielGoldsteinCS2021/Connect4-Deep-Reinforcement-Learning | 9465b7ef4df645d1605d890881be08915eac7597 | [
"MIT"
] | null | null | null | playGame.py | danielGoldsteinCS2021/Connect4-Deep-Reinforcement-Learning | 9465b7ef4df645d1605d890881be08915eac7597 | [
"MIT"
] | null | null | null | playGame.py | danielGoldsteinCS2021/Connect4-Deep-Reinforcement-Learning | 9465b7ef4df645d1605d890881be08915eac7597 | [
"MIT"
] | null | null | null | import sys
import connect4_MCTS
import pygame
class Difficulty:
EASY = 60
MEDIUM = 1000
HARD = 5000
# Connect 4 class that is used to maintain information for the pygame display. It wraps the MCTS functionality.
class Connect4:
def __init__(self, size):
# Pygame initialization
pyga... | 42.666667 | 149 | 0.536425 |
ceb3f065d68a159e9c0e2fbdec5e06a068d407b4 | 2,091 | py | Python | Python/008_download_and_convert_b23_subtitle.py | ttjiaa/backup-utils | caed3df0b48845aeebe6dd70703f0b7c5bfc2bd7 | [
"MIT"
] | 20 | 2020-02-13T02:08:57.000Z | 2022-02-05T05:53:53.000Z | Python/008_download_and_convert_b23_subtitle.py | ttjiaa/backup-utils | caed3df0b48845aeebe6dd70703f0b7c5bfc2bd7 | [
"MIT"
] | 2 | 2020-11-13T06:55:38.000Z | 2021-07-21T10:18:34.000Z | Python/008_download_and_convert_b23_subtitle.py | ttjiaa/backup-utils | caed3df0b48845aeebe6dd70703f0b7c5bfc2bd7 | [
"MIT"
] | 10 | 2020-05-19T10:26:49.000Z | 2022-01-20T03:52:58.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date : 2020-01-08 11:32:09
# @Author : Lewis Tian (taseikyo@gmail.com)
# @Link : github.com/taseikyo
# @Version : python3.8
"""
download & convert bilibili cc subtitles
to srt subtitle format
"""
import re
import requests
def obtain_cc_subtitle(vid: str = "") ... | 27.88 | 88 | 0.6088 |
bf1aedae6f6c12bbfb6662273e83168ea48865c3 | 28,043 | py | Python | lib/db_config.py | hep-gc/cloudscheduler | 2f6afab61e2404920b33279b6ebfbc09c7bddfa1 | [
"Apache-2.0"
] | 3 | 2020-03-03T03:25:36.000Z | 2021-12-03T15:31:39.000Z | lib/db_config.py | hep-gc/cloudscheduler | 2f6afab61e2404920b33279b6ebfbc09c7bddfa1 | [
"Apache-2.0"
] | 341 | 2017-06-08T17:27:59.000Z | 2022-01-28T19:37:57.000Z | lib/db_config.py | hep-gc/cloudscheduler | 2f6afab61e2404920b33279b6ebfbc09c7bddfa1 | [
"Apache-2.0"
] | 3 | 2018-04-25T16:13:20.000Z | 2020-04-15T20:03:46.000Z | """
DB utilities and configuration.
"""
import cloudscheduler.lib.schema as schema_na
import logging
import os
import signal
import socket
import sys
import time
import yaml
import ipaddress
from subprocess import Popen, PIPE
from inspect import stack
import mysql.connector
class Config:
def __init__(self, db_... | 38.467764 | 196 | 0.528617 |
98d1e647306918d6a3123f27bde3245b208a8eee | 5,207 | py | Python | seq2seq/models/gated_arcii.py | posuer/Seq2SeqLearning | f89e9d10023299762023f83b3f3af18ffdc3ea9b | [
"Apache-2.0"
] | 1 | 2020-11-08T13:58:40.000Z | 2020-11-08T13:58:40.000Z | seq2seq/models/gated_arcii.py | posuer/Seq2SeqLearning | f89e9d10023299762023f83b3f3af18ffdc3ea9b | [
"Apache-2.0"
] | null | null | null | seq2seq/models/gated_arcii.py | posuer/Seq2SeqLearning | f89e9d10023299762023f83b3f3af18ffdc3ea9b | [
"Apache-2.0"
] | 1 | 2020-11-08T13:58:43.000Z | 2020-11-08T13:58:43.000Z | # -*- coding=utf-8 -*-
from __future__ import absolute_import
from __future__ import print_function
from keras.layers import *
from keras.layers import Reshape, Embedding
from keras.models import Sequential, Model
from layers.Gated import *
from layers.Match import *
from model import BasicModel
from utils.utility im... | 41.325397 | 118 | 0.578644 |
4bb63c8fbd393b3e60aa518345aaef8aa128f816 | 680 | py | Python | setup.py | toyourheart163/thiscn | ef3a15ff76679583fb662fbfc8888bb0c936e27d | [
"MIT"
] | null | null | null | setup.py | toyourheart163/thiscn | ef3a15ff76679583fb662fbfc8888bb0c936e27d | [
"MIT"
] | null | null | null | setup.py | toyourheart163/thiscn | ef3a15ff76679583fb662fbfc8888bb0c936e27d | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="thiscn", # Replace with your own username
version="0.0.2",
author="Mikele",
author_email="blive200@gmail.com",
description="The zen of Python, English and Chinese.",
long_description=l... | 29.565217 | 58 | 0.666176 |
70ab4d335a35ebf8d5323fc83f3cd2f41848f3ec | 4,368 | py | Python | ormar_casbin_adapter/adapter.py | shepilov-vladislav/ormar-casbin-adapter | c3bbbfcaf9525f575982f9659fbef46887333cd7 | [
"Apache-2.0"
] | 1 | 2022-02-20T00:09:52.000Z | 2022-02-20T00:09:52.000Z | ormar_casbin_adapter/adapter.py | shepilov-vladislav/ormar-casbin-adapter | c3bbbfcaf9525f575982f9659fbef46887333cd7 | [
"Apache-2.0"
] | null | null | null | ormar_casbin_adapter/adapter.py | shepilov-vladislav/ormar-casbin-adapter | c3bbbfcaf9525f575982f9659fbef46887333cd7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Thirdparty:
import ormar
from casbin import Model, persist
class Filter: # pylint: disable=too-few-public-methods
"""
Filter class for ormar-based Casbin adapter.
"""
ptype: list[str] = []
v0: list[str] = []
v1: list[str] = []
v2: list[str] = []
v3: list[st... | 33.343511 | 87 | 0.576007 |
87056d5d7b0aff3710db5ee8f48e3ff86808be9d | 1,130 | py | Python | odmtp/modules/mapper_github_xr2rml.py | benjimor/odmtrip-tpf | cd6d4deef23441bedf85fb3773e5a952f48fe11d | [
"MIT"
] | 17 | 2017-10-23T18:41:20.000Z | 2020-08-25T23:36:51.000Z | odmtp/modules/mapper_github_xr2rml.py | benjimor/odmtrip-tpf | cd6d4deef23441bedf85fb3773e5a952f48fe11d | [
"MIT"
] | 1 | 2018-06-11T08:09:20.000Z | 2018-06-11T08:09:20.000Z | odmtp/modules/mapper_github_xr2rml.py | benjimor/odmtrip-tpf | cd6d4deef23441bedf85fb3773e5a952f48fe11d | [
"MIT"
] | 3 | 2017-07-27T05:23:20.000Z | 2018-04-27T14:43:41.000Z | from jsonpath_rw import parse
from rdflib import URIRef, Literal
from odmtp.modules.mapper import Mapper
class MapperGithubXr2rml(Mapper):
def result_set_2_rdf(self, result_set, reduced_mapping, fragment):
for repo in result_set:
for s, p, o in reduced_mapping.mapping:
subjec... | 45.2 | 128 | 0.592035 |
a5e512282d54012f2e47c215a58aaa1474a96484 | 1,327 | py | Python | projects/forms.py | Ngapa/upkoding | 07e235869a94a7a17f37bc064c31ac2628440e58 | [
"MIT"
] | null | null | null | projects/forms.py | Ngapa/upkoding | 07e235869a94a7a17f37bc064c31ac2628440e58 | [
"MIT"
] | null | null | null | projects/forms.py | Ngapa/upkoding | 07e235869a94a7a17f37bc064c31ac2628440e58 | [
"MIT"
] | null | null | null | from django import forms
from django.contrib.auth.models import User
from django.core.exceptions import ValidationError
from .models import UserProject
class UserProjectReviewRequestForm(forms.ModelForm):
kind = forms.CharField(widget=forms.HiddenInput(),
initial='review_request')
... | 32.365854 | 74 | 0.664657 |
fb7e6e85f1f882cdbd9ce16ddb0eebff6a4256de | 4,616 | py | Python | tegaki/googleapis.py | RShirohara/handwriting_detection | f24aba8ac695fef064d090db78229ab482f342cd | [
"MIT"
] | null | null | null | tegaki/googleapis.py | RShirohara/handwriting_detection | f24aba8ac695fef064d090db78229ab482f342cd | [
"MIT"
] | 1 | 2021-02-24T00:31:12.000Z | 2021-02-26T00:11:24.000Z | tegaki/googleapis.py | RShirohara/handwriting_detection | f24aba8ac695fef064d090db78229ab482f342cd | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# author: @RShirohara
from typing import NamedTuple
import cv2
from google.cloud import texttospeech, vision
from .util import EventThread
class DetectedText(NamedTuple):
text: str
lang: str = "ja_JP"
class GoogleOCR:
"""Google Cloud Vision OCR api wrapper.
Attributes:
... | 27.313609 | 77 | 0.571057 |
ad1436b27d3995838d7dfc9e7f3a5109d7c39ee1 | 94 | py | Python | tests/test_A001221.py | danielsimonney/oeis | 16c1dd6e058e49b629f695acb82ec55dd5f052f9 | [
"MIT"
] | null | null | null | tests/test_A001221.py | danielsimonney/oeis | 16c1dd6e058e49b629f695acb82ec55dd5f052f9 | [
"MIT"
] | null | null | null | tests/test_A001221.py | danielsimonney/oeis | 16c1dd6e058e49b629f695acb82ec55dd5f052f9 | [
"MIT"
] | null | null | null | from oeis import A001221
def test_A001221():
assert A001221(1, 6) == [0, 1, 1, 1, 1, 2]
| 15.666667 | 46 | 0.606383 |
bf06a3dcd4ae83faddb3bb232a603a7bc0847121 | 1,874 | py | Python | housekeeper/githelper.py | tuenti/housekeeper | 00ccc51ab29ffcbb1ff4ec2cdc948b4db9dea388 | [
"MIT"
] | 1 | 2015-05-18T23:03:47.000Z | 2015-05-18T23:03:47.000Z | housekeeper/githelper.py | jsoriano/housekeeper | 00ccc51ab29ffcbb1ff4ec2cdc948b4db9dea388 | [
"MIT"
] | null | null | null | housekeeper/githelper.py | jsoriano/housekeeper | 00ccc51ab29ffcbb1ff4ec2cdc948b4db9dea388 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2012 Tuenti Technologies
# See LICENSE for details
import os
import os.path
import sys
from client import HousekeeperClient, HousekeeperClientException
def get_request():
request = {}
while True:
line = sys.stdin.readline()
if not line.strip():
br... | 25.324324 | 65 | 0.60619 |
ca73d711909299df0a95c7464b0d7c1f8fa5ebbc | 1,183 | py | Python | pycs/spells/sacred_flame.py | dwagon/pycs | 4d02acbf380526d3bf0380f6bb8b757a827024b8 | [
"MIT"
] | null | null | null | pycs/spells/sacred_flame.py | dwagon/pycs | 4d02acbf380526d3bf0380f6bb8b757a827024b8 | [
"MIT"
] | null | null | null | pycs/spells/sacred_flame.py | dwagon/pycs | 4d02acbf380526d3bf0380f6bb8b757a827024b8 | [
"MIT"
] | null | null | null | """ https://www.dndbeyond.com/spells/sacred-flame"""
from pycs.spell import AttackSpell
from pycs.constant import DamageType
from pycs.constant import Stat
from pycs.constant import SpellType
##############################################################################
class SacredFlame(AttackSpell):
"""Flame-l... | 31.972973 | 79 | 0.519019 |
f967996554df41c559669544472f5b52d336ea04 | 1,845 | py | Python | pi/Portal/pimain.py | Fozzy0007/mini-bugs | 3cd722f1d6384c7afa43f199dcf6fb2b4351acf3 | [
"MIT"
] | null | null | null | pi/Portal/pimain.py | Fozzy0007/mini-bugs | 3cd722f1d6384c7afa43f199dcf6fb2b4351acf3 | [
"MIT"
] | null | null | null | pi/Portal/pimain.py | Fozzy0007/mini-bugs | 3cd722f1d6384c7afa43f199dcf6fb2b4351acf3 | [
"MIT"
] | null | null | null | from adafruit_ble import BLERadio
from adafruit_ble.services.nordic import UARTService
from BugPacket import BugCommandFactory, EchoRequest, EchoResponse
import time
ble = BLERadio()
print("scanning")
found = set()
scan_responses = set()
for advertisement in ble.start_scan():
addr = advertisement.address
i... | 30.75 | 66 | 0.623848 |
e0f2f5e42089d62fcfa1065dff3b208e89ea441b | 1,917 | py | Python | gcs_sa/logging.py | rsalmond/gcs-audit-log-smart-archive | 9e6775cf76b56aff7a34cef6bebd60439fd8cd5e | [
"Apache-2.0"
] | null | null | null | gcs_sa/logging.py | rsalmond/gcs-audit-log-smart-archive | 9e6775cf76b56aff7a34cef6bebd60439fd8cd5e | [
"Apache-2.0"
] | null | null | null | gcs_sa/logging.py | rsalmond/gcs-audit-log-smart-archive | 9e6775cf76b56aff7a34cef6bebd60439fd8cd5e | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 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 agreed to in writing, s... | 31.95 | 74 | 0.701095 |
3c06ed84cad1eddfd21dc9ef0d321ea325f94d3d | 725 | py | Python | config.py | lstil/mtprotoproxy | b3eb8edf8ca06904481005db84d95cb292751ce5 | [
"MIT"
] | 1 | 2021-05-06T18:07:26.000Z | 2021-05-06T18:07:26.000Z | config.py | lstil/mtprotoproxy | b3eb8edf8ca06904481005db84d95cb292751ce5 | [
"MIT"
] | null | null | null | config.py | lstil/mtprotoproxy | b3eb8edf8ca06904481005db84d95cb292751ce5 | [
"MIT"
] | null | null | null | PORT = 443
TO_CLT_BUFSIZE = 262144
TO_TG_BUFSIZE = 262144
# name -> secret (32 hex chars)
USERS = {
"tg": "42aad8aa14b76f7bd88d381eeb5a896f",
# "tg2": "0123456789abcdef0123456789abcdef",
}
MODES = {
# Classic mode, easy to detect
"classic": False,
# Makes the proxy harder to detect
# Can be... | 23.387097 | 56 | 0.704828 |
c9bd69ac157568c58405dab13305fe6bf827db06 | 6,712 | py | Python | labs/lab2_qmc_basics/your_system/reference/example.py | prckent/qmcpack | 127caf219ee99c2449b803821fcc8b1304b66ee1 | [
"NCSA"
] | null | null | null | labs/lab2_qmc_basics/your_system/reference/example.py | prckent/qmcpack | 127caf219ee99c2449b803821fcc8b1304b66ee1 | [
"NCSA"
] | 1 | 2020-04-10T15:33:28.000Z | 2020-04-10T15:35:59.000Z | labs/lab2_qmc_basics/your_system/reference/example.py | prckent/qmcpack | 127caf219ee99c2449b803821fcc8b1304b66ee1 | [
"NCSA"
] | 1 | 2019-07-23T17:44:39.000Z | 2019-07-23T17:44:39.000Z | #! /usr/bin/env python
# import project suite functions
from project import settings,Job,run_project,get_machine
from project import generate_physical_system
from project import generate_pwscf
from project import generate_pw2qmcpack
from project import generate_qmcpack,vmc,loop,linear,dmc
# project suite settings
set... | 31.660377 | 75 | 0.528605 |
4341ccc9f54908ae1dd17139199914066b5636ca | 8,704 | py | Python | yolov5_roadcondition/streaming_detected.py | p513817/JetsonNano_yolov5 | 404ad958dd2911672cedd421c023a37f2e044d8e | [
"MIT"
] | 5 | 2021-03-04T08:24:48.000Z | 2022-01-03T16:24:44.000Z | yolov5_roadcondition/streaming_detected.py | p513817/JetsonNano_yolov5 | 404ad958dd2911672cedd421c023a37f2e044d8e | [
"MIT"
] | 1 | 2022-02-18T17:20:44.000Z | 2022-02-21T04:42:20.000Z | yolov5_roadcondition/streaming_detected.py | p513817/JetsonNano_yolov5 | 404ad958dd2911672cedd421c023a37f2e044d8e | [
"MIT"
] | 3 | 2021-01-22T02:50:17.000Z | 2021-05-10T14:09:20.000Z | import argparse
import os
import platform
import shutil
import time
from pathlib import Path
import numpy as np
import cv2
import torch
import torch.backends.cudnn as cudnn
from numpy import random
from models.experimental import attempt_load
from utils.datasets import LoadStreams, LoadImages
from util... | 40.483721 | 169 | 0.577436 |
3335f14561a66bd29f7f070c28a9780b599cb308 | 111 | py | Python | winpid/version.py | nagylzs/winpid | 162fb8b0952716ead98a2b08c6b238625d26b23a | [
"Apache-2.0"
] | null | null | null | winpid/version.py | nagylzs/winpid | 162fb8b0952716ead98a2b08c6b238625d26b23a | [
"Apache-2.0"
] | null | null | null | winpid/version.py | nagylzs/winpid | 162fb8b0952716ead98a2b08c6b238625d26b23a | [
"Apache-2.0"
] | null | null | null | MAJOR = 0
MINOR = 3
BUILD = 3
version = "%s.%s" % (MAJOR, MINOR)
release = "%s.%s.%s" % (MAJOR, MINOR, BUILD)
| 15.857143 | 44 | 0.558559 |
2c90a03c1e24538f9c99a9df8168f749aec70377 | 4,801 | py | Python | med_log.py | Zierman/medlog | ad0d932187d67b34895c7a74dc7deea8df1921c3 | [
"MIT"
] | null | null | null | med_log.py | Zierman/medlog | ad0d932187d67b34895c7a74dc7deea8df1921c3 | [
"MIT"
] | 2 | 2021-12-05T06:29:41.000Z | 2021-12-05T07:50:14.000Z | med_log.py | Zierman/medlog | ad0d932187d67b34895c7a74dc7deea8df1921c3 | [
"MIT"
] | null | null | null | from __future__ import annotations
from dataclasses import dataclass, Field
from datetime import datetime, timedelta
from typing import Union, Optional, Tuple, List
from parse import parse
from med import Med, MedRegistry, DOSAGE_PARSE_FORMAT
DEFAULT_LOG_FILE = 'logs/med.log'
DEFAULT_DATE_TIME_FORMAT = r'%m/%d/%Y %H... | 35.043796 | 113 | 0.656738 |
ed5530ce61ec146365c797f56e634f3819aaa112 | 2,101 | py | Python | docker_sdk_api/api/dataset_validator.py | michaelnguyen11/BMW-TensorFlow-Training-GUI | 59e07eb2fd8374831eda22165b0838335d086107 | [
"Apache-2.0"
] | 862 | 2019-12-11T18:40:48.000Z | 2022-03-29T15:23:58.000Z | docker_sdk_api/api/dataset_validator.py | michaelnguyen11/BMW-TensorFlow-Training-GUI | 59e07eb2fd8374831eda22165b0838335d086107 | [
"Apache-2.0"
] | 33 | 2019-12-20T12:57:53.000Z | 2022-03-12T01:10:15.000Z | docker_sdk_api/api/dataset_validator.py | michaelnguyen11/BMW-TensorFlow-Training-GUI | 59e07eb2fd8374831eda22165b0838335d086107 | [
"Apache-2.0"
] | 165 | 2019-12-11T20:04:22.000Z | 2022-03-29T06:18:12.000Z | import os
"""
Logic to check if a dataset is valid
Parameters
----------
dataset_folder: str
folder of the dataset
labels_type: str
labels_type
Returns
-------
Boolean
true if the dataset is valid, false otherwise
"""
def validate_dataset(dataset_folder, labels_type):
valid... | 23.875 | 97 | 0.591147 |
391d44965c14b96eb455acf08b6102f375e6e9ba | 5,105 | py | Python | mtp_api/apps/prison/tests/test_utils.py | ministryofjustice/mtp-api | b1c34c29e4aa9f48598cb060abe1368ae7686e0b | [
"MIT"
] | 5 | 2016-01-05T12:21:35.000Z | 2020-10-28T17:06:02.000Z | mtp_api/apps/prison/tests/test_utils.py | ministryofjustice/mtp-api | b1c34c29e4aa9f48598cb060abe1368ae7686e0b | [
"MIT"
] | 209 | 2015-06-12T09:39:41.000Z | 2022-03-21T16:01:19.000Z | mtp_api/apps/prison/tests/test_utils.py | ministryofjustice/mtp-api | b1c34c29e4aa9f48598cb060abe1368ae7686e0b | [
"MIT"
] | 1 | 2021-04-11T06:19:23.000Z | 2021-04-11T06:19:23.000Z | from collections import defaultdict
from copy import copy
import re
import json
from django.conf import settings
from django.test import override_settings, TestCase
import responses
from prison.models import PrisonerLocation
from prison.tests.utils import (
load_prisoner_locations_from_dev_prison_api,
random_... | 35.950704 | 98 | 0.632713 |
d367c4fcd519b3cf850beb153e4e4c41f20e7583 | 34,185 | py | Python | lib/galaxy/webapps/galaxy/buildapp.py | gmauro/galaxy-central | 52d50d1b6bbd7db821fffff89607b7c483779f3e | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/webapps/galaxy/buildapp.py | gmauro/galaxy-central | 52d50d1b6bbd7db821fffff89607b7c483779f3e | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/webapps/galaxy/buildapp.py | gmauro/galaxy-central | 52d50d1b6bbd7db821fffff89607b7c483779f3e | [
"CC-BY-3.0"
] | null | null | null | """
Provides factory methods to assemble the Galaxy web application
"""
import sys
import os
import os.path
import atexit
from paste import httpexceptions
import pkg_resources
import galaxy.app
import galaxy.model
import galaxy.model.mapping
import galaxy.datatypes.registry
import galaxy.web.framework
import galaxy.... | 49.400289 | 145 | 0.591663 |
e3410cd9142a55b8a6203ee5bfe559c1ca6ad624 | 193 | py | Python | src/0541.reverse-string-ii/reverse-string-ii.py | lyphui/Just-Code | e0c3c3ecb67cb805080ff686e88522b2bffe7741 | [
"MIT"
] | 782 | 2019-11-19T08:20:49.000Z | 2022-03-25T06:59:09.000Z | src/0541.reverse-string-ii/reverse-string-ii.py | Heitao5200/Just-Code | 5bb3ee485a103418e693b7ec8e26dc84f3691c79 | [
"MIT"
] | 1 | 2021-03-04T12:21:01.000Z | 2021-03-05T01:23:54.000Z | src/0541.reverse-string-ii/reverse-string-ii.py | Heitao5200/Just-Code | 5bb3ee485a103418e693b7ec8e26dc84f3691c79 | [
"MIT"
] | 155 | 2019-11-20T08:20:42.000Z | 2022-03-19T07:28:09.000Z | class Solution:
def reverseStr(self, s: str, k: int) -> str:
for ind in range(0, len(s), 2*k):
s = s[:ind] + s[ind:k+ind][::-1] + s[k+ind:]
return s | 32.166667 | 56 | 0.450777 |
449ca2a0eabf91ea49ef56ecda2760984498eae7 | 9,358 | py | Python | titan_client/models/event_schema_meta.py | intel471/titan-client-python | b12a2bc73604cf1a7cb0b6e97c81b5af9dee7bfe | [
"MIT"
] | 2 | 2021-08-23T08:41:44.000Z | 2021-08-29T15:09:27.000Z | titan_client/models/event_schema_meta.py | intel471/titan-client-python | b12a2bc73604cf1a7cb0b6e97c81b5af9dee7bfe | [
"MIT"
] | 1 | 2021-09-16T18:12:22.000Z | 2021-09-22T16:12:11.000Z | titan_client/models/event_schema_meta.py | intel471/titan-client-python | b12a2bc73604cf1a7cb0b6e97c81b5af9dee7bfe | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Titan API v1
# Introduction The Intel 471 API is organized around the principles of REST. Our API lets you gather results from our platform with anything that can send a HTTP request, including cURL and modern internet browsers. Access to this API requires an API token which is managed fro... | 69.318519 | 5,526 | 0.685189 |
131ec30feadb3e5953aac23982799a091a4a91cd | 3,023 | py | Python | src/python/pants/rules/core/run.py | rahuliyer95/pants | 50ee5cc8bd9ab40ad13c3c28ccbc4e7f189292ec | [
"Apache-2.0"
] | null | null | null | src/python/pants/rules/core/run.py | rahuliyer95/pants | 50ee5cc8bd9ab40ad13c3c28ccbc4e7f189292ec | [
"Apache-2.0"
] | null | null | null | src/python/pants/rules/core/run.py | rahuliyer95/pants | 50ee5cc8bd9ab40ad13c3c28ccbc4e7f189292ec | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from pathlib import PurePath
from pants.base.build_root import BuildRoot
from pants.build_graph.address import Address
from pants.engine.addressable import Addresses
from pants.engine.con... | 33.588889 | 97 | 0.708237 |
843abd470c89e75e4362329dacd842efe3edc0ae | 18,845 | py | Python | lib/galaxy/util/object_wrapper.py | bornea/galaxy-apostl-docker | e75d27103d9c48e4925708fd06b585cb5471382e | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/util/object_wrapper.py | bornea/galaxy-apostl-docker | e75d27103d9c48e4925708fd06b585cb5471382e | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/util/object_wrapper.py | bornea/galaxy-apostl-docker | e75d27103d9c48e4925708fd06b585cb5471382e | [
"CC-BY-3.0"
] | null | null | null | """
Classes for wrapping Objects and Sanitizing string output.
"""
import inspect
import logging
import string
from numbers import Number
try:
from types import NoneType
except ImportError:
NoneType = type(None)
try:
from types import NotImplementedType
except ImportError:
NotImplementedType = type(Not... | 39.925847 | 291 | 0.677103 |
cb0d3b83154cb393916129b14f7afbeebccefd75 | 1,001 | py | Python | smaller-scenarios/other-scenarios/misc_scenarios/simple_static.py | theuerse/emulation-lib-example-scenarios | 6ae7055e6b2c2171a5cda6d0e70e9129e434e990 | [
"MIT"
] | 2 | 2018-12-11T10:02:08.000Z | 2019-04-01T10:39:03.000Z | smaller-scenarios/other-scenarios/misc_scenarios/simple_static.py | theuerse/emulation-lib-example-scenarios | 6ae7055e6b2c2171a5cda6d0e70e9129e434e990 | [
"MIT"
] | null | null | null | smaller-scenarios/other-scenarios/misc_scenarios/simple_static.py | theuerse/emulation-lib-example-scenarios | 6ae7055e6b2c2171a5cda6d0e70e9129e434e990 | [
"MIT"
] | null | null | null | from emulation_lib.network_blocks.static_connection import StaticConnection
from emulation_lib.emulation import Emulation
from emulation_lib.network_blocks.static_network_block import StaticNetworkBlock
from emulation_lib.apps.udperf_app import UdperfApp
from emulation_lib.linkcmd_backends.bdl_ import BDL_
emu = Emula... | 30.333333 | 80 | 0.773227 |
b4c79b8a220d5124c82a938374a3c55de0a8bdda | 438 | py | Python | website/models/mathlete.py | pshen24/cmimc-online | 7d2435e506381fa19f3512635eb615f7a02e5f03 | [
"MIT"
] | null | null | null | website/models/mathlete.py | pshen24/cmimc-online | 7d2435e506381fa19f3512635eb615f7a02e5f03 | [
"MIT"
] | null | null | null | website/models/mathlete.py | pshen24/cmimc-online | 7d2435e506381fa19f3512635eb615f7a02e5f03 | [
"MIT"
] | null | null | null | from django.db import models
from django.conf import settings
class Mathlete(models.Model):
user = models.OneToOneField(settings.AUTH_USER_MODEL, related_name='mathlete', \
unique=True, on_delete=models.CASCADE)
def __str__(self):
return "Mathlete: {0} ({1})".format(self.user.name,... | 29.2 | 85 | 0.678082 |
90dcf09aba3839e44c2fe519d7c8ba97d316f23a | 2,238 | py | Python | netcam_aioeos/eos_get_dut.py | jeremyschulman/netcam-aioeos | ae8b46bcef1bbd86441342a9a282e404d597d662 | [
"Apache-2.0"
] | null | null | null | netcam_aioeos/eos_get_dut.py | jeremyschulman/netcam-aioeos | ae8b46bcef1bbd86441342a9a282e404d597d662 | [
"Apache-2.0"
] | null | null | null | netcam_aioeos/eos_get_dut.py | jeremyschulman/netcam-aioeos | ae8b46bcef1bbd86441342a9a282e404d597d662 | [
"Apache-2.0"
] | 1 | 2022-01-04T19:55:12.000Z | 2022-01-04T19:55:12.000Z | # Copyright 2021 Jeremy Schulman
#
# 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 ... | 33.402985 | 93 | 0.493744 |
e418b3e91b53f45c00af1ea4fc64a4ef30469150 | 4,962 | py | Python | setup.py | mrkajetanp/lisa | 15cfbc430f46b59f52a9d13769d0f6791ed6f154 | [
"Apache-2.0"
] | null | null | null | setup.py | mrkajetanp/lisa | 15cfbc430f46b59f52a9d13769d0f6791ed6f154 | [
"Apache-2.0"
] | null | null | null | setup.py | mrkajetanp/lisa | 15cfbc430f46b59f52a9d13769d0f6791ed6f154 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python3
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (C) 2018, Arm Limited and contributors.
#
# 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/l... | 28.517241 | 89 | 0.632003 |
b4157d0cd643d23d50a8dd7dd0b0916bc9f5af50 | 9,191 | py | Python | vh-nginx/nginx.py | UlasSAYGIN/ajenti-v | 8dcebd6c48849cd2333768bbc75736dc3d06da28 | [
"MIT"
] | 1 | 2022-02-17T12:05:19.000Z | 2022-02-17T12:05:19.000Z | vh-nginx/nginx.py | UlasSAYGIN/ajenti-v | 8dcebd6c48849cd2333768bbc75736dc3d06da28 | [
"MIT"
] | null | null | null | vh-nginx/nginx.py | UlasSAYGIN/ajenti-v | 8dcebd6c48849cd2333768bbc75736dc3d06da28 | [
"MIT"
] | null | null | null | import os
import shutil
import subprocess
from ajenti.api import *
from ajenti.plugins.services.api import ServiceMultiplexor
from ajenti.plugins.vh.api import WebserverComponent, SanityCheck, Restartable
from nginx_templates import *
@plugin
class NginxConfigTest (SanityCheck):
def init(self):
self.typ... | 42.948598 | 207 | 0.595474 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.