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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c7d6d093319926ce4af0b2c62110defab8ff1f20 | 171 | py | Python | tests/test_math.py | wardence/friendly-computing-machine | 96f3a0abb7bc184e093876fc3496dc5fb79caa24 | [
"BSD-3-Clause"
] | null | null | null | tests/test_math.py | wardence/friendly-computing-machine | 96f3a0abb7bc184e093876fc3496dc5fb79caa24 | [
"BSD-3-Clause"
] | null | null | null | tests/test_math.py | wardence/friendly-computing-machine | 96f3a0abb7bc184e093876fc3496dc5fb79caa24 | [
"BSD-3-Clause"
] | null | null | null | """
Testing for the math.py module.
"""
import fcm
import pytest
def test_add():
assert fcm.math.add(4, 2973934) == 2973938
assert fcm.math.add(0.12, 4) == 4.12
| 15.545455 | 46 | 0.649123 |
322e2266126123b1a2e22dfdacdf0c3bf051982e | 1,033 | py | Python | nipype/interfaces/dtitk/tests/test_auto_TVtool.py | PAmcconnell/nipype | 39fbd5411a844ce7c023964d3295eb7643b95af5 | [
"Apache-2.0"
] | null | null | null | nipype/interfaces/dtitk/tests/test_auto_TVtool.py | PAmcconnell/nipype | 39fbd5411a844ce7c023964d3295eb7643b95af5 | [
"Apache-2.0"
] | 2 | 2018-04-26T12:09:32.000Z | 2018-04-27T06:36:49.000Z | nipype/interfaces/dtitk/tests/test_auto_TVtool.py | PAmcconnell/nipype | 39fbd5411a844ce7c023964d3295eb7643b95af5 | [
"Apache-2.0"
] | 1 | 2019-11-14T14:16:57.000Z | 2019-11-14T14:16:57.000Z | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ..utils import TVtool
def test_TVtool_inputs():
input_map = dict(
args=dict(argstr='%s', ),
environ=dict(
nohash=True,
usedefault=True,
),
in_file=dict(
argstr='-in %s',
exten... | 28.694444 | 67 | 0.565344 |
ade7808d36364f383cd1fcd7b2aaca0c8d37750f | 21,266 | py | Python | tensorflow_checkpoint_reader/pb/tensorflow/stream_executor/dnn_pb2.py | shawwn/tensorflow-checkpoint-reader | f0e65548411e3bd66a07e36bb1850907a05952d0 | [
"MIT"
] | 1 | 2021-12-02T15:06:09.000Z | 2021-12-02T15:06:09.000Z | tensorflow_checkpoint_reader/pb/tensorflow/stream_executor/dnn_pb2.py | shawwn/tensorflow-checkpoint-reader | f0e65548411e3bd66a07e36bb1850907a05952d0 | [
"MIT"
] | null | null | null | tensorflow_checkpoint_reader/pb/tensorflow/stream_executor/dnn_pb2.py | shawwn/tensorflow-checkpoint-reader | f0e65548411e3bd66a07e36bb1850907a05952d0 | [
"MIT"
] | null | null | null |
'Generated protocol buffer code.'
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
_sym_db = ... | 223.852632 | 3,221 | 0.841484 |
8f5a67ffa6143a75bd02b010e7b0ad5abf1e5e72 | 744 | py | Python | courses/forms.py | coding-armadillo/learn-music | 6ff3e255e86f2389d27aee0b7533a0df52b82e54 | [
"MIT"
] | null | null | null | courses/forms.py | coding-armadillo/learn-music | 6ff3e255e86f2389d27aee0b7533a0df52b82e54 | [
"MIT"
] | null | null | null | courses/forms.py | coding-armadillo/learn-music | 6ff3e255e86f2389d27aee0b7533a0df52b82e54 | [
"MIT"
] | null | null | null | from django import forms
class LoginForm(forms.Form):
access_code = forms.CharField(
label="access_code",
max_length=50,
widget=forms.PasswordInput(
attrs={
"class": "w-full px-3 py-2 placeholder-gray-300 border border-gray-300 rounded-md focus:outline-none focu... | 25.655172 | 175 | 0.602151 |
f1b006e32dd3df3160ec6d05891043a8bccad045 | 5,183 | py | Python | stream_alert/shared/utils.py | tuapuikia/streamalert | b1f733259aa051f8d533e7881018280fe77d7bda | [
"Apache-2.0"
] | null | null | null | stream_alert/shared/utils.py | tuapuikia/streamalert | b1f733259aa051f8d533e7881018280fe77d7bda | [
"Apache-2.0"
] | 1 | 2018-08-08T03:26:58.000Z | 2018-08-08T03:26:58.000Z | stream_alert/shared/utils.py | tuapuikia/streamalert | b1f733259aa051f8d533e7881018280fe77d7bda | [
"Apache-2.0"
] | null | null | null | """Standalone utility functions used by the StreamAlert core."""
from collections import deque
import logging
from netaddr import IPAddress, IPNetwork
from netaddr.core import AddrFormatError
from stream_alert.shared import NORMALIZATION_KEY
logging.basicConfig()
LOGGER = logging.getLogger('StreamAlert')
def valid... | 35.258503 | 100 | 0.627822 |
270abe8a61a04c04af1418434e4a4b6d83d12b78 | 2,272 | py | Python | docs/conf.py | hamzabouissi/pdoing | 00e541c5f82f4027809a6ae4d172c5a2172fd8be | [
"MIT"
] | null | null | null | docs/conf.py | hamzabouissi/pdoing | 00e541c5f82f4027809a6ae4d172c5a2172fd8be | [
"MIT"
] | null | null | null | docs/conf.py | hamzabouissi/pdoing | 00e541c5f82f4027809a6ae4d172c5a2172fd8be | [
"MIT"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 36.063492 | 79 | 0.665933 |
9a823dbcf0355c28eaa33052b208f2e4ef9ea6e7 | 4,800 | py | Python | src/pyzenodo3/base.py | space-physics/pyzenodo3 | 09bdb3f9f0ac9961f74220a21ca6d4fd666e198a | [
"Apache-2.0"
] | 24 | 2019-11-12T08:55:32.000Z | 2022-03-13T10:40:55.000Z | src/pyzenodo3/base.py | scivision/pyzenodo3 | 09bdb3f9f0ac9961f74220a21ca6d4fd666e198a | [
"Apache-2.0"
] | 8 | 2019-07-09T10:08:00.000Z | 2021-08-12T21:09:13.000Z | src/pyzenodo3/base.py | scivision/pyzenodo3 | 09bdb3f9f0ac9961f74220a21ca6d4fd666e198a | [
"Apache-2.0"
] | 2 | 2020-04-09T21:20:21.000Z | 2021-08-12T20:40:40.000Z | from __future__ import annotations
import requests
import re
from bs4 import BeautifulSoup
from bs4.element import Tag
from urllib.parse import urlencode
BASE_URL = "https://zenodo.org/api/"
class Record:
def __init__(self, data, zenodo, base_url: str = BASE_URL) -> None:
self.base_url = base_url
... | 33.333333 | 107 | 0.57125 |
6e25be3388102b793621671e6292dd04f28ec721 | 21,978 | py | Python | fpga/tb/test_soc_interface.py | alexforencich/hdg2000 | 57562f76682f673c9c3090b1a6d6dc5e938ac3c5 | [
"MIT"
] | 3 | 2015-03-10T23:43:34.000Z | 2017-04-06T13:52:35.000Z | fpga/tb/test_soc_interface.py | alexforencich/hdg2000 | 57562f76682f673c9c3090b1a6d6dc5e938ac3c5 | [
"MIT"
] | null | null | null | fpga/tb/test_soc_interface.py | alexforencich/hdg2000 | 57562f76682f673c9c3090b1a6d6dc5e938ac3c5 | [
"MIT"
] | 2 | 2015-02-08T00:18:20.000Z | 2021-06-10T03:46:35.000Z | #!/usr/bin/env python2
"""
Copyright (c) 2014 Alex Forencich
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, mer... | 33.249622 | 101 | 0.52498 |
b2962629acf749ff16a3f2c0177edf7f0fb9baee | 2,813 | py | Python | oslo_versionedobjects/tests/test_exception.py | zjd0112/oslo.versionedobjects | 49bd3c4860aefde7ad33ba3b76f60957827f7bd5 | [
"Apache-2.0"
] | 1 | 2020-12-04T11:05:48.000Z | 2020-12-04T11:05:48.000Z | oslo_versionedobjects/tests/test_exception.py | zjd0112/oslo.versionedobjects | 49bd3c4860aefde7ad33ba3b76f60957827f7bd5 | [
"Apache-2.0"
] | null | null | null | oslo_versionedobjects/tests/test_exception.py | zjd0112/oslo.versionedobjects | 49bd3c4860aefde7ad33ba3b76f60957827f7bd5 | [
"Apache-2.0"
] | null | null | null | # Copyright 2011 Justin Santa Barbara
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 38.013514 | 79 | 0.665126 |
cc843edc632506c29b8ec4651e6ad6b33403dd14 | 298 | py | Python | agro_site/core/templatetags/user_filters.py | LukoninDmitryPy/agro_site-2 | eab7694d42104774e5ce6db05a79f11215db6ae3 | [
"MIT"
] | null | null | null | agro_site/core/templatetags/user_filters.py | LukoninDmitryPy/agro_site-2 | eab7694d42104774e5ce6db05a79f11215db6ae3 | [
"MIT"
] | null | null | null | agro_site/core/templatetags/user_filters.py | LukoninDmitryPy/agro_site-2 | eab7694d42104774e5ce6db05a79f11215db6ae3 | [
"MIT"
] | 1 | 2022-03-13T11:32:48.000Z | 2022-03-13T11:32:48.000Z | from django import template
register = template.Library()
@register.filter
def addclass(field, css):
return field.as_widget(attrs={'class': css})
@register.simple_tag
def get_companion(user, chat):
for u in chat.members.all():
if u != user:
return u
return None
| 18.625 | 48 | 0.667785 |
e3ea20f104ce4f3ed1ed7b018034db382b90ace5 | 262 | py | Python | fython/config/debugging.py | nicolasessisbreton/fython | 988f5a94cee8b16b0000501a22239195c73424a1 | [
"Apache-2.0"
] | 41 | 2016-01-21T05:14:45.000Z | 2021-11-24T20:37:21.000Z | fython/config/debugging.py | nicolasessisbreton/fython | 988f5a94cee8b16b0000501a22239195c73424a1 | [
"Apache-2.0"
] | 5 | 2016-01-21T05:36:37.000Z | 2016-08-22T19:26:51.000Z | fython/config/debugging.py | nicolasessisbreton/fython | 988f5a94cee8b16b0000501a22239195c73424a1 | [
"Apache-2.0"
] | 3 | 2016-01-23T04:03:44.000Z | 2016-08-21T15:58:38.000Z | def xip(*args):
for a in args:
print(a, end=' ')
print('')
def xep(*args):
for a in args:
print(repr(a), end=' ')
print('')
def xfo(*args):
for a in args:
if hasattr(a, 'nfo'):
print(a.nfo, end=' ')
else:
print(repr(a), end=' ')
print('')
| 13.789474 | 26 | 0.530534 |
7731f585f31e6a83620eae146d84017dd6ad8389 | 5,126 | py | Python | Kriptografski program.py | softuser25/Cryptor-za-tekst | 67aa5d1603c6fcf852930028b599daa8250ff884 | [
"MIT"
] | null | null | null | Kriptografski program.py | softuser25/Cryptor-za-tekst | 67aa5d1603c6fcf852930028b599daa8250ff884 | [
"MIT"
] | null | null | null | Kriptografski program.py | softuser25/Cryptor-za-tekst | 67aa5d1603c6fcf852930028b599daa8250ff884 | [
"MIT"
] | null | null | null | import random
import string
import getpass
def enkript():
inputsifra1 = getpass.getpass("Sifra: ")
sifra1 = ("asb5352")
if sifra1 == inputsifra1:
encrypt = input("Ukucajte recenicu za encrypt: ")
def add_str(lst):
_letters = ("1","2","3","4","5","6","7","8","9","0","q","... | 61.759036 | 408 | 0.633437 |
68669bdb60dd56a5a4fc131dc3ba09a7550ab691 | 478 | py | Python | ROOT/scrapy/Links/Links/settings.py | ShashwatArghode/SYMC-Web-Crawler | c07d902d470cb9e2dbf7af71aa4dd75909b60ac8 | [
"Apache-2.0"
] | null | null | null | ROOT/scrapy/Links/Links/settings.py | ShashwatArghode/SYMC-Web-Crawler | c07d902d470cb9e2dbf7af71aa4dd75909b60ac8 | [
"Apache-2.0"
] | null | null | null | ROOT/scrapy/Links/Links/settings.py | ShashwatArghode/SYMC-Web-Crawler | c07d902d470cb9e2dbf7af71aa4dd75909b60ac8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Scrapy settings for Links project
#
# For simplicity, this file contains only the most important settings by
# default. All the other settings are documented here:
#
# http://doc.scrapy.org/en/latest/topics/settings.html
#
BOT_NAME = 'Links'
SPIDER_MODULES = ['Links.spiders']
NEWSPIDER_... | 26.555556 | 80 | 0.732218 |
13a23a3dd3243dd0000de0918ef7aae6c500e2d9 | 37,302 | py | Python | wwlib/j3d.py | zach-cloud/wwrando | 161b48509f88a7465a563f9a084facc151a17ecc | [
"MIT"
] | null | null | null | wwlib/j3d.py | zach-cloud/wwrando | 161b48509f88a7465a563f9a084facc151a17ecc | [
"MIT"
] | null | null | null | wwlib/j3d.py | zach-cloud/wwrando | 161b48509f88a7465a563f9a084facc151a17ecc | [
"MIT"
] | null | null | null |
from enum import Enum
from io import BytesIO
from collections import OrderedDict
from wwlib.bti import BTI
from fs_helpers import *
from wwlib.yaz0 import Yaz0
IMPLEMENTED_CHUNK_TYPES = [
#"INF1",
"TEX1",
"MAT3",
"MDL3",
"TRK1",
]
class J3DFile:
def __init__(self, data):
if Yaz0.check_is_compres... | 30.425775 | 205 | 0.688569 |
ee362dcfc3c022748074f496c51335068d065ce3 | 524 | py | Python | func_tests/pages/webquestionnairepreivewpage/web_questionnaire_preivew_page.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | func_tests/pages/webquestionnairepreivewpage/web_questionnaire_preivew_page.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | func_tests/pages/webquestionnairepreivewpage/web_questionnaire_preivew_page.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | from pages.page import Page
from pages.smsquestionnairepreviewpage.sms_questionnaire_preview_locator import QUESTIONNAIRE_PREVIEW, INSTRUCTION, CLOSE_PREVIEW
class WebQuestionnairePreviewPage(Page):
def __init__(self, driver):
Page.__init__(self, driver)
def web_questionnaire(self):
return se... | 30.823529 | 129 | 0.767176 |
cf71fc88e340bafc6e2e33a0535a511454fa8800 | 386 | py | Python | problems/valid-parentheses/solution-2.py | MleMoe/LeetCode-1 | 14f275ba3c8079b820808da17c4952fcf9c8253c | [
"MIT"
] | 2 | 2021-03-25T01:58:55.000Z | 2021-08-06T12:47:13.000Z | problems/valid-parentheses/solution-2.py | MleMoe/LeetCode-1 | 14f275ba3c8079b820808da17c4952fcf9c8253c | [
"MIT"
] | 3 | 2019-08-27T13:25:42.000Z | 2021-08-28T17:49:34.000Z | problems/valid-parentheses/solution-2.py | MleMoe/LeetCode-1 | 14f275ba3c8079b820808da17c4952fcf9c8253c | [
"MIT"
] | 1 | 2021-08-14T08:49:39.000Z | 2021-08-14T08:49:39.000Z | class Solution:
def isValid(self, s: str) -> bool:
dic = {
')': '(',
']': '[',
'}': '{'
}
stack = []
for c in s:
if c not in dic:
stack.append(c)
continue
if len(stack) == 0 or stack.pop() != ... | 25.733333 | 56 | 0.34715 |
dcb9e2b378f1b443fb3c1d9cee0af78f69094cfd | 3,573 | py | Python | dizoo/classic_control/cartpole/entry/cartpole_ppg_main.py | jayyoung0802/DI-engine | efbb35ddaf184d1009291e6842fbbae09f193492 | [
"Apache-2.0"
] | null | null | null | dizoo/classic_control/cartpole/entry/cartpole_ppg_main.py | jayyoung0802/DI-engine | efbb35ddaf184d1009291e6842fbbae09f193492 | [
"Apache-2.0"
] | null | null | null | dizoo/classic_control/cartpole/entry/cartpole_ppg_main.py | jayyoung0802/DI-engine | efbb35ddaf184d1009291e6842fbbae09f193492 | [
"Apache-2.0"
] | null | null | null | import os
import gym
from tensorboardX import SummaryWriter
from easydict import EasyDict
from copy import deepcopy
from ding.config import compile_config
from ding.worker import BaseLearner, SampleSerialCollector, InteractionSerialEvaluator, AdvancedReplayBuffer
from ding.envs import BaseEnvManager, DingEnvWrapper
fr... | 42.535714 | 120 | 0.725161 |
d1680555321102dd59337e9438192c0f936b7d94 | 3,942 | py | Python | mocasin/util/annotate.py | tud-ccc/mocasin | 6cf0a169e24d65d0fc859398f181dd500f928340 | [
"0BSD"
] | 1 | 2022-03-13T19:27:50.000Z | 2022-03-13T19:27:50.000Z | mocasin/util/annotate.py | tud-ccc/mocasin | 6cf0a169e24d65d0fc859398f181dd500f928340 | [
"0BSD"
] | null | null | null | mocasin/util/annotate.py | tud-ccc/mocasin | 6cf0a169e24d65d0fc859398f181dd500f928340 | [
"0BSD"
] | null | null | null | # Copyright (C) 2017 TU Dresden
# Licensed under the ISC license (see LICENSE.txt)
#
# Authors: Gerald Hempel
import math
import matplotlib.pyplot as plt
class AnnoteFinder(object):
"""callback for matplotlib to display an annotation when points are
clicked on. The point which is closest to the click and wi... | 33.40678 | 77 | 0.498985 |
678e5ddc2edf19e2e519b3ac6f1bc8ef08309098 | 1,336 | py | Python | wakatime/constants.py | Anton-Latukha/wakatime | 3035a28a3f996a11d928802dcb05844bb0a52655 | [
"BSD-3-Clause"
] | 1,198 | 2015-01-02T12:08:49.000Z | 2021-10-07T02:46:59.000Z | wakatime/constants.py | Anton-Latukha/wakatime | 3035a28a3f996a11d928802dcb05844bb0a52655 | [
"BSD-3-Clause"
] | 249 | 2015-01-22T13:31:12.000Z | 2021-05-01T08:01:22.000Z | wakatime/constants.py | Anton-Latukha/wakatime | 3035a28a3f996a11d928802dcb05844bb0a52655 | [
"BSD-3-Clause"
] | 118 | 2015-01-16T19:13:15.000Z | 2021-07-21T15:09:15.000Z | # -*- coding: utf-8 -*-
"""
wakatime.constants
~~~~~~~~~~~~~~~~~~
Constant variable definitions.
:copyright: (c) 2016 Alan Hamlett.
:license: BSD, see LICENSE for more details.
"""
""" Success
Exit code used when a heartbeat was sent successfully.
"""
SUCCESS = 0
""" Api Error
Exit code used whe... | 23.438596 | 80 | 0.727545 |
18b6b5ffaa6d963773d25019f791dd974eef6de3 | 21,091 | py | Python | mergify_engine/worker.py | eladb/mergify-engine | ca2eb9926be29d38feaf029caaa63cbb4c74659e | [
"Apache-2.0"
] | null | null | null | mergify_engine/worker.py | eladb/mergify-engine | ca2eb9926be29d38feaf029caaa63cbb4c74659e | [
"Apache-2.0"
] | null | null | null | mergify_engine/worker.py | eladb/mergify-engine | ca2eb9926be29d38feaf029caaa63cbb4c74659e | [
"Apache-2.0"
] | null | null | null | # debug
# 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... | 34.976783 | 98 | 0.594993 |
93d63cf3901a312831a693f804341c71bbd9fd25 | 3,262 | py | Python | torchbenchmark/models/timm_resnest/__init__.py | greenstar1151/pytorch-benchmark | 8b7808d3be6b7ca1d57f1812e35fd2df5e470f8b | [
"BSD-3-Clause"
] | null | null | null | torchbenchmark/models/timm_resnest/__init__.py | greenstar1151/pytorch-benchmark | 8b7808d3be6b7ca1d57f1812e35fd2df5e470f8b | [
"BSD-3-Clause"
] | null | null | null | torchbenchmark/models/timm_resnest/__init__.py | greenstar1151/pytorch-benchmark | 8b7808d3be6b7ca1d57f1812e35fd2df5e470f8b | [
"BSD-3-Clause"
] | null | null | null | # Generated by gen_timm_models.py
import torch
import timm.models.resnest
from ...util.model import BenchmarkModel
from torchbenchmark.tasks import COMPUTER_VISION
from .config import TimmConfig
class Model(BenchmarkModel):
task = COMPUTER_VISION.CLASSIFICATION
optimized_for_inference = True
def __init__... | 34.336842 | 110 | 0.632434 |
08e090539b86c5bd0f00040d54de7760683328d7 | 8,089 | py | Python | benchmarks/language_translation/tensorflow/transformer_mlperf/training/bfloat16/model_init.py | yangw1234/models-1 | 7e7f484f4f22c760f9a5af836f57a3602b4fa7a6 | [
"Apache-2.0"
] | 1 | 2021-01-11T18:37:51.000Z | 2021-01-11T18:37:51.000Z | benchmarks/language_translation/tensorflow/transformer_mlperf/training/bfloat16/model_init.py | yangw1234/models-1 | 7e7f484f4f22c760f9a5af836f57a3602b4fa7a6 | [
"Apache-2.0"
] | null | null | null | benchmarks/language_translation/tensorflow/transformer_mlperf/training/bfloat16/model_init.py | yangw1234/models-1 | 7e7f484f4f22c760f9a5af836f57a3602b4fa7a6 | [
"Apache-2.0"
] | null | null | null | #
# -*- coding: utf-8 -*-
#
# Copyright (c) 2019 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 51.196203 | 119 | 0.573989 |
97a6067cff212e2dcce9f58d451bb90fbc10996f | 7,228 | py | Python | DeepHash/model/dtq/util.py | chrisbyd/DeepHash | 5304f1467d3e4c5ae232a5674c3a8f0357e6709c | [
"MIT"
] | 1 | 2019-09-24T06:27:27.000Z | 2019-09-24T06:27:27.000Z | DeepHash/model/dtq/util.py | chrisbyd/DeepHash | 5304f1467d3e4c5ae232a5674c3a8f0357e6709c | [
"MIT"
] | null | null | null | DeepHash/model/dtq/util.py | chrisbyd/DeepHash | 5304f1467d3e4c5ae232a5674c3a8f0357e6709c | [
"MIT"
] | null | null | null | import numpy as np
import math
from distance.npversion import distance
class Dataset(object):
def __init__(self, dataset, output_dim, code_dim,config):
self._dataset = dataset
self.n_samples = dataset.n_samples
self._train = dataset.train
self._output = np.zeros((self.n_samples, out... | 37.645833 | 123 | 0.583702 |
c5c21fda21ce91baf1be719e04132ea9472a09e6 | 793 | py | Python | migrations/versions/98d3870a36f6_new_filds_in_user_profile.py | borko81/flask_with_orm | 72d677419fc859acf4a56850a9d96b4b33127956 | [
"MIT"
] | null | null | null | migrations/versions/98d3870a36f6_new_filds_in_user_profile.py | borko81/flask_with_orm | 72d677419fc859acf4a56850a9d96b4b33127956 | [
"MIT"
] | null | null | null | migrations/versions/98d3870a36f6_new_filds_in_user_profile.py | borko81/flask_with_orm | 72d677419fc859acf4a56850a9d96b4b33127956 | [
"MIT"
] | null | null | null | """new filds in user profile
Revision ID: 98d3870a36f6
Revises: ccc6f6ce48e1
Create Date: 2021-09-26 13:30:20.012505
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '98d3870a36f6'
down_revision = 'ccc6f6ce48e1'
branch_labels = None
depends_on = None
def upgra... | 25.580645 | 86 | 0.691047 |
56569b0d991220eacf01f3a52053c0a8a624758f | 1,205 | py | Python | azure-keyvault/azure/keyvault/v7_0/models/contact_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-06-12T13:44:34.000Z | 2020-06-01T13:24:04.000Z | azure-keyvault/azure/keyvault/v7_0/models/contact_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 5 | 2018-04-26T01:14:29.000Z | 2021-01-05T00:45:39.000Z | azure-keyvault/azure/keyvault/v7_0/models/contact_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 8 | 2018-04-24T22:52:48.000Z | 2021-11-16T06:29:28.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 32.567568 | 102 | 0.566805 |
937c2dd394fb90597dc53877bc5449617674870e | 4,415 | py | Python | benchmark/startQiskit_noisy3110.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_noisy3110.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_noisy3110.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=4
# total number=43
import cirq
import qiskit
from qiskit.providers.aer import QasmSimulator
from qiskit.test.mock import FakeVigo
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import ... | 35.32 | 140 | 0.656399 |
732d2ff82e04e20ee4c49cdb5c637a401890f2a0 | 624 | py | Python | models/DeformableConvNets/skpeep/rfcn_end2end_train_test.py | SurajK7/kaggle-rsna18 | 0572708b503edf95f8304df2f92473b5a99c8cba | [
"MIT"
] | 220 | 2018-11-08T01:19:32.000Z | 2022-03-11T15:38:22.000Z | models/DeformableConvNets/skpeep/rfcn_end2end_train_test.py | SurajK7/kaggle-rsna18 | 0572708b503edf95f8304df2f92473b5a99c8cba | [
"MIT"
] | 5 | 2018-11-28T05:32:36.000Z | 2021-12-23T23:50:14.000Z | models/DeformableConvNets/skpeep/rfcn_end2end_train_test.py | SurajK7/kaggle-rsna18 | 0572708b503edf95f8304df2f92473b5a99c8cba | [
"MIT"
] | 70 | 2018-11-09T09:35:53.000Z | 2022-03-11T15:39:37.000Z | # --------------------------------------------------------
# Deformable Convolutional Networks
# Copyright (c) 2017 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Yuwen Xiong
# --------------------------------------------------------
import os
import sys
os.environ['PYTHONUNBUFFERED']... | 24.96 | 58 | 0.596154 |
b0883cb09b95eb08b6c0b4ce9709a73e789747f5 | 2,265 | py | Python | xmasparser.py | speakerbug/ChristmasPi | 9277b19047b2b3fa8beb39d0251fa53607c58998 | [
"MIT"
] | null | null | null | xmasparser.py | speakerbug/ChristmasPi | 9277b19047b2b3fa8beb39d0251fa53607c58998 | [
"MIT"
] | null | null | null | xmasparser.py | speakerbug/ChristmasPi | 9277b19047b2b3fa8beb39d0251fa53607c58998 | [
"MIT"
] | null | null | null | # File: xmasparser.py
# Henry Saniuk, Jr.
# This script takes in a config file and MP3 file and turns
# on and off channels of a relay accordingly.
#
# Command Line usage:
# python xmasparser.py <config file> <mp3 file>
import RPi.GPIO as GPIO, time
import sys
import time
import pygame
# Defines the mapping of the... | 27.962963 | 68 | 0.626932 |
4abc060ce7fd00dba4335ff8c4d9b31230e77804 | 697 | py | Python | cf-templates/build-cf.py | pauliuspetk/ha-wordpress-aws | 33bd54b1650d65376b45c76fcc6384cafcb33c2e | [
"Apache-2.0"
] | 27 | 2019-07-30T03:14:15.000Z | 2022-03-12T08:25:53.000Z | cf-templates/build-cf.py | pauliuspetk/ha-wordpress-aws | 33bd54b1650d65376b45c76fcc6384cafcb33c2e | [
"Apache-2.0"
] | 11 | 2019-11-12T09:09:05.000Z | 2022-03-24T09:58:31.000Z | cf-templates/build-cf.py | pauliuspetk/ha-wordpress-aws | 33bd54b1650d65376b45c76fcc6384cafcb33c2e | [
"Apache-2.0"
] | 9 | 2019-07-30T03:14:41.000Z | 2022-01-13T14:57:20.000Z | import boto3
from string import Template
client = boto3.client('elasticbeanstalk')
print ("Reading input file eb-with-efs.yaml")
f = open('eb-with-efs.yaml', 'r')
s = Template(f.read())
print ("Adding solution stacks")
ebstackblock = """Check AWS docs for available platform descriptions. Make sure your
appl... | 27.88 | 92 | 0.721664 |
644439f5fb8566aff89e182cacb3651bd6585426 | 13,082 | py | Python | grr/core/grr_response_core/config/server.py | jaegeral/grr | 1f6bcd901fbebf386988a80fc6cb4034cbedfde9 | [
"Apache-2.0"
] | null | null | null | grr/core/grr_response_core/config/server.py | jaegeral/grr | 1f6bcd901fbebf386988a80fc6cb4034cbedfde9 | [
"Apache-2.0"
] | null | null | null | grr/core/grr_response_core/config/server.py | jaegeral/grr | 1f6bcd901fbebf386988a80fc6cb4034cbedfde9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Lint as: python3
"""Configuration parameters for the server side subsystems."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from grr_response_core import version
from grr_response_core.lib import config_lib
from grr_response_co... | 37.164773 | 80 | 0.724736 |
b12623774dc51677c45cc7a1da44e7782b350356 | 560 | py | Python | fleamarket/urls.py | yaishenka/MIPT-Flea-Market | 0d4b69de33382dfa46b546798f6ecab08ececf56 | [
"MIT"
] | null | null | null | fleamarket/urls.py | yaishenka/MIPT-Flea-Market | 0d4b69de33382dfa46b546798f6ecab08ececf56 | [
"MIT"
] | 11 | 2019-12-04T22:55:41.000Z | 2022-03-11T23:47:40.000Z | fleamarket/urls.py | yaishenka/MIPT-Flea-Market | 0d4b69de33382dfa46b546798f6ecab08ececf56 | [
"MIT"
] | null | null | null | from .views import ads_list, create_ad, change_ad, view_ad, delete_ad
from django.conf.urls import include
from django.urls import path
urlpatterns = [
path('', ads_list, name='ads_list'),
path('user/', include('users.urls')),
path('vk_callback/', include('vk_sender.urls')),
path('subs/', include('subs... | 40 | 69 | 0.666071 |
42d2e56ba197ae4e333754761cef9564d236f474 | 742 | py | Python | ippon/migrations/0019_auto_20181022_1954.py | morynicz/ippon_back | dce901bfc649c6f8efbbf0907654e0860606b3e3 | [
"MIT"
] | null | null | null | ippon/migrations/0019_auto_20181022_1954.py | morynicz/ippon_back | dce901bfc649c6f8efbbf0907654e0860606b3e3 | [
"MIT"
] | 13 | 2018-12-22T15:30:56.000Z | 2022-03-12T00:22:31.000Z | ippon/migrations/0019_auto_20181022_1954.py | morynicz/ippon_back | dce901bfc649c6f8efbbf0907654e0860606b3e3 | [
"MIT"
] | 2 | 2019-06-01T11:28:23.000Z | 2020-03-27T15:19:11.000Z | # Generated by Django 2.1.1 on 2018-10-22 19:54
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('ippon', '0018_auto_20180920_1901'),
]
operations = [
migrations.AlterField(
model_name='teammem... | 29.68 | 128 | 0.642857 |
95502e865cc338cd3913ace2814ccc45a69a6a41 | 21,729 | py | Python | spotify/playlist_container.py | timgates42/pyspotify | 515ac42ab47724ca66e2da7516b96b6838864cfa | [
"Apache-2.0"
] | 257 | 2015-01-02T00:44:30.000Z | 2019-12-06T21:23:23.000Z | spotify/playlist_container.py | timgates42/pyspotify | 515ac42ab47724ca66e2da7516b96b6838864cfa | [
"Apache-2.0"
] | 65 | 2015-01-13T18:04:14.000Z | 2019-12-10T19:45:56.000Z | spotify/playlist_container.py | timgates42/pyspotify | 515ac42ab47724ca66e2da7516b96b6838864cfa | [
"Apache-2.0"
] | 49 | 2015-01-02T15:57:08.000Z | 2019-11-15T19:07:59.000Z | from __future__ import unicode_literals
import collections
import logging
import pprint
import re
import spotify
from spotify import compat, ffi, lib, serialized, utils
__all__ = [
"PlaylistContainer",
"PlaylistContainerEvent",
"PlaylistFolder",
"PlaylistPlaceholder",
"PlaylistType",
]
logger = ... | 34.990338 | 87 | 0.635464 |
08181be005b3c5856d1a391171de7b0067ea957d | 23,396 | py | Python | cufflinks/colors.py | faraz891/cufflinks | 5df644f91ad8817e85d05cec7d21cfaf9316947b | [
"MIT"
] | null | null | null | cufflinks/colors.py | faraz891/cufflinks | 5df644f91ad8817e85d05cec7d21cfaf9316947b | [
"MIT"
] | null | null | null | cufflinks/colors.py | faraz891/cufflinks | 5df644f91ad8817e85d05cec7d21cfaf9316947b | [
"MIT"
] | null | null | null | ##
# Special thanks to @krey for the python3 support
##
import numpy as np
import colorsys
import colorlover as cl
import operator
import copy
from collections import deque
from six import string_types
from IPython.display import HTML, display
from .utils import inverseDict
from .auth import get_config_file
class ... | 31.194667 | 148 | 0.470636 |
0147f17bb284490813364f168127ce78332739d3 | 9,623 | py | Python | vispy/scene/visuals.py | hmaarrfk/vispy | 7f3f6f60c8462bb8a3a8fa03344a2e6990b86eb2 | [
"BSD-3-Clause"
] | 3 | 2019-02-28T16:05:33.000Z | 2020-05-03T21:29:03.000Z | vispy/scene/visuals.py | hmaarrfk/vispy | 7f3f6f60c8462bb8a3a8fa03344a2e6990b86eb2 | [
"BSD-3-Clause"
] | 1 | 2022-03-16T13:38:49.000Z | 2022-03-16T13:47:30.000Z | vispy/scene/visuals.py | hmaarrfk/vispy | 7f3f6f60c8462bb8a3a8fa03344a2e6990b86eb2 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
"""
The classes in scene.visuals are visuals that may be added to a scenegraph
using the methods and properties defined in `vispy.scene.Node` such as name,
visib... | 36.041199 | 78 | 0.66393 |
f6cd272fa9f987a7d8c71ca348d7b8669cd43955 | 2,274 | py | Python | src/epikrawler.py | drofp/EPIKrawler | d7ff8289e94079d193b1fd80fd0ecb32d68064b1 | [
"MIT"
] | 1 | 2018-10-06T09:39:54.000Z | 2018-10-06T09:39:54.000Z | src/epikrawler.py | drofp/EPIKrawler | d7ff8289e94079d193b1fd80fd0ecb32d68064b1 | [
"MIT"
] | 19 | 2018-08-13T20:38:14.000Z | 2021-10-07T05:49:15.000Z | src/epikrawler.py | drofp/EPIKrawler | d7ff8289e94079d193b1fd80fd0ecb32d68064b1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3.6
import pygame
import collections
import os
import sys
import configparser
sys.path.append(
os.path.abspath(os.path.join(os.path.dirname(__file__), 'frontend')))
sys.path.append(
os.path.abspath(os.path.join(os.path.dirname(__file__), 'backend')))
from frontend import (
colors,
... | 27.39759 | 96 | 0.683377 |
827bfbfef1b83205838ef774768b6c620ee52002 | 398 | py | Python | projectdata.py | jakubopatowski/wolverine | 08550dc60d7c5f0f630f5ec1210cf91aa7f143cd | [
"MIT"
] | 1 | 2021-06-14T11:55:27.000Z | 2021-06-14T11:55:27.000Z | projectdata.py | jakubopatowski/wolverine | 08550dc60d7c5f0f630f5ec1210cf91aa7f143cd | [
"MIT"
] | 1 | 2019-12-19T08:22:25.000Z | 2019-12-19T08:22:25.000Z | projectdata.py | jakubopatowski/wolverine | 08550dc60d7c5f0f630f5ec1210cf91aa7f143cd | [
"MIT"
] | 1 | 2021-06-14T11:54:42.000Z | 2021-06-14T11:54:42.000Z | from targettype import TargetType
class ProjectData:
def __init__(self, target_name, full_path, target_type):
assert isinstance(target_name, str)
assert isinstance(full_path, str)
assert isinstance(target_type, TargetType)
self.target_name = target_name
self.directory = N... | 26.533333 | 60 | 0.698492 |
3563e9b87f4cfff273b55d48f7144ea0e442853b | 5,955 | py | Python | pulsar/apps/wsgi/server.py | PyCN/pulsar | fee44e871954aa6ca36d00bb5a3739abfdb89b26 | [
"BSD-3-Clause"
] | 1,410 | 2015-01-02T14:55:07.000Z | 2022-03-28T17:22:06.000Z | pulsar/apps/wsgi/server.py | PyCN/pulsar | fee44e871954aa6ca36d00bb5a3739abfdb89b26 | [
"BSD-3-Clause"
] | 194 | 2015-01-22T06:18:24.000Z | 2020-10-20T21:21:58.000Z | pulsar/apps/wsgi/server.py | PyCN/pulsar | fee44e871954aa6ca36d00bb5a3739abfdb89b26 | [
"BSD-3-Clause"
] | 168 | 2015-01-31T10:29:55.000Z | 2022-03-14T10:22:24.000Z | """
HTTP Protocol Consumer
==============================
.. autoclass:: HttpServerResponse
:members:
:member-order: bysource
"""
import os
import sys
from pulsar.api import BadRequest, ProtocolConsumer, isawaitable
from pulsar.utils.lib import WsgiProtocol
from pulsar.utils import http
from pulsar.async.timeo... | 34.028571 | 77 | 0.477582 |
c718653c61577aa27e5f28c45109ca864bda6954 | 6,715 | py | Python | kaolin/graphics/softras/functional/soft_rasterize.py | kantengri/kaolin | cbd057cb8e4ab620b964c2b6b1bd39e4671815d3 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2019-11-18T05:22:15.000Z | 2020-02-12T15:23:14.000Z | kaolin/graphics/softras/functional/soft_rasterize.py | kantengri/kaolin | cbd057cb8e4ab620b964c2b6b1bd39e4671815d3 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | kaolin/graphics/softras/functional/soft_rasterize.py | kantengri/kaolin | cbd057cb8e4ab620b964c2b6b1bd39e4671815d3 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-11-18T13:03:53.000Z | 2019-11-18T13:03:53.000Z | # Soft Rasterizer (SoftRas)
#
# Copyright (c) 2017 Hiroharu Kato
# Copyright (c) 2018 Nikos Kolotouros
# Copyright (c) 2019 Shichen Liu
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software wit... | 47.624113 | 136 | 0.604765 |
a945fff16fe2b1c22f6eb5c4de65999cd16d42f7 | 4,229 | py | Python | src/python/grapl-tests-common/grapl_tests_common/wait.py | wimax-grapl/grapl | be0a49a83f62b84a10182c383d12f911cc555b24 | [
"Apache-2.0"
] | null | null | null | src/python/grapl-tests-common/grapl_tests_common/wait.py | wimax-grapl/grapl | be0a49a83f62b84a10182c383d12f911cc555b24 | [
"Apache-2.0"
] | null | null | null | src/python/grapl-tests-common/grapl_tests_common/wait.py | wimax-grapl/grapl | be0a49a83f62b84a10182c383d12f911cc555b24 | [
"Apache-2.0"
] | null | null | null | import inspect
import logging
from datetime import datetime, timedelta, timezone
from itertools import cycle
from time import sleep
from typing import Any, Callable, Dict, Mapping, Optional, Sequence
import botocore # type: ignore
from typing_extensions import Protocol
from grapl_analyzerlib.grapl_client import Mast... | 29.165517 | 88 | 0.661386 |
c5177c0f52950c9b211e69fbbac25a8dbd1b8727 | 927 | py | Python | python/paddle/fluid/tests/unittests/elastic_demo.py | zmxdream/Paddle | 04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c | [
"Apache-2.0"
] | 17,085 | 2016-11-18T06:40:52.000Z | 2022-03-31T22:52:32.000Z | python/paddle/fluid/tests/unittests/elastic_demo.py | zmxdream/Paddle | 04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c | [
"Apache-2.0"
] | 29,769 | 2016-11-18T06:35:22.000Z | 2022-03-31T16:46:15.000Z | python/paddle/fluid/tests/unittests/elastic_demo.py | zmxdream/Paddle | 04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c | [
"Apache-2.0"
] | 4,641 | 2016-11-18T07:43:33.000Z | 2022-03-31T15:15:02.000Z | # Copyright (c) 2021 PaddlePaddle 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 ap... | 38.625 | 75 | 0.754045 |
0629e47197ef1357fe97fac0977cf3e9cab54374 | 5,135 | py | Python | zapimoveis_scraper/__init__.py | paulovictorls/zapimoveis-scraper | 51303cd504fe800e9c7c5d3f8daff56b34a6b3bd | [
"BSD-3-Clause"
] | 15 | 2020-06-16T02:44:43.000Z | 2022-03-12T16:08:09.000Z | zapimoveis_scraper/__init__.py | paulovictorls/zapimoveis-scraper | 51303cd504fe800e9c7c5d3f8daff56b34a6b3bd | [
"BSD-3-Clause"
] | 7 | 2020-09-11T16:15:34.000Z | 2021-12-20T06:04:12.000Z | zapimoveis_scraper/__init__.py | paulovictorls/zapimoveis-scraper | 51303cd504fe800e9c7c5d3f8daff56b34a6b3bd | [
"BSD-3-Clause"
] | 12 | 2020-06-18T14:06:23.000Z | 2022-02-05T19:38:52.000Z | #!/usr/bin/env python
# Python bindings to the Google search engine
# Copyright (c) 2009-2016, Geovany Rodrigues
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of sourc... | 38.901515 | 218 | 0.697176 |
359b1e92d39bd971fef3819c934e70f4a9d0ed0c | 389 | py | Python | backenddb/backenddb/asgi.py | sprenge/concierge | 3cd8ff33a0cb0d3cd79de914fbaf4e32d277ea40 | [
"MIT"
] | 2 | 2021-01-29T23:45:22.000Z | 2021-07-29T04:29:29.000Z | backenddb/backenddb/asgi.py | sprenge/concierge | 3cd8ff33a0cb0d3cd79de914fbaf4e32d277ea40 | [
"MIT"
] | null | null | null | backenddb/backenddb/asgi.py | sprenge/concierge | 3cd8ff33a0cb0d3cd79de914fbaf4e32d277ea40 | [
"MIT"
] | null | null | null | """
ASGI config for backenddb 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.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SET... | 22.882353 | 78 | 0.784062 |
9125f73c36f02a52d387057b3bb70967880a87bf | 14,105 | py | Python | cogs/database.py | MisileLab/Crayonbot | 98c2b0ff482a685cd324d94176a1a3f6e423deb3 | [
"MIT"
] | null | null | null | cogs/database.py | MisileLab/Crayonbot | 98c2b0ff482a685cd324d94176a1a3f6e423deb3 | [
"MIT"
] | null | null | null | cogs/database.py | MisileLab/Crayonbot | 98c2b0ff482a685cd324d94176a1a3f6e423deb3 | [
"MIT"
] | 1 | 2021-12-23T15:29:27.000Z | 2021-12-23T15:29:27.000Z | import imp
from re import T
from click import command
import discord
from discord import colour
from discord.ext import commands
import time
import random
import sqlite3
import requests
import traceback
import asyncio
import discordSuperUtils
import os
import psutil
import random
import asyncio
impor... | 44.216301 | 194 | 0.512371 |
b83a6b6c3c0b2857f55ce0379d4684ad133071ad | 465 | py | Python | dentexchange/apps/membership/tests/test_year_choices.py | hellhound/dentexchange | 58ae303e842404fc9e1860f294ec8044a332bef3 | [
"BSD-3-Clause"
] | 1 | 2017-11-09T23:09:51.000Z | 2017-11-09T23:09:51.000Z | dentexchange/apps/membership/tests/test_year_choices.py | hellhound/dentexchange | 58ae303e842404fc9e1860f294ec8044a332bef3 | [
"BSD-3-Clause"
] | null | null | null | dentexchange/apps/membership/tests/test_year_choices.py | hellhound/dentexchange | 58ae303e842404fc9e1860f294ec8044a332bef3 | [
"BSD-3-Clause"
] | 3 | 2015-08-11T16:58:47.000Z | 2021-01-04T08:23:51.000Z | # -*- coding:utf-8 -*-
import unittest
import mock
import datetime
from ..utils import YearChoices
class YearChoicesTestCase(unittest.TestCase):
def test_iter_should_return_50_years_since_current_year(self):
# setup
current_year = datetime.datetime.now().year
years = range(current_year, c... | 23.25 | 66 | 0.68172 |
11409ca49dc4c3572f5261e5ee922885712761f2 | 1,669 | py | Python | python/util.py | StocksandVagabonds/CS122-Booling4Soup | dc9f08853c81ccd65e58b89781b9a2d07ff428de | [
"Unlicense",
"MIT"
] | 1 | 2021-03-29T04:38:06.000Z | 2021-03-29T04:38:06.000Z | python/util.py | StocksandVagabonds/CS122-Booling4Soup | dc9f08853c81ccd65e58b89781b9a2d07ff428de | [
"Unlicense",
"MIT"
] | null | null | null | python/util.py | StocksandVagabonds/CS122-Booling4Soup | dc9f08853c81ccd65e58b89781b9a2d07ff428de | [
"Unlicense",
"MIT"
] | null | null | null | #Common functions to conduct sentiment analysis of tweets
import pandas as pd
import numpy as np
import re
from datetime import datetime
from collections import Counter
from textblob import TextBlob
import string
from nltk.corpus import stopwords
eng_stopwords = stopwords.words('english')
characters = [s for s in st... | 24.544118 | 82 | 0.661474 |
2dd6a91ab79fbcf20406407d3529362fb07b8b27 | 393 | py | Python | Apps/Backend/obsidian/obsidian/wsgi.py | SquarerFive/two | 560dd30e4de99f681dd742fd9b2c47c80623e1ab | [
"MIT"
] | 11 | 2020-05-20T18:03:03.000Z | 2022-01-14T12:56:25.000Z | Apps/Backend/obsidian/obsidian/wsgi.py | SquarerFive/two | 560dd30e4de99f681dd742fd9b2c47c80623e1ab | [
"MIT"
] | 13 | 2020-04-05T02:36:22.000Z | 2020-09-09T12:40:51.000Z | Apps/Backend/obsidian/obsidian/wsgi.py | SquarerFive/two | 560dd30e4de99f681dd742fd9b2c47c80623e1ab | [
"MIT"
] | 4 | 2020-04-24T23:34:36.000Z | 2022-03-25T12:02:48.000Z | """
WSGI config for obsidian project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETT... | 23.117647 | 78 | 0.78626 |
79712757c1ebc2c4650a08d5c19888ba4ab3c4c0 | 2,246 | py | Python | scripts/commands/tests/command_test.py | mzlee/pyre-check | e31eedeedd88aa92890ffe38afdc6063d8b21ef8 | [
"MIT"
] | null | null | null | scripts/commands/tests/command_test.py | mzlee/pyre-check | e31eedeedd88aa92890ffe38afdc6063d8b21ef8 | [
"MIT"
] | null | null | null | scripts/commands/tests/command_test.py | mzlee/pyre-check | e31eedeedd88aa92890ffe38afdc6063d8b21ef8 | [
"MIT"
] | null | null | null | # Copyright (c) 2016-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import io
import unittest
from unittest.mock import patch, mock_open, MagicMock
from ... import EnvironmentException # noqa
from ... import comma... | 29.552632 | 78 | 0.604185 |
f8206d37a678b45be210885fa7ee58efce60473e | 63 | py | Python | deputados/listaonthefly.py | mdietterle/aulas | b289a7252c2c8f7dfb4ee5482326a94e7d87ee45 | [
"Apache-2.0"
] | null | null | null | deputados/listaonthefly.py | mdietterle/aulas | b289a7252c2c8f7dfb4ee5482326a94e7d87ee45 | [
"Apache-2.0"
] | null | null | null | deputados/listaonthefly.py | mdietterle/aulas | b289a7252c2c8f7dfb4ee5482326a94e7d87ee45 | [
"Apache-2.0"
] | null | null | null | python = "Python"
for x in python:
x = []
print(P)
print(y) | 12.6 | 17 | 0.587302 |
59ca08800618a4b2b5fc3140cb7332ca750eecbf | 2,102 | py | Python | predict_app.py | ahmedhisham73/xray_api_demo | 55a88e83722082910af8c2cab5b6da6f3aeb24eb | [
"Apache-2.0"
] | null | null | null | predict_app.py | ahmedhisham73/xray_api_demo | 55a88e83722082910af8c2cab5b6da6f3aeb24eb | [
"Apache-2.0"
] | null | null | null | predict_app.py | ahmedhisham73/xray_api_demo | 55a88e83722082910af8c2cab5b6da6f3aeb24eb | [
"Apache-2.0"
] | null | null | null | import base64
import numpy as np
import io
from PIL import Image
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras.models import Sequential, load_model
from keras.models import load_model
from tensorflow.keras.preprocessing.image import ImageDataGenerator, img_to_array
from flask import request... | 30.463768 | 103 | 0.705994 |
7d95a43700b0a2cfa2631d04ea24c10b1a9f3651 | 17,817 | py | Python | tests/acceptance/fixtures.py | merlin-northern/meta-mender | 420425edb62100878c2c6c83429ba84f55fc03c5 | [
"Apache-2.0"
] | null | null | null | tests/acceptance/fixtures.py | merlin-northern/meta-mender | 420425edb62100878c2c6c83429ba84f55fc03c5 | [
"Apache-2.0"
] | null | null | null | tests/acceptance/fixtures.py | merlin-northern/meta-mender | 420425edb62100878c2c6c83429ba84f55fc03c5 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Copyright 2017 Northern.tech AS
#
# 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 ap... | 32.394545 | 89 | 0.657574 |
5840c5896d06307cd60797bcc9384d741bdf3d71 | 87 | py | Python | src/add.py | fernandezpablo85/fuzz_talk | dbe94475a34eff3047cb736b00589db436be80e2 | [
"MIT"
] | 5 | 2019-11-26T19:29:19.000Z | 2020-09-25T19:43:57.000Z | src/add.py | fernandezpablo85/fuzz_talk | dbe94475a34eff3047cb736b00589db436be80e2 | [
"MIT"
] | null | null | null | src/add.py | fernandezpablo85/fuzz_talk | dbe94475a34eff3047cb736b00589db436be80e2 | [
"MIT"
] | null | null | null | def add(a, b):
if b <= 0:
return a + abs(b)
else:
return a + b
| 14.5 | 25 | 0.402299 |
4948248f931293ae62ed5f6e8368e045f7a581cd | 985 | py | Python | app/urls.py | hadiforoughi/recipe-rest-API | cfa71dae74182eebca3fd391acc6911588e1ba63 | [
"MIT"
] | null | null | null | app/urls.py | hadiforoughi/recipe-rest-API | cfa71dae74182eebca3fd391acc6911588e1ba63 | [
"MIT"
] | null | null | null | app/urls.py | hadiforoughi/recipe-rest-API | cfa71dae74182eebca3fd391acc6911588e1ba63 | [
"MIT"
] | null | null | null | """app URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based vie... | 37.884615 | 77 | 0.718782 |
a3cf12514be2800fac13b434c7473937817ff8df | 4,405 | py | Python | xc/xc7/tests/soc/ibex/generate.py | rw1nkler/symbiflow-arch-defs | 86ad9e9e7cc94ecf28af0472bb7fcdc2ce7c2bbd | [
"ISC"
] | null | null | null | xc/xc7/tests/soc/ibex/generate.py | rw1nkler/symbiflow-arch-defs | 86ad9e9e7cc94ecf28af0472bb7fcdc2ce7c2bbd | [
"ISC"
] | null | null | null | xc/xc7/tests/soc/ibex/generate.py | rw1nkler/symbiflow-arch-defs | 86ad9e9e7cc94ecf28af0472bb7fcdc2ce7c2bbd | [
"ISC"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2020 The Symbiflow Authors.
#
# Use of this source code is governed by a ISC-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/ISC
#
# SPDX-License-Identifier: ISC
"""Generates sources for the Ibex example and ... | 30.804196 | 91 | 0.619296 |
da7606d63b3e9ee235fc7b7daabc4a6def39784a | 4,285 | py | Python | blackduck/Utils.py | iskunk/hub-rest-api-python | 87ac93512137e99a1b600dfeecf48ace0aca7d53 | [
"Apache-2.0"
] | 68 | 2018-07-23T07:39:52.000Z | 2022-02-08T07:12:51.000Z | blackduck/Utils.py | iskunk/hub-rest-api-python | 87ac93512137e99a1b600dfeecf48ace0aca7d53 | [
"Apache-2.0"
] | 103 | 2018-08-06T14:45:16.000Z | 2022-03-22T10:43:53.000Z | blackduck/Utils.py | iskunk/hub-rest-api-python | 87ac93512137e99a1b600dfeecf48ace0aca7d53 | [
"Apache-2.0"
] | 78 | 2018-11-01T20:43:27.000Z | 2022-03-21T15:34:37.000Z | '''
Created on Dec 22, 2020
@author: ar-calder
'''
from datetime import datetime, timedelta
import dateutil.parser
import json
import logging
import re
logger = logging.getLogger(__name__)
def iso8601_to_date(iso_string, with_zone=False):
"""Utility function to convert iso_8601 formatted string to datetime ob... | 28.952703 | 115 | 0.658576 |
dd9cc08c155867762ef073fc30eab1ae0f6d3fe6 | 157 | py | Python | schedule/admin.py | Tanmoy-Sarkar/Varsity-Management-System | 11bf506d78cf15b11553bd2a971efef9d8272225 | [
"MIT"
] | null | null | null | schedule/admin.py | Tanmoy-Sarkar/Varsity-Management-System | 11bf506d78cf15b11553bd2a971efef9d8272225 | [
"MIT"
] | 1 | 2020-06-14T16:51:52.000Z | 2020-06-14T16:51:52.000Z | schedule/admin.py | Tanmoy-Sarkar/Varsity-Management-System | 11bf506d78cf15b11553bd2a971efef9d8272225 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Schedule,Routine
# Register your models here.
admin.site.register(Schedule)
admin.site.register(Routine) | 31.4 | 36 | 0.828025 |
d512a1bedffc41b08b6e5e7e09f1588130f86954 | 452 | py | Python | accounts/migrations/0003_profile_work.py | Ajuajmal/studevsoc-website | e5971261d2b549f12e658851c94df2a5d316ed2c | [
"MIT"
] | null | null | null | accounts/migrations/0003_profile_work.py | Ajuajmal/studevsoc-website | e5971261d2b549f12e658851c94df2a5d316ed2c | [
"MIT"
] | null | null | null | accounts/migrations/0003_profile_work.py | Ajuajmal/studevsoc-website | e5971261d2b549f12e658851c94df2a5d316ed2c | [
"MIT"
] | null | null | null | # Generated by Django 2.2.5 on 2019-10-05 15:05
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0002_profile_role'),
]
operations = [
migrations.AddField(
model_name='profile',
name='work',
... | 23.789474 | 124 | 0.615044 |
2d69fd52d2598cdc723489d623bed24c44cb0939 | 10,221 | py | Python | Autoencoders/SSAE.py | wudufan/KSAERecon | 34a49f6605e4ead124e33297632a4280258adf18 | [
"MIT"
] | 9 | 2018-02-20T10:29:33.000Z | 2022-02-08T17:57:09.000Z | Autoencoders/SSAE.py | wudufan/KSAERecon | 34a49f6605e4ead124e33297632a4280258adf18 | [
"MIT"
] | 1 | 2021-07-12T12:06:06.000Z | 2021-07-12T12:06:06.000Z | Autoencoders/SSAE.py | wudufan/KSAERecon | 34a49f6605e4ead124e33297632a4280258adf18 | [
"MIT"
] | 5 | 2019-05-03T21:44:11.000Z | 2020-09-17T03:27:42.000Z |
# coding: utf-8
# In[1]:
import tensorflow as tf
import numpy as np
# In[4]:
# stacked sparse autoencoder
class StackedSparseAutoEncoder:
# imageshape: shape of patch, in x,y,z
# nFeatures: # of features for each level of encoder, number of decoders are the same
# sparsity: sparsity parameter for dif... | 46.885321 | 172 | 0.583798 |
67619a066d291d5c01dbf40572e99e36a58e2ba8 | 9,070 | py | Python | at/client/os_handler.py | elagheb/at_commands | 51f1fa553b651b639aa3d1e1b3ac4ff07322f7a0 | [
"BSD-2-Clause"
] | null | null | null | at/client/os_handler.py | elagheb/at_commands | 51f1fa553b651b639aa3d1e1b3ac4ff07322f7a0 | [
"BSD-2-Clause"
] | null | null | null | at/client/os_handler.py | elagheb/at_commands | 51f1fa553b651b639aa3d1e1b3ac4ff07322f7a0 | [
"BSD-2-Clause"
] | null | null | null | import logging
import time
logger = logging.getLogger(__name__)
logger.addHandler(logging.NullHandler())
class WindowsHandler(object):
def __init__(self, connection, conn_alias):
self.connection = connection
self.conn_alias = conn_alias
def is_firewall_active(self):
firewall_states ... | 38.927039 | 117 | 0.633848 |
80b00da97308561a2f2a1b7458fd6ce8e4613736 | 333 | py | Python | Important Algorithms/Searching/BinarySearch.py | haaris272k/Problem-Solving-Collection | 5c8d0c36aff0d525ffec880115f5e123d0f3092b | [
"MIT"
] | 1 | 2022-02-28T06:49:25.000Z | 2022-02-28T06:49:25.000Z | Important Algorithms/Searching/BinarySearch.py | haaris272k/Problem-Solving-Collection | 5c8d0c36aff0d525ffec880115f5e123d0f3092b | [
"MIT"
] | null | null | null | Important Algorithms/Searching/BinarySearch.py | haaris272k/Problem-Solving-Collection | 5c8d0c36aff0d525ffec880115f5e123d0f3092b | [
"MIT"
] | null | null | null | """
Binary Search Algorithm
TC: O(log n)
"""
nums = [4, 5, 6, 7, 0, 1, 2]
target = 0
low = 0
high = len(nums) - 1
for i in range(len(nums)):
mid = low + (high - low) // 2
if nums[mid] == target:
print(mid)
elif nums[mid] < target:
low = mid + 1
else:
high = mid - 1
else:
... | 12.807692 | 33 | 0.489489 |
b4943dc8aedf0ba7114d645baa6e9dc2c39ed56f | 13,307 | py | Python | mozillians/groups/migrations/0020_functional_areas_accept_members.py | caktus/mozillians | 312eb5d993b60092fa4f8eb94548c1db4b21fa01 | [
"BSD-3-Clause"
] | null | null | null | mozillians/groups/migrations/0020_functional_areas_accept_members.py | caktus/mozillians | 312eb5d993b60092fa4f8eb94548c1db4b21fa01 | [
"BSD-3-Clause"
] | null | null | null | mozillians/groups/migrations/0020_functional_areas_accept_members.py | caktus/mozillians | 312eb5d993b60092fa4f8eb94548c1db4b21fa01 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
class Migration(DataMigration):
def forwards(self, orm):
orm.Group.objects.filter(functional_area=True).update(accepting_new_members='yes')
def backwards(self, orm):
... | 84.221519 | 226 | 0.563313 |
8b31c3024a1139973e2f7f00bdd19a534a3342d0 | 20,609 | py | Python | bokeh/plotting.py | gitter-badger/bokeh | 5481346de1642a4e6710d32b70262fd6c2674360 | [
"BSD-3-Clause"
] | null | null | null | bokeh/plotting.py | gitter-badger/bokeh | 5481346de1642a4e6710d32b70262fd6c2674360 | [
"BSD-3-Clause"
] | null | null | null | bokeh/plotting.py | gitter-badger/bokeh | 5481346de1642a4e6710d32b70262fd6c2674360 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function
import logging
logger = logging.getLogger(__name__)
import io
import itertools
import os
import time
import warnings
from . import browserlib
from . import _glyph_functions as gf
from .document import Document
from .embed import notebook_div, file_html, autoload_server
from .obj... | 31.416159 | 163 | 0.658208 |
2101573c58ade6af0a4da3686e2a4701181fbd26 | 3,265 | py | Python | conversion/convert_to_utf8/convert_to_utf8.py | mettalrose/text_processing | 52b47d7931a88cf8e0414aaaf0b8fccf339fd938 | [
"MIT"
] | 13 | 2017-11-07T22:01:15.000Z | 2021-09-10T22:21:05.000Z | conversion/convert_to_utf8/convert_to_utf8.py | mettalrose/text_processing | 52b47d7931a88cf8e0414aaaf0b8fccf339fd938 | [
"MIT"
] | 23 | 2018-01-08T21:35:58.000Z | 2021-08-09T22:12:29.000Z | conversion/convert_to_utf8/convert_to_utf8.py | mettalrose/text_processing | 52b47d7931a88cf8e0414aaaf0b8fccf339fd938 | [
"MIT"
] | 3 | 2018-07-05T20:11:28.000Z | 2022-02-08T14:38:08.000Z | #!/usr/local/bin/python3
# DESCRIPTION: Given a file or files passed as arguments to the script,
# attempt to guess the character encoding and open each file as such.
# If that fails, try to open the file as.
# Finally, encode the file in utf8 and place it in an "output" directory
#
# Usage example:
# python3 conve... | 34.010417 | 79 | 0.664012 |
facb920194f2d8847d1191328cdf97d49a31fbad | 4,498 | py | Python | MetaScreener/external_sw/mgltools/MGLToolsPckgs/CADD/Raccoon2/about.py | bio-hpc/metascreener | 6900497629f601c4b6c0c37da26de58ffa221988 | [
"Apache-2.0"
] | 8 | 2021-12-14T21:30:01.000Z | 2022-02-14T11:30:03.000Z | MetaScreener/external_sw/mgltools/MGLToolsPckgs/CADD/Raccoon2/about.py | bio-hpc/metascreener | 6900497629f601c4b6c0c37da26de58ffa221988 | [
"Apache-2.0"
] | null | null | null | MetaScreener/external_sw/mgltools/MGLToolsPckgs/CADD/Raccoon2/about.py | bio-hpc/metascreener | 6900497629f601c4b6c0c37da26de58ffa221988 | [
"Apache-2.0"
] | null | null | null | #
# AutoDock | Raccoon2
#
# Copyright 2013, Stefano Forli
# Molecular Graphics Lab
#
# The Scripps Research Institute
# _
# (,) T h e
# _/
# (.) S c r i p p s
# \_
# (,) R e s e a r c h
# ./
# ( ) I ... | 38.444444 | 98 | 0.60249 |
a37b660c3fa9f948a0ccee853cfa220c31d6c0c0 | 2,535 | py | Python | app/core/tests/test_models.py | DanielLund/recipe-app-api | 5b429a5be23ff7fd9b285a5c4508ddb2cc33b5c5 | [
"MIT"
] | null | null | null | app/core/tests/test_models.py | DanielLund/recipe-app-api | 5b429a5be23ff7fd9b285a5c4508ddb2cc33b5c5 | [
"MIT"
] | null | null | null | app/core/tests/test_models.py | DanielLund/recipe-app-api | 5b429a5be23ff7fd9b285a5c4508ddb2cc33b5c5 | [
"MIT"
] | null | null | null | from django.test import TestCase
from django.contrib.auth import get_user_model
from unittest.mock import patch
from core import models
def sample_user(email='test@gmail.com', password='testpass'):
""""Create a sample user"""
return get_user_model().objects.create_user(email, password)
class ModelTests(Te... | 30.914634 | 70 | 0.639053 |
2b7cc32da843c4953662b2367301276e44c24674 | 3,717 | py | Python | external/trappy/tests/test_copyright.py | qais-yousef/lisa | 8343e26bf0565589928a69ccbe67b1be03403db7 | [
"Apache-2.0"
] | 62 | 2015-08-14T11:30:37.000Z | 2022-02-26T13:22:53.000Z | external/trappy/tests/test_copyright.py | qais-yousef/lisa | 8343e26bf0565589928a69ccbe67b1be03403db7 | [
"Apache-2.0"
] | 208 | 2015-08-13T20:43:38.000Z | 2021-07-20T10:59:53.000Z | external/trappy/tests/test_copyright.py | qais-yousef/lisa | 8343e26bf0565589928a69ccbe67b1be03403db7 | [
"Apache-2.0"
] | 47 | 2015-08-13T14:49:05.000Z | 2022-02-26T13:22:52.000Z | # Copyright 2015-2017 ARM Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | 32.605263 | 78 | 0.60156 |
085d9bad83c75d4e3f947b69bc82aa9df0f08f83 | 2,550 | py | Python | demo.py | toannhu/Tacotron-2-VN | 4e3bae77a58b09b07e97679dbff6f93f97273fcd | [
"MIT"
] | 3 | 2019-10-14T08:41:01.000Z | 2021-01-22T08:12:59.000Z | demo.py | toannhu/Tacotron-2-VN | 4e3bae77a58b09b07e97679dbff6f93f97273fcd | [
"MIT"
] | null | null | null | demo.py | toannhu/Tacotron-2-VN | 4e3bae77a58b09b07e97679dbff6f93f97273fcd | [
"MIT"
] | 1 | 2020-11-25T13:58:21.000Z | 2020-11-25T13:58:21.000Z | import argparse
import os
import numpy as np
import tensorflow as tf
from normalization.data_load import load_source_vocab, load_target_vocab
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
def load_graph(frozen_graph_filename):
with tf.gfile.GFile(frozen_graph_filename, "rb") as f:
graph_def = tf.GraphDef()
... | 37.5 | 102 | 0.623137 |
4f84f252d16465ed9fa731e7e787588d306e1be6 | 1,422 | py | Python | harnessgen/util/ida_func_type.py | SmllXzBZ/winnie | f7d43947a5ff6acaef002febb096b11863b26e44 | [
"MIT"
] | 388 | 2021-01-14T21:12:51.000Z | 2022-03-31T08:30:59.000Z | harnessgen/util/ida_func_type.py | SmllXzBZ/winnie | f7d43947a5ff6acaef002febb096b11863b26e44 | [
"MIT"
] | 21 | 2021-01-20T01:16:28.000Z | 2022-03-19T15:19:20.000Z | harnessgen/util/ida_func_type.py | SmllXzBZ/winnie | f7d43947a5ff6acaef002febb096b11863b26e44 | [
"MIT"
] | 56 | 2021-05-01T07:38:29.000Z | 2022-03-24T15:44:06.000Z | import json
import os
import typing
from idautils import Segments, Functions
from idc import get_segm_start, get_segm_end, get_func_name
import idaapi
def serialize(tif: idaapi.tinfo_t) -> typing.Union[dict, None]:
fi = idaapi.func_type_data_t()
if not tif.get_func_details(fi):
return Non... | 25.854545 | 88 | 0.566807 |
5f9491a32b499100aeff40056dcd366ba1a7a4da | 2,090 | py | Python | edna2/tasks/test/Characterisation/Characterisation_exec_test_opid30a1_4.py | shibom/edna2 | 31e39b887be88a47bca775cd91310f5a17841bdd | [
"CC0-1.0",
"MIT"
] | null | null | null | edna2/tasks/test/Characterisation/Characterisation_exec_test_opid30a1_4.py | shibom/edna2 | 31e39b887be88a47bca775cd91310f5a17841bdd | [
"CC0-1.0",
"MIT"
] | 2 | 2020-04-06T10:39:50.000Z | 2021-04-14T19:24:37.000Z | edna2/tasks/test/Characterisation/Characterisation_exec_test_opid30a1_4.py | shibom/edna2 | 31e39b887be88a47bca775cd91310f5a17841bdd | [
"CC0-1.0",
"MIT"
] | 5 | 2019-06-14T07:28:38.000Z | 2021-04-28T13:10:39.000Z | #
# Copyright (c) European Synchrotron Radiation Facility (ESRF)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy,... | 39.433962 | 82 | 0.754545 |
c64c644c8cb1b5e686a04a0366f58dd2c3c13a6f | 2,265 | py | Python | nonconvex_ro/results_analysis.py | trsav/nonconvex_ro | c3a1677eb510e86531fe4b3e56f9b3f887f223aa | [
"MIT"
] | null | null | null | nonconvex_ro/results_analysis.py | trsav/nonconvex_ro | c3a1677eb510e86531fe4b3e56f9b3f887f223aa | [
"MIT"
] | null | null | null | nonconvex_ro/results_analysis.py | trsav/nonconvex_ro | c3a1677eb510e86531fe4b3e56f9b3f887f223aa | [
"MIT"
] | null | null | null | import json
import pandas as pd
import numpy as np
with open("results.json") as json_file:
data = json.load(json_file)
problems = list(data.values())
methods = list(data.keys())
cols = list(problems[0].keys())
metrics = ["wallclock_time", "problems_solved", "average_constraints_in_any_problem"]
cols = [c + " " +... | 30.608108 | 85 | 0.541722 |
d8bfc8994672a207d4dd948b79d2d4e36c7f17db | 3,441 | py | Python | setup.py | gkniesel/rasa_core | 00b2d1e05304d07945a3d973e4832f446ed2a921 | [
"Apache-2.0"
] | null | null | null | setup.py | gkniesel/rasa_core | 00b2d1e05304d07945a3d973e4832f446ed2a921 | [
"Apache-2.0"
] | null | null | null | setup.py | gkniesel/rasa_core | 00b2d1e05304d07945a3d973e4832f446ed2a921 | [
"Apache-2.0"
] | null | null | null | from setuptools import setup, find_packages
import io
import os
here = os.path.abspath(os.path.dirname(__file__))
# Avoids IDE errors, but actual version is read from version.py
__version__ = None
exec(open("rasa_core/version.py").read())
# Get the long description from the README file
with io.open(os.path.join(here... | 28.675 | 74 | 0.62075 |
fc0ab705d182e54bd1efda57caa6f8108613d944 | 7,510 | py | Python | pysc2/lib/point_test.py | rainwangphy/pysc2 | 9e3e5af7ba02b65ade3b902d830770cfa24d7c74 | [
"Apache-2.0"
] | null | null | null | pysc2/lib/point_test.py | rainwangphy/pysc2 | 9e3e5af7ba02b65ade3b902d830770cfa24d7c74 | [
"Apache-2.0"
] | null | null | null | pysc2/lib/point_test.py | rainwangphy/pysc2 | 9e3e5af7ba02b65ade3b902d830770cfa24d7c74 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 35.761905 | 84 | 0.623169 |
dfe98d50967f697a2c56fb38dcab44dfab703613 | 586 | py | Python | tests/cosrlibtests/test_ranker.py | commonsearch/cosr-back | 28ca0c1b938dde52bf4f59a835c98dd5ab22cad6 | [
"Apache-2.0"
] | 141 | 2016-02-17T14:27:57.000Z | 2021-12-27T02:56:48.000Z | tests/cosrlibtests/test_ranker.py | commonsearch/cosr-back | 28ca0c1b938dde52bf4f59a835c98dd5ab22cad6 | [
"Apache-2.0"
] | 69 | 2016-02-20T02:06:59.000Z | 2017-01-29T22:23:46.000Z | tests/cosrlibtests/test_ranker.py | commonsearch/cosr-back | 28ca0c1b938dde52bf4f59a835c98dd5ab22cad6 | [
"Apache-2.0"
] | 38 | 2016-02-25T04:40:07.000Z | 2020-06-11T07:22:44.000Z |
def test_get_global_document_rank_url(ranker):
def rank(url):
r, _ = ranker.client.get_global_url_rank(url)
return r
# Google isn't in our wikidata dump
assert 1 >= rank("http://google.com") > 0.5
# Facebook isn't in our DMOZ dump
assert rank("http://google.com") > rank("http://f... | 36.625 | 135 | 0.670648 |
e4e12f600fc86c4f4fbb9ca92d125cc6f48505bd | 4,954 | py | Python | composition_visualize.py | putama/visualcomposition | ada3d8e71b79a5f3e239718f3cdac58eca5e1327 | [
"MIT"
] | null | null | null | composition_visualize.py | putama/visualcomposition | ada3d8e71b79a5f3e239718f3cdac58eca5e1327 | [
"MIT"
] | null | null | null | composition_visualize.py | putama/visualcomposition | ada3d8e71b79a5f3e239718f3cdac58eca5e1327 | [
"MIT"
] | null | null | null | import argparse
import pickle
import torch
import torchvision.utils as vutils
import torchvision.transforms as transforms
import numpy as np
import torchvision.models as models
from torchvision import datasets
from tensorboardX import SummaryWriter
import utils_mit_im as im_utils
import dataset_mit_states as data_uti... | 37.530303 | 93 | 0.640694 |
f3f0b7e463ae1d2aebee4d11c7d7558f104431b3 | 22 | py | Python | src/HiddenMarkov/__init__.py | jonathan-smith-1/HMM | 7e38205deb071500b5e2fb43cb9b270825ca02b4 | [
"MIT"
] | null | null | null | src/HiddenMarkov/__init__.py | jonathan-smith-1/HMM | 7e38205deb071500b5e2fb43cb9b270825ca02b4 | [
"MIT"
] | null | null | null | src/HiddenMarkov/__init__.py | jonathan-smith-1/HMM | 7e38205deb071500b5e2fb43cb9b270825ca02b4 | [
"MIT"
] | null | null | null | from .Models import *
| 11 | 21 | 0.727273 |
e11a5aca2ef02da27231de6eba4983ce5dde7b1c | 1,319 | py | Python | piplate_modbus/contexts.py | drewhutchison/piplate_modbus | 6c621e3df5f061bf2a4eb998c053069c33eac5d6 | [
"MIT"
] | null | null | null | piplate_modbus/contexts.py | drewhutchison/piplate_modbus | 6c621e3df5f061bf2a4eb998c053069c33eac5d6 | [
"MIT"
] | null | null | null | piplate_modbus/contexts.py | drewhutchison/piplate_modbus | 6c621e3df5f061bf2a4eb998c053069c33eac5d6 | [
"MIT"
] | null | null | null | from piplates import DAQCplate as dp
from pymodbus.datastore import ModbusServerContext, ModbusSlaveContext
from pymodbus.device import ModbusDeviceIdentification
from piplate_modbus import VERSION
from piplate_modbus.datablocks import (
DAQCPlateDIDataBlock, DACQPlateCODataBlock, DACQPlateHRDataBlock,
DACQPla... | 32.975 | 75 | 0.706596 |
e142fd7f6ea5e3cc7b8ad9e94eb2a58a041f6d3b | 38,084 | py | Python | tools/gcs-bucket-mover/gcs_bucket_mover/bucket_mover_service.py | sourcery-ai-bot/professional-services | 0dd87e18560894bc68c05b580c6c9f2322eabc47 | [
"Apache-2.0"
] | null | null | null | tools/gcs-bucket-mover/gcs_bucket_mover/bucket_mover_service.py | sourcery-ai-bot/professional-services | 0dd87e18560894bc68c05b580c6c9f2322eabc47 | [
"Apache-2.0"
] | null | null | null | tools/gcs-bucket-mover/gcs_bucket_mover/bucket_mover_service.py | sourcery-ai-bot/professional-services | 0dd87e18560894bc68c05b580c6c9f2322eabc47 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Google LLC. 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 agreed to... | 40.300529 | 106 | 0.682413 |
3c1b09bb3b794316c499055e09f35522c3a19943 | 2,294 | py | Python | paramz/tests/array_core_tests.py | mzwiessele/mzparam | 897fb8b92f51c17e1dd92c60f69df718a3899d1b | [
"BSD-3-Clause"
] | 49 | 2015-11-07T16:31:25.000Z | 2022-03-17T07:40:02.000Z | paramz/tests/array_core_tests.py | mzwiessele/mzparam | 897fb8b92f51c17e1dd92c60f69df718a3899d1b | [
"BSD-3-Clause"
] | 32 | 2015-12-02T11:27:25.000Z | 2020-09-09T06:01:03.000Z | paramz/tests/array_core_tests.py | mzwiessele/mzparam | 897fb8b92f51c17e1dd92c60f69df718a3899d1b | [
"BSD-3-Clause"
] | 27 | 2015-11-05T10:17:02.000Z | 2021-04-23T13:46:21.000Z | #===============================================================================
# Copyright (c) 2018, Max Zwiessele
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of sour... | 45.88 | 105 | 0.691805 |
052c143f79d43490d4f3213cc8b4c47a2757c060 | 1,591 | py | Python | nipype/interfaces/afni/tests/test_auto_Automask.py | PAmcconnell/nipype | 39fbd5411a844ce7c023964d3295eb7643b95af5 | [
"Apache-2.0"
] | null | null | null | nipype/interfaces/afni/tests/test_auto_Automask.py | PAmcconnell/nipype | 39fbd5411a844ce7c023964d3295eb7643b95af5 | [
"Apache-2.0"
] | 2 | 2018-04-26T12:09:32.000Z | 2018-04-27T06:36:49.000Z | nipype/interfaces/afni/tests/test_auto_Automask.py | PAmcconnell/nipype | 39fbd5411a844ce7c023964d3295eb7643b95af5 | [
"Apache-2.0"
] | 1 | 2019-11-14T14:16:57.000Z | 2019-11-14T14:16:57.000Z | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ..preprocess import Automask
def test_Automask_inputs():
input_map = dict(
args=dict(argstr='%s', ),
brain_file=dict(
argstr='-apply_prefix %s',
extensions=None,
name_source='in_file',
name_t... | 28.927273 | 67 | 0.543055 |
94d8a4a8827c97f266a188723628b04359a139f2 | 1,373 | py | Python | cmsplugin_cascade/segmentation/admin.py | aDENTinTIME/djangocms-cascade | c38c1c5ad052dbe233b50fb833ad8e9a919014f2 | [
"MIT"
] | 139 | 2015-01-08T22:27:06.000Z | 2021-08-19T03:36:58.000Z | cmsplugin_cascade/segmentation/admin.py | aDENTinTIME/djangocms-cascade | c38c1c5ad052dbe233b50fb833ad8e9a919014f2 | [
"MIT"
] | 286 | 2015-01-02T14:15:14.000Z | 2022-03-22T11:00:12.000Z | cmsplugin_cascade/segmentation/admin.py | aDENTinTIME/djangocms-cascade | c38c1c5ad052dbe233b50fb833ad8e9a919014f2 | [
"MIT"
] | 91 | 2015-01-16T15:06:23.000Z | 2022-03-23T23:36:54.000Z | from django.forms import MediaDefiningClass
from django.contrib import admin
from django.utils.module_loading import import_string
from cmsplugin_cascade import app_settings
from cmsplugin_cascade.models import Segmentation
class SegmentationAdminMetaclass(MediaDefiningClass):
def __new__(cls, name, bases, attrs)... | 36.131579 | 117 | 0.70284 |
3311ed2b3a5ead52b88193061c35a6c917c135ff | 975 | py | Python | tests/vm_impl/vm_impl_function.py | Vincent34/mindspore | a39a60878a46e7e9cb02db788c0bca478f2fa6e5 | [
"Apache-2.0"
] | 3,200 | 2020-02-17T12:45:41.000Z | 2022-03-31T20:21:16.000Z | tests/vm_impl/vm_impl_function.py | Vincent34/mindspore | a39a60878a46e7e9cb02db788c0bca478f2fa6e5 | [
"Apache-2.0"
] | 176 | 2020-02-12T02:52:11.000Z | 2022-03-28T22:15:55.000Z | tests/vm_impl/vm_impl_function.py | Vincent34/mindspore | a39a60878a46e7e9cb02db788c0bca478f2fa6e5 | [
"Apache-2.0"
] | 621 | 2020-03-09T01:31:41.000Z | 2022-03-30T03:43:19.000Z | # Copyright 2021 Huawei Technologies 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
#
# Unless required by applicable law or agreed to... | 40.625 | 78 | 0.69641 |
0645e8770de8b816c4a8e03d9dc2998b90ed0eca | 1,186 | py | Python | lottery_ticket/mnist_fc/runners/lottery_experimentRun.py | hcoffey1/lottery-ticket-hypothesis | 7a69cacd255f2d78a189af64c68a85c5aa3bf97c | [
"Apache-2.0"
] | null | null | null | lottery_ticket/mnist_fc/runners/lottery_experimentRun.py | hcoffey1/lottery-ticket-hypothesis | 7a69cacd255f2d78a189af64c68a85c5aa3bf97c | [
"Apache-2.0"
] | null | null | null | lottery_ticket/mnist_fc/runners/lottery_experimentRun.py | hcoffey1/lottery-ticket-hypothesis | 7a69cacd255f2d78a189af64c68a85c5aa3bf97c | [
"Apache-2.0"
] | 1 | 2020-04-27T20:45:35.000Z | 2020-04-27T20:45:35.000Z | # Copyright (C) 2018 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 law or agreed to in writing, ... | 33.885714 | 100 | 0.784992 |
2244a4a0e983bb04db83f581eb0c5c7c06cc78d8 | 3,392 | py | Python | section1_default_comparison_for_strong_hurricanes/Source_code_for_extracting_data/16km_codes/1_Calculate_z0_time_series_at_eyewall.py | Sunnyfred/Atlantic_Hurricane_Simulations | ee5d6d0f975876a01c4a21bebd3089bf3bbb843a | [
"MIT"
] | null | null | null | section1_default_comparison_for_strong_hurricanes/Source_code_for_extracting_data/16km_codes/1_Calculate_z0_time_series_at_eyewall.py | Sunnyfred/Atlantic_Hurricane_Simulations | ee5d6d0f975876a01c4a21bebd3089bf3bbb843a | [
"MIT"
] | null | null | null | section1_default_comparison_for_strong_hurricanes/Source_code_for_extracting_data/16km_codes/1_Calculate_z0_time_series_at_eyewall.py | Sunnyfred/Atlantic_Hurricane_Simulations | ee5d6d0f975876a01c4a21bebd3089bf3bbb843a | [
"MIT"
] | 1 | 2021-11-05T18:14:09.000Z | 2021-11-05T18:14:09.000Z | import os
import math
import numpy as np
import matplotlib as matplot
import matplotlib.pyplot as plt
from netCDF4 import Dataset
import csv
from wrf import (to_np, getvar, smooth2d, get_cartopy, cartopy_xlim,
cartopy_ylim, latlon_coords)
# List the colors that will be used for tracing the track.
co... | 33.92 | 177 | 0.63237 |
6f4a36d37c7cd524b152dcd6ddb2a33d45f2b58a | 5,151 | py | Python | day/ten/main.py | stupoid/aoc-2020 | dc72f81c7e0150baeb208bf5470a4cb9d79864d9 | [
"MIT"
] | null | null | null | day/ten/main.py | stupoid/aoc-2020 | dc72f81c7e0150baeb208bf5470a4cb9d79864d9 | [
"MIT"
] | null | null | null | day/ten/main.py | stupoid/aoc-2020 | dc72f81c7e0150baeb208bf5470a4cb9d79864d9 | [
"MIT"
] | null | null | null | """
--- Day 10: Adapter Array ---
Patched into the aircraft's data port, you discover weather forecasts of a massive tropical storm. Before you can figure out whether it will impact your vacation plans, however, your device suddenly turns off!
Its battery is dead.
You'll need to plug it in. There's only one problem: ... | 35.770833 | 291 | 0.735974 |
f3fe290c06830e61e3b957b4ea9158e831cb3094 | 6,624 | py | Python | Capsian/components/light.py | Gyro7/Capsian-Engine | 0cedbfc9dbdf741926ae48e680d2b89c35b91af6 | [
"Apache-2.0"
] | null | null | null | Capsian/components/light.py | Gyro7/Capsian-Engine | 0cedbfc9dbdf741926ae48e680d2b89c35b91af6 | [
"Apache-2.0"
] | null | null | null | Capsian/components/light.py | Gyro7/Capsian-Engine | 0cedbfc9dbdf741926ae48e680d2b89c35b91af6 | [
"Apache-2.0"
] | null | null | null | # ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# Copyright (c) 2008-2020 pyglet contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the follo... | 31.098592 | 120 | 0.556763 |
ce80c82c95d030afa21ae73a90c7b934f4a36c57 | 1,105 | py | Python | tests/core/test_exp_matrix.py | flo-compbio/monet | 1cb561dfa9ea64973bd5325123b9e480bffd2cb3 | [
"BSD-3-Clause"
] | 39 | 2020-06-10T06:01:25.000Z | 2021-06-05T07:34:13.000Z | tests/core/test_exp_matrix.py | flo-compbio/monet | 1cb561dfa9ea64973bd5325123b9e480bffd2cb3 | [
"BSD-3-Clause"
] | 1 | 2020-06-10T06:11:29.000Z | 2020-06-19T15:51:55.000Z | tests/core/test_exp_matrix.py | flo-compbio/monet | 1cb561dfa9ea64973bd5325123b9e480bffd2cb3 | [
"BSD-3-Clause"
] | 9 | 2020-06-12T03:56:13.000Z | 2020-06-22T16:11:39.000Z | # Author: Florian Wagner <florian.compbio@gmail.com>
# Copyright (c) 2020 Florian Wagner
#
# This file is part of Monet.
"""Tests for the `ExpMatrix` class."""
import pytest
import numpy as np
from monet.core import ExpMatrix
def test_load_npz(expression_npz_file):
matrix = ExpMatrix.load_npz(expression_npz_f... | 24.021739 | 55 | 0.750226 |
2454f93030bd3fae12fb1b72a94c679559956167 | 741 | py | Python | setup.py | tatsukawa/softclip | 56f0dfa8e727733239974a43cd80f0cb1d7b16b3 | [
"MIT"
] | 1 | 2022-03-07T11:16:18.000Z | 2022-03-07T11:16:18.000Z | setup.py | tatsukawa/softclip | 56f0dfa8e727733239974a43cd80f0cb1d7b16b3 | [
"MIT"
] | 1 | 2022-03-17T07:06:09.000Z | 2022-03-17T07:06:09.000Z | setup.py | tatsukawa/softclip | 56f0dfa8e727733239974a43cd80f0cb1d7b16b3 | [
"MIT"
] | 1 | 2022-03-17T04:02:34.000Z | 2022-03-17T04:02:34.000Z | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="softclip",
version="0.0.1",
install_requires=[
"jax",
"distrax"
],
author="yonesuke",
author_email="13e.e.c.13@gmail.com",
description="JAX/Flax implementation of s... | 27.444444 | 54 | 0.632928 |
4ba43ddb36f400f0103390fcaf912786c017d91c | 2,346 | py | Python | st2common/st2common/models/api/sensor.py | totalkyos/stack-storm | b89bc648d53dae03c7484d22abd771edfe45bbb8 | [
"Apache-2.0"
] | 1 | 2021-04-08T03:21:49.000Z | 2021-04-08T03:21:49.000Z | st2common/st2common/models/api/sensor.py | totalkyos/stack-storm | b89bc648d53dae03c7484d22abd771edfe45bbb8 | [
"Apache-2.0"
] | null | null | null | st2common/st2common/models/api/sensor.py | totalkyos/stack-storm | b89bc648d53dae03c7484d22abd771edfe45bbb8 | [
"Apache-2.0"
] | null | null | null | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | 31.28 | 82 | 0.523444 |
5398d5287e67ddd3c1d3ed72d8e3e272b864221f | 964 | py | Python | testing/arcpy/test_business_analyst_local.py | knu2xs/business-analyst-python-api | c2f3c40d91239cbb1f7689b491156e0653358426 | [
"Apache-2.0"
] | null | null | null | testing/arcpy/test_business_analyst_local.py | knu2xs/business-analyst-python-api | c2f3c40d91239cbb1f7689b491156e0653358426 | [
"Apache-2.0"
] | null | null | null | testing/arcpy/test_business_analyst_local.py | knu2xs/business-analyst-python-api | c2f3c40d91239cbb1f7689b491156e0653358426 | [
"Apache-2.0"
] | null | null | null | # get the global test functions and fixtures
from ..business_anlyst_tests import *
# local tests
def test_business_analyst_instantiation_local():
business_analyst_instantiation_test('local')
def test_enrichment_countries_local():
business_analyst_countries_test('local')
def test_business_analyst_get_count... | 25.368421 | 125 | 0.794606 |
2b3ab5c7603c4cf336174b6dcc77890d497cd92d | 2,653 | py | Python | startertest/settings.py | brin2806/startertest | 9e1d9641b7e6bb5ed7f655a0a8c298f42347aa9c | [
"MIT"
] | null | null | null | startertest/settings.py | brin2806/startertest | 9e1d9641b7e6bb5ed7f655a0a8c298f42347aa9c | [
"MIT"
] | null | null | null | startertest/settings.py | brin2806/startertest | 9e1d9641b7e6bb5ed7f655a0a8c298f42347aa9c | [
"MIT"
] | null | null | null | """
Django settings for startertest project.
Generated by 'django-admin startproject' using Django 1.8.4.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build ... | 25.757282 | 71 | 0.702601 |
f1eb86b02644df2f987cb610a962a53624aee30a | 8,471 | py | Python | looker_client_30/looker_sdk/credentials_totp.py | gustavs408650/looker_sdk_30 | 8b52449f216b2cb3b84f09e2856bcea1ed4a2b0c | [
"MIT"
] | null | null | null | looker_client_30/looker_sdk/credentials_totp.py | gustavs408650/looker_sdk_30 | 8b52449f216b2cb3b84f09e2856bcea1ed4a2b0c | [
"MIT"
] | null | null | null | looker_client_30/looker_sdk/credentials_totp.py | gustavs408650/looker_sdk_30 | 8b52449f216b2cb3b84f09e2856bcea1ed4a2b0c | [
"MIT"
] | 1 | 2019-11-12T10:05:51.000Z | 2019-11-12T10:05:51.000Z | # coding: utf-8
"""
Looker API 3.0 Reference
### Authorization The Looker API uses Looker **API3** credentials for authorization and access control. Looker admins can create API3 credentials on Looker's **Admin/Users** page. Pass API3 credentials to the **/login** endpoint to obtain a temporary access_token.... | 33.219608 | 1,639 | 0.609963 |
58ae0f98a438d425ed3b028577777f63338cd851 | 6,443 | py | Python | test/netlib/test_multidict.py | jvillacorta/mitmproxy | 3aa2d59f627e0fc95167fb76ffbe84330e3a5cc5 | [
"MIT"
] | 1 | 2018-03-31T17:16:07.000Z | 2018-03-31T17:16:07.000Z | test/netlib/test_multidict.py | jvillacorta/mitmproxy | 3aa2d59f627e0fc95167fb76ffbe84330e3a5cc5 | [
"MIT"
] | null | null | null | test/netlib/test_multidict.py | jvillacorta/mitmproxy | 3aa2d59f627e0fc95167fb76ffbe84330e3a5cc5 | [
"MIT"
] | 4 | 2018-04-18T13:17:01.000Z | 2021-02-21T17:08:33.000Z | from netlib import tutils
from netlib.multidict import MultiDict, ImmutableMultiDict, MultiDictView
class _TMulti(object):
@staticmethod
def _kconv(key):
return key.lower()
class TMultiDict(_TMulti, MultiDict):
pass
class TImmutableMultiDict(_TMulti, ImmutableMultiDict):
pass
class TestM... | 25.979839 | 93 | 0.476952 |
9f88e7e36540649763cede708f933c1b60f4cd88 | 428 | py | Python | src/compas/datastructures/mesh/core/__init__.py | kathrindoerfler/compas | e876b36b582ee055da673befca1b7ced3834090c | [
"MIT"
] | null | null | null | src/compas/datastructures/mesh/core/__init__.py | kathrindoerfler/compas | e876b36b582ee055da673befca1b7ced3834090c | [
"MIT"
] | null | null | null | src/compas/datastructures/mesh/core/__init__.py | kathrindoerfler/compas | e876b36b582ee055da673befca1b7ced3834090c | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from compas import IPY
from .halfedge import HalfEdge # noqa: F401
from .mesh import BaseMesh # noqa: F401
from .operations import * # noqa: F401 F403
from .clean import * # noqa: F401 F403
if not IPY:
... | 28.533333 | 62 | 0.747664 |
e610bd821c12d324f088ad3956d6fe624641e9b8 | 542 | py | Python | app/models/item.py | LuxQuad/ozet-core-api | bf0cd9e4b58bf9b7e805843df4dfe7320afa7e4b | [
"MIT"
] | null | null | null | app/models/item.py | LuxQuad/ozet-core-api | bf0cd9e4b58bf9b7e805843df4dfe7320afa7e4b | [
"MIT"
] | 5 | 2021-08-10T03:38:31.000Z | 2021-08-11T12:39:34.000Z | app/models/item.py | LuxQuad/ozet-core-api | bf0cd9e4b58bf9b7e805843df4dfe7320afa7e4b | [
"MIT"
] | null | null | null | """
@Author:
Bart Kim
@Note:
"""
from sqlalchemy import Boolean, Column, ForeignKey, Integer, String
from sqlalchemy.orm import relationship
from app.database import esume_base
class Item(esume_base):
__tablename__ = "items"
# Identifyer
id = Column(Integer, primary_key=True, index=True)
# C... | 20.074074 | 67 | 0.699262 |
8fecf6d760a5e83d5522e3d1b1e720c256ea4838 | 2,051 | py | Python | piwik/indico_piwik/queries/graphs.py | javfg/indico-plugins | 1032f41001e1b1c296e378e0366ccd2a1043dc5d | [
"MIT"
] | null | null | null | piwik/indico_piwik/queries/graphs.py | javfg/indico-plugins | 1032f41001e1b1c296e378e0366ccd2a1043dc5d | [
"MIT"
] | null | null | null | piwik/indico_piwik/queries/graphs.py | javfg/indico-plugins | 1032f41001e1b1c296e378e0366ccd2a1043dc5d | [
"MIT"
] | null | null | null | # This file is part of the Indico plugins.
# Copyright (C) 2002 - 2021 CERN
#
# The Indico plugins are free software; you can redistribute
# them and/or modify them under the terms of the MIT License;
# see the LICENSE file for more details.
from base64 import b64encode
from flask_pluginengine import current_plugin
... | 40.215686 | 115 | 0.677231 |
7c2f368986eb501988dc0aaf3a7049257fa9a447 | 3,728 | py | Python | examples/echo/echo_client.py | ip-config/oef-sdk-python | 7d68c2950a4975b649ff0dce8006d1607cdad24b | [
"Apache-2.0"
] | 2 | 2019-03-27T09:48:27.000Z | 2021-02-16T02:46:39.000Z | examples/echo/echo_client.py | therobertc/oef-sdk-python | 7d68c2950a4975b649ff0dce8006d1607cdad24b | [
"Apache-2.0"
] | null | null | null | examples/echo/echo_client.py | therobertc/oef-sdk-python | 7d68c2950a4975b649ff0dce8006d1607cdad24b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2018 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may ob... | 34.841121 | 113 | 0.644045 |
bbb96a94f79b45523862c0a8149d2210abd4f3ca | 6,512 | py | Python | dashboard/dashboard/dump_graph_json.py | BearerPipelineTest/catapult | 3800a67cd916200046a50748893bbd0dcf3d7f4a | [
"BSD-3-Clause"
] | null | null | null | dashboard/dashboard/dump_graph_json.py | BearerPipelineTest/catapult | 3800a67cd916200046a50748893bbd0dcf3d7f4a | [
"BSD-3-Clause"
] | 1 | 2022-01-12T14:28:55.000Z | 2022-01-12T14:28:55.000Z | dashboard/dashboard/dump_graph_json.py | atuchin-m/catapult | 108ea3e2ec108e68216b1250a3d79cc642600294 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Provides a web interface for dumping graph data as JSON.
This is meant to be used with /load_from_prod in order to easily grab
data for a graph to a local... | 35.977901 | 89 | 0.710688 |
db499ce018867458d6fa5312136a17d5a815b23c | 3,530 | py | Python | bindings/python/ensmallen/datasets/string/citrobactersps77.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/citrobactersps77.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/citrobactersps77.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph Citrobacter sp. S77.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING v11: protein--protein as... | 32.685185 | 223 | 0.674221 |
f51074f49766627a3de4606c288680a6ac0c85a2 | 7,420 | py | Python | tests/conftest.py | ysk24ok/dd-trace-py | 9d76e3b27c0e90a45721988f2008362683da8bb0 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | tests/conftest.py | ysk24ok/dd-trace-py | 9d76e3b27c0e90a45721988f2008362683da8bb0 | [
"Apache-2.0",
"BSD-3-Clause"
] | 3 | 2022-02-16T09:35:37.000Z | 2022-03-04T16:48:45.000Z | tests/conftest.py | goodspark/dd-trace-py | e2089c7b348e9d1a70e01f96927d85a643d6ae56 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2022-02-11T16:34:22.000Z | 2022-02-11T16:34:22.000Z | import ast
import contextlib
from itertools import product
import os
from os.path import split
from os.path import splitext
import sys
from tempfile import NamedTemporaryFile
import time
from _pytest.runner import CallInfo
from _pytest.runner import TestReport
import pytest
from six import PY2
import ddtrace
from tes... | 28.984375 | 120 | 0.651482 |
bef8a60a53454f8149d8e98d780712998a33c170 | 733 | py | Python | selfdrive/controls/lib/latcontrol_angle.py | deanh8/openpilot | 495250bf12af79a02f43bab9c9e93b3be0daf72e | [
"MIT"
] | null | null | null | selfdrive/controls/lib/latcontrol_angle.py | deanh8/openpilot | 495250bf12af79a02f43bab9c9e93b3be0daf72e | [
"MIT"
] | null | null | null | selfdrive/controls/lib/latcontrol_angle.py | deanh8/openpilot | 495250bf12af79a02f43bab9c9e93b3be0daf72e | [
"MIT"
] | null | null | null | import math
from cereal import log
class LatControlAngle():
def __init__(self, CP):
pass
def reset(self):
pass
def update(self, active, CS, CP, VM, params, desired_curvature, desired_curvature_rate):
angle_log = log.ControlsState.LateralAngleState.new_message()
if CS.vEgo < 0.3 or not active:... | 28.192308 | 108 | 0.729877 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.