hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ba77447cc795ee759e86bd6f229a74ae3a445102 | 4,739 | py | Python | python3/koans/about_proxy_object_project.py | zgparsons/python-koans | 1551ca2f476a1680ce02f2e32825362a21d6ca3e | [
"MIT"
] | null | null | null | python3/koans/about_proxy_object_project.py | zgparsons/python-koans | 1551ca2f476a1680ce02f2e32825362a21d6ca3e | [
"MIT"
] | null | null | null | python3/koans/about_proxy_object_project.py | zgparsons/python-koans | 1551ca2f476a1680ce02f2e32825362a21d6ca3e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Project: Create a Proxy Class
#
# In this assignment, create a proxy class (one is started for you
# below). You should be able to initialize the proxy object with any
# object. Any attributes called on the proxy object should be forwarded
# to the target object. As e... | 26.926136 | 73 | 0.629036 |
7409aaa0be66b102739a19f372e582b79df5c2f5 | 5,519 | py | Python | python/ray/tune/registry.py | Ezra-H/ray | e428134137f05cf08317582e9820e7c43657e972 | [
"Apache-2.0"
] | null | null | null | python/ray/tune/registry.py | Ezra-H/ray | e428134137f05cf08317582e9820e7c43657e972 | [
"Apache-2.0"
] | null | null | null | python/ray/tune/registry.py | Ezra-H/ray | e428134137f05cf08317582e9820e7c43657e972 | [
"Apache-2.0"
] | null | null | null | import logging
from types import FunctionType
import ray
import ray.cloudpickle as pickle
from ray.experimental.internal_kv import _internal_kv_initialized, \
_internal_kv_get, _internal_kv_put
from ray.tune.error import TuneError
TRAINABLE_CLASS = "trainable_class"
ENV_CREATOR = "env_creator"
RLLIB_MODEL = "rlli... | 31.180791 | 77 | 0.672586 |
9e4cb6e02568780ff5165121f3eb4a184c2e43a4 | 399 | py | Python | src/dispatch/plugins/bases/email.py | axellaurelut/dispatch | 338482d59846dda9aff14e761045b374725ab1bd | [
"Apache-2.0"
] | 3,417 | 2020-02-23T22:54:47.000Z | 2022-03-31T13:01:01.000Z | src/dispatch/plugins/bases/email.py | axellaurelut/dispatch | 338482d59846dda9aff14e761045b374725ab1bd | [
"Apache-2.0"
] | 607 | 2020-02-24T14:27:02.000Z | 2022-03-30T19:15:39.000Z | src/dispatch/plugins/bases/email.py | axellaurelut/dispatch | 338482d59846dda9aff14e761045b374725ab1bd | [
"Apache-2.0"
] | 359 | 2020-02-24T19:04:43.000Z | 2022-03-29T06:48:12.000Z | """
.. module: dispatch.plugins.bases.email
:platform: Unix
:copyright: (c) 2019 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
"""
from dispatch.plugins.base import Plugin
class EmailPlugin(Plugin):
type = "... | 24.9375 | 62 | 0.694236 |
6a5c0394847775fe2d207483b873b8defe3a4644 | 13,027 | py | Python | tensorflow/python/ops/ragged/ragged_concat_ops.py | vixadd/tensorflow | 8c624204eb686a91779149dc500e6c8c60096074 | [
"Apache-2.0"
] | 3 | 2019-11-19T14:07:27.000Z | 2020-10-04T12:57:40.000Z | tensorflow/python/ops/ragged/ragged_concat_ops.py | vixadd/tensorflow | 8c624204eb686a91779149dc500e6c8c60096074 | [
"Apache-2.0"
] | 4 | 2020-04-09T16:22:20.000Z | 2021-12-15T13:57:36.000Z | tensorflow/python/ops/ragged/ragged_concat_ops.py | vixadd/tensorflow | 8c624204eb686a91779149dc500e6c8c60096074 | [
"Apache-2.0"
] | 4 | 2022-01-13T11:23:44.000Z | 2022-03-02T11:11:42.000Z | # Copyright 2018 The TensorFlow 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 applica... | 39.83792 | 80 | 0.697474 |
dbc965b3133794d3384214f7a871127079654445 | 3,979 | py | Python | src/auv_pilot/scripts/common/common_states.py | hidronautics/ROS | 0dc4019025666c14e908b9f3ce37c7b36f5e1436 | [
"MIT"
] | 11 | 2017-12-27T09:16:01.000Z | 2021-02-14T08:02:03.000Z | src/auv_pilot/scripts/common/common_states.py | hidronautics/ROS | 0dc4019025666c14e908b9f3ce37c7b36f5e1436 | [
"MIT"
] | 1 | 2018-01-29T08:20:51.000Z | 2018-01-29T08:20:51.000Z | src/auv_pilot/scripts/common/common_states.py | hidronautics/ROS | 0dc4019025666c14e908b9f3ce37c7b36f5e1436 | [
"MIT"
] | 3 | 2018-05-20T20:16:02.000Z | 2019-03-15T11:48:14.000Z | #! /usr/bin/env python
import rospy
import smach
import smach_ros
from auv_common.srv import EnablingCmd
from auv_common.msg import DiveGoal, DiveAction, MoveAction, MoveGoal
# TODO: Create more common states
# Creates delay (in seconds)
class WaitState(smach.State):
def __init__(self, delay):
smach.Stat... | 34.6 | 94 | 0.647901 |
9ec4bfd78e5930e66670f3caa4cd956f9ee9fe07 | 2,066 | py | Python | src/util/doc2string.py | SwaXTech/Detector-de-Plagio | 11445e81097b52cd75561a049d4c85165d73f461 | [
"MIT"
] | 3 | 2021-11-16T13:19:16.000Z | 2021-11-16T17:53:42.000Z | src/util/doc2string.py | SwaXTech/Detector-de-Plagio | 11445e81097b52cd75561a049d4c85165d73f461 | [
"MIT"
] | null | null | null | src/util/doc2string.py | SwaXTech/Detector-de-Plagio | 11445e81097b52cd75561a049d4c85165d73f461 | [
"MIT"
] | null | null | null | import docx
from util.file_manager import file_extension
from util.file_manager import get_filename
from util.generic_document import GenericDocument
from util.data_cleaning import separate_glued_words
from util.data_cleaning import merge_string
import util.log as log
import re
class WordDocument():
type_manager = ... | 24.891566 | 69 | 0.723621 |
4b25cb13ac67154cb33b12b5a183dbea4df98cbc | 8,093 | py | Python | src/oci/jms/models/fleet_agent_configuration.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | 249 | 2017-09-11T22:06:05.000Z | 2022-03-04T17:09:29.000Z | src/oci/jms/models/fleet_agent_configuration.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | 228 | 2017-09-11T23:07:26.000Z | 2022-03-23T10:58:50.000Z | src/oci/jms/models/fleet_agent_configuration.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | 224 | 2017-09-27T07:32:43.000Z | 2022-03-25T16:55:42.000Z | # coding: utf-8
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 42.371728 | 245 | 0.729519 |
a8eaa5ffef824af2a5d459aeabe18c45bfb7d7b9 | 13,948 | py | Python | pyboto3/augmentedairuntime.py | gehad-shaat/pyboto3 | 4a0c2851a8bc04fb1c71c36086f7bb257e48181d | [
"MIT"
] | 91 | 2016-12-31T11:38:37.000Z | 2021-09-16T19:33:23.000Z | pyboto3/augmentedairuntime.py | gehad-shaat/pyboto3 | 4a0c2851a8bc04fb1c71c36086f7bb257e48181d | [
"MIT"
] | 7 | 2017-01-02T18:54:23.000Z | 2020-08-11T13:54:02.000Z | pyboto3/augmentedairuntime.py | gehad-shaat/pyboto3 | 4a0c2851a8bc04fb1c71c36086f7bb257e48181d | [
"MIT"
] | 26 | 2016-12-31T13:11:00.000Z | 2022-03-03T21:01:12.000Z | '''
The MIT License (MIT)
Copyright (c) 2016 WavyCloud
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, p... | 30.654945 | 453 | 0.727344 |
986db5b99aecf1c78aecd810ab822dcf12494c2b | 18,689 | py | Python | cwltool/workflow.py | RenskeW/cwltool | 8ef515037de411abd2f84b569ad4d4a4f7a2c7a0 | [
"Apache-2.0"
] | null | null | null | cwltool/workflow.py | RenskeW/cwltool | 8ef515037de411abd2f84b569ad4d4a4f7a2c7a0 | [
"Apache-2.0"
] | 11 | 2022-02-17T03:20:41.000Z | 2022-03-30T10:54:02.000Z | cwltool/workflow.py | RenskeW/cwltool | 8ef515037de411abd2f84b569ad4d4a4f7a2c7a0 | [
"Apache-2.0"
] | null | null | null | import copy
import datetime
import functools
import logging
import random
from typing import (
Callable,
Dict,
List,
Mapping,
MutableMapping,
MutableSequence,
Optional,
cast,
)
from uuid import UUID
from ruamel.yaml.comments import CommentedMap
from schema_salad.exceptions import Valida... | 39.679406 | 88 | 0.554872 |
21a33869ce4ffd54c88f6ed40031637b8abd2f28 | 1,223 | py | Python | examples/run_cell_hppc_ecm.py | sratgh/equiv-circ-model | 0c8c30814b819e893f49a810eae090a6dabe39e9 | [
"MIT"
] | 2 | 2020-03-06T21:22:14.000Z | 2020-03-26T20:13:52.000Z | examples/run_cell_hppc_ecm.py | sratgh/equiv-circ-model | 0c8c30814b819e893f49a810eae090a6dabe39e9 | [
"MIT"
] | null | null | null | examples/run_cell_hppc_ecm.py | sratgh/equiv-circ-model | 0c8c30814b819e893f49a810eae090a6dabe39e9 | [
"MIT"
] | null | null | null | """
Run equivalent circuit model (ECM) for battery cell and compare to HPPC data.
Plot HPPC voltage data and ECM voltage. Plot absolute voltage difference
between HPPC data and ECM.
"""
import matplotlib.pyplot as plt
import params
from ecm import CellHppcData
from ecm import EquivCircModel
from utils import config_... | 29.829268 | 78 | 0.642682 |
6ec53dff1ae260c52fabd5f6d1f2f3377d6fdaab | 1,795 | py | Python | daily_exercise/148. Sort List_medium.py | JunzhongLin/leetcode_practice | 47b2f5cc3c87de004ae21a94024e751b40b8f559 | [
"MIT"
] | null | null | null | daily_exercise/148. Sort List_medium.py | JunzhongLin/leetcode_practice | 47b2f5cc3c87de004ae21a94024e751b40b8f559 | [
"MIT"
] | null | null | null | daily_exercise/148. Sort List_medium.py | JunzhongLin/leetcode_practice | 47b2f5cc3c87de004ae21a94024e751b40b8f559 | [
"MIT"
] | null | null | null | # Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def sortList(self, head: Optional[ListNode]) -> Optional[ListNode]:
if not head:
return None
dummy_head = ListNode()
... | 28.951613 | 101 | 0.532033 |
c67c85c4ea4deca21aad45b0fe300d6d465c029d | 1,978 | py | Python | python-project/experiments/continuous/ContinuousExperiment.py | ferjorosa/bayesian-latent-forests | 3d9e19f1d0be1e4cca0b390866589061a670cc20 | [
"Apache-2.0"
] | null | null | null | python-project/experiments/continuous/ContinuousExperiment.py | ferjorosa/bayesian-latent-forests | 3d9e19f1d0be1e4cca0b390866589061a670cc20 | [
"Apache-2.0"
] | null | null | null | python-project/experiments/continuous/ContinuousExperiment.py | ferjorosa/bayesian-latent-forests | 3d9e19f1d0be1e4cca0b390866589061a670cc20 | [
"Apache-2.0"
] | null | null | null | from scipy.io import arff
from spn.structure.Base import Context
import pandas as pd
from methods import MSPN, KDE
from abc import ABCMeta, abstractmethod
class ContinuousExperiment(metaclass=ABCMeta):
def __init__(self, data_name):
self.data_name = data_name
@property
@abstractmethod
def me... | 35.321429 | 130 | 0.625885 |
3c125bc305ad7d39f655cb9aece1ad34c4c89a16 | 18,068 | py | Python | TWLight/applications/forms.py | nicole331/TWLight | fab9002e76868f8a2ef36f9279c777de34243b2c | [
"MIT"
] | null | null | null | TWLight/applications/forms.py | nicole331/TWLight | fab9002e76868f8a2ef36f9279c777de34243b2c | [
"MIT"
] | 60 | 2018-11-05T16:40:16.000Z | 2022-03-29T02:19:35.000Z | TWLight/applications/forms.py | nicole331/TWLight | fab9002e76868f8a2ef36f9279c777de34243b2c | [
"MIT"
] | null | null | null | """
This forms.py contains base forms that applications/views.py will use to
generate the actual forms filled in by users in making requests for partner
content.
For usability reasons, we only want users to have to fill in one form at a time
(even if they are requesting access to multiple partners' resources), and we
... | 41.921114 | 249 | 0.60704 |
f9ab9e9c953697269cb2a183fc82d6b8bb98e225 | 623 | py | Python | World 1/First attempts/ex006 - Double, Triple and Square root.py | MiguelChichorro/PythonExercises | 3b2726e7d9ef92c1eb6b977088692c42a2a7b86e | [
"MIT"
] | 2 | 2021-04-23T19:18:06.000Z | 2021-05-15T17:45:21.000Z | World 1/First attempts/ex006 - Double, Triple and Square root.py | MiguelChichorro/PythonExercises | 3b2726e7d9ef92c1eb6b977088692c42a2a7b86e | [
"MIT"
] | 1 | 2021-05-14T00:29:23.000Z | 2021-05-14T00:29:23.000Z | World 1/First attempts/ex006 - Double, Triple and Square root.py | MiguelChichorro/PythonExercises | 3b2726e7d9ef92c1eb6b977088692c42a2a7b86e | [
"MIT"
] | 1 | 2021-05-14T00:19:33.000Z | 2021-05-14T00:19:33.000Z | colors = {"clean": "\033[m",
"red": "\033[31m",
"green": "\033[32m",
"yellow": "\033[33m",
"blue": "\033[34m",
"purple": "\033[35m",
"cian": "\033[36m"}
n1 = int(input("Enter a number: "))
print("Your number is {}{}{}"
"\nThe double of your number is {}{... | 36.647059 | 63 | 0.457464 |
fe2d3776bd09ce40884af8392ff7b8515e4bdef3 | 1,554 | py | Python | wagtail/wagtailredirects/middleware.py | yohanlebret/wagtail | 03c623b467ef8ed3849872273ebad13d48f755ac | [
"BSD-3-Clause"
] | null | null | null | wagtail/wagtailredirects/middleware.py | yohanlebret/wagtail | 03c623b467ef8ed3849872273ebad13d48f755ac | [
"BSD-3-Clause"
] | null | null | null | wagtail/wagtailredirects/middleware.py | yohanlebret/wagtail | 03c623b467ef8ed3849872273ebad13d48f755ac | [
"BSD-3-Clause"
] | 1 | 2019-03-05T15:37:22.000Z | 2019-03-05T15:37:22.000Z | from django import http
from django.utils.six.moves.urllib.parse import urlparse
from wagtail.wagtailredirects import models
# Originally pinched from: https://github.com/django/django/blob/master/django/contrib/redirects/middleware.py
class RedirectMiddleware(object):
def process_response(self, request, respons... | 37 | 110 | 0.664736 |
efac9518ec49ff143ed42e8acbaddd5d185bcc1f | 1,358 | py | Python | es_search.py | ops-over-elasticsearch/es-python-tools | 6d542b70755d9ae247aa59ec1bbc4895db4c92c2 | [
"Apache-2.0"
] | null | null | null | es_search.py | ops-over-elasticsearch/es-python-tools | 6d542b70755d9ae247aa59ec1bbc4895db4c92c2 | [
"Apache-2.0"
] | null | null | null | es_search.py | ops-over-elasticsearch/es-python-tools | 6d542b70755d9ae247aa59ec1bbc4895db4c92c2 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# coding:utf-8
"""
es request wrapper tool for python
"""
from es_wrapper_client import ElasticSearchWrapperClient
import json
if __name__ == '__main__':
es_client = ElasticSearchWrapperClient("http://xxx.com:9222")
strsss = ',\"from\":0, \"size\":10000'
search_dsl = '{\"filter\":{\"bool\... | 36.702703 | 235 | 0.538292 |
398e1cef54c43d9188fa225c255745707737d56c | 2,693 | py | Python | gr_client.py | Opendigitalradio/ODR-StaticPrecorrection | 984c14bf46ebd7dc66954a653c8f17212ed97efb | [
"MIT"
] | null | null | null | gr_client.py | Opendigitalradio/ODR-StaticPrecorrection | 984c14bf46ebd7dc66954a653c8f17212ed97efb | [
"MIT"
] | null | null | null | gr_client.py | Opendigitalradio/ODR-StaticPrecorrection | 984c14bf46ebd7dc66954a653c8f17212ed97efb | [
"MIT"
] | 1 | 2019-06-20T02:37:34.000Z | 2019-06-20T02:37:34.000Z | """
This is a client for gr_server.py
It attaches to the tcp sockets of both the gnu radio server and the control
server of gr_server
"""
import time
import numpy as np
import src.tcp_sync as ts
import src.dab_tuning_lib as dt
import pandas as pd
import src.SendDictTcp as sdt
use_fft=True
if use_fft: t1 = ts.UhdSyn... | 31.313953 | 105 | 0.623097 |
69070022bf34959e64cc6e868439c27739889c68 | 353 | py | Python | tests/src/test_models.py | DinithHerath/drf-registration | 7cd0e48d125061c126765f7946401aa5363cef7f | [
"MIT"
] | 35 | 2020-09-23T02:22:48.000Z | 2022-03-25T10:09:48.000Z | tests/src/test_models.py | DinithHerath/drf-registration | 7cd0e48d125061c126765f7946401aa5363cef7f | [
"MIT"
] | 8 | 2020-11-17T06:56:04.000Z | 2022-03-29T23:40:23.000Z | tests/src/test_models.py | DinithHerath/drf-registration | 7cd0e48d125061c126765f7946401aa5363cef7f | [
"MIT"
] | 8 | 2020-10-05T14:56:25.000Z | 2022-03-28T14:13:26.000Z | from drf_registration.utils.users import get_user_model
from tests.utils import BaseModelTestCase
class UserModelTestCases(BaseModelTestCase):
def setUp(self):
self.user_model = get_user_model()
def test_get_user_model(self):
user_model = get_user_model()
self.assertHasModelFields(us... | 27.153846 | 68 | 0.747875 |
a396a36e636d0795626422d97ac170a49abff925 | 7,517 | py | Python | exchanges/bitfinex.py | assassinen/grid_bot_client | e42dfe0fb9ce3716832cf842de4e63848ec8d06f | [
"Apache-2.0"
] | 1 | 2021-12-03T12:32:00.000Z | 2021-12-03T12:32:00.000Z | exchanges/bitfinex.py | assassinen/grid_bot_client | e42dfe0fb9ce3716832cf842de4e63848ec8d06f | [
"Apache-2.0"
] | 4 | 2021-09-07T05:55:29.000Z | 2022-01-04T22:54:34.000Z | exchanges/bitfinex.py | assassinen/grid_bot_client | e42dfe0fb9ce3716832cf842de4e63848ec8d06f | [
"Apache-2.0"
] | null | null | null | import hashlib
import hmac
import time
import json
import requests
from models.log import setup_custom_logger
class BitfinexExchangeInterface:
def __init__(self, key, secret, base_url, api_url, instrument):
self.key = key
self.secret = secret
self.base_url = base_url
self.api_url =... | 43.450867 | 110 | 0.570972 |
f276a7f1cd80ff53a2de922502c0a1392c9a10dc | 3,754 | py | Python | NAIP/ndwi.py | dmendelo/earthengine-py-notebooks | 515567fa2702b436daf449fff02f5c690003cf94 | [
"MIT"
] | 2 | 2020-02-05T02:36:18.000Z | 2021-03-23T11:02:39.000Z | NAIP/ndwi.py | dmendelo/earthengine-py-notebooks | 515567fa2702b436daf449fff02f5c690003cf94 | [
"MIT"
] | null | null | null | NAIP/ndwi.py | dmendelo/earthengine-py-notebooks | 515567fa2702b436daf449fff02f5c690003cf94 | [
"MIT"
] | 3 | 2021-01-06T17:33:08.000Z | 2022-02-18T02:14:18.000Z | '''
<table class="ee-notebook-buttons" align="left">
<td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/NAIP/ndwi.ipynb"><img width=32px src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" /> View source on GitHub</a></td>
<td><a target="_blank" href="https://... | 36.446602 | 422 | 0.723229 |
e83aa4518d2303822d9d4eaca231341d01a782f6 | 7,500 | py | Python | swagger_server/models/start.py | storage4grid/PROFESS-PROFEV | adf4e26488225206c249938c9eecc394a06f9677 | [
"Apache-2.0"
] | null | null | null | swagger_server/models/start.py | storage4grid/PROFESS-PROFEV | adf4e26488225206c249938c9eecc394a06f9677 | [
"Apache-2.0"
] | null | null | null | swagger_server/models/start.py | storage4grid/PROFESS-PROFEV | adf4e26488225206c249938c9eecc394a06f9677 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
from __future__ import absolute_import
from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401
from swagger_server.models.base_model_ import Model
from swagger_server import util
class Start(Model):
"""NOTE: This class is auto generated by the swagger code ... | 29.182879 | 234 | 0.622533 |
56401f393f7944f54169287c9feb2c54550cc76a | 4,192 | py | Python | Snake_test1.py | nh8157/LANIF-SCI | 06172a1f3e5b7d665088b2771d998a1f7fbd8c33 | [
"CC-BY-3.0"
] | null | null | null | Snake_test1.py | nh8157/LANIF-SCI | 06172a1f3e5b7d665088b2771d998a1f7fbd8c33 | [
"CC-BY-3.0"
] | null | null | null | Snake_test1.py | nh8157/LANIF-SCI | 06172a1f3e5b7d665088b2771d998a1f7fbd8c33 | [
"CC-BY-3.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed May 15 22:26:51 2019
@author: wangding
"""
import pygame
from network import Network
class Player():
width = height = 50
def __init__(self, startx, starty, body, speed, direction, p_update, score):
self.x = startx
self.y = st... | 26.36478 | 121 | 0.514552 |
4d4d2cc69b0eec34b626a84ee237c1c4c4c540a2 | 2,986 | py | Python | paddlespeech/cli/base_commands.py | Honei/PaddleSpeech | 83b941fc439696b1dd8fc0d044a5b29309574c3b | [
"Apache-2.0"
] | 1 | 2021-12-23T01:04:00.000Z | 2021-12-23T01:04:00.000Z | paddlespeech/cli/base_commands.py | catcat0921/PaddleSpeech | 775c4befbd4253eab9440c996f267683e7a2a4f0 | [
"Apache-2.0"
] | null | null | null | paddlespeech/cli/base_commands.py | catcat0921/PaddleSpeech | 775c4befbd4253eab9440c996f267683e7a2a4f0 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 31.765957 | 78 | 0.626256 |
8f2eeeb6e47633c4269214f5544171c1f6425eab | 1,762 | py | Python | chapter6/webxample-package/setup.py | lixin940207/expert_python_programming | 26c60e29a21651d9b1f91abc0602b7cd7412869b | [
"BSD-3-Clause"
] | 189 | 2016-05-23T22:33:11.000Z | 2022-03-31T06:39:35.000Z | chapter6/webxample-package/setup.py | nthssss/Expert-Python-Programming_Second-Edition | 2ccdbd302dea96aecc3aef04aaf08b0cb937f30a | [
"BSD-3-Clause"
] | 2 | 2018-02-26T04:26:43.000Z | 2020-12-01T07:14:53.000Z | chapter6/webxample-package/setup.py | nthssss/Expert-Python-Programming_Second-Edition | 2ccdbd302dea96aecc3aef04aaf08b0cb937f30a | [
"BSD-3-Clause"
] | 93 | 2016-12-19T17:37:27.000Z | 2021-12-09T07:35:48.000Z | import os
from setuptools import setup
from setuptools import find_packages
from distutils.cmd import Command
from distutils.command.build import build as _build
try:
from django.core.management.commands.compilemessages \
import Command as CompileCommand
except ImportError:
# note: during installation... | 23.184211 | 72 | 0.623156 |
9adf4bac37c3bdfa613e0ef8d875a5ed1bc8c5c5 | 34,801 | py | Python | pycognito/__init__.py | nook-io/pycognito | 195be9d23798ea26dbf4318eebc8c1d0fc7f6b28 | [
"Apache-2.0"
] | null | null | null | pycognito/__init__.py | nook-io/pycognito | 195be9d23798ea26dbf4318eebc8c1d0fc7f6b28 | [
"Apache-2.0"
] | null | null | null | pycognito/__init__.py | nook-io/pycognito | 195be9d23798ea26dbf4318eebc8c1d0fc7f6b28 | [
"Apache-2.0"
] | null | null | null | import ast
import datetime
import re
import boto3
from envs import env
from jose import JWTError, jwt
import requests
from .aws_srp import AWSSRP
from .exceptions import TokenVerificationException
def cognito_to_dict(attr_list, attr_map=None):
if attr_map is None:
attr_map = {}
attr_dict = dict()
... | 35.693333 | 127 | 0.622338 |
7310c13900a51bbaa125ff2cc4ac89c2525c9753 | 633 | py | Python | model/hooks.py | peternara/graph-based-image-classification-gcn | 60e93b47691e960b7f06f7a5dc11191efe881178 | [
"MIT"
] | 44 | 2017-02-26T16:52:48.000Z | 2022-02-17T18:50:02.000Z | model/hooks.py | hungerzs/graph-based-image-classification | d44182c6a28b4ab9a691a9cb1ecd4c3b851875a8 | [
"MIT"
] | 2 | 2018-11-14T05:11:25.000Z | 2020-06-23T16:24:41.000Z | model/hooks.py | hungerzs/graph-based-image-classification | d44182c6a28b4ab9a691a9cb1ecd4c3b851875a8 | [
"MIT"
] | 13 | 2018-04-26T07:46:35.000Z | 2022-02-28T15:38:53.000Z | import tensorflow as tf
from .logger import (StepLoggerHook,
LossLoggerHook,
AccuracyLoggerHook,
TimeLoggerHook,
EolLoggerHook)
def hooks(display_step, last_step, batch_size, loss, accuracy):
return [
tf.train.StopAtStepH... | 31.65 | 63 | 0.635071 |
e46458e530b98d8d9c81e24bc9147d6ab9c7c6aa | 1,074 | py | Python | kubernetes_asyncio/test/test_extensions_v1beta1_scale_status.py | PidgeyBE/kubernetes_asyncio | 14d15dc309890253c26b6274a022e84441e05217 | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/test/test_extensions_v1beta1_scale_status.py | PidgeyBE/kubernetes_asyncio | 14d15dc309890253c26b6274a022e84441e05217 | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/test/test_extensions_v1beta1_scale_status.py | PidgeyBE/kubernetes_asyncio | 14d15dc309890253c26b6274a022e84441e05217 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: v1.13.5
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import kube... | 26.85 | 127 | 0.753259 |
0d332c7ac2835cd8ade9734abd527d574b2894c3 | 4,520 | py | Python | filer/admin/clipboardadmin.py | pbmbrands/django-filer | 199903f4ab1ad58c2979737cf269e25347941f32 | [
"BSD-3-Clause"
] | 1 | 2017-09-27T01:07:05.000Z | 2017-09-27T01:07:05.000Z | filer/admin/clipboardadmin.py | fusionbox/django-filer | 5980b07497cb0021f0933977a3c1bf3273f2557f | [
"BSD-3-Clause"
] | null | null | null | filer/admin/clipboardadmin.py | fusionbox/django-filer | 5980b07497cb0021f0933977a3c1bf3273f2557f | [
"BSD-3-Clause"
] | null | null | null | #-*- coding: utf-8 -*-
import json as simplejson
from django.forms.models import modelform_factory
from django.contrib import admin
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from filer import settings as filer_settings
from filer.models import Clipboard, ClipboardItem
fr... | 39.649123 | 99 | 0.571018 |
8e7011b180d3a41650793f900a23110c3f602844 | 8,679 | py | Python | neo_finrl/config.py | revelation-space/NeoFinRL | 5dae2d861abd0c9f105f01a448488ef4fb92a5d6 | [
"MIT"
] | null | null | null | neo_finrl/config.py | revelation-space/NeoFinRL | 5dae2d861abd0c9f105f01a448488ef4fb92a5d6 | [
"MIT"
] | null | null | null | neo_finrl/config.py | revelation-space/NeoFinRL | 5dae2d861abd0c9f105f01a448488ef4fb92a5d6 | [
"MIT"
] | null | null | null | TRAIN_START_DATE = '2019-01-01'
TRAIN_END_DATE = '2019-12-31'
TEST_START_DATE = '2020-01-01'
TEST_END_DATE = '2020-12-31'
TRADE_START_DATE = '2021-01-01'
TRADE_START_DATE = '2021-07-31'
TECHNICAL_INDICATORS_LIST = ['macd', 'boll_ub', 'boll_lb', 'rsi_30', 'dx_30',
'close_30_sma'... | 12.541908 | 78 | 0.287821 |
68c6eff56769928891e1b77da8c79b8a08c70d68 | 12,794 | py | Python | selfdrive/controls/lib/lateral_planner.py | seanchen5716/op | f9e5e95cc98e822fa0651493ad809340db6d2f8a | [
"MIT"
] | null | null | null | selfdrive/controls/lib/lateral_planner.py | seanchen5716/op | f9e5e95cc98e822fa0651493ad809340db6d2f8a | [
"MIT"
] | null | null | null | selfdrive/controls/lib/lateral_planner.py | seanchen5716/op | f9e5e95cc98e822fa0651493ad809340db6d2f8a | [
"MIT"
] | null | null | null | import os
import math
import numpy as np
from common.realtime import sec_since_boot, DT_MDL
from common.numpy_fast import interp
from selfdrive.swaglog import cloudlog
from selfdrive.controls.lib.lateral_mpc import libmpc_py
from selfdrive.controls.lib.drive_helpers import MPC_COST_LAT, MPC_N, CAR_ROTATION_RADIUS
from ... | 45.208481 | 142 | 0.735501 |
48e3c18a0bc01797e75b581834c2d9d13255bc22 | 2,609 | py | Python | notcm.py | NKID00/NotCloudMusic | 48bc45b5442b766cf9d4f93a7e3d902747bd637b | [
"MIT"
] | 1 | 2020-10-06T08:39:44.000Z | 2020-10-06T08:39:44.000Z | notcm.py | NKID00/NotCloudMusic | 48bc45b5442b766cf9d4f93a7e3d902747bd637b | [
"MIT"
] | null | null | null | notcm.py | NKID00/NotCloudMusic | 48bc45b5442b766cf9d4f93a7e3d902747bd637b | [
"MIT"
] | null | null | null | '''NotCloudMusic
又一个网易云音乐 CUI 客户端
https://github.com/NKID00/NotCloudMusic
MIT License
Copyright (c) 2020 NKID00
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 wit... | 32.209877 | 78 | 0.697969 |
de4aa87f6e1057eee513853a33ce1c691b577224 | 11,268 | py | Python | droidlet/perception/craftassist/low_level_perception.py | CowherdChris/droidlet | 8d965c1ebc38eceb6f8083c52b1146c1bc17d5e1 | [
"MIT"
] | null | null | null | droidlet/perception/craftassist/low_level_perception.py | CowherdChris/droidlet | 8d965c1ebc38eceb6f8083c52b1146c1bc17d5e1 | [
"MIT"
] | null | null | null | droidlet/perception/craftassist/low_level_perception.py | CowherdChris/droidlet | 8d965c1ebc38eceb6f8083c52b1146c1bc17d5e1 | [
"MIT"
] | null | null | null | """
Copyright (c) Facebook, Inc. and its affiliates.
"""
import os
import sys
import numpy as np
from droidlet.lowlevel.minecraft.mc_util import XYZ, IDM, pos_to_np, euclid_dist, diag_adjacent
from droidlet.base_util import to_block_pos
from typing import Tuple, List
from droidlet.lowlevel.minecraft.craftassist_cuberi... | 41.426471 | 99 | 0.600639 |
336493d222803ddd7fe86cafd30d82fd7dd581dd | 5,395 | py | Python | getbaidutoken.py | DozingWolf/pybaiduapi | 6bae0dceeaeb8520e6bfc1376cc8038984dace31 | [
"MIT"
] | null | null | null | getbaidutoken.py | DozingWolf/pybaiduapi | 6bae0dceeaeb8520e6bfc1376cc8038984dace31 | [
"MIT"
] | null | null | null | getbaidutoken.py | DozingWolf/pybaiduapi | 6bae0dceeaeb8520e6bfc1376cc8038984dace31 | [
"MIT"
] | null | null | null | # 获取百度接口使用的token和aksk
from configparser import ConfigParser
import requests
import json
import sqlite3
import os.path
import time
def getBaiduToken(conf_path):
#todayis = time.strftime('%Y/%m/%d', time.localtime())
todayis = time.time()
paraLoader = ConfigParser()
paraLoader.read(conf_path)
ai_ak =... | 41.183206 | 194 | 0.609268 |
7aed3a4b895dcde6c1f7068f8c33c6ae232d4e70 | 7,660 | py | Python | tools/wptrunner/wptrunner/browsers/safari.py | BasixKOR/wpt | aa27d567c10dcdb2aea6884d5155dfaaa177a800 | [
"BSD-3-Clause"
] | null | null | null | tools/wptrunner/wptrunner/browsers/safari.py | BasixKOR/wpt | aa27d567c10dcdb2aea6884d5155dfaaa177a800 | [
"BSD-3-Clause"
] | 59 | 2022-01-19T21:35:57.000Z | 2022-03-30T21:35:27.000Z | tools/wptrunner/wptrunner/browsers/safari.py | BasixKOR/wpt | aa27d567c10dcdb2aea6884d5155dfaaa177a800 | [
"BSD-3-Clause"
] | null | null | null | # mypy: allow-untyped-defs
import os
import plistlib
from distutils.spawn import find_executable
from distutils.version import LooseVersion
import psutil
from .base import WebDriverBrowser, require_arg
from .base import get_timeout_multiplier # noqa: F401
from ..executors import executor_kwargs as base_executor_kw... | 37.004831 | 118 | 0.623107 |
ac97b9df7afb18c061c736422e11baeecefd1d82 | 8,891 | py | Python | test/test_adb.py | anuraagbaishya/uiautomator | e74de3bb579f623c66c47e5b3cbc1efd69180122 | [
"MIT"
] | 1,794 | 2015-01-05T08:15:20.000Z | 2022-03-29T01:06:31.000Z | test/test_adb.py | anuraagbaishya/uiautomator | e74de3bb579f623c66c47e5b3cbc1efd69180122 | [
"MIT"
] | 217 | 2015-01-08T20:11:32.000Z | 2022-03-05T08:41:30.000Z | test/test_adb.py | anuraagbaishya/uiautomator | e74de3bb579f623c66c47e5b3cbc1efd69180122 | [
"MIT"
] | 621 | 2015-01-06T13:36:09.000Z | 2022-03-30T08:19:29.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from mock import MagicMock, patch
import os
import subprocess
from uiautomator import Adb
class TestAdb(unittest.TestCase):
def setUp(self):
self.os_name = os.name
def tearDown(self):
os.name = self.os_name
def test_serial(s... | 44.455 | 151 | 0.595321 |
b5463ae25365b58d1c06b2583efdd3d2a87ed0c7 | 332 | py | Python | certificados/migrations/0002_remove_certificados_estudiante.py | Yursksf1/DG_pulls20 | d80b6dc37a1bf20341572b8850c21467554ea84e | [
"MIT"
] | null | null | null | certificados/migrations/0002_remove_certificados_estudiante.py | Yursksf1/DG_pulls20 | d80b6dc37a1bf20341572b8850c21467554ea84e | [
"MIT"
] | null | null | null | certificados/migrations/0002_remove_certificados_estudiante.py | Yursksf1/DG_pulls20 | d80b6dc37a1bf20341572b8850c21467554ea84e | [
"MIT"
] | null | null | null | # Generated by Django 2.0.3 on 2018-04-07 15:36
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('certificados', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='certificados',
name='estudiante',
... | 18.444444 | 47 | 0.596386 |
8d1f82bcef57e409b15a80e965d419521ef4d9fb | 1,055 | py | Python | exercicios/ex093.py | RicardoAugusto-RCD/exercicios_python | 8a803f9cbc8b2ad0b5a6d61f0e7b6c2bc615b5ff | [
"MIT"
] | null | null | null | exercicios/ex093.py | RicardoAugusto-RCD/exercicios_python | 8a803f9cbc8b2ad0b5a6d61f0e7b6c2bc615b5ff | [
"MIT"
] | null | null | null | exercicios/ex093.py | RicardoAugusto-RCD/exercicios_python | 8a803f9cbc8b2ad0b5a6d61f0e7b6c2bc615b5ff | [
"MIT"
] | null | null | null |
# Crie um programa que gerencie o aproveitamento de um jogador de futebol. O programa vai ler o nome do jogador e
# quantas partidas ele jogou. Depois vai ler a quantidade de gols feitos em cada partida. No final, tudo isso será
# guardado em um dicionário, incluindo o total de gols feitos durante o campeonato.
jogad... | 34.032258 | 114 | 0.686256 |
cafbee031573ee989a340babebc18faaa1596f70 | 7,401 | py | Python | t3f/approximate.py | towadroid/t3f | 1ce4f6985037a6aac34dd64fbe68d75a9dc1474f | [
"MIT"
] | 217 | 2017-01-19T17:56:28.000Z | 2022-03-04T08:05:55.000Z | t3f/approximate.py | Dean-Go-kr/t3f | b9694eb2aa3ada4e87b5e5ea6027770d669ce1ff | [
"MIT"
] | 155 | 2017-03-06T11:03:18.000Z | 2022-03-21T17:52:54.000Z | t3f/approximate.py | Dean-Go-kr/t3f | b9694eb2aa3ada4e87b5e5ea6027770d669ce1ff | [
"MIT"
] | 61 | 2017-03-07T06:24:16.000Z | 2022-03-29T09:17:23.000Z | import itertools
import numpy as np
import tensorflow as tf
from t3f.tensor_train_batch import TensorTrainBatch
from t3f import decompositions
from t3f import batch_ops
def add_n(tt_objects, max_tt_rank, name='t3f_approximate_add_n'):
"""Adds a bunch of TT-object and round after each summation.
This version impl... | 41.346369 | 81 | 0.652615 |
68b1198125d7b425d2e9a177623ae9658ce6deb9 | 2,204 | py | Python | src/darjeeling/coverage/coveragepy.py | UC-Mind-Lab/Darjeeling | 61dc4fd3c62f43bb7fcfafce6f964f82144e293e | [
"Apache-2.0"
] | null | null | null | src/darjeeling/coverage/coveragepy.py | UC-Mind-Lab/Darjeeling | 61dc4fd3c62f43bb7fcfafce6f964f82144e293e | [
"Apache-2.0"
] | 1 | 2021-04-16T16:53:05.000Z | 2021-07-23T15:21:52.000Z | src/darjeeling/coverage/coveragepy.py | UC-Mind-Lab/Darjeeling | 61dc4fd3c62f43bb7fcfafce6f964f82144e293e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
__all__ = ('CoveragePyCollector', 'CoveragePyCollectorConfig')
from typing import Any, ClassVar, Dict, Mapping, Optional, Set, FrozenSet
import json
import typing
import attr
from .collector import CoverageCollector, CoverageCollectorConfig
from ..core import FileLineSet
if typing.TYPE_CHECK... | 34.984127 | 74 | 0.678312 |
4939ca68b9e18792c6f2aeb8b6247720c917ac7e | 4,120 | py | Python | tests/test_multidimensional_problem.py | dayyass/calculus_of_variations | d016c4824bfb5595569b156fd38f2a841c92d3ec | [
"Apache-2.0"
] | 10 | 2020-11-16T21:29:31.000Z | 2021-09-05T15:02:55.000Z | tests/test_multidimensional_problem.py | dayyass/calculus_of_variations | d016c4824bfb5595569b156fd38f2a841c92d3ec | [
"Apache-2.0"
] | 15 | 2020-12-17T19:28:26.000Z | 2021-08-06T12:01:22.000Z | tests/test_multidimensional_problem.py | dayyass/calculus_of_variations | d016c4824bfb5595569b156fd38f2a841c92d3ec | [
"Apache-2.0"
] | 1 | 2021-02-12T17:39:12.000Z | 2021-02-12T17:39:12.000Z | import sys
import unittest
from parameterized import parameterized_class
# TODO: fix it
sys.path.append("./")
from calculus_of_variations import MultidimensionalSolver
from calculus_of_variations.utils import E, I, exp, t
C1 = MultidimensionalSolver.C1
C2 = MultidimensionalSolver.C2
C3 = MultidimensionalSolver.C3
C4... | 28.219178 | 88 | 0.571359 |
7ea68435dfadf5ce8fad3a38ff9f1920cbbf0587 | 95,693 | py | Python | testsuite/driver/testlib.py | nrdmn/ghc-1 | 26a928b8fdb1b4ccb75e8edb620b8cf12cb38621 | [
"BSD-3-Clause"
] | 1 | 2022-01-02T23:00:33.000Z | 2022-01-02T23:00:33.000Z | testsuite/driver/testlib.py | abolfazl11fdfdf/ghc | bd877edd9499a351db947cd51ed583872b2facdf | [
"BSD-3-Clause"
] | null | null | null | testsuite/driver/testlib.py | abolfazl11fdfdf/ghc | bd877edd9499a351db947cd51ed583872b2facdf | [
"BSD-3-Clause"
] | 2 | 2021-10-11T09:59:57.000Z | 2022-01-02T22:59:50.000Z | # coding=utf8
#
# (c) Simon Marlow 2002
#
import io
import shutil
import os
import re
import traceback
import time
import datetime
import copy
import glob
import sys
from math import ceil, trunc
from pathlib import Path, PurePath
import collections
import subprocess
from testglobals import config, ghc_env, default_te... | 35.961293 | 179 | 0.615677 |
3530a345a9c0a2157c4bbf25ddca61b5b689b283 | 3,631 | py | Python | GCL/losses/triplet.py | lem0nle/PyGCL | 340b0201a5edf4236fef4c96b958ff373ceb7f28 | [
"Apache-2.0"
] | 361 | 2021-07-09T15:15:23.000Z | 2022-03-30T07:08:10.000Z | GCL/losses/triplet.py | lem0nle/PyGCL | 340b0201a5edf4236fef4c96b958ff373ceb7f28 | [
"Apache-2.0"
] | 25 | 2021-08-21T11:06:26.000Z | 2022-03-29T02:51:56.000Z | GCL/losses/triplet.py | lem0nle/PyGCL | 340b0201a5edf4236fef4c96b958ff373ceb7f28 | [
"Apache-2.0"
] | 45 | 2021-08-07T02:59:45.000Z | 2022-03-29T05:07:17.000Z | import torch
from .losses import Loss
class TripletMarginSP(Loss):
def __init__(self, margin: float = 1.0, p: float = 2, *args, **kwargs):
super(TripletMarginSP, self).__init__()
self.loss_fn = torch.nn.TripletMarginLoss(margin=margin, p=p, reduction='none')
self.margin = margin
def c... | 44.280488 | 119 | 0.61691 |
4de6376c5e77b1485a921660489df5a8490d5d2c | 3,169 | py | Python | scripts/nnedi3_rpow2.py | darcyg/vapoursynth-plugins | 5aaf090d3523cb8c53841949f2da286688ba33bb | [
"BSD-2-Clause"
] | null | null | null | scripts/nnedi3_rpow2.py | darcyg/vapoursynth-plugins | 5aaf090d3523cb8c53841949f2da286688ba33bb | [
"BSD-2-Clause"
] | null | null | null | scripts/nnedi3_rpow2.py | darcyg/vapoursynth-plugins | 5aaf090d3523cb8c53841949f2da286688ba33bb | [
"BSD-2-Clause"
] | 1 | 2020-04-06T16:52:59.000Z | 2020-04-06T16:52:59.000Z | import vapoursynth as vs
def nnedi3_rpow2(clip, rfactor=2, width=None, height=None, correct_shift=True,
kernel="spline36", nsize=0, nns=3, qual=None, etype=None,
pscrn=None, opt=True, fapprox=None):
"""nnedi3_rpow2 is for enlarging images by powers of 2.
Args:
rfacto... | 34.445652 | 81 | 0.615652 |
e51a1a5f528561ef494de5c4975cdc2d8dc53084 | 7,500 | py | Python | homeassistant/components/fritzbox/config_flow.py | sangwe11/home-assistant-core | 51ebfade5260e6f8c36ffc0e3e1d130a80a21740 | [
"Apache-2.0"
] | 1 | 2021-11-30T07:12:06.000Z | 2021-11-30T07:12:06.000Z | homeassistant/components/fritzbox/config_flow.py | sangwe11/home-assistant-core | 51ebfade5260e6f8c36ffc0e3e1d130a80a21740 | [
"Apache-2.0"
] | 19 | 2021-11-30T03:40:59.000Z | 2022-03-31T06:34:57.000Z | homeassistant/components/fritzbox/config_flow.py | sangwe11/home-assistant-core | 51ebfade5260e6f8c36ffc0e3e1d130a80a21740 | [
"Apache-2.0"
] | null | null | null | """Config flow for AVM FRITZ!SmartHome."""
from __future__ import annotations
from typing import Any
from urllib.parse import urlparse
from pyfritzhome import Fritzhome, LoginError
from requests.exceptions import HTTPError
import voluptuous as vol
from homeassistant.components import ssdp
from homeassistant.componen... | 34.562212 | 88 | 0.626667 |
21631a77d5bda1442a11b6de4f1b20562b13cd33 | 1,399 | py | Python | def_count/test_def_count.py | a-domingu/def_count | b3692912c4ba576d2144b1e3248231cdd4598d62 | [
"MIT"
] | null | null | null | def_count/test_def_count.py | a-domingu/def_count | b3692912c4ba576d2144b1e3248231cdd4598d62 | [
"MIT"
] | null | null | null | def_count/test_def_count.py | a-domingu/def_count | b3692912c4ba576d2144b1e3248231cdd4598d62 | [
"MIT"
] | null | null | null | import os, shutil
import git, pytest
from pyspark import SparkContext
from def_count import get_files, count
def onerror(func, path, exc_info):
"""
Error handler for ``shutil.rmtree``.
From https://stackoverflow.com/a/2656405
If the error is due to an access error (read only file)
it attempts to ... | 25.436364 | 103 | 0.663331 |
cef002cb87099f87fe7c0ee03d47e9c6ae7e7031 | 268 | py | Python | celery/celeryconfig.py | jpnewman/python_ocr_api | 1063a03c273438a8df55d6296b87940bf143aa60 | [
"MIT"
] | null | null | null | celery/celeryconfig.py | jpnewman/python_ocr_api | 1063a03c273438a8df55d6296b87940bf143aa60 | [
"MIT"
] | null | null | null | celery/celeryconfig.py | jpnewman/python_ocr_api | 1063a03c273438a8df55d6296b87940bf143aa60 | [
"MIT"
] | null | null | null | # Celery configuration file
BROKER_URL = 'pyamqp://guest@localhost//'
CELERY_RESULT_BACKEND = 'amqp://'
CELERY_TASK_SERIALIZER = 'json'
CELERY_RESULT_SERIALIZER = 'json'
CELERY_TIMEZONE = 'Europe/London'
CELERY_ENABLE_UTC = True
CELERY_CREATE_MISSING_QUEUES = True
| 22.333333 | 41 | 0.791045 |
81de18220c096da5c06dc5cfb447333a59dcd46d | 18,255 | py | Python | jans-linux-setup/jans_setup/setup_app/installers/jetty.py | duttarnab/jans | b4ae02f9cb60433a44a2b889268525532d82a247 | [
"Apache-2.0"
] | null | null | null | jans-linux-setup/jans_setup/setup_app/installers/jetty.py | duttarnab/jans | b4ae02f9cb60433a44a2b889268525532d82a247 | [
"Apache-2.0"
] | null | null | null | jans-linux-setup/jans_setup/setup_app/installers/jetty.py | duttarnab/jans | b4ae02f9cb60433a44a2b889268525532d82a247 | [
"Apache-2.0"
] | null | null | null | import os
import glob
import re
import shutil
import xml.etree.ElementTree as ET
from setup_app import paths
from setup_app.utils import base
from setup_app.static import AppType, InstallOption
from setup_app.config import Config
from setup_app.utils.setup_utils import SetupUtils
from setup_app.installers.base import ... | 47.048969 | 200 | 0.616653 |
7094bed02cbc481b3bd2fe9697c5d3b75c966246 | 4,940 | py | Python | Ryven/packages/auto_generated/sre_parse/nodes.py | tfroehlich82/Ryven | cb57c91d13949712844a4410a9302c4a90d28dcd | [
"MIT"
] | 2,872 | 2020-07-01T09:06:34.000Z | 2022-03-31T05:52:32.000Z | Ryven/packages/auto_generated/sre_parse/nodes.py | dhf327/Ryven | a11e361528d982a9dd3c489dd536f8b05ffd56e1 | [
"MIT"
] | 59 | 2020-06-28T12:50:50.000Z | 2022-03-27T19:07:54.000Z | Ryven/packages/auto_generated/sre_parse/nodes.py | dhf327/Ryven | a11e361528d982a9dd3c489dd536f8b05ffd56e1 | [
"MIT"
] | 339 | 2020-07-05T04:36:20.000Z | 2022-03-24T07:25:18.000Z |
from NENV import *
import sre_parse
class NodeBase(Node):
pass
class _Class_Escape_Node(NodeBase):
"""
"""
title = '_class_escape'
type_ = 'sre_parse'
init_inputs = [
NodeInputBP(label='source'),
NodeInputBP(label='escape'),
]
init_outputs = [
NodeOutpu... | 22.352941 | 123 | 0.580162 |
87bee7c35786a8a9594726ebc2004116383c2a9e | 1,991 | py | Python | doc/tutorial/modes_solution_1.py | canyon289/Theano-PyMC | 1a9b04bfe480b758ddfa54ba49c88bee3bec419c | [
"BSD-3-Clause"
] | 1 | 2020-12-30T19:12:52.000Z | 2020-12-30T19:12:52.000Z | doc/tutorial/modes_solution_1.py | canyon289/Theano-PyMC | 1a9b04bfe480b758ddfa54ba49c88bee3bec419c | [
"BSD-3-Clause"
] | null | null | null | doc/tutorial/modes_solution_1.py | canyon289/Theano-PyMC | 1a9b04bfe480b758ddfa54ba49c88bee3bec419c | [
"BSD-3-Clause"
] | 1 | 2020-08-15T17:09:10.000Z | 2020-08-15T17:09:10.000Z | #!/usr/bin/env python
# Theano tutorial
# Solution to Exercise in section 'Configuration Settings and Compiling Modes'
import numpy as np
import theano
import theano.tensor as tt
theano.config.floatX = 'float32'
rng = np.random
N = 400
feats = 784
D = (rng.randn(N, feats).astype(theano.config.floatX),
rng.randint(... | 29.716418 | 78 | 0.655952 |
5f09b985c3c53792f2f43a261dcb0f4756e56220 | 2,777 | py | Python | anima/env/mayaEnv/hierarchy_instancer.py | MehmetErer/anima | f92ae599b5a4c181fc8e131a9ccdde537e635303 | [
"MIT"
] | 101 | 2015-02-08T22:20:11.000Z | 2022-03-21T18:56:42.000Z | anima/env/mayaEnv/hierarchy_instancer.py | Khosiyat/anima | f631c08400547f49ac5f1feeb730f22c255eb771 | [
"MIT"
] | 23 | 2016-11-30T08:33:21.000Z | 2021-01-26T12:11:12.000Z | anima/env/mayaEnv/hierarchy_instancer.py | Khosiyat/anima | f631c08400547f49ac5f1feeb730f22c255eb771 | [
"MIT"
] | 27 | 2015-01-03T06:49:45.000Z | 2021-12-28T03:30:54.000Z | # -*- coding: utf-8 -*-
"""
hierarchy_instancer by
v10.6.17
Given a group, it instances the hierarchy. It is written to avoid having
instanced groups in the scene. Thus multi instancing is avoided.
ChangeLog:
----------
10.6.17
- the script now works with single object hierarchies
- after the script finishes it job... | 29.542553 | 88 | 0.647101 |
c802d959a43a9179c38f2265cda3b2d327e9aeac | 550 | py | Python | pbs_util/qdel_name.py | Clyde-fare/pbs_util | 1c1ed93773a9a020f9216056d2ae49cc0cd589d1 | [
"BSD-3-Clause"
] | 1 | 2015-08-24T02:48:00.000Z | 2015-08-24T02:48:00.000Z | pbs_util/qdel_name.py | Clyde-fare/pbs_util | 1c1ed93773a9a020f9216056d2ae49cc0cd589d1 | [
"BSD-3-Clause"
] | null | null | null | pbs_util/qdel_name.py | Clyde-fare/pbs_util | 1c1ed93773a9a020f9216056d2ae49cc0cd589d1 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import os
import sys
import argparse
import pbs
def kill_all_jobs_named(username, name):
for job in pbs.qstat(user=username):
if job.name.find(name) >= 0:
print 'Killing ', job
pbs.qdel(job)
def main(argv=sys.argv[1:]):
parser = argparse.ArgumentParser(... | 21.153846 | 100 | 0.661818 |
2057a56d8f76e815446912e9e5d782798c0af940 | 555 | py | Python | ch2_5/blender01.py | o-kei/design-computing-aij | 954b46fb5f2192ab79fc003a2ca3a259e41dc7a4 | [
"MIT"
] | 11 | 2017-11-11T05:09:45.000Z | 2022-02-14T05:01:22.000Z | ch2_5/blender01.py | o-kei/design-computing-aij | 954b46fb5f2192ab79fc003a2ca3a259e41dc7a4 | [
"MIT"
] | 3 | 2017-02-09T18:20:25.000Z | 2017-11-10T01:32:40.000Z | ch2_5/blender01.py | o-kei/design-computing-aij | 954b46fb5f2192ab79fc003a2ca3a259e41dc7a4 | [
"MIT"
] | 6 | 2016-12-17T03:06:57.000Z | 2021-04-28T15:37:06.000Z | import bpy
bpy.ops.mesh.primitive_circle_add(location=(5.0, 5.0, 0.0))
bpy.ops.mesh.primitive_cone_add(location=(0.0, 5.0, 0.0))
bpy.ops.mesh.primitive_cube_add(location=(-5.0, 5.0, 0.0))
bpy.ops.mesh.primitive_cylinder_add(location=(5.0, 0.0, 0.0))
bpy.ops.mesh.primitive_grid_add(location=(0.0, 0.0, 0.0))
bpy.ops.mes... | 50.454545 | 64 | 0.726126 |
21500a4737178a81728ea036558b7591195c2be2 | 4,058 | py | Python | src/tasks/templatetags/task_extras.py | Stdubic/Track | 853df13178967ab9b5c1918d6d56fa7fe2831b0f | [
"MIT"
] | 1 | 2015-09-14T19:54:56.000Z | 2015-09-14T19:54:56.000Z | src/tasks/templatetags/task_extras.py | Stdubic/Track | 853df13178967ab9b5c1918d6d56fa7fe2831b0f | [
"MIT"
] | null | null | null | src/tasks/templatetags/task_extras.py | Stdubic/Track | 853df13178967ab9b5c1918d6d56fa7fe2831b0f | [
"MIT"
] | null | null | null | '''
Created on Jan 2, 2015
@author: Milos
'''
from django import template
from django.core.urlresolvers import reverse
from django.utils.html import conditional_escape
from django.utils.safestring import mark_safe
register = template.Library()
@register.filter
def commnets(milestone):
"""Filtrira milestone tako... | 30.977099 | 237 | 0.627649 |
dd5223e6d7b077aafc7a9b58df6980df83bc9fc9 | 2,930 | py | Python | gym_arc/envs/rendering.py | MitrofanovDmitry/gym-arc | e39f320d4bb153881f2d36f6bf3f5591a0225e4f | [
"MIT"
] | 1 | 2020-04-04T17:47:03.000Z | 2020-04-04T17:47:03.000Z | gym_arc/envs/rendering.py | dimbasamster/gym-arc | e39f320d4bb153881f2d36f6bf3f5591a0225e4f | [
"MIT"
] | null | null | null | gym_arc/envs/rendering.py | dimbasamster/gym-arc | e39f320d4bb153881f2d36f6bf3f5591a0225e4f | [
"MIT"
] | 1 | 2020-05-07T09:38:24.000Z | 2020-05-07T09:38:24.000Z | from __future__ import division
import os
import six
import sys
if "Apple" in sys.version:
if 'DYLD_FALLBACK_LIBRARY_PATH' in os.environ:
os.environ['DYLD_FALLBACK_LIBRARY_PATH'] += ':/usr/lib'
# (JDS 2016/04/15): avoid bug on Anaconda 2.3.0 / Yosemite
from gym import error
try:
import pyglet... | 34.069767 | 115 | 0.617065 |
e923ab60d86655d07b9c76e73f530b3a88ff92b7 | 2,925 | py | Python | src/recipes/models.py | victormartinez/brewday | 3cb924cb3b08407096bb4b771089e1ecd8d097a4 | [
"Apache-2.0"
] | null | null | null | src/recipes/models.py | victormartinez/brewday | 3cb924cb3b08407096bb4b771089e1ecd8d097a4 | [
"Apache-2.0"
] | 4 | 2020-06-06T01:17:45.000Z | 2021-09-08T02:04:22.000Z | src/recipes/models.py | victormartinez/brewday | 3cb924cb3b08407096bb4b771089e1ecd8d097a4 | [
"Apache-2.0"
] | null | null | null | from random import randint
from django.db import models
from django.contrib.auth import get_user_model
from django.db.models import Q
from django_measurement.models import MeasurementField
from measurement.measures import Volume
from model_utils.models import TimeStampedModel
User = get_user_model()
class Recipe(T... | 39.527027 | 138 | 0.694701 |
00353dbe7ab5ee3f9429770c0b8768f9b5820550 | 48,772 | py | Python | tools/project-creator/Python2.6.6/Lib/subprocess.py | gohopo/nineck.ca | 9601f5ae4c20f8a3ea27b06551556fa5e1eecce3 | [
"MIT"
] | 81 | 2017-03-13T08:24:01.000Z | 2021-04-02T09:48:38.000Z | tools/project-creator/Python2.6.6/Lib/subprocess.py | gohopo/nineck.ca | 9601f5ae4c20f8a3ea27b06551556fa5e1eecce3 | [
"MIT"
] | 6 | 2017-04-30T08:36:55.000Z | 2017-09-22T01:37:28.000Z | tools/project-creator/Python2.6.6/Lib/subprocess.py | gohopo/nineck.ca | 9601f5ae4c20f8a3ea27b06551556fa5e1eecce3 | [
"MIT"
] | 41 | 2017-03-18T14:11:58.000Z | 2021-04-14T05:06:09.000Z | # subprocess - Subprocesses with accessible I/O streams
#
# For more information about this module, see PEP 324.
#
# This module should remain compatible with Python 2.2, see PEP 291.
#
# Copyright (c) 2003-2005 by Peter Astrand <astrand@lysator.liu.se>
#
# Licensed to PSF under a Contributor Agreement.
# See ... | 36.397015 | 129 | 0.551833 |
01195f5971e5a8559ed8a74584eac654976a24c4 | 4,513 | py | Python | jacdac/packet.py | microsoft/jacdac-python | 712ad5559e29065f5eccb5dbfe029c039132df5a | [
"MIT"
] | 1 | 2022-02-15T21:30:36.000Z | 2022-02-15T21:30:36.000Z | jacdac/packet.py | microsoft/jacdac-python | 712ad5559e29065f5eccb5dbfe029c039132df5a | [
"MIT"
] | null | null | null | jacdac/packet.py | microsoft/jacdac-python | 712ad5559e29065f5eccb5dbfe029c039132df5a | [
"MIT"
] | 1 | 2022-02-08T19:32:45.000Z | 2022-02-08T19:32:45.000Z | from typing import Any, Optional
from .pack import PackType, jdpack, jdunpack
from .constants import *
from .system.constants import JD_CMD_COMMAND_NOT_IMPLEMENTED
import jacdac.util as util
class JDPacket:
"""A Jacdac packet
"""
def __init__(self, *, cmd: int = None, size: int = 0, frombytes: bytes = N... | 28.929487 | 131 | 0.62885 |
564a50a2fba0a95f699b65fccdbcd19dc6c8b33e | 26,420 | py | Python | assignments/textureHist.py | Upward-Spiral-Science/claritycontrol | 3da44a35f4eb8746c408ad34e7f433d14c031323 | [
"Apache-2.0"
] | 2 | 2016-02-04T20:32:20.000Z | 2016-02-21T15:44:01.000Z | code/textureHist.py | Upward-Spiral-Science/claritycontrol | 3da44a35f4eb8746c408ad34e7f433d14c031323 | [
"Apache-2.0"
] | 6 | 2016-02-04T20:24:34.000Z | 2016-04-28T10:08:32.000Z | code/textureHist.py | Upward-Spiral-Science/claritycontrol | 3da44a35f4eb8746c408ad34e7f433d14c031323 | [
"Apache-2.0"
] | null | null | null | #IMPORTANT: THE ABOVE PORTION IS A SCRIPT FROM SOLEM'S VISION BLOG
# http://www.janeriksolem.net/2009/06/histogram-equalization-with-python-and.html
import SimpleITK as sitk
import clarity as cl # I wrote this module for easier operations on data
import clarity.resources as rs
import csv,gc # garbage memory collec... | 197.164179 | 880 | 0.094663 |
a4830359bd5426aa1ab19d657d47cac0e2a69ea1 | 5,278 | py | Python | query_builder.py | filchyboy/gol | e2730152c36fb085acb63adde83216a9da083d7b | [
"MIT"
] | null | null | null | query_builder.py | filchyboy/gol | e2730152c36fb085acb63adde83216a9da083d7b | [
"MIT"
] | null | null | null | query_builder.py | filchyboy/gol | e2730152c36fb085acb63adde83216a9da083d7b | [
"MIT"
] | null | null | null | # Query Builder
# length = 625
# for each in range(length):
# print(f"c{each} INT NOT NULL,")
# string = ""
# for each in range(length):
# string = string + "c" + str(each) + ", "
# print(string)
# string2 = ""
# for each in range(length):
# string2 = string2 + "%s, "
# print(string2)
list = ["Date",... | 229.478261 | 4,905 | 0.494127 |
8f3fb9a601667118de857545c8fe43327eb7c0df | 2,475 | py | Python | src/wavestate/control/statespace/dense/test/test_matrix.py | wavestate/wavestate-control | 6c683643d33fa45b5240894a5f89119761edb4e5 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/wavestate/control/statespace/dense/test/test_matrix.py | wavestate/wavestate-control | 6c683643d33fa45b5240894a5f89119761edb4e5 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/wavestate/control/statespace/dense/test/test_matrix.py | wavestate/wavestate-control | 6c683643d33fa45b5240894a5f89119761edb4e5 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: © 2021 Massachusetts Institute of Technology.
# SPDX-FileCopyrightText: © 2021 Lee McCuller <mcculler@mit.edu>
# NOTICE: authors should document their contributions in concisely in NOTICE
# with details inline ... | 22.5 | 76 | 0.57899 |
a991181f0973c484e2411c28c3a9d60867e3d0a0 | 752 | py | Python | src/atcoder/abc185/e/sol_0.py | kagemeka/competitive-programming | c70fe481bcd518f507b885fc9234691d8ce63171 | [
"MIT"
] | 1 | 2021-07-11T03:20:10.000Z | 2021-07-11T03:20:10.000Z | src/atcoder/abc185/e/sol_0.py | kagemeka/competitive-programming | c70fe481bcd518f507b885fc9234691d8ce63171 | [
"MIT"
] | 39 | 2021-07-10T05:21:09.000Z | 2021-12-15T06:10:12.000Z | src/atcoder/abc185/e/sol_0.py | kagemeka/competitive-programming | c70fe481bcd518f507b885fc9234691d8ce63171 | [
"MIT"
] | null | null | null | import typing
import sys
import numpy as np
import numba as nb
@nb.njit((nb.i8[:], nb.i8[:]), cache=True)
def solve(
a: np.ndarray,
b: np.ndarray,
) -> typing.NoReturn:
n, m = a.size, b.size
cost = np.empty((n + 1, m + 1), np.int64)
cost[0] = np.arange(m + 1)
cost[:, 0] = np.arange(n + 1)
for ... | 17.904762 | 43 | 0.510638 |
932deaac5600b45ae9582602e0c024e19b113e29 | 4,168 | py | Python | libs/configs/DOTA1.0/vanilla_csl/cfgs_res50_dota_v40.py | loceyi/CSL_RetinaNet_Tensorflow | c2de594ca1754dfa87f7271aa01052b0d001967a | [
"Apache-2.0"
] | 187 | 2020-03-11T05:41:59.000Z | 2022-03-28T04:44:03.000Z | libs/configs/DOTA1.0/vanilla_csl/cfgs_res50_dota_v40.py | loceyi/CSL_RetinaNet_Tensorflow | c2de594ca1754dfa87f7271aa01052b0d001967a | [
"Apache-2.0"
] | 13 | 2020-07-16T09:00:11.000Z | 2021-11-05T12:15:35.000Z | libs/configs/DOTA1.0/vanilla_csl/cfgs_res50_dota_v40.py | loceyi/CSL_RetinaNet_Tensorflow | c2de594ca1754dfa87f7271aa01052b0d001967a | [
"Apache-2.0"
] | 31 | 2020-03-21T08:11:36.000Z | 2022-03-16T09:18:33.000Z | # -*- coding: utf-8 -*-
from __future__ import division, print_function, absolute_import
import os
import tensorflow as tf
import math
"""
gaussian label, omega=6
This is your result for task 1:
mAP: 0.6251804082959679
ap of each class: plane:0.8788620522554762,
baseball-diamond:0.7108527765896498,
bridge:0.39326363... | 29.560284 | 105 | 0.693618 |
f08b0a385fd5b75f4391c95cc4fe8cfe5b4616db | 7,644 | py | Python | scripts/cut_release_branch.py | netajik/oppia | d3780352d615db7438e010c5aa5eb60588bb7de6 | [
"Apache-2.0"
] | null | null | null | scripts/cut_release_branch.py | netajik/oppia | d3780352d615db7438e010c5aa5eb60588bb7de6 | [
"Apache-2.0"
] | null | null | null | scripts/cut_release_branch.py | netajik/oppia | d3780352d615db7438e010c5aa5eb60588bb7de6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 35.225806 | 80 | 0.677656 |
ea134b7ea08b932242b46c7f2268680dcefa8e33 | 8,895 | py | Python | stumpy/stumped.py | abbasnikbakht/stumpy | 3d0f5e165ade7dfdd4dad19ba5f71026345c551c | [
"BSD-3-Clause"
] | 1 | 2020-08-10T20:22:44.000Z | 2020-08-10T20:22:44.000Z | stumpy/stumped.py | abbasnikbakht/stumpy | 3d0f5e165ade7dfdd4dad19ba5f71026345c551c | [
"BSD-3-Clause"
] | null | null | null | stumpy/stumped.py | abbasnikbakht/stumpy | 3d0f5e165ade7dfdd4dad19ba5f71026345c551c | [
"BSD-3-Clause"
] | null | null | null | # STUMPY
# Copyright 2019 TD Ameritrade. Released under the terms of the 3-Clause BSD license.
# STUMPY is a trademark of TD Ameritrade IP Company, Inc. All rights reserved.
import logging
import numpy as np
from . import core, _stump, _count_diagonal_ndist, config
logger = logging.getLogger(__name__)
def stumped... | 35.866935 | 88 | 0.664306 |
de37d8c5692387b6262a18aaa9eabde15aa1ef86 | 10,251 | py | Python | deep_rl/network/network_heads.py | runxuanjiang/DeepRL | f5c47c52d4db50577fbada17b09d739da3da67cc | [
"MIT"
] | null | null | null | deep_rl/network/network_heads.py | runxuanjiang/DeepRL | f5c47c52d4db50577fbada17b09d739da3da67cc | [
"MIT"
] | null | null | null | deep_rl/network/network_heads.py | runxuanjiang/DeepRL | f5c47c52d4db50577fbada17b09d739da3da67cc | [
"MIT"
] | 1 | 2020-02-09T08:05:48.000Z | 2020-02-09T08:05:48.000Z | #######################################################################
# Copyright (C) 2017 Shangtong Zhang(zhangshangtong.cpp@gmail.com) #
# Permission given to modify the code as long as you keep this #
# declaration at the top #
################################... | 39.125954 | 111 | 0.616135 |
f59d2002e3fc7e53aaed1a8846060d9fcdd55137 | 360 | py | Python | rec_to_nwb/processing/nwb/components/mda/fl_mda_builder.py | jihyunbak/rec_to_nwb | 6e65f8bf0a4faa4d986483ec2442ba19d70c92a9 | [
"Apache-2.0"
] | 1 | 2021-01-20T00:26:30.000Z | 2021-01-20T00:26:30.000Z | rec_to_nwb/processing/nwb/components/mda/fl_mda_builder.py | jihyunbak/rec_to_nwb | 6e65f8bf0a4faa4d986483ec2442ba19d70c92a9 | [
"Apache-2.0"
] | 12 | 2020-11-13T01:36:32.000Z | 2022-01-23T20:35:55.000Z | rec_to_nwb/processing/nwb/components/mda/fl_mda_builder.py | jihyunbak/rec_to_nwb | 6e65f8bf0a4faa4d986483ec2442ba19d70c92a9 | [
"Apache-2.0"
] | 3 | 2020-10-20T06:52:45.000Z | 2021-07-06T23:00:53.000Z | from rec_to_nwb.processing.nwb.components.mda.fl_mda import FlMda
class FlMdaBuilder:
def __init__(self, sampling_rate, conversion):
self.sampling_rate = sampling_rate
self.conversion = conversion
def build(self, electrode_table_region, data):
return FlMda(self.sampling_rate, self.co... | 30 | 87 | 0.755556 |
ea0aae517ca3659ec4db0f252dd94e7b1c34b4cb | 27,065 | py | Python | backend/tests/baserow/contrib/database/field/test_link_row_field_type.py | calvinchengx/baserow | 0340d5abf0a3b48154d41fd05cd2e1e05814cd66 | [
"MIT"
] | null | null | null | backend/tests/baserow/contrib/database/field/test_link_row_field_type.py | calvinchengx/baserow | 0340d5abf0a3b48154d41fd05cd2e1e05814cd66 | [
"MIT"
] | 6 | 2021-04-08T22:03:06.000Z | 2022-01-13T03:38:17.000Z | backend/tests/baserow/contrib/database/field/test_link_row_field_type.py | calvinchengx/baserow | 0340d5abf0a3b48154d41fd05cd2e1e05814cd66 | [
"MIT"
] | null | null | null | import pytest
from rest_framework.status import HTTP_200_OK, HTTP_204_NO_CONTENT, HTTP_400_BAD_REQUEST
from django.shortcuts import reverse
from django.db import connections
from baserow.contrib.database.fields.models import Field
from baserow.contrib.database.fields.handler import FieldHandler
from baserow.contrib.... | 38.942446 | 88 | 0.682505 |
5073ded6297b26ddf4760eed26880cdbcafe22bf | 101,572 | py | Python | salt/config.py | Rafflecopter/salt | 08bbfcd4d9b93351d7d5d25b097e892026b6f1cd | [
"Apache-2.0"
] | null | null | null | salt/config.py | Rafflecopter/salt | 08bbfcd4d9b93351d7d5d25b097e892026b6f1cd | [
"Apache-2.0"
] | null | null | null | salt/config.py | Rafflecopter/salt | 08bbfcd4d9b93351d7d5d25b097e892026b6f1cd | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
All salt configuration loading and defaults should be in this module
'''
from __future__ import absolute_import, generators
# Import python libs
import os
import re
import sys
import glob
import time
import codecs
import logging
from copy import deepcopy
# Import third party libs
import y... | 36.211052 | 122 | 0.614677 |
e444a04b3862c7db65f789882c88609e9e06c1f7 | 239 | py | Python | pacote-download/revisao/fibonacci.py | wiliampianco/aulas_python | 9addd095e6312ad2864d0d76b26fc2a9b1337db6 | [
"MIT"
] | null | null | null | pacote-download/revisao/fibonacci.py | wiliampianco/aulas_python | 9addd095e6312ad2864d0d76b26fc2a9b1337db6 | [
"MIT"
] | null | null | null | pacote-download/revisao/fibonacci.py | wiliampianco/aulas_python | 9addd095e6312ad2864d0d76b26fc2a9b1337db6 | [
"MIT"
] | null | null | null | # SEQUÊNCIA DE FEBONACCI
n = int(input('Quantos termos: '))
cont = 3
t1 = 0
t2 = 1
t3 = t1 + t2
print(f'{t1} - {t2}', end=' - ')
while cont <= n:
t3 = t1 + t2
print(t3, end=' - ')
t1 = t2
t2 = t3
cont += 1
print('FIM')
| 15.933333 | 34 | 0.497908 |
142fdf6dbdca75030666201bb1e39c8d40660fee | 2,135 | py | Python | Homework_8/G_Branch_output/G_Branch_output.py | dimk00z/summer_yandex_algorithmic_course | 36006bd7eea031764369becac84458427e3f848b | [
"MIT"
] | 8 | 2021-06-11T08:27:29.000Z | 2022-01-25T09:20:37.000Z | Homework_8/G_Branch_output/G_Branch_output.py | dimk00z/summer_yandex_algorithmic_course | 36006bd7eea031764369becac84458427e3f848b | [
"MIT"
] | null | null | null | Homework_8/G_Branch_output/G_Branch_output.py | dimk00z/summer_yandex_algorithmic_course | 36006bd7eea031764369becac84458427e3f848b | [
"MIT"
] | 3 | 2021-06-18T15:44:27.000Z | 2021-09-09T18:38:12.000Z | class Node():
def __init__(self, data):
self.data = data
self.left = None
self.right = None
def insert(self, data):
if self.data:
if data < self.data:
if self.left is None:
self.left = Node(data)
else:
... | 26.6875 | 75 | 0.534895 |
e4a48cc3a7ca90f7a32e7950df2fe524edd364fc | 5,657 | py | Python | heron/tools/explorer/src/python/main.py | wromansky/incubator-heron | 9cfc5c4785ba0c14d26dfbbf0fe1d6b477dd38a5 | [
"Apache-2.0"
] | null | null | null | heron/tools/explorer/src/python/main.py | wromansky/incubator-heron | 9cfc5c4785ba0c14d26dfbbf0fe1d6b477dd38a5 | [
"Apache-2.0"
] | null | null | null | heron/tools/explorer/src/python/main.py | wromansky/incubator-heron | 9cfc5c4785ba0c14d26dfbbf0fe1d6b477dd38a5 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- encoding: utf-8 -*-
# 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 Apach... | 27.730392 | 100 | 0.718932 |
f38c2e33b89d23617e78a99c7fa9719213174e69 | 169 | py | Python | snake_api/urls.py | merry-snakes-on-a-plane/api | 0152114d10873de70dfc2d42ba8fa88a7f007a83 | [
"MIT"
] | null | null | null | snake_api/urls.py | merry-snakes-on-a-plane/api | 0152114d10873de70dfc2d42ba8fa88a7f007a83 | [
"MIT"
] | 6 | 2020-02-12T02:31:11.000Z | 2022-02-10T09:03:39.000Z | snake_api/urls.py | merry-snakes-on-a-plane/api | 0152114d10873de70dfc2d42ba8fa88a7f007a83 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import include, path
urlpatterns = [
path('admin/', admin.site.urls),
path('api/', include('snake_api.urls')),
]
| 21.125 | 42 | 0.704142 |
f44b02aa11cef7df859ca2cafc8504abacf857bf | 915 | py | Python | projects/MyAssembler/symtbl.py | HideyukiFUKUHARA/nand2tetris | e6d1b314ca59c86d948038f96d0994aae284acbe | [
"MIT"
] | null | null | null | projects/MyAssembler/symtbl.py | HideyukiFUKUHARA/nand2tetris | e6d1b314ca59c86d948038f96d0994aae284acbe | [
"MIT"
] | null | null | null | projects/MyAssembler/symtbl.py | HideyukiFUKUHARA/nand2tetris | e6d1b314ca59c86d948038f96d0994aae284acbe | [
"MIT"
] | null | null | null | #!/usr/bin/env python
class symtbl():
def __init__(self):
self.dict = {}
self.dict.update({
'R0':0, 'R1':1, 'R2':2, 'R3':3, 'R4':4, 'R5':5, 'R6':6, 'R7':7,
'R8':8, 'R9':9, 'R10':10, 'R11':11, 'R12':12, 'R13':13, 'R14':14, 'R15':15,
'SP':0, 'LCL':1, 'ARG':2, 'THI... | 26.911765 | 89 | 0.514754 |
f18be0553f5b7223d7b090b3c804a70c65de834c | 223 | py | Python | python/ray/experimental/test/test_opencl.py | BnJam/ray | c32658ff7550f8672923ca6d824d85c5efd82a5b | [
"Apache-2.0"
] | null | null | null | python/ray/experimental/test/test_opencl.py | BnJam/ray | c32658ff7550f8672923ca6d824d85c5efd82a5b | [
"Apache-2.0"
] | null | null | null | python/ray/experimental/test/test_opencl.py | BnJam/ray | c32658ff7550f8672923ca6d824d85c5efd82a5b | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from ray.experimental.opencl import OpenCL
c = OpenCL()
# test if opencl drivers are available
c.get_gpu_ids()
| 20.272727 | 42 | 0.825112 |
26a340a47d17aa01178948266a1b6f0805db9b66 | 2,269 | py | Python | setup.py | unmonoqueteclea/djangorestframework-simplejwt | 5fe64beee8e46ccb408265d3dc8499f4b0608f00 | [
"MIT"
] | null | null | null | setup.py | unmonoqueteclea/djangorestframework-simplejwt | 5fe64beee8e46ccb408265d3dc8499f4b0608f00 | [
"MIT"
] | null | null | null | setup.py | unmonoqueteclea/djangorestframework-simplejwt | 5fe64beee8e46ccb408265d3dc8499f4b0608f00 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from pathlib import Path
from setuptools import (
setup,
find_packages,
)
extras_require = {
'test': [
'cryptography',
'pytest-cov',
'pytest-django',
'pytest-xdist',
'pytest',
'tox',
],
'lint': [
'flake8',
'pep8',... | 27.011905 | 91 | 0.568532 |
482dcc6f11526bb49296761ac855f96e500d059b | 1,078 | py | Python | app/config.py | dbaelipro/coordination-dispo-lits | d252df23f570f6a83a5c6af36056ed5f2cf02fe0 | [
"MIT"
] | 2 | 2020-05-10T16:06:17.000Z | 2020-05-10T16:10:03.000Z | app/config.py | dbaelipro/coordination-dispo-lits | d252df23f570f6a83a5c6af36056ed5f2cf02fe0 | [
"MIT"
] | 8 | 2020-04-07T16:36:51.000Z | 2020-04-26T10:34:26.000Z | app/config.py | dbaelipro/coordination-dispo-lits | d252df23f570f6a83a5c6af36056ed5f2cf02fe0 | [
"MIT"
] | 4 | 2020-04-18T22:53:33.000Z | 2021-06-04T09:31:13.000Z | import os, logging
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
DATA_DIR = os.path.join(BASE_DIR, "data")
DEBUG = os.getenv("ENVIRONEMENT") == "DEV"
HOST = os.getenv('HOST', '0.0.0.0')
PORT = int(os.getenv('PORT', '5000'))
SQLALCHEMY_RECORD_QUERIES = False
SQLALCHEMY_TRACK_MODIFICATIONS = False
JWT_SECRET_K... | 31.705882 | 92 | 0.686456 |
5889b8c4ad334ed23b411641817c8b9d5f40bae4 | 534 | py | Python | game/ghdialogue/ghoffers.py | fmunoz-geo/gearhead-caramel | 315835481d543420826439245be01460fe6dd81b | [
"Apache-2.0"
] | 74 | 2015-03-09T00:33:09.000Z | 2022-02-25T20:28:27.000Z | game/ghdialogue/ghoffers.py | fmunoz-geo/gearhead-caramel | 315835481d543420826439245be01460fe6dd81b | [
"Apache-2.0"
] | 108 | 2017-12-30T20:26:12.000Z | 2021-01-16T12:37:00.000Z | game/ghdialogue/ghoffers.py | CartoonFan/gearhead-caramel | 61995f382923695176ab7a65253f42e849e0c4d7 | [
"Apache-2.0"
] | 61 | 2018-03-03T09:55:31.000Z | 2022-03-18T17:28:33.000Z | from pbge.dialogue import Offer,Reply,Cue,ContextTag
from . import context
HELLO = Offer('[HELLO_PLUS]',context=ContextTag([context.HELLO,]))
BADHELLO = Offer('[HELLO_UNFAV]',context=ContextTag([context.UNFAVORABLE_HELLO,]))
ATTACK = Offer('[ATTACK]',context=ContextTag([context.ATTACK,]))
CHALLENGE = Offer('[CHALL... | 29.666667 | 84 | 0.745318 |
affc9ad01aae70da6f3a447826f380c1bd84ce38 | 12,642 | py | Python | grid_search_loop/tr5000_rect_N100/ESNtrainCV.py | malfarasplux/pnet2019 | ae34d5c84fb4d3985634b237a14dfb69e98b8339 | [
"BSD-3-Clause"
] | 1 | 2020-11-29T12:42:30.000Z | 2020-11-29T12:42:30.000Z | grid_search_loop/tr5000_rect_N100/ESNtrainCV.py | malfarasplux/pnet2019 | ae34d5c84fb4d3985634b237a14dfb69e98b8339 | [
"BSD-3-Clause"
] | null | null | null | grid_search_loop/tr5000_rect_N100/ESNtrainCV.py | malfarasplux/pnet2019 | ae34d5c84fb4d3985634b237a14dfb69e98b8339 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
## Config
# biased_regress = True
# normal_equations = True
dataset = "training_1"
path = "../" + dataset +"/"
kfold_split = 10
nan_to_zero = True
mm = False
std = False
numpy_load = True
nanfill = True
## ESN parameters
N_def = [100] ... | 31.763819 | 154 | 0.596583 |
9a44590935dd97ec0820a713a0018bf495ce2e49 | 1,329 | py | Python | pytorchtools/ptschedulers/SchedulerSaveNetModule.py | Criscraft/pytorch_classification | d5772963e55ce218ae4719fb7f85604263aab65f | [
"MIT"
] | null | null | null | pytorchtools/ptschedulers/SchedulerSaveNetModule.py | Criscraft/pytorch_classification | d5772963e55ce218ae4719fb7f85604263aab65f | [
"MIT"
] | null | null | null | pytorchtools/ptschedulers/SchedulerSaveNetModule.py | Criscraft/pytorch_classification | d5772963e55ce218ae4719fb7f85604263aab65f | [
"MIT"
] | null | null | null | import os
from ptschedulers.SchedulerBaseModule import SchedulerBaseModule
class SchedulerSaveNetModule(SchedulerBaseModule):
def __init__(self,
active_epochs=set(),
active_at_end=True,
network='network_main',
filename_base='model'):
super().__init__()
self.act... | 34.076923 | 115 | 0.650865 |
152bc5c4a6dd53d90e5c40e10497d6b0c18b95c8 | 599 | py | Python | code.py | IwanHoogland/Automated-Diplomacy | 55e7310c2447a44f01b7220ce6e998bcf50d9de9 | [
"MIT"
] | null | null | null | code.py | IwanHoogland/Automated-Diplomacy | 55e7310c2447a44f01b7220ce6e998bcf50d9de9 | [
"MIT"
] | null | null | null | code.py | IwanHoogland/Automated-Diplomacy | 55e7310c2447a44f01b7220ce6e998bcf50d9de9 | [
"MIT"
] | null | null | null | import random
import math
class Board:
def __init__(self):
pass
#add the state of the board at the start
def update_board(self):
pass
# Get the orders
# Do all the stuff here to update the board
# print the new map and a list of order results
class Order
#w... | 17.114286 | 55 | 0.652755 |
e858d841da2f30dafcbb4832bf496b6d29d991fc | 629 | py | Python | clinlog/logging/helper.py | salpreh/clinlog | 7a63632e4be47ee3c55a2fc602d0f29ad9156fd4 | [
"MIT"
] | null | null | null | clinlog/logging/helper.py | salpreh/clinlog | 7a63632e4be47ee3c55a2fc602d0f29ad9156fd4 | [
"MIT"
] | null | null | null | clinlog/logging/helper.py | salpreh/clinlog | 7a63632e4be47ee3c55a2fc602d0f29ad9156fd4 | [
"MIT"
] | null | null | null | import logging
from .clinlog_handler import ClinlogHandler
LOGGER_NAME = 'clinlog'
def get_logger(log_level=None):
create_logger(log_level)
return logging.getLogger(LOGGER_NAME)
def create_logger(log_level=None):
if not log_level:
log_level = logging.DEBUG
logger = logging.getLogger(LOGG... | 17.971429 | 47 | 0.712242 |
dcc1865fd3304c24e7fc8d25465bbff0cee13f52 | 846 | py | Python | setup.py | DtjiAppDev/LEVEL_UP_RPG | 74cf8b098b4101003bfb0ad81b00e9d5984722fd | [
"MIT"
] | null | null | null | setup.py | DtjiAppDev/LEVEL_UP_RPG | 74cf8b098b4101003bfb0ad81b00e9d5984722fd | [
"MIT"
] | null | null | null | setup.py | DtjiAppDev/LEVEL_UP_RPG | 74cf8b098b4101003bfb0ad81b00e9d5984722fd | [
"MIT"
] | null | null | null | from setuptools import setup
def readme():
with open("README.md", "r") as fh:
long_description = fh.read()
return long_description
setup(
name='Level_Up_RPG',
version='1',
packages=['Level_Up_RPG'],
url='https://github.com/DtjiAppDev/LEVEL_UP_RPG',
license='MIT',
author='... | 25.636364 | 83 | 0.64539 |
660e905df6d069bb6276abb419d10589e51322af | 2,795 | py | Python | 1._metis_models_and_data_2019-12-16b/METIS source code/Indicators/decorators/Transmission Capa (Power).py | tamas-borbath/METIS | cf3dc0f0f96ccb6ad72ddf15ba7e31ddc6339036 | [
"CC-BY-4.0"
] | 1 | 2021-12-07T09:05:48.000Z | 2021-12-07T09:05:48.000Z | 1._metis_models_and_data_2019-12-16b/METIS source code/Indicators/decorators/Transmission Capa (Power).py | tamas-borbath/METIS_data_and_scripts | cf3dc0f0f96ccb6ad72ddf15ba7e31ddc6339036 | [
"CC-BY-4.0"
] | null | null | null | 1._metis_models_and_data_2019-12-16b/METIS source code/Indicators/decorators/Transmission Capa (Power).py | tamas-borbath/METIS_data_and_scripts | cf3dc0f0f96ccb6ad72ddf15ba7e31ddc6339036 | [
"CC-BY-4.0"
] | null | null | null | ########################################################
# Copyright (c) 2015-2017 by European Commission. #
# All Rights Reserved. #
########################################################
"""
This view shows, for each power interconnection and each direction, the corresponding ... | 39.366197 | 125 | 0.753131 |
805a6a7f36fc3fe1121e7ea9c2bdab93931137e1 | 1,819 | py | Python | rovers/fastdownward/experiments/issue627/v2.py | mehrdadzakershahrak/Online-Explanation-Generation | e41ad9b5a390abdaf271562a56105c191e33b74d | [
"MIT"
] | 1 | 2021-09-09T13:03:02.000Z | 2021-09-09T13:03:02.000Z | rovers/fastdownward/experiments/issue627/v2.py | mehrdadzakershahrak/Online-Explanation-Generation | e41ad9b5a390abdaf271562a56105c191e33b74d | [
"MIT"
] | null | null | null | rovers/fastdownward/experiments/issue627/v2.py | mehrdadzakershahrak/Online-Explanation-Generation | e41ad9b5a390abdaf271562a56105c191e33b74d | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# -*- coding: utf-8 -*-
from downward import suites
from common_setup import IssueConfig, IssueExperiment
from relativescatter import RelativeScatterPlotReport
def main(revisions=None):
suite = suites.suite_optimal_with_ipc11()
configs = {
IssueConfig('astar-blind', ['--search... | 33.072727 | 106 | 0.57669 |
f4f48e1f05e2c0fe5536e64b7a1ec29f1395e8ce | 4,312 | py | Python | benchmark/startQiskit_QC2561.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_QC2561.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_QC2561.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=4
# total number=35
import cirq
import qiskit
from qiskit import IBMQ
from qiskit.providers.ibmq import least_busy
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import FakeVigo
from ma... | 35.344262 | 165 | 0.65654 |
d0743689458373d774e94eaf64f69605b3a02652 | 6,764 | py | Python | mitty/lib/reads.py | latticelabs/Mitty-deprecated- | bf192600233daea8a42a1f995c60b1e883cbaaba | [
"Apache-2.0"
] | 1 | 2015-10-21T23:43:34.000Z | 2015-10-21T23:43:34.000Z | mitty/lib/reads.py | latticelabs/Mitty | bf192600233daea8a42a1f995c60b1e883cbaaba | [
"Apache-2.0"
] | null | null | null | mitty/lib/reads.py | latticelabs/Mitty | bf192600233daea8a42a1f995c60b1e883cbaaba | [
"Apache-2.0"
] | null | null | null | """Infrastructure to handle reads"""
import re
import numpy as np
def expand_sequence(ref_seq, ml, chrom, copy):
"""Apply the variants in the list and return the consensus sequence
:param ref_seq: reference sequence
:param ml: master list of variants
:param chrom: [(no, het) ...] list of variants po... | 45.395973 | 161 | 0.610585 |
d520eabe3c1182f87ebdc5e2b6b4c9ec355d5061 | 6,806 | py | Python | frbhostdm.py | NihanPol/DM_IGM | 7b44aa0281030081b4340e5146e8c31503692846 | [
"BSD-3-Clause"
] | 1 | 2019-03-21T05:54:14.000Z | 2019-03-21T05:54:14.000Z | frbhostdm.py | NihanPol/DM_IGM | 7b44aa0281030081b4340e5146e8c31503692846 | [
"BSD-3-Clause"
] | null | null | null | frbhostdm.py | NihanPol/DM_IGM | 7b44aa0281030081b4340e5146e8c31503692846 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
import numpy as np
import glob
import pdf
PDF = pdf.PDF
import scipy.interpolate as interpolate
import NE2001
import argparse
import sys
import pyymw16
# ==================================================
# From a pdf, get the mode and innter 95% confidence intervals
# ============================... | 35.821053 | 200 | 0.563767 |
8c512511b3c247d66d35a4641789d2cd07ba4a00 | 83,892 | py | Python | tests/block_tools.py | MinerGreggy/taco-blockchain | 4f8e9c9d7df2181c81b247e35bdb5ad4ff99b19d | [
"Apache-2.0"
] | 18 | 2021-07-14T09:56:37.000Z | 2022-02-09T04:32:58.000Z | tests/block_tools.py | MinerGreggy/taco-blockchain | 4f8e9c9d7df2181c81b247e35bdb5ad4ff99b19d | [
"Apache-2.0"
] | 9 | 2021-07-14T15:48:28.000Z | 2021-10-10T02:32:59.000Z | tests/block_tools.py | MinerGreggy/taco-blockchain | 4f8e9c9d7df2181c81b247e35bdb5ad4ff99b19d | [
"Apache-2.0"
] | 10 | 2021-07-18T03:22:43.000Z | 2022-03-15T08:40:06.000Z | import asyncio
import copy
import logging
import os
import random
import shutil
import ssl
import sys
import tempfile
import time
from argparse import Namespace
from dataclasses import replace
from pathlib import Path
from typing import Callable, Dict, List, Optional, Tuple, Any
from blspy import AugSchemeMPL, G1Eleme... | 43.243299 | 120 | 0.606792 |
6ef34b184eee84b9f9632a02de602c87020d103c | 2,764 | py | Python | index.py | liujiage/DevOps | 87e7343f1a574bb05fe7915ba05d8757e6913779 | [
"Apache-2.0"
] | 3 | 2022-01-11T14:03:19.000Z | 2022-01-11T14:25:24.000Z | index.py | liujiage/DevOps | 87e7343f1a574bb05fe7915ba05d8757e6913779 | [
"Apache-2.0"
] | null | null | null | index.py | liujiage/DevOps | 87e7343f1a574bb05fe7915ba05d8757e6913779 | [
"Apache-2.0"
] | null | null | null | from flask import Flask, render_template, request, session
from flask_socketio import SocketIO, emit
import logging
from view.DeployView import DeployView as dv
from view.HistoryView import HistoryView as hv
from view.AuthenticationView import AuthenticationView as auth
logging.basicConfig(level=logging.DEBUG)
app = F... | 22.842975 | 66 | 0.708755 |
9df62591ae02e2a1ed36bad46726e1cf8c2c0c3b | 809 | py | Python | chapter0/find-perm.py | MubashirullahD/cracking-the-coding-interview | f9595886967e7c63cec19028239e4289e9cd1f9e | [
"MIT"
] | 1 | 2021-12-01T13:26:10.000Z | 2021-12-01T13:26:10.000Z | chapter0/find-perm.py | MubashirullahD/cracking-the-coding-interview | f9595886967e7c63cec19028239e4289e9cd1f9e | [
"MIT"
] | null | null | null | chapter0/find-perm.py | MubashirullahD/cracking-the-coding-interview | f9595886967e7c63cec19028239e4289e9cd1f9e | [
"MIT"
] | null | null | null | """
Example: Given a smaller string a and a bigger string b, design an algorithm to find all permutations
of the shorter string within the longer one. Print the location of each permutation.
"""
from collections import Counter
sstring = 'abbc'
lstring = "cbabadcbbabbcbabaabccbabc"
ssCounter = Counter(sstring)
for ... | 27.896552 | 102 | 0.690977 |
9bfcb7d83d5a26eaef421e92fc9ed48c9f8be4fb | 1,832 | py | Python | setup.py | fish2000/pilkit | cf60f3cbc28a15db46acfda1e61a704efad31c23 | [
"BSD-3-Clause"
] | null | null | null | setup.py | fish2000/pilkit | cf60f3cbc28a15db46acfda1e61a704efad31c23 | [
"BSD-3-Clause"
] | null | null | null | setup.py | fish2000/pilkit | cf60f3cbc28a15db46acfda1e61a704efad31c23 | [
"BSD-3-Clause"
] | null | null | null | #/usr/bin/env python
import codecs
import os
from setuptools import setup, find_packages
# Workaround for multiprocessing/nose issue. See http://bugs.python.org/msg170215
try:
import multiprocessing
except ImportError:
pass
read = lambda filepath: codecs.open(filepath, 'r', 'utf-8').read()
# Load package met... | 32.140351 | 91 | 0.643559 |
55fcb967df1dc0ba5cba0eefec39c83358e12c26 | 383 | py | Python | auth-api/migrations/versions/a930f64458f6_.py | karthik-aot/sbc-auth | f24028040fda67d4f10ae9b608b8832c15d2a8ad | [
"Apache-2.0"
] | 11 | 2019-09-26T06:58:25.000Z | 2022-01-26T06:19:39.000Z | auth-api/migrations/versions/a930f64458f6_.py | karthik-aot/sbc-auth | f24028040fda67d4f10ae9b608b8832c15d2a8ad | [
"Apache-2.0"
] | 1,622 | 2019-05-07T21:08:38.000Z | 2022-03-28T17:07:15.000Z | auth-api/migrations/versions/a930f64458f6_.py | karthik-aot/sbc-auth | f24028040fda67d4f10ae9b608b8832c15d2a8ad | [
"Apache-2.0"
] | 98 | 2019-03-01T21:36:15.000Z | 2021-12-01T22:11:25.000Z | """empty message
Revision ID: a930f64458f6
Revises: 8111f90828de, 3939342073ea
Create Date: 2020-03-09 19:01:44.023061
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = 'a930f64458f6'
down_revision = ('8111f90828de', '3939342073ea')
branch_labels = None
depends_o... | 15.32 | 48 | 0.741514 |
06e8a6c082ae7bb075b7482bd5044ec7d2d480ec | 604 | py | Python | py/py_0381_(prime-k)_factorial.py | lcsm29/project-euler | fab794ece5aa7a11fc7c2177f26250f40a5b1447 | [
"MIT"
] | null | null | null | py/py_0381_(prime-k)_factorial.py | lcsm29/project-euler | fab794ece5aa7a11fc7c2177f26250f40a5b1447 | [
"MIT"
] | null | null | null | py/py_0381_(prime-k)_factorial.py | lcsm29/project-euler | fab794ece5aa7a11fc7c2177f26250f40a5b1447 | [
"MIT"
] | null | null | null | # Solution of;
# Project Euler Problem 381: (prime-k) factorial
# https://projecteuler.net/problem=381
#
# For a prime p let S(p) = (∑ (p-k)!) mod(p) for 1 ≤ k ≤ 5. For example, if
# p=7,(7-1)! + (7-2)! + (7-3)! + (7-4)! + (7-5)! = 6! + 5! + 4! + 3! + 2! =
# 720+120+24+6+2 = 872. As 872 mod(7) = 4, S(7) = 4. It can ... | 26.26087 | 79 | 0.549669 |
9e6e24acb8ed3d5635febb77f316868d1d312970 | 20,373 | py | Python | InvenTree/InvenTree/helpers.py | rkalman/InvenTree | 8ceff063f86394cd1be9f5c57e6302b79782a526 | [
"MIT"
] | null | null | null | InvenTree/InvenTree/helpers.py | rkalman/InvenTree | 8ceff063f86394cd1be9f5c57e6302b79782a526 | [
"MIT"
] | null | null | null | InvenTree/InvenTree/helpers.py | rkalman/InvenTree | 8ceff063f86394cd1be9f5c57e6302b79782a526 | [
"MIT"
] | null | null | null | """
Provides helper functions used throughout the InvenTree project
"""
import io
import re
import json
import os.path
from PIL import Image
from decimal import Decimal, InvalidOperation
from wsgiref.util import FileWrapper
from django.http import StreamingHttpResponse
from django.core.exceptions import ValidationEr... | 25.985969 | 145 | 0.614048 |
8a19e4ca4c2dccf606eee42b827bac1c41aa214e | 6,111 | py | Python | logtools/_sumstat.py | AlainLich/logtools | 584e575d25f0ebcd7a51cc6d5aefb530f80f6d22 | [
"Apache-2.0"
] | 2 | 2021-06-08T21:48:18.000Z | 2022-03-09T05:50:13.000Z | logtools/_sumstat.py | AlainLich/logtools | 584e575d25f0ebcd7a51cc6d5aefb530f80f6d22 | [
"Apache-2.0"
] | null | null | null | logtools/_sumstat.py | AlainLich/logtools | 584e575d25f0ebcd7a51cc6d5aefb530f80f6d22 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# 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, so... | 33.032432 | 119 | 0.595811 |
01c268b39d087816d8b38c7538765a19cd9dc0e4 | 466 | py | Python | applications/popart/conformer_asr/logging_util.py | payoto/graphcore_examples | 46d2b7687b829778369fc6328170a7b14761e5c6 | [
"MIT"
] | 260 | 2019-11-18T01:50:00.000Z | 2022-03-28T23:08:53.000Z | applications/popart/conformer_asr/logging_util.py | payoto/graphcore_examples | 46d2b7687b829778369fc6328170a7b14761e5c6 | [
"MIT"
] | 27 | 2020-01-28T23:07:50.000Z | 2022-02-14T15:37:06.000Z | applications/popart/conformer_asr/logging_util.py | payoto/graphcore_examples | 46d2b7687b829778369fc6328170a7b14761e5c6 | [
"MIT"
] | 56 | 2019-11-18T02:13:12.000Z | 2022-02-28T14:36:09.000Z | # Copyright (c) 2021 Graphcore Ltd. All rights reserved.
import logging
import sys
def get_basic_logger(name):
lh = logging.StreamHandler(sys.stdout)
lh.setLevel(logging.INFO)
logging.basicConfig(format='%(asctime)s %(module)s - %(funcName)s: %(message)s',
datefmt='%Y-%m-%... | 31.066667 | 85 | 0.60515 |
4c2850d4a979f65195a195bf2ddc134dbfa94050 | 819 | py | Python | drf_generators/templates/modelviewset.py | quangvinh1225/drf-generators | 4f096c89fe768939c8fe838ac0c29b24c6d11f01 | [
"MIT"
] | null | null | null | drf_generators/templates/modelviewset.py | quangvinh1225/drf-generators | 4f096c89fe768939c8fe838ac0c29b24c6d11f01 | [
"MIT"
] | null | null | null | drf_generators/templates/modelviewset.py | quangvinh1225/drf-generators | 4f096c89fe768939c8fe838ac0c29b24c6d11f01 | [
"MIT"
] | null | null | null |
__all__ = ['MODEL_URL', 'MODEL_VIEW']
MODEL_URL = """from rest_framework.routers import SimpleRouter
from {{ app }} import views
router = SimpleRouter()
{% for model in models %}
router.register(r'{{ model | lower }}', views.{{ model }}ViewSet){% endfor %}
urlpatterns = router.urls
"""
MODEL_VIEW = """from rest... | 26.419355 | 77 | 0.687424 |
c56f7fddc4a11b4cf73a3f073901c218e59f11de | 1,073 | py | Python | mypoll_site/polls/migrations/0001_initial.py | theekeen/pollsite_project | 82a058202372c56cbef780a94954ef5f87695378 | [
"MIT"
] | null | null | null | mypoll_site/polls/migrations/0001_initial.py | theekeen/pollsite_project | 82a058202372c56cbef780a94954ef5f87695378 | [
"MIT"
] | null | null | null | mypoll_site/polls/migrations/0001_initial.py | theekeen/pollsite_project | 82a058202372c56cbef780a94954ef5f87695378 | [
"MIT"
] | null | null | null | # Generated by Django 2.2 on 2019-07-12 10:38
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Question',
fields=[
... | 32.515152 | 114 | 0.586207 |
85711a6058dc7fbeeefc9362cef22ccd92a48905 | 3,121 | py | Python | latex-knapsack/code/knapsack_test.py | shevkunov/workout | d36b84f4341d36a6c45553a1c7fa7d147370fba8 | [
"BSD-3-Clause"
] | null | null | null | latex-knapsack/code/knapsack_test.py | shevkunov/workout | d36b84f4341d36a6c45553a1c7fa7d147370fba8 | [
"BSD-3-Clause"
] | null | null | null | latex-knapsack/code/knapsack_test.py | shevkunov/workout | d36b84f4341d36a6c45553a1c7fa7d147370fba8 | [
"BSD-3-Clause"
] | null | null | null | from knapsack import *
def knapsack_stress_test_nw(n, w, eps=None, maxcost=10, mincost=1,
algo=knapsack_pseudopolynomial_nc,
checker=knapsack_brutal,
cluster_test=False,
float_numbers=False,
... | 37.154762 | 69 | 0.441846 |
f71db52a6273627b9fdb578a9b437983757a0692 | 8,369 | py | Python | src/sagemaker_tensorflow_container/training.py | Freakawho/sagemaker-tensorflow-training-toolkit-master | f37c7d85600beb5461788db8c471b66c25beff8f | [
"Apache-2.0"
] | 156 | 2018-07-10T13:37:16.000Z | 2020-06-04T13:40:17.000Z | src/sagemaker_tensorflow_container/training.py | Freakawho/sagemaker-tensorflow-training-toolkit-master | f37c7d85600beb5461788db8c471b66c25beff8f | [
"Apache-2.0"
] | 166 | 2018-07-09T09:03:26.000Z | 2020-06-10T23:27:52.000Z | src/sagemaker_tensorflow_container/training.py | Freakawho/sagemaker-tensorflow-training-toolkit-master | f37c7d85600beb5461788db8c471b66c25beff8f | [
"Apache-2.0"
] | 129 | 2018-07-04T20:00:29.000Z | 2020-06-10T02:47:54.000Z | # Copyright 2018-2020 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the 'license' fil... | 36.229437 | 118 | 0.674394 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.