hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1914ea214453a028d5c02ba5c0227b60cbbf920c | 1,432 | py | Python | Scripts4Orthofinder/renaming_cds_headers_TA.py | macmanes-lab/GeosmithiaComparativeGenomics | 61dfa4d50dece25e9420d8b4cf2a7343489056fd | [
"CC0-1.0"
] | 1 | 2017-07-10T16:49:45.000Z | 2017-07-10T16:49:45.000Z | Scripts4Orthofinder/renaming_cds_headers_TA.py | yuzhenpeng/GeosmithiaComparativeGenomics | 61dfa4d50dece25e9420d8b4cf2a7343489056fd | [
"CC0-1.0"
] | 1 | 2018-09-30T00:17:31.000Z | 2018-09-30T00:17:31.000Z | Scripts4Orthofinder/renaming_cds_headers_TA.py | yuzhenpeng/GeosmithiaComparativeGenomics | 61dfa4d50dece25e9420d8b4cf2a7343489056fd | [
"CC0-1.0"
] | 3 | 2016-01-23T13:18:37.000Z | 2021-06-17T13:48:59.000Z | #!/usr/bin/python3
# A program for renaming fasta headers
# USAGE: ./renaming_headers_TA.py --input path_to_input_directory
# Author: Taruna Aggarwal
# Affiliation: University of New Hampshire, Durham, NH, USA
# Date: 1/27/2016
# Purpose is to replace headers with their corresponding file names
# and add consecutive nu... | 39.777778 | 118 | 0.683659 |
567af8aebcf404e04e9d6d97ba0de7fbb63a13db | 2,292 | py | Python | google/cloud/aiplatform/v1/schema/predict/instance_v1/types/video_classification.py | sakagarwal/python-aiplatform | 62b4a1ea589235910c6e87f027899a29bf1bacb1 | [
"Apache-2.0"
] | 1 | 2022-03-30T05:23:29.000Z | 2022-03-30T05:23:29.000Z | google/cloud/aiplatform/v1/schema/predict/instance_v1/types/video_classification.py | sakagarwal/python-aiplatform | 62b4a1ea589235910c6e87f027899a29bf1bacb1 | [
"Apache-2.0"
] | null | null | null | google/cloud/aiplatform/v1/schema/predict/instance_v1/types/video_classification.py | sakagarwal/python-aiplatform | 62b4a1ea589235910c6e87f027899a29bf1bacb1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2022 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... | 38.2 | 74 | 0.67801 |
d796592a9dbc404e04f2ab4cdfe7c60bb100e5ad | 202 | py | Python | GeneratorInterface/GenFilters/python/BCToEFilter_cfi.py | menglu21/cmssw | c3d6cb102c0aaddf652805743370c28044d53da6 | [
"Apache-2.0"
] | null | null | null | GeneratorInterface/GenFilters/python/BCToEFilter_cfi.py | menglu21/cmssw | c3d6cb102c0aaddf652805743370c28044d53da6 | [
"Apache-2.0"
] | null | null | null | GeneratorInterface/GenFilters/python/BCToEFilter_cfi.py | menglu21/cmssw | c3d6cb102c0aaddf652805743370c28044d53da6 | [
"Apache-2.0"
] | null | null | null | import FWCore.ParameterSet.Config as cms
bctoefilter = cms.EDFilter("BCToEFilter",
filterAlgoPSet = cms.PSet(
maxAbsEta = cms.double(3.05),
eTThreshold = cms.double(10.0)
)
)
| 18.363636 | 41 | 0.658416 |
a68806eef7261d87a879fa40b52c88f47973860b | 2,034 | py | Python | Day 8/PROJECT: Caesar Cipher.py | Nishi-16-K/100DaysCodeChallenge-Python- | 96df953bbc60c2bf8802cf31ed6c593469521482 | [
"MIT"
] | 1 | 2021-08-29T12:44:23.000Z | 2021-08-29T12:44:23.000Z | Day 8/PROJECT: Caesar Cipher.py | Nishi-16-K/100DaysofCodeChallenge-Python | 96df953bbc60c2bf8802cf31ed6c593469521482 | [
"MIT"
] | null | null | null | Day 8/PROJECT: Caesar Cipher.py | Nishi-16-K/100DaysofCodeChallenge-Python | 96df953bbc60c2bf8802cf31ed6c593469521482 | [
"MIT"
] | null | null | null | import math
alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
def caesar(t_text, shift_amount, di... | 42.375 | 271 | 0.436087 |
37407c8b813d73c81e4cc168f0458556bc2b2f9e | 1,224 | py | Python | testapp/testapp/urls.py | shizus/django-afip | ee2f13923eea1c341d58fe1cd45c8a5736242e22 | [
"ISC"
] | 1 | 2019-10-23T02:59:16.000Z | 2019-10-23T02:59:16.000Z | testapp/testapp/urls.py | shizus/django-afip | ee2f13923eea1c341d58fe1cd45c8a5736242e22 | [
"ISC"
] | null | null | null | testapp/testapp/urls.py | shizus/django-afip | ee2f13923eea1c341d58fe1cd45c8a5736242e22 | [
"ISC"
] | null | null | null | """testapp URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-bas... | 29.853659 | 77 | 0.654412 |
b8596f10d86a62b0ed3bd16adff1b50b04b21849 | 254 | py | Python | nc/lookups.py | OpenDataPolicingNC/Traffic-Stops | 74e0d16ad2ac32addca6f04d34c2ddf36d023990 | [
"MIT"
] | 25 | 2015-09-12T23:10:52.000Z | 2021-03-24T08:39:46.000Z | nc/lookups.py | OpenDataPolicingNC/Traffic-Stops | 74e0d16ad2ac32addca6f04d34c2ddf36d023990 | [
"MIT"
] | 159 | 2015-07-01T03:57:23.000Z | 2021-04-17T21:09:19.000Z | nc/lookups.py | copelco/NC-Traffic-Stops | 74e0d16ad2ac32addca6f04d34c2ddf36d023990 | [
"MIT"
] | 8 | 2015-10-02T16:56:40.000Z | 2020-10-18T01:16:29.000Z | from selectable.base import ModelLookup
from selectable.registry import registry
from nc.models import Agency
class AgencyLookup(ModelLookup):
model = Agency
search_fields = (
'name__icontains',
)
registry.register(AgencyLookup)
| 16.933333 | 40 | 0.748031 |
fa15c47ab1862a3b40dba9fc0294479fb7df7e8e | 3,977 | py | Python | awx/main/utils/ansible.py | Avinesh/awx | 6310a2edd890d6062a9f6bcdeb2b46c4b876c2bf | [
"Apache-2.0"
] | 1 | 2019-10-22T09:55:28.000Z | 2019-10-22T09:55:28.000Z | awx/main/utils/ansible.py | Avinesh/awx | 6310a2edd890d6062a9f6bcdeb2b46c4b876c2bf | [
"Apache-2.0"
] | 2 | 2021-01-06T09:40:57.000Z | 2022-03-02T09:54:55.000Z | awx/main/utils/ansible.py | Avinesh/awx | 6310a2edd890d6062a9f6bcdeb2b46c4b876c2bf | [
"Apache-2.0"
] | 1 | 2020-01-28T05:34:09.000Z | 2020-01-28T05:34:09.000Z | # Copyright (c) 2017 Ansible by Red Hat
# All Rights Reserved.
# Python
import codecs
import re
import os
import logging
from itertools import islice
from configparser import ConfigParser
# Django
from django.utils.encoding import smart_str
logger = logging.getLogger('awx.main.utils.ansible')
__all__ = ['skip_dire... | 32.867769 | 88 | 0.644456 |
e99066c8cdf1ab45bfaa4446e1a2efe4691be8dc | 651 | py | Python | LeetCode/0110_balanced_binary_tree.py | LenartBucar/PythonAlgorithms | 7256a9e3bb71d37614c8cfa7bbb6d011ac456ae3 | [
"MIT"
] | 144 | 2020-09-13T22:54:57.000Z | 2022-02-24T21:54:25.000Z | LeetCode/0110_balanced_binary_tree.py | theGreenJedi/PythonAlgorithms | 72e0608ba0ce41229653e75f0b03ea212be8f88e | [
"MIT"
] | 587 | 2020-05-06T18:55:07.000Z | 2021-09-20T13:14:53.000Z | LeetCode/0110_balanced_binary_tree.py | theGreenJedi/PythonAlgorithms | 72e0608ba0ce41229653e75f0b03ea212be8f88e | [
"MIT"
] | 523 | 2020-09-09T12:07:13.000Z | 2022-02-24T21:54:31.000Z | #class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
# @param root, a tree node
# @return a boolean
def isBalanced(self, root):
def getHeight(root):
if root is None:
retur... | 31 | 59 | 0.539171 |
4522c801b6279c5cbd8d964ac5ffdc93112e6513 | 1,074 | py | Python | 10/adapter_array.py | tsalgie/advent_of_code_2020 | b944a9f04cf7cf24ca74edfa6f1e713b9bae1f11 | [
"MIT"
] | null | null | null | 10/adapter_array.py | tsalgie/advent_of_code_2020 | b944a9f04cf7cf24ca74edfa6f1e713b9bae1f11 | [
"MIT"
] | null | null | null | 10/adapter_array.py | tsalgie/advent_of_code_2020 | b944a9f04cf7cf24ca74edfa6f1e713b9bae1f11 | [
"MIT"
] | null | null | null | def adapter_array_01(jolts):
differences = [0, 0, 1]
for i in range(len(jolts) - 1):
differences[jolts[i + 1] - jolts[i] - 1] += 1
return differences[0] * differences[2]
def adapter_array_02(jolts):
groups = [True if jolts[i + 2] - jolts[i] <= 3 else False for i in range(len(jolts) - 2)]
gr... | 42.96 | 127 | 0.581006 |
b9f4a8d1f9f372c6b78fc54736d833b63d573a58 | 4,087 | py | Python | tests/metadata/test_roundtrips.py | zeburek/cattrs | c1aea4cf3a74cc42c90bf4e8a1e79390a323d774 | [
"MIT"
] | 3 | 2019-12-13T23:54:38.000Z | 2021-06-08T18:29:51.000Z | tests/metadata/test_roundtrips.py | zeburek/cattrs | c1aea4cf3a74cc42c90bf4e8a1e79390a323d774 | [
"MIT"
] | null | null | null | tests/metadata/test_roundtrips.py | zeburek/cattrs | c1aea4cf3a74cc42c90bf4e8a1e79390a323d774 | [
"MIT"
] | null | null | null | """Test both structuring and unstructuring."""
from dataclasses import MISSING, dataclass, fields, make_dataclass
from typing import Optional, Union
import pytest
from hypothesis import assume, given
from hypothesis.strategies import sampled_from
from convclasses import Converter, UnstructureStrategy, mod
from . imp... | 31.682171 | 77 | 0.706141 |
a00081a94558434b1dfea5311fb70543790c62b3 | 6,094 | py | Python | advection-1d/run_sampling.py | themisbo/Rule-based-Bayesian-regr | 9dc3e896e67117a43580f0a58199d3b8203f6f9d | [
"Apache-2.0"
] | null | null | null | advection-1d/run_sampling.py | themisbo/Rule-based-Bayesian-regr | 9dc3e896e67117a43580f0a58199d3b8203f6f9d | [
"Apache-2.0"
] | null | null | null | advection-1d/run_sampling.py | themisbo/Rule-based-Bayesian-regr | 9dc3e896e67117a43580f0a58199d3b8203f6f9d | [
"Apache-2.0"
] | 1 | 2022-02-11T14:20:12.000Z | 2022-02-11T14:20:12.000Z | #!/usr/bin/env python
from cycler import cycler
import matplotlib.pyplot as plt
import numpy as np
import pymc3 as pm
import scipy as sp
import theano
from simulator import run
plt.style.use("ggplot")
np.random.seed(1000005)
scale = 0.002
y_true, x = run(amplitude=0.001, phi=np.pi)
y_true = y_true * 10
shape = y_... | 26.611354 | 88 | 0.615852 |
9afb106a80ff4e3c67efda3159e90bd69eee442e | 202 | py | Python | addons/google_account/__init__.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | addons/google_account/__init__.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | addons/google_account/__init__.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import models
from . import controllers
from .models.google_service import TIMEOUT # noqa
| 25.25 | 74 | 0.727723 |
cffcd5ae6ca68f4643d868d6a6a7f0652ae5b102 | 8,022 | py | Python | cw/simulation/gym_wrapper.py | aarondewindt/cw | 6be9770da0f0fc34ea47d7ab83e6929c4823e98a | [
"MIT"
] | 1 | 2021-10-06T07:20:43.000Z | 2021-10-06T07:20:43.000Z | cw/simulation/gym_wrapper.py | aarondewindt/cw | 6be9770da0f0fc34ea47d7ab83e6929c4823e98a | [
"MIT"
] | 3 | 2019-02-18T13:49:39.000Z | 2020-12-28T04:13:27.000Z | cw/simulation/gym_wrapper.py | aarondewindt/cw | 6be9770da0f0fc34ea47d7ab83e6929c4823e98a | [
"MIT"
] | null | null | null | from typing import Tuple, Any, Union
from abc import ABC, abstractmethod
from threading import Thread, RLock, Condition
from enum import Flag, auto
from concurrent.futures import Future
import gym
import xarray as xr
from gym import spaces
from tqdm.auto import trange
from tqdm import tqdm
from cw.simulation.module_b... | 33.848101 | 85 | 0.633009 |
1d9d11a4ccd8aa8bd286678bd9dea643b128a408 | 5,541 | py | Python | otp/nametag/Nametag.py | CrankySupertoon01/Toontown-2 | 60893d104528a8e7eb4aced5d0015f22e203466d | [
"MIT"
] | 1 | 2021-02-13T22:40:50.000Z | 2021-02-13T22:40:50.000Z | otp/nametag/Nametag.py | CrankySupertoonArchive/Toontown-2 | 60893d104528a8e7eb4aced5d0015f22e203466d | [
"MIT"
] | 1 | 2018-07-28T20:07:04.000Z | 2018-07-30T18:28:34.000Z | otp/nametag/Nametag.py | CrankySupertoonArchive/Toontown-2 | 60893d104528a8e7eb4aced5d0015f22e203466d | [
"MIT"
] | 2 | 2019-12-02T01:39:10.000Z | 2021-02-13T22:41:00.000Z | from NametagConstants import *
import NametagGlobals
from otp.margins.ClickablePopup import ClickablePopup
from otp.otpbase import OTPGlobals
from pandac.PandaModules import *
from direct.interval.IntervalGlobal import *
class Nametag(ClickablePopup):
CName = 1
CSpeech = 2
CThought = 4
NAME_PADDING = ... | 34.416149 | 134 | 0.590507 |
ec7379ebdebe4ffc10d5c05215a99e8b909d4cf0 | 28,110 | py | Python | coordination/formation_communication_demo/control/script/sim_addleader_1.py | robin-shaun/xtdrone | f255d001e2b83e2dd54e8086f881c58a4efd53ee | [
"MIT"
] | null | null | null | coordination/formation_communication_demo/control/script/sim_addleader_1.py | robin-shaun/xtdrone | f255d001e2b83e2dd54e8086f881c58a4efd53ee | [
"MIT"
] | null | null | null | coordination/formation_communication_demo/control/script/sim_addleader_1.py | robin-shaun/xtdrone | f255d001e2b83e2dd54e8086f881c58a4efd53ee | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
"""
* This is the version that leader can hover, last modify on 2022.1.27 by Lan
Framework for Parallel Simulation
* To control all UAV in Gazebo(simulation environment) using MPI
Before running this code, you need to launch your simulation Environment and px4 via:
$ roslaunch px4 iris3_paral... | 48.216123 | 230 | 0.591996 |
c86a454c43579753111d971d356c495e671ae1f1 | 8,447 | py | Python | api/serializers.py | cusele/DB_OPS | f666bc56844cb6985937314190508ed393ce2171 | [
"Apache-2.0"
] | null | null | null | api/serializers.py | cusele/DB_OPS | f666bc56844cb6985937314190508ed393ce2171 | [
"Apache-2.0"
] | null | null | null | api/serializers.py | cusele/DB_OPS | f666bc56844cb6985937314190508ed393ce2171 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# _#_ coding:utf-8 _*_
from rest_framework import serializers
from OpsManage.models import *
from wiki.models import *
from orders.models import *
from filemanage.models import *
from django.contrib.auth.models import Group,User
class UserSerializer(serializers.ModelSerializer):
class Me... | 37.542222 | 95 | 0.626613 |
410747b6e64a6aac948591d4c25638b708fa92d1 | 184 | py | Python | users/urls.py | GuillaumeStaub/client-manager | 81298dc43956499f05c0f4d55992fd7dfced49b0 | [
"MIT"
] | null | null | null | users/urls.py | GuillaumeStaub/client-manager | 81298dc43956499f05c0f4d55992fd7dfced49b0 | [
"MIT"
] | null | null | null | users/urls.py | GuillaumeStaub/client-manager | 81298dc43956499f05c0f4d55992fd7dfced49b0 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path('login/', views.UsersLogin.as_view(), name='login'),
path('logout/',views.logout_view, name='logout'),
] | 23 | 61 | 0.684783 |
2299238e662bfd4a024a5d2be64439c166def86b | 263 | py | Python | .vscode/desafios/desafio 010.py | FonsecaThay/Curso-de-python | 58095dcb1f59d9e61aeab5a9de332e463f330d12 | [
"MIT"
] | null | null | null | .vscode/desafios/desafio 010.py | FonsecaThay/Curso-de-python | 58095dcb1f59d9e61aeab5a9de332e463f330d12 | [
"MIT"
] | null | null | null | .vscode/desafios/desafio 010.py | FonsecaThay/Curso-de-python | 58095dcb1f59d9e61aeab5a9de332e463f330d12 | [
"MIT"
] | null | null | null | v = float(input('Coloque seu saldo aqui e descubra quantos dólares você pode comprar: R$'))
uss = v / 5.15
#uss2= v / 3.27
euro = v / 5.82
print(f'Com R${v:.2f} você pode comprar US${uss:.2f} dólares')
print(f'Com R${v:.2f} você pode comprar US${euro:.2f} euros') | 43.833333 | 91 | 0.665399 |
518409a322cf2cf5de0a5302471422cdcb77b500 | 521 | py | Python | examples/dind/python/__main__.py | jaxxstorm/pulumi-rke | 9031a8509ce0f210348ece7419c1e7392174d603 | [
"ECL-2.0",
"Apache-2.0"
] | 3 | 2020-03-13T20:27:32.000Z | 2020-12-10T15:47:31.000Z | examples/dind/python/__main__.py | jaxxstorm/pulumi-rke | 9031a8509ce0f210348ece7419c1e7392174d603 | [
"ECL-2.0",
"Apache-2.0"
] | 97 | 2020-03-24T01:00:33.000Z | 2021-04-25T20:27:28.000Z | examples/dind/python/__main__.py | jaxxstorm/pulumi-rke | 9031a8509ce0f210348ece7419c1e7392174d603 | [
"ECL-2.0",
"Apache-2.0"
] | 4 | 2020-03-23T21:44:29.000Z | 2021-05-13T14:28:22.000Z | """A Python Pulumi program"""
import pulumi
import pulumi_rke as rke
cluster = rke.Cluster("actions",
cluster_name="python-test-cluster",
ignore_docker_version=True,
dind=True,
dind_dns_server=True,
nodes=[{
... | 28.944444 | 72 | 0.424184 |
7622ad8bc4ee5e99bfe7e20f6f7600399a6cae21 | 963 | py | Python | 00.basic_interaction/code/13.globals/main.py | Gaetz/python-training | 542f658883c66aaa932fb9e385225cfd573bb6de | [
"MIT"
] | 1 | 2021-10-05T11:45:28.000Z | 2021-10-05T11:45:28.000Z | 00.basic_interaction/code/13.globals/main.py | Gaetz/python-training | 542f658883c66aaa932fb9e385225cfd573bb6de | [
"MIT"
] | null | null | null | 00.basic_interaction/code/13.globals/main.py | Gaetz/python-training | 542f658883c66aaa932fb9e385225cfd573bb6de | [
"MIT"
] | null | null | null | import pygame, time, sys
def main():
pygame.init()
load()
while not quit_game:
inputs()
update()
draw()
time.sleep(2) # End program after 2 seconds
def load():
global screen, font, text, key, quit_game
screen = pygame.display.set_mode((800, 600))
font = pygame.fon... | 21.4 | 67 | 0.559709 |
53b773b6e2a5fdd2946d8d850d51f5c467d3e8ca | 555 | py | Python | src/radios/__init__.py | frenck/python-radios | f5b36cab45b639f2d11fe003033914473e66db08 | [
"MIT"
] | 7 | 2022-02-21T13:20:15.000Z | 2022-02-26T10:58:17.000Z | src/radios/__init__.py | frenck/python-radios | f5b36cab45b639f2d11fe003033914473e66db08 | [
"MIT"
] | 2 | 2022-03-07T16:46:22.000Z | 2022-03-30T06:34:03.000Z | src/radios/__init__.py | frenck/python-radios | f5b36cab45b639f2d11fe003033914473e66db08 | [
"MIT"
] | null | null | null | """Asynchronous Python client for the Radio Browser APIs."""
from .const import FilterBy, Order
from .exceptions import (
RadioBrowserConnectionError,
RadioBrowserConnectionTimeoutError,
RadioBrowserError,
)
from .models import Country, Language, Station, Stats, Tag
from .radio_browser import RadioBrowser
... | 23.125 | 60 | 0.708108 |
041c6a8b85eb7e24e55a1ecfd4b1878ed03000b9 | 3,675 | py | Python | huaweicloud-sdk-kms/huaweicloudsdkkms/v1/model/import_key_material_request.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 64 | 2020-06-12T07:05:07.000Z | 2022-03-30T03:32:50.000Z | huaweicloud-sdk-kms/huaweicloudsdkkms/v1/model/import_key_material_request.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 11 | 2020-07-06T07:56:54.000Z | 2022-01-11T11:14:40.000Z | huaweicloud-sdk-kms/huaweicloudsdkkms/v1/model/import_key_material_request.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 24 | 2020-06-08T11:42:13.000Z | 2022-03-04T06:44:08.000Z | # coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class ImportKeyMaterialRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): T... | 26.438849 | 79 | 0.564082 |
26ecf1356a94670f7ec987d7db7041d9ccdadc0e | 14,904 | py | Python | pandas/tests/frame/methods/test_rename.py | mathause/pandas | 72327f32e2328d3e13b6c55617d71036fccdd0e1 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 2 | 2021-01-20T21:13:08.000Z | 2021-01-31T09:59:18.000Z | pandas/tests/frame/methods/test_rename.py | mathause/pandas | 72327f32e2328d3e13b6c55617d71036fccdd0e1 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2019-11-13T22:07:00.000Z | 2019-11-14T13:46:34.000Z | pandas/tests/frame/methods/test_rename.py | mathause/pandas | 72327f32e2328d3e13b6c55617d71036fccdd0e1 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2017-05-08T13:57:21.000Z | 2017-05-08T13:57:21.000Z | from collections import ChainMap
import inspect
import numpy as np
import pytest
import pandas.util._test_decorators as td
from pandas import (
DataFrame,
Index,
MultiIndex,
Series,
merge,
)
import pandas._testing as tm
class TestRename:
def test_rename_signature(self):
sig = inspec... | 36.440098 | 88 | 0.558038 |
d1442331e870f10fa1cbba13ab526e098c1c29fb | 1,081 | py | Python | elasticsearch6/client/xpack/monitoring.py | turtle321/elasticsearch-py | 80cd96ef96f34e3bb291fdf4f643da5a1016a8d7 | [
"Apache-2.0"
] | null | null | null | elasticsearch6/client/xpack/monitoring.py | turtle321/elasticsearch-py | 80cd96ef96f34e3bb291fdf4f643da5a1016a8d7 | [
"Apache-2.0"
] | null | null | null | elasticsearch6/client/xpack/monitoring.py | turtle321/elasticsearch-py | 80cd96ef96f34e3bb291fdf4f643da5a1016a8d7 | [
"Apache-2.0"
] | null | null | null | from elasticsearch6.client.utils import NamespacedClient, query_params, _make_path, SKIP_IN_PATH
class MonitoringClient(NamespacedClient):
@query_params('interval', 'system_api_version', 'system_id')
def bulk(self, body, doc_type=None, params=None):
"""
`<http://www.elastic.co/guide/en/monitori... | 49.136364 | 96 | 0.678076 |
f746b62b4f4b6d73439630f4f196227fbc7aaa2f | 3,836 | py | Python | cirq/ion/convert_to_ion_gates_test.py | kunalq/Cirq | e73c9bef672e83143ab04e7f169988149055d630 | [
"Apache-2.0"
] | 1 | 2019-09-04T16:55:30.000Z | 2019-09-04T16:55:30.000Z | cirq/ion/convert_to_ion_gates_test.py | 1eedaegon/Cirq | de0c5e855069bba71e55b070fc9b06f58c07a861 | [
"Apache-2.0"
] | null | null | null | cirq/ion/convert_to_ion_gates_test.py | 1eedaegon/Cirq | de0c5e855069bba71e55b070fc9b06f58c07a861 | [
"Apache-2.0"
] | 1 | 2020-12-18T16:36:41.000Z | 2020-12-18T16:36:41.000Z | # Copyright 2018 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 36.884615 | 78 | 0.62513 |
698db812382f1e3a23f2fa7b39ff96f689930cf8 | 40,774 | py | Python | tensorflow_probability/python/distributions/vector_diffeomixture.py | timudk/probability | 8bdbf1c0b0f801edaf342f4ffc9caf1cfd6f1103 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/distributions/vector_diffeomixture.py | timudk/probability | 8bdbf1c0b0f801edaf342f4ffc9caf1cfd6f1103 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/distributions/vector_diffeomixture.py | timudk/probability | 8bdbf1c0b0f801edaf342f4ffc9caf1cfd6f1103 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Probability 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 o... | 41.862423 | 128 | 0.658189 |
82201950d4ce249a659d7a43b3faedd9956a3c4f | 574 | py | Python | adventofcode2021/main.py | barthogenes/AdventOfCode2021 | b54ed6dca83df48ede5efff8ed1e3b6d827eac94 | [
"MIT"
] | null | null | null | adventofcode2021/main.py | barthogenes/AdventOfCode2021 | b54ed6dca83df48ede5efff8ed1e3b6d827eac94 | [
"MIT"
] | null | null | null | adventofcode2021/main.py | barthogenes/AdventOfCode2021 | b54ed6dca83df48ede5efff8ed1e3b6d827eac94 | [
"MIT"
] | null | null | null | from dive import dive_part_1, dive_part_2
from get_puzzle_input import get_puzzle_input
from sonar_sweep import sonar_sweep_part_1, sonar_sweep_part_2
if __name__ == "__main__":
puzzle_input = get_puzzle_input(2021, 1)
print("Day 1: Sonar Sweep")
print(f"Part 1 answer = {sonar_sweep_part_1(puzzle_input)}")... | 38.266667 | 64 | 0.740418 |
3c3cda57663be55e45eb15947104f25bd3b93659 | 487 | py | Python | local.py | Alyetama/CarbonDate | 576f53fa9809a61a896ecf9286f172fded1cb3bf | [
"MIT"
] | 69 | 2016-09-27T10:43:28.000Z | 2022-03-01T22:24:07.000Z | local.py | Alyetama/CarbonDate | 576f53fa9809a61a896ecf9286f172fded1cb3bf | [
"MIT"
] | 27 | 2016-10-05T20:32:04.000Z | 2019-01-16T15:02:00.000Z | local.py | Alyetama/CarbonDate | 576f53fa9809a61a896ecf9286f172fded1cb3bf | [
"MIT"
] | 12 | 2016-05-12T04:10:43.000Z | 2021-12-13T23:42:28.000Z | #!/usr/bin/env python3
import json
import logging
def start(args, mod):
'''
Start local version of Carbon Tool
'''
result = {}
loglevel = logging.WARNING
if args.verbose:
loglevel = logging.DEBUG
logging.basicConfig(level=loglevel, format='%(message)s')
logger = logging.getLog... | 23.190476 | 61 | 0.622177 |
88c91722e0b11da7f83c8e07a5f9db9f40724eb8 | 2,406 | py | Python | entertainment_center.py | angnaerxisen/Udacity | fb2c9ddb16582ec36ec7f400c8b0c1530c769bbc | [
"Apache-2.0"
] | null | null | null | entertainment_center.py | angnaerxisen/Udacity | fb2c9ddb16582ec36ec7f400c8b0c1530c769bbc | [
"Apache-2.0"
] | null | null | null | entertainment_center.py | angnaerxisen/Udacity | fb2c9ddb16582ec36ec7f400c8b0c1530c769bbc | [
"Apache-2.0"
] | null | null | null | import fresh_tomatoes
import media
# Dead pool the story line ,poster and treailer find on IMDB ,cool websites
dead_pool = media.Movie(
"Dead Pool",
"A fast-talking mercenary with a morbid sense of humor is subjected to\
a rogue experiment that leaves him with accelerated healing powers and \... | 33.416667 | 110 | 0.583541 |
c6dccbd1259492fa15f2d9fc161aaef790c4e61a | 10,594 | py | Python | synthetic/orbitreducer.py | adrn/GalaxySynth | 784e99706b6ca9b4d9402da3a453d0066fa76e8b | [
"MIT"
] | 1 | 2015-04-11T01:03:33.000Z | 2015-04-11T01:03:33.000Z | synthetic/orbitreducer.py | adrn/GalaxySynth | 784e99706b6ca9b4d9402da3a453d0066fa76e8b | [
"MIT"
] | null | null | null | synthetic/orbitreducer.py | adrn/GalaxySynth | 784e99706b6ca9b4d9402da3a453d0066fa76e8b | [
"MIT"
] | null | null | null | # coding: utf-8
""" Turn a collection of orbits into something we can make into music. """
from __future__ import division, print_function
__author__ = "adrn <adrn@astro.columbia.edu>"
# Third-party
import gary.dynamics as gd
import numpy as np
from scipy.signal import argrelmin, argrelmax
__all__ = ['cyl_orbit_to... | 27.878947 | 95 | 0.560695 |
ee298c6bbf583e839324553e23380bd69afee7f1 | 41 | py | Python | music/__init__.py | dkassen/music | 0a356dcf9891fd1d5a2f07150868c06905de5ef4 | [
"MIT"
] | null | null | null | music/__init__.py | dkassen/music | 0a356dcf9891fd1d5a2f07150868c06905de5ef4 | [
"MIT"
] | null | null | null | music/__init__.py | dkassen/music | 0a356dcf9891fd1d5a2f07150868c06905de5ef4 | [
"MIT"
] | null | null | null | from models.accidentals import Accidental | 41 | 41 | 0.902439 |
b364bc8a4ae53249b86e3496c38c0799a9b766d1 | 2,939 | py | Python | fine-tune/evaluation/eval_gen.py | muyeby/AMRBART | 8f52f9d6a23dcf4132d2cc1272d6605ebc78a16f | [
"MIT"
] | 14 | 2022-03-16T02:36:30.000Z | 2022-03-26T07:46:18.000Z | fine-tune/evaluation/eval_gen.py | muyeby/AMRBART | 8f52f9d6a23dcf4132d2cc1272d6605ebc78a16f | [
"MIT"
] | 2 | 2022-03-24T12:45:27.000Z | 2022-03-30T03:25:15.000Z | fine-tune/evaluation/eval_gen.py | muyeby/AMRBART | 8f52f9d6a23dcf4132d2cc1272d6605ebc78a16f | [
"MIT"
] | 2 | 2022-03-24T06:12:19.000Z | 2022-03-31T10:44:57.000Z | import sys
import os
import argparse
from typing import Iterable, Optional
import datasets
import re
def argument_parser():
parser = argparse.ArgumentParser(description="Preprocess AMR data")
# Multiple input parameters
parser.add_argument("--in-tokens", help="input tokens", required=True, type=str)
... | 29.686869 | 100 | 0.674039 |
569958d364ae0330878f0255f2506ef39c0b709c | 2,172 | py | Python | src/sage/categories/ring_ideals.py | sensen1/sage | d6c5cd9be78cc448ee4c54bac93385b1244a234c | [
"BSL-1.0"
] | 10 | 2018-06-01T21:54:53.000Z | 2022-03-14T20:11:34.000Z | src/sage/categories/ring_ideals.py | sensen1/sage | d6c5cd9be78cc448ee4c54bac93385b1244a234c | [
"BSL-1.0"
] | 2 | 2021-04-02T20:43:29.000Z | 2021-04-05T23:38:58.000Z | src/sage/categories/ring_ideals.py | sensen1/sage | d6c5cd9be78cc448ee4c54bac93385b1244a234c | [
"BSL-1.0"
] | 15 | 2020-07-23T10:46:25.000Z | 2022-01-25T15:37:24.000Z | r"""
Ring ideals
"""
#*****************************************************************************
# Copyright (C) 2005 David Kohel <kohel@maths.usyd.edu>
# William Stein <wstein@math.ucsd.edu>
# 2008-2009 Nicolas M. Thiery <nthiery at users.sf.net>
#
# Distributed under ... | 30.166667 | 79 | 0.533149 |
9161fd3f0a514f37a97cfd735eafbe5ae6ff4b84 | 5,956 | py | Python | src/data/account.py | vincent-lg/talismud | 645bdae3d2e71cde51a25fe48c8f1bde15319631 | [
"BSD-3-Clause"
] | 4 | 2020-05-16T21:58:55.000Z | 2020-08-29T11:17:31.000Z | src/data/account.py | vincent-lg/talismud | 645bdae3d2e71cde51a25fe48c8f1bde15319631 | [
"BSD-3-Clause"
] | 1 | 2020-12-15T11:22:32.000Z | 2020-12-15T11:22:32.000Z | src/data/account.py | vincent-lg/talismud | 645bdae3d2e71cde51a25fe48c8f1bde15319631 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020-20201, LE GOFF Vincent
# 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... | 36.765432 | 78 | 0.695601 |
cd879934339a82d66a76c1d28a53db05e5460943 | 900 | py | Python | tests/plugins/hold_htlcs.py | mosqueiro/lightning | 793a25a0e5ee0c3c80d1403d556a4a013ee233fd | [
"MIT"
] | 2 | 2019-10-03T16:52:59.000Z | 2019-10-04T14:35:16.000Z | tests/plugins/hold_htlcs.py | mosqueiro/lightning | 793a25a0e5ee0c3c80d1403d556a4a013ee233fd | [
"MIT"
] | 1 | 2019-09-18T23:38:38.000Z | 2019-09-18T23:38:38.000Z | tests/plugins/hold_htlcs.py | jtimon/lightning | 61383408a45960bf7fd045fc420c95478de699c0 | [
"MIT"
] | 2 | 2020-01-11T13:14:39.000Z | 2021-05-10T14:10:36.000Z | #!/usr/bin/env python3
"""Plugin that holds on to HTLCs for 10 seconds.
Used to test restarts / crashes while HTLCs were accepted, but not yet
settled/forwarded/
"""
from lightning import Plugin
import json
import os
import tempfile
import time
plugin = Plugin()
@plugin.hook("htlc_accepted")
def on_htlc_accepted... | 20.930233 | 70 | 0.698889 |
b2becbfb76f5d22b95737f1c020cdb78f56491bd | 1,200 | py | Python | fedlearner/common/hooks.py | Hsy-Intel/fedlearner | d5d0bb5549e115eaf0dec5a00a78dcb21ac0909d | [
"Apache-2.0"
] | 772 | 2020-01-21T13:59:42.000Z | 2022-03-30T08:20:16.000Z | fedlearner/common/hooks.py | Hsy-Intel/fedlearner | d5d0bb5549e115eaf0dec5a00a78dcb21ac0909d | [
"Apache-2.0"
] | 126 | 2020-03-03T07:54:39.000Z | 2022-03-08T23:24:03.000Z | fedlearner/common/hooks.py | Hsy-Intel/fedlearner | d5d0bb5549e115eaf0dec5a00a78dcb21ac0909d | [
"Apache-2.0"
] | 198 | 2020-01-22T02:16:17.000Z | 2022-03-31T01:13:05.000Z | # Copyright 2021 The FedLearner 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... | 33.333333 | 74 | 0.743333 |
79affd92ba3ca5b74d1bde5149d5507ee187a5a3 | 933 | py | Python | file_syncer/constants.py | Kami/python-file-syncer | 4ce8e771653324388d9b0ff5c3b1040089d58525 | [
"Apache-2.0"
] | 5 | 2015-01-10T18:22:54.000Z | 2021-07-11T00:11:31.000Z | file_syncer/constants.py | ogrisel/python-file-syncer | 4bab4c9a046b61de1b9631a0aa4d3513bc872abe | [
"Apache-2.0"
] | null | null | null | file_syncer/constants.py | ogrisel/python-file-syncer | 4bab4c9a046b61de1b9631a0aa4d3513bc872abe | [
"Apache-2.0"
] | 4 | 2016-08-20T04:44:28.000Z | 2021-11-05T05:38:49.000Z | # Licensed to Tomaz Muraus under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# Tomaz muraus licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in... | 38.875 | 78 | 0.754555 |
a7f462909a12b385e0135018764efe9d121113e3 | 17,705 | py | Python | tests/labeling/text_classification/test_label_models.py | InquestGeronimo/rubrix | 04b6e619c900cc67f79020197d7ef242501b360e | [
"Apache-2.0"
] | 888 | 2021-03-26T20:39:21.000Z | 2022-03-31T18:09:37.000Z | tests/labeling/text_classification/test_label_models.py | InquestGeronimo/rubrix | 04b6e619c900cc67f79020197d7ef242501b360e | [
"Apache-2.0"
] | 805 | 2021-04-29T09:24:44.000Z | 2022-03-31T18:29:34.000Z | tests/labeling/text_classification/test_label_models.py | InquestGeronimo/rubrix | 04b6e619c900cc67f79020197d7ef242501b360e | [
"Apache-2.0"
] | 72 | 2021-04-30T08:53:36.000Z | 2022-03-31T10:48:33.000Z | # coding=utf-8
# Copyright 2021-present, the Recognai S.L. team.
#
# 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 ... | 33.917625 | 88 | 0.577633 |
2068526162b27630307c7b206043a5d49a87b6bd | 7,966 | py | Python | smartmeter.py | BasvanderWorp/smartmeter | 76fd3a0f55ff8081879f1e7884030e8a2e46d2a4 | [
"MIT"
] | null | null | null | smartmeter.py | BasvanderWorp/smartmeter | 76fd3a0f55ff8081879f1e7884030e8a2e46d2a4 | [
"MIT"
] | null | null | null | smartmeter.py | BasvanderWorp/smartmeter | 76fd3a0f55ff8081879f1e7884030e8a2e46d2a4 | [
"MIT"
] | null | null | null | # Dutch Smart Meter Reader (P1)
import sys
import serial
from util import read_config
import argparse
import os
import logging
from datetime import datetime
import socket
##############################################################################
# Part 0.1: Set global variables
####################################... | 37.051163 | 90 | 0.467989 |
8c66b2ca4c7662321a5ec627105265e1275aa02b | 218 | py | Python | app/logic/bluesteel/controllers/__init__.py | imvu/bluesteel | ab52133249a693b3cd2d8593c5d47408a3b0fce6 | [
"MIT"
] | 10 | 2017-01-13T06:28:04.000Z | 2020-11-18T13:00:26.000Z | app/logic/bluesteel/controllers/__init__.py | imvu/bluesteel | ab52133249a693b3cd2d8593c5d47408a3b0fce6 | [
"MIT"
] | null | null | null | app/logic/bluesteel/controllers/__init__.py | imvu/bluesteel | ab52133249a693b3cd2d8593c5d47408a3b0fce6 | [
"MIT"
] | 2 | 2018-03-29T14:10:53.000Z | 2019-11-20T08:21:57.000Z | """ Automatic file """
from app.logic.bluesteel.controllers.BluesteelLayoutController import BluesteelLayoutController
from app.logic.bluesteel.controllers.BluesteelProjectController import BluesteelProjectController
| 43.6 | 97 | 0.876147 |
86a0861b7a37452603165bac313e8b230c774011 | 1,474 | py | Python | vframe/vframe/commands/save_images.py | kant/vframe | 28e49ca62d9036a78a25b26eb0fb7e3cf8c79031 | [
"MIT"
] | 1 | 2021-04-18T10:42:10.000Z | 2021-04-18T10:42:10.000Z | vframe/vframe/commands/save_images.py | vframeio/_vframe_v0_archived | 28e49ca62d9036a78a25b26eb0fb7e3cf8c79031 | [
"MIT"
] | null | null | null | vframe/vframe/commands/save_images.py | vframeio/_vframe_v0_archived | 28e49ca62d9036a78a25b26eb0fb7e3cf8c79031 | [
"MIT"
] | null | null | null | """
Generates metadata using Yolo/Darknet Python interface
- about 20-30 FPS on NVIDIA 1080 Ti GPU
- SPP currently not working
- enusre image size matches network image size
"""
import click
from vframe.settings import types
from vframe.utils import click_utils
from vframe.settings import vframe_cfg as cfg
from cli_... | 23.396825 | 86 | 0.603121 |
175d6896e49edee309c13404160dfc62f4db8196 | 1,471 | py | Python | ngram-protein-classifier/generate.py | yasithmilinda/uom-projects | d1810a78ff8de1c57b760836cf102f63c5945962 | [
"MIT"
] | null | null | null | ngram-protein-classifier/generate.py | yasithmilinda/uom-projects | d1810a78ff8de1c57b760836cf102f63c5945962 | [
"MIT"
] | null | null | null | ngram-protein-classifier/generate.py | yasithmilinda/uom-projects | d1810a78ff8de1c57b760836cf102f63c5945962 | [
"MIT"
] | null | null | null | import re
import numpy as np
import pandas as pd
from sklearn.feature_extraction.text import CountVectorizer
pd.set_option('display.max_columns', 500)
pd.set_option('display.width', 1000)
ds = pd.read_csv("data/dataset_clean_p1.csv")
# Remove class labels with low frequencies
ds_vc = ds['Classification'].value_coun... | 35.878049 | 113 | 0.738273 |
b3ad70037afe5dfce34b8a0a06b590f171553ffb | 7,067 | py | Python | accelbyte_py_sdk/api/iam/operations/users_v4/public_generate_my_back_da569a.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | null | null | null | accelbyte_py_sdk/api/iam/operations/users_v4/public_generate_my_back_da569a.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | 1 | 2021-10-13T03:46:58.000Z | 2021-10-13T03:46:58.000Z | accelbyte_py_sdk/api/iam/operations/users_v4/public_generate_my_back_da569a.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | null | null | null | # Copyright (c) 2021 AccelByte Inc. All Rights Reserved.
# This is licensed software from AccelByte Inc, for limitations
# and restrictions contact your company contract manager.
#
# Code generated. DO NOT EDIT!
# template file: justice_py_sdk_codegen/__main__.py
# pylint: disable=duplicate-code
# pylint: disable=li... | 29.569038 | 169 | 0.660959 |
c289bf3ba0b8566e47489cad6a057ac4349350fb | 58,232 | py | Python | ugali/utils/plotting.py | DarkEnergySurvey/ugali | 82abffcc92bddf830d89f85cb3966870f7d9f720 | [
"MIT"
] | 12 | 2016-10-26T20:45:33.000Z | 2021-11-24T04:07:43.000Z | ugali/utils/plotting.py | DarkEnergySurvey/ugali | 82abffcc92bddf830d89f85cb3966870f7d9f720 | [
"MIT"
] | 64 | 2017-04-14T15:04:24.000Z | 2022-02-03T19:42:57.000Z | ugali/utils/plotting.py | DarkEnergySurvey/ugali | 82abffcc92bddf830d89f85cb3966870f7d9f720 | [
"MIT"
] | 12 | 2016-06-23T21:42:46.000Z | 2021-06-19T05:29:49.000Z | """
Basic plotting tools.
"""
import os
import collections
import copy
import matplotlib
try: os.environ['DISPLAY']
except KeyError: matplotlib.use('Agg')
import yaml
import numpy as np
import pylab as plt
import healpy as hp
import fitsio
import scipy.ndimage as nd
import scipy.misc
from mpl_toolkits.ax... | 36.902408 | 201 | 0.586018 |
288d0e694f21a4992a0c4f5f5d094fba80417cab | 17,637 | py | Python | tensorflow/python/data/kernel_tests/from_generator_test.py | xuzhezhaozhao/tensorflow | 282828af67de29d13dd2c69d96413c030b02543c | [
"Apache-2.0"
] | 1 | 2020-03-25T01:18:44.000Z | 2020-03-25T01:18:44.000Z | tensorflow/python/data/kernel_tests/from_generator_test.py | xuzhezhaozhao/tensorflow | 282828af67de29d13dd2c69d96413c030b02543c | [
"Apache-2.0"
] | 2 | 2020-03-21T20:23:54.000Z | 2020-03-21T20:25:05.000Z | tensorflow/python/data/kernel_tests/from_generator_test.py | xuzhezhaozhao/tensorflow | 282828af67de29d13dd2c69d96413c030b02543c | [
"Apache-2.0"
] | null | null | null | # 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... | 36.66736 | 80 | 0.688212 |
eff830e824fc5425b224ac3c81a82be04ee6f22d | 1,047 | py | Python | beamit/resources/signup.py | ksweta/BeamIt-Server | 0678bab9fce6427c5af45c85e24d851ccd5fbdfb | [
"Apache-2.0"
] | null | null | null | beamit/resources/signup.py | ksweta/BeamIt-Server | 0678bab9fce6427c5af45c85e24d851ccd5fbdfb | [
"Apache-2.0"
] | null | null | null | beamit/resources/signup.py | ksweta/BeamIt-Server | 0678bab9fce6427c5af45c85e24d851ccd5fbdfb | [
"Apache-2.0"
] | null | null | null | from beamit.resources.base import Resource
class SignupRequest(Resource):
MEDIA_TYPE = 'application/vnd.beamit.signup.request+json'
def __init__(self, email, password):
self.email = email
self.password = password
def __repr__(self):
return "<SignupRequest email: {}, password: {}>... | 23.795455 | 66 | 0.624642 |
bd91533376a2bd7230bfda81126a33d879bed4f2 | 1,992 | py | Python | tests/common/test_run/sigmoid_run.py | KnowingNothing/akg-test | 114d8626b824b9a31af50a482afc07ab7121862b | [
"Apache-2.0"
] | null | null | null | tests/common/test_run/sigmoid_run.py | KnowingNothing/akg-test | 114d8626b824b9a31af50a482afc07ab7121862b | [
"Apache-2.0"
] | null | null | null | tests/common/test_run/sigmoid_run.py | KnowingNothing/akg-test | 114d8626b824b9a31af50a482afc07ab7121862b | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Huawei Technologies Co., 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 a... | 41.5 | 115 | 0.670683 |
23ea30f38330d86ee376b5d2fbea7c49c138da7a | 34,957 | py | Python | src/AeroelasticSE/CaseLibrary.py | WISDEM/AeroelasticSE | 486e89ce129f97796fd9b64e2c3562102287403d | [
"Apache-2.0"
] | 7 | 2015-01-19T18:22:32.000Z | 2022-02-26T10:04:16.000Z | src/AeroelasticSE/CaseLibrary.py | WISDEM/AeroelasticSE | 486e89ce129f97796fd9b64e2c3562102287403d | [
"Apache-2.0"
] | 3 | 2016-07-25T19:23:54.000Z | 2018-09-24T16:09:26.000Z | src/AeroelasticSE/CaseLibrary.py | WISDEM/AeroelasticSE | 486e89ce129f97796fd9b64e2c3562102287403d | [
"Apache-2.0"
] | 15 | 2015-03-03T17:38:40.000Z | 2021-04-19T18:39:45.000Z | import os
import numpy as np
from AeroelasticSE.CaseGen_General import CaseGen_General
from AeroelasticSE.CaseGen_IEC import CaseGen_IEC
# def power_curve_fit(fst_vt, runDir, namebase, TMax, turbine_class, turbulence_class, Vrated, U_init=[], Omega_init=[], pitch_init=[], Turbsim_exe='', ptfm_U_init=[], ptfm_pitch_in... | 58.751261 | 314 | 0.597935 |
baa32c0ccbac1f941e696bd3040e70b51ad664c0 | 550 | py | Python | bin/datapackage-dataset.py | anthonyrandell-madetech/specification | c675576c5cd2103b52938a6cd8cad546da3433e1 | [
"MIT"
] | null | null | null | bin/datapackage-dataset.py | anthonyrandell-madetech/specification | c675576c5cd2103b52938a6cd8cad546da3433e1 | [
"MIT"
] | 6 | 2020-07-14T07:55:38.000Z | 2022-01-11T09:50:59.000Z | bin/datapackage-dataset.py | anthonyrandell-madetech/specification | c675576c5cd2103b52938a6cd8cad546da3433e1 | [
"MIT"
] | 2 | 2022-01-06T14:29:05.000Z | 2022-01-07T09:52:52.000Z | #!/usr/bin/env python3
import sys
import csv
import frontmatter
fieldnames = ["datapackage", "dataset"]
w = csv.DictWriter(open(sys.argv[1], "w", newline=""), fieldnames=fieldnames, extrasaction='ignore')
w.writeheader()
for row in csv.DictReader(open("specification/datapackage.csv", newline="")):
datapackage =... | 30.555556 | 100 | 0.701818 |
03b3505855d7610ca829c8d18ee7ba367efb94f7 | 450 | py | Python | tests/test_toggle_fullscreen.py | vault-the/pywebview | 8608378ab62732d52640478c572c4f83994c0cbf | [
"BSD-3-Clause"
] | null | null | null | tests/test_toggle_fullscreen.py | vault-the/pywebview | 8608378ab62732d52640478c572c4f83994c0cbf | [
"BSD-3-Clause"
] | null | null | null | tests/test_toggle_fullscreen.py | vault-the/pywebview | 8608378ab62732d52640478c572c4f83994c0cbf | [
"BSD-3-Clause"
] | null | null | null | import pytest
import threading
from .util import run_test, destroy_window
def toggle_fullscreen():
import webview
def _toggle_fullscreen(webview):
webview.toggle_fullscreen()
t = threading.Thread(target=_toggle_fullscreen, args=(webview,))
t.start()
destroy_window(webview)
webview.c... | 21.428571 | 78 | 0.742222 |
168068cf53acdfef09cd6f2571184f5e8e420004 | 2,980 | py | Python | mlearn_for_image.py | busyyang/easy12306 | 707d34f7a868fd6155ed6e7a1703b79ef5f62c73 | [
"Artistic-2.0"
] | null | null | null | mlearn_for_image.py | busyyang/easy12306 | 707d34f7a868fd6155ed6e7a1703b79ef5f62c73 | [
"Artistic-2.0"
] | null | null | null | mlearn_for_image.py | busyyang/easy12306 | 707d34f7a868fd6155ed6e7a1703b79ef5f62c73 | [
"Artistic-2.0"
] | null | null | null | # coding: utf-8
import sys
import cv2
import numpy as np
from keras import models
from keras import layers
from keras import optimizers
from keras.applications import VGG16
from keras.callbacks import ReduceLROnPlateau
from keras.preprocessing.image import ImageDataGenerator
def preprocess_input(x):
... | 32.043011 | 85 | 0.628523 |
382ff03bb286d4cd75a1a8a8d293686eb55bb82f | 2,734 | py | Python | test/test_cashbook_entry.py | fattureincloud/fattureincloud-python-sdk | f3a40fac345751014ea389680efdaef90f03bac1 | [
"MIT"
] | 2 | 2022-02-17T08:33:17.000Z | 2022-03-22T09:27:00.000Z | test/test_cashbook_entry.py | fattureincloud/fattureincloud-python-sdk | f3a40fac345751014ea389680efdaef90f03bac1 | [
"MIT"
] | null | null | null | test/test_cashbook_entry.py | fattureincloud/fattureincloud-python-sdk | f3a40fac345751014ea389680efdaef90f03bac1 | [
"MIT"
] | null | null | null | """
Fatture in Cloud API v2 - API Reference
Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 400.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. # noq... | 37.972222 | 340 | 0.66496 |
56f2f0dfea4f614ed6626a23e9b6b182c6203646 | 649 | py | Python | eggs/docutils-0.7-py2.6.egg/EGG-INFO/scripts/rst2xml.py | psnehal/MethylSig | 5efad71e71ff2515feff2e49579c856ef9a1bbd8 | [
"CC-BY-3.0"
] | null | null | null | eggs/docutils-0.7-py2.6.egg/EGG-INFO/scripts/rst2xml.py | psnehal/MethylSig | 5efad71e71ff2515feff2e49579c856ef9a1bbd8 | [
"CC-BY-3.0"
] | null | null | null | eggs/docutils-0.7-py2.6.egg/EGG-INFO/scripts/rst2xml.py | psnehal/MethylSig | 5efad71e71ff2515feff2e49579c856ef9a1bbd8 | [
"CC-BY-3.0"
] | null | null | null | #!/afs/bx.psu.edu/project/pythons/linux-x86_64-ucs4/bin/python2.6
# $Id: rst2xml.py 4564 2006-05-21 20:44:42Z wiemann $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
A minimal front end to the Docutils Publisher, producing Docutils XML.
"""
try:
i... | 27.041667 | 70 | 0.74114 |
aaaf8bcecbaeb47a96000cf95fc818ddf954c4e3 | 6,113 | py | Python | kospeech/models/transformer/model.py | daiyaanarfeen/kospeech | 5aff5c7647e5cceceddf7b22c991777fc3792400 | [
"Apache-2.0"
] | 257 | 2020-06-06T14:20:47.000Z | 2021-08-12T05:01:39.000Z | kospeech/models/transformer/model.py | daiyaanarfeen/kospeech | 5aff5c7647e5cceceddf7b22c991777fc3792400 | [
"Apache-2.0"
] | 100 | 2020-06-08T00:39:28.000Z | 2021-08-04T11:22:02.000Z | kospeech/models/transformer/model.py | daiyaanarfeen/kospeech | 5aff5c7647e5cceceddf7b22c991777fc3792400 | [
"Apache-2.0"
] | 96 | 2020-06-10T06:12:52.000Z | 2021-08-09T14:40:01.000Z | # Copyright (c) 2020, Soohwan Kim. 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... | 43.978417 | 119 | 0.653852 |
1a2410005f2532d1763ca1c5df397a343ce96ef8 | 2,545 | py | Python | fish_contents.py | v1ztep/fish_sale_TG_bot | adfb5fbcbea29a5e60f64940ec082ba733196189 | [
"MIT"
] | null | null | null | fish_contents.py | v1ztep/fish_sale_TG_bot | adfb5fbcbea29a5e60f64940ec082ba733196189 | [
"MIT"
] | null | null | null | fish_contents.py | v1ztep/fish_sale_TG_bot | adfb5fbcbea29a5e60f64940ec082ba733196189 | [
"MIT"
] | null | null | null | import textwrap
from telegram import InlineKeyboardButton
from telegram import InlineKeyboardMarkup
from moltin import get_all_products
def get_menu_keyboard(context):
all_products = get_all_products(context.bot_data['moltin_token'])
keyboard = []
for product in all_products['data']:
keyboard.ap... | 36.357143 | 86 | 0.628684 |
8a0956ecf8e08abcbfa8099cfdbe674f32a29ceb | 3,403 | py | Python | airflow/providers/amazon/aws/sensors/sagemaker_base.py | ChaseKnowlden/airflow | 6b71eac1997a7c0db3b8e3aed6b4e65d01871440 | [
"Apache-2.0"
] | 15,947 | 2019-01-05T13:51:02.000Z | 2022-03-31T23:33:16.000Z | airflow/providers/amazon/aws/sensors/sagemaker_base.py | ChaseKnowlden/airflow | 6b71eac1997a7c0db3b8e3aed6b4e65d01871440 | [
"Apache-2.0"
] | 14,603 | 2019-01-05T09:43:19.000Z | 2022-03-31T23:11:59.000Z | airflow/providers/amazon/aws/sensors/sagemaker_base.py | ChaseKnowlden/airflow | 6b71eac1997a7c0db3b8e3aed6b4e65d01871440 | [
"Apache-2.0"
] | 8,429 | 2019-01-05T19:45:47.000Z | 2022-03-31T22:13:01.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... | 39.569767 | 101 | 0.714076 |
56d8a0b2eb3ffcb2edd9f3465e463b18202aae96 | 41 | py | Python | tests/__init__.py | bendhouseart/codecounter | e73c2043d33133ab330eb067c348198afda6ce88 | [
"MIT"
] | null | null | null | tests/__init__.py | bendhouseart/codecounter | e73c2043d33133ab330eb067c348198afda6ce88 | [
"MIT"
] | null | null | null | tests/__init__.py | bendhouseart/codecounter | e73c2043d33133ab330eb067c348198afda6ce88 | [
"MIT"
] | null | null | null | """Unit test package for codecounter."""
| 20.5 | 40 | 0.707317 |
ab6a6140d2c356e59a03ce0d29766ad3285de944 | 4,499 | py | Python | leather/scales/base.py | nickromano/django-daily-digest | 8f9a289d772cfd6b6c72536dd40c2012516b9d28 | [
"MIT"
] | 6 | 2019-03-02T09:16:12.000Z | 2021-08-17T13:54:49.000Z | leather/scales/base.py | nickromano/django-daily-digest | 8f9a289d772cfd6b6c72536dd40c2012516b9d28 | [
"MIT"
] | 66 | 2018-01-04T07:25:13.000Z | 2022-03-29T09:19:09.000Z | leather/scales/base.py | nickromano/django-daily-digest | 8f9a289d772cfd6b6c72536dd40c2012516b9d28 | [
"MIT"
] | 2 | 2019-09-03T09:35:44.000Z | 2021-12-28T15:29:13.000Z | #!/usr/bin/env python
from datetime import date, datetime
import six
from leather.data_types import Date, DateTime, Number, Text
from leather.shapes import Bars, Columns
class Scale(object):
"""
Base class for various kinds of scale objects.
"""
@classmethod
def infer(cls, layers, dimension, d... | 31.683099 | 84 | 0.555012 |
9f1d9dc058546b8e18a3574c91fb8b66c19d5c97 | 19,020 | py | Python | TM1py/Objects/Process.py | beckyconning/tm1py | 1ed0be35c5d6e946ae2f9c110359facfd8c0f269 | [
"MIT"
] | null | null | null | TM1py/Objects/Process.py | beckyconning/tm1py | 1ed0be35c5d6e946ae2f9c110359facfd8c0f269 | [
"MIT"
] | null | null | null | TM1py/Objects/Process.py | beckyconning/tm1py | 1ed0be35c5d6e946ae2f9c110359facfd8c0f269 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import json
import re
from typing import Optional, Iterable, Dict, List, Union
from TM1py.Objects.TM1Object import TM1Object
class Process(TM1Object):
""" Abstraction of a TM1 Process.
IMPORTANT. doesn't work with Processes that were generated through the Wizard
"""
"""... | 41.528384 | 122 | 0.660673 |
31bb9d4d2dc19de248be9f248d996c214009c0a1 | 2,228 | py | Python | cloudly/cache.py | ooda/cloudly | 42f28ebe1ec732ddd801f204cb33201a8ce192e9 | [
"MIT"
] | null | null | null | cloudly/cache.py | ooda/cloudly | 42f28ebe1ec732ddd801f204cb33201a8ce192e9 | [
"MIT"
] | null | null | null | cloudly/cache.py | ooda/cloudly | 42f28ebe1ec732ddd801f204cb33201a8ce192e9 | [
"MIT"
] | null | null | null | """This module provide access to redis and memcache servers with some sugar
coating.
"""
import os
import json
import memcache
import redis
from cloudly.aws import ec2
from cloudly.decorators import Memoized
import cloudly.logger as logger
log = logger.init(__name__)
@Memoized
def get_redis_connection(hostname=No... | 27.85 | 75 | 0.647666 |
ffcce65f2e710b49bafff39157801551b410f55b | 2,671 | py | Python | basics of python/loops.py | devnetlearning/python | 6f03027bb8e4eb1003ac766a72922f29ed03fec4 | [
"MIT"
] | null | null | null | basics of python/loops.py | devnetlearning/python | 6f03027bb8e4eb1003ac766a72922f29ed03fec4 | [
"MIT"
] | null | null | null | basics of python/loops.py | devnetlearning/python | 6f03027bb8e4eb1003ac766a72922f29ed03fec4 | [
"MIT"
] | null | null | null | """
for - loop that is making specific action for certain number of times.
range - set specific number of times. Allows to choose at which number starts
and how long do the loop
"""
#for example1 - print every number in range of 200 which could be devided
#by 5 but not by 7 without the remainder
for i in range(200):
... | 20.867188 | 92 | 0.610258 |
79740ed0c103e841b6e280af920f8be65e3d1d0d | 9,893 | py | Python | charmhelpers/contrib/openstack/audits/openstack_security_guide.py | AurelienLourot/charm-helpers | b5725ac546372e7d4004d15095f79cdd5e7da687 | [
"Apache-2.0"
] | 19 | 2016-04-17T04:00:53.000Z | 2020-05-06T14:18:16.000Z | charmhelpers/contrib/openstack/audits/openstack_security_guide.py | AurelienLourot/charm-helpers | b5725ac546372e7d4004d15095f79cdd5e7da687 | [
"Apache-2.0"
] | 313 | 2017-09-15T13:22:58.000Z | 2022-02-25T17:55:01.000Z | charmhelpers/contrib/openstack/audits/openstack_security_guide.py | AurelienLourot/charm-helpers | b5725ac546372e7d4004d15095f79cdd5e7da687 | [
"Apache-2.0"
] | 136 | 2017-09-19T13:37:33.000Z | 2022-03-29T11:08:00.000Z | # Copyright 2019 Canonical Limited.
#
# 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 writi... | 36.505535 | 96 | 0.625998 |
1f7b4d18a8a4632a54cb377bdeaa0a6ad36a7ad6 | 2,251 | py | Python | jogo_da_forca.py | gialencar/jogo-da-forca | 0e6d9f4298b069ed59c2070ed499c6275e04267f | [
"MIT"
] | null | null | null | jogo_da_forca.py | gialencar/jogo-da-forca | 0e6d9f4298b069ed59c2070ed499c6275e04267f | [
"MIT"
] | null | null | null | jogo_da_forca.py | gialencar/jogo-da-forca | 0e6d9f4298b069ed59c2070ed499c6275e04267f | [
"MIT"
] | null | null | null | from random import randint
from unicodedata import normalize
def remover_acentos(string):
"""Recebe uma string e retorna a versão dela sem acentos ortográficos e em lowercase."""
normalizado = normalize('NFD', string)
return normalizado.encode('ascii', 'ignore').decode('utf8').lower()
def validar_entrad... | 35.730159 | 116 | 0.620613 |
75aa73384faa9a15573f12b1b56df11c73f8ba49 | 1,778 | py | Python | ament_copyright/setup.py | emersonknapp/ament_lint | 92badcaa44aa0a67a55bbf32dba9ae6adab62597 | [
"Apache-2.0"
] | null | null | null | ament_copyright/setup.py | emersonknapp/ament_lint | 92badcaa44aa0a67a55bbf32dba9ae6adab62597 | [
"Apache-2.0"
] | null | null | null | ament_copyright/setup.py | emersonknapp/ament_lint | 92badcaa44aa0a67a55bbf32dba9ae6adab62597 | [
"Apache-2.0"
] | null | null | null | from setuptools import find_packages
from setuptools import setup
package_name = 'ament_copyright'
setup(
name=package_name,
version='0.7.4',
packages=find_packages(exclude=['test']),
data_files=[
('share/' + package_name, ['package.xml']),
],
install_requires=['setuptools'],
packa... | 32.327273 | 76 | 0.626547 |
07074b8d72e617e7f5eebc1f905a5756f4d7ccab | 3,161 | py | Python | FindMyNews/settings.py | StarkDevHouse/FindMyNews | 896e3fe19720252b224574dccf12a7ded9ef0ef0 | [
"MIT"
] | null | null | null | FindMyNews/settings.py | StarkDevHouse/FindMyNews | 896e3fe19720252b224574dccf12a7ded9ef0ef0 | [
"MIT"
] | null | null | null | FindMyNews/settings.py | StarkDevHouse/FindMyNews | 896e3fe19720252b224574dccf12a7ded9ef0ef0 | [
"MIT"
] | null | null | null | """
Django settings for FindMyNews project.
Generated by 'django-admin startproject' using Django 1.10.4.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
import... | 26.123967 | 91 | 0.698829 |
78b547a7d1aee3a6fee9f6d83049364269911468 | 10,990 | py | Python | tests/scripts/thread-cert/Cert_9_2_03_ActiveDatasetGet.py | paragdixit-g/openthread | a41a1f3fcae3351c9216e4ba02e44c8f9d3ea0d3 | [
"BSD-3-Clause"
] | null | null | null | tests/scripts/thread-cert/Cert_9_2_03_ActiveDatasetGet.py | paragdixit-g/openthread | a41a1f3fcae3351c9216e4ba02e44c8f9d3ea0d3 | [
"BSD-3-Clause"
] | null | null | null | tests/scripts/thread-cert/Cert_9_2_03_ActiveDatasetGet.py | paragdixit-g/openthread | a41a1f3fcae3351c9216e4ba02e44c8f9d3ea0d3 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright (c) 2020, The OpenThread Authors.
# 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
# ... | 40.855019 | 445 | 0.582348 |
cab1abd1382b47693300375333fe7426f0112266 | 1,468 | py | Python | qa/rpc-tests/dao/given/iHaveAnAcceptedProposal.py | garretlaxton/navcoin-core | 7a2919b5ac14ba3b8a1dbf5aad08524db8d5ce08 | [
"MIT"
] | 1 | 2020-08-28T02:32:47.000Z | 2020-08-28T02:32:47.000Z | qa/rpc-tests/dao/given/iHaveAnAcceptedProposal.py | garretlaxton/navcoin-core | 7a2919b5ac14ba3b8a1dbf5aad08524db8d5ce08 | [
"MIT"
] | null | null | null | qa/rpc-tests/dao/given/iHaveAnAcceptedProposal.py | garretlaxton/navcoin-core | 7a2919b5ac14ba3b8a1dbf5aad08524db8d5ce08 | [
"MIT"
] | 1 | 2020-08-26T22:35:06.000Z | 2020-08-26T22:35:06.000Z | #!/usr/bin/env python3
# Copyright (c) 2019 The NavCoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Expanded helper routines for regression testing of the NAV Coin community fund
#
import sys, os #include ... | 27.185185 | 84 | 0.76703 |
2896382dc93d57a8c3caab3f6cd689f5dd043b05 | 1,515 | py | Python | pythonlearn/travelList.py | kuljotbiring/Python | 743c93b91c5e4a4bf5066cf50e72e5a51d98d1ad | [
"MIT"
] | null | null | null | pythonlearn/travelList.py | kuljotbiring/Python | 743c93b91c5e4a4bf5066cf50e72e5a51d98d1ad | [
"MIT"
] | null | null | null | pythonlearn/travelList.py | kuljotbiring/Python | 743c93b91c5e4a4bf5066cf50e72e5a51d98d1ad | [
"MIT"
] | null | null | null | # Think of at least five places in the world you’d like to
# visit.
# • Store the locations in a list. Make sure the list is not in alphabetical order.
travel_list = ['italy', 'greece', 'switzerland', 'japan', 'thailand', 'new zealand', 'brazil', 'peru', 'hong kong']
# • Print your list in its original order. Don’t w... | 33.666667 | 115 | 0.744554 |
a1044e7a33bd8d90b881d3c3fcc88b0f177c63db | 4,383 | py | Python | sdks/python/apache_beam/runners/direct/consumer_tracking_pipeline_visitor_test.py | rodrigob/beam | e2ce4037f85619f946b3d6a3a90955cdf1c19b4a | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2018-07-13T02:57:48.000Z | 2018-07-13T02:57:48.000Z | sdks/python/apache_beam/runners/direct/consumer_tracking_pipeline_visitor_test.py | rodrigob/beam | e2ce4037f85619f946b3d6a3a90955cdf1c19b4a | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | sdks/python/apache_beam/runners/direct/consumer_tracking_pipeline_visitor_test.py | rodrigob/beam | e2ce4037f85619f946b3d6a3a90955cdf1c19b4a | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2019-09-23T08:45:00.000Z | 2019-09-23T08:45:00.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 us... | 33.976744 | 105 | 0.722336 |
7abce4f0e182cacef57e4d8921d6c65fb9d21b16 | 8,003 | py | Python | distances/q_image.py | npielawski/py_alpha_amd_release | 6fb5b3cdef65ba8902daea050785dd73970002c2 | [
"MIT"
] | 14 | 2019-02-12T20:30:23.000Z | 2021-11-04T01:10:34.000Z | distances/q_image.py | npielawski/py_alpha_amd_release | 6fb5b3cdef65ba8902daea050785dd73970002c2 | [
"MIT"
] | null | null | null | distances/q_image.py | npielawski/py_alpha_amd_release | 6fb5b3cdef65ba8902daea050785dd73970002c2 | [
"MIT"
] | 7 | 2019-02-20T12:19:28.000Z | 2021-02-09T10:12:06.000Z |
#
# Py-Alpha-AMD Registration Framework
# Author: Johan Ofverstedt
# Reference: Fast and Robust Symmetric Image Registration Based on Distances Combining Intensity and Spatial Information
#
# Copyright 2019 Johan Ofverstedt
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this softwa... | 35.255507 | 150 | 0.649381 |
a26c35e2837b16fe883d6f59f1b07a63d942add6 | 26,450 | py | Python | model/lib/sklearn/decomposition/online_lda.py | nelango/ViralityAnalysis | 1ddbaccb4ea04fc908a01b4964ab080f1d2b2f60 | [
"MIT"
] | 4 | 2018-01-21T21:18:35.000Z | 2022-03-23T21:57:56.000Z | model/lib/sklearn/decomposition/online_lda.py | nelango/ViralityAnalysis | 1ddbaccb4ea04fc908a01b4964ab080f1d2b2f60 | [
"MIT"
] | null | null | null | model/lib/sklearn/decomposition/online_lda.py | nelango/ViralityAnalysis | 1ddbaccb4ea04fc908a01b4964ab080f1d2b2f60 | [
"MIT"
] | null | null | null | """
=============================================================
Online Latent Dirichlet Allocation with variational inference
=============================================================
This implementation is modified from Matthew D. Hoffman's onlineldavb code
Link: http://www.cs.princeton.edu/~mdhoffma/code/onli... | 37.411598 | 79 | 0.600076 |
8d1f794ad8f00047b23c05e6a1f3e378a06a4f3a | 3,866 | py | Python | commaai_drive.py | alanswx/udacity-hw-cloning | c5b8f888eeea4368d8ced2ce30a1ea860a7ed872 | [
"MIT"
] | null | null | null | commaai_drive.py | alanswx/udacity-hw-cloning | c5b8f888eeea4368d8ced2ce30a1ea860a7ed872 | [
"MIT"
] | null | null | null | commaai_drive.py | alanswx/udacity-hw-cloning | c5b8f888eeea4368d8ced2ce30a1ea860a7ed872 | [
"MIT"
] | null | null | null | import argparse
import base64
import json
import cv2
import numpy as np
import socketio
import eventlet
import eventlet.wsgi
import time
from PIL import Image
from PIL import ImageOps
from flask import Flask, render_template
from io import BytesIO
import scipy.misc
from keras.models import model_from_json
from keras... | 30.203125 | 142 | 0.688826 |
d51345ad361b2eb08899e336f924e6455d290fc3 | 1,141 | py | Python | test/gst-msdk/decode/12bit/vp9.py | Bin-CI/vaapi-fits | 9c43ea65f7fe99f11fa3c49bb14d30f5de09f010 | [
"BSD-3-Clause"
] | 19 | 2019-03-05T01:59:05.000Z | 2022-01-11T15:31:49.000Z | test/gst-msdk/decode/12bit/vp9.py | Bin-CI/vaapi-fits | 9c43ea65f7fe99f11fa3c49bb14d30f5de09f010 | [
"BSD-3-Clause"
] | 213 | 2019-01-29T18:44:05.000Z | 2022-03-30T05:57:04.000Z | test/gst-msdk/decode/12bit/vp9.py | Bin-CI/vaapi-fits | 9c43ea65f7fe99f11fa3c49bb14d30f5de09f010 | [
"BSD-3-Clause"
] | 26 | 2019-01-29T05:21:22.000Z | 2022-02-09T00:57:35.000Z | ###
### Copyright (C) 2018-2020 Intel Corporation
###
### SPDX-License-Identifier: BSD-3-Clause
###
from .....lib import *
from .....lib.gstreamer.msdk.util import *
from .....lib.gstreamer.msdk.decoder import DecoderTest
spec = load_test_spec("vp9", "decode", "12bit")
@slash.requires(*platform.have_caps("decode", "... | 29.25641 | 86 | 0.618755 |
e05c38a52bb00617c05e399722c2ef1df42a4922 | 4,827 | py | Python | adet/modeling/MEInst/pca/pca_valid.py | maxpark/ABCNet_Chinese | 7c7d2f322411ebf933a91b4e9e476562e5d3a012 | [
"BSD-2-Clause"
] | 27 | 2021-08-05T06:56:17.000Z | 2022-03-20T06:47:34.000Z | adet/modeling/MEInst/pca/pca_valid.py | maxpark/ABCNet_Chinese | 7c7d2f322411ebf933a91b4e9e476562e5d3a012 | [
"BSD-2-Clause"
] | 6 | 2021-08-09T06:50:30.000Z | 2021-11-05T09:09:24.000Z | adet/modeling/MEInst/pca/pca_valid.py | maxpark/ABCNet_Chinese | 7c7d2f322411ebf933a91b4e9e476562e5d3a012 | [
"BSD-2-Clause"
] | 8 | 2021-08-05T14:31:30.000Z | 2022-03-29T07:29:31.000Z | # coding:utf-8
import argparse
import os
import time
import numpy as np
from .pca_labels import parse_json
from .pca_utils import transform, inverse_transform, IOUMetric, direct_sigmoid, inverse_sigmoid
VALUE_MAX = 0.05
VALUE_MIN = 0.01
def pca_valid(masks, components_c,
explained_variance_c, mean_c=... | 43.098214 | 141 | 0.650715 |
9c8abf7ade4a7ae05d9afbc442dcef180f7f01e4 | 1,954 | py | Python | problems/three_qubits_yz/three_q_yz_generators.py | JammyL/BayesianOptimization | e8deec2136379af875692c455321fbf47f20fb7d | [
"MIT"
] | null | null | null | problems/three_qubits_yz/three_q_yz_generators.py | JammyL/BayesianOptimization | e8deec2136379af875692c455321fbf47f20fb7d | [
"MIT"
] | null | null | null | problems/three_qubits_yz/three_q_yz_generators.py | JammyL/BayesianOptimization | e8deec2136379af875692c455321fbf47f20fb7d | [
"MIT"
] | null | null | null | import qutip as qt
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
from qutip.qip.circuit import QubitCircuit, Gate
from qutip.qip.operations import gate_sequence_product
from qutip.tensor import tensor
def calcStateFidelity(finalState, targetState):
finalState = finalState.dag()
return a... | 39.08 | 58 | 0.676049 |
b2b839d4b016dcac14d2ab825d02bd98bab236c1 | 12,280 | py | Python | qiskit/backends/local/qasm_simulator_cpp.py | nonhermitian/arrogant_seahorse | 2be1ff60857c75fcbbb0c23aa594f41e1a33c89c | [
"Apache-2.0"
] | null | null | null | qiskit/backends/local/qasm_simulator_cpp.py | nonhermitian/arrogant_seahorse | 2be1ff60857c75fcbbb0c23aa594f41e1a33c89c | [
"Apache-2.0"
] | 1 | 2018-08-08T17:56:06.000Z | 2018-08-08T17:56:06.000Z | qiskit/backends/local/qasm_simulator_cpp.py | nonhermitian/arrogant_seahorse | 2be1ff60857c75fcbbb0c23aa594f41e1a33c89c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2017 IBM RESEARCH. 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 requ... | 36.656716 | 89 | 0.597883 |
f1b853b4daa6a362a86d83730bfb8ccd32203d31 | 6,668 | py | Python | chemprop/features/features_generators.py | jasperhyp/Chemprop4SE | c02b604b63b6766464db829fea0b306c67302e82 | [
"MIT"
] | 1 | 2021-12-15T05:18:07.000Z | 2021-12-15T05:18:07.000Z | chemprop/features/features_generators.py | jasperhyp/chemprop4SE | c02b604b63b6766464db829fea0b306c67302e82 | [
"MIT"
] | null | null | null | chemprop/features/features_generators.py | jasperhyp/chemprop4SE | c02b604b63b6766464db829fea0b306c67302e82 | [
"MIT"
] | null | null | null | from typing import Callable, List, Union
import pandas as pd
import numpy as np
from rdkit import Chem, DataStructs
from rdkit.Chem import AllChem
Molecule = Union[str, Chem.Mol]
FeaturesGenerator = Callable[[Molecule], np.ndarray]
FEATURES_GENERATOR_REGISTRY = {}
def register_features_generator(features_generat... | 39.928144 | 114 | 0.705609 |
ae402ebeab93bdcf524e1dd06d0e20e09af403c2 | 11,254 | py | Python | classify/train/dataset/download_and_convert_17flowers.py | NobuoTsukamoto/edge_tpu | bfde6ba34b11113eb7db28032be74b1eb491efaa | [
"MIT"
] | 56 | 2019-05-23T05:05:29.000Z | 2021-04-26T05:53:17.000Z | classify/train/dataset/download_and_convert_17flowers.py | PINTO0309/edge_tpu | ee82324f810ce64b6f98f40f5679dfbfbd1a4233 | [
"MIT"
] | 4 | 2020-04-26T15:43:46.000Z | 2021-04-19T12:41:17.000Z | classify/train/dataset/download_and_convert_17flowers.py | PINTO0309/edge_tpu | ee82324f810ce64b6f98f40f5679dfbfbd1a4233 | [
"MIT"
] | 10 | 2020-02-01T18:18:35.000Z | 2021-04-28T17:23:02.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Copyright (c) 2018 Nobuo Tsukamoto
This software is released under the MIT License.
See the LICENSE file in the project root for more information.
Downloads and converts Oxford 17 Category Flower dataset to TF-Example protos.
This modult download... | 36.186495 | 91 | 0.666252 |
41c055cdba3e07431e85d8a26dd36bfac10cf7c2 | 10,416 | py | Python | cumulus/storage.py | wearespindle/django-cumulus | 1c6fc1691ff459b38a3103c020213eb1a6b6f8e5 | [
"BSD-3-Clause"
] | null | null | null | cumulus/storage.py | wearespindle/django-cumulus | 1c6fc1691ff459b38a3103c020213eb1a6b6f8e5 | [
"BSD-3-Clause"
] | null | null | null | cumulus/storage.py | wearespindle/django-cumulus | 1c6fc1691ff459b38a3103c020213eb1a6b6f8e5 | [
"BSD-3-Clause"
] | null | null | null | import mimetypes
import pyrax
import re
import warnings
from gzip import GzipFile
try:
from cStringIO import StringIO
except ImportError:
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
from django.core.files.storage import Storage
from django.core.files.base... | 34.72 | 111 | 0.628168 |
5457a1983edba1eceaeb6934cf39fff9fad03f32 | 2,578 | py | Python | lib/googlecloudsdk/command_lib/compute/http_health_checks/flags.py | bopopescu/Google-Cloud-SDK-1 | c4683bacb2f6192d8a816932e438a0493085469b | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/command_lib/compute/http_health_checks/flags.py | bopopescu/Google-Cloud-SDK-1 | c4683bacb2f6192d8a816932e438a0493085469b | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/command_lib/compute/http_health_checks/flags.py | bopopescu/Google-Cloud-SDK-1 | c4683bacb2f6192d8a816932e438a0493085469b | [
"Apache-2.0"
] | 1 | 2020-07-24T20:13:29.000Z | 2020-07-24T20:13:29.000Z | # Copyright 2016 Google 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.0
#
# Unless required by applicable law or ag... | 37.362319 | 80 | 0.726532 |
f3363c2d8952dca6c59f93b5240d050900b1322a | 989 | py | Python | selfdrive/controls/lib/fingerprints.py | skynetera/openpilot | a7e099c946800c7a8b60c47678801d9a95f95549 | [
"MIT"
] | 4 | 2017-02-17T07:02:37.000Z | 2022-03-17T13:50:00.000Z | selfdrive/controls/lib/fingerprints.py | mjiujiang/openpilot | a7e099c946800c7a8b60c47678801d9a95f95549 | [
"MIT"
] | null | null | null | selfdrive/controls/lib/fingerprints.py | mjiujiang/openpilot | a7e099c946800c7a8b60c47678801d9a95f95549 | [
"MIT"
] | 3 | 2017-10-12T23:31:24.000Z | 2022-01-26T09:59:28.000Z | fingerprints = {
"ACURA ILX 2016 ACURAWATCH PLUS": {
1024L: 5, 513L: 5, 1027L: 5, 1029L: 8, 929L: 4, 1057L: 5, 777L: 8, 1034L: 5, 1036L: 8, 398L: 3, 399L: 7, 145L: 8, 660L: 8, 985L: 3, 923L: 2, 542L: 7, 773L: 7, 800L: 8, 432L: 7, 419L: 8, 420L: 8, 1030L: 5, 422L: 8, 808L: 8, 428L: 8, 304L: 8, 819L: 7, 821L: 5, 57... | 109.888889 | 453 | 0.566229 |
0fa2be26d83071c739a5fbf971bf3b5a373527b5 | 493 | py | Python | flask_app_8_machine_learning_plots_dataframes/forms.py | tagler/Data_Science_Flask_Tutorials_Python_HTML_CSS | 3cc0aae5825048d7b84cfb636add3270f0f410a1 | [
"MIT"
] | null | null | null | flask_app_8_machine_learning_plots_dataframes/forms.py | tagler/Data_Science_Flask_Tutorials_Python_HTML_CSS | 3cc0aae5825048d7b84cfb636add3270f0f410a1 | [
"MIT"
] | null | null | null | flask_app_8_machine_learning_plots_dataframes/forms.py | tagler/Data_Science_Flask_Tutorials_Python_HTML_CSS | 3cc0aae5825048d7b84cfb636add3270f0f410a1 | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from wtforms import StringField, FloatField, SubmitField
from wtforms.validators import DataRequired
class MyForm(FlaskForm):
sepal_length = FloatField('Sepal Length:', validators=[DataRequired()])
sepal_width = FloatField('Sepal Width:', validators=[DataRequired()])
petal_l... | 49.3 | 75 | 0.760649 |
dec1d25dd0aa7b1bf32300c92a8600b0fb7be6ec | 6,893 | py | Python | tests/migrations/test_multidb.py | spapas/django | d6ecce683682eb67ebd7f2c6766195131ea30158 | [
"BSD-3-Clause"
] | null | null | null | tests/migrations/test_multidb.py | spapas/django | d6ecce683682eb67ebd7f2c6766195131ea30158 | [
"BSD-3-Clause"
] | null | null | null | tests/migrations/test_multidb.py | spapas/django | d6ecce683682eb67ebd7f2c6766195131ea30158 | [
"BSD-3-Clause"
] | 1 | 2020-05-25T08:55:19.000Z | 2020-05-25T08:55:19.000Z | import unittest
try:
import sqlparse
except ImportError:
sqlparse = None
from django.db import migrations, models, connection
from django.db.migrations.state import ProjectState
from django.test import override_settings
from .test_operations import OperationTestBase
class AgnosticRouter(object):
"""
... | 39.388571 | 114 | 0.685623 |
8dc94c07aabb8be5e6887621fb9bb027204f8bca | 3,950 | py | Python | test/functional/feature_minchainwork.py | Cobra-Technologies-GmbH/PIVX | 9c45238847a9afe4d6bb3fca4af5a876ed52b72f | [
"MIT"
] | null | null | null | test/functional/feature_minchainwork.py | Cobra-Technologies-GmbH/PIVX | 9c45238847a9afe4d6bb3fca4af5a876ed52b72f | [
"MIT"
] | null | null | null | test/functional/feature_minchainwork.py | Cobra-Technologies-GmbH/PIVX | 9c45238847a9afe4d6bb3fca4af5a876ed52b72f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test logic for setting nMinimumChainWork on command line.
Nodes don't consider themselves out of "initial b... | 43.888889 | 108 | 0.702278 |
ba7c08914b15e1050e4ab7d6e3c20aea0b22fbec | 306 | py | Python | handlers/users/help.py | YoshlikMedia/Dssinnercircle | 3811ebccedea8e47091d05509ce2867a57675285 | [
"MIT"
] | null | null | null | handlers/users/help.py | YoshlikMedia/Dssinnercircle | 3811ebccedea8e47091d05509ce2867a57675285 | [
"MIT"
] | null | null | null | handlers/users/help.py | YoshlikMedia/Dssinnercircle | 3811ebccedea8e47091d05509ce2867a57675285 | [
"MIT"
] | null | null | null | from aiogram import types
from aiogram.dispatcher.filters.builtin import CommandHelp
from data.text import text
from filters import IsPrivate
from loader import dp
@dp.message_handler(IsPrivate(), CommandHelp())
async def bot_help(message: types.Message):
await message.answer(text['help_button'])
| 23.538462 | 58 | 0.800654 |
9aa315921fac95865e5446d962323cfd750ca2bd | 2,298 | py | Python | sirepo/pkcli/elegant.py | njsmith/sirepo | 82bdc848899a8d7bcd5e1ae73f91ca37d88f647c | [
"Apache-2.0"
] | 1 | 2019-06-06T08:08:11.000Z | 2019-06-06T08:08:11.000Z | sirepo/pkcli/elegant.py | yeeon/sirepo | 081595df256d40fbc7959614689d64ad2bc745d4 | [
"Apache-2.0"
] | null | null | null | sirepo/pkcli/elegant.py | yeeon/sirepo | 081595df256d40fbc7959614689d64ad2bc745d4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Wrapper to run elegant from the command line.
:copyright: Copyright (c) 2015 RadiaSoft LLC. All Rights Reserved.
:license: http://www.apache.org/licenses/LICENSE-2.0.html
"""
from __future__ import absolute_import, division, print_function
from pykern import pkio
from pykern import pksubpro... | 33.304348 | 106 | 0.678416 |
bf01b909dc94bfe1569e71c6e30585f70c50a1be | 229 | py | Python | examples/pup/hub_technichub/system_shutdown.py | TheVinhLuong102/pybricks-api | 1259d5d33acb41b383445a4b1776b38084efb481 | [
"MIT"
] | 51 | 2020-04-02T10:03:45.000Z | 2022-03-27T23:49:39.000Z | examples/pup/hub_technichub/system_shutdown.py | LEGO-Robotics/Pybricks-API | 1259d5d33acb41b383445a4b1776b38084efb481 | [
"MIT"
] | 77 | 2020-03-22T17:32:14.000Z | 2022-03-28T18:02:43.000Z | examples/pup/hub_technichub/system_shutdown.py | LEGO-Robotics/Pybricks-API | 1259d5d33acb41b383445a4b1776b38084efb481 | [
"MIT"
] | 25 | 2020-03-18T23:35:17.000Z | 2022-01-01T12:52:01.000Z | from pybricks.hubs import TechnicHub
from pybricks.tools import wait
# Initialize the hub.
hub = TechnicHub()
# Say goodbye and give some time to send it.
print("Goodbye!")
wait(100)
# Shut the hub down.
hub.system.shutdown()
| 17.615385 | 44 | 0.746725 |
62387c6d699147752416f40b344c61ef00f39e46 | 6,992 | py | Python | dohq_teamcity/models/investigation.py | DenKoren/teamcity | 69acb4d1402c316129b4602882a9cce2d55cf926 | [
"MIT"
] | 23 | 2018-10-19T07:28:45.000Z | 2021-11-12T12:46:09.000Z | dohq_teamcity/models/investigation.py | DenKoren/teamcity | 69acb4d1402c316129b4602882a9cce2d55cf926 | [
"MIT"
] | 31 | 2018-10-16T05:53:11.000Z | 2021-09-09T14:44:14.000Z | dohq_teamcity/models/investigation.py | DenKoren/teamcity | 69acb4d1402c316129b4602882a9cce2d55cf926 | [
"MIT"
] | 12 | 2018-10-28T23:00:17.000Z | 2021-09-07T12:07:13.000Z | # coding: utf-8
from dohq_teamcity.custom.base_model import TeamCityObject
# from dohq_teamcity.models.comment import Comment # noqa: F401,E501
# from dohq_teamcity.models.problem_scope import ProblemScope # noqa: F401,E501
# from dohq_teamcity.models.problem_target import ProblemTarget # noqa: F401,E501
# from d... | 25.705882 | 176 | 0.586241 |
a139ae98e8a97536dd827986a1f05ca730dc5251 | 963 | py | Python | knownly/console/migrations/0007_auto_20150713_1558.py | dwightgunning/knownly | 55a3f82887dca1ff94723e3272ef79ed5f2d0eb2 | [
"MIT"
] | 2 | 2017-11-21T20:24:01.000Z | 2018-12-24T04:32:31.000Z | knownly/console/migrations/0007_auto_20150713_1558.py | dwightgunning/knownly | 55a3f82887dca1ff94723e3272ef79ed5f2d0eb2 | [
"MIT"
] | 2 | 2020-06-05T18:05:19.000Z | 2021-06-10T20:04:02.000Z | knownly/console/migrations/0007_auto_20150713_1558.py | dwightgunning/knownly | 55a3f82887dca1ff94723e3272ef79ed5f2d0eb2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('console', '0006_auto_20150713_1343'),
]
operations = [
migrations.AddField(
model_name='archiveddropboxsite',
... | 27.514286 | 62 | 0.588785 |
fedd7825f644bda85bb32e6222ea8a436928d3de | 949 | py | Python | photo_booth.py | nasreddino/faceAttendance | baecad8bc7e6ae98003552aea02fd05fa21017f3 | [
"MIT"
] | null | null | null | photo_booth.py | nasreddino/faceAttendance | baecad8bc7e6ae98003552aea02fd05fa21017f3 | [
"MIT"
] | null | null | null | photo_booth.py | nasreddino/faceAttendance | baecad8bc7e6ae98003552aea02fd05fa21017f3 | [
"MIT"
] | null | null | null | # USAGE
# python photo_booth.py --output output
# import the necessary packages
from __future__ import print_function
from pyimagesearch.photoboothapp import PhotoBoothApp
from imutils.video import VideoStream
import argparse
import time
# construct the argument parse and parse the arguments
ap = argparse.ArgumentPar... | 29.65625 | 67 | 0.748156 |
3340d8324072f679b4ac570eb34ade269e661621 | 414 | py | Python | saas/system/api/resource/backend-framework/webpy/tesla-faas/examples/hello/handlers/base_test_handler.py | harry-xiaomi/SREWorks | e85c723ff15d2c9739d4d240be449b00b6db096d | [
"Apache-2.0"
] | 1 | 2022-03-22T01:09:10.000Z | 2022-03-22T01:09:10.000Z | saas/system/api/resource/backend-framework/webpy/tesla-faas/examples/hello/handlers/base_test_handler.py | Kwafoor/SREWorks | 37a64a0a84b29c65cf6b77424bd2acd0c7b42e2b | [
"Apache-2.0"
] | null | null | null | saas/system/api/resource/backend-framework/webpy/tesla-faas/examples/hello/handlers/base_test_handler.py | Kwafoor/SREWorks | 37a64a0a84b29c65cf6b77424bd2acd0c7b42e2b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
""" """
from container.webpy.common import BaseHandler
__author__ = 'adonis'
class TestBaseHandler(BaseHandler):
def test(self, params):
return params
def echo(self, params):
return {
'params': params,
'body': self.body,
... | 17.25 | 46 | 0.57971 |
41b6c2de179a1e9dd433f3c4ebf238032e4ec929 | 20,105 | py | Python | niteshade/attack.py | oskarfernlund/data-poisoning-attacks | f45a90fe6057e1cf158ce85a824626acd5f34b64 | [
"MIT"
] | null | null | null | niteshade/attack.py | oskarfernlund/data-poisoning-attacks | f45a90fe6057e1cf158ce85a824626acd5f34b64 | [
"MIT"
] | null | null | null | niteshade/attack.py | oskarfernlund/data-poisoning-attacks | f45a90fe6057e1cf158ce85a824626acd5f34b64 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Data poisoning attack strategy classes following a logical hierarchy.
"""
# =============================================================================
# IMPORTS AND DEPENDENCIES
# =============================================================================
imp... | 35.584071 | 93 | 0.566178 |
3a55c7e2a76cf29d964e39b9d75f450e0b7a62e1 | 1,272 | py | Python | setup.py | campenr/FileExplorer | 49b268c0996de287319f5fbe9ac8ce2ef31b0ed5 | [
"BSD-3-Clause"
] | 1 | 2015-07-06T17:37:59.000Z | 2015-07-06T17:37:59.000Z | setup.py | campenr/dirbrowser | 49b268c0996de287319f5fbe9ac8ce2ef31b0ed5 | [
"BSD-3-Clause"
] | null | null | null | setup.py | campenr/dirbrowser | 49b268c0996de287319f5fbe9ac8ce2ef31b0ed5 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
"""Setup.py for dirbrowser."""
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the relevant file
with open(path.join(here, 'README.md'), encoding... | 27.06383 | 63 | 0.664308 |
eeadd8debf7b07deb2c6ccbcdc03e70311764ec8 | 4,688 | py | Python | genomic_data_service/rnaseq/tests/test_rnaseq_gene.py | ENCODE-DCC/genomic-data-service | 954017a5bcc5f448fbe2867768186df5e066c67c | [
"MIT"
] | 3 | 2020-10-26T02:15:55.000Z | 2022-01-26T18:39:09.000Z | genomic_data_service/rnaseq/tests/test_rnaseq_gene.py | ENCODE-DCC/genomic-data-service | 954017a5bcc5f448fbe2867768186df5e066c67c | [
"MIT"
] | 3 | 2021-08-17T02:01:54.000Z | 2022-03-30T17:14:02.000Z | genomic_data_service/rnaseq/tests/test_rnaseq_gene.py | ENCODE-DCC/genomic-data-service | 954017a5bcc5f448fbe2867768186df5e066c67c | [
"MIT"
] | 1 | 2022-03-24T21:15:34.000Z | 2022-03-24T21:15:34.000Z | import pytest
def test_rnaseq_gene_init():
from genomic_data_service.rnaseq.domain.gene import Gene
gene = Gene({})
assert gene.props == {}
assert isinstance(gene, Gene)
def test_rnaseq_gene_extract_ensembl_ids(raw_human_genes):
from genomic_data_service.rnaseq.domain.gene import Gene
gene =... | 34.470588 | 88 | 0.556527 |
1b37d6b65c0bb339a666fdcfec4bce78a5a6d9ea | 9,243 | py | Python | utils/utils_activation_maps.py | GlowingHorse/Class-Discriminative-Vis | c4dec263f13225eed8598544b46c984784953c50 | [
"MIT"
] | 2 | 2020-06-25T15:35:19.000Z | 2020-07-08T11:14:46.000Z | utils/utils_activation_maps.py | GlowingHorse/class-discriminative-vis | c4dec263f13225eed8598544b46c984784953c50 | [
"MIT"
] | 1 | 2020-06-25T15:59:54.000Z | 2020-10-23T06:09:39.000Z | utils/utils_activation_maps.py | GlowingHorse/Class-Discriminative-Vis | c4dec263f13225eed8598544b46c984784953c50 | [
"MIT"
] | null | null | null | """
The utils_activation_maps.py
provides all tools for handling the activation maps and
attributions for proper size or format before visualizing
"""
import numpy as np
from skimage.transform import resize
import os
from utils.utils import save_imgs, plot, resize_show, \
MatrixDecomposer, SklearnCluster
from operato... | 38.836134 | 106 | 0.730066 |
b86e8d4480f28723e2ffd0c4669fc88f5914ab7e | 11,788 | py | Python | gooddata-metadata-client/gooddata_metadata_client/model/declarative_users.py | hkad98/gooddata-python-sdk | 64942080ecb44c2d8e914e57f7a591daa6cca205 | [
"MIT"
] | null | null | null | gooddata-metadata-client/gooddata_metadata_client/model/declarative_users.py | hkad98/gooddata-python-sdk | 64942080ecb44c2d8e914e57f7a591daa6cca205 | [
"MIT"
] | null | null | null | gooddata-metadata-client/gooddata_metadata_client/model/declarative_users.py | hkad98/gooddata-python-sdk | 64942080ecb44c2d8e914e57f7a591daa6cca205 | [
"MIT"
] | null | null | null | """
OpenAPI definition
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v0
Contact: support@gooddata.com
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sy... | 42.555957 | 124 | 0.563454 |
f237d654ebdecd8bddd9870468a65394c8886d87 | 1,570 | py | Python | Python/bfs.py | radome/algorithms-and-data-structures | 06b7dab6e5865e199a682cb52d1ed70aeb6dfcab | [
"Apache-2.0"
] | 1 | 2018-02-15T16:59:55.000Z | 2018-02-15T16:59:55.000Z | Python/bfs.py | radome/algorithms_and_data_structures | 06b7dab6e5865e199a682cb52d1ed70aeb6dfcab | [
"Apache-2.0"
] | null | null | null | Python/bfs.py | radome/algorithms_and_data_structures | 06b7dab6e5865e199a682cb52d1ed70aeb6dfcab | [
"Apache-2.0"
] | null | null | null | """Breadth First Search on a graph"""
from sets import Set
from linked_list import Node
class lightQueue(object):
"""Simple queue"""
def __init__(self):
self.head = None
self.tail = None
def enqueue(self, lst):
"""Enqueue a list of nodes"""
for obj in lst:
if ... | 26.166667 | 69 | 0.555414 |
cf23f2575939dff2b1aed4a18eb0fbd3cc17bd0e | 46,448 | py | Python | visualizer.py | call518/virtual-network-visualizer | dfa10c249768a82125e901f2c3357e0278b8b4ea | [
"Apache-2.0"
] | 3 | 2019-04-02T14:22:26.000Z | 2021-03-16T06:52:54.000Z | visualizer.py | call518/OpenStack-Network-Visualizer | dfa10c249768a82125e901f2c3357e0278b8b4ea | [
"Apache-2.0"
] | null | null | null | visualizer.py | call518/OpenStack-Network-Visualizer | dfa10c249768a82125e901f2c3357e0278b8b4ea | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- mode:python; coding:utf-8 -*-
### Whole Topology
## ex) python visualizer.py
### Local-VM to Local-VM
## ex) python visualizer.py --src "T:tap94d54818-a5" --dst "T:tapeee4966d-68" [--onlypath]
### Local-VM to Remote-VM
## ex) python visualizer.py --src "T:tap94d54818-a5" --dst "T:tap708a8... | 42.187103 | 953 | 0.703561 |
7bcb7f613021b08a4b51ba9ae69a1765bb8a14ea | 2,062 | py | Python | orco/internals/browser.py | spirali/orco | 32c839b4d691a3eb83cfa379a1ec429adcf7f1b0 | [
"MIT"
] | 3 | 2019-08-15T08:06:59.000Z | 2020-06-14T13:13:09.000Z | orco/internals/browser.py | spirali/orco | 32c839b4d691a3eb83cfa379a1ec429adcf7f1b0 | [
"MIT"
] | 8 | 2019-08-06T11:38:08.000Z | 2020-03-01T21:44:12.000Z | orco/internals/browser.py | spirali/xstore | 32c839b4d691a3eb83cfa379a1ec429adcf7f1b0 | [
"MIT"
] | 2 | 2019-07-29T18:33:13.000Z | 2019-08-30T07:54:43.000Z | import os
import threading
from flask import Flask, Response
from flask_cors import CORS
from flask_restful import Resource, Api
from .database import Database
STATIC_ROOT = os.path.join(
os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "static"
)
app = Flask(__name__, static_url_path=STATIC_ROOT)
co... | 22.172043 | 73 | 0.695926 |
8c4aa16812c5ebf7093247baffbd6df2c18f808b | 102 | py | Python | lang/Python/loops-continue.py | ethansaxenian/RosettaDecode | 8ea1a42a5f792280b50193ad47545d14ee371fb7 | [
"MIT"
] | null | null | null | lang/Python/loops-continue.py | ethansaxenian/RosettaDecode | 8ea1a42a5f792280b50193ad47545d14ee371fb7 | [
"MIT"
] | null | null | null | lang/Python/loops-continue.py | ethansaxenian/RosettaDecode | 8ea1a42a5f792280b50193ad47545d14ee371fb7 | [
"MIT"
] | null | null | null | for i in range(1,11):
if i % 5 == 0:
print(i)
continue
print(i, ",", end=' ')
| 17 | 26 | 0.411765 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.