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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ddee87075899569423a1b5f9ff3b0f5185a1f91c | 3,677 | py | Python | noname.py | schellenberg/lyric-grabber-for-plex | f449b480d4c234ff9d358fc7d9a0e729e9ed45e5 | [
"MIT"
] | 26 | 2019-09-30T02:29:05.000Z | 2022-01-17T20:10:54.000Z | noname.py | schellenberg/lyric-grabber-for-plex | f449b480d4c234ff9d358fc7d9a0e729e9ed45e5 | [
"MIT"
] | 5 | 2019-10-02T18:53:48.000Z | 2020-05-06T14:07:25.000Z | noname.py | schellenberg/lyric-grabber-for-plex | f449b480d4c234ff9d358fc7d9a0e729e9ed45e5 | [
"MIT"
] | 6 | 2019-09-30T13:04:22.000Z | 2022-03-24T17:47:16.000Z | # -*- coding: utf-8 -*-
###########################################################################
## Python code generated with wxFormBuilder (version Oct 26 2018)
## http://www.wxformbuilder.org/
##
## PLEASE DO *NOT* EDIT THIS FILE!
###########################################################################
impor... | 39.537634 | 213 | 0.689421 | 3,162 | 0.85994 | 0 | 0 | 0 | 0 | 0 | 0 | 678 | 0.184389 |
ddefc795048cf6d437ec89f16bc748675c74df14 | 1,371 | py | Python | feature_extraction/cli.py | widoptimization-willett/feature-extraction | 25e963e3383673aad6aedfd504e69a1df7f47f9a | [
"Apache-2.0"
] | null | null | null | feature_extraction/cli.py | widoptimization-willett/feature-extraction | 25e963e3383673aad6aedfd504e69a1df7f47f9a | [
"Apache-2.0"
] | null | null | null | feature_extraction/cli.py | widoptimization-willett/feature-extraction | 25e963e3383673aad6aedfd504e69a1df7f47f9a | [
"Apache-2.0"
] | null | null | null | import json
import click
from tqdm import tqdm
import numpy as np
from PIL import Image
from skimage.exposure import rescale_intensity
from . import extraction, pipeline
np.seterr(all='raise')
@click.command()
@click.argument('pipeline_manifest', required=True)
@click.argument('files', nargs=-1, required=True) # un... | 32.642857 | 106 | 0.745441 | 0 | 0 | 0 | 0 | 1,173 | 0.85558 | 0 | 0 | 430 | 0.31364 |
ddeff9d5eb6e649b509f4b345051a62872b3798f | 186 | py | Python | homepage/templatetags/infos_tags.py | phodal/phodaldev | b5a48339a21b5674a70d284a85ef8c45e010fe43 | [
"MIT"
] | 94 | 2015-01-28T15:46:02.000Z | 2020-11-02T12:56:15.000Z | homepage/templatetags/infos_tags.py | phodal/phodaldev | b5a48339a21b5674a70d284a85ef8c45e010fe43 | [
"MIT"
] | 56 | 2015-04-05T03:18:41.000Z | 2021-08-29T00:50:57.000Z | homepage/templatetags/infos_tags.py | phodal/phodaldev | b5a48339a21b5674a70d284a85ef8c45e010fe43 | [
"MIT"
] | 38 | 2015-08-26T08:10:12.000Z | 2021-06-11T19:36:31.000Z | from mezzanine import template
from homepage.models import Info
register = template.Library()
@register.as_tag
def about():
about = Info.objects.get(type="ABOUT")
return about
| 18.6 | 42 | 0.747312 | 0 | 0 | 0 | 0 | 89 | 0.478495 | 0 | 0 | 7 | 0.037634 |
ddf10fa882b2377b78f180954bd012323f534965 | 514 | py | Python | test/unit/test_main.py | CMPUT291PROJECT1F18/Mini-Project-1 | b58144dd80c40466de755877b7c3996f4aa67af9 | [
"MIT"
] | 1 | 2018-11-06T01:04:13.000Z | 2018-11-06T01:04:13.000Z | test/unit/test_main.py | CMPUT291PROJECT1F18/Mini-Project-1 | b58144dd80c40466de755877b7c3996f4aa67af9 | [
"MIT"
] | 39 | 2018-10-23T00:28:13.000Z | 2018-11-06T16:14:56.000Z | test/unit/test_main.py | CMPUT291PROJECT1F18/Mini-Project-1 | b58144dd80c40466de755877b7c3996f4aa67af9 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""pytests for :mod:`.__main__`"""
from mini_project_1.__main__ import get_parser, main
import mock
def test_get_parser():
parser = get_parser()
assert parser
def test_main(tmpdir):
tmp_file = tmpdir.join("thefile_name.json")
tmp_file_name = str(tmp_file)... | 23.363636 | 93 | 0.680934 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 170 | 0.330739 |
ddf357f8f64530a6e0a779ab33c258cb0322ac3e | 189 | py | Python | kafka/1/consumer/kaktatest.py | adriancarriger/experiments | 7e4248592dc8fbb08522c9b5f0393c80dc7e2699 | [
"MIT"
] | 1 | 2021-06-22T13:38:36.000Z | 2021-06-22T13:38:36.000Z | kafka/1/consumer/kaktatest.py | adriancarriger/experiments | 7e4248592dc8fbb08522c9b5f0393c80dc7e2699 | [
"MIT"
] | 108 | 2019-05-23T16:12:32.000Z | 2020-09-04T15:47:33.000Z | kafka/1/consumer/kaktatest.py | adriancarriger/experiments | 7e4248592dc8fbb08522c9b5f0393c80dc7e2699 | [
"MIT"
] | null | null | null | from kafka import KafkaConsumer
consumer = KafkaConsumer('myTestTopic', bootstrap_servers='localhost:9092')
for item in consumer:
print("The Message is :", item)
# https://kafka-1:9092
| 31.5 | 75 | 0.756614 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 69 | 0.365079 |
ddf3aa22469fb9543ce65c54187ad310deed6e44 | 67,701 | py | Python | src/genie/libs/parser/iosxe/tests/ShowIpBgpDetail/cli/equal/golden_output2_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 204 | 2018-06-27T00:55:27.000Z | 2022-03-06T21:12:18.000Z | src/genie/libs/parser/iosxe/tests/ShowIpBgpDetail/cli/equal/golden_output2_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 468 | 2018-06-19T00:33:18.000Z | 2022-03-31T23:23:35.000Z | src/genie/libs/parser/iosxe/tests/ShowIpBgpDetail/cli/equal/golden_output2_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 309 | 2019-01-16T20:21:07.000Z | 2022-03-30T12:56:41.000Z | expected_output = {
"instance": {
"default": {
"vrf": {
"L3VPN-0050": {
"address_family": {
"vpnv4": {
"default_vrf": "L3VPN-0050",
"prefixes": {
"1... | 60.936994 | 86 | 0.203084 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 17,587 | 0.259775 |
ddf4a85d16651173e5cecae5af1d1cdea3c48b47 | 154 | py | Python | pages/apps.py | slideclimb/django-template | c489c118c47fe3510f7d5a36781d2d8835ef5ba6 | [
"MIT"
] | 2 | 2019-07-11T08:24:20.000Z | 2021-09-16T22:08:42.000Z | pages/apps.py | slideclimb/django-template | c489c118c47fe3510f7d5a36781d2d8835ef5ba6 | [
"MIT"
] | 3 | 2021-06-09T17:17:16.000Z | 2021-06-10T17:25:04.000Z | pages/apps.py | slideclimb/django-template | c489c118c47fe3510f7d5a36781d2d8835ef5ba6 | [
"MIT"
] | 1 | 2018-10-07T15:32:27.000Z | 2018-10-07T15:32:27.000Z | """ This file is here to register apps. """
from django.apps import AppConfig
class HomeConfig(AppConfig):
""" Register app. """
name = 'pages'
| 19.25 | 43 | 0.655844 | 73 | 0.474026 | 0 | 0 | 0 | 0 | 0 | 0 | 71 | 0.461039 |
ddf5245a022beb682381f18774e07b7d784a9065 | 1,150 | py | Python | Tests/test_protected_views.py | ShavImigne/PlayChess | 1eb0dcaf1d58b02bdc880f8e51857a87696ee461 | [
"MIT"
] | 12 | 2018-05-02T13:13:41.000Z | 2022-03-13T15:37:29.000Z | Tests/test_protected_views.py | ShavImigne/PlayChess | 1eb0dcaf1d58b02bdc880f8e51857a87696ee461 | [
"MIT"
] | 24 | 2018-05-03T13:06:56.000Z | 2019-08-13T14:49:03.000Z | Tests/test_protected_views.py | ShavImigne/PlayChess | 1eb0dcaf1d58b02bdc880f8e51857a87696ee461 | [
"MIT"
] | 17 | 2018-05-03T13:46:40.000Z | 2021-06-26T13:57:05.000Z | from .client import client
from .config import db_pass, db_user
import string
import random
def test_login_logout(client):
return_login_status = client.post('/login', data={"username": db_user, "password": db_pass})
# Redirected to home
assert return_login_status.status_code==302
# Now that user is lo... | 41.071429 | 112 | 0.736522 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 339 | 0.294783 |
ddf773cd5e3b923f5c8398a0b49c16c0818baa89 | 1,575 | py | Python | Tiny-Blockchain/Blockchain.py | gusjasponde/Tiny-Blockchain | e1abe11f70b845cc461afd329c54d5d7d79fd9c8 | [
"MIT"
] | 2 | 2021-04-17T17:36:45.000Z | 2021-06-22T21:48:54.000Z | Tiny-Blockchain/Blockchain.py | gusjasponde/Tiny-Blockchain | e1abe11f70b845cc461afd329c54d5d7d79fd9c8 | [
"MIT"
] | null | null | null | Tiny-Blockchain/Blockchain.py | gusjasponde/Tiny-Blockchain | e1abe11f70b845cc461afd329c54d5d7d79fd9c8 | [
"MIT"
] | 1 | 2017-10-24T00:53:49.000Z | 2017-10-24T00:53:49.000Z | import hashlib
import json
import datetime
import Util
#Defining the block into our blockchain
class Block:
def __init__(self, index, timestamp, data, previous_hash):
self.index = index
self.timestamp = timestamp.isoformat()
self.data = data
self.previous_hash = previous_hash
... | 30.288462 | 129 | 0.675556 | 711 | 0.451429 | 0 | 0 | 0 | 0 | 0 | 0 | 226 | 0.143492 |
ddf791c1dd4726087d87f8647d381ae32e01c53c | 437 | py | Python | 6. Heap exploitation/exploit_3.py | MBWlodarczyk/bso_project | a4620fb18d7f789d917627232dc85ef9bcad7e3d | [
"MIT"
] | null | null | null | 6. Heap exploitation/exploit_3.py | MBWlodarczyk/bso_project | a4620fb18d7f789d917627232dc85ef9bcad7e3d | [
"MIT"
] | null | null | null | 6. Heap exploitation/exploit_3.py | MBWlodarczyk/bso_project | a4620fb18d7f789d917627232dc85ef9bcad7e3d | [
"MIT"
] | 1 | 2021-05-27T22:04:35.000Z | 2021-05-27T22:04:35.000Z | from pwn import *
def malloc(name):
p.sendlineafter('>> ','1 '+name)
def free(id):
p.sendlineafter('>> ', '2 '+str(id))
p = process("./vuln_3.o")
gdb.attach(p)
for i in range(8):
malloc('a')
malloc('a')
malloc('a')
for i in range(9):
free(i-1)
free(8)
free(9)
free(8)
for i in range(8):
ma... | 11.5 | 40 | 0.567506 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 0.187643 |
ddf7f46a03e2f875d36d3fadd6c70b90528b78f0 | 1,202 | py | Python | setup.py | originell/sentry-twilio | 716c444649b38b68f9d6a02986de090bb7e580b9 | [
"MIT"
] | null | null | null | setup.py | originell/sentry-twilio | 716c444649b38b68f9d6a02986de090bb7e580b9 | [
"MIT"
] | 1 | 2017-02-01T16:49:25.000Z | 2017-02-01T16:49:25.000Z | setup.py | originell/sentry-twilio | 716c444649b38b68f9d6a02986de090bb7e580b9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
sentry-twilio
=============
Sentry Notification plugin for Twilio Programmable SMS.
:copyright: 2017 Luis Nell.
:license: MIT, see LICENSE for more details.
"""
from __future__ import absolute_import
from setuptools import setup, find_packages
VERSION = '1.0'
install_requires = [
'twil... | 24.04 | 74 | 0.645591 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 620 | 0.515807 |
ddf8e32544c5c3cd5719527188568b3163339c08 | 3,146 | py | Python | tests/test_refresh_subscription.py | Fak3/websubsub | f7ca8953197104483b152367c716028d841facbb | [
"MIT"
] | 4 | 2018-03-18T03:44:24.000Z | 2019-08-10T00:40:54.000Z | tests/test_refresh_subscription.py | Fak3/websubsub | f7ca8953197104483b152367c716028d841facbb | [
"MIT"
] | 9 | 2020-02-12T13:38:38.000Z | 2021-06-02T01:03:43.000Z | tests/test_refresh_subscription.py | Fak3/websubsub | f7ca8953197104483b152367c716028d841facbb | [
"MIT"
] | 2 | 2019-08-10T00:41:00.000Z | 2020-02-09T10:09:59.000Z | import re
from datetime import timedelta
import responses
from django.test import override_settings
from django.utils.timezone import now
from model_mommy.mommy import make
from websubsub.models import Subscription
from websubsub.tasks import refresh_subscriptions, retry_failed
from .base import BaseTestCase, method_... | 35.75 | 92 | 0.61602 | 2,814 | 0.894469 | 0 | 0 | 0 | 0 | 0 | 0 | 1,083 | 0.344247 |
ddf9fcd921f244664cbca84e5f6bac067c77d492 | 281 | py | Python | ares/physics/__init__.py | astrojhgu/ares | 42008c8e4bf79f0b000cc833e02a86510bce7611 | [
"MIT"
] | 1 | 2019-01-04T15:13:18.000Z | 2019-01-04T15:13:18.000Z | ares/physics/__init__.py | astrojhgu/ares | 42008c8e4bf79f0b000cc833e02a86510bce7611 | [
"MIT"
] | null | null | null | ares/physics/__init__.py | astrojhgu/ares | 42008c8e4bf79f0b000cc833e02a86510bce7611 | [
"MIT"
] | null | null | null | import Constants
from .Hydrogen import Hydrogen
from .Cosmology import Cosmology
from .HaloMassFunction import HaloMassFunction
from .RateCoefficients import RateCoefficients
from .SecondaryElectrons import SecondaryElectrons
from .CrossSections import PhotoIonizationCrossSection
| 35.125 | 54 | 0.886121 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ddfc5813cf287a659f99142896404836acf1a2ad | 9,452 | py | Python | src/agents/base.py | anindex/drqn-study | ab357178bbe6a1e09eda0f19583e8e8444bf4a54 | [
"MIT"
] | null | null | null | src/agents/base.py | anindex/drqn-study | ab357178bbe6a1e09eda0f19583e8e8444bf4a54 | [
"MIT"
] | null | null | null | src/agents/base.py | anindex/drqn-study | ab357178bbe6a1e09eda0f19583e8e8444bf4a54 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import logging
import numpy as np
import random
from collections import deque
import torch
from os.path import exists
from torch.nn.functional import smooth_l1_loss, mse_loss # noqa
from torch.optim import Adam... | 44.375587 | 167 | 0.643779 | 8,942 | 0.946043 | 0 | 0 | 62 | 0.006559 | 0 | 0 | 1,628 | 0.172239 |
ddfd26bd635a43dc9642fa41b92d7f6a9fd3de78 | 1,449 | py | Python | mongo_commander/widgets.py | thieman/mongo_commander | 407cccb1abdf16b3eb07f813f5dd5d9152930f4d | [
"MIT"
] | 2 | 2015-02-22T04:52:22.000Z | 2018-12-14T10:33:25.000Z | mongo_commander/widgets.py | thieman/mongo_commander | 407cccb1abdf16b3eb07f813f5dd5d9152930f4d | [
"MIT"
] | null | null | null | mongo_commander/widgets.py | thieman/mongo_commander | 407cccb1abdf16b3eb07f813f5dd5d9152930f4d | [
"MIT"
] | null | null | null | """Widgets abstract out common View rendering patterns like displaying
a list of logging messages or a bar chart. They typically take the ClusterData
object, a window, and a list of keys they should care about from ClusterData.
They then draw directly onto the window."""
from operator import itemgetter
from .curses_u... | 39.162162 | 99 | 0.655625 | 1,098 | 0.757764 | 0 | 0 | 0 | 0 | 0 | 0 | 390 | 0.269151 |
ddfe5b6a2bd63f44708eacd4d1f196837c88804e | 958 | py | Python | tests/feature_propagation_test.py | emalgorithm/feature-propagation | de9ec54d5c035abe8d52d6ac4079156cc537e489 | [
"Apache-2.0"
] | 20 | 2022-03-09T00:06:23.000Z | 2022-03-18T09:59:36.000Z | tests/feature_propagation_test.py | emalgorithm/feature-propagation | de9ec54d5c035abe8d52d6ac4079156cc537e489 | [
"Apache-2.0"
] | 2 | 2022-03-14T22:00:58.000Z | 2022-03-21T02:11:50.000Z | tests/feature_propagation_test.py | twitter-research/feature-propagation | af2733589eab4023fca67f7e71a3b46ddbbea8cd | [
"Apache-2.0"
] | 3 | 2022-03-09T05:36:53.000Z | 2022-03-11T13:53:45.000Z | """
Copyright 2020 Twitter, Inc.
SPDX-License-Identifier: Apache-2.0
"""
import unittest
import math
import torch
from feature_propagation import FeaturePropagation
class TestFeaturePropagation(unittest.TestCase):
def test_feature_propagation(self):
X = torch.Tensor([1 / 2, 0, 1 / 3, 0]).reshape(-1, 1)
... | 29.9375 | 114 | 0.59499 | 739 | 0.771399 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 0.085595 |
ddfeb380f562b06f02d54e1879c575812aad04dd | 1,282 | py | Python | publication_backbone/views/promotion.py | Excentrics/publication-backbone | 65c9820308b09a6ae1086c265f8d49e36f3724b9 | [
"BSD-3-Clause"
] | 6 | 2016-05-19T14:59:51.000Z | 2020-03-19T10:08:29.000Z | publication_backbone/views/promotion.py | Excentrics/publication-backbone | 65c9820308b09a6ae1086c265f8d49e36f3724b9 | [
"BSD-3-Clause"
] | null | null | null | publication_backbone/views/promotion.py | Excentrics/publication-backbone | 65c9820308b09a6ae1086c265f8d49e36f3724b9 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from publication_backbone.views.publication import PublicationListHybridView
from publication_backbone import conf as config
#==============================================================================
# PromotionListHybridView
#===============================================================... | 42.733333 | 132 | 0.620125 | 946 | 0.73791 | 0 | 0 | 0 | 0 | 0 | 0 | 410 | 0.319813 |
ddff02eefab9048a47d0d1a8a7f90b6f135ea01d | 2,427 | py | Python | tests/test_file.py | gaiadhi/traDSSAT | 1d5615dbd4965bab5c2740134c706c1748ff5fae | [
"MIT"
] | 6 | 2020-10-05T11:50:37.000Z | 2022-02-24T08:36:22.000Z | tests/test_file.py | gaiadhi/traDSSAT | 1d5615dbd4965bab5c2740134c706c1748ff5fae | [
"MIT"
] | 23 | 2018-11-08T19:16:36.000Z | 2021-07-20T23:34:18.000Z | tests/test_file.py | gaiadhi/traDSSAT | 1d5615dbd4965bab5c2740134c706c1748ff5fae | [
"MIT"
] | 9 | 2018-11-06T21:04:07.000Z | 2021-06-19T05:43:24.000Z | import os
import unittest
import numpy.testing as npt
from tradssat import SoilFile, WTHFile, MTHFile, ExpFile, CULFile, ECOFile, DSSATResults
from tradssat.out import SoilTempOut, SoilNiOut, SummaryOut, PlantGroOut, ETOut, SoilWatOut, MulchOut
from tests.utils import _test_read, _test_write, rsrcs, read_json, get_re... | 35.173913 | 101 | 0.689328 | 1,788 | 0.736712 | 0 | 0 | 0 | 0 | 0 | 0 | 323 | 0.133086 |
fb00206f76f0396ffc60257de95610a6a4ddebea | 2,840 | py | Python | airflow_spark_k8s/hooks/kubernetes.py | roitvt/airflow-spark-k8s | cd2a0ec63e1fb9ad43beb725a65e4d65a4d85206 | [
"Apache-2.0"
] | 2 | 2020-04-26T11:12:11.000Z | 2020-09-14T16:36:42.000Z | airflow_spark_k8s/hooks/kubernetes.py | roitvt/airflow-spark-k8s | cd2a0ec63e1fb9ad43beb725a65e4d65a4d85206 | [
"Apache-2.0"
] | 1 | 2020-04-14T18:20:20.000Z | 2020-04-14T18:26:27.000Z | airflow_spark_k8s/hooks/kubernetes.py | roitvt/airflow-spark-k8s | cd2a0ec63e1fb9ad43beb725a65e4d65a4d85206 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 37.866667 | 109 | 0.679225 | 1,951 | 0.686972 | 0 | 0 | 0 | 0 | 0 | 0 | 1,593 | 0.560915 |
fb00a41d3f7f3756cedf6911bccc4f0b80b7ea08 | 325 | py | Python | tests/test_main.py | david-kirby/gh-action-docs | b231d14b0b629b4f308eba6cff50a35a98c9f521 | [
"MIT"
] | 1 | 2021-03-21T14:31:46.000Z | 2021-03-21T14:31:46.000Z | tests/test_main.py | david-kirby/gh-action-docs | b231d14b0b629b4f308eba6cff50a35a98c9f521 | [
"MIT"
] | null | null | null | tests/test_main.py | david-kirby/gh-action-docs | b231d14b0b629b4f308eba6cff50a35a98c9f521 | [
"MIT"
] | null | null | null | import logging
import unittest
from src.gh_action_docs import app
logging.disable(logging.CRITICAL)
class TestActionFileCheck(unittest.TestCase):
def test_no_files_found(self):
results = app.check_for_file("not-existent-file")
self.assertFalse(results)
if __name__ == "__main__":
unittest.ma... | 20.3125 | 57 | 0.747692 | 172 | 0.529231 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 0.089231 |
fb00e00f9183ef8f33d3c9279268db8384609198 | 2,785 | py | Python | astwro/tools/pickstat.py | majkelx/astwro | 4a9bbe3e4757c4076ad7c0d90cf08e38dab4e794 | [
"MIT"
] | 6 | 2017-06-15T20:34:51.000Z | 2020-04-15T14:21:43.000Z | astwro/tools/pickstat.py | majkelx/astwro | 4a9bbe3e4757c4076ad7c0d90cf08e38dab4e794 | [
"MIT"
] | 18 | 2017-08-15T20:53:55.000Z | 2020-10-05T23:40:34.000Z | astwro/tools/pickstat.py | majkelx/astwro | 4a9bbe3e4757c4076ad7c0d90cf08e38dab4e794 | [
"MIT"
] | 2 | 2017-11-06T15:33:53.000Z | 2020-10-02T21:06:05.000Z | #! /usr/bin/env python
# coding=utf-8
from __future__ import print_function, division
from scipy.stats import sigmaclip
from astwro.pydaophot import daophot
from astwro.pydaophot import fname
from astwro.pydaophot import allstar
from astwro.starlist import read_dao_file
from astwro.starlist import write_ds9_regions
... | 34.8125 | 99 | 0.65386 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,132 | 0.406463 |
fb0391e58115974e49fe694882ae6ffe7af0d172 | 2,330 | py | Python | 5.4/IPheaderChecksum.py | Fecer/Computer-Networks | fe4fc5bd1af7f2957aee407675cb018fa83c6735 | [
"MIT"
] | null | null | null | 5.4/IPheaderChecksum.py | Fecer/Computer-Networks | fe4fc5bd1af7f2957aee407675cb018fa83c6735 | [
"MIT"
] | null | null | null | 5.4/IPheaderChecksum.py | Fecer/Computer-Networks | fe4fc5bd1af7f2957aee407675cb018fa83c6735 | [
"MIT"
] | null | null | null | from xml.dom.minidom import parse
def printLine():
print('------------------------------------------')
if __name__ == '__main__':
# 获取参数
DOMTree = parse("config.xml")
collection = DOMTree.documentElement
header = collection.getElementsByTagName('header')[0].childNodes[0].data
printLine()
... | 24.526316 | 76 | 0.546781 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 369 | 0.157827 |
fb04b4d690c1875517b3d05188b4d5a597035143 | 865 | py | Python | server/src/dixit/game/test/player.py | rcjsuen/dixit-online | e7a1c9b5b1a2a92160c6d90397adaa81ddcae91a | [
"MIT"
] | 75 | 2016-08-05T10:37:32.000Z | 2022-01-27T17:05:50.000Z | server/src/dixit/game/test/player.py | rcjsuen/dixit-online | e7a1c9b5b1a2a92160c6d90397adaa81ddcae91a | [
"MIT"
] | 15 | 2020-03-19T16:27:59.000Z | 2022-02-13T08:41:54.000Z | server/src/dixit/game/test/player.py | rcjsuen/dixit-online | e7a1c9b5b1a2a92160c6d90397adaa81ddcae91a | [
"MIT"
] | 27 | 2018-02-27T13:32:46.000Z | 2021-12-26T06:42:08.000Z |
from django.test import TestCase
from django.contrib.auth.models import User
from dixit import settings
from dixit.game.models.game import Game, GameStatus
from dixit.game.models.player import Player
class PlayerTest(TestCase):
fixtures = ['game_testcards.json', ]
def setUp(self):
self.user = User.... | 36.041667 | 101 | 0.719075 | 660 | 0.763006 | 0 | 0 | 0 | 0 | 0 | 0 | 104 | 0.120231 |
fb065d69e3fc3e1cb562662179076e51434cc538 | 7,933 | py | Python | portality/settings.py | genonfire/portality | 1d94382fa0e6685f106ae18d4a44f4f4b5946771 | [
"MIT"
] | 2 | 2018-01-16T04:01:57.000Z | 2020-04-06T14:07:11.000Z | portality/settings.py | genonfire/portality | 1d94382fa0e6685f106ae18d4a44f4f4b5946771 | [
"MIT"
] | null | null | null | portality/settings.py | genonfire/portality | 1d94382fa0e6685f106ae18d4a44f4f4b5946771 | [
"MIT"
] | 1 | 2017-12-31T02:45:38.000Z | 2017-12-31T02:45:38.000Z | # -*- coding: utf-8 -*-
"""
Django settings for portality project.
Generated by 'django-admin startproject' using Django 1.8.17.
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/... | 27.167808 | 83 | 0.63343 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,517 | 0.613614 |
fb07a1b009f2ec4dd007b6d28b15a16a4abfeb17 | 29 | py | Python | python/callback/func/func.py | qingkaikong/useful_script | 2547931dd11dbff7438e323ff4cd168427ff92ce | [
"BSD-3-Clause"
] | 4 | 2016-03-16T17:06:42.000Z | 2021-07-26T15:43:42.000Z | python/callback/func/func.py | qingkaikong/useful_script | 2547931dd11dbff7438e323ff4cd168427ff92ce | [
"BSD-3-Clause"
] | null | null | null | python/callback/func/func.py | qingkaikong/useful_script | 2547931dd11dbff7438e323ff4cd168427ff92ce | [
"BSD-3-Clause"
] | 3 | 2015-12-01T20:38:19.000Z | 2020-12-15T20:10:34.000Z | def test(a, b):
print b() | 14.5 | 15 | 0.517241 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fb07a87646537aa7d24a8747c95b7298fca053cd | 98 | py | Python | backup_codes/apps.py | biligunb/portal-web-app | cd10cda3d8bfc8f055a268e14f9665f142051c90 | [
"MIT"
] | null | null | null | backup_codes/apps.py | biligunb/portal-web-app | cd10cda3d8bfc8f055a268e14f9665f142051c90 | [
"MIT"
] | null | null | null | backup_codes/apps.py | biligunb/portal-web-app | cd10cda3d8bfc8f055a268e14f9665f142051c90 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class BackupCodesConfig(AppConfig):
name = "backup_codes"
| 16.333333 | 35 | 0.77551 | 61 | 0.622449 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.142857 |
fb07d1f256a2f6d7a6cc9dbdf801ef7f4558d52a | 323 | py | Python | TP_ALGO_3/convert.py | PierreLeGuen/ALGO_S5 | 9067e887d14fe997c6944292a0cff23ceda47b6e | [
"MIT"
] | null | null | null | TP_ALGO_3/convert.py | PierreLeGuen/ALGO_S5 | 9067e887d14fe997c6944292a0cff23ceda47b6e | [
"MIT"
] | null | null | null | TP_ALGO_3/convert.py | PierreLeGuen/ALGO_S5 | 9067e887d14fe997c6944292a0cff23ceda47b6e | [
"MIT"
] | null | null | null | def convert(n,base):
if n < base:
res = str(n)
else:
res = convert(n//base,base) + str(n%base)
return res
print(convert(10,2))
def convert_inv(n,base):
if n < base:
res = str(n)
else:
res = str(n%base) + convert(n//base,base)
return res
print(convert_inv(10,2... | 16.15 | 49 | 0.544892 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fb083e9034d5ab0e5ac6315a7e5ffb3f614cc66e | 1,029 | py | Python | tests/motors/spikebase_tank1.py | cschlack/pybricks-micropython | 0abfd2918267a4e6e7a04062976ac1bb3da1f4b1 | [
"MIT"
] | 1 | 2021-12-27T00:09:37.000Z | 2021-12-27T00:09:37.000Z | tests/motors/spikebase_tank1.py | cschlack/pybricks-micropython | 0abfd2918267a4e6e7a04062976ac1bb3da1f4b1 | [
"MIT"
] | null | null | null | tests/motors/spikebase_tank1.py | cschlack/pybricks-micropython | 0abfd2918267a4e6e7a04062976ac1bb3da1f4b1 | [
"MIT"
] | null | null | null | from pybricks.pupdevices import Motor
from pybricks.tools import wait
from pybricks.parameters import Port, Direction
from pybricks.robotics import SpikeBase
from pybricks import version
print(version)
# Initialize base.
left_motor = Motor(Port.C)
right_motor = Motor(Port.D)
spike_base = SpikeBase(left_motor, right_m... | 29.4 | 78 | 0.808552 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 295 | 0.286686 |
fb097754f4efecf6545051b20dad8dee8adaa09e | 1,136 | py | Python | cyto/basic/_dict.py | sbtinstruments/cyto | f452562e5e9ae9d2516cd92958af6e6a2c985dcc | [
"MIT"
] | 5 | 2021-04-03T04:09:38.000Z | 2021-12-17T15:05:18.000Z | cyto/basic/_dict.py | sbtinstruments/cyto | f452562e5e9ae9d2516cd92958af6e6a2c985dcc | [
"MIT"
] | 1 | 2021-04-21T17:00:29.000Z | 2021-04-21T19:12:30.000Z | cyto/basic/_dict.py | sbtinstruments/cyto | f452562e5e9ae9d2516cd92958af6e6a2c985dcc | [
"MIT"
] | null | null | null | from typing import Any, Dict
def deep_update(dest: Dict[Any, Any], other: Dict[Any, Any]) -> None:
"""Update `dest` with the key/value pairs from `other`.
Returns `None`. Note that we modify `dest` in place.
Unlike the built-in `dict.Update`, `deep_update` recurses into sub-dictionaries.
This effect... | 39.172414 | 84 | 0.634683 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 668 | 0.588028 |
fb0b0d61a04227b98b766bf05a1daba731f1fb99 | 2,312 | py | Python | api_logic_server_cli/create_from_model/ui_basic_web_app_run.py | valhuber/ApiLogicServer | a4acd8d886a18d4d500e0fffffcaa2f1c0765040 | [
"BSD-3-Clause"
] | 71 | 2021-01-23T17:34:33.000Z | 2022-03-29T13:11:29.000Z | api_logic_server_cli/create_from_model/ui_basic_web_app_run.py | valhuber/ApiLogicServer | a4acd8d886a18d4d500e0fffffcaa2f1c0765040 | [
"BSD-3-Clause"
] | 38 | 2021-01-24T21:56:30.000Z | 2022-03-08T18:49:00.000Z | api_logic_server_cli/create_from_model/ui_basic_web_app_run.py | valhuber/ApiLogicServer | a4acd8d886a18d4d500e0fffffcaa2f1c0765040 | [
"BSD-3-Clause"
] | 14 | 2021-01-23T16:20:44.000Z | 2022-03-24T10:48:28.000Z | # runs ApiLogicServer basic web app:
# python ui/basic_web_app/run.py
# Export PYTHONPATH, to enable python ui/basic_web_app/run.py
import os, sys, logging
from pathlib import Path
logger = logging.getLogger()
current_path = Path(os.path.abspath(os.path.dirname(__file__)))
current_path = current_path.parent.absolute... | 36.125 | 105 | 0.733131 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 941 | 0.407007 |
fb0b24730ac65daad4c5e515482703fc512b4066 | 300 | py | Python | output/models/nist_data/list_pkg/non_positive_integer/schema_instance/nistschema_sv_iv_list_non_positive_integer_length_1_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/nist_data/list_pkg/non_positive_integer/schema_instance/nistschema_sv_iv_list_non_positive_integer_length_1_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/nist_data/list_pkg/non_positive_integer/schema_instance/nistschema_sv_iv_list_non_positive_integer_length_1_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from output.models.nist_data.list_pkg.non_positive_integer.schema_instance.nistschema_sv_iv_list_non_positive_integer_length_1_xsd.nistschema_sv_iv_list_non_positive_integer_length_1 import NistschemaSvIvListNonPositiveIntegerLength1
__all__ = [
"NistschemaSvIvListNonPositiveIntegerLength1",
]
| 50 | 233 | 0.91 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.15 |
fb0c48302e90f96e57473fb786d4ea50f4be0f46 | 190 | py | Python | cbot/__init__.py | wangyitao/cbot | 6b2500f5118ddd5ef581f31104e70e5a57b72f7d | [
"MIT"
] | 8 | 2018-10-18T09:15:36.000Z | 2019-09-01T04:42:59.000Z | cbot/__init__.py | wangyitao/cbot | 6b2500f5118ddd5ef581f31104e70e5a57b72f7d | [
"MIT"
] | 1 | 2018-10-19T06:35:38.000Z | 2018-10-19T06:35:38.000Z | cbot/__init__.py | wangyitao/cbot | 6b2500f5118ddd5ef581f31104e70e5a57b72f7d | [
"MIT"
] | 5 | 2018-10-19T05:56:26.000Z | 2019-09-01T04:43:11.000Z | from .main import CBot
__version__ = '0.1.0'
__author__ = 'Felix Wang'
__email__ = 'felix2@foxmail.com'
__url__ = 'https://github.com/wangyitao/cbot'
__all__ = (
'CBot',
)
| 15.833333 | 46 | 0.636842 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 80 | 0.421053 |
fb0e6ce0d08d8c7d2254af54405bab1d2071c99d | 4,219 | py | Python | elastic_inference/apps/infer_service.py | qzheng527/cloud-native-demos | e2dbcfc0d90c1972bc34a35f5d85f83f2b2b6cf6 | [
"Apache-2.0"
] | 1 | 2020-04-06T10:11:27.000Z | 2020-04-06T10:11:27.000Z | elastic_inference/apps/infer_service.py | qzheng527/cloud-native-demos | e2dbcfc0d90c1972bc34a35f5d85f83f2b2b6cf6 | [
"Apache-2.0"
] | null | null | null | elastic_inference/apps/infer_service.py | qzheng527/cloud-native-demos | e2dbcfc0d90c1972bc34a35f5d85f83f2b2b6cf6 | [
"Apache-2.0"
] | 2 | 2021-01-19T21:42:08.000Z | 2021-08-13T19:59:06.000Z | #!/usr/bin/python3
"""
Infer service.
It pick up single frame from frame queue and do inference. The result will be
published to stream broker like below.
+---------------------+ +---------------+ +-----------------------+
| Frame Queue (redis) | => | Infer Service | => | Stream broker (redis) |
+--------... | 35.158333 | 99 | 0.599194 | 2,314 | 0.548471 | 0 | 0 | 0 | 0 | 0 | 0 | 1,577 | 0.373785 |
fb0ed9b104a5cd8f1fa264f1f6318ff1bd1ed415 | 288 | py | Python | P25010-Guangzhou-Jiachengwu/week07/ex_filecopy.py | xiaohh2016/python-25 | 8981ba89bfb32754c3f9c881ee8fcaf13332ce51 | [
"Apache-2.0"
] | 1 | 2019-09-11T23:24:58.000Z | 2019-09-11T23:24:58.000Z | P25010-Guangzhou-Jiachengwu/week07/ex_filecopy.py | xiaohh2016/python-25 | 8981ba89bfb32754c3f9c881ee8fcaf13332ce51 | [
"Apache-2.0"
] | null | null | null | P25010-Guangzhou-Jiachengwu/week07/ex_filecopy.py | xiaohh2016/python-25 | 8981ba89bfb32754c3f9c881ee8fcaf13332ce51 | [
"Apache-2.0"
] | 5 | 2019-09-11T06:33:34.000Z | 2020-02-17T12:52:31.000Z | # 使用Python copy一个文件,从a目录,copy文件到b目录
import os
from pathlib import Path
import shutil
src_path=Path('a/test')
dst_path=Path('b/test')
with open(src_path,'w') as src_file:
src_file.write('abcd\n1234')
shutil.copy(src_path,dst_path)
print(os.stat(src_path))
print(os.stat(dst_path)) | 18 | 36 | 0.756944 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 96 | 0.301887 |
fb0fe20410b5c56d7291f72bd22a841605532524 | 548 | py | Python | vanirio/module/interface/textfield.py | vaniriovanhalteren/sdk-python | 947b08fbe046d46275bf39bc95984fbf3edc0e6c | [
"MIT"
] | null | null | null | vanirio/module/interface/textfield.py | vaniriovanhalteren/sdk-python | 947b08fbe046d46275bf39bc95984fbf3edc0e6c | [
"MIT"
] | null | null | null | vanirio/module/interface/textfield.py | vaniriovanhalteren/sdk-python | 947b08fbe046d46275bf39bc95984fbf3edc0e6c | [
"MIT"
] | 1 | 2022-02-08T08:15:07.000Z | 2022-02-08T08:15:07.000Z | from vanirio.module.interface.base import Base
class Textfield(Base):
def __init__(self, tag: str, label: str):
"""
A Textfield interface object is used as a parameter for module
software. The interface can be used for string values.
:param label: GUI label name
:param tag... | 24.909091 | 70 | 0.600365 | 497 | 0.906934 | 0 | 0 | 0 | 0 | 0 | 0 | 234 | 0.427007 |
fb1042dc49fa8be20e43a1d8892da1c69f7bf202 | 2,348 | py | Python | utils.py | lanyinemt2/ST-PlusPlus | 7c31abfcf21e390a06c4d5da1f77a9fe5ff071ed | [
"MIT"
] | 73 | 2021-06-10T01:12:04.000Z | 2022-03-30T08:31:24.000Z | utils.py | lanyinemt2/ST-PlusPlus | 7c31abfcf21e390a06c4d5da1f77a9fe5ff071ed | [
"MIT"
] | 12 | 2021-07-01T00:27:11.000Z | 2022-03-17T05:09:49.000Z | utils.py | lanyinemt2/ST-PlusPlus | 7c31abfcf21e390a06c4d5da1f77a9fe5ff071ed | [
"MIT"
] | 18 | 2021-06-10T11:24:31.000Z | 2022-03-31T16:48:58.000Z | import numpy as np
from PIL import Image
def count_params(model):
param_num = sum(p.numel() for p in model.parameters())
return param_num / 1e6
class meanIOU:
def __init__(self, num_classes):
self.num_classes = num_classes
self.hist = np.zeros((num_classes, num_classes))
def _fast_h... | 33.070423 | 106 | 0.520017 | 802 | 0.341567 | 0 | 0 | 0 | 0 | 0 | 0 | 41 | 0.017462 |
fb107ee4532ec8cc33a8bdd76e5d3973b9f4d818 | 3,671 | py | Python | lib/bus/client.py | hoffmannmatheus/eaZy | d79ade0e01a23f1c6fa585ee378ed70c95976b05 | [
"MIT",
"Unlicense"
] | 3 | 2015-01-11T15:29:48.000Z | 2020-09-08T14:52:14.000Z | lib/bus/client.py | hoffmannmatheus/eaZy | d79ade0e01a23f1c6fa585ee378ed70c95976b05 | [
"MIT",
"Unlicense"
] | null | null | null | lib/bus/client.py | hoffmannmatheus/eaZy | d79ade0e01a23f1c6fa585ee378ed70c95976b05 | [
"MIT",
"Unlicense"
] | null | null | null | import zmq
import json
"""
Class used by the Client entity to communicate to the Server.
The communication channel should be configured using the three ports:
- com_port: Used to receive broadcast messages from the Server entity.
- set_port: Used to send messages/request data to the Server entity.
- res_port: Used t... | 35.990196 | 79 | 0.625443 | 3,168 | 0.86298 | 0 | 0 | 0 | 0 | 0 | 0 | 2,158 | 0.587851 |
fb12ef0139d2387d5de8cd18fde96987527d5c7f | 2,821 | py | Python | ops.py | fivoskal/MGAN | 2eb1407c907af5f472a80e8ae363bee57d5cfaa4 | [
"MIT"
] | 37 | 2018-03-07T15:32:09.000Z | 2022-03-01T06:54:06.000Z | ops.py | fivoskal/MGAN | 2eb1407c907af5f472a80e8ae363bee57d5cfaa4 | [
"MIT"
] | 2 | 2018-09-19T23:20:07.000Z | 2019-06-15T13:45:54.000Z | ops.py | fivoskal/MGAN | 2eb1407c907af5f472a80e8ae363bee57d5cfaa4 | [
"MIT"
] | 18 | 2018-05-23T11:09:34.000Z | 2022-03-22T08:38:13.000Z | from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
import numpy as np
import tensorflow as tf
def lrelu(x, alpha=0.2):
return tf.maximum(x, alpha * x)
def linear(input, output_dim, scope='linear', stddev=0.01):
norm = tf.random_normal_initializer(stdd... | 39.732394 | 98 | 0.611485 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 255 | 0.090393 |
fb176c1fa7c1a70a322d3da71abe867bb4b0b96a | 2,431 | py | Python | spacy/tests/regression/test_issue999.py | cmgreivel/spaCy | a31506e06060c559abfeda043503935691af2e98 | [
"MIT"
] | 88 | 2018-05-06T17:28:23.000Z | 2022-03-06T20:19:16.000Z | spacy/tests/regression/test_issue999.py | cmgreivel/spaCy | a31506e06060c559abfeda043503935691af2e98 | [
"MIT"
] | 12 | 2018-07-19T15:11:57.000Z | 2021-08-05T11:58:29.000Z | spacy/tests/regression/test_issue999.py | cmgreivel/spaCy | a31506e06060c559abfeda043503935691af2e98 | [
"MIT"
] | 10 | 2018-07-28T22:43:04.000Z | 2020-11-22T22:58:21.000Z | from __future__ import unicode_literals
import os
import random
import contextlib
import shutil
import pytest
import tempfile
from pathlib import Path
import pathlib
from ...gold import GoldParse
from ...pipeline import EntityRecognizer
from ...language import Language
try:
unicode
except NameError:
unicode ... | 29.646341 | 88 | 0.633073 | 0 | 0 | 167 | 0.068696 | 2,054 | 0.84492 | 0 | 0 | 536 | 0.220485 |
fb19896662026b64b3faf3ab0b1d3c77cfab5f56 | 323 | py | Python | mavisetc/__init__.py | jtmendel/mavisetc | 4cd6800a7c4462f9a8063060c41e19719d35c5ee | [
"MIT"
] | null | null | null | mavisetc/__init__.py | jtmendel/mavisetc | 4cd6800a7c4462f9a8063060c41e19719d35c5ee | [
"MIT"
] | null | null | null | mavisetc/__init__.py | jtmendel/mavisetc | 4cd6800a7c4462f9a8063060c41e19719d35c5ee | [
"MIT"
] | null | null | null | try:
from ._version import __version__
except(ImportError):
pass
from . import instruments
from . import sources
from . import sky
from . import utils
from . import telescopes
from . import detectors
from . import filters
__all__ = ['instruments', 'sources', 'sky', 'utils', 'telescopes', 'detectors', 'filters... | 21.533333 | 90 | 0.724458 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 66 | 0.204334 |
fb1a14af54cb6584a01ac6a47d46cd0d5260f471 | 293 | py | Python | tests/test_lqr_speed_steer_control.py | pruidzeko/PythonRobotics | 5ff9b70d737121c2947d844ecfb1fa07abdd210c | [
"MIT"
] | 38 | 2019-12-08T12:26:04.000Z | 2022-03-06T11:29:08.000Z | tests/test_lqr_speed_steer_control.py | pruidzeko/PythonRobotics | 5ff9b70d737121c2947d844ecfb1fa07abdd210c | [
"MIT"
] | 61 | 2020-08-17T20:02:09.000Z | 2022-03-14T20:01:01.000Z | tests/test_lqr_speed_steer_control.py | pruidzeko/PythonRobotics | 5ff9b70d737121c2947d844ecfb1fa07abdd210c | [
"MIT"
] | 15 | 2020-02-12T15:57:28.000Z | 2021-08-28T07:39:18.000Z | from unittest import TestCase
import sys
sys.path.append("./PathTracking/lqr_speed_steer_control/")
from PathTracking.lqr_speed_steer_control import lqr_speed_steer_control as m
print(__file__)
class Test(TestCase):
def test1(self):
m.show_animation = False
m.main()
| 18.3125 | 77 | 0.754266 | 93 | 0.317406 | 0 | 0 | 0 | 0 | 0 | 0 | 41 | 0.139932 |
fb1aa25d697063ac5234b37a20af2edde89cf7c2 | 825 | py | Python | 2 - python intermediario/63 - iteraveis/64 - comportamento iteradores e geradores.py | AdrianaViabL/Curso-Python-udemy | a4f230354985d0f6026a1e7b4913a8f64e205654 | [
"Apache-2.0"
] | null | null | null | 2 - python intermediario/63 - iteraveis/64 - comportamento iteradores e geradores.py | AdrianaViabL/Curso-Python-udemy | a4f230354985d0f6026a1e7b4913a8f64e205654 | [
"Apache-2.0"
] | null | null | null | 2 - python intermediario/63 - iteraveis/64 - comportamento iteradores e geradores.py | AdrianaViabL/Curso-Python-udemy | a4f230354985d0f6026a1e7b4913a8f64e205654 | [
"Apache-2.0"
] | null | null | null | #lists, tuplas, strings -> sequencias -> iteraveis
nome = 'nome qualquer'
print('comportamento esperado de um valor iteravel')
print('o valor vai sempre estar la para ser exibido novamente')
for l in nome:
print(l)
print(nome)
print(10 * '=====')
iterador = iter(nome)
try: # quando mostrado x valor de um itera... | 21.153846 | 86 | 0.676364 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 322 | 0.390303 |
fb1af2b6ba7c64773e3eb0f188fe914ea2ee6f01 | 1,002 | py | Python | src/server/api/API_ingest/dropbox_handler.py | carlos-dominguez/paws-data-pipeline | 5c224e1f259c079631df7d3514a873875c633221 | [
"MIT"
] | 27 | 2019-11-20T20:20:30.000Z | 2022-01-31T17:24:55.000Z | src/server/api/API_ingest/dropbox_handler.py | mrcrnkovich/paws-data-pipeline | 7c0bd4c5f23276f541611cb564f2f5abbb6b9887 | [
"MIT"
] | 348 | 2019-11-26T20:34:02.000Z | 2022-02-27T20:28:20.000Z | src/server/api/API_ingest/dropbox_handler.py | mrcrnkovich/paws-data-pipeline | 7c0bd4c5f23276f541611cb564f2f5abbb6b9887 | [
"MIT"
] | 20 | 2019-12-03T23:50:33.000Z | 2022-02-09T18:38:25.000Z | import dropbox
try:
from secrets_dict import DROPBOX_APP
except ImportError:
# Not running locally
print("Couldn't get DROPBOX_APP from file, trying environment **********")
from os import environ
try:
DROPBOX_APP = environ['DROPBOX_APP']
except KeyError:
# Not in environment
... | 27.833333 | 89 | 0.691617 | 285 | 0.284431 | 0 | 0 | 0 | 0 | 0 | 0 | 258 | 0.257485 |
fb1b088b1122df174835b7dea6617c979527dde6 | 32,165 | py | Python | tests/card_tests/druid_tests.py | anuragpapineni/Hearthbreaker-evolved-agent | d519d42babd93e3567000c33a381e93db065301c | [
"MIT"
] | null | null | null | tests/card_tests/druid_tests.py | anuragpapineni/Hearthbreaker-evolved-agent | d519d42babd93e3567000c33a381e93db065301c | [
"MIT"
] | null | null | null | tests/card_tests/druid_tests.py | anuragpapineni/Hearthbreaker-evolved-agent | d519d42babd93e3567000c33a381e93db065301c | [
"MIT"
] | null | null | null | import random
import unittest
from hearthbreaker.agents.basic_agents import DoNothingBot
from tests.agents.testing_agents import SelfSpellTestingAgent, EnemySpellTestingAgent, MinionPlayingAgent, \
EnemyMinionSpellTestingAgent, SpellTestingAgent
from hearthbreaker.constants import CHARACTER_CLASS
from hearthbreake... | 40.818528 | 120 | 0.684626 | 31,669 | 0.98458 | 0 | 0 | 0 | 0 | 0 | 0 | 1,634 | 0.050801 |
fb1c201f8580630fba487344ba7ea5b8003a9260 | 111 | py | Python | projectdjangoportfolio/jobs/admin.py | DevLuDaley/Portfolio | c7215a3b1e5337f9bbb2863bba598b3064ef69e5 | [
"MIT"
] | null | null | null | projectdjangoportfolio/jobs/admin.py | DevLuDaley/Portfolio | c7215a3b1e5337f9bbb2863bba598b3064ef69e5 | [
"MIT"
] | null | null | null | projectdjangoportfolio/jobs/admin.py | DevLuDaley/Portfolio | c7215a3b1e5337f9bbb2863bba598b3064ef69e5 | [
"MIT"
] | null | null | null | from django.contrib import admin
from.models import Job
admin.site.register(Job)
# Register your models here.
| 18.5 | 32 | 0.801802 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.252252 |
fb1c95abaf459d4750608d1b3b3b8a20f69d8f30 | 504 | py | Python | KNN/sklearn API.py | wu-huipeng/- | 84f681f7488e45c5f357f558defbc27aaf285a16 | [
"Apache-2.0"
] | 7 | 2019-09-09T08:55:41.000Z | 2020-02-08T13:24:59.000Z | KNN/sklearn API.py | wu-huipeng/machine-learning | 84f681f7488e45c5f357f558defbc27aaf285a16 | [
"Apache-2.0"
] | null | null | null | KNN/sklearn API.py | wu-huipeng/machine-learning | 84f681f7488e45c5f357f558defbc27aaf285a16 | [
"Apache-2.0"
] | null | null | null | from sklearn.neighbors import KNeighborsClassifier
from sklearn.datasets import make_classification
from sklearn.model_selection import train_test_split
x , y = make_classification(n_samples=1000,n_features=40,random_state=42) #构造数据
x_train, x_test ,y_train ,y_test = train_test_split(x,y,random_state=42) #划分数据... | 22.909091 | 81 | 0.759921 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 0.150183 |
fb1d2be116c21e769b849455662ea6590e0d2c00 | 484 | py | Python | egg/resources/__init__.py | eanorambuena/Driver | 3cb14f5d741c6bae364326305ae0ded04e10e9d4 | [
"MIT"
] | null | null | null | egg/resources/__init__.py | eanorambuena/Driver | 3cb14f5d741c6bae364326305ae0ded04e10e9d4 | [
"MIT"
] | null | null | null | egg/resources/__init__.py | eanorambuena/Driver | 3cb14f5d741c6bae364326305ae0ded04e10e9d4 | [
"MIT"
] | null | null | null | from egg.resources.console import *
from egg.resources.server import *
from egg.resources.structures import *
from egg.resources.auth import *
from egg.resources.constants import *
from egg.resources.extensions import *
from egg.resources.help import *
from egg.resources.modules import *
from egg.resources.parser impor... | 32.266667 | 38 | 0.805785 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 34 | 0.070248 |
fb1f5f0f7eda29bb259446b27b1eadc2e86cdafe | 174 | py | Python | eln/commands/news/templates/articles.py | lehvitus/eln | b78362af20cacffe076bf3dbfd27dcc090e43e39 | [
"BSD-3-Clause"
] | 2 | 2020-02-05T04:00:32.000Z | 2020-03-18T02:12:33.000Z | eln/commands/news/templates/articles.py | oleoneto/eln | b78362af20cacffe076bf3dbfd27dcc090e43e39 | [
"BSD-3-Clause"
] | 1 | 2020-03-18T02:36:04.000Z | 2020-03-18T02:36:04.000Z | eln/commands/news/templates/articles.py | oleoneto/eln | b78362af20cacffe076bf3dbfd27dcc090e43e39 | [
"BSD-3-Clause"
] | null | null | null | from jinja2 import Template
articles_template = Template("""{{ index }}. {{ title }}
\tAuthor: {{ author }}
\tPublished on: {{ publication_date }}
\tSource: {{ url }}
""")
| 19.333333 | 56 | 0.632184 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 113 | 0.649425 |
fb21c669f057d7c99ae18966e97b4d0e1e081af7 | 255 | py | Python | statistical_clear_sky/algorithm/exception.py | elsirdavid/StatisticalClearSky | bc3aa9de56a9347c10e2afe23af486d32d476273 | [
"BSD-2-Clause"
] | 16 | 2019-05-09T14:17:22.000Z | 2022-02-23T18:41:13.000Z | statistical_clear_sky/algorithm/exception.py | elsirdavid/StatisticalClearSky | bc3aa9de56a9347c10e2afe23af486d32d476273 | [
"BSD-2-Clause"
] | 7 | 2019-07-09T18:32:29.000Z | 2021-07-01T22:28:32.000Z | statistical_clear_sky/algorithm/exception.py | tadatoshi/StatisticalClearSky | 40a7354f8e8b65c8008a56c655dddff700031558 | [
"BSD-2-Clause"
] | 4 | 2019-12-20T19:15:09.000Z | 2021-04-29T17:40:40.000Z | """
Defines exceptions used in the context of this module "algorithm"
"""
class ProblemStatusError(Exception):
"""Error thrown when SCSF algorithm experiences something other than
an 'optimal' problem status during one of
the solve steps."""
| 28.333333 | 72 | 0.741176 | 179 | 0.701961 | 0 | 0 | 0 | 0 | 0 | 0 | 211 | 0.827451 |
fb223c6e71ca1dc86e9314d86210a866c21d9362 | 220 | py | Python | cauldronBase/Base.py | Razikus/cauldron | cc6e87cb4283efe00ad7e06c98d05e8571883447 | [
"MIT"
] | null | null | null | cauldronBase/Base.py | Razikus/cauldron | cc6e87cb4283efe00ad7e06c98d05e8571883447 | [
"MIT"
] | null | null | null | cauldronBase/Base.py | Razikus/cauldron | cc6e87cb4283efe00ad7e06c98d05e8571883447 | [
"MIT"
] | null | null | null | from sqlalchemy.ext.declarative import declarative_base
from flask import Flask
from flask import jsonify
from flask_marshmallow import Marshmallow
Base = declarative_base()
app = Flask(__name__)
ma = Marshmallow(app)
| 22 | 55 | 0.827273 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fb2248e40d3ed11337557c6e7ae9b71e63c167b4 | 3,622 | py | Python | BP.py | WolfMy/predict_stock | 7af33404875d19ea93328b8f220d3bd2c0f6d2e5 | [
"MIT"
] | 1 | 2021-09-28T02:02:05.000Z | 2021-09-28T02:02:05.000Z | BP.py | WolfMy/predict_stock | 7af33404875d19ea93328b8f220d3bd2c0f6d2e5 | [
"MIT"
] | null | null | null | BP.py | WolfMy/predict_stock | 7af33404875d19ea93328b8f220d3bd2c0f6d2e5 | [
"MIT"
] | 1 | 2020-10-13T12:13:43.000Z | 2020-10-13T12:13:43.000Z | import tensorflow as tf
import numpy as np
import pandas as pd
from MACD_RSI import init_train_data
def get_batch(data, label, batch_size, num_epochs):
input_queue = tf.train.slice_input_producer([data, label], num_epochs=num_epochs, shuffle=True, capacity=32)
x_batch, y_batch = tf.train.batch(input_queue, bat... | 48.293333 | 134 | 0.655163 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 699 | 0.184921 |
fb2280120f9263888a0811988826a4305d6b98aa | 3,525 | py | Python | bananas/transformers/running_stats.py | owahltinez/bananas | 4d37af1713b7f166ead3459a7004748f954d336e | [
"MIT"
] | null | null | null | bananas/transformers/running_stats.py | owahltinez/bananas | 4d37af1713b7f166ead3459a7004748f954d336e | [
"MIT"
] | null | null | null | bananas/transformers/running_stats.py | owahltinez/bananas | 4d37af1713b7f166ead3459a7004748f954d336e | [
"MIT"
] | null | null | null | """ Threshold-based transformers """
from typing import Dict, Iterable, Union
from ..changemap.changemap import ChangeMap
from ..utils.arrays import flatten, shape_of_array
from .base import ColumnHandlingTransformer
class RunningStats(ColumnHandlingTransformer):
"""
A helpful transformer that does not perfo... | 36.340206 | 102 | 0.588652 | 3,304 | 0.937305 | 0 | 0 | 0 | 0 | 0 | 0 | 1,369 | 0.388369 |
fb22dc5bf5bd9013f1aaf4889e65a75279b6e791 | 197 | py | Python | 1-beginner/1013.py | alenvieira/uri-online-judge-solutions | ca5ae7064d84af4dae12fc37d4d14ee441e49d06 | [
"MIT"
] | null | null | null | 1-beginner/1013.py | alenvieira/uri-online-judge-solutions | ca5ae7064d84af4dae12fc37d4d14ee441e49d06 | [
"MIT"
] | null | null | null | 1-beginner/1013.py | alenvieira/uri-online-judge-solutions | ca5ae7064d84af4dae12fc37d4d14ee441e49d06 | [
"MIT"
] | null | null | null | line = input()
(a, b, c) = [int(i) for i in line.split(' ')]
greatest1 = (a + b + abs(a - b)) / 2
greatest2 = int((greatest1 + c + abs(greatest1 - c)) / 2)
print('{} eh o maior'.format(greatest2))
| 32.833333 | 57 | 0.568528 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 0.091371 |
fb24589362ad5872b751372ecb28f328c4ec3892 | 1,907 | py | Python | utils.py | psergal/quiz | 9420db013a4ca0662471f716ed5fc1f9cfb2502a | [
"MIT"
] | null | null | null | utils.py | psergal/quiz | 9420db013a4ca0662471f716ed5fc1f9cfb2502a | [
"MIT"
] | null | null | null | utils.py | psergal/quiz | 9420db013a4ca0662471f716ed5fc1f9cfb2502a | [
"MIT"
] | null | null | null | import argparse
from pathlib import Path
import random
def get_args():
parser = argparse.ArgumentParser(description='Launching VK chat bot')
parser.add_argument('-m', '--memcached_server', default='redis-12388.c52.us-east-1-4.ec2.cloud.redislabs.com',
help='Set the server to store and ... | 44.348837 | 114 | 0.624541 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 414 | 0.21585 |
fb2468353432def77628e6adb7da27b64ec4c1b6 | 2,684 | py | Python | text-editor.py | Shubham05178/Text-Editor | 82fff346880bb9e2088a16af20695bb46d68d29a | [
"MIT"
] | 1 | 2021-09-24T16:13:14.000Z | 2021-09-24T16:13:14.000Z | text-editor.py | Shubham05178/Text-Editor | 82fff346880bb9e2088a16af20695bb46d68d29a | [
"MIT"
] | null | null | null | text-editor.py | Shubham05178/Text-Editor | 82fff346880bb9e2088a16af20695bb46d68d29a | [
"MIT"
] | null | null | null | #Author Shubham Nagaria. ShubhamLabs.
#Coder.
#subhamnagaria@gmail.com
import tkinter
from tkinter import *
from tkinter import Tk, scrolledtext, filedialog, messagebox
root = Tk(className=" TextEditor-ShubhamLabs") #name your texteditor in quotes
textPad = scrolledtext.ScrolledText(root, width=100, ... | 32.731707 | 256 | 0.676975 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,104 | 0.411326 |
fb27d1e80db32688183c68acefc2b5b91660e81e | 852 | py | Python | src/core/schemas/entries/event.py | nefarius/portfolio-backend | f595041354eedee71a4aa5b761501be030b81d09 | [
"Apache-2.0"
] | 6 | 2019-06-19T12:56:42.000Z | 2021-12-26T07:22:47.000Z | src/core/schemas/entries/event.py | nefarius/portfolio-backend | f595041354eedee71a4aa5b761501be030b81d09 | [
"Apache-2.0"
] | 13 | 2019-12-20T10:39:44.000Z | 2022-02-10T09:11:09.000Z | src/core/schemas/entries/event.py | nefarius/portfolio-backend | f595041354eedee71a4aa5b761501be030b81d09 | [
"Apache-2.0"
] | 1 | 2021-12-01T12:03:29.000Z | 2021-12-01T12:03:29.000Z | from ...schemas import ICON_EVENT
from ...skosmos import get_collection_members
from ..base import BaseSchema
from ..general import get_contributors_field, get_date_range_time_range_location_group_field, get_url_field
from ..utils import years_from_date_range_time_range_location_group_field
ICON = ICON_EVENT
TYPES = ... | 42.6 | 112 | 0.805164 | 425 | 0.498826 | 0 | 0 | 0 | 0 | 0 | 0 | 147 | 0.172535 |
fb28158cf8145cabc88ee46d040cb82c54962f04 | 787 | py | Python | fn/instaAPI.py | elsou/ETSE-Warbot | 4fd5351688e3cd81d9eeed50586027830dba0c5b | [
"MIT"
] | 2 | 2021-11-09T23:14:53.000Z | 2021-11-11T01:09:28.000Z | fn/instaAPI.py | elsou/etse-warbot | 4fd5351688e3cd81d9eeed50586027830dba0c5b | [
"MIT"
] | null | null | null | fn/instaAPI.py | elsou/etse-warbot | 4fd5351688e3cd81d9eeed50586027830dba0c5b | [
"MIT"
] | null | null | null | from instabot import Bot
import os
import shutil
import time
# Dado un tweet (str) e imaxe (str '*.jpeg'), publica o contido en instagram
def upload(tweet, imaxe):
clean_up()
bot = Bot()
bot.login(username="usename", password="password")
time.sleep(1)
bot.upload_photo(imaxe, caption=tweet)
# ...
d... | 23.848485 | 76 | 0.617535 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 252 | 0.320203 |
fb29a12d8ace63ae0afef58e7d2a5734abf0e3c4 | 2,088 | py | Python | memories/api/utils.py | marchelbling/memories-api | e82d6c6ae2b7873fc35ebb301fc073e3ef968a1e | [
"MIT"
] | null | null | null | memories/api/utils.py | marchelbling/memories-api | e82d6c6ae2b7873fc35ebb301fc073e3ef968a1e | [
"MIT"
] | null | null | null | memories/api/utils.py | marchelbling/memories-api | e82d6c6ae2b7873fc35ebb301fc073e3ef968a1e | [
"MIT"
] | null | null | null | import time
import logging
from functools import wraps
logging.basicConfig(level=logging.INFO,
format='[%(asctime)s] [%(levelname)s] %(message)s')
def timehttp(endpoint):
@wraps(endpoint)
def timed(self, request, response):
start = time.time()
result = endpoint(self, reque... | 33.677419 | 93 | 0.561782 | 0 | 0 | 0 | 0 | 1,377 | 0.659483 | 0 | 0 | 211 | 0.101054 |
fb2abd56368d34ecbc07a95fe8f4a470ff486455 | 24,641 | py | Python | cssedit/editor/gui_qt.py | albertvisser/cssedit | e17ed1b43a0e4d50bfab6a69da47b92cd3213724 | [
"MIT"
] | null | null | null | cssedit/editor/gui_qt.py | albertvisser/cssedit | e17ed1b43a0e4d50bfab6a69da47b92cd3213724 | [
"MIT"
] | null | null | null | cssedit/editor/gui_qt.py | albertvisser/cssedit | e17ed1b43a0e4d50bfab6a69da47b92cd3213724 | [
"MIT"
] | null | null | null | """cssedit: PyQt specific stuff
"""
import sys
import os
import PyQt5.QtWidgets as qtw
import PyQt5.QtGui as gui
import PyQt5.QtCore as core
from .cssedit import parse_log_line, get_definition_from_file
class MainGui(qtw.QMainWindow):
"""Hoofdscherm van de applicatie
"""
def __init__(self, master, app, ti... | 35.302292 | 97 | 0.582363 | 24,420 | 0.991031 | 0 | 0 | 1,594 | 0.064689 | 0 | 0 | 7,516 | 0.30502 |
fb2b12951a9311d135394c012f89a0e99ed10eee | 13,425 | py | Python | mtp_cashbook/apps/disbursements/tests/test_functional.py | uk-gov-mirror/ministryofjustice.money-to-prisoners-cashbook | d35a621e21631e577faacaeacb5ab9f883c9b4f4 | [
"MIT"
] | 4 | 2016-01-05T12:21:39.000Z | 2016-12-22T15:56:37.000Z | mtp_cashbook/apps/disbursements/tests/test_functional.py | uk-gov-mirror/ministryofjustice.money-to-prisoners-cashbook | d35a621e21631e577faacaeacb5ab9f883c9b4f4 | [
"MIT"
] | 132 | 2015-06-10T09:53:14.000Z | 2022-02-01T17:35:54.000Z | mtp_cashbook/apps/disbursements/tests/test_functional.py | uk-gov-mirror/ministryofjustice.money-to-prisoners-cashbook | d35a621e21631e577faacaeacb5ab9f883c9b4f4 | [
"MIT"
] | 3 | 2015-07-07T14:40:33.000Z | 2021-04-11T06:20:14.000Z | from django.utils.crypto import get_random_string
from cashbook.tests.test_functional import CashbookTestCase
from disbursements.templatetags.disbursements import format_sortcode
class DisbursementTestCase(CashbookTestCase):
def tearDown(self):
self.click_logout()
def click_button(self, text=None):
... | 39.60177 | 104 | 0.659367 | 13,246 | 0.986373 | 0 | 0 | 0 | 0 | 0 | 0 | 4,120 | 0.306799 |
fb2bb261a73c74317e9f4c04091925e5a2fa1f5e | 2,199 | py | Python | quantrocket/satellite.py | Jay-Jay-D/quantrocket-client | b70ac199382d22d56fad923ca2233ce027f3264a | [
"Apache-2.0"
] | null | null | null | quantrocket/satellite.py | Jay-Jay-D/quantrocket-client | b70ac199382d22d56fad923ca2233ce027f3264a | [
"Apache-2.0"
] | null | null | null | quantrocket/satellite.py | Jay-Jay-D/quantrocket-client | b70ac199382d22d56fad923ca2233ce027f3264a | [
"Apache-2.0"
] | 1 | 2019-06-12T11:34:27.000Z | 2019-06-12T11:34:27.000Z | # Copyright 2017 QuantRocket - 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 ... | 32.820896 | 93 | 0.71578 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,253 | 0.569804 |
fb2ea9cb95f216543b39462cef45459a422c0631 | 12,367 | py | Python | blog_server/app/comm/GeneralOperate.py | szhu9903/flask-react-blog | b1939a5d95e0084a82c230f2a20a9b197d2eef46 | [
"MIT"
] | 2 | 2022-03-12T14:51:42.000Z | 2022-03-25T13:20:16.000Z | blog_server/app/comm/GeneralOperate.py | szhu9903/flask-react-blog | b1939a5d95e0084a82c230f2a20a9b197d2eef46 | [
"MIT"
] | 7 | 2022-03-19T02:17:54.000Z | 2022-03-28T10:12:52.000Z | blog_server/app/comm/GeneralOperate.py | szhu9903/flask-react-blog | b1939a5d95e0084a82c230f2a20a9b197d2eef46 | [
"MIT"
] | 1 | 2022-03-25T13:20:28.000Z | 2022-03-25T13:20:28.000Z | import copy
from flask import g
from app.comm.TableModule import TableModule
from app.comm.SqlExecute import SqlExecute
from app.unit_config import default_result, default_limit_size, depth_post_map
class GeneralOperate(object):
def __init__(self, module:TableModule):
self.module = module
# 请求参数检查链... | 32.890957 | 91 | 0.602248 | 13,278 | 0.985088 | 0 | 0 | 0 | 0 | 0 | 0 | 2,857 | 0.211959 |
fb2eaccf39fb8ba5a32d82bc3c5d4475f3435246 | 57 | py | Python | tests/helpers/test_plotting.py | sebastian-lapuschkin/Quantus | c3b8a9fb2018f34bd89ba38efa2b2b8c38128b3f | [
"MIT"
] | null | null | null | tests/helpers/test_plotting.py | sebastian-lapuschkin/Quantus | c3b8a9fb2018f34bd89ba38efa2b2b8c38128b3f | [
"MIT"
] | null | null | null | tests/helpers/test_plotting.py | sebastian-lapuschkin/Quantus | c3b8a9fb2018f34bd89ba38efa2b2b8c38128b3f | [
"MIT"
] | null | null | null | """No identified need to test plotting functionality."""
| 28.5 | 56 | 0.754386 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 56 | 0.982456 |
fb2ec99c88e89e1bd90620cd1221b2fc2ec8cc12 | 4,921 | py | Python | SmartDeal-Training/models/mobilenetv2_se_mask.py | VITA-Group/SmartDeal | 8e1de77497eedbeea412a8c51142834c28a53709 | [
"MIT"
] | 2 | 2021-07-20T02:48:35.000Z | 2021-11-29T02:55:36.000Z | SmartDeal-Training/models/mobilenetv2_se_mask.py | VITA-Group/SmartDeal | 8e1de77497eedbeea412a8c51142834c28a53709 | [
"MIT"
] | null | null | null | SmartDeal-Training/models/mobilenetv2_se_mask.py | VITA-Group/SmartDeal | 8e1de77497eedbeea412a8c51142834c28a53709 | [
"MIT"
] | null | null | null | '''MobileNetV2 in PyTorch.
See the paper "Inverted Residuals and Linear Bottlenecks:
Mobile Networks for Classification, Detection and Segmentation" for more details.
'''
import torch
import torch.nn as nn
import torch.nn.functional as F
from se import SEConv2d, SELinear
THRESHOLD = 4e-3
__all__ = ['SEMaskMobileNet... | 36.451852 | 116 | 0.613696 | 3,700 | 0.75188 | 0 | 0 | 0 | 0 | 0 | 0 | 1,420 | 0.288559 |
fb2f3eb592211892766f130ad1032ee5dd774617 | 911 | py | Python | twitter_video.py | keselekpermen69/build_scripts | 110392778ad0a8585efa944100aa1c13ef28469e | [
"MIT"
] | 5 | 2020-08-19T05:44:25.000Z | 2021-05-13T05:15:50.000Z | twitter_video.py | MrMissx/scripts | 110392778ad0a8585efa944100aa1c13ef28469e | [
"MIT"
] | null | null | null | twitter_video.py | MrMissx/scripts | 110392778ad0a8585efa944100aa1c13ef28469e | [
"MIT"
] | null | null | null |
import requests
def get_link():
return input("Give me a twitter video link: ")
def download(url: str):
name = url.rsplit('/')[-1]
if("?tag" in name):
name = name.split('?')[0]
r = requests.get(url, allow_redirects=True)
open(name, 'wb').write(r.content)
def main():
... | 24.621622 | 86 | 0.531284 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 252 | 0.276619 |
fb2fabace401a8d0a972f811af8b0a86ed348c85 | 2,951 | py | Python | frappe-bench/apps/erpnext/erpnext/regional/india/utils.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/regional/india/utils.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/regional/india/utils.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | import frappe, re
from frappe import _
from frappe.utils import cstr
from erpnext.regional.india import states, state_numbers
from erpnext.controllers.taxes_and_totals import get_itemised_tax, get_itemised_taxable_amount
def validate_gstin_for_india(doc, method):
if not hasattr(doc, 'gstin'):
return
if doc.gstin:... | 36.8875 | 102 | 0.74856 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 563 | 0.190783 |
fb32689f50782a5ff37cf378f6a450894a0dc23f | 22,922 | py | Python | tests/cupy_tests/test_cublas.py | Onkar627/cupy | 8eef1ad5393c0a92c5065bc05137bf997f37044a | [
"MIT"
] | 1 | 2022-01-12T22:57:54.000Z | 2022-01-12T22:57:54.000Z | tests/cupy_tests/test_cublas.py | Onkar627/cupy | 8eef1ad5393c0a92c5065bc05137bf997f37044a | [
"MIT"
] | null | null | null | tests/cupy_tests/test_cublas.py | Onkar627/cupy | 8eef1ad5393c0a92c5065bc05137bf997f37044a | [
"MIT"
] | 1 | 2022-03-21T20:19:12.000Z | 2022-03-21T20:19:12.000Z | import numpy
import pytest
import cupy
from cupy import cublas
from cupy import testing
from cupy.testing import _attr
@testing.parameterize(*testing.product({
'dtype': ['float32', 'float64', 'complex64', 'complex128'],
'n': [10, 33, 100],
'bs': [None, 1, 10],
'nrhs': [None, 1, 10],
}))
@_attr.gpu
cl... | 35.871674 | 79 | 0.547596 | 21,133 | 0.921953 | 0 | 0 | 22,778 | 0.993718 | 0 | 0 | 989 | 0.043146 |
fb336072c83fb710a31348edb291a0b22c416bc1 | 706 | py | Python | ProgsByDataset/UnpaywallMAG/create_unpaywall_refs.py | ashwath92/MastersThesis | f74755dc0c32f316da3c860dd5dbfa4c9cad97b3 | [
"MIT"
] | 5 | 2020-11-05T07:11:54.000Z | 2021-08-04T21:37:28.000Z | ProgsByDataset/UnpaywallMAG/create_unpaywall_refs.py | ashwath92/MastersThesis | f74755dc0c32f316da3c860dd5dbfa4c9cad97b3 | [
"MIT"
] | null | null | null | ProgsByDataset/UnpaywallMAG/create_unpaywall_refs.py | ashwath92/MastersThesis | f74755dc0c32f316da3c860dd5dbfa4c9cad97b3 | [
"MIT"
] | 4 | 2020-11-05T06:04:38.000Z | 2021-08-02T16:25:42.000Z | import re
import csv
# Unpaywall citing, cited list based on mag ids
unpaywall_citing_cited_file = open('AdditionalOutputs/unpaywallmag_references.tsv', 'w')
fieldnames = ['citing_mag_id', 'cited_mag_id']
writer = csv.DictWriter(unpaywall_citing_cited_file, delimiter="\t", fieldnames=fieldnames)
citation_pattern = r... | 39.222222 | 93 | 0.730878 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 234 | 0.331445 |
fb336c9971fca1cc78e0225c7dbfc79890eb6bc4 | 721 | py | Python | Configuration/Skimming/python/PA_MinBiasSkim_cff.py | nistefan/cmssw | ea13af97f7f2117a4f590a5e654e06ecd9825a5b | [
"Apache-2.0"
] | null | null | null | Configuration/Skimming/python/PA_MinBiasSkim_cff.py | nistefan/cmssw | ea13af97f7f2117a4f590a5e654e06ecd9825a5b | [
"Apache-2.0"
] | null | null | null | Configuration/Skimming/python/PA_MinBiasSkim_cff.py | nistefan/cmssw | ea13af97f7f2117a4f590a5e654e06ecd9825a5b | [
"Apache-2.0"
] | null | null | null | import FWCore.ParameterSet.Config as cms
# HLT dimuon trigger
import HLTrigger.HLTfilters.hltHighLevel_cfi
hltMinBiasHI = HLTrigger.HLTfilters.hltHighLevel_cfi.hltHighLevel.clone()
hltMinBiasHI.HLTPaths = ["HLT_PAL1MinimumBiasHF_OR_SinglePixelTrack_ForSkim_v*"]
hltMinBiasHI.throw = False
hltMinBiasHI.andOr = True
# s... | 32.772727 | 80 | 0.769764 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 248 | 0.343967 |
fb3473188063f91e4e0dd179c38bc4a0e03e103e | 4,523 | py | Python | backend/tests/date_arr_test.py | byamba3/mobilemetrics-backend | 2e6c53325ecff842bde8c8fe19de220e8f90cb1d | [
"Unlicense"
] | null | null | null | backend/tests/date_arr_test.py | byamba3/mobilemetrics-backend | 2e6c53325ecff842bde8c8fe19de220e8f90cb1d | [
"Unlicense"
] | 1 | 2018-08-14T21:26:02.000Z | 2018-08-14T21:26:16.000Z | backend/tests/date_arr_test.py | byamba3/mobilemetrics-backend | 2e6c53325ecff842bde8c8fe19de220e8f90cb1d | [
"Unlicense"
] | null | null | null | import datetime
from calendar import monthrange
import calendar
import numpy as np
#######
#For generate origin repayment schedule date and days columns
#######
start_day = 1
start_month = 1
start_year = 2012
num_installment = 12
installment_time_period = 'months'
change_col_idx = 1
change_row_idx = 2
change_val = 10... | 35.335938 | 137 | 0.689808 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 696 | 0.15388 |
fb360bb15c3aa59399389bed8b1e64bb7c548a75 | 3,696 | py | Python | launch_hits.py | hinthornw/Pointing | e3cbaf2c5f54d20fe959406714b38634bc4bb3fe | [
"MIT"
] | null | null | null | launch_hits.py | hinthornw/Pointing | e3cbaf2c5f54d20fe959406714b38634bc4bb3fe | [
"MIT"
] | null | null | null | launch_hits.py | hinthornw/Pointing | e3cbaf2c5f54d20fe959406714b38634bc4bb3fe | [
"MIT"
] | null | null | null | from __future__ import print_function
import argparse
import json
from boto.mturk.price import Price
from boto.mturk.question import HTMLQuestion
from boto.mturk.connection import MTurkRequestError
import os
import simpleamt
import sys
import inspect
def printPlus(*args):
print(inspect.getouterframes(inspect.cu... | 36.594059 | 83 | 0.628247 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 926 | 0.250541 |
fb36ee81af365dbd4ec4f2c01bf63d11e510fd29 | 2,405 | py | Python | scripts/skinning/utils/skin.py | robertjoosten/skinning-tools | 1f1ec6c092fdc1e39aa82a711a13a0041f9d5730 | [
"MIT"
] | 31 | 2018-09-08T16:42:01.000Z | 2022-03-31T12:31:21.000Z | scripts/skinning/utils/skin.py | robertjoosten/skinning-tools | 1f1ec6c092fdc1e39aa82a711a13a0041f9d5730 | [
"MIT"
] | null | null | null | scripts/skinning/utils/skin.py | robertjoosten/skinning-tools | 1f1ec6c092fdc1e39aa82a711a13a0041f9d5730 | [
"MIT"
] | 11 | 2018-10-01T09:57:53.000Z | 2022-03-19T06:53:02.000Z | from maya import cmds
from maya.api import OpenMaya
from maya.api import OpenMayaAnim
from functools import partial
from skinning.utils import api
from skinning.vendor import apiundo
def get_cluster_fn(node):
"""
Loop over an objects history and return the skin cluster api node that
is part dependency gr... | 32.066667 | 90 | 0.69106 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,130 | 0.469854 |
fb3817bdbf09d70c073184d064ea74bede74d6b3 | 1,607 | py | Python | z_exams/exam_2018_08_26/ex_03_descriptions.py | VasAtanasov/SoftUni-Python-Fundamentals | 471d0537dd6e5c8b61ede92b7673c0d67e2964fd | [
"MIT"
] | 1 | 2019-06-05T11:16:08.000Z | 2019-06-05T11:16:08.000Z | z_exams/exam_2018_08_26/ex_03_descriptions.py | VasAtanasov/SoftUni-Python-Fundamentals | 471d0537dd6e5c8b61ede92b7673c0d67e2964fd | [
"MIT"
] | null | null | null | z_exams/exam_2018_08_26/ex_03_descriptions.py | VasAtanasov/SoftUni-Python-Fundamentals | 471d0537dd6e5c8b61ede92b7673c0d67e2964fd | [
"MIT"
] | null | null | null | import re
REGEX = {
"name": r"name is (?P<name>[A-Z][A-Za-z]+ [A-Z][A-Za-z]+)",
"age": r" (?P<age>[0-9]{2}) years",
"date": r"on (?P<date>[0-9]{2}-[0-9]{2}-[0-9]{4})."
}
class Person:
def __init__(self, full_name, age, birth_date):
self.__full_name = full_name
self.__age = age
... | 23.289855 | 97 | 0.533914 | 565 | 0.351587 | 0 | 0 | 188 | 0.116988 | 0 | 0 | 348 | 0.216553 |
fb3a72f79061cb96a4d85d2974153bcda4983c49 | 7,667 | py | Python | GoogleSheetsJobParser.py | mattfromsydney/Scientific-Report-Generator | 17ddfe42e38d83341460a6de7b0b156bf7cd820a | [
"MIT"
] | null | null | null | GoogleSheetsJobParser.py | mattfromsydney/Scientific-Report-Generator | 17ddfe42e38d83341460a6de7b0b156bf7cd820a | [
"MIT"
] | null | null | null | GoogleSheetsJobParser.py | mattfromsydney/Scientific-Report-Generator | 17ddfe42e38d83341460a6de7b0b156bf7cd820a | [
"MIT"
] | null | null | null | """
NOTE on google sheets format:
The google sheets document must have the following:
Columns A and B from cell 2 down are all the sample details
Column A is the name of the detail and Column B is the value of the detail
Columns B and onwards can be anything but there must be three speicifc... | 43.811429 | 104 | 0.60493 | 7,021 | 0.915743 | 0 | 0 | 0 | 0 | 0 | 0 | 4,302 | 0.561106 |
fb3a87c53bf0b6e09c757714ba3aaf427f9aff41 | 1,720 | py | Python | aws_lambda/lambda.py | bluthen/utilbula_list | dbe4dfd273c7fa37553d91c5bde8744794ccba70 | [
"Apache-2.0"
] | null | null | null | aws_lambda/lambda.py | bluthen/utilbula_list | dbe4dfd273c7fa37553d91c5bde8744794ccba70 | [
"Apache-2.0"
] | null | null | null | aws_lambda/lambda.py | bluthen/utilbula_list | dbe4dfd273c7fa37553d91c5bde8744794ccba70 | [
"Apache-2.0"
] | null | null | null | import json
import base64
import boto3
import uuid
import traceback
def valid_uuid(uuid_str):
try:
val = uuid.UUID(uuid_str, version=4)
return True
except ValueError:
return False
def lambda_handler(event, context):
# TODO implement
print(event, context)
method = event['... | 27.741935 | 97 | 0.568023 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 551 | 0.320349 |
fb3a92014d6912b9f49fb4d369df04c828bdc5f0 | 6,565 | py | Python | Week3-Case-Studies-Part1/Language-Processing/Language_Processing.py | Lamanova/Harvard-PH526x-Lab | 168e4c16fa067905142bb6be106277f228d591c5 | [
"MIT"
] | 7 | 2017-08-13T03:03:55.000Z | 2022-02-06T17:08:12.000Z | Week3-Case-Studies-Part1/Language-Processing/Language_Processing.py | Lamanova/Harvard-PH526x-Lab | 168e4c16fa067905142bb6be106277f228d591c5 | [
"MIT"
] | null | null | null | Week3-Case-Studies-Part1/Language-Processing/Language_Processing.py | Lamanova/Harvard-PH526x-Lab | 168e4c16fa067905142bb6be106277f228d591c5 | [
"MIT"
] | 10 | 2017-09-29T08:22:10.000Z | 2021-06-17T22:51:59.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Feb 28 22:41:26 2017
@author: lamahamadeh
"""
'''
Case Study about Language Processing
'''
#counting words
#---------------
text = "This is a test text. We're keping this text short to keep things manageable." #test text
#Using loops
#-----------
d... | 36.071429 | 282 | 0.6262 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,031 | 0.614014 |
fb3c3876b330f5a1310fa02ca86fedafa73ed588 | 273 | py | Python | catalog/bindings/csw/brief_record.py | NIVANorge/s-enda-playground | 56ae0a8978f0ba8a5546330786c882c31e17757a | [
"Apache-2.0"
] | null | null | null | catalog/bindings/csw/brief_record.py | NIVANorge/s-enda-playground | 56ae0a8978f0ba8a5546330786c882c31e17757a | [
"Apache-2.0"
] | null | null | null | catalog/bindings/csw/brief_record.py | NIVANorge/s-enda-playground | 56ae0a8978f0ba8a5546330786c882c31e17757a | [
"Apache-2.0"
] | null | null | null | from dataclasses import dataclass
from bindings.csw.brief_record_type import BriefRecordType
__NAMESPACE__ = "http://www.opengis.net/cat/csw/2.0.2"
@dataclass
class BriefRecord(BriefRecordType):
class Meta:
namespace = "http://www.opengis.net/cat/csw/2.0.2"
| 24.818182 | 58 | 0.754579 | 110 | 0.40293 | 0 | 0 | 121 | 0.443223 | 0 | 0 | 76 | 0.278388 |
fb3db8f6cafb78c9e368cf61c425d4648f50a4a0 | 8,109 | py | Python | R2Py/pre_data_chk.py | OpenBookProjects/ipynb | 72a28109e8e30aea0b9c6713e78821e4affa2e33 | [
"MIT"
] | 6 | 2015-06-08T12:50:14.000Z | 2018-11-20T10:05:01.000Z | R2Py/pre_data_chk.py | OpenBookProjects/ipynb | 72a28109e8e30aea0b9c6713e78821e4affa2e33 | [
"MIT"
] | null | null | null | R2Py/pre_data_chk.py | OpenBookProjects/ipynb | 72a28109e8e30aea0b9c6713e78821e4affa2e33 | [
"MIT"
] | 8 | 2016-01-26T14:12:50.000Z | 2021-02-20T14:24:09.000Z | # -*- coding: utf-8 -*-
'''check and clean and export as .csv
- 150602 pike aTimeLogger2 date into .csv
- 150601 make handlog export all date into *_all.csv
- 150525 make handlog wxport 2types files
'''
import os
import sys
import fnmatch
def _load_timeline(flines,fpath):
_titles = flines[0]
_exp = ""... | 30.715909 | 82 | 0.436305 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,866 | 0.227867 |
3485a97e04399f112e63493e9a7df6b69342ec0c | 313 | py | Python | Microservices/Events/Events/producer.py | satyap54/Microservices-Architecture | be397b351a61eb21229fad021590fcb0b07b8089 | [
"MIT"
] | null | null | null | Microservices/Events/Events/producer.py | satyap54/Microservices-Architecture | be397b351a61eb21229fad021590fcb0b07b8089 | [
"MIT"
] | null | null | null | Microservices/Events/Events/producer.py | satyap54/Microservices-Architecture | be397b351a61eb21229fad021590fcb0b07b8089 | [
"MIT"
] | null | null | null | import asyncio
import aiormq
async def publish(method, event_id):
connection = await aiormq.connect('')
channel = await connection.channel()
body = bytes(str(event_id), 'utf-8')
await channel.basic_publish(
body, exchange='', routing_key='admin'
)
await connection.close()
| 20.866667 | 46 | 0.664537 | 0 | 0 | 0 | 0 | 0 | 0 | 281 | 0.897764 | 18 | 0.057508 |
3485c332458e998d42d6f67bb82de0ba508582c0 | 8,473 | py | Python | timezone/embeds.py | duanegtr/legendv3-cogs | ffde1452a75ad42b4f6511b612ce486e96fcd6de | [
"MIT"
] | 10 | 2020-05-25T13:32:30.000Z | 2022-02-01T12:33:07.000Z | timezone/embeds.py | darcyle/tl-cogs | 6b13c4a6247115571c5a2bb6ea98ed1fe2d44d79 | [
"MIT"
] | 2 | 2020-05-23T22:53:07.000Z | 2020-08-09T11:28:12.000Z | timezone/embeds.py | darcyle/tl-cogs | 6b13c4a6247115571c5a2bb6ea98ed1fe2d44d79 | [
"MIT"
] | 7 | 2020-05-18T17:37:33.000Z | 2022-01-13T04:08:05.000Z | """Embeds for Timezone Legends discord bot."""
import time
import discord
from dateutil.parser import parse # pip install python-dateutil
from pytz import timezone
from datetime import datetime
class Timezone_Embeds:
def __init__(self, description=None, color=0x5c0708, show_footer=True, show_timestamp=True, show_t... | 57.639456 | 331 | 0.688304 | 1,641 | 0.193674 | 0 | 0 | 0 | 0 | 4,910 | 0.579488 | 4,315 | 0.509265 |
34895fa122da2aa59b08dae55bc7b95297e3503a | 1,521 | py | Python | utils/commonutils.py | rupakc/Storyweaver | 9a6ec1c040a09f730cc6f32ce385f44a79d28663 | [
"BSL-1.0"
] | null | null | null | utils/commonutils.py | rupakc/Storyweaver | 9a6ec1c040a09f730cc6f32ce385f44a79d28663 | [
"BSL-1.0"
] | null | null | null | utils/commonutils.py | rupakc/Storyweaver | 9a6ec1c040a09f730cc6f32ce385f44a79d28663 | [
"BSL-1.0"
] | null | null | null | import hashlib
import shutil
import requests
import os
from config import constants
def get_sha_hash(content):
sha = hashlib.sha1()
sha.update(content)
return sha.hexdigest()
def download_image(image_url,filename_to_save):
response = requests.get(image_url, stream=True)
with open(filename_to_sav... | 33.065217 | 82 | 0.721893 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 17 | 0.011177 |
348a2b80711dded6c85af5b308b4122d1e73013c | 14,635 | py | Python | flask_app.py | wacovidhackathon/TPCraze | 57a9485a008536f6326e29328df6af6d29045a6d | [
"MIT"
] | null | null | null | flask_app.py | wacovidhackathon/TPCraze | 57a9485a008536f6326e29328df6af6d29045a6d | [
"MIT"
] | null | null | null | flask_app.py | wacovidhackathon/TPCraze | 57a9485a008536f6326e29328df6af6d29045a6d | [
"MIT"
] | null | null | null | import time, os
import tomtomSearch
from flask_bootstrap import Bootstrap
from flask import Flask, render_template, request, redirect, flash, session, jsonify, url_for
from flask_wtf import FlaskForm
from wtforms import StringField, BooleanField, SubmitField, IntegerField, SelectField, RadioField
from wtforms.val... | 38.111979 | 374 | 0.610386 | 1,124 | 0.076802 | 0 | 0 | 8,789 | 0.600547 | 0 | 0 | 3,962 | 0.270721 |
348c6299bee8c546cf7aa75e9c41522b146fab11 | 2,634 | py | Python | pkg/codegen/internal/test/testdata/output-funcs/py_tests/pulumi_py_tests.py | sticha/pulumi | 76ee1b8ccfee815eb315d9e0e0ddfaaf505c472b | [
"Apache-2.0"
] | null | null | null | pkg/codegen/internal/test/testdata/output-funcs/py_tests/pulumi_py_tests.py | sticha/pulumi | 76ee1b8ccfee815eb315d9e0e0ddfaaf505c472b | [
"Apache-2.0"
] | null | null | null | pkg/codegen/internal/test/testdata/output-funcs/py_tests/pulumi_py_tests.py | sticha/pulumi | 76ee1b8ccfee815eb315d9e0e0ddfaaf505c472b | [
"Apache-2.0"
] | null | null | null | # Copyright 2016-2021, Pulumi Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 30.988235 | 89 | 0.65186 | 1,603 | 0.60858 | 0 | 0 | 1,623 | 0.616173 | 0 | 0 | 1,565 | 0.594153 |
348cdede6c52f1578247987d1f2b6285625e722a | 1,800 | py | Python | scripts/gan/conditional_dcgan/gen_data_from_img.py | hiroyasuakada/ros_start | 10221ad2bcaefa4aaadc6c90424a3751126ac256 | [
"MIT"
] | null | null | null | scripts/gan/conditional_dcgan/gen_data_from_img.py | hiroyasuakada/ros_start | 10221ad2bcaefa4aaadc6c90424a3751126ac256 | [
"MIT"
] | null | null | null | scripts/gan/conditional_dcgan/gen_data_from_img.py | hiroyasuakada/ros_start | 10221ad2bcaefa4aaadc6c90424a3751126ac256 | [
"MIT"
] | null | null | null | # generate data from bag images
from PIL import Image
from pathlib import Path
import os, glob # manipulate file or directory
import numpy as np
class DataArrangement(object):
def __init__(self):
self.path = Path(__file__).parent
self.current_directories = ['not_traking', 'traking']
self... | 36.734694 | 97 | 0.566111 | 1,522 | 0.845556 | 0 | 0 | 0 | 0 | 0 | 0 | 255 | 0.141667 |
348d2d60fb5385e97d0dc27346784f7b73fdadac | 331 | py | Python | example/demo/book/views.py | iwwxiong/flask_restapi | 57fca3bf07d913b31b6b7ef877328b0e07056c39 | [
"MIT"
] | 6 | 2019-04-23T02:18:55.000Z | 2019-12-10T13:16:21.000Z | example/demo/book/views.py | dracarysX/flask_scaffold | 57fca3bf07d913b31b6b7ef877328b0e07056c39 | [
"MIT"
] | null | null | null | example/demo/book/views.py | dracarysX/flask_scaffold | 57fca3bf07d913b31b6b7ef877328b0e07056c39 | [
"MIT"
] | 3 | 2019-05-22T06:00:17.000Z | 2020-01-14T17:02:35.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# flask_restapi import
from flask_restapi.views import APIMethodView
from .models import Book
from .forms import BookForm
class BookView(APIMethodView):
model = Book
paginate_by = 10
context_object_name = 'items'
pk_url_kwarg = 'book_id'
form_class ... | 19.470588 | 45 | 0.716012 | 158 | 0.477341 | 0 | 0 | 0 | 0 | 0 | 0 | 83 | 0.250755 |
348dadc81585ed38d6f51d902f482767add11796 | 2,484 | py | Python | backend/apps/cmdb/models/field.py | codelieche/erp | 96861ff63a63a93918fbd5181ffb2646446d0eec | [
"MIT"
] | null | null | null | backend/apps/cmdb/models/field.py | codelieche/erp | 96861ff63a63a93918fbd5181ffb2646446d0eec | [
"MIT"
] | 29 | 2020-06-05T19:57:11.000Z | 2022-02-26T13:42:36.000Z | backend/apps/cmdb/models/field.py | codelieche/erp | 96861ff63a63a93918fbd5181ffb2646446d0eec | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
from django.db import models
from account.models import User
# from cmdb.types import get_instance
from cmdb.models import Model
class Field(models.Model):
"""
资产模型的字段
"""
code = models.SlugField(verbose_name="字段", max_length=40)
name = models.CharField(verbose_name="字段(中文... | 38.8125 | 107 | 0.667069 | 2,738 | 0.946095 | 0 | 0 | 0 | 0 | 0 | 0 | 1,242 | 0.429164 |
3490cf6f7075a2aef1693d69a9521b0b995d567b | 604 | py | Python | unidad2/pc2/e1.py | upc-projects/cc76 | 0f1663cc439889b0c7e924923639e7c2e032b9b6 | [
"MIT"
] | 1 | 2020-09-21T16:56:24.000Z | 2020-09-21T16:56:24.000Z | unidad2/pc2/e1.py | upc-projects/cc76 | 0f1663cc439889b0c7e924923639e7c2e032b9b6 | [
"MIT"
] | null | null | null | unidad2/pc2/e1.py | upc-projects/cc76 | 0f1663cc439889b0c7e924923639e7c2e032b9b6 | [
"MIT"
] | null | null | null | import math
def Bellman_ford(G):
n = len(G)
distance = [-math.inf]*n
parents = [None]* n
distance[0] = 0
for _ in range(n-1):
for u in range(n):
for v, w in G[u]:
if distance[v-1] < distance[u-1] + w:
distance[v-1] = distance[u-1] + w
... | 18.875 | 53 | 0.463576 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 0.033113 |
3491846c1c297a3eafd5e93b910d0c66155d9336 | 1,743 | py | Python | Incident-Response/Tools/dfirtrack/dfirtrack_main/exporter/markdown/markdown_check_data.py | sn0b4ll/Incident-Playbook | cf519f58fcd4255674662b3620ea97c1091c1efb | [
"MIT"
] | 1 | 2021-07-24T17:22:50.000Z | 2021-07-24T17:22:50.000Z | Incident-Response/Tools/dfirtrack/dfirtrack_main/exporter/markdown/markdown_check_data.py | sn0b4ll/Incident-Playbook | cf519f58fcd4255674662b3620ea97c1091c1efb | [
"MIT"
] | 2 | 2022-02-28T03:40:31.000Z | 2022-02-28T03:40:52.000Z | Incident-Response/Tools/dfirtrack/dfirtrack_main/exporter/markdown/markdown_check_data.py | sn0b4ll/Incident-Playbook | cf519f58fcd4255674662b3620ea97c1091c1efb | [
"MIT"
] | 2 | 2022-02-25T08:34:51.000Z | 2022-03-16T17:29:44.000Z | from django.contrib import messages
from dfirtrack_config.models import SystemExporterMarkdownConfigModel
from dfirtrack_main.logger.default_logger import warning_logger
import os
def check_config(request):
""" check variables in config """
# get config model
model = SystemExporterMarkdownConfigModel.obje... | 44.692308 | 128 | 0.729776 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 729 | 0.418244 |
3491ecdf0d743d67d90929ff69bd755f765fc9ba | 44,309 | py | Python | src/module_factions.py | faycalki/medieval-conquests | 113e13e2b166b79517c14f2c13f7561307a89f75 | [
"MIT"
] | 7 | 2019-08-11T14:20:20.000Z | 2021-11-21T06:48:24.000Z | src/module_factions.py | faycalki/medieval-conquests | 113e13e2b166b79517c14f2c13f7561307a89f75 | [
"MIT"
] | null | null | null | src/module_factions.py | faycalki/medieval-conquests | 113e13e2b166b79517c14f2c13f7561307a89f75 | [
"MIT"
] | null | null | null | # -*- coding: utf8 -*-
from header_factions import *
####################################################################################################################
# Each faction record contains the following fields:
# 1) Faction id: used for referencing factions in other files.
# The prefix fac_ is automa... | 131.091716 | 1,080 | 0.608296 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 32,636 | 0.736555 |
3492885ac8a900a114a775185286f143d7123ed9 | 236 | py | Python | data/python/pattern_12/code.py | MKAbuMattar/grammind-api | ccf6e9898f50f9e4c7671abecf65029198e2dc72 | [
"MIT"
] | 3 | 2021-12-29T13:03:27.000Z | 2021-12-31T20:27:17.000Z | data/python/pattern_12/code.py | MKAbuMattar/grammind-api | ccf6e9898f50f9e4c7671abecf65029198e2dc72 | [
"MIT"
] | 2 | 2022-01-15T13:08:13.000Z | 2022-01-18T19:41:07.000Z | data/python/pattern_12/code.py | MKAbuMattar/grammind-api | ccf6e9898f50f9e4c7671abecf65029198e2dc72 | [
"MIT"
] | null | null | null | #MAIN PROGRAM STARTS HERE:
num = int(input('Enter the number of rows and columns for the square: '))
for x in range(0, num):
i = x + 1
for y in range(0, num):
print ('{} '.format(i), end='')
i += num
print() | 26.222222 | 73 | 0.555085 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 88 | 0.372881 |
34940ee04b10ec17bfb59f0b5abe7be0ed5efa38 | 4,602 | py | Python | models/bert_with_conversation_context.py | RobinRojowiec/intent-recognition-in-doctor-patient-interviews | b91c7a9f3ad70edd0f39b56e3219f48d1fcf2078 | [
"Apache-2.0"
] | null | null | null | models/bert_with_conversation_context.py | RobinRojowiec/intent-recognition-in-doctor-patient-interviews | b91c7a9f3ad70edd0f39b56e3219f48d1fcf2078 | [
"Apache-2.0"
] | null | null | null | models/bert_with_conversation_context.py | RobinRojowiec/intent-recognition-in-doctor-patient-interviews | b91c7a9f3ad70edd0f39b56e3219f48d1fcf2078 | [
"Apache-2.0"
] | 1 | 2021-11-24T18:48:47.000Z | 2021-11-24T18:48:47.000Z | import pickle
import torch
import torch.nn as nn
from torchtext.data import Field
from common.paths import ROOT_RELATIVE_DIR, MODEL_PATH
from models.bert_layer import BERTLayer
from probability.tables import TransitionTable
from utility.model_parameter import Configuration, ModelParameter
class BERTWithConversation... | 38.672269 | 140 | 0.69535 | 4,307 | 0.935897 | 0 | 0 | 0 | 0 | 0 | 0 | 653 | 0.141895 |
3495b6bc67d0421d48767015a4e9b3c968d3cfd4 | 3,468 | py | Python | 2016/qualification/sol.py | victorWeiFreelancer/Hashcode | e9cac8531f07962fedbfba6605acfa6e6067747d | [
"MIT"
] | null | null | null | 2016/qualification/sol.py | victorWeiFreelancer/Hashcode | e9cac8531f07962fedbfba6605acfa6e6067747d | [
"MIT"
] | null | null | null | 2016/qualification/sol.py | victorWeiFreelancer/Hashcode | e9cac8531f07962fedbfba6605acfa6e6067747d | [
"MIT"
] | null | null | null | import sys
import math
from time import gmtime, strftime
sys.dont_write_bytecode = True
class Position():
def __init__(self, x, y):
super().__init__()
self.x, self.y = x, y
def distance(pos1, pos2):
return ((pos1.x - pos2.x)**2 + (pos1.y - pos2.y)**2 )**0.5
class Warehouse(object):
def __... | 30.421053 | 83 | 0.531142 | 663 | 0.191176 | 0 | 0 | 0 | 0 | 0 | 0 | 234 | 0.067474 |
3496f98bc54d566d0b2f81898c8f900cd96ce375 | 2,313 | py | Python | app/__init__.py | doshmajhan/python-idp | 55be99afd02de4e8b0840c0a2236906d4b9a1827 | [
"MIT"
] | 1 | 2021-06-13T18:29:20.000Z | 2021-06-13T18:29:20.000Z | app/__init__.py | doshmajhan/python-idp | 55be99afd02de4e8b0840c0a2236906d4b9a1827 | [
"MIT"
] | 1 | 2022-03-30T05:37:09.000Z | 2022-03-30T05:37:09.000Z | app/__init__.py | doshmajhan/python-idp | 55be99afd02de4e8b0840c0a2236906d4b9a1827 | [
"MIT"
] | null | null | null | from flask import Flask
from flask_restful import Api
from saml2 import saml, samlp
from saml2.config import IdPConfig
from saml2.mdstore import MetadataStore
from saml2.server import Server
from app.config import config
from app.database import db
from app.resources.idp_config import IdpConfigResource
from app.resour... | 31.684932 | 87 | 0.736273 | 0 | 0 | 0 | 0 | 134 | 0.057933 | 0 | 0 | 515 | 0.222655 |
3499539f373f9ce023ee2fc68de3748959a132f3 | 5,190 | py | Python | install.py | mrobraven/majestic-pi | 8ebe001a0e2f2eca475c2a390228e7810630f62e | [
"MIT"
] | null | null | null | install.py | mrobraven/majestic-pi | 8ebe001a0e2f2eca475c2a390228e7810630f62e | [
"MIT"
] | null | null | null | install.py | mrobraven/majestic-pi | 8ebe001a0e2f2eca475c2a390228e7810630f62e | [
"MIT"
] | null | null | null | import os
os.mkdir("3D")
os.chdir("3D")
print("Configuring 3D...")
print("Fetching Intro...")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/intro.mp4")
print("Fetching 3D Feature...")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/... | 55.212766 | 129 | 0.773796 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,163 | 0.802119 |
349ac7bf295420ef2ab524ccb2bae107924bef1f | 9,274 | py | Python | docs/conf.py | myii/saltenv | 2309e6759504f5326a444270c8e8bb3edf14b760 | [
"Apache-2.0"
] | 5 | 2022-03-25T17:15:04.000Z | 2022-03-28T23:24:26.000Z | docs/conf.py | myii/saltenv | 2309e6759504f5326a444270c8e8bb3edf14b760 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | myii/saltenv | 2309e6759504f5326a444270c8e8bb3edf14b760 | [
"Apache-2.0"
] | 2 | 2022-03-26T06:33:30.000Z | 2022-03-29T19:43:50.000Z | #
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup --------------------------------------------------------------
# If extensions (or mo... | 34.996226 | 133 | 0.667026 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7,292 | 0.786284 |
349b663f81956d7e9257fe5e42ee283abd8a9e68 | 2,094 | py | Python | utils.py | momskidvaava/firefoxbot | 1ed85e4f6594b144ceabdecb19e6e022180e639e | [
"MIT"
] | null | null | null | utils.py | momskidvaava/firefoxbot | 1ed85e4f6594b144ceabdecb19e6e022180e639e | [
"MIT"
] | null | null | null | utils.py | momskidvaava/firefoxbot | 1ed85e4f6594b144ceabdecb19e6e022180e639e | [
"MIT"
] | 1 | 2021-11-25T14:05:25.000Z | 2021-11-25T14:05:25.000Z | import datetime
import typing
import localization
from configurator import Config
def get_restriction_time(string: str) -> typing.Optional[int]:
"""
Get user restriction time in seconds
:param string: string to check for multiplier. The last symbol should be one of:
"m" for minutes, "h" for hours... | 33.238095 | 118 | 0.668577 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,054 | 0.503343 |
349bc17ddf478dd5dde43f9722c96d91cc6f8502 | 548 | py | Python | test/torch/differential_privacy/test_pate.py | amitkarn3/PythnSyft | 8eaa637e1ca54c963281e847556cb14b4a76b46b | [
"Apache-1.1"
] | null | null | null | test/torch/differential_privacy/test_pate.py | amitkarn3/PythnSyft | 8eaa637e1ca54c963281e847556cb14b4a76b46b | [
"Apache-1.1"
] | null | null | null | test/torch/differential_privacy/test_pate.py | amitkarn3/PythnSyft | 8eaa637e1ca54c963281e847556cb14b4a76b46b | [
"Apache-1.1"
] | null | null | null | import numpy as np
from syft.frameworks.torch.differential_privacy import pate
def test_base_dataset():
num_teachers, num_examples, num_labels = (100, 50, 10)
preds = (np.random.rand(num_teachers, num_examples) * num_labels).astype(int) # fake preds
indices = (np.random.rand(num_examples) * num_labels).... | 30.444444 | 95 | 0.717153 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 0.047445 |
349c048a588296bb67dea9d1d337e93b39772ac1 | 381 | py | Python | 03_Avanzado/09_CursoBasico_Python/codigo/funciones.py | LeoSan/CarreraFundamentosProgramacion_Platzi_2021 | 9db6ac33a755f855fbb9c41a9bd0e02712f37cb3 | [
"MIT"
] | null | null | null | 03_Avanzado/09_CursoBasico_Python/codigo/funciones.py | LeoSan/CarreraFundamentosProgramacion_Platzi_2021 | 9db6ac33a755f855fbb9c41a9bd0e02712f37cb3 | [
"MIT"
] | null | null | null | 03_Avanzado/09_CursoBasico_Python/codigo/funciones.py | LeoSan/CarreraFundamentosProgramacion_Platzi_2021 | 9db6ac33a755f855fbb9c41a9bd0e02712f37cb3 | [
"MIT"
] | null | null | null | #Programa ejemplo para usar función
#funcion sin parametros
def imprimir_mensaje():
print("Mensaje especial:")
print("Estoy aprendiendo:")
imprimir_mensaje()
#funcion con parametros
valorA= "Hola mundo"
valorB= "Función con parametros"
def imprimir_mensaje_param(mensaje1, mensaje2):
print(mensaje1)... | 20.052632 | 47 | 0.755906 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 159 | 0.415144 |
34a032f572f524fc63d35b7eac84530ba6ee0e35 | 7,130 | py | Python | orchestrator/cots/gdal/gdal_rasterize.py | spacebel/MAJA | 3e5d20bc9c744c610e608cfcf1f4c5c738d4de9e | [
"Apache-2.0"
] | 57 | 2020-09-30T08:51:22.000Z | 2021-12-19T20:28:30.000Z | orchestrator/cots/gdal/gdal_rasterize.py | spacebel/MAJA | 3e5d20bc9c744c610e608cfcf1f4c5c738d4de9e | [
"Apache-2.0"
] | 34 | 2020-09-29T21:27:22.000Z | 2022-02-03T09:56:45.000Z | orchestrator/cots/gdal/gdal_rasterize.py | spacebel/MAJA | 3e5d20bc9c744c610e608cfcf1f4c5c738d4de9e | [
"Apache-2.0"
] | 14 | 2020-10-11T13:17:59.000Z | 2022-03-09T15:58:19.000Z | # -*- coding: utf-8 -*-
#
# Copyright (C) 2020 Centre National d'Etudes Spatiales (CNES)
#
# 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
#
# ... | 33.317757 | 119 | 0.55021 | 3,750 | 0.525947 | 0 | 0 | 0 | 0 | 0 | 0 | 3,269 | 0.458485 |
34a1337c8f6d2a9a081a7f61b09a68afa8480561 | 7,374 | py | Python | theseus/test/test_tracer.py | pexip/os-python-theseus | 3093edd7bc4af5556bce42c8602685010c695183 | [
"0BSD"
] | 1 | 2016-04-27T07:58:20.000Z | 2016-04-27T07:58:20.000Z | theseus/test/test_tracer.py | pexip/os-python-theseus | 3093edd7bc4af5556bce42c8602685010c695183 | [
"0BSD"
] | null | null | null | theseus/test/test_tracer.py | pexip/os-python-theseus | 3093edd7bc4af5556bce42c8602685010c695183 | [
"0BSD"
] | null | null | null | from cStringIO import StringIO
import inspect
import textwrap
import pytest
from twisted.internet import defer, task
from theseus._tracer import Function, Tracer
class FakeCode(object):
def __init__(self, filename='', name='', flags=0):
self.co_filename = filename
self.co_name = name
sel... | 27.210332 | 79 | 0.649173 | 643 | 0.087198 | 0 | 0 | 140 | 0.018986 | 0 | 0 | 2,598 | 0.352319 |