hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
74b27a6a3478adfb0a93e36d16bd9290d64be2dc | 3,018 | py | Python | python/tests/test_tree.py | ManarAbdelkarim/data-structures-and-algorithms | ece37d03c5931d2d6b0ce2d677635fb718944c38 | [
"MIT"
] | null | null | null | python/tests/test_tree.py | ManarAbdelkarim/data-structures-and-algorithms | ece37d03c5931d2d6b0ce2d677635fb718944c38 | [
"MIT"
] | 1 | 2021-05-06T19:41:25.000Z | 2021-05-06T19:41:25.000Z | python/tests/test_tree.py | ManarAbdelkarim/data-structures-and-algorithms | ece37d03c5931d2d6b0ce2d677635fb718944c38 | [
"MIT"
] | 2 | 2021-06-06T18:02:58.000Z | 2021-08-15T18:56:26.000Z | # from challenges.data_structure.tree.tree import *
# import pytest
# def test_init_empty():
# binary_tree = Binary_tree()
# actual = binary_tree.__str__()
# expected = 'None'
# assert actual == expected
# def test_init_one():
# node1 = TNode(1)
# binary_tree = Binary_tree(node1)
# actual = binary_t... | 26.017241 | 97 | 0.628893 |
74b2adfc3f96bb1c4e74bb84e692f73bd59cfca7 | 961 | py | Python | CodeEval/Hard/String Searching/string_searching.py | Goyatuzo/HackerRank | ad836faa7e8ecfe751a72027e1312ae3ee19f4ca | [
"MIT"
] | null | null | null | CodeEval/Hard/String Searching/string_searching.py | Goyatuzo/HackerRank | ad836faa7e8ecfe751a72027e1312ae3ee19f4ca | [
"MIT"
] | 4 | 2016-03-19T05:13:29.000Z | 2021-05-10T16:42:42.000Z | CodeEval/Hard/String Searching/string_searching.py | Goyatuzo/Challenges | ad836faa7e8ecfe751a72027e1312ae3ee19f4ca | [
"MIT"
] | null | null | null | def search_for_substring(input_string):
# Break the string into tokens.
tokens = input_string.split(',')
word = tokens[0]
substring = tokens[1]
sub_idx = 0
asterisk = False
for char in word:
# If the index of the substring is the entire length, the substring exists so return true.... | 33.137931 | 98 | 0.580645 |
74b2be300db949926a2d97f92a33dd583f166877 | 34,122 | py | Python | applications/popart/bert/bert_data/squad_utils.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | 2 | 2020-04-07T23:46:17.000Z | 2021-12-05T10:29:34.000Z | applications/popart/bert/bert_data/squad_utils.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | 5 | 2020-01-28T23:13:33.000Z | 2022-02-10T00:34:57.000Z | applications/popart/bert/bert_data/squad_utils.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | 1 | 2020-04-07T23:46:29.000Z | 2020-04-07T23:46:29.000Z |
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. 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 co... | 41.918919 | 142 | 0.590587 |
74b2c7e63e2f7179a25d97ff2dcbeddbc52fc692 | 6,833 | py | Python | Functions/XRR/SphereAtInterface.py | nayanbera/XModFit | d98aceb9b74418ef7ef8bc076e0b405019e8867e | [
"MIT"
] | null | null | null | Functions/XRR/SphereAtInterface.py | nayanbera/XModFit | d98aceb9b74418ef7ef8bc076e0b405019e8867e | [
"MIT"
] | null | null | null | Functions/XRR/SphereAtInterface.py | nayanbera/XModFit | d98aceb9b74418ef7ef8bc076e0b405019e8867e | [
"MIT"
] | null | null | null | ####Please do not remove lines below####
from lmfit import Parameters
import numpy as np
import sys
import os
sys.path.append(os.path.abspath('.'))
sys.path.append(os.path.abspath('./Functions'))
sys.path.append(os.path.abspath('./Fortran_routines/'))
from functools import lru_cache
####Please do not remove lines above... | 40.431953 | 136 | 0.590224 |
74b2f68bcafd5be7ce67a3fd89c50b4e34968553 | 1,826 | py | Python | rlkit/torch/dqn/double_dqn.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2020-10-23T14:40:09.000Z | 2020-10-23T14:40:09.000Z | rlkit/torch/dqn/double_dqn.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | rlkit/torch/dqn/double_dqn.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2021-05-27T20:38:45.000Z | 2021-05-27T20:38:45.000Z | import numpy as np
import torch
import rlkit.torch.pytorch_util as ptu
from rlkit.misc.eval_util import create_stats_ordered_dict
from rlkit.torch.dqn.dqn import DQNTrainer
class DoubleDQNTrainer(DQNTrainer):
def train_from_torch(self, batch):
rewards = batch['rewards']
terminals = batch['termina... | 30.433333 | 79 | 0.602957 |
74b306f14b3e620bc484e5a22ad944568e5aa5cf | 2,534 | py | Python | qnarre/prep/tokens/fast/reformer.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/prep/tokens/fast/reformer.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/prep/tokens/fast/reformer.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | # Copyright 2022 Quantapix 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 l... | 31.675 | 137 | 0.66101 |
74b307bcd0acbe800679fbbd7d3e4aceaa46b3bc | 1,155 | py | Python | cursoemvideoPy/Mundo3/ex094.py | BrCarlini/exPython | 3bed986e5bfa5eae191b6b18306448926aed48fd | [
"MIT"
] | null | null | null | cursoemvideoPy/Mundo3/ex094.py | BrCarlini/exPython | 3bed986e5bfa5eae191b6b18306448926aed48fd | [
"MIT"
] | null | null | null | cursoemvideoPy/Mundo3/ex094.py | BrCarlini/exPython | 3bed986e5bfa5eae191b6b18306448926aed48fd | [
"MIT"
] | null | null | null | lista_pessoas = list()
dados_pessoas = dict()
while True:
dados_pessoas['nome'] = str(input('Nome: ')).title()
dados_pessoas['sexo'] = str(input('Sexo[M/F]: ')).upper()
dados_pessoas['idade'] = int(input('Idade: '))
lista_pessoas.append(dados_pessoas.copy())
opcao = str(input('Quer continuar ? [S/N... | 29.615385 | 78 | 0.620779 |
74b31efec037e3c446d1443acb2b9cc8a0fe5df8 | 25,976 | py | Python | src/rprblender/properties/render.py | ralic/RadeonProRenderBlenderAddon | 310c650d4230289ac5d5407cc24a13b4c7ce0a90 | [
"Apache-2.0"
] | 1 | 2021-12-01T11:31:22.000Z | 2021-12-01T11:31:22.000Z | src/rprblender/properties/render.py | ralic/RadeonProRenderBlenderAddon | 310c650d4230289ac5d5407cc24a13b4c7ce0a90 | [
"Apache-2.0"
] | 1 | 2021-04-03T09:39:28.000Z | 2021-04-03T09:39:28.000Z | src/rprblender/properties/render.py | isabella232/RadeonProRenderBlenderAddon | ff4ede164c1e1e909f182be709422bc8c8878b1c | [
"Apache-2.0"
] | null | null | null | #**********************************************************************
# Copyright 2020 Advanced Micro Devices, Inc
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.o... | 37.537572 | 131 | 0.644941 |
74b333356184a12047013e96ddc9c69630817905 | 17,206 | py | Python | setup.py | turnergarrow/galpy | 7132eddbf2dab491fe137790e31eacdc604b0534 | [
"BSD-3-Clause"
] | null | null | null | setup.py | turnergarrow/galpy | 7132eddbf2dab491fe137790e31eacdc604b0534 | [
"BSD-3-Clause"
] | null | null | null | setup.py | turnergarrow/galpy | 7132eddbf2dab491fe137790e31eacdc604b0534 | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup
from distutils.core import Extension
import sys
import distutils.sysconfig as sysconfig
import distutils.ccompiler
from distutils.errors import DistutilsPlatformError
import os, os.path
import platform
import subprocess
import glob
PY3= sys.version > '3'
WIN32= platform.system() == 'Windows... | 45.518519 | 653 | 0.687725 |
74b345ff00ccd3ec867358048b8542068c11ee6a | 13,808 | py | Python | train.py | shawnau/DataScienceBowl2018 | 3c6f0f26dd86b71aad55fca52314e6432d0b3a82 | [
"MIT"
] | null | null | null | train.py | shawnau/DataScienceBowl2018 | 3c6f0f26dd86b71aad55fca52314e6432d0b3a82 | [
"MIT"
] | null | null | null | train.py | shawnau/DataScienceBowl2018 | 3c6f0f26dd86b71aad55fca52314e6432d0b3a82 | [
"MIT"
] | null | null | null | from common import *
from dataset.folder import TrainFolder
from dataset.transform import *
from dataset.reader import *
from utility.file import *
from utility.scheduler import *
from configuration import Configuration
from net.model import MaskRcnnNet
os.environ['CUDA_VISIBLE_DEVICES'] = '0' #'3,2' #'3,2,1,0'
WIDT... | 44.686084 | 201 | 0.543453 |
74b349eba816d69915ecc027c69c06b2fad58b6c | 5,751 | py | Python | src/reporting/metrics.py | hiteshpindikanti/OrthogonalTransformerProbing | a3f17126463825cd8fe3baa4bccfb64f972ce850 | [
"MIT"
] | null | null | null | src/reporting/metrics.py | hiteshpindikanti/OrthogonalTransformerProbing | a3f17126463825cd8fe3baa4bccfb64f972ce850 | [
"MIT"
] | null | null | null | src/reporting/metrics.py | hiteshpindikanti/OrthogonalTransformerProbing | a3f17126463825cd8fe3baa4bccfb64f972ce850 | [
"MIT"
] | null | null | null | import numpy as np
from abc import abstractmethod
from collections import defaultdict
from scipy import stats
class Metric:
def __init__(self, *args, **kwargs):
pass
@abstractmethod
def __call__(self, *args, **kwargs):
pass
@abstractmethod
def reset_state(self):
pass
... | 30.754011 | 86 | 0.632412 |
74b34fea265a172b18d794f46e1fa8942da229f4 | 68 | py | Python | btd6_memory_info/generated/SteamNative/RemoteStorageEnumeratePublishedFilesByUserActionResult_t/remote_storage_enumerate_published_files_by_user_action_result_t.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/SteamNative/RemoteStorageEnumeratePublishedFilesByUserActionResult_t/remote_storage_enumerate_published_files_by_user_action_result_t.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/SteamNative/RemoteStorageEnumeratePublishedFilesByUserActionResult_t/remote_storage_enumerate_published_files_by_user_action_result_t.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class RemoteStorageEnumeratePublishedFilesByUserActionResult_t: pass | 68 | 68 | 0.955882 |
74b35d86d0a17042a71d3c36c2d1e56af23f449b | 2,918 | py | Python | app/resources/v1/municipio.py | smartlab-br/datahub-api | 193e71172bb4891a5bbffc902da07ef57df9ab07 | [
"MIT"
] | 1 | 2019-07-25T21:15:05.000Z | 2019-07-25T21:15:05.000Z | app/resources/v1/municipio.py | smartlab-br/datahub-api | 193e71172bb4891a5bbffc902da07ef57df9ab07 | [
"MIT"
] | 44 | 2019-08-05T15:24:00.000Z | 2022-01-31T23:11:31.000Z | app/resources/v1/municipio.py | smartlab-br/datahub-api | 193e71172bb4891a5bbffc902da07ef57df9ab07 | [
"MIT"
] | 1 | 2021-05-11T07:49:51.000Z | 2021-05-11T07:49:51.000Z | ''' Controller para fornecer dados da CEE '''
from flask import request
from flask_restful_swagger_2 import swagger
from resources.base import BaseResource
from model.municipio import Municipio
class MunicipiosResource(BaseResource):
''' Classe de múltiplos Municípios '''
CUSTOM_SWAGGER_PARAMS = [
{"na... | 39.972603 | 93 | 0.620631 |
74b35fef24fb4e074a498feefda04a0eb25bbaf8 | 7,141 | py | Python | botx/clients/methods/base.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 13 | 2021-01-21T12:43:10.000Z | 2022-03-23T11:11:59.000Z | botx/clients/methods/base.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 259 | 2020-02-26T08:51:03.000Z | 2022-03-23T11:08:36.000Z | botx/clients/methods/base.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 5 | 2019-12-02T16:19:22.000Z | 2021-11-22T20:33:34.000Z | """Definition for base class that is responsible for request to BotX API."""
from __future__ import annotations
import json
import typing
from abc import ABC, abstractmethod
from urllib.parse import urljoin
from httpx import Response
from pydantic import BaseConfig, BaseModel, Extra
from pydantic.generics import Gene... | 30.780172 | 87 | 0.658871 |
74b364c9b13be1bd3d645edfb38cc9b08080937c | 10,315 | py | Python | leetcode_python/Breadth-First-Search/cheapest-flights-within-k-stops.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Breadth-First-Search/cheapest-flights-within-k-stops.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Breadth-First-Search/cheapest-flights-within-k-stops.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | """
787. Cheapest Flights Within K Stops
Medium
There are n cities connected by some number of flights. You are given an array flights where flights[i] = [fromi, toi, pricei] indicates that there is a flight from city fromi to city toi with cost pricei.
You are also given three integers src, dst, and k, return the c... | 35.940767 | 399 | 0.551139 |
74b3760377cd6a80b6b0b8696e5f8f9cd4639b20 | 7,850 | py | Python | PythonProjects/23-TkinterCommunication/src/m1e_communication.py | much2mutch/csse120-public | 4f862a6deb7a5373fb5723fb2a23e4042e4d4157 | [
"MIT"
] | null | null | null | PythonProjects/23-TkinterCommunication/src/m1e_communication.py | much2mutch/csse120-public | 4f862a6deb7a5373fb5723fb2a23e4042e4d4157 | [
"MIT"
] | null | null | null | PythonProjects/23-TkinterCommunication/src/m1e_communication.py | much2mutch/csse120-public | 4f862a6deb7a5373fb5723fb2a23e4042e4d4157 | [
"MIT"
] | null | null | null | """
Example showing for tkinter and ttk how to do:
-- A GUI including a Canvas for drqwing objects
-- while sending and receiving messages from other computers.
For the tkinter/ttk code, see the 22-TkinterAnimation code (but ignore the
part of that code that runs the animation by using root.after).
The novel part... | 39.25 | 80 | 0.643694 |
74b3856b87c3aedee68545b0332501d693385f52 | 2,629 | py | Python | test/test_sax_xmlproc.py | jkloth/pyxml | de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d | [
"MIT"
] | 2 | 2018-05-28T23:01:20.000Z | 2018-05-29T03:59:38.000Z | test/test_sax_xmlproc.py | jkloth/pyxml | de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d | [
"MIT"
] | null | null | null | test/test_sax_xmlproc.py | jkloth/pyxml | de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d | [
"MIT"
] | null | null | null | from test.test_support import verbose, TestFailed, findfile
from xml.sax.sax2exts import XMLValParserFactory
from xml.sax import InputSource, SAXException, ContentHandler
from StringIO import StringIO
import sys
#make_parser, ContentHandler, \
# SAXException, SAXReaderNotAvailable, SAXParseException... | 24.570093 | 78 | 0.657284 |
74b3cf63159b46dc54817dfb4fe4413a27617009 | 5,913 | py | Python | papermerge/core/utils.py | w-michal/papermerge | 14703c3316deea06696da041b7adc4bd0b15270b | [
"Apache-2.0"
] | null | null | null | papermerge/core/utils.py | w-michal/papermerge | 14703c3316deea06696da041b7adc4bd0b15270b | [
"Apache-2.0"
] | 1 | 2021-02-12T02:28:00.000Z | 2021-02-24T04:08:34.000Z | papermerge/core/utils.py | w-michal/papermerge | 14703c3316deea06696da041b7adc4bd0b15270b | [
"Apache-2.0"
] | 2 | 2021-02-11T23:10:29.000Z | 2021-02-13T09:06:49.000Z | import functools
import os
import subprocess
import time
import logging
import re
from datetime import datetime
from django.utils.html import format_html
from django.urls import reverse
logger = logging.getLogger(__name__)
def date_2int(kv_format, str_value):
# maps PAPERMERGE_METADATA_DATE_FORMATS to
# ht... | 23.464286 | 90 | 0.603416 |
74b3f536b9b00a6784f8e290f6ea51744be80fd5 | 8,901 | py | Python | external/amazon_scraper/__init__.py | MachineLearningStudyGroup/Smart_Review_Summarization | 2f6667b504243d195cea1a3a85af72fdd950d2a8 | [
"MIT"
] | 8 | 2016-06-16T00:21:42.000Z | 2021-03-16T13:15:39.000Z | external/amazon_scraper/__init__.py | MachineLearningStudyGroup/Smart_Review_Summarization | 2f6667b504243d195cea1a3a85af72fdd950d2a8 | [
"MIT"
] | 44 | 2016-03-26T16:54:49.000Z | 2016-09-28T01:49:11.000Z | external/amazon_scraper/__init__.py | MachineLearningStudyGroup/Smart_Review_Summarization | 2f6667b504243d195cea1a3a85af72fdd950d2a8 | [
"MIT"
] | 4 | 2016-03-06T15:54:49.000Z | 2016-06-22T21:40:38.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import logging
import re
try:
import urlparse
except:
import urllib.parse as urlparse
import urllib
import functools
import time
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disabl... | 31.341549 | 145 | 0.659926 |
74b40db263069e187c350141dce264fb191b150d | 22,941 | py | Python | tests/test_managedblockchain/test_managedblockchain_members.py | pgajdos/moto | 9ec0ab45721bbc2f3770c38654d65faa6f562f77 | [
"Apache-2.0"
] | null | null | null | tests/test_managedblockchain/test_managedblockchain_members.py | pgajdos/moto | 9ec0ab45721bbc2f3770c38654d65faa6f562f77 | [
"Apache-2.0"
] | null | null | null | tests/test_managedblockchain/test_managedblockchain_members.py | pgajdos/moto | 9ec0ab45721bbc2f3770c38654d65faa6f562f77 | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
import boto3
import sure # noqa
from moto import mock_managedblockchain
from . import helpers
@mock_managedblockchain
def test_create_another_member():
conn = boto3.client("managedblockchain", region_name="us-east-1")
# Create network
response = conn.create_netw... | 34.037092 | 103 | 0.694172 |
74b48a868ac18ae991c5682930023c489cee6e56 | 711 | py | Python | test/generate/autotest/C8_CF_XCH_A_Rn.py | Aimini/hm-51 | 2d46323388a0679b2f99d1a33f5a0d55a5f838e6 | [
"MIT"
] | null | null | null | test/generate/autotest/C8_CF_XCH_A_Rn.py | Aimini/hm-51 | 2d46323388a0679b2f99d1a33f5a0d55a5f838e6 | [
"MIT"
] | 20 | 2020-01-13T04:19:37.000Z | 2020-02-12T14:25:44.000Z | test/generate/autotest/C8_CF_XCH_A_Rn.py | Aimini/hm-51 | 2d46323388a0679b2f99d1a33f5a0d55a5f838e6 | [
"MIT"
] | null | null | null | #########################################################
# 2020-01-28 17:43:32
# AI
# ins: XCH A, Rn
#########################################################
import random
from .. import testutil as u
from ..asmconst import *
p = u.create_test()
def test_rs(rs, psw_rs, p):
p += ";; set rs"
p += atl... | 18.710526 | 57 | 0.476793 |
74b4adfdce68e19f3c8b1fcc23dc1afec948177d | 2,634 | py | Python | fcos_core/layers/dcn/deform_pool_func.py | Singingkettle/SAF-FCOS | 5d00b83d659552940025923460d02bb2db7d29e8 | [
"BSD-2-Clause"
] | 10 | 2021-08-31T01:39:40.000Z | 2022-03-27T13:13:14.000Z | fcos_core/layers/dcn/deform_pool_func.py | Singingkettle/SAF-FCOS | 5d00b83d659552940025923460d02bb2db7d29e8 | [
"BSD-2-Clause"
] | 1 | 2021-10-10T05:36:35.000Z | 2021-12-11T05:56:26.000Z | fcos_core/layers/dcn/deform_pool_func.py | Singingkettle/SAF-FCOS | 5d00b83d659552940025923460d02bb2db7d29e8 | [
"BSD-2-Clause"
] | 3 | 2021-09-05T09:14:35.000Z | 2021-10-21T03:15:59.000Z | import torch
from torch.autograd import Function
from torch.autograd.function import once_differentiable
from fcos_core import _C
class DeformRoIPoolingFunction(Function):
@staticmethod
def forward(
ctx,
data,
rois,
offset,
spatial_scale,
... | 27.4375 | 99 | 0.578588 |
74b4dd2e89725f56b4afa9fad54d5b059478cdab | 1,669 | py | Python | exception_reports/decorators.py | CircleUp/exception-reports | 283d1700020c8d2558cbb2ac2a398409de31f442 | [
"BSD-3-Clause"
] | 1 | 2018-01-05T06:53:11.000Z | 2018-01-05T06:53:11.000Z | exception_reports/decorators.py | CircleUp/exception-reports | 283d1700020c8d2558cbb2ac2a398409de31f442 | [
"BSD-3-Clause"
] | 6 | 2018-01-05T14:40:03.000Z | 2019-04-10T22:42:55.000Z | exception_reports/decorators.py | CircleUp/exception-reports | 283d1700020c8d2558cbb2ac2a398409de31f442 | [
"BSD-3-Clause"
] | null | null | null | import sys
from decorator import decorator
from exception_reports.reporter import append_to_exception_message, create_exception_report
from exception_reports.storages import LocalErrorStorage
def exception_report(storage_backend=LocalErrorStorage(), output_format="html", data_processor=None):
"""
Decorator ... | 31.490566 | 157 | 0.672259 |
74b5067c3d04c0bd6247e441f08317845907cd48 | 5,823 | py | Python | lib/cherrypy/process/win32.py | nkvoronov/script.module.cherrypy | 2573349bb7bba9b46102387ef3105f75cc8a82f9 | [
"BSD-3-Clause"
] | null | null | null | lib/cherrypy/process/win32.py | nkvoronov/script.module.cherrypy | 2573349bb7bba9b46102387ef3105f75cc8a82f9 | [
"BSD-3-Clause"
] | null | null | null | lib/cherrypy/process/win32.py | nkvoronov/script.module.cherrypy | 2573349bb7bba9b46102387ef3105f75cc8a82f9 | [
"BSD-3-Clause"
] | null | null | null | """Windows service. Requires pywin32."""
import os
import win32api
import win32con
import win32event
import win32service
import win32serviceutil
from cherrypy.process import wspbus, plugins
class ConsoleCtrlHandler(plugins.SimplePlugin):
"""A WSPBus plugin for handling Win32 console events (like Ctrl-C)."""
... | 31.994505 | 78 | 0.611712 |
74b533f0d7cc78f89a9bd63bd9369a56b07429df | 2,270 | py | Python | venv/Lib/site-packages/pybtex/database/format/__init__.py | PeerHerholz/guideline_jupyter_book | ce445e4be0d53370b67708a22550565b90d71ac6 | [
"BSD-3-Clause"
] | 2 | 2021-02-16T16:17:07.000Z | 2021-11-08T20:27:13.000Z | venv/Lib/site-packages/pybtex/database/format/__init__.py | PeerHerholz/guideline_jupyter_book | ce445e4be0d53370b67708a22550565b90d71ac6 | [
"BSD-3-Clause"
] | null | null | null | venv/Lib/site-packages/pybtex/database/format/__init__.py | PeerHerholz/guideline_jupyter_book | ce445e4be0d53370b67708a22550565b90d71ac6 | [
"BSD-3-Clause"
] | 4 | 2020-11-14T17:05:36.000Z | 2020-11-16T18:44:54.000Z | # Copyright (c) 2006-2019 Andrey Golovigin
#
# 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, publi... | 38.474576 | 89 | 0.752863 |
74b5519c9a97124c9d82cd7860255580f00b198b | 19,119 | py | Python | lib.py | dmadea/Fitting-of-QYs | ab80f5954b9d88018a069437b2bf042ec3f5b99f | [
"MIT"
] | null | null | null | lib.py | dmadea/Fitting-of-QYs | ab80f5954b9d88018a069437b2bf042ec3f5b99f | [
"MIT"
] | null | null | null | lib.py | dmadea/Fitting-of-QYs | ab80f5954b9d88018a069437b2bf042ec3f5b99f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2021 Dominik Madea
import numpy as np
import math
import matplotlib.pyplot as plt
from matplotlib.ticker import AutoMinorLocator, FixedLocator, ScalarFormatter
from matplotlib import cm
import matplotlib.colors as c
import matplotlib.gridspec as gridspec
from scipy.integrate ... | 38.702429 | 143 | 0.638789 |
74b5658388dc56c0110d933719cbff853144fb32 | 1,687 | py | Python | .leetcode/70.climbing-stairs.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/70.climbing-stairs.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/70.climbing-stairs.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | # @lc app=leetcode id=70 lang=python3
#
# [70] Climbing Stairs
#
# https://leetcode.com/problems/climbing-stairs/description/
#
# algorithms
# Easy (48.79%)
# Likes: 6377
# Dislikes: 205
# Total Accepted: 940.1K
# Total Submissions: 1.9M
# Testcase Example: '2'
#
# You are climbing a staircase. It takes n steps ... | 16.066667 | 76 | 0.586841 |
74b57dc899c961649f421f0e594bbe7606b0d34d | 1,168 | py | Python | config/settings/local.py | rollinger/stuffzilla | cb75b3a58ea9360eb637480bd17deb7fb5b6c9a3 | [
"MIT"
] | null | null | null | config/settings/local.py | rollinger/stuffzilla | cb75b3a58ea9360eb637480bd17deb7fb5b6c9a3 | [
"MIT"
] | 8 | 2020-06-05T18:22:14.000Z | 2021-09-07T23:57:30.000Z | config/settings/local.py | rollinger/stuffzilla | cb75b3a58ea9360eb637480bd17deb7fb5b6c9a3 | [
"MIT"
] | null | null | null | """
Local settings
- Run in Debug mode
- Use mailhog for emails
- Add django-extensions as app
"""
from .base import * # noqa
# DEBUG
# ------------------------------------------------------------------------------
DEBUG = env.bool('DJANGO_DEBUG', default=True)
TEMPLATES[0]['OPTIONS']['debug'] = DEBUG
# SECRET CO... | 27.809524 | 99 | 0.450342 |
74b5bd0f73835b7a3379f0b2b99b7bc05b3d4f09 | 1,545 | py | Python | trees/serialize.py | santoshmano/pybricks | bcb3ab80417e8e896280062494ce6c046329b7e8 | [
"MIT"
] | null | null | null | trees/serialize.py | santoshmano/pybricks | bcb3ab80417e8e896280062494ce6c046329b7e8 | [
"MIT"
] | null | null | null | trees/serialize.py | santoshmano/pybricks | bcb3ab80417e8e896280062494ce6c046329b7e8 | [
"MIT"
] | null | null | null | class TreeNode:
def __init__(self, val, left=None, right=None):
self.val = val
self.left = left
self.right = right
def __repr__(self):
return 'TreeNode({})'.format(self.val)
def deserialize(string):
if string == '{}':
return None
nodes = [None if val == 'null' el... | 29.150943 | 91 | 0.544337 |
74b5f8d0bb0ccf262ea69df556672b6f9c3d9d0b | 964 | py | Python | bookshop/sqlalchemy/model/Review.py | turner-townsend/genyrator | 4d6f4aa1945a06a8b6d445a0f643a683c13e909a | [
"MIT"
] | null | null | null | bookshop/sqlalchemy/model/Review.py | turner-townsend/genyrator | 4d6f4aa1945a06a8b6d445a0f643a683c13e909a | [
"MIT"
] | 9 | 2019-09-13T09:31:55.000Z | 2021-01-11T11:09:17.000Z | bookshop/sqlalchemy/model/Review.py | turner-townsend/genyrator | 4d6f4aa1945a06a8b6d445a0f643a683c13e909a | [
"MIT"
] | 1 | 2020-07-22T15:03:41.000Z | 2020-07-22T15:03:41.000Z | from sqlalchemy_utils import UUIDType
from sqlalchemy import UniqueConstraint
from sqlalchemy.types import JSON as JSONType
# Available for custom sqlalchemy_options
import datetime
from sqlalchemy import text, func
from bookshop.sqlalchemy import db
from bookshop.sqlalchemy.model.types import BigIntegerVariantType
... | 32.133333 | 100 | 0.708506 |
74b62a03b899336ce5db6ef6232d8569e11a9736 | 774 | py | Python | tests/image/PLATFORM_RGBA_LOAD.py | regular/pyglet-avbin-optimizations | e93c0508a57c92c24cc22dee12be0a58b1fcf975 | [
"BSD-3-Clause"
] | 2 | 2017-05-10T08:27:22.000Z | 2019-10-05T14:55:00.000Z | tests/image/PLATFORM_RGBA_LOAD.py | regular/pyglet-avbin-optimizations | e93c0508a57c92c24cc22dee12be0a58b1fcf975 | [
"BSD-3-Clause"
] | null | null | null | tests/image/PLATFORM_RGBA_LOAD.py | regular/pyglet-avbin-optimizations | e93c0508a57c92c24cc22dee12be0a58b1fcf975 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
'''Test RGBA load using the platform decoder (QuickTime, GDI+ or Gdk). You
should see the rgba.png image on a checkboard background.
'''
__docformat__ = 'restructuredtext'
__version__ = '$Id: $'
import unittest
import base_load
import sys
if sys.platform == 'linux2':
from py... | 28.666667 | 80 | 0.723514 |
74b62ff3e48cec368368526b9e3576627042962e | 246 | py | Python | src/process_group_4.py | scy6500/large-scale-lm-tutorials | c2ab01a2f272770bbeefe446feed0eb775fc9bd9 | [
"Apache-2.0"
] | 128 | 2021-10-29T18:33:15.000Z | 2022-03-27T02:45:24.000Z | src/process_group_4.py | scy6500/large-scale-lm-tutorials | c2ab01a2f272770bbeefe446feed0eb775fc9bd9 | [
"Apache-2.0"
] | null | null | null | src/process_group_4.py | scy6500/large-scale-lm-tutorials | c2ab01a2f272770bbeefe446feed0eb775fc9bd9 | [
"Apache-2.0"
] | 13 | 2021-10-30T11:07:29.000Z | 2022-03-30T06:56:40.000Z | """
src/process_group_4.py
"""
import torch.distributed as dist
dist.init_process_group(backend="nccl")
# 프로세스 그룹 초기화
group = dist.new_group([_ for _ in range(dist.get_world_size())])
# 프로세스 그룹 생성
print(f"{group} - rank: {dist.get_rank()}\n") | 18.923077 | 65 | 0.707317 |
74b657f4b8a39593935a78b182f8860b5137bc8b | 3,936 | py | Python | acubed/CLI/objects/member.py | AaronBerman/acubed | 22f0471ea56ba8a793fcc22af7881479ade78cc2 | [
"Apache-2.0"
] | null | null | null | acubed/CLI/objects/member.py | AaronBerman/acubed | 22f0471ea56ba8a793fcc22af7881479ade78cc2 | [
"Apache-2.0"
] | null | null | null | acubed/CLI/objects/member.py | AaronBerman/acubed | 22f0471ea56ba8a793fcc22af7881479ade78cc2 | [
"Apache-2.0"
] | null | null | null | import string
from getpass import getpass
from .user import User
class Member(User):
"""
A class used to represent an authenticated user, or member
...
Attributes
----------
username : str
a unique identifier attached to a members account, used for authentication purpose... | 27.333333 | 93 | 0.477896 |
74b65b1d6ec4ecb49715679c60241d228c49fd78 | 7,094 | py | Python | neuro-sdk/tests/test_blob_storage.py | neuro-inc/platform-client-python | 012e355249ea900b76f9ce4209fb9d029652f9b2 | [
"Apache-2.0"
] | 11 | 2020-10-11T15:38:11.000Z | 2021-11-09T11:29:50.000Z | neuro-sdk/tests/test_blob_storage.py | neuro-inc/platform-client-python | 012e355249ea900b76f9ce4209fb9d029652f9b2 | [
"Apache-2.0"
] | 611 | 2020-09-30T21:27:52.000Z | 2022-01-10T10:44:44.000Z | neuro-sdk/tests/test_blob_storage.py | neuro-inc/platform-client-python | 012e355249ea900b76f9ce4209fb9d029652f9b2 | [
"Apache-2.0"
] | 1 | 2020-10-05T15:10:24.000Z | 2020-10-05T15:10:24.000Z | from datetime import datetime, timezone
from pathlib import PurePosixPath
from typing import Any, AsyncIterator, Dict, Mapping, Optional, Tuple, Union
import pytest
from neuro_sdk import BucketEntry, ResourceNotFound
from neuro_sdk.buckets import (
BlobCommonPrefix,
BlobObject,
Bucket,
BucketFS,
B... | 32.842593 | 83 | 0.679025 |
74b6734536d27c6e02a3c2a2e8c8918518aa8694 | 110 | py | Python | bruges/_version.py | hyperiongeo/bruges | 6d9a3aae86aaa53107caaa20e9aafa390358b0f8 | [
"Apache-2.0"
] | null | null | null | bruges/_version.py | hyperiongeo/bruges | 6d9a3aae86aaa53107caaa20e9aafa390358b0f8 | [
"Apache-2.0"
] | null | null | null | bruges/_version.py | hyperiongeo/bruges | 6d9a3aae86aaa53107caaa20e9aafa390358b0f8 | [
"Apache-2.0"
] | null | null | null | """
Version.
Doing it this way provides for access in setup.py and via __version__
"""
__version__ = "0.4.2"
| 15.714286 | 69 | 0.709091 |
74b68b3114649f388b1a9066d1429b720a397a76 | 13,910 | py | Python | nanoribbon/viewers/cdxml2gnr.py | cpignedoli/aiidalab-empa-nanoribbons | 7bc965f8a318165da8aac4bcd1ca8c78e143f284 | [
"MIT"
] | null | null | null | nanoribbon/viewers/cdxml2gnr.py | cpignedoli/aiidalab-empa-nanoribbons | 7bc965f8a318165da8aac4bcd1ca8c78e143f284 | [
"MIT"
] | null | null | null | nanoribbon/viewers/cdxml2gnr.py | cpignedoli/aiidalab-empa-nanoribbons | 7bc965f8a318165da8aac4bcd1ca8c78e143f284 | [
"MIT"
] | null | null | null | # pylint: disable=no-member
"""Widget to convert SMILES to nanoribbons."""
import numpy as np
from scipy.stats import mode
import re
from IPython.display import clear_output
import ipywidgets as ipw
import nglview
from traitlets import Instance
from ase import Atoms
from ase.data import covalent_radii,chemical_symb... | 39.183099 | 119 | 0.564702 |
74b6d0ac925c2f4e25ccf5730fe2fb17f0f4f938 | 1,090 | py | Python | not_mnist/src/constants.py | srungta/mnist-and-others | 829993d85a9090c0036331bcf12195c815447946 | [
"MIT"
] | null | null | null | not_mnist/src/constants.py | srungta/mnist-and-others | 829993d85a9090c0036331bcf12195c815447946 | [
"MIT"
] | null | null | null | not_mnist/src/constants.py | srungta/mnist-and-others | 829993d85a9090c0036331bcf12195c815447946 | [
"MIT"
] | null | null | null | import os
#====================== FILE PATHS ==================================
FINAL_DATASET_FILENAME = 'notMNIST.pickle'
FINAL_DATASET_FILENAME_SMALL = 'notMNIST_small.pickle'
NOT_MNIST_FILENAME_LARGE = 'notMNIST_large.tar.gz'
NOT_MNIST_FILENAME_SMALL = 'notMNIST_small.tar.gz'
#============= URLS =================... | 30.277778 | 76 | 0.562385 |
74b6deda0b6946d827738899cccbb6c2c646ddbb | 8,518 | py | Python | cube/pycube.py | crazycman/pycube | 736643a69d18f0a1a638ad2a7f36451efea36030 | [
"Apache-2.0"
] | null | null | null | cube/pycube.py | crazycman/pycube | 736643a69d18f0a1a638ad2a7f36451efea36030 | [
"Apache-2.0"
] | null | null | null | cube/pycube.py | crazycman/pycube | 736643a69d18f0a1a638ad2a7f36451efea36030 | [
"Apache-2.0"
] | null | null | null | from time import sleep
from typing import List, Dict, Tuple
import requests
import shutil
import json
import functools
def save_json_card_list(
file="resources/modern-cube-add-2019-07-m20.json",
card_list="resources/modern-cube-add-2019-07-m20.txt"):
"""
Query the srcyfall API for a list of c... | 35.053498 | 111 | 0.640643 |
74b6f0c2731d6fa33e844a6150ae05a4cb36f9d5 | 2,471 | py | Python | venv/Lib/site-packages/pyrogram/raw/functions/messages/delete_messages.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/functions/messages/delete_messages.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/functions/messages/delete_messages.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 32.090909 | 103 | 0.612707 |
74b6f58bcd8ea0184b8b3df19ebd59ab80224668 | 214 | py | Python | tests/resources/dsl/scripts/workflows/workflow.py | acidburn0zzz/cloudify-manager | ee2224c52347f7461a95976179ab61aee74a49dd | [
"Apache-2.0"
] | 1 | 2015-11-03T14:27:11.000Z | 2015-11-03T14:27:11.000Z | tests/resources/dsl/scripts/workflows/workflow.py | acidburn0zzz/cloudify-manager | ee2224c52347f7461a95976179ab61aee74a49dd | [
"Apache-2.0"
] | 2 | 2021-03-20T05:33:19.000Z | 2021-03-26T00:38:21.000Z | tests/resources/dsl/scripts/workflows/workflow.py | acidburn0zzz/cloudify-manager | ee2224c52347f7461a95976179ab61aee74a49dd | [
"Apache-2.0"
] | 1 | 2019-10-29T06:15:31.000Z | 2019-10-29T06:15:31.000Z | from cloudify.workflows import ctx
instance = next(ctx.get_node('node').instances)
op2_result = instance.execute_operation('test.op2').get()
instance.execute_operation('test.op1', kwargs={'property': op2_result})
| 35.666667 | 71 | 0.780374 |
74b7022718b4f8d04f7a8b585937d925264db183 | 1,117 | py | Python | ciphers/base16.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | null | null | null | ciphers/base16.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | null | null | null | ciphers/base16.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | 1 | 2020-06-26T09:46:17.000Z | 2020-06-26T09:46:17.000Z | '''THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE
DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OT... | 33.848485 | 75 | 0.747538 |
74b7088386fd04513a7ba08d6c210ffa87fc1c63 | 1,033 | py | Python | messenger/envs/utils.py | vzhong/messenger-emma | ecf94af47b30718edf419928e0bbebda9a21a87f | [
"MIT"
] | null | null | null | messenger/envs/utils.py | vzhong/messenger-emma | ecf94af47b30718edf419928e0bbebda9a21a87f | [
"MIT"
] | null | null | null | messenger/envs/utils.py | vzhong/messenger-emma | ecf94af47b30718edf419928e0bbebda9a21a87f | [
"MIT"
] | null | null | null | '''
Utilites for the environments
'''
import json
from pathlib import Path
from .config import NPCS, Game
def get_entity(name:str):
'''
Get the Entity object for the entity with
name name.
'''
for entity in NPCS:
if entity.name == name:
return entity
raise Exception("entity... | 25.195122 | 62 | 0.665053 |
74b71e79d07c30cddd85c96e520f9f1a42774231 | 6,908 | py | Python | Cryptography/Exp-1-Shamirs-Secret-Sharing/gui-sharing/SSSA/shamir.py | LuminolT/Cryptographic | 87fffae591eee9644641a4c511972df0c2a44df7 | [
"MIT"
] | null | null | null | Cryptography/Exp-1-Shamirs-Secret-Sharing/gui-sharing/SSSA/shamir.py | LuminolT/Cryptographic | 87fffae591eee9644641a4c511972df0c2a44df7 | [
"MIT"
] | null | null | null | Cryptography/Exp-1-Shamirs-Secret-Sharing/gui-sharing/SSSA/shamir.py | LuminolT/Cryptographic | 87fffae591eee9644641a4c511972df0c2a44df7 | [
"MIT"
] | 1 | 2022-03-07T13:56:55.000Z | 2022-03-07T13:56:55.000Z | from Crypto.Util.py3compat import is_native_int
from Crypto.Util import number
from Crypto.Util.number import long_to_bytes, bytes_to_long
from Crypto.Random import get_random_bytes as rng
def _mult_gf2(f1, f2):
"""Multiply two polynomials in GF(2)"""
# Ensure f2 is the smallest
if f2 > f1:
f1, f... | 28.6639 | 90 | 0.530834 |
74b768af198a922ff921d620de2dd571eb550ff9 | 632 | py | Python | python/python/basics/ifs_tests.py | othonreyes/code_problems | 6e65b26120b0b9d6e5ac7342a4d964696b7bd5bf | [
"MIT"
] | null | null | null | python/python/basics/ifs_tests.py | othonreyes/code_problems | 6e65b26120b0b9d6e5ac7342a4d964696b7bd5bf | [
"MIT"
] | null | null | null | python/python/basics/ifs_tests.py | othonreyes/code_problems | 6e65b26120b0b9d6e5ac7342a4d964696b7bd5bf | [
"MIT"
] | null | null | null | import time;
class MyTree:
__private_variable = None
public_variable = "Hi ya"
def __init__(self):
self.__private_variable = 5
tree = MyTree()
try:
print("Cant print private variables ", tree.__private_variable)
except AttributeError:
print("No access to private variables")
print("But we can print publ... | 19.75 | 65 | 0.69462 |
74b77bd4098eaa829bc56e6c4864d29aeacb6d3b | 1,642 | py | Python | tests/test_open_task.py | d4nuu8/krlcodestyle | 2f9376cdae14c201364d9c31b4c19a8ff2f708d2 | [
"MIT"
] | 6 | 2018-12-04T23:21:53.000Z | 2021-07-01T01:24:38.000Z | tests/test_open_task.py | d4nuu8/krlcodestyle | 2f9376cdae14c201364d9c31b4c19a8ff2f708d2 | [
"MIT"
] | null | null | null | tests/test_open_task.py | d4nuu8/krlcodestyle | 2f9376cdae14c201364d9c31b4c19a8ff2f708d2 | [
"MIT"
] | 3 | 2020-03-09T04:25:27.000Z | 2021-11-15T18:42:35.000Z | # -*- coding: utf-8 -*-
from unittest import TestCase
from importlib import reload
from krllint import config
from krllint.reporter import Category, MemoryReporter
from krllint.linter import _create_arg_parser, Linter
class OpenTaskTestCase(TestCase):
TEST_INPUT = [";TODO This is a open task\n"]
def test_ru... | 41.05 | 98 | 0.714982 |
74b799a58fab0dc91aafedf6a84db0d3a690f4ac | 5,398 | py | Python | splitter/tiered_manager/tiered_manager.py | splitter-research/splitter | 94e5e3073b4f383ba50397168ddb8bcd5fc48da4 | [
"MIT"
] | null | null | null | splitter/tiered_manager/tiered_manager.py | splitter-research/splitter | 94e5e3073b4f383ba50397168ddb8bcd5fc48da4 | [
"MIT"
] | null | null | null | splitter/tiered_manager/tiered_manager.py | splitter-research/splitter | 94e5e3073b4f383ba50397168ddb8bcd5fc48da4 | [
"MIT"
] | null | null | null | """This file is part of Splitter which is released under MIT License.
tiered.py defines file storage operations. These operations allows for
complex file storage systems such as tiered storage, and easy file
movement and access.
"""
#TODO: Note, we ignored multi-threading for now
from splitter.tiered_manager.tiere... | 35.513158 | 104 | 0.623379 |
74b79dc40e72904752ea605845531acdb0d67888 | 813 | py | Python | launch_test.py | AravindaDP/SelfDriving-Demo | 2f6cf5a556b5d5f55de61cbf4f77119432c01a76 | [
"MIT"
] | 1 | 2021-06-05T14:00:24.000Z | 2021-06-05T14:00:24.000Z | launch_test.py | AravindaDP/SelfDriving-Demo | 2f6cf5a556b5d5f55de61cbf4f77119432c01a76 | [
"MIT"
] | null | null | null | launch_test.py | AravindaDP/SelfDriving-Demo | 2f6cf5a556b5d5f55de61cbf4f77119432c01a76 | [
"MIT"
] | null | null | null | import os
import gym
import gym_donkeycar
import numpy as np
# SET UP ENVIRONMENT
# You can also launch the simulator separately
# in that case, you don't need to pass a `conf` object
# This assumes DonkeySim simulator is extracted at root of thi repo.
exe_path = ".\\DonkeySimWin\\donkey_sim.exe"
port = 9091
conf = {... | 25.40625 | 68 | 0.648216 |
74b7ac7b57c6b1060c9d3b034df3277f777f6c06 | 24,783 | py | Python | ioos_tools/ioos.py | mwengren/notebooks_demos | b784affed6a79684553e7a16c22fe837d0fdbdd0 | [
"MIT"
] | null | null | null | ioos_tools/ioos.py | mwengren/notebooks_demos | b784affed6a79684553e7a16c22fe837d0fdbdd0 | [
"MIT"
] | null | null | null | ioos_tools/ioos.py | mwengren/notebooks_demos | b784affed6a79684553e7a16c22fe837d0fdbdd0 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function
import os
import fnmatch
import requests
import numpy as np
import pandas as pd
from glob import glob
from io import BytesIO
try:
from urllib import urlopen
from urlparse import urlparse
except ImportError:
from urllib.request import urlopen
... | 32.185714 | 107 | 0.593027 |
74b7b2bf3aa1d373116219ff233b3675dc75bebe | 1,352 | py | Python | archive/style.py | donsheehy/dsviz | d43d3b46507ed76dbc7faf200758abaf856ad7f0 | [
"MIT"
] | 1 | 2021-04-25T11:37:43.000Z | 2021-04-25T11:37:43.000Z | archive/style.py | donsheehy/dsviz | d43d3b46507ed76dbc7faf200758abaf856ad7f0 | [
"MIT"
] | null | null | null | archive/style.py | donsheehy/dsviz | d43d3b46507ed76dbc7faf200758abaf856ad7f0 | [
"MIT"
] | null | null | null | class Style:
def __init__(self, *, fontsize = 12, fontfamily='serif', radius=2, offset=(0,0), fill=(0,0,0,0), stroke=(0,0,0,0), stroke_width=1):
self.fontsize = fontsize
self.fontfamily = fontfamily
self.radius = radius
self.offset = offset
self.fill = fill
self.strok... | 43.612903 | 135 | 0.606509 |
74b7bf20c10d93a2a53e5d3b4206a6a7c4cc669c | 16,021 | py | Python | djaludir/manager/utils.py | carthagecollege/django-djaludir | 126735000efb69d7184aec9591a96667070f1870 | [
"BSD-3-Clause"
] | null | null | null | djaludir/manager/utils.py | carthagecollege/django-djaludir | 126735000efb69d7184aec9591a96667070f1870 | [
"BSD-3-Clause"
] | 2 | 2020-06-05T19:30:19.000Z | 2021-06-10T20:54:38.000Z | djaludir/manager/utils.py | carthagecollege/django-djaludir | 126735000efb69d7184aec9591a96667070f1870 | [
"BSD-3-Clause"
] | null | null | null | #-- coding: utf-8 --
from django.conf import settings
from django.shortcuts import render
from djaludir.core.sql import (
ACTIVITIES, ALUMNA, MAJORS, PRIVACY, RELATIVES_ORIG
)
from djaludir.core.models import (
Activity, Address, Alumna, Relative, EXCLUDE_FIELDS
)
from djzbar.utils.informix import do_sql
from... | 27.386325 | 80 | 0.574434 |
74b7c113232e645cd278aa07b0ea04abd7ba0ce5 | 130 | py | Python | 0x0A-python-inheritance/0-lookup.py | oluwaseun-ebenezer/holbertonschool-higher_level_programming | e830f969d3ca71abf0a2f6d4f7c64a82337eccd7 | [
"MIT"
] | null | null | null | 0x0A-python-inheritance/0-lookup.py | oluwaseun-ebenezer/holbertonschool-higher_level_programming | e830f969d3ca71abf0a2f6d4f7c64a82337eccd7 | [
"MIT"
] | null | null | null | 0x0A-python-inheritance/0-lookup.py | oluwaseun-ebenezer/holbertonschool-higher_level_programming | e830f969d3ca71abf0a2f6d4f7c64a82337eccd7 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""defining the function lookup"""
def lookup(obj):
"""returns list object"""
return dir(obj)
| 16.25 | 35 | 0.607692 |
74b7c755132a496da0cbdab3cc4610d004ce5f62 | 369 | py | Python | appengine/chromium_bugs/appengine_config.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/chromium_bugs/appengine_config.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/chromium_bugs/appengine_config.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is govered by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
"""Configuration."""
import os
import sys
# Enable third-party imports
sys.path.append(os.path... | 28.384615 | 71 | 0.761518 |
74b82739ff050b26e54d3dda96b0e140620efae2 | 9,399 | py | Python | gym_pcgrl/envs/probs/sokoban_prob.py | rohin-dasari/gym-pcgrl | 82718fc3d628e5bf11b3207ebffa57a79c90be4d | [
"MIT"
] | null | null | null | gym_pcgrl/envs/probs/sokoban_prob.py | rohin-dasari/gym-pcgrl | 82718fc3d628e5bf11b3207ebffa57a79c90be4d | [
"MIT"
] | null | null | null | gym_pcgrl/envs/probs/sokoban_prob.py | rohin-dasari/gym-pcgrl | 82718fc3d628e5bf11b3207ebffa57a79c90be4d | [
"MIT"
] | null | null | null | import os
from PIL import Image
import numpy as np
from gym_pcgrl.envs.probs.problem import Problem
from gym_pcgrl.envs.helper import get_range_reward, get_tile_locations, calc_certain_tile, calc_num_regions
from gym_pcgrl.envs.probs.sokoban.engine import State,BFSAgent,AStarAgent
"""
Generate a fully connected Sokoba... | 40.688312 | 146 | 0.609746 |
74b86fedb8e5e0c67d144ca5ca9c3b91fc075e31 | 2,115 | py | Python | fluo/forms/__init__.py | rsalmaso/django-fluo | 340e3b4f9c1b4b09feccefb9b3ab2d26d59fac2b | [
"MIT"
] | 1 | 2020-08-05T09:29:08.000Z | 2020-08-05T09:29:08.000Z | fluo/forms/__init__.py | rsalmaso/django-fluo | 340e3b4f9c1b4b09feccefb9b3ab2d26d59fac2b | [
"MIT"
] | 1 | 2020-08-05T09:28:58.000Z | 2020-09-19T09:02:48.000Z | fluo/forms/__init__.py | rsalmaso/django-fluo | 340e3b4f9c1b4b09feccefb9b3ab2d26d59fac2b | [
"MIT"
] | null | null | null | # Copyright (C) 2007-2020, Raffaele Salmaso <raffaele@salmaso.org>
#
# 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, cop... | 45 | 120 | 0.789598 |
74b88ec4ccd7734201fde543b8e89e3f203ed8ed | 1,734 | py | Python | topi/python/topi/cuda/extern.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 48 | 2020-07-29T18:09:23.000Z | 2021-10-09T01:53:33.000Z | topi/python/topi/cuda/extern.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 9 | 2021-04-02T02:28:07.000Z | 2022-03-26T18:23:59.000Z | topi/python/topi/cuda/extern.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 42 | 2020-08-01T06:41:24.000Z | 2022-01-20T10:33:08.000Z | # 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... | 35.387755 | 86 | 0.713379 |
74b92833a5a69f9851b3a4ead7a9a89b3c64e00b | 1,641 | py | Python | tests/test_env.py | ironsigma/pyscheck | 2a374b6ef1bddf1af439c7e80d9be861813c1d7f | [
"MIT"
] | null | null | null | tests/test_env.py | ironsigma/pyscheck | 2a374b6ef1bddf1af439c7e80d9be861813c1d7f | [
"MIT"
] | 11 | 2021-12-17T18:17:14.000Z | 2021-12-22T07:58:10.000Z | tests/test_env.py | ironsigma/pyscheck | 2a374b6ef1bddf1af439c7e80d9be861813c1d7f | [
"MIT"
] | null | null | null | import io
import os
from ironsigma import env
def test_simple_load():
config_string = io.StringIO("""
APP_USER = foo
APP_EMAIL =foo@example.com
# Settings
APP_RES= 2.5
APP_PORT = 6900""")
config = env.load(config_string)
assert config['APP_USER'] == 'foo'
assert config['APP_EMAIL'] == 'foo@exam... | 21.038462 | 58 | 0.666667 |
74b938359436acc6ce7ee300c85bf2f1dfd27001 | 1,616 | py | Python | server_automation/utils/base_requests.py | MapColonies/automation-server-test | 209d98420aeb7da258d18cd15511c8b5f602d0c4 | [
"MIT"
] | 1 | 2021-01-05T09:42:52.000Z | 2021-01-05T09:42:52.000Z | server_automation/utils/base_requests.py | MapColonies/automation-server-test | 209d98420aeb7da258d18cd15511c8b5f602d0c4 | [
"MIT"
] | null | null | null | server_automation/utils/base_requests.py | MapColonies/automation-server-test | 209d98420aeb7da258d18cd15511c8b5f602d0c4 | [
"MIT"
] | 1 | 2021-01-28T07:57:05.000Z | 2021-01-28T07:57:05.000Z | # pylint: disable=line-too-long, invalid-name
"""
This module wrapping http protocol request sending [get, post and etc.]
"""
import logging
import json
import requests
from server_automation.utils import common
_log = logging.getLogger('server.exporter.requests')
def send_post_request(url, body=None, header=None):
... | 36.727273 | 135 | 0.678218 |
74b96d3e95caebddb1f265a65f0679da47ae943c | 2,748 | py | Python | lol_id_tools/_tests/test_tools.py | RheingoldRiver/lol_id_tools | 49d1730aaebbefbf1cd0205faf0c752e910a06b4 | [
"MIT"
] | null | null | null | lol_id_tools/_tests/test_tools.py | RheingoldRiver/lol_id_tools | 49d1730aaebbefbf1cd0205faf0c752e910a06b4 | [
"MIT"
] | null | null | null | lol_id_tools/_tests/test_tools.py | RheingoldRiver/lol_id_tools | 49d1730aaebbefbf1cd0205faf0c752e910a06b4 | [
"MIT"
] | null | null | null | from concurrent.futures.thread import ThreadPoolExecutor
import lol_id_tools as lit
import os
try:
os.remove(lit.lol_id_tools.lod.data_location)
except FileNotFoundError:
pass
def translation_test_function(en_name, kr_name):
assert lit.get_translation(en_name, "ko_KR") == kr_name
assert lit.get_tran... | 26.941176 | 79 | 0.681223 |
74b97260811d5a2f04a5415b7439a47fa4f54ec3 | 49,337 | py | Python | monai/data/dataset.py | myron/MONAI | 6e7b2d6ad9688b0418eee21efeea196da2ad054f | [
"Apache-2.0"
] | null | null | null | monai/data/dataset.py | myron/MONAI | 6e7b2d6ad9688b0418eee21efeea196da2ad054f | [
"Apache-2.0"
] | null | null | null | monai/data/dataset.py | myron/MONAI | 6e7b2d6ad9688b0418eee21efeea196da2ad054f | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 - 2021 MONAI Consortium
# 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 wri... | 43.507055 | 121 | 0.627724 |
74b97355d03ab6bd084a5c7ad5f9841596c427dc | 572 | py | Python | campy/datastructures/shuffle.py | TristenSeth/campy | 9e726c342d682239e1c19e6f5645c0b2167d7fab | [
"MIT"
] | null | null | null | campy/datastructures/shuffle.py | TristenSeth/campy | 9e726c342d682239e1c19e6f5645c0b2167d7fab | [
"MIT"
] | null | null | null | campy/datastructures/shuffle.py | TristenSeth/campy | 9e726c342d682239e1c19e6f5645c0b2167d7fab | [
"MIT"
] | null | null | null | """Shuffle an immutable collection and return a copy of the collection."""
import random as _random
def shuffle(collection, random=None):
"""Randomly shuffle a collection.
Note that this function has different behavior depending on what the input is.
If collection represents an infinite iterable, this wi... | 31.777778 | 82 | 0.727273 |
74b97e722ec6c9a5bfb6f592188a444646d4f56c | 19,134 | py | Python | tests/__init__.py | cds-snc/notification-admin | d4056798bf889ad29893667bbb67ead2f8e466e4 | [
"MIT"
] | 16 | 2019-11-05T21:35:49.000Z | 2022-01-12T15:00:32.000Z | tests/__init__.py | cds-snc/notification-admin | d4056798bf889ad29893667bbb67ead2f8e466e4 | [
"MIT"
] | 509 | 2019-07-11T22:03:19.000Z | 2022-03-30T15:19:26.000Z | tests/__init__.py | cds-snc/notification-admin | d4056798bf889ad29893667bbb67ead2f8e466e4 | [
"MIT"
] | 8 | 2020-02-21T20:19:29.000Z | 2022-03-31T14:17:02.000Z | import uuid
from datetime import datetime, timedelta, timezone
from unittest.mock import patch
from urllib.parse import parse_qs, urlparse
import pytest
from flask import session as flask_session
from flask import url_for
from flask.testing import FlaskClient
from flask_login import login_user
from app.models.service... | 31.213703 | 115 | 0.630919 |
74b98f1fe5eb808b515d2f06d83c827f54945963 | 25,498 | py | Python | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/aio/operations/_agent_pools_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/aio/operations/_agent_pools_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/aio/operations/_agent_pools_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRe... | 44.654991 | 247 | 0.669935 |
74b9aa02101ecaa147107a6f76a16f72b9402d94 | 4,697 | py | Python | CS/CSC148/lectures/week3/notes_Monday.py | jerrysun103/uoft | 6264583d27c7db94596d29c73804e6d9155de191 | [
"MIT"
] | null | null | null | CS/CSC148/lectures/week3/notes_Monday.py | jerrysun103/uoft | 6264583d27c7db94596d29c73804e6d9155de191 | [
"MIT"
] | null | null | null | CS/CSC148/lectures/week3/notes_Monday.py | jerrysun103/uoft | 6264583d27c7db94596d29c73804e6d9155de191 | [
"MIT"
] | null | null | null | """ Rational numbers are ratios of two integers p/q, where p is called
the numerator and q is called the denominator. The denominator q is non-zero.
Operations on rationals include addition, multiplication, and comparisons:
>, <, >=, <=, ==
"""
# study class property build_in function
class Rational:
""" A class ... | 25.389189 | 116 | 0.54439 |
74b9aca7a67fb68a395db273b922c6ae4904f3cb | 480 | py | Python | lazyxml/consts.py | druagoon/lazyxml | b4cc363c565fe800219ebdf03cdfc47ae3cc16d7 | [
"MIT"
] | 7 | 2015-06-14T12:25:13.000Z | 2020-04-23T23:12:02.000Z | lazyxml/consts.py | druagoon/lazyxml | b4cc363c565fe800219ebdf03cdfc47ae3cc16d7 | [
"MIT"
] | 1 | 2019-05-17T14:37:13.000Z | 2020-11-18T17:26:55.000Z | lazyxml/consts.py | druagoon/lazyxml | b4cc363c565fe800219ebdf03cdfc47ae3cc16d7 | [
"MIT"
] | 11 | 2017-10-07T00:39:42.000Z | 2021-02-25T09:04:53.000Z | # -*- coding: utf-8 -*-
import re
class Default(object):
VERSION = '1.0'
ENCODING = 'utf-8'
KEY_ATTR = '{attrs}'
KEY_VALUE = '{values}'
class Regex(object):
XML_NS = re.compile(r'\{(.*?)\}(.*)') # XML Namespace
XML_HEADER = re.compile(r'<\?xml.*?\?>', re.I | re.S) # XML Header Declare
... | 26.666667 | 96 | 0.552083 |
74b9b5c1ef5eb22748a563d559448ac176d29a32 | 8,858 | py | Python | inclearn/convnet/my_resnet.py | yaoyao-liu/POD-AANets | 01f10e8d66dfd78d9e6bd6dfcf8c95b10577045c | [
"MIT"
] | 5 | 2022-02-20T12:32:22.000Z | 2022-02-22T08:15:09.000Z | inclearn/convnet/my_resnet.py | yaoyao-liu/POD-AANets | 01f10e8d66dfd78d9e6bd6dfcf8c95b10577045c | [
"MIT"
] | null | null | null | inclearn/convnet/my_resnet.py | yaoyao-liu/POD-AANets | 01f10e8d66dfd78d9e6bd6dfcf8c95b10577045c | [
"MIT"
] | null | null | null | import logging
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn import init
from inclearn.lib import pooling
logger = logging.getLogger(__name__)
class DownsampleStride(nn.Module):
def __init__(self, n=2):
super(DownsampleStride, self).__init__()
self._n = n
... | 29.526667 | 97 | 0.568864 |
74b9e8f0a1c5ec9ad9ab7034e8fd1a3fc003f346 | 3,061 | py | Python | sunpy/net/dataretriever/sources/fermi_gbm.py | johan12345/sunpy | 56e1ab0c2c992f99e0fe3e6bff468b731a51228c | [
"BSD-2-Clause"
] | 2 | 2020-01-03T16:39:28.000Z | 2020-04-24T15:12:08.000Z | sunpy/net/dataretriever/sources/fermi_gbm.py | johan12345/sunpy | 56e1ab0c2c992f99e0fe3e6bff468b731a51228c | [
"BSD-2-Clause"
] | 1 | 2020-05-11T13:38:56.000Z | 2020-05-11T13:38:56.000Z | sunpy/net/dataretriever/sources/fermi_gbm.py | johan12345/sunpy | 56e1ab0c2c992f99e0fe3e6bff468b731a51228c | [
"BSD-2-Clause"
] | null | null | null | from sunpy.net.dataretriever import GenericClient
__all__ = ['GBMClient']
class GBMClient(GenericClient):
"""
Provides access to data from the Gamma-Ray Burst Monitor (GBM) instrument
on board the Fermi satellite.
Although GBMs primary objective is to detect gamma-ray bursts,
it provides high qu... | 49.370968 | 126 | 0.623652 |
74ba275b2c369e8ae8dbf5d2aaf0596ab82da066 | 1,024 | py | Python | djangocms_navigation/migrations/0009_language_migration.py | Bernardvdv/djangocms-navigation | 200fff28cbb46fb2fd2504d00702cf2be8d687fa | [
"BSD-3-Clause"
] | 6 | 2018-12-12T10:45:42.000Z | 2022-03-16T20:50:36.000Z | djangocms_navigation/migrations/0009_language_migration.py | Bernardvdv/djangocms-navigation | 200fff28cbb46fb2fd2504d00702cf2be8d687fa | [
"BSD-3-Clause"
] | 15 | 2019-01-08T11:55:31.000Z | 2022-03-01T15:06:52.000Z | djangocms_navigation/migrations/0009_language_migration.py | Bernardvdv/djangocms-navigation | 200fff28cbb46fb2fd2504d00702cf2be8d687fa | [
"BSD-3-Clause"
] | 9 | 2018-12-14T00:58:25.000Z | 2022-03-11T17:16:17.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import logging
from django.db import migrations
from cms.utils.i18n import get_default_language_for_site
logger = logging.getLogger(__name__)
def add_navigation_languages(apps, schema_editor):
db_alias = schema_editor.connection.alia... | 27.675676 | 89 | 0.662109 |
74ba4ddd1abba0ffe0fbc1f2015965369f2b8186 | 7,882 | py | Python | exp6/exp6a.py | Haunter17/MIR_SU17 | 0eaefb8cab78ca896c1ed0074892c296110eb161 | [
"MIT"
] | null | null | null | exp6/exp6a.py | Haunter17/MIR_SU17 | 0eaefb8cab78ca896c1ed0074892c296110eb161 | [
"MIT"
] | 5 | 2017-05-22T20:32:07.000Z | 2017-06-02T21:06:23.000Z | exp6/exp6a.py | Haunter17/MIR_SU17 | 0eaefb8cab78ca896c1ed0074892c296110eb161 | [
"MIT"
] | null | null | null | import h5py
import time
import numpy as np
import tensorflow as tf
from tensorflow.contrib import rnn
import sys
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
# usage: python exp6a.py 256 0 0 0
# system arg
n_hidden = 128 # hidden layer num of features
SMALL_FLAG = 1
FAST_FLAG = 1
SYS_FLAG = ... | 34.722467 | 101 | 0.639178 |
74ba528df26009b93b90764faee4fb0e9e754da1 | 1,794 | py | Python | aiotracemoeapi/types.py | Fenicu/AioTraceMoeAPI | a56526503776bcbab82372527158b0ce9af1621d | [
"MIT"
] | 2 | 2021-08-29T14:28:00.000Z | 2021-09-10T10:02:05.000Z | aiotracemoeapi/types.py | Fenicu/AioTraceMoeAPI | a56526503776bcbab82372527158b0ce9af1621d | [
"MIT"
] | 1 | 2021-09-07T03:05:19.000Z | 2021-09-07T05:09:17.000Z | aiotracemoeapi/types.py | Fenicu/AioTraceMoeAPI | a56526503776bcbab82372527158b0ce9af1621d | [
"MIT"
] | 2 | 2021-09-24T09:12:08.000Z | 2021-09-24T09:53:49.000Z | from datetime import datetime
from typing import Dict, List, Optional, Union
from pydantic import BaseModel, Field, validator
from .utils import clamp
class RateLimit(BaseModel):
limit: int = Field(alias="X-RateLimit-Limit")
remaining: int = Field(alias="X-RateLimit-Remaining")
reset: int = Field(alias=... | 24.916667 | 75 | 0.665552 |
74ba5bf66a04be4f8f69ba0d0703518417ad63ab | 4,987 | py | Python | PythonProjects/01-IntroductionToPython/src/m6_your_turtles.py | much2mutch/csse120-public | 4f862a6deb7a5373fb5723fb2a23e4042e4d4157 | [
"MIT"
] | null | null | null | PythonProjects/01-IntroductionToPython/src/m6_your_turtles.py | much2mutch/csse120-public | 4f862a6deb7a5373fb5723fb2a23e4042e4d4157 | [
"MIT"
] | null | null | null | PythonProjects/01-IntroductionToPython/src/m6_your_turtles.py | much2mutch/csse120-public | 4f862a6deb7a5373fb5723fb2a23e4042e4d4157 | [
"MIT"
] | null | null | null | """
Your chance to explore Loops and Turtles!
Authors: David Mutchler, Vibha Alangar, Matt Boutell, Dave Fisher,
Derek Whitley, their colleagues, and Seth Mutchler.
"""
###############################################################################
# DONE: 1.
# On Line 5 above, replace PUT_YOUR_N... | 25.973958 | 79 | 0.595348 |
74ba70ebf8fee20edfba50045d7833962aeab9a2 | 5,831 | py | Python | userbot/__init__.py | meratestaccount/piratedrobot | 9db90691b9a8430726f64874c02d34b59a122a53 | [
"MIT"
] | null | null | null | userbot/__init__.py | meratestaccount/piratedrobot | 9db90691b9a8430726f64874c02d34b59a122a53 | [
"MIT"
] | null | null | null | userbot/__init__.py | meratestaccount/piratedrobot | 9db90691b9a8430726f64874c02d34b59a122a53 | [
"MIT"
] | null | null | null | import os
import sys
from telethon.sessions import StringSession
from telethon import TelegramClient
from var import Var
os.system("pip install --upgrade pip")
if Var.STRING_SESSION:
session_name = str(Var.STRING_SESSION)
bot = TelegramClient(StringSession(session_name), Var.APP_ID, Var.API_HASH)
else:
se... | 31.863388 | 92 | 0.678786 |
74ba7bd2ea7a6ab171ad5ea0eb59abcae0a176c1 | 2,524 | py | Python | src/Solution282.py | ArkiWang/LeetcodePy | 6b4af8da843910823f7f53989bbda4ec8e6dad15 | [
"MIT"
] | null | null | null | src/Solution282.py | ArkiWang/LeetcodePy | 6b4af8da843910823f7f53989bbda4ec8e6dad15 | [
"MIT"
] | null | null | null | src/Solution282.py | ArkiWang/LeetcodePy | 6b4af8da843910823f7f53989bbda4ec8e6dad15 | [
"MIT"
] | null | null | null | class Solution:
resL = []
def solver(self, rstr: str) -> int:
'''
spl = list(rstr)
for i, e in enumerate:
if e in ['+', '-', '*']:
spl[i] = ' '
spl = str(spl)
spl.split(' ')
:param rstr:
:return:
'''
nums = []
... | 29.011494 | 67 | 0.373217 |
74ba9bb3c230b8079ffba5b955f866b6b24051d3 | 72 | py | Python | pyxiannotator/__init__.py | Rappsilber-Laboratory/pyXiAnnotator | 5ac3e261c456c074fe013fc0bf1a7046d570398b | [
"Apache-2.0"
] | null | null | null | pyxiannotator/__init__.py | Rappsilber-Laboratory/pyXiAnnotator | 5ac3e261c456c074fe013fc0bf1a7046d570398b | [
"Apache-2.0"
] | null | null | null | pyxiannotator/__init__.py | Rappsilber-Laboratory/pyXiAnnotator | 5ac3e261c456c074fe013fc0bf1a7046d570398b | [
"Apache-2.0"
] | null | null | null | import pyxiannotator.XiAnnotator
import pyxiannotator.AnnotatedSpectrum
| 24 | 38 | 0.916667 |
74ba9d9214db0bdac7acb0f69dcf42cc98a6fc55 | 24,340 | py | Python | sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/operations/_grafana_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/operations/_grafana_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/operations/_grafana_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 46.011342 | 203 | 0.675021 |
74bae03f3000d2036ec0471f852bf3c14edf2663 | 2,320 | py | Python | alipay/aop/api/domain/AlipayCommerceEducateFacefeatureCreateModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipayCommerceEducateFacefeatureCreateModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipayCommerceEducateFacefeatureCreateModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayCommerceEducateFacefeatureCreateModel(object):
def __init__(self):
self._biz_code = None
self._inst_id = None
self._isv_name = None
self._unique_id = None
... | 26.976744 | 69 | 0.575 |
74bae5387c91261dc45a99389424efb8bfc8fda5 | 14,129 | py | Python | nova/tests/unit/api/openstack/compute/test_block_device_mapping_v1.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/api/openstack/compute/test_block_device_mapping_v1.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/api/openstack/compute/test_block_device_mapping_v1.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 1 | 2020-07-24T01:18:44.000Z | 2020-07-24T01:18:44.000Z | # Copyright (c) 2014 IBM Corp.
# 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... | 40.025496 | 79 | 0.622125 |
74bb11d557b586c1cf772f667512b530bb16412d | 5,392 | py | Python | acme/tf/networks/vision.py | novatig/acme | 7774e4a22519d8b05951320864e5308974eaad2a | [
"Apache-2.0"
] | 1 | 2020-08-31T23:46:32.000Z | 2020-08-31T23:46:32.000Z | acme/tf/networks/vision.py | novatig/acme | 7774e4a22519d8b05951320864e5308974eaad2a | [
"Apache-2.0"
] | 1 | 2021-01-25T15:39:56.000Z | 2021-01-25T15:39:56.000Z | acme/tf/networks/vision.py | novatig/acme | 7774e4a22519d8b05951320864e5308974eaad2a | [
"Apache-2.0"
] | 2 | 2021-01-07T11:35:19.000Z | 2021-01-07T12:16:21.000Z | # python3
# Copyright 2018 DeepMind Technologies Limited. 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 re... | 33.7 | 79 | 0.651521 |
74bb2a87600316c3238b63c343377214555f2435 | 12,553 | py | Python | src/python/pants/backend/jvm/tasks/classpath_products.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/jvm/tasks/classpath_products.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/jvm/tasks/classpath_products.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
from twit... | 39.351097 | 101 | 0.728431 |
74bb3780d273d6ae4d067a9b63dacb5323a6184b | 2,595 | py | Python | airflow/www/extensions/init_jinja_globals.py | joshowen/airflow | d0cf232919839d0e338dcc38a5c7a1841077eaae | [
"Apache-2.0"
] | 1 | 2020-08-13T15:17:03.000Z | 2020-08-13T15:17:03.000Z | airflow/www/extensions/init_jinja_globals.py | joshowen/airflow | d0cf232919839d0e338dcc38a5c7a1841077eaae | [
"Apache-2.0"
] | 37 | 2020-07-21T07:50:02.000Z | 2022-03-29T22:31:28.000Z | airflow/www/extensions/init_jinja_globals.py | joshowen/airflow | d0cf232919839d0e338dcc38a5c7a1841077eaae | [
"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... | 39.318182 | 104 | 0.6921 |
74bb43137643bc1cb83903637db42782b428f9d9 | 292 | py | Python | 02-Libraries-Implementation/itertools/IteratorImplement.py | NguyenQuangBinh803/Python-Heritage | 7da72b2926cefc4903086a1cab7de3a64764d648 | [
"MIT"
] | 1 | 2021-01-10T12:06:26.000Z | 2021-01-10T12:06:26.000Z | 02-Libraries-Implementation/itertools/IteratorImplement.py | NguyenQuangBinh803/Python-Heritage | 7da72b2926cefc4903086a1cab7de3a64764d648 | [
"MIT"
] | null | null | null | 02-Libraries-Implementation/itertools/IteratorImplement.py | NguyenQuangBinh803/Python-Heritage | 7da72b2926cefc4903086a1cab7de3a64764d648 | [
"MIT"
] | null | null | null |
if __name__ == "__main__":
day = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat']
with open("logging.log", "r") as fp:
for line in iter(fp.readline, ''):
print(line)
for index, d in enumerate(day, start=1):
print(index, d)
| 24.333333 | 59 | 0.469178 |
74bb491643bdcc9f8c9ee4bfa03d1046713f45ca | 2,413 | py | Python | 02_HybridModelling/HyCho_test_pusher.py | ratnania/mhd | 89f383695075aa26fc805ffbf6ba458f0cdd6f4e | [
"MIT"
] | 5 | 2018-04-13T15:35:21.000Z | 2019-10-29T09:39:13.000Z | 02_HybridModelling/HyCho_test_pusher.py | ratnania/mhd | 89f383695075aa26fc805ffbf6ba458f0cdd6f4e | [
"MIT"
] | null | null | null | 02_HybridModelling/HyCho_test_pusher.py | ratnania/mhd | 89f383695075aa26fc805ffbf6ba458f0cdd6f4e | [
"MIT"
] | 1 | 2018-10-19T10:53:15.000Z | 2018-10-19T10:53:15.000Z | import numpy as np
import bsplines as bsp
import matplotlib.pyplot as plt
import time
import HyCho_PIC
from pyccel.epyccel import epyccel
HyCho_PIC_fast = epyccel(HyCho_PIC, accelerator='openmp')
print('Pyccelization done!')
# ... parameters
Nel = 1800
p = 3
Lz = 40.
el_b = np.linspace(0., Lz, Nel + 1)
b... | 23.656863 | 203 | 0.594695 |
74bb773e96b796a32e9006fbdb28494ee5ebd765 | 1,893 | py | Python | krvjezivot/users/migrations/0003_users_donors.py | jkvakaric/krv-je-zivot | a875dcde468e1e5508713e592f974cb147223b52 | [
"MIT"
] | null | null | null | krvjezivot/users/migrations/0003_users_donors.py | jkvakaric/krv-je-zivot | a875dcde468e1e5508713e592f974cb147223b52 | [
"MIT"
] | null | null | null | krvjezivot/users/migrations/0003_users_donors.py | jkvakaric/krv-je-zivot | a875dcde468e1e5508713e592f974cb147223b52 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.5 on 2018-05-23 22:44
from django.db import migrations, models
import enumfields.fields
import krvjezivot.donations.enums
import krvjezivot.users.enums
class Migration(migrations.Migration):
dependencies = [
('users', '0002_full_name'),
]
operations = [
migrati... | 36.403846 | 160 | 0.621764 |
74bbcb02fb01fa0824fef16d9f4e8652b84bf4dd | 114 | py | Python | Tests/Runnable2/r_tbfilename_t.py | jwilk/Pyrex | 83dfbae1261788933472e3f9c501ad74c61a37c5 | [
"Apache-2.0"
] | 5 | 2019-05-26T20:48:36.000Z | 2021-07-09T01:38:38.000Z | Tests/Runnable2/r_tbfilename_t.py | jwilk/Pyrex | 83dfbae1261788933472e3f9c501ad74c61a37c5 | [
"Apache-2.0"
] | null | null | null | Tests/Runnable2/r_tbfilename_t.py | jwilk/Pyrex | 83dfbae1261788933472e3f9c501ad74c61a37c5 | [
"Apache-2.0"
] | 1 | 2022-02-10T07:14:58.000Z | 2022-02-10T07:14:58.000Z | import sys, traceback
import r_tbfilename
try:
r_tbfilename.foo()
except:
traceback.print_exc(None, sys.stdout)
| 16.285714 | 38 | 0.798246 |
74bbcfae3aab2a6ee275ecafddd0eef8c3662836 | 15,643 | py | Python | spinup/algos/pytorch/td3_orig/td3.py | LinghengMeng/lstm_td3 | 2306a4f0e84417e92b9d77627abc8a7f1925f2b1 | [
"MIT"
] | 2 | 2021-04-22T01:17:37.000Z | 2021-07-22T09:56:44.000Z | spinup/algos/pytorch/td3_orig/td3.py | LinghengMeng/lstm_td3 | 2306a4f0e84417e92b9d77627abc8a7f1925f2b1 | [
"MIT"
] | null | null | null | spinup/algos/pytorch/td3_orig/td3.py | LinghengMeng/lstm_td3 | 2306a4f0e84417e92b9d77627abc8a7f1925f2b1 | [
"MIT"
] | 3 | 2021-05-05T10:27:12.000Z | 2021-07-23T14:42:42.000Z | from copy import deepcopy
import itertools
import numpy as np
import torch
from torch.optim import Adam
import gym
import pybullet_envs
import time
import spinup.algos.pytorch.td3_orig.core as core
from spinup.utils.logx import EpochLogger, setup_logger_kwargs
import os.path as osp
class ReplayBuffer:
"""
A s... | 40.631169 | 108 | 0.599693 |
74bbe26672a7a6ab8c91ca16288b4d3c09282b01 | 2,967 | py | Python | codegeneration/code_manip/file_utils.py | sacceus/BabylonCpp | 94669cf7cbe3214ec6e905cbf249fa0c9daf6222 | [
"Apache-2.0"
] | 277 | 2017-05-18T08:27:10.000Z | 2022-03-26T01:31:37.000Z | codegeneration/code_manip/file_utils.py | sacceus/BabylonCpp | 94669cf7cbe3214ec6e905cbf249fa0c9daf6222 | [
"Apache-2.0"
] | 77 | 2017-09-03T15:35:02.000Z | 2022-03-28T18:47:20.000Z | codegeneration/code_manip/file_utils.py | sacceus/BabylonCpp | 94669cf7cbe3214ec6e905cbf249fa0c9daf6222 | [
"Apache-2.0"
] | 37 | 2017-03-30T03:36:24.000Z | 2022-01-28T08:28:36.000Z | import os
import os.path
import codecs
from typing import *
from bab_types import *
def files_with_extension(folder: Folder, extension: Extension) -> List[FileFullPath]:
r = []
ext_len = len(extension)
if not os.path.isdir(folder):
print("ouch")
for root, _, files in os.walk(folder):
f... | 28.257143 | 107 | 0.615774 |
74bbe976dbe3cdabd5572e7d586127a02ba9310b | 1,436 | py | Python | tests/ext/sqlalchemy_core/test_base.py | musicinmybrain/aws-xray-sdk-python | b8e59423f1891351ceb1a0bd585603e0cd46c74c | [
"Apache-2.0"
] | 294 | 2017-10-10T19:01:04.000Z | 2022-03-18T15:52:19.000Z | tests/ext/sqlalchemy_core/test_base.py | musicinmybrain/aws-xray-sdk-python | b8e59423f1891351ceb1a0bd585603e0cd46c74c | [
"Apache-2.0"
] | 285 | 2017-10-20T09:27:21.000Z | 2022-03-29T15:33:45.000Z | tests/ext/sqlalchemy_core/test_base.py | musicinmybrain/aws-xray-sdk-python | b8e59423f1891351ceb1a0bd585603e0cd46c74c | [
"Apache-2.0"
] | 134 | 2017-10-11T13:55:17.000Z | 2022-03-23T07:21:17.000Z | from __future__ import absolute_import
import pytest
from sqlalchemy import create_engine, Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
from aws_xray_sdk.core import xray_recorder, patch
from aws_xray_sdk.core.context import Context
Base = de... | 25.192982 | 78 | 0.729805 |
74bbfe9869ea3df75e46a52a02bc0d874942e857 | 21,940 | py | Python | qatrack/qa/migrations/0002_auto__add_field_testinstancestatus_description.py | mmmetwaly/qatrackplus | 193bc22c0014891f5d97be32ccc73a08c7f7f81b | [
"MIT"
] | null | null | null | qatrack/qa/migrations/0002_auto__add_field_testinstancestatus_description.py | mmmetwaly/qatrackplus | 193bc22c0014891f5d97be32ccc73a08c7f7f81b | [
"MIT"
] | null | null | null | qatrack/qa/migrations/0002_auto__add_field_testinstancestatus_description.py | mmmetwaly/qatrackplus | 193bc22c0014891f5d97be32ccc73a08c7f7f81b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'TestInstanceStatus.description'
db.add_column('qa_testinstancestatus', 'description',
... | 86.377953 | 191 | 0.565223 |
74bc551fd17a35c92df9504d2c5a615028f02474 | 1,930 | py | Python | diffprivlib/mechanisms/__init__.py | Jakondak/differential-privacy-library | c26bab301f2554b52c8bd836b28091f2f2611cd4 | [
"MIT"
] | 1 | 2020-05-03T06:06:44.000Z | 2020-05-03T06:06:44.000Z | diffprivlib/mechanisms/__init__.py | dohmatob/differential-privacy-library | 1a17bf0e3bf7d18d5c19258abbf81c27fd9a5e16 | [
"MIT"
] | null | null | null | diffprivlib/mechanisms/__init__.py | dohmatob/differential-privacy-library | 1a17bf0e3bf7d18d5c19258abbf81c27fd9a5e16 | [
"MIT"
] | 1 | 2022-01-02T11:29:30.000Z | 2022-01-02T11:29:30.000Z | # MIT License
#
# Copyright (C) IBM Corporation 2019
#
# 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... | 58.484848 | 120 | 0.820207 |
74bc8741c7227cfce822e3da197679ac87cf9c75 | 8,669 | py | Python | src/swarm_rescue/examples/example_semantic_cones.py | filliat/swarm-rescue | ce323c90ccb4a25216c63abccd09d3f31eea1189 | [
"MIT"
] | 1 | 2021-11-15T23:35:29.000Z | 2021-11-15T23:35:29.000Z | src/swarm_rescue/examples/example_semantic_cones.py | filliat/swarm-rescue | ce323c90ccb4a25216c63abccd09d3f31eea1189 | [
"MIT"
] | null | null | null | src/swarm_rescue/examples/example_semantic_cones.py | filliat/swarm-rescue | ce323c90ccb4a25216c63abccd09d3f31eea1189 | [
"MIT"
] | 1 | 2021-12-13T16:11:47.000Z | 2021-12-13T16:11:47.000Z | """
This program can be launched directly.
Example of how to use semantic cones, grasping and dropping
"""
import random
import time
import math
from typing import Optional
import numpy as np
from enum import Enum
from simple_playgrounds.common.position_utils import CoordinateSampler
from simple_playgrounds.engine i... | 35.239837 | 114 | 0.638136 |
74bca69b10acb76d70b40d8c9e6b81dfed68b250 | 5,399 | py | Python | taskflow/tests/unit/test_engine_helpers.py | JonasMie/taskflow | 942bb76d9cf69a87e7c78f0e231ce9b94e69bb37 | [
"Apache-2.0"
] | 299 | 2015-01-11T01:36:28.000Z | 2022-03-11T08:56:27.000Z | taskflow/tests/unit/test_engine_helpers.py | JonasMie/taskflow | 942bb76d9cf69a87e7c78f0e231ce9b94e69bb37 | [
"Apache-2.0"
] | 4 | 2015-02-06T11:12:58.000Z | 2018-10-19T18:55:58.000Z | taskflow/tests/unit/test_engine_helpers.py | jimbobhickville/taskflow | 6ea991ce94f5be46b7e4726b4c4f014e10407786 | [
"Apache-2.0"
] | 67 | 2015-01-11T14:34:24.000Z | 2022-01-14T02:57:03.000Z | # -*- coding: utf-8 -*-
# Copyright (C) 2013 Yahoo! Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2... | 37.493056 | 79 | 0.626042 |
74bccab4533d4babbe6d3790e1ac8659b1f642a4 | 8,886 | py | Python | data/level/level24.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | null | null | null | data/level/level24.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | 6 | 2020-07-04T02:53:08.000Z | 2022-03-11T23:53:14.000Z | data/level/level24.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | 3 | 2019-12-31T11:42:59.000Z | 2021-03-28T20:06:13.000Z | data = {
'level_index': 24,
'move_count': 22,
'board_info': {
(0, 1): {
'base': (5, 1),
'prev': (0, -1),
'next': (0, 1),
'fall_point': (0, -1)
},
(0, 2): {
'base': (6, 1),
'prev': (0, -1),
'next': (0,... | 22.843188 | 33 | 0.194463 |
74bcf8996f4687056ceff26dec0206e695b625ac | 1,077 | py | Python | python/test/test_data_integrations_api.py | openlattice/api-clients | 1d5be9861785b295089b732f37464e31bf80c8ca | [
"Apache-2.0"
] | null | null | null | python/test/test_data_integrations_api.py | openlattice/api-clients | 1d5be9861785b295089b732f37464e31bf80c8ca | [
"Apache-2.0"
] | 1 | 2021-01-20T00:20:01.000Z | 2021-01-20T00:20:01.000Z | python/test/test_data_integrations_api.py | openlattice/api-clients | 1d5be9861785b295089b732f37464e31bf80c8ca | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
OpenLattice API
OpenLattice API # noqa: E501
The version of the OpenAPI document: 0.0.1
Contact: support@openlattice.com
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import openlattice
from openlattice.api.data_in... | 21.979592 | 92 | 0.698236 |
74bcfa0479012b762e487d812bae295e40eb5422 | 8,972 | py | Python | detectron_/data/datasets/coco_panoptic.py | TalhaUsuf/RetinaNet_W9_form | 2a66bba1de96bebd679775b841d95ac7dcfcbbbe | [
"Apache-2.0"
] | null | null | null | detectron_/data/datasets/coco_panoptic.py | TalhaUsuf/RetinaNet_W9_form | 2a66bba1de96bebd679775b841d95ac7dcfcbbbe | [
"Apache-2.0"
] | null | null | null | detectron_/data/datasets/coco_panoptic.py | TalhaUsuf/RetinaNet_W9_form | 2a66bba1de96bebd679775b841d95ac7dcfcbbbe | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
import copy
import json
import os
from detectron.data import DatasetCatalog, MetadataCatalog
from detectron.utils.file_io import PathManager
from .coco import load_coco_json, load_sem_seg
__all__ = ["register_coco_panoptic", "register_coco_panoptic_separated"]
def... | 39.179039 | 99 | 0.682234 |
74bd2bcc47cfe5b8be22decac84de616312a386c | 9,067 | py | Python | system_c/scripts/combine_two_systems.py | hkayesh/depend_clean | 1d4bfdaf9a4d323582ab36e3ec0f9b4f2faae851 | [
"Apache-2.0"
] | null | null | null | system_c/scripts/combine_two_systems.py | hkayesh/depend_clean | 1d4bfdaf9a4d323582ab36e3ec0f9b4f2faae851 | [
"Apache-2.0"
] | null | null | null | system_c/scripts/combine_two_systems.py | hkayesh/depend_clean | 1d4bfdaf9a4d323582ab36e3ec0f9b4f2faae851 | [
"Apache-2.0"
] | null | null | null | from utilities import Utilities
# from comment_level_evaluation import CommentLevelEvaluation
import operator
class CombineSystems:
def __init__(self):
self.utilities = Utilities()
self.storage_path = 'comment-level-datasets-2/'
# self.storage_path = 'r-combine-outputs/'
# self.ra... | 38.419492 | 149 | 0.545715 |
74bd33d31373b8e76c119f84fda6cf85b7e6a737 | 3,358 | py | Python | lib/xutilities/tools/summary.py | ZiweiXU/CapsuleMotion | c034cf24560086c9eb4ec1573f93343a5d6beca6 | [
"MIT"
] | 6 | 2021-10-01T14:43:44.000Z | 2021-10-13T08:57:56.000Z | lib/xutilities/tools/summary.py | ZiweiXU/CapsuleMotion | c034cf24560086c9eb4ec1573f93343a5d6beca6 | [
"MIT"
] | null | null | null | lib/xutilities/tools/summary.py | ZiweiXU/CapsuleMotion | c034cf24560086c9eb4ec1573f93343a5d6beca6 | [
"MIT"
] | 1 | 2021-10-04T05:38:08.000Z | 2021-10-04T05:38:08.000Z | import argparse
import os
import re
import glob
from ast import literal_eval
import pandas as pd
from tqdm import tqdm
parser = argparse.ArgumentParser()
parser.add_argument('-f', '--file-name', type=str)
parser.add_argument('-d', '--directory', type=str)
parser.add_argument('-o', '--output', type=str, default='summa... | 36.901099 | 92 | 0.55539 |
74bd50bba371c238d28f516d251b4125f8d43722 | 278 | py | Python | lib_ss/ss_modeling/generic_ss_loss.py | YeLyuUT/VOSDetectron | add644f8f8ad3dd17098f0afa161335d457f05d6 | [
"MIT"
] | 2 | 2019-10-08T11:33:20.000Z | 2021-05-21T10:10:27.000Z | lib_ss/ss_modeling/generic_ss_loss.py | YeLyuUT/VOSDetectron | add644f8f8ad3dd17098f0afa161335d457f05d6 | [
"MIT"
] | null | null | null | lib_ss/ss_modeling/generic_ss_loss.py | YeLyuUT/VOSDetectron | add644f8f8ad3dd17098f0afa161335d457f05d6 | [
"MIT"
] | 2 | 2019-10-08T11:33:22.000Z | 2022-02-20T16:07:37.000Z | import torch
def ss_loss_2d_single_scale(weight=None, ignore_index=-100, reduction='elementwise_mean'):
# size_average and reduce are deprecated.
return torch.nn.CrossEntropyLoss(weight=weight, size_average=None, ignore_index=ignore_index, reduce=None, reduction=reduction) | 55.6 | 129 | 0.827338 |
74bd56f5d954cc12399bc8e9a508ee9f8fa22e1f | 5,646 | py | Python | util/helpers/conversions.py | chaneyddtt/Coarse-to-fine-3D-Animal | b3f9b1031b5761838c94ca091095636101747fd9 | [
"MIT"
] | 11 | 2021-11-17T03:11:21.000Z | 2022-03-23T06:38:19.000Z | util/helpers/conversions.py | chaneyddtt/Coarse-to-fine-3D-Animal | b3f9b1031b5761838c94ca091095636101747fd9 | [
"MIT"
] | 3 | 2021-12-07T07:42:33.000Z | 2022-01-07T11:41:17.000Z | util/helpers/conversions.py | chaneyddtt/Coarse-to-fine-3D-Animal | b3f9b1031b5761838c94ca091095636101747fd9 | [
"MIT"
] | 9 | 2021-11-26T08:57:19.000Z | 2022-03-22T10:29:19.000Z | import torch
import torch.nn as nn
import torchgeometry as tgm
def rotation_matrix_to_angle_axis(rotation_matrix):
"""Convert 3x4 rotation matrix to Rodrigues vector
Args:
rotation_matrix (Tensor): rotation matrix.
Returns:
Tensor: Rodrigues vector transformation.
Shape:
- I... | 36.192308 | 90 | 0.574389 |
74bd703620919b5d8109da31dfd522d925213ab3 | 2,679 | py | Python | sdk/machinelearning/azure-mgmt-guestconfig/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/machinelearning/azure-mgmt-guestconfig/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/machinelearning/azure-mgmt-guestconfig/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------... | 35.72 | 103 | 0.610302 |
74bda27e4a21be10082004aea589a9c335c9d5f0 | 2,358 | py | Python | validation-scripts/ice_validator/tests/test_parse_yaml.py | onap/vnfsdk-ice | 5fd4855accef1da2d19dec70c839fdd4080cbcb7 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | validation-scripts/ice_validator/tests/test_parse_yaml.py | onap/vnfsdk-ice | 5fd4855accef1da2d19dec70c839fdd4080cbcb7 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | validation-scripts/ice_validator/tests/test_parse_yaml.py | onap/vnfsdk-ice | 5fd4855accef1da2d19dec70c839fdd4080cbcb7 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | # -*- coding: utf8 -*-
# ============LICENSE_START=======================================================
# org.onap.vvp/validation-scripts
# ===================================================================
# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
# ========================================... | 38.655738 | 82 | 0.634012 |
74bddb4d5e4a6698d250ec664ffebf8e2dab6a4d | 1,401 | py | Python | src/fidesops/schemas/user.py | mohan-pogala/fidesops | 5c686362d4fb3b85253dd7e2898be1131a5071ab | [
"Apache-2.0"
] | null | null | null | src/fidesops/schemas/user.py | mohan-pogala/fidesops | 5c686362d4fb3b85253dd7e2898be1131a5071ab | [
"Apache-2.0"
] | null | null | null | src/fidesops/schemas/user.py | mohan-pogala/fidesops | 5c686362d4fb3b85253dd7e2898be1131a5071ab | [
"Apache-2.0"
] | null | null | null | import re
from pydantic import validator
from fidesops.schemas.base_class import BaseSchema
class UserCreate(BaseSchema):
"""Data required to create a FidesopsUser"""
username: str
password: str
@validator("username")
def validate_username(cls, username: str) -> str:
"""Ensure password... | 31.840909 | 81 | 0.640971 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.