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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ff2f86840e86178edda41ba02b979e953496df82 | 5,688 | py | Python | code/manifolds/hyperboloid.py | shaanchandra/SAFER | 0f98a1d2080e120174f17370d9d0472901a1c4a1 | [
"MIT"
] | 12 | 2020-09-13T10:07:45.000Z | 2022-01-12T02:22:34.000Z | code/manifolds/hyperboloid.py | shaanchandra/SAFER | 0f98a1d2080e120174f17370d9d0472901a1c4a1 | [
"MIT"
] | 1 | 2020-10-28T18:10:03.000Z | 2020-10-28T18:10:03.000Z | code/manifolds/hyperboloid.py | shaanchandra/SAFER | 0f98a1d2080e120174f17370d9d0472901a1c4a1 | [
"MIT"
] | 4 | 2021-01-14T09:54:14.000Z | 2022-01-15T16:47:54.000Z | """Hyperboloid manifold."""
import torch
from manifolds.base import Manifold
from utils.math_utils import arcosh, cosh, sinh
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
class Hyperboloid(Manifold):
"""
Hyperboloid manifold class.
We use the following convention: -x0^2 ... | 34.05988 | 88 | 0.519515 |
ff2fc112a3f06844e31d7886a5b0e55547360460 | 6,305 | py | Python | project_tests.py | DhruvaKumar/CarND-Semantic-Segmentation | 52392fa0e7c5608818432a6f23d613d75a077938 | [
"MIT"
] | null | null | null | project_tests.py | DhruvaKumar/CarND-Semantic-Segmentation | 52392fa0e7c5608818432a6f23d613d75a077938 | [
"MIT"
] | null | null | null | project_tests.py | DhruvaKumar/CarND-Semantic-Segmentation | 52392fa0e7c5608818432a6f23d613d75a077938 | [
"MIT"
] | 1 | 2021-01-21T08:04:02.000Z | 2021-01-21T08:04:02.000Z | import sys
import os
from copy import deepcopy
from glob import glob
from unittest import mock
import numpy as np
import tensorflow as tf
def test_safe(func):
"""
Isolate tests
"""
def func_wrapper(*args):
with tf.Graph().as_default():
result = func(*args)
print('Tests Pas... | 40.159236 | 125 | 0.69659 |
ff3001afb9cbd9fa32bb67d02a6b1d9d3e022a85 | 1,176 | py | Python | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01_preview/models/registry_password_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01_preview/models/registry_password_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01_preview/models/registry_password_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"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 ... | 33.6 | 76 | 0.588435 |
ff3023dade8c83708d8add43fd4f0aab8186ba94 | 789 | py | Python | rosey/metrics.py | arose13/rosey | c35398b4ad4f334f4b40a075d18b33a262ce1d7d | [
"BSD-3-Clause"
] | 11 | 2018-05-28T20:42:09.000Z | 2021-01-03T16:52:31.000Z | rosey/metrics.py | arose13/rosey | c35398b4ad4f334f4b40a075d18b33a262ce1d7d | [
"BSD-3-Clause"
] | 1 | 2019-03-30T13:17:01.000Z | 2019-03-30T13:17:01.000Z | rosey/metrics.py | arose13/rosey | c35398b4ad4f334f4b40a075d18b33a262ce1d7d | [
"BSD-3-Clause"
] | null | null | null | """
List of objective functions
"""
import numpy as np
def fancy_hinge(y_true, y_pred, slope=0, flip=False, transition=0):
"""
This is a regression cost function that penalises overestimation much more harshly than underestimation
(and visa versa)
:param y_true:
:param y_pred:
:param slope: s... | 27.206897 | 107 | 0.678074 |
ff305a3ca1849336cd87c1bb395d247f26973fcd | 603 | py | Python | katas/may2018/generator_fun.py | igoroya/pycodingkatas | 75b14d0a30b2b2248d064a4b4ffcf43ba14535d8 | [
"MIT"
] | null | null | null | katas/may2018/generator_fun.py | igoroya/pycodingkatas | 75b14d0a30b2b2248d064a4b4ffcf43ba14535d8 | [
"MIT"
] | null | null | null | katas/may2018/generator_fun.py | igoroya/pycodingkatas | 75b14d0a30b2b2248d064a4b4ffcf43ba14535d8 | [
"MIT"
] | null | null | null | '''
Created on 11 May 2018
Module to experiment with comprehension-s and generators
@author: igoroya
'''
import string
def get_even_numbers(entries):
numbers = [i for i in range(1, 2*entries+1) if i % 2 == 0]
return numbers
def create_powers_of_two(entries):
numbers = [2**i for i in range(1, entries)]... | 19.451613 | 62 | 0.704809 |
ff30662f2fddffd6ac7f4df2b6d4dc86296d3faa | 2,633 | py | Python | var/spack/repos/builtin/packages/alquimia/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 348 | 2015-12-30T04:05:54.000Z | 2022-02-21T10:57:53.000Z | var/spack/repos/builtin/packages/alquimia/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 3,994 | 2015-12-09T09:43:00.000Z | 2017-11-04T02:46:39.000Z | var/spack/repos/builtin/packages/alquimia/package.py | flatironinstitute/spack | 71a7b1b5fadbe16bcdb36fb679aa828cd7d83b02 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 359 | 2015-12-16T18:25:55.000Z | 2017-11-02T14:51:13.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Alquimia(CMakePackage):
"""Alquimia is an interface that exposes the capabilities
of m... | 43.163934 | 86 | 0.608811 |
ff30701bda063999116ac5380f026e6739dd6242 | 15,358 | bzl | Python | third_party/rules_pkg-0.7.0/pkg/private/pkg_files.bzl | Vertexwahn/FlatlandRT | 37d09fde38b25eff5f802200b43628efbd1e3198 | [
"Apache-2.0"
] | 62 | 2021-09-21T18:58:02.000Z | 2022-03-07T02:17:43.000Z | third_party/rules_pkg-0.7.0/pkg/private/pkg_files.bzl | Vertexwahn/FlatlandRT | 37d09fde38b25eff5f802200b43628efbd1e3198 | [
"Apache-2.0"
] | null | null | null | third_party/rules_pkg-0.7.0/pkg/private/pkg_files.bzl | Vertexwahn/FlatlandRT | 37d09fde38b25eff5f802200b43628efbd1e3198 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The Bazel 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 la... | 37.007229 | 115 | 0.631332 |
ff30905a5426a680be8b3d2d123b39d14ba24215 | 10,033 | py | Python | test/test_layout.py | DanBenHa/pelita | 557c3a757a24e0f1abe25f7edf5c4ffee83a077e | [
"BSD-2-Clause"
] | null | null | null | test/test_layout.py | DanBenHa/pelita | 557c3a757a24e0f1abe25f7edf5c4ffee83a077e | [
"BSD-2-Clause"
] | null | null | null | test/test_layout.py | DanBenHa/pelita | 557c3a757a24e0f1abe25f7edf5c4ffee83a077e | [
"BSD-2-Clause"
] | null | null | null | from pathlib import Path
from textwrap import dedent
import pytest
from pelita.layout import *
LAYOUT="""
########
# ###E0#
#1E #
########
"""
LAYOUT2="""
########
# ### #
# . ...#
########
"""
def test_get_available_layouts():
available = get_available_layouts(size='all')
assert 300 == len(available)
... | 21.954048 | 96 | 0.388518 |
ff30ea49b9fced70bfe5917cf8ccf6b4c62de68c | 6,300 | py | Python | gooey/python_bindings/gooey_parser.py | kaefik/py-template | 2e46d09af6fb8d4c722c55c339ae35a3965d348b | [
"MIT"
] | null | null | null | gooey/python_bindings/gooey_parser.py | kaefik/py-template | 2e46d09af6fb8d4c722c55c339ae35a3965d348b | [
"MIT"
] | null | null | null | gooey/python_bindings/gooey_parser.py | kaefik/py-template | 2e46d09af6fb8d4c722c55c339ae35a3965d348b | [
"MIT"
] | null | null | null | from argparse import ArgumentParser, _SubParsersAction
from argparse import _MutuallyExclusiveGroup, _ArgumentGroup
from textwrap import dedent
from gooey.gui.lang.i18n import _
class GooeySubParser(_SubParsersAction):
def __init__(self, *args, **kwargs):
super(GooeySubParser, self).__init__(*ar... | 39.622642 | 113 | 0.64619 |
ff3129fef766085311e5247b6df7b182ee21c5d2 | 14,594 | py | Python | impacket/testcases/SMB_RPC/test_lsat.py | black-security/impacket3 | 5b6145b3f511d4f7cddaba64cf150b109113afea | [
"Apache-1.1"
] | null | null | null | impacket/testcases/SMB_RPC/test_lsat.py | black-security/impacket3 | 5b6145b3f511d4f7cddaba64cf150b109113afea | [
"Apache-1.1"
] | null | null | null | impacket/testcases/SMB_RPC/test_lsat.py | black-security/impacket3 | 5b6145b3f511d4f7cddaba64cf150b109113afea | [
"Apache-1.1"
] | 1 | 2022-01-28T00:53:41.000Z | 2022-01-28T00:53:41.000Z | ###############################################################################
# Tested so far:
#
# LsarGetUserName
# LsarLookupNames
# LsarLookupSids
# LsarLookupSids2
# LsarLookupNames3
# LsarLookupNames2
#
# Not yet:
#
# LsarLookupNames4
# LsarLookupSids3
#
# Shouldn't dump errors against a win7
#
###############... | 39.231183 | 99 | 0.625942 |
ff31361f8df133aa19ce84d8ede56982cc52fe36 | 1,095 | py | Python | cracking the code interview/heap_median.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 3 | 2017-02-15T20:55:04.000Z | 2018-09-26T18:48:24.000Z | cracking the code interview/heap_median.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 4 | 2017-10-07T18:59:20.000Z | 2019-10-08T05:43:25.000Z | cracking the code interview/heap_median.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 1 | 2017-10-08T06:52:21.000Z | 2017-10-08T06:52:21.000Z | #https://www.hackerrank.com/challenges/ctci-find-the-running-median
from heapq import *
class Spliter:
def __init__(self):
#minheap
self.upper = []
#max heap
self.lower = []
def median(self):
#for odd length arrays
if len(self.upper) > len(self.lower):
... | 28.815789 | 67 | 0.559817 |
ff31557fb6838bbe7deaf6cf772aecdea43fa4d8 | 467 | py | Python | alipay/aop/api/response/AlipayOpenMiniMorphoAppauditCancelResponse.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/response/AlipayOpenMiniMorphoAppauditCancelResponse.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/response/AlipayOpenMiniMorphoAppauditCancelResponse.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.response.AlipayResponse import AlipayResponse
class AlipayOpenMiniMorphoAppauditCancelResponse(AlipayResponse):
def __init__(self):
super(AlipayOpenMiniMorphoAppauditCancelResponse, self).__init__()
def parse_response_co... | 29.1875 | 115 | 0.792291 |
ff31587efe45fe603c989d4f28af106c826f7dd9 | 419 | py | Python | abc/abc047/c/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | abc/abc047/c/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | abc/abc047/c/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | import sys
import math
from collections import defaultdict, deque
sys.setrecursionlimit(10 ** 6)
stdin = sys.stdin
INF = float('inf')
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()
tmpS = ns()
N = len(tmpS)
S = []
i = 0
while i < N:
S.append(tm... | 17.458333 | 53 | 0.596659 |
ff315fc5b4ee8a4fd526c31cd724b2e081c0fba9 | 2,674 | py | Python | mpi_accumulate.py | yishayv/lyacorr | deed114b4cadd4971caec68e2838a5fac39827b1 | [
"MIT"
] | 2 | 2017-03-21T14:18:35.000Z | 2020-03-30T20:51:33.000Z | mpi_accumulate.py | yishayv/lyacorr | deed114b4cadd4971caec68e2838a5fac39827b1 | [
"MIT"
] | null | null | null | mpi_accumulate.py | yishayv/lyacorr | deed114b4cadd4971caec68e2838a5fac39827b1 | [
"MIT"
] | null | null | null | import itertools
from collections import Iterable
import numpy as np
from astropy import table as table
from mpi4py import MPI
import common_settings
import mpi_helper
from mpi_helper import l_print_no_barrier
settings = common_settings.Settings() # type: common_settings.Settings
comm = MPI.COMM_WORLD
def split_... | 38.753623 | 110 | 0.707928 |
ff3169f39bcebcdfad0aabddc923922403a4b58c | 872 | py | Python | bot/peripherals/gpio_check.py | kaulketh/greenhouse | e8c78aac61a9d8ede30ce5755a60b1a461947bc3 | [
"Unlicense"
] | 8 | 2019-04-27T04:01:58.000Z | 2021-02-16T02:19:52.000Z | bot/peripherals/gpio_check.py | kaulketh/new-greenhouse | 7e5be47b6f1c180a1c7e1a45fa14a412af26f2e0 | [
"Unlicense"
] | 21 | 2018-11-29T12:30:10.000Z | 2019-04-25T19:00:00.000Z | bot/peripherals/gpio_check.py | kaulketh/new-greenhouse | 7e5be47b6f1c180a1c7e1a45fa14a412af26f2e0 | [
"Unlicense"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# gpio_check.py
"""
author: Thomas Kaulke, kaulketh@gmail.com
"""
from __future__ import absolute_import
from subprocess import Popen, PIPE
import sys
import logger.logger as log
logging = log.get_logger()
pin_to_check = int(sys.argv[1])
gpios = (21, 22, 23, 24, 25, 27, 28,... | 23.567568 | 110 | 0.62844 |
ff3185ec781eaf5be2a58d61c22b32586d366126 | 880 | py | Python | cloning/encoder/data_objects/utterance.py | speydril/mycroft-core | e6e95f648e1b4be597da26cd4477f54d04d94461 | [
"Apache-2.0"
] | 3 | 2021-04-26T00:17:14.000Z | 2021-07-04T15:30:09.000Z | cloning/encoder/data_objects/utterance.py | speydril/mycroft-core | e6e95f648e1b4be597da26cd4477f54d04d94461 | [
"Apache-2.0"
] | null | null | null | cloning/encoder/data_objects/utterance.py | speydril/mycroft-core | e6e95f648e1b4be597da26cd4477f54d04d94461 | [
"Apache-2.0"
] | null | null | null | import numpy as np
class Utterance:
def __init__(self, frames_fpath, wave_fpath):
self.frames_fpath = frames_fpath
self.wave_fpath = wave_fpath
def get_frames(self):
return np.load(self.frames_fpath)
def random_partial(self, n_frames):
"""
Cro... | 33.846154 | 95 | 0.604545 |
ff319c5c981e848722b959dff284379242ee3ec6 | 2,212 | py | Python | test_patchsim/test_manual.py | parantapa/PatchSim | 4cf8dc86c422351841d65b708cca40c5fa14b5dd | [
"MIT"
] | 18 | 2020-03-01T07:05:45.000Z | 2021-08-02T09:57:39.000Z | test_patchsim/test_manual.py | parantapa/PatchSim | 4cf8dc86c422351841d65b708cca40c5fa14b5dd | [
"MIT"
] | 4 | 2020-02-19T01:27:50.000Z | 2020-04-28T15:32:14.000Z | test_patchsim/test_manual.py | parantapa/PatchSim | 4cf8dc86c422351841d65b708cca40c5fa14b5dd | [
"MIT"
] | 11 | 2020-02-19T00:37:44.000Z | 2021-08-08T14:35:42.000Z | """Tests from the manual tests directory."""
import pytest
from util import assert_equal_files, chdir_context
import patchsim as sim
def test_det(workdir):
"""Run the test_det setting."""
with chdir_context(workdir):
configs = sim.read_config("cfg_test_det")
sim.run_disease_simulation(config... | 32.529412 | 71 | 0.711121 |
ff31c349e2d2188abf9246a25b396b0fce768123 | 6,010 | py | Python | back/api/admin.py | endorria/geoshop2 | 2a558710fedfaeb2319ba36bc84f4fc956e5f370 | [
"BSD-3-Clause"
] | null | null | null | back/api/admin.py | endorria/geoshop2 | 2a558710fedfaeb2319ba36bc84f4fc956e5f370 | [
"BSD-3-Clause"
] | null | null | null | back/api/admin.py | endorria/geoshop2 | 2a558710fedfaeb2319ba36bc84f4fc956e5f370 | [
"BSD-3-Clause"
] | null | null | null | from django import forms
from django.conf import settings
from django.db import models
from django.contrib import messages
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.contrib.auth import get_user_model
from django.contrib.gis import admin
from django.http import HttpResponseRedirect
fro... | 33.388889 | 105 | 0.653577 |
ff31df41821df6d4d547059c8ec35e53d9d8883a | 53 | py | Python | utils/parser/mcl.py | legumeinfo/CoNekT | 709a4980cfa255cafd456b268e274db2b4b1f5fb | [
"MIT"
] | 14 | 2018-08-20T03:07:21.000Z | 2021-11-04T11:15:31.000Z | utils/parser/mcl.py | mutwil/CoNekT | f4a4496a87d14b15bcf587975b31a2edc24c6bf7 | [
"MIT"
] | 9 | 2018-07-17T15:30:47.000Z | 2021-07-05T13:11:54.000Z | utils/parser/mcl.py | mutwil/CoNekT | f4a4496a87d14b15bcf587975b31a2edc24c6bf7 | [
"MIT"
] | 3 | 2019-08-05T09:16:34.000Z | 2019-12-04T23:59:28.000Z |
def read_mcl(filename, prefix='cluster_'):
pass | 13.25 | 42 | 0.698113 |
ff31ebe52c6f351f367e6961a4bf8329d12838dd | 3,733 | py | Python | 5/day5.py | dan-blanchard/advent-of-code-2020 | 5d87daece5872f9a4535c3d494cfa51f98666411 | [
"MIT"
] | null | null | null | 5/day5.py | dan-blanchard/advent-of-code-2020 | 5d87daece5872f9a4535c3d494cfa51f98666411 | [
"MIT"
] | null | null | null | 5/day5.py | dan-blanchard/advent-of-code-2020 | 5d87daece5872f9a4535c3d494cfa51f98666411 | [
"MIT"
] | null | null | null | """
The first 7 characters will either be F or B; these specify exactly one of the 128 rows on the plane (numbered 0 through 127). Each letter tells you which half of a region the given seat is in. Start with the whole list of rows; the first letter indicates whether the seat is in the front (0 through 63) or the back ... | 39.294737 | 451 | 0.67506 |
ff321c4b278e222cd3a5c85b7713173247efce97 | 2,422 | py | Python | venv/Lib/site-packages/pyrogram/raw/functions/invoke_after_msgs.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/invoke_after_msgs.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/functions/invoke_after_msgs.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... | 31.051282 | 103 | 0.615194 |
ff323d938767c239124bafddc13c1c7d9003066b | 642 | py | Python | singleshotpose/loggers.py | neighthan/singleshotpose | 8bba18f52a3e24c50886932180b7866c43999abf | [
"MIT"
] | null | null | null | singleshotpose/loggers.py | neighthan/singleshotpose | 8bba18f52a3e24c50886932180b7866c43999abf | [
"MIT"
] | null | null | null | singleshotpose/loggers.py | neighthan/singleshotpose | 8bba18f52a3e24c50886932180b7866c43999abf | [
"MIT"
] | null | null | null | from typing import Any, Dict
from comet_ml import Experiment
class Logger:
def log(self, metrics: Dict[str, Any]):
"""
:param metrics:
"""
class StdIOLogger(Logger):
def log(self, metrics):
print(
"{n_seen}: nGT {n_ground_truth}, recall {n_correct}, proposals {n_... | 22.928571 | 175 | 0.596573 |
ff324e286fa73b06aabb47140451c9e62acc0410 | 70,083 | py | Python | Sklearn_scipy_numpy/source/sklearn/ensemble/gradient_boosting.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | 1 | 2019-06-27T12:09:44.000Z | 2019-06-27T12:09:44.000Z | Sklearn_scipy_numpy/source/sklearn/ensemble/gradient_boosting.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | null | null | null | Sklearn_scipy_numpy/source/sklearn/ensemble/gradient_boosting.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | null | null | null | """Gradient Boosted Regression Trees
This module contains methods for fitting gradient boosted regression trees for
both classification and regression.
The module structure is the following:
- The ``BaseGradientBoosting`` base class implements a common ``fit`` method
for all the estimators in the module. Regressio... | 38.401644 | 91 | 0.603813 |
ff32519881d8429ba37e9d97656c1e5b8bcf4ed8 | 1,520 | py | Python | setup.py | sthagen/chirun-ncl-chirun | 45897319d5203b9867b5d6e00b2db1aa90a6580c | [
"Apache-2.0"
] | 5 | 2021-12-06T15:57:24.000Z | 2022-01-24T20:34:00.000Z | setup.py | sthagen/chirun-ncl-chirun | 45897319d5203b9867b5d6e00b2db1aa90a6580c | [
"Apache-2.0"
] | 38 | 2021-12-09T13:16:46.000Z | 2022-03-30T11:42:13.000Z | setup.py | sthagen/chirun-ncl-chirun | 45897319d5203b9867b5d6e00b2db1aa90a6580c | [
"Apache-2.0"
] | 1 | 2022-01-17T17:41:35.000Z | 2022-01-17T17:41:35.000Z | #!/usr/bin/env python
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
setup(name="chirun",
description="Produce flexible and accessible course notes, in a variety of formats, using LaTeX or Markdown source",
version="0.7.0",
author="E-Lear... | 30.4 | 122 | 0.526316 |
ff326f1c512293dcf12f0846cf25e6c99701a137 | 28,890 | py | Python | utilities/useq_share_run.py | UMCUGenetics/clarity_utils | 85c79a906bc587fbdc67d1329e0bc56923769d53 | [
"MIT"
] | 1 | 2018-06-18T16:15:48.000Z | 2018-06-18T16:15:48.000Z | utilities/useq_share_run.py | UMCUGenetics/clarity_utils | 85c79a906bc587fbdc67d1329e0bc56923769d53 | [
"MIT"
] | 1 | 2018-06-20T13:00:40.000Z | 2018-06-26T12:10:58.000Z | utilities/useq_share_run.py | UMCUGenetics/clarity_utils_usf | 85c79a906bc587fbdc67d1329e0bc56923769d53 | [
"MIT"
] | null | null | null | from genologics.entities import Project
from config import Config
from texttable import Texttable
import datetime
import os
import multiprocessing
import time
from modules.useq_nextcloud import NextcloudUtil
from modules.useq_mail import sendMail
from modules.useq_template import TEMPLATE_PATH,TEMPLATE_ENVIRONMENT,rend... | 44.446154 | 242 | 0.605054 |
ff328ab07e14bc24838b7022614eb4887ef4d41f | 9,756 | py | Python | lizard_ext/lizardduplicate.py | benolayinka/lizard | ad8ea93505af8f9199e580003d5acecf5b6bccf3 | [
"MIT"
] | null | null | null | lizard_ext/lizardduplicate.py | benolayinka/lizard | ad8ea93505af8f9199e580003d5acecf5b6bccf3 | [
"MIT"
] | null | null | null | lizard_ext/lizardduplicate.py | benolayinka/lizard | ad8ea93505af8f9199e580003d5acecf5b6bccf3 | [
"MIT"
] | null | null | null | '''
Get Duplicated parameter lists
'''
from __future__ import print_function
from collections import deque
from itertools import groupby
from .default_ordered_dict import DefaultOrderedDict
from .extension_base import ExtensionBase
class CodeSnippet(object):
def __init__(self, start_line, end_line, file_name):
... | 34.473498 | 78 | 0.596966 |
ff328f66c48ed9c0b62fbddda48e94cdd25c4303 | 3,289 | py | Python | parsl/tests/integration/latency.py | aquanauts/parsl | 978bb483a4a41b3cef083aa242b2a78614a02dd0 | [
"Apache-2.0"
] | null | null | null | parsl/tests/integration/latency.py | aquanauts/parsl | 978bb483a4a41b3cef083aa242b2a78614a02dd0 | [
"Apache-2.0"
] | null | null | null | parsl/tests/integration/latency.py | aquanauts/parsl | 978bb483a4a41b3cef083aa242b2a78614a02dd0 | [
"Apache-2.0"
] | null | null | null | """
What is this test
=================
This simple test measures the time taken to launch single tasks and receive results from an executor.
We will call get the result back after launch as ``latency`` and the combined measure of time to launch
and the time to get the result back as ``roundtrip time``.
How do we m... | 24.916667 | 103 | 0.574947 |
ff32b873d850d52a9785fa634f438dec178fc9fc | 950 | py | Python | publication_backbone/plugins/form_designer_plugin/migrations/0001_initial.py | Excentrics/publication-backbone | 65c9820308b09a6ae1086c265f8d49e36f3724b9 | [
"BSD-3-Clause"
] | 6 | 2016-05-19T14:59:51.000Z | 2020-03-19T10:08:29.000Z | publication_backbone/plugins/form_designer_plugin/migrations/0001_initial.py | Excentrics/publication-backbone | 65c9820308b09a6ae1086c265f8d49e36f3724b9 | [
"BSD-3-Clause"
] | null | null | null | publication_backbone/plugins/form_designer_plugin/migrations/0001_initial.py | Excentrics/publication-backbone | 65c9820308b09a6ae1086c265f8d49e36f3724b9 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('fluent_contents', '0001_initial'),
('form_designer', '0001_initial'),
]
operations = [
migrations.CreateModel(
... | 32.758621 | 164 | 0.605263 |
ff332944359634e7069d2645f95abcc3b7d06c2e | 4,207 | py | Python | cvpr15_eval/plot_fmeasuer_vs_proposal.py | m-novikov/hytra | 0dc28deaa2571fa8bea63ca178f0e53cc1cd7508 | [
"MIT"
] | 1 | 2021-08-25T03:57:55.000Z | 2021-08-25T03:57:55.000Z | cvpr15_eval/plot_fmeasuer_vs_proposal.py | m-novikov/hytra | 0dc28deaa2571fa8bea63ca178f0e53cc1cd7508 | [
"MIT"
] | 1 | 2019-04-01T13:39:09.000Z | 2019-04-01T13:39:09.000Z | cvpr15_eval/plot_fmeasuer_vs_proposal.py | m-novikov/hytra | 0dc28deaa2571fa8bea63ca178f0e53cc1cd7508 | [
"MIT"
] | 1 | 2018-11-15T13:17:26.000Z | 2018-11-15T13:17:26.000Z | #!/usr/bin/env python
import os.path
import sys
sys.path.append('.')
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../hytra/.')
import numpy as np
import os
import string
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1.axes_divider import make_axe... | 41.245098 | 126 | 0.602092 |
ff33505027db796253bc4140b94454ca731200c5 | 655 | py | Python | services/traction/acapy_wrapper/models/remove_wallet_request.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 12 | 2022-01-29T20:30:03.000Z | 2022-03-29T11:46:14.000Z | services/traction/acapy_wrapper/models/remove_wallet_request.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 38 | 2021-11-22T17:52:50.000Z | 2022-03-31T17:52:00.000Z | services/traction/acapy_wrapper/models/remove_wallet_request.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 9 | 2021-11-22T18:05:48.000Z | 2022-03-29T11:25:08.000Z | # coding: utf-8
from __future__ import annotations
from datetime import date, datetime # noqa: F401
import re # noqa: F401
from typing import Any, Dict, List, Optional # noqa: F401
from pydantic import AnyUrl, BaseModel, EmailStr, validator # noqa: F401
class RemoveWalletRequest(BaseModel):
"""NOTE: This c... | 25.192308 | 96 | 0.740458 |
ff336316fcddf5f24a067893f766bad293709c59 | 233 | py | Python | rlkit/envs/contextual/__init__.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 11 | 2020-01-24T17:16:42.000Z | 2022-01-30T23:07:06.000Z | rlkit/envs/contextual/__init__.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | rlkit/envs/contextual/__init__.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 3 | 2020-04-13T09:17:25.000Z | 2021-10-16T08:03:10.000Z | from rlkit.envs.contextual.contextual_env import (
ContextualEnv,
ContextualRewardFn,
delete_info,
insert_reward,
)
__all__ = [
'ContextualEnv',
'ContextualRewardFn',
'delete_info',
'insert_reward',
] | 17.923077 | 50 | 0.686695 |
ff33965f66623510414a3155f1f7f64b43b16764 | 10,590 | py | Python | salt/returners/postgres_local_cache.py | ari/salt | 05de98e237719b4f0cc68f08871ffaa532eddec5 | [
"Apache-2.0"
] | null | null | null | salt/returners/postgres_local_cache.py | ari/salt | 05de98e237719b4f0cc68f08871ffaa532eddec5 | [
"Apache-2.0"
] | null | null | null | salt/returners/postgres_local_cache.py | ari/salt | 05de98e237719b4f0cc68f08871ffaa532eddec5 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Use a postgresql server for the master job cache. This helps the job cache to
cope with scale.
.. note::
:mod:`returners.postgres <salt.returners.postgres>` is also available if
you are not using PostgreSQL as a :ref:`master job cache
<external-job-cache>`. These two modules pr... | 25.57971 | 82 | 0.603305 |
ff33c320306f5f6ea0b15713e243bae88f410af3 | 1,446 | py | Python | parsl/tests/test_python_apps/test_outputs.py | aquanauts/parsl | 978bb483a4a41b3cef083aa242b2a78614a02dd0 | [
"Apache-2.0"
] | 1 | 2020-11-21T17:32:09.000Z | 2020-11-21T17:32:09.000Z | parsl/tests/test_python_apps/test_outputs.py | aquanauts/parsl | 978bb483a4a41b3cef083aa242b2a78614a02dd0 | [
"Apache-2.0"
] | null | null | null | parsl/tests/test_python_apps/test_outputs.py | aquanauts/parsl | 978bb483a4a41b3cef083aa242b2a78614a02dd0 | [
"Apache-2.0"
] | 1 | 2022-03-09T10:51:12.000Z | 2022-03-09T10:51:12.000Z | import argparse
import os
import shutil
import pytest
from parsl.app.app import python_app
from parsl.tests.configs.local_threads import config
local_config = config
@python_app
def double(x, outputs=[]):
with open(outputs[0], 'w') as f:
f.write(x * 5)
return x * 5
whitelist = os.path.join(os.pa... | 25.821429 | 92 | 0.634163 |
ff342231fc79d7f67f1e646d8efebd1f617a22af | 25 | py | Python | btd6_memory_info/generated/System/DateTimeParse/date_time_parse.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/System/DateTimeParse/date_time_parse.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/System/DateTimeParse/date_time_parse.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class DateTimeParse: pass | 25 | 25 | 0.88 |
ff34453029eab5a5278b4880f4a8bc0aae324355 | 1,640 | py | Python | pluginsmanager/model/lv2/lv2_plugin.py | SpotlightKid/PluginsManager | 2dcc9f6a79b48e9c9be82efffd855352fa15c5c7 | [
"Apache-2.0"
] | 9 | 2017-05-24T09:55:34.000Z | 2020-06-22T03:55:51.000Z | pluginsmanager/model/lv2/lv2_plugin.py | SpotlightKid/PluginsManager | 2dcc9f6a79b48e9c9be82efffd855352fa15c5c7 | [
"Apache-2.0"
] | 97 | 2016-11-17T16:30:35.000Z | 2021-10-09T00:27:56.000Z | pluginsmanager/model/lv2/lv2_plugin.py | SpotlightKid/PluginsManager | 2dcc9f6a79b48e9c9be82efffd855352fa15c5c7 | [
"Apache-2.0"
] | 3 | 2017-05-21T19:20:38.000Z | 2019-11-04T23:53:59.000Z | # Copyright 2017 SrMouraSilva
#
# 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,... | 27.79661 | 93 | 0.634146 |
ff3447aae87ee72dfa58b54c1be5e1cc40807d25 | 5,310 | py | Python | Code_for_Classification/ABR_SVM/ABR_SVM_v1.0.2_avg_spec_800_4.py | puyaraimondii/biometric-classification-of-frequency-following-responses | f5b5dca516592be451a3133acb8fa178519bc991 | [
"MIT"
] | 1 | 2021-04-20T14:47:40.000Z | 2021-04-20T14:47:40.000Z | Code_for_Classification/ABR_SVM/ABR_SVM_v1.0.2_avg_spec_800_4.py | puyaraimondii/biometric-classification-of-frequency-following-responses | f5b5dca516592be451a3133acb8fa178519bc991 | [
"MIT"
] | null | null | null | Code_for_Classification/ABR_SVM/ABR_SVM_v1.0.2_avg_spec_800_4.py | puyaraimondii/biometric-classification-of-frequency-following-responses | f5b5dca516592be451a3133acb8fa178519bc991 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Sep 11 11:52:08 2019
@author: bruce
"""
#coding=utf-8
from sklearn.datasets import load_digits # 从skleran.datasets里有导入手写体数字加载器
from sklearn.model_selection import train_test_split #导入train_test_split用于数据分割
from sklearn.preprocessing import StandardS... | 26.818182 | 147 | 0.674011 |
ff34511b09a56c24d1ae5653d644cfcacea19927 | 2,228 | py | Python | Tools/Scripts/webkitpy/style/checkers/jstest_unittest.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 6 | 2021-07-05T16:09:39.000Z | 2022-03-06T22:44:42.000Z | Tools/Scripts/webkitpy/style/checkers/jstest_unittest.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 7 | 2022-03-15T13:25:39.000Z | 2022-03-15T13:25:44.000Z | Tools/Scripts/webkitpy/style/checkers/jstest_unittest.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | null | null | null | # Copyright (C) 2017 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | 33.253731 | 77 | 0.74237 |
ff3492fea5ee654f675f9e1954d6c9afab8719a1 | 934 | py | Python | lemur/plugins/bases/source.py | x-lhan/lemur | 1d8aaa4a242af610363e961167bc31691b358773 | [
"Apache-2.0"
] | null | null | null | lemur/plugins/bases/source.py | x-lhan/lemur | 1d8aaa4a242af610363e961167bc31691b358773 | [
"Apache-2.0"
] | null | null | null | lemur/plugins/bases/source.py | x-lhan/lemur | 1d8aaa4a242af610363e961167bc31691b358773 | [
"Apache-2.0"
] | null | null | null | """
.. module: lemur.plugins.bases.source
:platform: Unix
:copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
"""
from lemur.plugins.base import Plugin
class SourcePlugin(Plugin):
type = 'sou... | 25.243243 | 81 | 0.624197 |
ff34b119c9656b610bad936e3e3303e781e6147f | 940 | py | Python | backtracking/0017-letter-combinations-of-a-phone-number(隐式回溯).py | ZHUANGHP/LeetCode-Solution-Python | af2b14abb7f50ee061bcd601c8666b32e448cbd8 | [
"Apache-2.0"
] | 1 | 2021-01-10T17:03:21.000Z | 2021-01-10T17:03:21.000Z | backtracking/0017-letter-combinations-of-a-phone-number(隐式回溯).py | ZHUANGHP/LeetCode-Solution-Python | af2b14abb7f50ee061bcd601c8666b32e448cbd8 | [
"Apache-2.0"
] | null | null | null | backtracking/0017-letter-combinations-of-a-phone-number(隐式回溯).py | ZHUANGHP/LeetCode-Solution-Python | af2b14abb7f50ee061bcd601c8666b32e448cbd8 | [
"Apache-2.0"
] | 1 | 2021-07-25T07:53:14.000Z | 2021-07-25T07:53:14.000Z | from typing import List
class Solution:
# 隐式回溯
digits_array = [" ", "", "abc", "def", "ghi", "jkl", "mno",
"pqrs", "tuv", "wxyz"]
def letterCombinations(self, digits: str) -> List[str]:
size = len(digits)
if size == 0:
return []
res = []
s... | 23.5 | 65 | 0.502128 |
ff34dab95d7dfed27281a2bbbceae75ed946435b | 2,818 | py | Python | userbot/modules/webupload.py | FSharon/UserBot | e21c30ffc15143a97cd2a3ad133926b34b68b8f1 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 3 | 2020-10-25T03:36:43.000Z | 2021-05-27T09:10:09.000Z | userbot/modules/webupload.py | FSharon/UserBot | e21c30ffc15143a97cd2a3ad133926b34b68b8f1 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 3 | 2021-07-16T10:10:09.000Z | 2021-12-19T23:34:15.000Z | userbot/modules/webupload.py | minaricious/UserBot | e21c30ffc15143a97cd2a3ad133926b34b68b8f1 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 7 | 2020-10-27T03:00:57.000Z | 2021-09-02T12:17:54.000Z | # Kanged from UniBorg
# Modified by AnggaR96s
import asyncio
import json
import os
from userbot import CMD_HELP, TEMP_DOWNLOAD_DIRECTORY
from userbot.events import register
@register(outgoing=True,
pattern=r"^\.web ?(.+?|) (anonfiles|transfer|filebin|anonymousfiles|megaupload|bayfiles|letsupload|0x0)",
... | 39.138889 | 123 | 0.6423 |
ff34dbcfd53e7fc9fb819fc95f0de619a724b61c | 595 | py | Python | array/swapsequences.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | array/swapsequences.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | array/swapsequences.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | class Solution:
def minSwap(self, A: [int], B: [int]) -> int:
swap, keep = 1, 0
for i in range(1, len(A)):
if A[i] <= A[i - 1] or B[i] <= B[i - 1]:
# swap
nswap = keep + 1
nkeep = swap
elif A[i] > B[i - 1] and B[i] > A[i - 1]:
... | 33.055556 | 53 | 0.364706 |
ff34dcec7e9949375647f0abfac545f956ccf481 | 5,480 | py | Python | run.py | shy166/hinreddit | e19abfa584b8b0cf801dd6968ac7b42d4b68ee96 | [
"Apache-2.0"
] | null | null | null | run.py | shy166/hinreddit | e19abfa584b8b0cf801dd6968ac7b42d4b68ee96 | [
"Apache-2.0"
] | 3 | 2020-05-16T04:29:28.000Z | 2020-05-16T08:05:16.000Z | run.py | syeehyn/hinreddit | e19abfa584b8b0cf801dd6968ac7b42d4b68ee96 | [
"Apache-2.0"
] | null | null | null | import json
import sys
from src.etl import *
from src.embedding import *
from src.utils import evaluate
from src.models import *
import os
from joblib import Parallel, delayed
from tqdm import tqdm
import pandas as pd
from p_tqdm import p_map
#==============================define configuration and file path===========... | 41.203008 | 99 | 0.627555 |
ff34fe20a29350d3e1ebbe438f08a7259b7b6d68 | 7,760 | py | Python | Cappellari/fit_kinematic_pa/fit_kinematic_pa.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 1 | 2021-11-25T16:11:56.000Z | 2021-11-25T16:11:56.000Z | Cappellari/fit_kinematic_pa/fit_kinematic_pa.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 6 | 2020-02-17T13:44:43.000Z | 2020-06-25T15:35:05.000Z | Cappellari/fit_kinematic_pa/fit_kinematic_pa.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 1 | 2021-11-25T16:11:56.000Z | 2021-11-25T16:11:56.000Z | """
#############################################################################
Copyright (C) 2005-2014, Michele Cappellari
E-mail: cappellari_at_astro.ox.ac.uk
Updated versions of the software are available from my web page
http://purl.org/cappellari/software
If you have found this software useful f... | 41.497326 | 103 | 0.619974 |
ff350a1e2119621cbe7355368efc4d391849443f | 11,378 | py | Python | scripts/scripts_ipynb/MajorMinorAccretion_contribution.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 1 | 2021-11-25T16:11:56.000Z | 2021-11-25T16:11:56.000Z | scripts/scripts_ipynb/MajorMinorAccretion_contribution.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 6 | 2020-02-17T13:44:43.000Z | 2020-06-25T15:35:05.000Z | scripts/scripts_ipynb/MajorMinorAccretion_contribution.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 1 | 2021-11-25T16:11:56.000Z | 2021-11-25T16:11:56.000Z |
# coding: utf-8
# In[1]:
def remove_nan(x):
return x[~np.isnan(x)]
def plot_violin(mpgs, mstar_limit=1e10, suffix="", base='./'):
dlt_all=[]
dlo_all=[]
dlM_all=[]
dlm_all=[]
for igal, gal in enumerate(mpgs):
# Only large galaxy at the final snapshot
if gal.data['mstar'][0] > ... | 34.065868 | 140 | 0.581561 |
ff355687af085c092acc8d3c8e88d275935f5698 | 479 | py | Python | utils/shell_run.py | SPOClab-ca/COVFEFE | 905e8e5eb0905791de869db18c6f755838657203 | [
"Apache-2.0"
] | 29 | 2018-08-25T15:05:21.000Z | 2021-07-12T06:23:46.000Z | utils/shell_run.py | luckytoilet/COVFEFE | 4e10454bfac47bda9a448016307da240d4b54303 | [
"Apache-2.0"
] | 16 | 2018-08-28T02:36:01.000Z | 2020-12-07T12:32:34.000Z | utils/shell_run.py | SPOClab-ca/COVFEFE | 905e8e5eb0905791de869db18c6f755838657203 | [
"Apache-2.0"
] | 11 | 2018-08-28T13:41:12.000Z | 2021-07-18T13:53:16.000Z | import os
import subprocess
def shell_run(cmd, stdout=None, stdin=None, stderr=None):
if stderr is None:
stderr = open(os.devnull, "w")
elif isinstance(stderr, str):
stderr = open(stderr, "w")
if stdout is None:
stdout = open(os.devnull, "w")
elif isinstance(stdout, str):
... | 23.95 | 73 | 0.628392 |
ff355ff6e2e033c0438e792331264c66ad9f10a8 | 478 | py | Python | setup.py | adamkoziol/autorun | 40dbbae542cb5c17a2d2e436fe4c661233541f3f | [
"MIT"
] | null | null | null | setup.py | adamkoziol/autorun | 40dbbae542cb5c17a2d2e436fe4c661233541f3f | [
"MIT"
] | null | null | null | setup.py | adamkoziol/autorun | 40dbbae542cb5c17a2d2e436fe4c661233541f3f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from setuptools import setup, find_packages
__author__ = 'adamkoziol'
setup(
name="autorun",
version="0.1",
packages=find_packages(),
include_package_data=True,
license='MIT',
author='Adam Koziol',
author_email='adam.koziol@inspection.gc.ca',
description='Automatic... | 26.555556 | 52 | 0.698745 |
ff35afb50dd6f520c066749243b2eb77568a942f | 4,368 | py | Python | test/test_v1_extra_alipay_goods_detail.py | justapnet/justap-server-sdk-python | 2d3110c6447833334fa2f7e93ffa63e06913df17 | [
"Apache-2.0"
] | null | null | null | test/test_v1_extra_alipay_goods_detail.py | justapnet/justap-server-sdk-python | 2d3110c6447833334fa2f7e93ffa63e06913df17 | [
"Apache-2.0"
] | null | null | null | test/test_v1_extra_alipay_goods_detail.py | justapnet/justap-server-sdk-python | 2d3110c6447833334fa2f7e93ffa63e06913df17 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Justap API
欢迎阅读 Justap Api 文档 Justap 是为移动端应用和PC端应用打造的下一代聚合支付SAAS服务平台,通过一个 SDK 即可快速的支持各种形式的应用,并且一次接口完成多个不同支付渠道的接入。平台除了支持服务商子商户模式,同时还对商家自有商户(即自己前往微信、支付宝等机构开户)提供了完整的支持。 感谢您的支持,我们将不断探索,为您提供更优质的服务!如需技术支持可前往商户中心提交工单,支持工程师会尽快与您取得联系! # 文档说明 采用 REST 风格设计。所有接口请求地址都是可预期的以及面向资源的。使用规范的 HTTP 响应代码来表示请... | 106.536585 | 3,404 | 0.77152 |
ff35b2c9e3f19be004a4c90c7d233313c159aafb | 1,668 | py | Python | 01_DATA_STRUCTURES/00_stack_queues/stack.py | san99tiago/ML_BASICS | ebd51827f7dd427c848b5c8e1d4bfd017d2fb56f | [
"MIT"
] | 2 | 2021-03-18T06:07:09.000Z | 2021-05-08T22:14:14.000Z | 01_DATA_STRUCTURES/00_stack_queues/stack.py | san99tiago/ML_BASICS | ebd51827f7dd427c848b5c8e1d4bfd017d2fb56f | [
"MIT"
] | null | null | null | 01_DATA_STRUCTURES/00_stack_queues/stack.py | san99tiago/ML_BASICS | ebd51827f7dd427c848b5c8e1d4bfd017d2fb56f | [
"MIT"
] | null | null | null | # STRUCTURE INFORMATION WITH A SIMPLE STACK METHOD
# Santiago Garcia Arango, July 2020
"""
Stacks are simple data-structures that work really well, when
we have a problem that involves adding or removing elements
but following the concept of LIFO(Last-In, First-Out).
This means that the operations affect always the "t... | 28.271186 | 73 | 0.616307 |
ff35d25fc2024cf225f4535e18282f25bd2460ba | 9,414 | py | Python | src/nlplib/general/scrape.py | rectangletangle/nlplib | 7dcc0daf050a73c03b7d7f0257ad0b862586a6e3 | [
"BSD-2-Clause"
] | 1 | 2015-11-18T12:59:52.000Z | 2015-11-18T12:59:52.000Z | src/nlplib/general/scrape.py | rectangletangle/nlplib | 7dcc0daf050a73c03b7d7f0257ad0b862586a6e3 | [
"BSD-2-Clause"
] | null | null | null | src/nlplib/general/scrape.py | rectangletangle/nlplib | 7dcc0daf050a73c03b7d7f0257ad0b862586a6e3 | [
"BSD-2-Clause"
] | null | null | null | ''' Tools for scraping text from the internet. '''
import functools
from urllib.request import build_opener, URLError
from nlplib.general.represent import pretty_truncate, pretty_string
from nlplib.general.thread import simultaneously
from nlplib.core.base import Base
from nlplib.core.exc import NLPLibError
__all_... | 35.794677 | 119 | 0.617909 |
ff35ec6fe4e097d22bb67fb3e08aa55189501098 | 2,889 | py | Python | qnarre/prep/tokens/fast/led.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/prep/tokens/fast/led.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/prep/tokens/fast/led.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... | 38.52 | 110 | 0.641052 |
ff360106080b7507e29f5db037d2197b4d7faed6 | 15,391 | py | Python | lib/rucio/daemons/conveyor/poller.py | jamesp-epcc/rucio | d36d346ea569e89ea413d4241bb69189dfeee7db | [
"Apache-2.0"
] | null | null | null | lib/rucio/daemons/conveyor/poller.py | jamesp-epcc/rucio | d36d346ea569e89ea413d4241bb69189dfeee7db | [
"Apache-2.0"
] | null | null | null | lib/rucio/daemons/conveyor/poller.py | jamesp-epcc/rucio | d36d346ea569e89ea413d4241bb69189dfeee7db | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2013-2021 CERN
#
# 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 a... | 48.247649 | 189 | 0.616204 |
ff3628f700eabea3132fa29a47edb4a4d96a0ec5 | 78,696 | py | Python | hooks/nova_cc_utils.py | noironetworks/charm-nova-cloud-controller | 68a124df5d7c9f69e97e5fba2e7558b56310d1aa | [
"ECL-2.0",
"Apache-2.0"
] | 18 | 2016-04-17T04:00:57.000Z | 2020-04-10T14:10:14.000Z | hooks/nova_cc_utils.py | openstack/charm-nova-cloud-controller | 1a63d9c0b690638e3eab4df8a7666f98d2b68b7a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | hooks/nova_cc_utils.py | openstack/charm-nova-cloud-controller | 1a63d9c0b690638e3eab4df8a7666f98d2b68b7a | [
"ECL-2.0",
"Apache-2.0"
] | 28 | 2016-03-14T13:29:07.000Z | 2021-08-31T17:59:19.000Z | # Copyright 2016 Canonical Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 37.43863 | 117 | 0.649169 |
ff3640ecd5295e9708c4ab49ef64bcd4fe4acf79 | 1,003 | py | Python | pywick/datasets/tnt/dataset.py | ashishpatel26/pywick | 1afffd1c21c2b188836d3599e802146182757bb5 | [
"MIT"
] | 2 | 2020-11-28T07:56:09.000Z | 2021-11-08T09:30:39.000Z | pywick/datasets/tnt/dataset.py | ashishpatel26/pywick | 1afffd1c21c2b188836d3599e802146182757bb5 | [
"MIT"
] | null | null | null | pywick/datasets/tnt/dataset.py | ashishpatel26/pywick | 1afffd1c21c2b188836d3599e802146182757bb5 | [
"MIT"
] | null | null | null | from pywick.datasets.tnt.batchdataset import BatchDataset
from pywick.datasets.transformdataset import TransformDataset
from pywick.datasets.shuffledataset import ShuffleDataset
from pywick.datasets.multipartitiondataset import MultiPartitionDataset
from torch.utils.data import DataLoader
class Dataset(object):
d... | 29.5 | 71 | 0.685942 |
ff36578378cabe902fae352ab513034ebd367654 | 3,757 | py | Python | pangadfs/penalty.py | sansbacon/pangadfs | 0a93ea0872f4dbb57be159653d202e01dce7047c | [
"MIT"
] | 7 | 2020-10-22T08:33:31.000Z | 2021-12-28T05:07:31.000Z | pangadfs/penalty.py | sansbacon/pangadfs | 0a93ea0872f4dbb57be159653d202e01dce7047c | [
"MIT"
] | 12 | 2020-10-23T19:06:30.000Z | 2021-05-20T16:29:51.000Z | pangadfs/penalty.py | sansbacon/pangadfs | 0a93ea0872f4dbb57be159653d202e01dce7047c | [
"MIT"
] | null | null | null | # pangadfs/pangadfs/penalty.py
# -*- coding: utf-8 -*-
# Copyright (C) 2020 Eric Truett
# Licensed under the MIT License
"""
# Penalty framework
Idea is to replace optimizer rules with penalties. Penalties can be negative (bad) or positive (good).
* Advantages
* Doesn't throw away reasonable options (125% owners... | 32.95614 | 102 | 0.622571 |
ff3664d00c79993bd40efe312555281163b4e872 | 1,809 | py | Python | wasatch/WasatchBus.py | adiravishankara/Wasatch.PY | 058b3de2c9399e9aea6347fa360f9c7dbbf296aa | [
"MIT"
] | 9 | 2018-10-31T11:38:18.000Z | 2021-11-23T19:20:54.000Z | wasatch/WasatchBus.py | adiravishankara/Wasatch.PY | 058b3de2c9399e9aea6347fa360f9c7dbbf296aa | [
"MIT"
] | 3 | 2018-11-01T10:28:53.000Z | 2022-03-21T17:40:05.000Z | wasatch/WasatchBus.py | adiravishankara/Wasatch.PY | 058b3de2c9399e9aea6347fa360f9c7dbbf296aa | [
"MIT"
] | 4 | 2018-08-03T08:46:08.000Z | 2022-03-23T01:09:27.000Z | import logging
import os
from .DeviceFinderUSB import DeviceFinderUSB
from usb import USBError
log = logging.getLogger(__name__)
##
# The different bus classes don't use inheritance and don't follow a common ABC
# or interface, but each should have an update() method, and each should have a
# 'device_ids' array.
#... | 29.655738 | 80 | 0.648977 |
ff36664ba8235afafff2abee8861636872f9b0f7 | 6,912 | bzl | Python | rules/private/apple_genrule.bzl | erikkerber/apple_support | 2ec0ef3eb2954371596fbb1a225fb244fcde31a9 | [
"Apache-2.0"
] | null | null | null | rules/private/apple_genrule.bzl | erikkerber/apple_support | 2ec0ef3eb2954371596fbb1a225fb244fcde31a9 | [
"Apache-2.0"
] | null | null | null | rules/private/apple_genrule.bzl | erikkerber/apple_support | 2ec0ef3eb2954371596fbb1a225fb244fcde31a9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The Bazel 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 la... | 35.446154 | 85 | 0.646267 |
ff367b506fb3ca44f84752664619bd6423626ab8 | 4,048 | py | Python | integration_tests/src/main/python/time_window_test.py | NVnavkumar/spark-rapids | ed7de6e27fc82dff06eea3fda9db30dd37635103 | [
"Apache-2.0"
] | null | null | null | integration_tests/src/main/python/time_window_test.py | NVnavkumar/spark-rapids | ed7de6e27fc82dff06eea3fda9db30dd37635103 | [
"Apache-2.0"
] | null | null | null | integration_tests/src/main/python/time_window_test.py | NVnavkumar/spark-rapids | ed7de6e27fc82dff06eea3fda9db30dd37635103 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021-2022, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 49.975309 | 141 | 0.745553 |
ff36929ada2742ac0c984ba380e635a1d12716cf | 2,311 | py | Python | Multitask-CNN-RNN/data/dataset.py | wtomin/Multitask-Emotion-Recognition-with-Incomplete-Labels | e6df7ffc9b0318fdce405e40993c79785b47c785 | [
"MIT"
] | 74 | 2020-03-08T15:29:00.000Z | 2022-03-05T14:57:33.000Z | Multitask-CNN-RNN/data/dataset.py | HKUST-NISL/Multitask-Emotion-Recognition-with-Incomplete-Labels | ac5152b7a4b9c6c54d13c06c9302270350e8ce3f | [
"MIT"
] | 19 | 2020-03-06T08:56:51.000Z | 2022-03-27T05:07:35.000Z | Multitask-CNN/data/dataset.py | wtomin/Multitask-Emotion-Recognition-with-Incomplete-Labels | e6df7ffc9b0318fdce405e40993c79785b47c785 | [
"MIT"
] | 23 | 2020-03-20T08:19:55.000Z | 2022-03-16T17:40:09.000Z | import torch.utils.data as data
from PIL import Image
import torchvision.transforms as transforms
import os
import os.path
class DatasetFactory:
def __init__(self):
pass
@staticmethod
def get_by_name(dataset_name, opt, train_mode='Train', transform = None):
if dataset_name == 'Mixed_EXPR':... | 30.813333 | 86 | 0.621809 |
ff36c6745c39bf586e66af640a9452041bfb1631 | 617 | py | Python | rango/migrations/0003_auto_20180405_1324.py | farschmessivo/ranco | ce81e77a9c2a82c4475b3838c3eac48bf206206f | [
"MIT"
] | null | null | null | rango/migrations/0003_auto_20180405_1324.py | farschmessivo/ranco | ce81e77a9c2a82c4475b3838c3eac48bf206206f | [
"MIT"
] | null | null | null | rango/migrations/0003_auto_20180405_1324.py | farschmessivo/ranco | ce81e77a9c2a82c4475b3838c3eac48bf206206f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.10 on 2018-04-05 13:24
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('rango', '0002_auto_20180327_0630'),
]
operations = [
migrations.AlterModelO... | 23.730769 | 58 | 0.591572 |
ff36e727050b9e5ae826e1c9e5d9b7b3eab9dfac | 14,831 | py | Python | bootloader/waflib/Configure.py | BA7JCM/pyinstaller | 51ff689509391921bdce42848f3a077dcbb40ca0 | [
"Apache-2.0"
] | null | null | null | bootloader/waflib/Configure.py | BA7JCM/pyinstaller | 51ff689509391921bdce42848f3a077dcbb40ca0 | [
"Apache-2.0"
] | null | null | null | bootloader/waflib/Configure.py | BA7JCM/pyinstaller | 51ff689509391921bdce42848f3a077dcbb40ca0 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file
import os, re, shlex, shutil, sys, time, traceback
from waflib import ConfigSet, Utils, Options, Logs, Context, Build, Errors
WAF_CONFIG_LOG = 'config.log'
autoconfig = False
conf_template = '''# pr... | 34.331019 | 118 | 0.562201 |
ff36e97d920c05b0eaad70d92527ee9e4a74389b | 63,519 | py | Python | numba/pythonapi.py | sighingnow/numba | ae88a6ff4a41f76e50672a1af9d9aa66c205b51b | [
"BSD-2-Clause"
] | null | null | null | numba/pythonapi.py | sighingnow/numba | ae88a6ff4a41f76e50672a1af9d9aa66c205b51b | [
"BSD-2-Clause"
] | null | null | null | numba/pythonapi.py | sighingnow/numba | ae88a6ff4a41f76e50672a1af9d9aa66c205b51b | [
"BSD-2-Clause"
] | null | null | null | from __future__ import print_function, division, absolute_import
from collections import namedtuple
import contextlib
import pickle
from llvmlite import ir
from llvmlite.llvmpy.core import Type, Constant
import llvmlite.llvmpy.core as lc
from numba.config import PYVERSION
import numba.ctypes_support as ctypes
from n... | 40.278377 | 93 | 0.612699 |
ff36faaaa64bc832213ce452226962760a18f4de | 16 | py | Python | lib/mapts_util/HTML_util.py | OGalOz/rbts_find_transposon_model | e6e36c327e9762a7266d0ab12a5ff224d17595c0 | [
"MIT"
] | null | null | null | lib/mapts_util/HTML_util.py | OGalOz/rbts_find_transposon_model | e6e36c327e9762a7266d0ab12a5ff224d17595c0 | [
"MIT"
] | null | null | null | lib/mapts_util/HTML_util.py | OGalOz/rbts_find_transposon_model | e6e36c327e9762a7266d0ab12a5ff224d17595c0 | [
"MIT"
] | null | null | null | #python3
| 1.777778 | 8 | 0.4375 |
ff36fe6fd7aee05a3923f44e0efbf81e5f51c28b | 5,607 | py | Python | tests/test_replica.py | euro-hpc-pl/omnisolver-pt | 402beed5b7c475a13cc59b04a77fe03ca7174e70 | [
"Apache-2.0"
] | null | null | null | tests/test_replica.py | euro-hpc-pl/omnisolver-pt | 402beed5b7c475a13cc59b04a77fe03ca7174e70 | [
"Apache-2.0"
] | 1 | 2021-09-02T22:31:18.000Z | 2021-09-02T22:31:18.000Z | tests/test_replica.py | euro-hpc-pl/omnisolver-pt | 402beed5b7c475a13cc59b04a77fe03ca7174e70 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import pytest
from omnisolver.pt.model import ising_model
from omnisolver.pt.replica import initialize_replica
from omnisolver.pt.testing import numba_rand, numba_seed
@pytest.mark.parametrize("dtype", [np.float64, np.float32])
class TestNewReplica:
@staticmethod
def create_model(dtype):
... | 37.630872 | 91 | 0.640271 |
ff37183397f4b4f7d4da498266cfabc9672c9114 | 292 | py | Python | xenith/__init__.py | wfondrie/xenith | 281c6c515850ba7e69132e4e13e9f2020aeb2272 | [
"Apache-2.0"
] | 2 | 2019-07-05T09:26:15.000Z | 2021-08-31T15:47:18.000Z | xenith/__init__.py | wfondrie/xenith | 281c6c515850ba7e69132e4e13e9f2020aeb2272 | [
"Apache-2.0"
] | null | null | null | xenith/__init__.py | wfondrie/xenith | 281c6c515850ba7e69132e4e13e9f2020aeb2272 | [
"Apache-2.0"
] | null | null | null | """
See the README for detailed documentation and examples.
"""
from pkg_resources import get_distribution, DistributionNotFound
from . import convert
from .models import from_percolator, load_model, new_model
from .dataset import load_psms
__version__ = get_distribution(__name__).version
| 26.545455 | 64 | 0.825342 |
ff372e19fb75dd92718fe592a51c6abb5ff324af | 6,103 | py | Python | location/tests.py | WillieIlus/jobscorner | ed3734468ea0e88a306a1d29bc876562e940f4fb | [
"bzip2-1.0.6"
] | 2 | 2020-04-12T13:18:35.000Z | 2021-04-02T04:18:17.000Z | location/tests.py | WillieIlus/jobscorner | ed3734468ea0e88a306a1d29bc876562e940f4fb | [
"bzip2-1.0.6"
] | 3 | 2020-02-11T23:58:53.000Z | 2020-09-06T18:46:17.000Z | location/tests.py | WillieIlus/jobscorner | ed3734468ea0e88a306a1d29bc876562e940f4fb | [
"bzip2-1.0.6"
] | 1 | 2020-08-17T08:29:41.000Z | 2020-08-17T08:29:41.000Z | from django.forms import ModelForm
from django.test import TestCase
from django.urls import reverse, resolve
from accounts.models import User
from country.models import Country
from location.models import Location
from location.views import LocationCreate, LocationList, LocationEdit
class LocationListTests(TestCase)... | 39.888889 | 116 | 0.657382 |
ff374184bc2179aa941324380080ae46ca3fe68a | 9,836 | py | Python | vdx_helper/models.py | Morphotech/vdx-helper-python | 3116ad05bd9b947e0ba77988c22776507e441cea | [
"MIT"
] | null | null | null | vdx_helper/models.py | Morphotech/vdx-helper-python | 3116ad05bd9b947e0ba77988c22776507e441cea | [
"MIT"
] | null | null | null | vdx_helper/models.py | Morphotech/vdx-helper-python | 3116ad05bd9b947e0ba77988c22776507e441cea | [
"MIT"
] | null | null | null | from datetime import datetime
from typing import NamedTuple, Optional, List, Mapping, Generic, TypeVar, Dict
from uuid import UUID
from vdx_helper.domain import VerificationStatus, StepStatus, JobStatus
T = TypeVar('T')
class Partner(NamedTuple):
"""
A Partner object returned by the Core API.
:param id... | 30.079511 | 120 | 0.668158 |
ff377ab701da6f4aef1871e7692c3b44a7d24d98 | 2,144 | py | Python | autotools/modelingtools.py | LMiceOrg/Modelingtools | f372336d7c356dcf754db755f62165ba6961727a | [
"MIT"
] | 1 | 2016-01-08T10:54:02.000Z | 2016-01-08T10:54:02.000Z | autotools/modelingtools.py | LMiceOrg/Modelingtools | f372336d7c356dcf754db755f62165ba6961727a | [
"MIT"
] | null | null | null | autotools/modelingtools.py | LMiceOrg/Modelingtools | f372336d7c356dcf754db755f62165ba6961727a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import datamodelgenerator
import os
import cPickle as pickle
#import pickle
gen = datamodelgenerator.XLDataModelGenerator()
def Init():
gen = datamodelgenerator.XLDataModelGenerator()
# 偏好设置 增加默认model路径
def GetModelFolder(*args, **kw):
return gen.GetModelFolder... | 24.089888 | 80 | 0.630597 |
ff3799dce59558b21a35707ed9fd74a031f065ca | 2,363 | py | Python | server/routes/alarms/route.py | MrCreeper1008/covid19-alarm | 2f07a602c60bafacab3aa977a22d11fc1d07b878 | [
"MIT"
] | 1 | 2021-11-30T11:03:36.000Z | 2021-11-30T11:03:36.000Z | server/routes/alarms/route.py | kennethnym/covid19-alarm | 2f07a602c60bafacab3aa977a22d11fc1d07b878 | [
"MIT"
] | null | null | null | server/routes/alarms/route.py | kennethnym/covid19-alarm | 2f07a602c60bafacab3aa977a22d11fc1d07b878 | [
"MIT"
] | null | null | null | """
This module handles all the api routing for this server.
"""
import os
import datetime
from flask import request, render_template
from server import app
from .alarm_scheduler import cancel_alarm, schedule_alarm, get_alarms
from .notification import get_notifications, remove_notification
# The format the date st... | 33.757143 | 94 | 0.701227 |
ff37aebdb779ed6b4cb99781a104200953675274 | 15,303 | py | Python | pycatia/navigator_interfaces/group.py | Tian-Jionglu/pycatia | b315aeb3a74846f134ff6b67b3a6334b9d3905fa | [
"MIT"
] | 1 | 2020-04-27T13:59:10.000Z | 2020-04-27T13:59:10.000Z | pycatia/navigator_interfaces/group.py | Luanee/pycatia | ea5eef8178f73de12404561c00baf7a7ca30da59 | [
"MIT"
] | null | null | null | pycatia/navigator_interfaces/group.py | Luanee/pycatia | ea5eef8178f73de12404561c00baf7a7ca30da59 | [
"MIT"
] | null | null | null | #! usr/bin/python3.6
"""
Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-06-11 12:40:47.360445
.. warning::
The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only.
They are there as a guide as to how the visual basic / catscript function... | 37.143204 | 108 | 0.445468 |
ff37d99b0bd5bb5b8a60573c47090bbdfe23e271 | 1,151 | py | Python | rsl_comm_py/examples/example_um7_cregs_as_json.py | RedshiftLabsPtyLtd/rsl_comm_py | e53b4e85079898c894dac25842a08bcc303edfbb | [
"MIT"
] | null | null | null | rsl_comm_py/examples/example_um7_cregs_as_json.py | RedshiftLabsPtyLtd/rsl_comm_py | e53b4e85079898c894dac25842a08bcc303edfbb | [
"MIT"
] | null | null | null | rsl_comm_py/examples/example_um7_cregs_as_json.py | RedshiftLabsPtyLtd/rsl_comm_py | e53b4e85079898c894dac25842a08bcc303edfbb | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Author: Dr. Konstantin Selyunin
# License: MIT
# Date: 8 December 2021
import logging
import sys
import json
from pathlib import Path
from rsl_comm_py.um7_serial import UM7Serial
if __name__ == '__main__':
logging.basicConfig(
level=logging.WARNING,
format='[%(asctime)s... | 30.289474 | 86 | 0.663771 |
ff37de7de3cd2947064b4aff53014becdf1934ad | 7,837 | py | Python | adhoc/cyleq.py | igoumiri/pyMST | 79825c6fbf521b3ec8931114d0d3d36b548cf75b | [
"MIT"
] | null | null | null | adhoc/cyleq.py | igoumiri/pyMST | 79825c6fbf521b3ec8931114d0d3d36b548cf75b | [
"MIT"
] | null | null | null | adhoc/cyleq.py | igoumiri/pyMST | 79825c6fbf521b3ec8931114d0d3d36b548cf75b | [
"MIT"
] | null | null | null | # old16 is to preserve the code that was adding one element to all the
# radial arrays in adhoc.py and cyleq.py.
# Generic cylindrical equilibrium solutions
def zfunc(rho, bz, bq, lam, press):
return -lam * bq - press / (bz**2 + bq**2) * bz
def qfunc(rho, bz, bq, lam, press):
if rho == 0.0:
return (... | 36.282407 | 74 | 0.520225 |
ff380815a4a32192de621888199e66355f9b4635 | 17,835 | py | Python | tensorflow/python/data/util/nest_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/python/data/util/nest_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/data/util/nest_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # Copyright 2017 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... | 43.288835 | 80 | 0.649846 |
ff380efa06c35f4afffb0d74a5bad4060b622804 | 5,792 | py | Python | baseline2D.py | lruthotto/NeuralOC | 3f37c7349527fb1f5890077ebe987f2f77486a54 | [
"MIT"
] | 13 | 2021-05-12T11:52:53.000Z | 2022-03-30T14:50:28.000Z | baseline2D.py | lruthotto/NeuralOC | 3f37c7349527fb1f5890077ebe987f2f77486a54 | [
"MIT"
] | null | null | null | baseline2D.py | lruthotto/NeuralOC | 3f37c7349527fb1f5890077ebe987f2f77486a54 | [
"MIT"
] | 3 | 2021-04-20T08:07:50.000Z | 2022-02-15T22:37:12.000Z | # baseline2D.py
# baseline method for problems using the Cross2D object
import math
import torch
import argparse
from src.utils import normpdf
from src.initProb import *
from src.OCflow import ocG
from src.plotter import *
parser = argparse.ArgumentParser('Baseline')
parser.add_argument(
'--data', choices=['soft... | 34.891566 | 141 | 0.577866 |
ff381cac392e4ae625a36423b6e1f49fa80a6ac7 | 3,341 | py | Python | forge/blade/io/stimulus/node.py | narendasan/neural-mmo | 36a588db0021cccd7275cebef2cbdc5ee8eb40d5 | [
"MIT"
] | null | null | null | forge/blade/io/stimulus/node.py | narendasan/neural-mmo | 36a588db0021cccd7275cebef2cbdc5ee8eb40d5 | [
"MIT"
] | 1 | 2021-09-30T07:57:46.000Z | 2021-10-02T00:39:11.000Z | forge/blade/io/stimulus/node.py | narendasan/neural-mmo | 36a588db0021cccd7275cebef2cbdc5ee8eb40d5 | [
"MIT"
] | 2 | 2021-09-16T16:43:03.000Z | 2021-09-28T18:12:41.000Z | from pdb import set_trace as TT
import numpy as np
import gym
from forge.blade.lib.utils import classproperty
from forge.blade.io.comparable import IterableTypeCompare
class Flat:
pass
class Stim(metaclass=IterableTypeCompare):
default = 0
max = np.inf
min = 0
def __init__(self, config):
cls = ... | 22.422819 | 80 | 0.584855 |
ff38666798e9d783f649f257ae1facb00ae12b1c | 6,330 | py | Python | code/client.py | BrenKenna/pyanamo | 0129c504ac5edc0d4c5d241bbfa5aeb7cdef924c | [
"MIT"
] | null | null | null | code/client.py | BrenKenna/pyanamo | 0129c504ac5edc0d4c5d241bbfa5aeb7cdef924c | [
"MIT"
] | null | null | null | code/client.py | BrenKenna/pyanamo | 0129c504ac5edc0d4c5d241bbfa5aeb7cdef924c | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Import modules
import boto3, random
from boto3.dynamodb.conditions import Key, Attr
# Class to interact with a Dynamo table object
class PyAnamo_Client():
"""
Class to manage interating with the supplied Dynamo Client.
The PyAnamo_Client includes methods to:
- Recursively query/scan ite... | 28.772727 | 106 | 0.691785 |
ff387c50da1fad805bab71a0046f90b4e41612b3 | 1,209 | py | Python | workon/utils/hashtag.py | devittek/django-workon | c39ddecac2649406a7a58922646478c5615d4cfd | [
"BSD-3-Clause"
] | 1 | 2018-01-19T16:08:54.000Z | 2018-01-19T16:08:54.000Z | workon/utils/hashtag.py | devittek/django-workon | c39ddecac2649406a7a58922646478c5615d4cfd | [
"BSD-3-Clause"
] | 1 | 2020-07-06T08:35:18.000Z | 2020-07-06T08:35:18.000Z | workon/utils/hashtag.py | devittek/django-workon | c39ddecac2649406a7a58922646478c5615d4cfd | [
"BSD-3-Clause"
] | 4 | 2020-04-08T06:14:46.000Z | 2020-12-11T14:28:06.000Z | import re
from django.utils.safestring import mark_safe
from django.utils.html import escape
from html import unescape
__all__ = [
'HASTAG_RE',
'replace_hashtags_with_hrefs',
'iter_hashtags',
'iter_hashtags_at'
]
HASTAG_RE = re.compile(r'''[^&](\#([\'\"\w\-\_\d]+))''')
HASTAG_AT_RE = re.compile(r'''... | 29.487805 | 100 | 0.650124 |
ff388cd5f697f77408f941a47581ee19d046e09b | 10,381 | py | Python | src/legacy_code/cycles.py | spasmann/1DQMC | f56483428f03c63d06c16b7fd7f56231296dd940 | [
"MIT"
] | null | null | null | src/legacy_code/cycles.py | spasmann/1DQMC | f56483428f03c63d06c16b7fd7f56231296dd940 | [
"MIT"
] | null | null | null | src/legacy_code/cycles.py | spasmann/1DQMC | f56483428f03c63d06c16b7fd7f56231296dd940 | [
"MIT"
] | 1 | 2022-01-25T18:09:23.000Z | 2022-01-25T18:09:23.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jun 28 14:08:05 2021
@author: sampasmann
"""
import numpy as np
import math
import random
def cycles(Geo,N,Nr,R, Sig_t,Sig_f,Sig_s,Sig_c,X,nu,weights = [],
inactive_cycles = 5, active_cycles = 20):
#total # of cycles
c... | 38.165441 | 82 | 0.426356 |
ff389edacb68fad831508e8e6380fdea45715397 | 7,535 | py | Python | autosynth/git_source.py | stephenplusplus/synthtool | 71b8a272549c06b5768d00fa48d3ae990e871bec | [
"Apache-2.0"
] | null | null | null | autosynth/git_source.py | stephenplusplus/synthtool | 71b8a272549c06b5768d00fa48d3ae990e871bec | [
"Apache-2.0"
] | null | null | null | autosynth/git_source.py | stephenplusplus/synthtool | 71b8a272549c06b5768d00fa48d3ae990e871bec | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 35.880952 | 126 | 0.653882 |
ff38bcb4a7a39dfb431adfcb701288739974628f | 2,897 | py | Python | .leetcode/105.construct-binary-tree-from-preorder-and-inorder-traversal.3.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/105.construct-binary-tree-from-preorder-and-inorder-traversal.3.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/105.construct-binary-tree-from-preorder-and-inorder-traversal.3.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | # @lc app=leetcode id=105 lang=python3
#
# [105] Construct Binary Tree from Preorder and Inorder Traversal
#
# https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/description/
#
# algorithms
# Medium (52.61%)
# Likes: 5231
# Dislikes: 131
# Total Accepted: 496.1K
# Total Submis... | 23.745902 | 102 | 0.592682 |
ff38c23e5fc7a411863491cd8d645bcd674aa0fc | 605 | py | Python | savu/plugins/filters/image_interpolation_tools.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 39 | 2015-03-30T14:03:42.000Z | 2022-03-16T16:50:33.000Z | savu/plugins/filters/image_interpolation_tools.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 670 | 2015-02-11T11:08:09.000Z | 2022-03-21T09:27:57.000Z | savu/plugins/filters/image_interpolation_tools.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 54 | 2015-02-13T14:09:52.000Z | 2022-01-24T13:57:09.000Z | from savu.plugins.plugin_tools import PluginTools
class ImageInterpolationTools(PluginTools):
"""A plugin to interpolate an image by a factor
"""
def define_parameters(self):
"""
size:
visibility: basic
dtype: [float, list[float]]
description: int,... | 28.809524 | 67 | 0.552066 |
ff38ee4155c9056f0670f07690fcdf7972354dd5 | 3,381 | py | Python | osgar/drivers/system_monitor.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 12 | 2017-02-16T10:22:59.000Z | 2022-03-20T05:48:06.000Z | osgar/drivers/system_monitor.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 618 | 2016-08-30T04:46:12.000Z | 2022-03-25T16:03:10.000Z | osgar/drivers/system_monitor.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 11 | 2016-08-27T20:02:55.000Z | 2022-03-07T08:53:53.000Z | """"
Records system information like CPU and RAM utilization or device temperatures.
"""
import sys
import subprocess
import psutil
# https://psutil.readthedocs.io/en/latest/#system-related-functions
from threading import Thread
def get_timestamp_from_dmesg(msg):
try:
return float(msg.split(b"]")[0][... | 34.151515 | 84 | 0.57202 |
ff391c251cfeeb98335e6c2985338b11b3a23bf3 | 6,849 | py | Python | tests/test_diff.py | essembeh/properties-diff | cddfca2fc83c1733b5d8f80730f2a188bcaa452a | [
"Apache-2.0"
] | null | null | null | tests/test_diff.py | essembeh/properties-diff | cddfca2fc83c1733b5d8f80730f2a188bcaa452a | [
"Apache-2.0"
] | null | null | null | tests/test_diff.py | essembeh/properties-diff | cddfca2fc83c1733b5d8f80730f2a188bcaa452a | [
"Apache-2.0"
] | null | null | null | # pylint: disable=missing-function-docstring,unused-import,redefined-outer-name
"""
test for diff cli
"""
from pathlib import Path
from shlex import split
import pytest
from properties_tools import __version__
from properties_tools.diff import run
from . import TEMPLATES_DIR, assert_capsys, samples
def template(fil... | 25.651685 | 102 | 0.588553 |
ff395301d3319d51f1da842b24c052db4c763561 | 39,920 | py | Python | tools/run_tests/xds_k8s_test_driver/framework/infrastructure/traffic_director.py | stungkit/grpc | 063c36cb46733c13d2ce8116b6af482c9bd832d6 | [
"Apache-2.0"
] | null | null | null | tools/run_tests/xds_k8s_test_driver/framework/infrastructure/traffic_director.py | stungkit/grpc | 063c36cb46733c13d2ce8116b6af482c9bd832d6 | [
"Apache-2.0"
] | 4 | 2022-02-27T18:59:37.000Z | 2022-02-27T18:59:53.000Z | tools/run_tests/xds_k8s_test_driver/framework/infrastructure/traffic_director.py | stungkit/grpc | 063c36cb46733c13d2ce8116b6af482c9bd832d6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 41.367876 | 85 | 0.638853 |
ff3993407fbdaff43d0e0685b3d8a7e79a3dc9b6 | 2,546 | py | Python | wargame/designpatterns/pythonic_abstractfactory_accessoryfactory.py | jeantardelli/wargameRepo | 1e11ae40281f7eafa65ea6e40e045304b20e3824 | [
"MIT"
] | 1 | 2020-12-01T20:30:27.000Z | 2020-12-01T20:30:27.000Z | wargame/designpatterns/pythonic_abstractfactory_accessoryfactory.py | jeantardelli/wargameRepo | 1e11ae40281f7eafa65ea6e40e045304b20e3824 | [
"MIT"
] | null | null | null | wargame/designpatterns/pythonic_abstractfactory_accessoryfactory.py | jeantardelli/wargameRepo | 1e11ae40281f7eafa65ea6e40e045304b20e3824 | [
"MIT"
] | null | null | null | """pythonic_abstractfactory_accessoryfactory
This module represents an accessory factory object.
"""
from pythonic_ironjacket import IronJacket
from pythonic_powersuit import PowerSuit
from pythonic_mithrilarmor import MithrilArmor
from pythonic_goldenlocket import GoldenLocket
from pythonic_superlocket import SuperLo... | 39.169231 | 79 | 0.704242 |
ff39d44d9bc5b38e610029c05ae87269f41783d9 | 6,156 | py | Python | opal_common/cli/commands.py | Hongbo-Miao/opal | 736fc9e12248cf597d9fdbf727247ea5aff1aa46 | [
"Apache-2.0"
] | 367 | 2021-04-11T11:58:35.000Z | 2022-02-24T15:33:54.000Z | opal_common/cli/commands.py | asafcsimpleorg/opal | 262a296e5a2d06e9d1b15fcf3cc9adf68e12fd91 | [
"Apache-2.0"
] | 63 | 2021-04-14T07:00:44.000Z | 2021-12-07T12:05:38.000Z | opal_common/cli/commands.py | asafcsimpleorg/opal | 262a296e5a2d06e9d1b15fcf3cc9adf68e12fd91 | [
"Apache-2.0"
] | 32 | 2021-04-11T12:53:53.000Z | 2021-12-04T19:57:42.000Z | import asyncio
import json
import secrets
from typing import List, Tuple, Optional
from uuid import uuid4
import typer
from enum import Enum
from opal_common.schemas.security import AccessTokenRequest, PeerType
from opal_common.schemas.data import DataSourceEntry, DataUpdate
from datetime import timedelta
class Secre... | 43.352113 | 158 | 0.624431 |
ff3a0b40b8d2c6790e2845473e5aa7d6de2de146 | 2,161 | py | Python | data/core-configuration/packs/core-functions/module/logic.py | naparuba/opsbro | 98618a002cd47250d21e7b877a24448fc95fec80 | [
"MIT"
] | 32 | 2017-08-29T08:57:16.000Z | 2021-04-21T08:53:04.000Z | data/core-configuration/packs/core-functions/module/logic.py | naparuba/opsbro | 98618a002cd47250d21e7b877a24448fc95fec80 | [
"MIT"
] | 108 | 2017-09-04T19:59:28.000Z | 2022-03-31T08:12:07.000Z | data/core-configuration/packs/core-functions/module/logic.py | naparuba/kunai | 98618a002cd47250d21e7b877a24448fc95fec80 | [
"MIT"
] | 8 | 2015-02-03T12:30:53.000Z | 2017-07-29T19:43:54.000Z | import copy
from opsbro.evaluater import export_evaluater_function
FUNCTION_GROUP = 'set'
@export_evaluater_function(function_group=FUNCTION_GROUP)
def set_difference(in_this_set1, but_not_in_this_set2):
"""**set_difference(in_this_set, but_not_in_this_set)** -> Returns the elements that are in the set1 but not... | 20.778846 | 137 | 0.659417 |
ff3a20a4459318a619f6e508907416b1c95b5f91 | 15,455 | py | Python | AlphaGo/training/reinforcement_policy_trainer.py | mervynn/RocAlphaGo | 7b3ea100e9602088b9ca9f7e5eff9c593e667649 | [
"MIT"
] | 1 | 2017-02-08T15:11:59.000Z | 2017-02-08T15:11:59.000Z | AlphaGo/training/reinforcement_policy_trainer.py | mervynn/RocAlphaGo | 7b3ea100e9602088b9ca9f7e5eff9c593e667649 | [
"MIT"
] | null | null | null | AlphaGo/training/reinforcement_policy_trainer.py | mervynn/RocAlphaGo | 7b3ea100e9602088b9ca9f7e5eff9c593e667649 | [
"MIT"
] | null | null | null | import os
import json
import numpy as np
from shutil import copyfile
from keras.optimizers import Optimizer
import keras.backend as K
from AlphaGo.ai import ProbabilisticPolicyPlayer
import AlphaGo.go as go
from AlphaGo.go import GameState
from AlphaGo.models.policy import CNNPolicy
from AlphaGo.util import flatten_idx... | 50.178571 | 155 | 0.670851 |
ff3a5a9d3d7790f4c10fa754e9e74cf007f9ec73 | 6,943 | py | Python | src/qrl/core/Wallet.py | som-dev/QRL | 4d335d0c65c4f9bfad21e3ae918a249eff64b047 | [
"MIT"
] | null | null | null | src/qrl/core/Wallet.py | som-dev/QRL | 4d335d0c65c4f9bfad21e3ae918a249eff64b047 | [
"MIT"
] | null | null | null | src/qrl/core/Wallet.py | som-dev/QRL | 4d335d0c65c4f9bfad21e3ae918a249eff64b047 | [
"MIT"
] | null | null | null | # coding=utf-8
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
import functools
import os
from collections import namedtuple
from typing import List, Optional
import simplejson
from pyqrllib.pyqrllib import mnemonic2bin, bin2hstr,... | 33.703883 | 106 | 0.615584 |
ff3a62c0e5305897df4806f4606d49bc1d9819f8 | 42,232 | py | Python | seqio/test_utils.py | ayushkumar63123/seqio | 23bcb59df59798074d7d5896a131980137c69ec8 | [
"Apache-2.0"
] | null | null | null | seqio/test_utils.py | ayushkumar63123/seqio | 23bcb59df59798074d7d5896a131980137c69ec8 | [
"Apache-2.0"
] | null | null | null | seqio/test_utils.py | ayushkumar63123/seqio | 23bcb59df59798074d7d5896a131980137c69ec8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The SeqIO Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 34.588043 | 87 | 0.636934 |
ff3a6370202c583abb7ccc26e8a428a8d3c2ca24 | 4,089 | py | Python | examples/nlp/duplex_text_normalization/duplex_text_normalization_test.py | JMichaelStringer/NeMo | b5b29a69ccb0ec3d8c9ace2f33872ee99858a559 | [
"Apache-2.0"
] | 1 | 2021-09-10T10:40:51.000Z | 2021-09-10T10:40:51.000Z | examples/nlp/duplex_text_normalization/duplex_text_normalization_test.py | JMichaelStringer/NeMo | b5b29a69ccb0ec3d8c9ace2f33872ee99858a559 | [
"Apache-2.0"
] | null | null | null | examples/nlp/duplex_text_normalization/duplex_text_normalization_test.py | JMichaelStringer/NeMo | b5b29a69ccb0ec3d8c9ace2f33872ee99858a559 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021, 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 copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 43.967742 | 158 | 0.761555 |
ff3a8a2b23d8d2c29c3a3dbd4fdbc6d983cd476a | 29,834 | py | Python | sdk/mobilenetwork/azure-mgmt-mobilenetwork/azure/mgmt/mobilenetwork/operations/_sites_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/mobilenetwork/azure-mgmt-mobilenetwork/azure/mgmt/mobilenetwork/operations/_sites_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/mobilenetwork/azure-mgmt-mobilenetwork/azure/mgmt/mobilenetwork/operations/_sites_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 ... | 44.264095 | 220 | 0.674398 |
ff3ab0c37882ae1b48dbdef441f7e5d4d0777694 | 8,517 | py | Python | metpy/plots/wx_symbols.py | ahuang11/MetPy | 6116ceca6c48fda7e4ead254d2a83ebf86391e7a | [
"BSD-3-Clause"
] | 1 | 2019-09-15T18:02:59.000Z | 2019-09-15T18:02:59.000Z | metpy/plots/wx_symbols.py | e-dennis/MetPy | 6529608d956039d4791a17a7bdb1a2c0bf97cd75 | [
"BSD-3-Clause"
] | null | null | null | metpy/plots/wx_symbols.py | e-dennis/MetPy | 6529608d956039d4791a17a7bdb1a2c0bf97cd75 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2016,2017 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""Simplify using the weather symbol font.
See WMO manual 485 Vol 1 for more info on the symbols.
"""
import matplotlib.font_manager as fm
from pkg_resources import resource_f... | 43.233503 | 94 | 0.50135 |
ff3abb53bd0ebeb38cd30a85ed77113eb4abab4b | 3,795 | py | Python | code/plotting/plot_xibr.py | modichirag/21cmhod | 0807a7b0b880f4ba5bc7161b843d500ddcece5a7 | [
"MIT"
] | null | null | null | code/plotting/plot_xibr.py | modichirag/21cmhod | 0807a7b0b880f4ba5bc7161b843d500ddcece5a7 | [
"MIT"
] | null | null | null | code/plotting/plot_xibr.py | modichirag/21cmhod | 0807a7b0b880f4ba5bc7161b843d500ddcece5a7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# Plots the real-space correlation functions and biases for the HI.
#
import numpy as np
import sys, os
import matplotlib.pyplot as plt
from scipy.interpolate import InterpolatedUnivariateSpline as ius
#
from matplotlib import rc, rcParams, font_manager
rcParams['font.family'] = 'serif'
fsize =... | 32.715517 | 88 | 0.588669 |
ff3b1bf80e3fb6f4c6b8563b5e6cf2ed1f41793a | 1,577 | py | Python | tests/components/workers/large_worker.py | HPC-SimTools/IPS-framework | 4911bcc97a64bb31503009de75f24d3cba263bec | [
"BSD-3-Clause"
] | 9 | 2019-05-06T17:30:35.000Z | 2021-12-10T16:05:00.000Z | tests/components/workers/large_worker.py | HPC-SimTools/IPS-framework | 4911bcc97a64bb31503009de75f24d3cba263bec | [
"BSD-3-Clause"
] | 80 | 2018-04-13T20:25:04.000Z | 2022-03-10T21:59:58.000Z | tests/components/workers/large_worker.py | HPC-SimTools/IPS-framework | 4911bcc97a64bb31503009de75f24d3cba263bec | [
"BSD-3-Clause"
] | 4 | 2020-08-07T17:58:13.000Z | 2021-11-12T17:17:42.000Z | # -------------------------------------------------------------------------------
# Copyright 2006-2021 UT-Battelle, LLC. See LICENSE for more information.
# -------------------------------------------------------------------------------
from ipsframework import Component
import os
class large_worker(Component):
... | 39.425 | 81 | 0.530755 |
ff3b36c4c0710e1ab3569086172d8b12e95e1858 | 10,707 | py | Python | Stackless/unittests/test_channel.py | masamitsu-murase/stackless | 677b36ffe5cb5a0f4b8d3abfa20982c8d82ffb92 | [
"CNRI-Python-GPL-Compatible"
] | 854 | 2017-09-11T16:42:28.000Z | 2022-03-27T14:17:09.000Z | Stackless/unittests/test_channel.py | masamitsu-murase/stackless | 677b36ffe5cb5a0f4b8d3abfa20982c8d82ffb92 | [
"CNRI-Python-GPL-Compatible"
] | 164 | 2017-09-24T20:40:32.000Z | 2021-10-30T01:35:05.000Z | Stackless/unittests/test_channel.py | masamitsu-murase/stackless | 677b36ffe5cb5a0f4b8d3abfa20982c8d82ffb92 | [
"CNRI-Python-GPL-Compatible"
] | 73 | 2017-09-13T18:07:48.000Z | 2022-03-17T13:02:29.000Z | from __future__ import absolute_import
import unittest
import stackless
try:
import threading
withThreads = True
except ImportError:
withThreads = False
import sys
import traceback
import contextlib
from support import test_main # @UnusedImport
from support import StacklessTestCase, require_one_thread
@c... | 32.643293 | 168 | 0.614645 |
ff3b50a3505962e668187144e0774aee8ef017eb | 5,849 | py | Python | rl-toolkit/rlf/baselines/vec_env/shmem_vec_env.py | clvrai/goal_prox_il | 7c809b2ee575a69a14997068db06f3c1f3c8bd08 | [
"MIT"
] | 4 | 2021-11-17T20:19:34.000Z | 2022-03-31T04:21:26.000Z | rl-toolkit/rlf/baselines/vec_env/shmem_vec_env.py | clvrai/goal_prox_il | 7c809b2ee575a69a14997068db06f3c1f3c8bd08 | [
"MIT"
] | null | null | null | rl-toolkit/rlf/baselines/vec_env/shmem_vec_env.py | clvrai/goal_prox_il | 7c809b2ee575a69a14997068db06f3c1f3c8bd08 | [
"MIT"
] | null | null | null | """
An interface for asynchronous vectorized environments.
"""
import multiprocessing as mp
import numpy as np
from .vec_env import VecEnv, CloudpickleWrapper, clear_mpi_env_vars
import ctypes
from rlf.baselines import logger
from collections.abc import Iterable
from .util import dict_to_obs, obs_space_info, obs_to_d... | 37.254777 | 129 | 0.581809 |
ff3b6f4a9e38d00b419252ca9541dce945e4d78d | 320 | py | Python | nashvegas/admin.py | dcramer/nashvegas | e073e2449700d30940991fd0f5a79d26c76b54d7 | [
"MIT"
] | 2 | 2015-09-24T19:50:55.000Z | 2015-11-06T10:45:08.000Z | nashvegas/admin.py | dcramer/nashvegas | e073e2449700d30940991fd0f5a79d26c76b54d7 | [
"MIT"
] | null | null | null | nashvegas/admin.py | dcramer/nashvegas | e073e2449700d30940991fd0f5a79d26c76b54d7 | [
"MIT"
] | null | null | null | from django.contrib import admin
from nashvegas.models import Migration
class MigrationAdmin(admin.ModelAdmin):
list_display = ["migration_label", "date_created", "scm_version"]
list_filter = ["date_created"]
search_fields = ["content", "migration_label"]
admin.site.register(Migration, MigrationAdmin)
| 24.615385 | 69 | 0.7625 |
ff3b8374159a894bbeee9447d8a1b3d073b0a4bc | 656 | py | Python | Python3/Books/Douson/chapter09/alien_blaster.py | neon1ks/Study | 5d40171cf3bf5e8d3a95539e91f5afec54d1daf3 | [
"MIT"
] | null | null | null | Python3/Books/Douson/chapter09/alien_blaster.py | neon1ks/Study | 5d40171cf3bf5e8d3a95539e91f5afec54d1daf3 | [
"MIT"
] | null | null | null | Python3/Books/Douson/chapter09/alien_blaster.py | neon1ks/Study | 5d40171cf3bf5e8d3a95539e91f5afec54d1daf3 | [
"MIT"
] | null | null | null | # Alien Blaster
# Demonstrates object interaction
class Player(object):
""" A player in a shooter game. """
def blast(self, enemy):
print("The player blasts an enemy.\n")
enemy.die()
class Alien(object):
""" An alien in a shooter game. """
def die(self):
print("The alien gasps ... | 26.24 | 97 | 0.608232 |
ff3b8bc8fb9f2ac1fe278448442f9fe86ebae4cb | 514 | py | Python | Main/startapp.py | Gitrocha/BR-MarineTraffic | f3422e09ce522e802844c971f9507c2b4d142f5b | [
"MIT"
] | null | null | null | Main/startapp.py | Gitrocha/BR-MarineTraffic | f3422e09ce522e802844c971f9507c2b4d142f5b | [
"MIT"
] | null | null | null | Main/startapp.py | Gitrocha/BR-MarineTraffic | f3422e09ce522e802844c971f9507c2b4d142f5b | [
"MIT"
] | null | null | null | from flask_script import Server, Manager
from application import base_app
import log
from flask_cors import CORS
manager = Manager(base_app())
manager.add_command('runserver', Server(use_debugger=False, use_reloader=False, threaded=True))
if __name__ == '__main__':
"""
Run Flask server in given host and port... | 28.555556 | 95 | 0.731518 |
ff3b9644945b60cd9d7e76a2b723e604ec74c192 | 7,266 | py | Python | blurr/text/utils.py | warner-benjamin/blurr | c946c3c1b6ee92c6305f102b3d13181132ad083b | [
"Apache-2.0"
] | null | null | null | blurr/text/utils.py | warner-benjamin/blurr | c946c3c1b6ee92c6305f102b3d13181132ad083b | [
"Apache-2.0"
] | 3 | 2022-02-10T03:53:07.000Z | 2022-02-10T04:18:53.000Z | blurr/text/utils.py | warner-benjamin/blurr | c946c3c1b6ee92c6305f102b3d13181132ad083b | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/01_text-utils.ipynb (unless otherwise specified).
__all__ = ['get_hf_objects', 'BlurrText']
# Cell
import os, importlib, inspect, random, sys, torch
from typing import List, Optional, Union, Tuple, Type
import numpy as np
import pandas as pd
from enum import Enum
from... | 42.994083 | 140 | 0.674511 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.