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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
75c116e836176120a22f793aeda4f075ef0d22bf | 43,864 | py | Python | neurokit2/ecg/ecg_delineate.py | danibene/NeuroKit | df0ab6696e7418cf8b8dcd3ed82dbf879fa61b3a | [
"MIT"
] | null | null | null | neurokit2/ecg/ecg_delineate.py | danibene/NeuroKit | df0ab6696e7418cf8b8dcd3ed82dbf879fa61b3a | [
"MIT"
] | null | null | null | neurokit2/ecg/ecg_delineate.py | danibene/NeuroKit | df0ab6696e7418cf8b8dcd3ed82dbf879fa61b3a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import scipy.signal
from ..epochs import epochs_create, epochs_to_df
from ..signal import (
signal_findpeaks,
signal_formatpeaks,
signal_rate,
signal_resample,
signal_smooth,
signal_zerocrossings,
)
f... | 37.047297 | 127 | 0.615015 |
57afec5a2ca0f6a3fd2296dd9a6613eaf2fcf179 | 1,086 | py | Python | tests/sitemaps_tests/base.py | Yoann-Vie/esgi-hearthstone | 115d03426c7e8e80d89883b78ac72114c29bed12 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | tests/sitemaps_tests/base.py | Yoann-Vie/esgi-hearthstone | 115d03426c7e8e80d89883b78ac72114c29bed12 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | tests/sitemaps_tests/base.py | Yoann-Vie/esgi-hearthstone | 115d03426c7e8e80d89883b78ac72114c29bed12 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | from django.apps import apps
from django.contrib.sites.models import Site
from django.core.cache import cache
from django.test import TestCase, modify_settings, override_settings
from .models import I18nTestModel, TestModel
@modify_settings(INSTALLED_APPS={'append': 'django.contrib.sitemaps'})
@override_set... | 37.448276 | 75 | 0.702578 |
608881435dcfecb30f7f23577553124657186b01 | 9,865 | py | Python | homeassistant/components/lcn/cover.py | dummys/home-assistant | dd908caebade15adf061fade686355b94ed2f43a | [
"Apache-2.0"
] | 11 | 2018-02-16T15:35:47.000Z | 2020-01-14T15:20:00.000Z | homeassistant/components/lcn/cover.py | dummys/home-assistant | dd908caebade15adf061fade686355b94ed2f43a | [
"Apache-2.0"
] | 64 | 2020-10-01T06:39:48.000Z | 2022-03-31T06:02:17.000Z | homeassistant/components/lcn/cover.py | dummys/home-assistant | dd908caebade15adf061fade686355b94ed2f43a | [
"Apache-2.0"
] | 6 | 2018-02-04T03:48:55.000Z | 2022-01-24T20:37:04.000Z | """Support for LCN covers."""
from __future__ import annotations
from typing import Any
import pypck
from homeassistant.components.cover import DOMAIN as DOMAIN_COVER, CoverEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_ADDRESS, CONF_DOMAIN, CONF_ENTITIES
from homeas... | 36.809701 | 88 | 0.660213 |
e236d06c1d605ff14b8f4c75c9870ba9b47b9420 | 3,454 | py | Python | linetools/guis/tests/test_guis.py | marijana777/linetools | 73720a2f6df42b7dde1f35055cd40ad970200f7f | [
"BSD-3-Clause"
] | null | null | null | linetools/guis/tests/test_guis.py | marijana777/linetools | 73720a2f6df42b7dde1f35055cd40ad970200f7f | [
"BSD-3-Clause"
] | null | null | null | linetools/guis/tests/test_guis.py | marijana777/linetools | 73720a2f6df42b7dde1f35055cd40ad970200f7f | [
"BSD-3-Clause"
] | null | null | null | # Module to run tests on Generating a LineList
# Also tests some simple functionality
from __future__ import print_function, absolute_import, division, unicode_literals
# TEST_UNICODE_LITERALS
import os, sys
import pytest
import numpy as np
from astropy import units as u
from PyQt5.QtWidgets import QApplication
... | 30.034783 | 88 | 0.6326 |
49727ba3b6afca6214f11daeb1e41fc3ca15fe3b | 55,850 | py | Python | ansible-ipi-install/roles/node-prep/library/nmcli.py | dlminvestments/baremetal-deploy | f35b87b4445ccd0e43237a5cc657f365446d9b5d | [
"Apache-2.0"
] | null | null | null | ansible-ipi-install/roles/node-prep/library/nmcli.py | dlminvestments/baremetal-deploy | f35b87b4445ccd0e43237a5cc657f365446d9b5d | [
"Apache-2.0"
] | 33 | 2020-12-01T05:50:39.000Z | 2021-12-28T19:59:04.000Z | ansible-ipi-install/roles/node-prep/library/nmcli.py | dlminvestments/baremetal-deploy | f35b87b4445ccd0e43237a5cc657f365446d9b5d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2015, Chris Long <alcamie@gmail.com> <chlong@redhat.com>
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__met... | 35.170025 | 150 | 0.571746 |
20aae5f3f51233527aabb1aad0271ead8957b768 | 695 | py | Python | Unidad_2/buscar_precios.py | bloisejuli/curso_python_UNSAM | cfb6e6a8368ce239b5ff0ba0236dbf8c79772374 | [
"MIT"
] | null | null | null | Unidad_2/buscar_precios.py | bloisejuli/curso_python_UNSAM | cfb6e6a8368ce239b5ff0ba0236dbf8c79772374 | [
"MIT"
] | null | null | null | Unidad_2/buscar_precios.py | bloisejuli/curso_python_UNSAM | cfb6e6a8368ce239b5ff0ba0236dbf8c79772374 | [
"MIT"
] | null | null | null | #buscar_precios.py
#Alumna: Julieta Bloise
# Ejercicio 2.7:
# A partir de lo que hiciste en el Ejercicio 2.3, escribí una función buscar_precio(fruta) que busque en archivo ../Data/precios.csv el precio de determinada
# fruta (o verdura) y lo imprima en pantalla. Si la fruta no figura en el listado de precios, debe ... | 31.590909 | 158 | 0.628777 |
397715c0b33ae22eb82b21ebf289779b304c7562 | 2,253 | py | Python | Optimization_MCLP_FSalas_Num2.py | ivandeluna/daad_knapsack | afe80b553102a3c9c5e471e74ea86be56f236d11 | [
"MIT"
] | null | null | null | Optimization_MCLP_FSalas_Num2.py | ivandeluna/daad_knapsack | afe80b553102a3c9c5e471e74ea86be56f236d11 | [
"MIT"
] | null | null | null | Optimization_MCLP_FSalas_Num2.py | ivandeluna/daad_knapsack | afe80b553102a3c9c5e471e74ea86be56f236d11 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Oct 5 15:27:03 2017
Francisco Salas
Resuelve Ec. (3) en (Azhmyakov et al. 2016, A Novel Numerical Approach to the MCLP Based Resilent Supply Chain Optimization)
@author: admin/Francisco Salas
Nota: Ejecutar después de Optimization_MCLP_FSalas_Num2.py
Del resultado de dicho p... | 32.185714 | 124 | 0.642255 |
84149b19608cff2e7e3a7f97e633de8cb644493f | 26,569 | py | Python | fanficfare/adapters/adapter_storiesonlinenet.py | trishume/FanFicFare | 2ddce1acd5258f8dae5b3860aec1c9643a7a0807 | [
"Apache-2.0"
] | 3 | 2020-11-10T16:43:43.000Z | 2021-04-09T07:12:31.000Z | fanficfare/adapters/adapter_storiesonlinenet.py | trishume/FanFicFare | 2ddce1acd5258f8dae5b3860aec1c9643a7a0807 | [
"Apache-2.0"
] | null | null | null | fanficfare/adapters/adapter_storiesonlinenet.py | trishume/FanFicFare | 2ddce1acd5258f8dae5b3860aec1c9643a7a0807 | [
"Apache-2.0"
] | 1 | 2021-04-08T12:25:09.000Z | 2021-04-08T12:25:09.000Z | # -*- coding: utf-8 -*-
# Copyright 2013 Fanficdownloader team, 2020 FanFicFare 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
#
# Un... | 44.653782 | 180 | 0.568181 |
9261dc363bdf48343e667f8704b12427d925cac5 | 22,522 | py | Python | BOARD/Texttable.py | albcristi/ObstructionGame | 22ea8e7dcab80fbcb283c9c0b50d6247028deb31 | [
"MIT"
] | null | null | null | BOARD/Texttable.py | albcristi/ObstructionGame | 22ea8e7dcab80fbcb283c9c0b50d6247028deb31 | [
"MIT"
] | null | null | null | BOARD/Texttable.py | albcristi/ObstructionGame | 22ea8e7dcab80fbcb283c9c0b50d6247028deb31 | [
"MIT"
] | null | null | null | # texttable - module for creating simple ASCII tables
# Copyright (C) 2003-2018 Gerome Fournier <jef(at)foutaise.org>
"""module for creating simple ASCII tables
Example:
table = Texttable()
table.set_cols_align(["l", "r", "c"])
table.set_cols_valign(["t", "m", "b"])
table.add_rows([["Name", "Age", "... | 30.394062 | 100 | 0.532413 |
5d81ec936cc0af817de7ec424c31e5e89eb0bbe0 | 454 | py | Python | tests/notebooks/mirror/ipynb_to_script_vim_folding_markers/jupyter.py | st--/jupytext | f8e8352859cc22e17b11154d0770fd946c4a430a | [
"MIT"
] | 5,378 | 2018-09-01T22:03:43.000Z | 2022-03-31T06:51:42.000Z | tests/notebooks/mirror/ipynb_to_script_vim_folding_markers/jupyter.py | st--/jupytext | f8e8352859cc22e17b11154d0770fd946c4a430a | [
"MIT"
] | 812 | 2018-08-31T08:26:13.000Z | 2022-03-30T18:12:11.000Z | tests/notebooks/mirror/ipynb_to_script_vim_folding_markers/jupyter.py | st--/jupytext | f8e8352859cc22e17b11154d0770fd946c4a430a | [
"MIT"
] | 380 | 2018-09-02T01:40:07.000Z | 2022-03-25T13:57:23.000Z | # ---
# jupyter:
# jupytext:
# cell_markers: '{{{,}}}'
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# # Jupyter notebook
#
# This notebook is a simple jupyter notebook. It only has markdown and code cells. And it does not contain consecutive markdown cells. We sta... | 17.461538 | 161 | 0.645374 |
c63fd5fb4a95e87150f7c8351dc3743da24db8a0 | 7,685 | py | Python | src/main/python/libraries/edge/opensearch/atomresponsebysolr.py | mayadebellis/incubator-sdap-edge | c0899e508a06d614aa58ec9e991443640ba39e65 | [
"Apache-2.0"
] | null | null | null | src/main/python/libraries/edge/opensearch/atomresponsebysolr.py | mayadebellis/incubator-sdap-edge | c0899e508a06d614aa58ec9e991443640ba39e65 | [
"Apache-2.0"
] | null | null | null | src/main/python/libraries/edge/opensearch/atomresponsebysolr.py | mayadebellis/incubator-sdap-edge | c0899e508a06d614aa58ec9e991443640ba39e65 | [
"Apache-2.0"
] | 1 | 2021-01-10T21:19:05.000Z | 2021-01-10T21:19:05.000Z | import json
import urllib
from edge.opensearch.atomresponse import AtomResponse
from collections import defaultdict
class AtomResponseBySolr(AtomResponse):
def __init__(self):
super(AtomResponseBySolr, self).__init__()
def generate(self, solrResponse, pretty=False):
self._populate(solrRespons... | 56.925926 | 186 | 0.55823 |
258eca961c73efbf4547a667f0552972865d6671 | 325 | py | Python | transactions/migrations/0002_remove_transaction_user.py | flyboy1565/fakebank | fbe5acfbfe4dbe38e6965f43f750882e6325cc65 | [
"MIT"
] | 2 | 2021-01-07T23:48:03.000Z | 2022-01-03T03:08:17.000Z | transactions/migrations/0002_remove_transaction_user.py | flyboy1565/fakebank | fbe5acfbfe4dbe38e6965f43f750882e6325cc65 | [
"MIT"
] | 4 | 2020-06-05T23:44:37.000Z | 2021-06-09T18:28:46.000Z | transactions/migrations/0002_remove_transaction_user.py | flyboy1565/fakebank | fbe5acfbfe4dbe38e6965f43f750882e6325cc65 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.5 on 2019-09-08 04:11
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('transactions', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='transaction',
name='user',
),
... | 18.055556 | 47 | 0.587692 |
b6062fdec7a22665780e98ed6b9a73a647cc8342 | 2,054 | py | Python | base/curve.py | JNMaree/pyFin | 27fc03c912a722f0cf801eede969257f447638ab | [
"MIT"
] | null | null | null | base/curve.py | JNMaree/pyFin | 27fc03c912a722f0cf801eede969257f447638ab | [
"MIT"
] | null | null | null | base/curve.py | JNMaree/pyFin | 27fc03c912a722f0cf801eede969257f447638ab | [
"MIT"
] | null | null | null | # Native Python modules
import datetime as dt
# External Modules
import matplotlib.pyplot as plt
# Local modules
from base.ir import IR
from base.interpolate import lerp
# Define the spot rates at certain specified dates of a curve
class Spot:
def __init__(self, d_tenor: dt.date, y_frac: float, inst: str, intere... | 34.813559 | 103 | 0.599318 |
a49470d5b3fb927585ba4e7532c6aa74625d5dba | 2,959 | py | Python | Data Structures/Binary Tree.py | itsrohanvj/Data-Structures-Algorithms-in-Python | 500bdb75e4f5fb4cbb409bb0fb5487ef36931efa | [
"MIT"
] | 1 | 2021-08-28T15:50:56.000Z | 2021-08-28T15:50:56.000Z | Data Structures/Binary Tree.py | itsrohanvj/Data-Structures-Algorithms-in-Python | 500bdb75e4f5fb4cbb409bb0fb5487ef36931efa | [
"MIT"
] | null | null | null | Data Structures/Binary Tree.py | itsrohanvj/Data-Structures-Algorithms-in-Python | 500bdb75e4f5fb4cbb409bb0fb5487ef36931efa | [
"MIT"
] | null | null | null | #NODE DECLARATION
# THE COMPLETE CODE IS WRITTEN IN DETAILED WAY
class BinaryTree:
def __init__ (self, data):
self.data = data
self.left = None
self.right = None
#set data
def setData(self, data):
self.data = data
#get data
def getData(self):
return self.data... | 24.658333 | 52 | 0.551538 |
f4517716dc8751ee563de9fb2152212eed85c34f | 186 | py | Python | examples/new_word.py | smilelight/lightTEXT | b015d0e3524722fb5a8ee5ea83b7fbbd7408f797 | [
"Apache-2.0"
] | 12 | 2020-01-26T09:16:21.000Z | 2021-12-06T06:44:37.000Z | examples/new_word.py | smilelight/lightTEXT | b015d0e3524722fb5a8ee5ea83b7fbbd7408f797 | [
"Apache-2.0"
] | null | null | null | examples/new_word.py | smilelight/lightTEXT | b015d0e3524722fb5a8ee5ea83b7fbbd7408f797 | [
"Apache-2.0"
] | 7 | 2020-04-30T00:37:32.000Z | 2021-07-07T06:32:40.000Z | from lighttext import NewWordDetector
if __name__ == '__main__':
detector = NewWordDetector()
detector.load_file('new_word/test_new_word3.txt')
print(detector.get_top_k(5))
| 26.571429 | 53 | 0.752688 |
4a6eeba934475af3a4f467ce53248cecc01f1eee | 4,222 | py | Python | mc15.py | kmosiejczuk/minecraft-launchers | a0522a16569e9c4b3cf2c4dcc9ba2c5e31ce1182 | [
"BSD-2-Clause"
] | 2 | 2021-02-08T13:54:02.000Z | 2021-03-21T01:13:05.000Z | mc15.py | kmosiejczuk/minecraft-launchers | a0522a16569e9c4b3cf2c4dcc9ba2c5e31ce1182 | [
"BSD-2-Clause"
] | null | null | null | mc15.py | kmosiejczuk/minecraft-launchers | a0522a16569e9c4b3cf2c4dcc9ba2c5e31ce1182 | [
"BSD-2-Clause"
] | 1 | 2021-05-26T23:25:00.000Z | 2021-05-26T23:25:00.000Z | #!/usr/local/bin/python3 -u
import minecraft_launcher_lib as mll
import subprocess
# Minecraft version
mc_version = "1.15.2"
# Asset index is same but without final revision
asset_index = "1.15"
# Your email, username and password below
login = "yourEmailUsername"
password = "seekritPasswordHere"
# Get Minecraf... | 39.092593 | 87 | 0.692563 |
61d6e78300f0a9d31291a85f250ca629b49d6b1b | 1,702 | py | Python | logic.py | JeanRibes/ppc-freakout | f3dd5c3c20f226e8398915411e51a41850585758 | [
"MIT"
] | null | null | null | logic.py | JeanRibes/ppc-freakout | f3dd5c3c20f226e8398915411e51a41850585758 | [
"MIT"
] | null | null | null | logic.py | JeanRibes/ppc-freakout | f3dd5c3c20f226e8398915411e51a41850585758 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from queue import Queue
from data import *
from random import random
from copy import deepcopy
def generate_pile_random(N=20, max_value=9):
pile = Pile()
for _ in range(N):
value = int(random() * max_value) + 1
color = random() > 0.5
pile.append(Card(color, valu... | 23 | 105 | 0.619859 |
a7f08a1d39146f627144ad0eaa4265a6db15cd82 | 146 | py | Python | clase 6/clases/animales/__init__.py | jbian/computacion_para_ingenieria | 492c90c0a53cf02f22f6b9f66e65a700bd09e916 | [
"Apache-2.0"
] | 2 | 2022-02-11T21:43:28.000Z | 2022-02-13T00:51:51.000Z | clase 6/clases/animales/__init__.py | jbian/computacion_para_ingenieria | 492c90c0a53cf02f22f6b9f66e65a700bd09e916 | [
"Apache-2.0"
] | null | null | null | clase 6/clases/animales/__init__.py | jbian/computacion_para_ingenieria | 492c90c0a53cf02f22f6b9f66e65a700bd09e916 | [
"Apache-2.0"
] | 1 | 2022-01-31T15:04:31.000Z | 2022-01-31T15:04:31.000Z | # -*- coding: utf-8 -*-
"""
Created on Sat Feb 12 07:04:05 2022
@author: Diesel soft server
"""
from Perro import Perro
from Abeja import Abeja | 14.6 | 35 | 0.678082 |
86d200cb96f6d7f7a1ac6f69a79f6f3f1f4eb87a | 5,304 | py | Python | lab1/main.py | RedCuckoo/computer-graphics-labs | 991ce6e10ca556e17d8450d54ec9080eb9045032 | [
"MIT"
] | null | null | null | lab1/main.py | RedCuckoo/computer-graphics-labs | 991ce6e10ca556e17d8450d54ec9080eb9045032 | [
"MIT"
] | null | null | null | lab1/main.py | RedCuckoo/computer-graphics-labs | 991ce6e10ca556e17d8450d54ec9080eb9045032 | [
"MIT"
] | null | null | null | from graphics import *
from sympy.geometry import Point2D as syPoint
from sympy.geometry import Segment as sySegment
from sympy.geometry import Line as syLine
width = 400
height = 400
def generate_line_turned(point, intersection_point):
global width
return syLine(syPoint(point.x, point.y), syPoint(width, in... | 32.740741 | 120 | 0.613311 |
a003e8312b7a2f1570e566146368c4a07f4c6a23 | 2,534 | py | Python | integration_tests/test_complex.py | akshanshbhatt/lpython | 70fef49dbbb6cbb0447f7013231171e5c8b8e5df | [
"BSD-3-Clause"
] | 31 | 2022-01-07T23:56:33.000Z | 2022-03-29T16:09:02.000Z | integration_tests/test_complex.py | akshanshbhatt/lpython | 70fef49dbbb6cbb0447f7013231171e5c8b8e5df | [
"BSD-3-Clause"
] | 197 | 2021-12-29T19:01:41.000Z | 2022-03-31T15:58:25.000Z | integration_tests/test_complex.py | akshanshbhatt/lpython | 70fef49dbbb6cbb0447f7013231171e5c8b8e5df | [
"BSD-3-Clause"
] | 17 | 2022-01-06T15:34:36.000Z | 2022-03-31T13:55:33.000Z | from ltypes import i32, i64, f32, f64, c32, c64
def test_real_imag():
x: c64
x = 2 + 3j
a: f64
b: f64
eps: f64
eps = 1e-12
a = x.real
b = x.imag
assert abs(a - 2) < eps
assert abs(b - 3) < eps
def test_complex():
x: c64
x = complex(4.5, 6.7)
eps: f64
eps = 1e-12... | 19.492308 | 55 | 0.498027 |
2a03b3789ff38b06ada5c0ba0599c9f8592b4819 | 7,335 | py | Python | rllib/tests/test_model_imports.py | ChaceAshcraft/ray | a72237f1712e2805f6799de3489e326e2965d624 | [
"Apache-2.0"
] | 3 | 2021-06-22T19:57:41.000Z | 2021-06-23T07:16:44.000Z | rllib/tests/test_model_imports.py | ChaceAshcraft/ray | a72237f1712e2805f6799de3489e326e2965d624 | [
"Apache-2.0"
] | 72 | 2021-02-06T08:07:16.000Z | 2022-03-26T07:17:49.000Z | rllib/tests/test_model_imports.py | ChaceAshcraft/ray | a72237f1712e2805f6799de3489e326e2965d624 | [
"Apache-2.0"
] | 2 | 2021-05-05T21:05:16.000Z | 2021-06-22T21:16:03.000Z | #!/usr/bin/env python
import h5py
import numpy as np
from pathlib import Path
import unittest
import ray
from ray.rllib.agents.registry import get_agent_class
from ray.rllib.models.catalog import ModelCatalog
from ray.rllib.models.tf.misc import normc_initializer
from ray.rllib.models.tf.tf_modelv2 import TFModelV2
f... | 36.859296 | 79 | 0.608725 |
ba9cb4bd90ed03146a38cf3328cbc324b6e3a6f3 | 3,213 | py | Python | src/main/python/tests/test_matrix_aggregations.py | escher-m/systemds | 6dea896dc0db29c07bfcd24b73a7d37f91b59620 | [
"Apache-2.0"
] | 1 | 2020-06-04T11:53:14.000Z | 2020-06-04T11:53:14.000Z | src/main/python/tests/test_matrix_aggregations.py | escher-m/systemds | 6dea896dc0db29c07bfcd24b73a7d37f91b59620 | [
"Apache-2.0"
] | 1 | 2020-06-07T15:47:24.000Z | 2020-06-07T15:47:24.000Z | src/main/python/tests/test_matrix_aggregations.py | t201/systemds | b66a3c006ce6a3a888653e2d1accec479cc756fd | [
"Apache-2.0"
] | null | null | null | #-------------------------------------------------------------
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under... | 35.307692 | 114 | 0.641768 |
28c7fbcf7042ecfd0ee49efcef8c0a2c67f7b867 | 750 | py | Python | tests/test_very_active_minutes.py | mrphil007/fitbit-to-sqlite | 4d3251b21d06535a42b1b6dad47ded8d91085a14 | [
"Apache-2.0"
] | 10 | 2020-09-10T16:54:42.000Z | 2021-12-16T10:16:50.000Z | tests/test_very_active_minutes.py | mrphil007/fitbit-to-sqlite | 4d3251b21d06535a42b1b6dad47ded8d91085a14 | [
"Apache-2.0"
] | null | null | null | tests/test_very_active_minutes.py | mrphil007/fitbit-to-sqlite | 4d3251b21d06535a42b1b6dad47ded8d91085a14 | [
"Apache-2.0"
] | null | null | null | from fitbit_to_sqlite.utils import save_very_active_minutes
import pathlib
import sqlite_utils
from .utils import create_zip
def test_very_active_minutes():
zf = create_zip()
db = sqlite_utils.Database(memory=True)
very_active_minutes = [
f.filename for f in zf.filelist if "very_active" in f.filen... | 25.862069 | 95 | 0.597333 |
45f5bd0ff1a1905a3e83607a61398e8182571556 | 4,983 | py | Python | app/user/tests/test_user_api.py | rodnaskorn/recipe-app-api | a3d16d77ef51ea39d9ac433772de99f29e2fc1cd | [
"MIT"
] | null | null | null | app/user/tests/test_user_api.py | rodnaskorn/recipe-app-api | a3d16d77ef51ea39d9ac433772de99f29e2fc1cd | [
"MIT"
] | null | null | null | app/user/tests/test_user_api.py | rodnaskorn/recipe-app-api | a3d16d77ef51ea39d9ac433772de99f29e2fc1cd | [
"MIT"
] | null | null | null | from django.test import TestCase
from django.contrib.auth import get_user_model
from django.urls import reverse
from rest_framework.test import APIClient
from rest_framework import status
CREATE_USER_URL = reverse('user:create')
TOKEN_URL = reverse('user:token')
ME_URL = reverse('user:me')
def create_user(**params... | 34.846154 | 77 | 0.644993 |
3d1afaeb2273e2a70b478f18a676e59d0696cf4c | 8,220 | py | Python | model/__init__.py | daleroberts/datacube-2nd-order-stats | a37ca0e97079e9f5f922c5beb5eec2f10895c6fe | [
"Apache-2.0"
] | 9 | 2019-05-23T16:48:21.000Z | 2021-02-06T23:55:46.000Z | model/__init__.py | daleroberts/datacube-2nd-order-stats | a37ca0e97079e9f5f922c5beb5eec2f10895c6fe | [
"Apache-2.0"
] | null | null | null | model/__init__.py | daleroberts/datacube-2nd-order-stats | a37ca0e97079e9f5f922c5beb5eec2f10895c6fe | [
"Apache-2.0"
] | 1 | 2021-02-06T23:56:20.000Z | 2021-02-06T23:56:20.000Z | import logging
import numpy as np
import xarray as xr
from datacube.model import Measurement
from datacube_stats.statistics import Statistic
from copy import copy
from .fast import smad, emad, bcmad, geomedian
LOG = logging.getLogger(__name__)
def sizefmt(num, suffix="B"):
for unit in ["", "K", "M", "G", "T", ... | 34.107884 | 110 | 0.622384 |
de9e72ecb892cc8701822b44cdbaf4338c186761 | 1,866 | py | Python | database.py | BodhaanshRavipati325/SkinCancerDetetctor | 5b46619eb6055c32f84ccc043970e50189f5e43f | [
"MIT"
] | 3 | 2020-11-09T15:13:19.000Z | 2021-05-25T10:33:09.000Z | database.py | aahmad4/Dermatol | 6a360f5bc223bfd61871d62c88ed57f7470b8cd1 | [
"MIT"
] | null | null | null | database.py | aahmad4/Dermatol | 6a360f5bc223bfd61871d62c88ed57f7470b8cd1 | [
"MIT"
] | null | null | null | # Module being imported for current date and time
import datetime
# Creating a database allowing user credentials to be added to textfile
class DataBase:
# Initializing the class
def __init__(self, filename):
self.filename = filename
self.users = None
self.file = None
... | 33.321429 | 121 | 0.56806 |
8bf83b52ec7dc357568eca25eec0912c19101541 | 8,734 | py | Python | epp_env/lib/python3.6/site-packages/djxml/xmlmodels/base.py | jprsurendra/EmployeeProjectPanel | e994f8493a14def28133d509a9211f368eb5c88c | [
"Apache-2.0"
] | null | null | null | epp_env/lib/python3.6/site-packages/djxml/xmlmodels/base.py | jprsurendra/EmployeeProjectPanel | e994f8493a14def28133d509a9211f368eb5c88c | [
"Apache-2.0"
] | 8 | 2020-02-12T03:21:51.000Z | 2022-03-12T00:07:01.000Z | virtual/lib/python3.6/site-packages/djxml/xmlmodels/base.py | Steve-design/Jirani | e386b1ede05f6c2067af2621c21ce802ec72ae73 | [
"MIT"
] | null | null | null | import re
import sys
import codecs
import functools
import copy
import six
from lxml import etree
from django.core.exceptions import (ObjectDoesNotExist, FieldError,
MultipleObjectsReturned,)
from django.db.models.base import subclass_exception
try:
from django.utils.encoding i... | 36.391667 | 103 | 0.596634 |
7dc6584c6fe3787899b47bd330d24eb95fe4fdb0 | 1,867 | py | Python | custom_components/home_connect_alt/const.py | code-echobase/home-connect-hass | 7bb8b608f144a034ade4a07fe067e5c1db4297c4 | [
"MIT"
] | 1 | 2022-02-14T07:38:41.000Z | 2022-02-14T07:38:41.000Z | custom_components/home_connect_alt/const.py | Krocko/home-connect-hass | 1519b48b9aecc79a74514192c86a19aca70aef3f | [
"MIT"
] | null | null | null | custom_components/home_connect_alt/const.py | Krocko/home-connect-hass | 1519b48b9aecc79a74514192c86a19aca70aef3f | [
"MIT"
] | null | null | null | """Constants for the Home Connect New integration."""
DOMAIN = "home_connect_alt"
SIM_HOST = "https://simulator.home-connect.com"
API_HOST = "https://api.home-connect.com"
ENDPOINT_AUTHORIZE = "/security/oauth/authorize"
ENDPOINT_TOKEN = "/security/oauth/token"
SCOPES = "IdentifyAppliance Monitor Control Settings"
CO... | 31.644068 | 134 | 0.65774 |
05acf70c7a2efd47c8af7af796ee3cf3d265aa10 | 11,269 | py | Python | neorl/hybrid/pesacore/woa.py | Jimmy-INL/neorl | 4d11d7527c4e3548e40f928d52b15e7e1e373337 | [
"MIT"
] | 1 | 2021-07-06T20:31:38.000Z | 2021-07-06T20:31:38.000Z | neorl/hybrid/pesacore/woa.py | Jimmy-INL/neorl | 4d11d7527c4e3548e40f928d52b15e7e1e373337 | [
"MIT"
] | null | null | null | neorl/hybrid/pesacore/woa.py | Jimmy-INL/neorl | 4d11d7527c4e3548e40f928d52b15e7e1e373337 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#"""
#Created on Thu Dec 3 14:42:29 2020
#
#@author: Majdi
#"""
import random
import numpy as np
import math
import time
from collections import defaultdict
import sys
import uuid
import multiprocessing
import multiprocessing.pool
class NoDaemonProcess(multiprocessing.Proce... | 40.82971 | 186 | 0.505457 |
87c0f425695d2f109f0451401853ce055e73e1c5 | 3,511 | py | Python | models/resnet_zoo.py | amjltc295/hand_track_classification | 71fdc980d3150646cd531e28878ff1eb63c7efea | [
"MIT"
] | 6 | 2019-07-08T12:01:17.000Z | 2021-11-01T06:01:28.000Z | models/resnet_zoo.py | georkap/hand_track_classification | 962faa1697864e892475989a97fa6ed9c2f1d7b3 | [
"MIT"
] | null | null | null | models/resnet_zoo.py | georkap/hand_track_classification | 962faa1697864e892475989a97fa6ed9c2f1d7b3 | [
"MIT"
] | 3 | 2019-07-08T12:25:45.000Z | 2020-06-05T20:27:57.000Z | # -*- coding: utf-8 -*-
"""
Created on Thu Oct 25 15:24:51 2018
resnet loader from pytorch model zoo
ref: https://github.com/pytorch/examples/pull/58
@author: Γιώργος
"""
import torch.nn as nn
import torchvision.models as models
import torch.utils.model_zoo as model_zoo
model_urls = {
'resnet18': 'https://down... | 35.464646 | 106 | 0.691256 |
8f5a82aeec119c7ccef370671fdc312b8410a640 | 33,137 | py | Python | Providers/Scripts/2.6x-2.7x/Scripts/nxOMSAutomationWorker.py | simathih/PowerShell-DSC-for-Linux | ff78ea6aec3ea76aa04fdcda6d1d08d269449394 | [
"MIT"
] | null | null | null | Providers/Scripts/2.6x-2.7x/Scripts/nxOMSAutomationWorker.py | simathih/PowerShell-DSC-for-Linux | ff78ea6aec3ea76aa04fdcda6d1d08d269449394 | [
"MIT"
] | null | null | null | Providers/Scripts/2.6x-2.7x/Scripts/nxOMSAutomationWorker.py | simathih/PowerShell-DSC-for-Linux | ff78ea6aec3ea76aa04fdcda6d1d08d269449394 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# ====================================
# Copyright (c) Microsoft Corporation. All rights reserved.
# See license.txt for license information.
# ====================================
import ConfigParser
import imp
import logging
import logging.handlers
import os
import re
import signal
import subpro... | 42.757419 | 174 | 0.694782 |
1fd983344b926d97b22f37713540dd123d203ff4 | 476 | py | Python | ex033.py | gabrielwai/exercicios_de_Python | 3767775748db7c501a6e0364edf7ba4f079e62f9 | [
"MIT"
] | null | null | null | ex033.py | gabrielwai/exercicios_de_Python | 3767775748db7c501a6e0364edf7ba4f079e62f9 | [
"MIT"
] | null | null | null | ex033.py | gabrielwai/exercicios_de_Python | 3767775748db7c501a6e0364edf7ba4f079e62f9 | [
"MIT"
] | null | null | null | n1 = int(input('Digite um número inteiro qualquer: '))
n2 = int(input('Digite um outro número inteiro qualquer: '))
n3 = int(input('Digite outro número inteiro qualquer: '))
if n1 > n2:
if n1 > n3:
maior = n1
if n2 > n3:
menor = n3
else:
menor = n2
els... | 19.04 | 61 | 0.462185 |
cf40d31617e617908a1ca9b1912e79c31916e506 | 29,221 | py | Python | src/tools/walker.py | Hiestaa/my-tornado-media-library | 6decb97ad02d0ee1613c53dbb1729474e2ea9b42 | [
"MIT"
] | 1 | 2019-09-14T20:46:23.000Z | 2019-09-14T20:46:23.000Z | src/tools/walker.py | Hiestaa/my-tornado-media-library | 6decb97ad02d0ee1613c53dbb1729474e2ea9b42 | [
"MIT"
] | null | null | null | src/tools/walker.py | Hiestaa/my-tornado-media-library | 6decb97ad02d0ee1613c53dbb1729474e2ea9b42 | [
"MIT"
] | 1 | 2021-08-24T03:20:46.000Z | 2021-08-24T03:20:46.000Z | # -*- coding: utf8 -*-
from __future__ import unicode_literals
import os
import subprocess
import time
import logging
from threading import Thread, Event
from tqdm import tqdm
import re
import cv2
from PIL import Image
from tools.utils import extends, timeFormat
from tools.analyzer.analyzers import AlbumAnalyzer
fr... | 43.483631 | 141 | 0.555012 |
03efcb8e1fbaed59dfab62cc5f97c1ef4ed44644 | 4,916 | py | Python | app/user/tests/test_user_api.py | juancarestre/recipe-app-api2 | 7f93a2a01ebe811cba84526f0c1202dca7800b7a | [
"MIT"
] | null | null | null | app/user/tests/test_user_api.py | juancarestre/recipe-app-api2 | 7f93a2a01ebe811cba84526f0c1202dca7800b7a | [
"MIT"
] | null | null | null | app/user/tests/test_user_api.py | juancarestre/recipe-app-api2 | 7f93a2a01ebe811cba84526f0c1202dca7800b7a | [
"MIT"
] | null | null | null | from django.test import TestCase
from django.contrib.auth import get_user_model
from django.urls import reverse
from rest_framework.test import APIClient
from rest_framework import status
CREATE_USER_URL = reverse('user:create')
TOKEN_URL = reverse('user:token')
ME_URL = reverse('user:me')
def create_user(**params... | 36.414815 | 77 | 0.663141 |
f5396855bc3629550f48ea07a3a45c91f0aa7cc6 | 4,385 | py | Python | train_wavernn.py | Dacrol/WaveRNN-server | 5189829cec71938ff7ec2e3eb59e73af1382430a | [
"MIT"
] | null | null | null | train_wavernn.py | Dacrol/WaveRNN-server | 5189829cec71938ff7ec2e3eb59e73af1382430a | [
"MIT"
] | null | null | null | train_wavernn.py | Dacrol/WaveRNN-server | 5189829cec71938ff7ec2e3eb59e73af1382430a | [
"MIT"
] | null | null | null | import time
import numpy as np
from torch import optim
import torch.nn.functional as F
from utils.display import stream, simple_table
from utils.dataset import get_vocoder_datasets
from utils.distribution import discretized_mix_logistic_loss
import hparams as hp
from models.fatchord_wavernn import Model
from gen_wavern... | 35.08 | 123 | 0.619156 |
6e55940e537ad857a3c59e8bbe583d4976c9ba4f | 92 | py | Python | python/p006.py | RUiNtheExtinct/project-euler | 5c3e64c7dfcbf52d5213df88d2310550f4ee9ce1 | [
"MIT"
] | null | null | null | python/p006.py | RUiNtheExtinct/project-euler | 5c3e64c7dfcbf52d5213df88d2310550f4ee9ce1 | [
"MIT"
] | null | null | null | python/p006.py | RUiNtheExtinct/project-euler | 5c3e64c7dfcbf52d5213df88d2310550f4ee9ce1 | [
"MIT"
] | null | null | null | t, ans = list(range(1, 101)), 0
for i in t:
ans += i * i
print(ans - (sum(t) * sum(t)))
| 18.4 | 31 | 0.5 |
e50412399ebdb3fa3c69418665848519a49b6ee1 | 847 | py | Python | Detailed_generator.py | anod6351/CARtool | 9bb6b23438990e3593b4e9d4a68f1e20ab700961 | [
"MIT"
] | 1 | 2021-02-24T13:16:33.000Z | 2021-02-24T13:16:33.000Z | Detailed_generator.py | anod6351/CARtool | 9bb6b23438990e3593b4e9d4a68f1e20ab700961 | [
"MIT"
] | 1 | 2021-05-17T08:42:31.000Z | 2021-05-17T08:42:31.000Z | Detailed_generator.py | anod6351/CARtool | 9bb6b23438990e3593b4e9d4a68f1e20ab700961 | [
"MIT"
] | 3 | 2019-03-19T13:07:58.000Z | 2021-05-03T06:32:40.000Z | def detail_samtools(Regions, Read_depth):
# create a detailed list with all depth values from the same region in a sub list. From samtools depth calculations
# samtools generates a depth file with: chr, position and coverage depth value
# Regeions comes from the bed file with chr, start, stop, region name
... | 24.2 | 117 | 0.683589 |
985e4ebc83481a4694a7a63125e88864f783d347 | 2,105 | py | Python | neutron/tests/unit/plugins/ml2/extensions/fake_extension.py | glove747/liberty-neutron | 35a4c85e781d10da4521565c3a367e4ecb50739d | [
"Apache-2.0"
] | null | null | null | neutron/tests/unit/plugins/ml2/extensions/fake_extension.py | glove747/liberty-neutron | 35a4c85e781d10da4521565c3a367e4ecb50739d | [
"Apache-2.0"
] | null | null | null | neutron/tests/unit/plugins/ml2/extensions/fake_extension.py | glove747/liberty-neutron | 35a4c85e781d10da4521565c3a367e4ecb50739d | [
"Apache-2.0"
] | null | null | null | # 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, software
# d... | 32.384615 | 78 | 0.565321 |
c96817167494bf057cc5a8c52a01a7229ed85ed2 | 1,324 | py | Python | examples/basics/scene/sphere.py | ghisvail/vispy | 39d4a81db6d84f813bd23e76ff3d61bd4e6bf46f | [
"BSD-3-Clause"
] | 2 | 2020-11-27T10:51:56.000Z | 2020-12-28T20:39:14.000Z | examples/basics/scene/sphere.py | ghisvail/vispy | 39d4a81db6d84f813bd23e76ff3d61bd4e6bf46f | [
"BSD-3-Clause"
] | 2 | 2015-11-04T19:43:29.000Z | 2015-11-19T04:26:29.000Z | examples/basics/scene/sphere.py | ghisvail/vispy | 39d4a81db6d84f813bd23e76ff3d61bd4e6bf46f | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2015, Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -------------------------------------------------------------------------... | 33.948718 | 79 | 0.558157 |
07abee793dbb6b4c90ec28d3196c3478f40d5159 | 479 | py | Python | python/UVA/846_steps.py | gineer01/programming-challenges | 9f0bbaab5b85423b5671ee3cfc2d0fd62cea4cc7 | [
"MIT"
] | null | null | null | python/UVA/846_steps.py | gineer01/programming-challenges | 9f0bbaab5b85423b5671ee3cfc2d0fd62cea4cc7 | [
"MIT"
] | null | null | null | python/UVA/846_steps.py | gineer01/programming-challenges | 9f0bbaab5b85423b5671ee3cfc2d0fd62cea4cc7 | [
"MIT"
] | null | null | null | import sys
import math
def solve(x, y):
t = y - x
k = math.floor(math.sqrt(t + .25) - 0.5)
g = t - (k * (k + 1))
if g == 0:
return 2 * k
elif g <= k + 1:
return 2 * k + 1
else:
return 2 * k + 2
assert solve(0, 1) == 1
assert solve(0, 2) == 2
assert solve(0, 3) == 3
ass... | 17.740741 | 44 | 0.492693 |
f1027427596f011dd913ad49edb571a92b278a2a | 6,949 | py | Python | pydash/services.py | hqpr/django-pydash | 75ee81a45a279da3726fbe224d51c7691fac8397 | [
"MIT"
] | null | null | null | pydash/services.py | hqpr/django-pydash | 75ee81a45a279da3726fbe224d51c7691fac8397 | [
"MIT"
] | null | null | null | pydash/services.py | hqpr/django-pydash | 75ee81a45a279da3726fbe224d51c7691fac8397 | [
"MIT"
] | null | null | null | import os
import platform
import multiprocessing
from datetime import timedelta
def chunks(get, n):
return [get[i:i + n] for i in range(0, len(get), n)]
def get_uptime():
"""
Get uptime
"""
try:
with open('/proc/uptime', 'r') as f:
uptime_seconds = float(f.readline().split()[... | 23.009934 | 114 | 0.491582 |
b87d4834982fd4bba7c458adb2dfa967a3e45663 | 9,657 | py | Python | contrib/bitrpc/bitrpc.py | BlockchainFor/ESPB2 | 559a2cdc6aca001266c6721b2e48d542769a3a6d | [
"MIT"
] | 24 | 2019-01-26T01:52:06.000Z | 2020-07-22T14:43:05.000Z | contrib/bitrpc/bitrpc.py | BlockchainFor/ESPB2 | 559a2cdc6aca001266c6721b2e48d542769a3a6d | [
"MIT"
] | 6 | 2019-04-26T17:24:37.000Z | 2021-04-24T07:26:46.000Z | contrib/bitrpc/bitrpc.py | BlockchainFor/ESPB2 | 559a2cdc6aca001266c6721b2e48d542769a3a6d | [
"MIT"
] | 27 | 2018-11-16T11:07:08.000Z | 2021-06-22T01:25:53.000Z | from jsonrpc import ServiceProxy
import sys
import string
import getpass
# ===== BEGIN USER SETTINGS =====
# if you do not set these you will be prompted for a password for every command
rpcuser = ""
rpcpass = ""
# ====== END USER SETTINGS ======
if rpcpass == "":
access = ServiceProxy("http://127.0.0.1:32322")
... | 28.571006 | 101 | 0.573988 |
24b62ba315b7894aafe42dd918342229efae548e | 7,241 | py | Python | indy_node/test/catchup/test_requests_post_new_node_catchup.py | johadahl/indy-node | 7edd4621a0212a5befa0eecf6a56c96cb2a64eae | [
"Apache-2.0"
] | null | null | null | indy_node/test/catchup/test_requests_post_new_node_catchup.py | johadahl/indy-node | 7edd4621a0212a5befa0eecf6a56c96cb2a64eae | [
"Apache-2.0"
] | null | null | null | indy_node/test/catchup/test_requests_post_new_node_catchup.py | johadahl/indy-node | 7edd4621a0212a5befa0eecf6a56c96cb2a64eae | [
"Apache-2.0"
] | null | null | null | from plenum.common.constants import DOMAIN_LEDGER_ID
from plenum.common.types import f
from plenum.common.util import randomString
from plenum.test.helper import assertLength
from plenum.test.node_catchup.helper import checkNodeDataForEquality, \
waitNodeDataEquality
from plenum.test.test_node import ensure_node_di... | 42.846154 | 86 | 0.58445 |
656148b230f43f18c2b46c83a7571846402f689a | 2,425 | py | Python | ui/service/job_service.py | ctwardy/sitehound | 0f928a82f761e3d0335d1d4d01f6105b726fd889 | [
"Apache-2.0"
] | null | null | null | ui/service/job_service.py | ctwardy/sitehound | 0f928a82f761e3d0335d1d4d01f6105b726fd889 | [
"Apache-2.0"
] | null | null | null | ui/service/job_service.py | ctwardy/sitehound | 0f928a82f761e3d0335d1d4d01f6105b726fd889 | [
"Apache-2.0"
] | 1 | 2018-10-02T22:03:23.000Z | 2018-10-02T22:03:23.000Z | import traceback
import uuid
import pymongo
import time
__author__ = 'tomas'
from bson import ObjectId
import json
from pymongo.errors import DuplicateKeyError
from mongoutils.validate import validate_url
from ui.singleton import Singleton
#################### services #########################
def get_jobs_by_work... | 32.77027 | 126 | 0.710103 |
17f2a87b42d4b9f9ea313269b225f980b8b068ed | 6,099 | py | Python | k8sclient/models/v1beta1_network_policy_ingress_rule.py | beli-sk/k8sclient | 3a6102405ee1a65933e328298964f282329fb1f0 | [
"Apache-2.0"
] | null | null | null | k8sclient/models/v1beta1_network_policy_ingress_rule.py | beli-sk/k8sclient | 3a6102405ee1a65933e328298964f282329fb1f0 | [
"Apache-2.0"
] | null | null | null | k8sclient/models/v1beta1_network_policy_ingress_rule.py | beli-sk/k8sclient | 3a6102405ee1a65933e328298964f282329fb1f0 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
No descripton provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: extensions/v1beta1
Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");... | 40.125 | 466 | 0.644696 |
ba5c8938ee3f488402634de20f09ad381bb15ad9 | 5,648 | py | Python | keras2onnx/ke2onnx/gru.py | ashaazami/keras-onnx | 0e66937886c8256bdde366b9ac5dc67b68c9f56e | [
"MIT"
] | 1 | 2020-03-02T10:35:45.000Z | 2020-03-02T10:35:45.000Z | keras2onnx/ke2onnx/gru.py | HOZHENWAI/keras-onnx | 4a220193a3e2d6eb3bcb76dcf3be39a4b1f84f09 | [
"MIT"
] | null | null | null | keras2onnx/ke2onnx/gru.py | HOZHENWAI/keras-onnx | 4a220193a3e2d6eb3bcb76dcf3be39a4b1f84f09 | [
"MIT"
] | null | null | null | ###############################################################################
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
###############################################################################
imp... | 44.472441 | 141 | 0.660765 |
65baa1c9af8fe3bb32f56367df601178ce9df090 | 3,178 | py | Python | m04_machine_learning/m04_c04_metrics_and_model_selection/model.py | mailo-barrientos/mat281_portfolio | 5dbad4ae450d7ff558fdf6fc3a09b11215726b7d | [
"MIT"
] | 4 | 2019-04-10T02:35:39.000Z | 2020-03-10T04:49:07.000Z | m04_machine_learning/m04_c04_metrics_and_model_selection/model.py | mailo-barrientos/mat281_portfolio | 5dbad4ae450d7ff558fdf6fc3a09b11215726b7d | [
"MIT"
] | null | null | null | m04_machine_learning/m04_c04_metrics_and_model_selection/model.py | mailo-barrientos/mat281_portfolio | 5dbad4ae450d7ff558fdf6fc3a09b11215726b7d | [
"MIT"
] | 7 | 2019-10-01T19:57:14.000Z | 2020-04-09T06:15:43.000Z | import numpy as np
from matplotlib import pyplot as plt
from scipy import optimize
from scipy import random
secret_true_params = (5., np.pi/4.0, 0., 0.)
def my_model(x, a, b, c, d):
return a*np.cos(b*x+c) + d
def generate_data(N=100, true_params=secret_true_params,
seed = 42):
x = np.linspa... | 36.528736 | 104 | 0.652926 |
68c63b637d0482ed229b060a2d1252039139b1f4 | 2,108 | py | Python | tests/test_component_recorder.py | mikiec84/home-assistant | d9e3c02df3a2690e74d1b606e8db0a4dd686e872 | [
"MIT"
] | null | null | null | tests/test_component_recorder.py | mikiec84/home-assistant | d9e3c02df3a2690e74d1b606e8db0a4dd686e872 | [
"MIT"
] | null | null | null | tests/test_component_recorder.py | mikiec84/home-assistant | d9e3c02df3a2690e74d1b606e8db0a4dd686e872 | [
"MIT"
] | null | null | null | """
tests.test_component_recorder
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tests Recorder component.
"""
# pylint: disable=too-many-public-methods,protected-access
import unittest
import os
from homeassistant.const import MATCH_ALL
from homeassistant.components import recorder
from helpers import get_test_home_assistant
clas... | 29.690141 | 72 | 0.645636 |
1513358aac1ec40cf1fb3f0ef43e3ced6a520d82 | 295 | py | Python | scraping/scrapy_project/pipelines.py | ManasUniyal/Friday | 6e1ff6541cca98f073e3fd07218b22da165a613b | [
"MIT"
] | 1 | 2021-03-01T11:25:32.000Z | 2021-03-01T11:25:32.000Z | scraping/scrapy_project/pipelines.py | ManasUniyal/Friday | 6e1ff6541cca98f073e3fd07218b22da165a613b | [
"MIT"
] | null | null | null | scraping/scrapy_project/pipelines.py | ManasUniyal/Friday | 6e1ff6541cca98f073e3fd07218b22da165a613b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html
class ScrapyProjectPipeline(object):
def process_item(self, item, spider):
return item
| 24.583333 | 66 | 0.718644 |
41c4448eee800aa83233d319c64f98f7602c68ba | 18,967 | py | Python | namespace.py | maxnilz/ontology-visualization | 528deb736f0c8d9e96b693f3acd5aedff41b74dd | [
"MIT"
] | null | null | null | namespace.py | maxnilz/ontology-visualization | 528deb736f0c8d9e96b693f3acd5aedff41b74dd | [
"MIT"
] | null | null | null | namespace.py | maxnilz/ontology-visualization | 528deb736f0c8d9e96b693f3acd5aedff41b74dd | [
"MIT"
] | null | null | null | import os
from unicodedata import category
from urllib.parse import urljoin, urldefrag
from urllib.request import pathname2url
from rdflib.term import URIRef, Variable, _XSD_PFX, _is_valid_uri
__all__ = [
'is_ncname', 'split_uri', 'Namespace',
'ClosedNamespace', 'NamespaceManager',
'XMLNS', 'RDF', 'RDFS', ... | 33.569912 | 119 | 0.557495 |
1d053a56edc62ddef5875ed2c4b76b0011c2841d | 3,900 | py | Python | test/selenium_tests/test_workflow_editor.py | openminted/galaxy | bd2147cccf814f8cec93372973b5e6ada4668a80 | [
"CC-BY-3.0"
] | 1 | 2021-04-26T08:46:21.000Z | 2021-04-26T08:46:21.000Z | test/selenium_tests/test_workflow_editor.py | openminted/galaxy | bd2147cccf814f8cec93372973b5e6ada4668a80 | [
"CC-BY-3.0"
] | null | null | null | test/selenium_tests/test_workflow_editor.py | openminted/galaxy | bd2147cccf814f8cec93372973b5e6ada4668a80 | [
"CC-BY-3.0"
] | 1 | 2018-12-09T13:50:28.000Z | 2018-12-09T13:50:28.000Z | from ._workflow_fixtures import (
WORKFLOW_SIMPLE_CAT_TWICE,
WORKFLOW_WITH_INVALID_STATE,
WORKFLOW_WITH_OLD_TOOL_VERSION,
)
from .framework import (
retry_assertion_during_transitions,
selenium_test,
SeleniumTestCase
)
class WorkflowEditorTestCase(SeleniumTestCase):
ensure_registered = Tr... | 38.235294 | 116 | 0.719487 |
1e3d0d8aaeebd8d3d2d70c2c8f70986f7e273358 | 7,572 | py | Python | cone_finder/scripts/hsv_filt.py | mattp256/wheele | 724e2df031017051085000ac49849e4bb03b69cb | [
"BSD-3-Clause"
] | 2 | 2018-01-28T00:48:42.000Z | 2019-04-08T00:24:11.000Z | cone_finder/scripts/hsv_filt.py | mattp256/wheele | 724e2df031017051085000ac49849e4bb03b69cb | [
"BSD-3-Clause"
] | 27 | 2018-08-03T01:49:19.000Z | 2022-01-05T19:22:46.000Z | cone_finder/scripts/hsv_filt.py | mattp256/wheele | 724e2df031017051085000ac49849e4bb03b69cb | [
"BSD-3-Clause"
] | 3 | 2018-04-20T02:55:10.000Z | 2020-11-24T05:57:13.000Z | #DO NOT OR FILTS TOGETHER
#INSTEAD, JUST FIND CONTOURS ON EACH SEPARATE FILT
#HOW TO AUTOMATICALLY FIND THE BACKGROUND COLORS OF AN IMAGE?
# 1. Given a range of colors defined like below (MIN and MAX for inRange)
# Step through each color, filt img, close/open, find contours
# If a large contour exists, assu... | 41.604396 | 111 | 0.634575 |
faab26d1e63990899ba5f5445b8e0acf25f7051b | 2,418 | py | Python | migrations/versions/28c099a8784c_tabela_categoria.py | leticiarosemberg/EcoOng | 15c2ec1eabeeb12f3c7491eb22c2663fd10229ed | [
"MIT"
] | 1 | 2022-01-11T20:20:48.000Z | 2022-01-11T20:20:48.000Z | migrations/versions/28c099a8784c_tabela_categoria.py | leticiarosemberg/EcoOng | 15c2ec1eabeeb12f3c7491eb22c2663fd10229ed | [
"MIT"
] | 1 | 2021-12-16T03:51:01.000Z | 2021-12-16T03:51:01.000Z | migrations/versions/28c099a8784c_tabela_categoria.py | leticiarosemberg/EcoOng | 15c2ec1eabeeb12f3c7491eb22c2663fd10229ed | [
"MIT"
] | 1 | 2022-02-19T19:11:11.000Z | 2022-02-19T19:11:11.000Z | """Tabela Categoria
Revision ID: 28c099a8784c
Revises: ceb81cd11f40
Create Date: 2021-12-07 11:26:45.354260
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '28c099a8784c'
down_revision = 'ceb81cd11f40'
branch_labels = None
d... | 40.3 | 123 | 0.712572 |
82fccec883e17979401535fae88b7dd01e0759f1 | 7,953 | py | Python | main_DQN.py | robintyh1/Variational-DQN | 75974131a9b3427ab6798c47bcd276a2ac15bd33 | [
"MIT"
] | 9 | 2017-12-01T17:20:30.000Z | 2020-05-18T08:13:30.000Z | main_DQN.py | robintyh1/Variational-DQN | 75974131a9b3427ab6798c47bcd276a2ac15bd33 | [
"MIT"
] | 1 | 2020-01-02T12:22:40.000Z | 2020-01-02T12:22:40.000Z | main_DQN.py | robintyh1/Variational-DQN | 75974131a9b3427ab6798c47bcd276a2ac15bd33 | [
"MIT"
] | 3 | 2018-12-26T20:57:36.000Z | 2020-01-06T21:45:54.000Z | """
Implement vanilla DQN in Chainer
code adapted from Chainer tutorial
"""
from __future__ import print_function
from __future__ import division
import argparse
import collections
import copy
import random
import gym
import numpy as np
import os
import chainer
from chainer import functions as F
from chainer import ... | 37.338028 | 79 | 0.602037 |
68083336da0351b12d1ac7475ca2f54e3a857d1f | 775 | py | Python | Section 4/Student Resources/Assignment Solution Scripts/assignment_01b_solution.py | t12-hub/Python-Hands-On | 951a42efaff56a5f5213bf1873b268c0b3c189c5 | [
"MIT"
] | 6 | 2021-01-23T16:40:57.000Z | 2022-03-14T16:41:07.000Z | Section 4/Student Resources/Assignment Solution Scripts/assignment_01b_solution.py | t12-hub/Python-Hands-On | 951a42efaff56a5f5213bf1873b268c0b3c189c5 | [
"MIT"
] | null | null | null | Section 4/Student Resources/Assignment Solution Scripts/assignment_01b_solution.py | t12-hub/Python-Hands-On | 951a42efaff56a5f5213bf1873b268c0b3c189c5 | [
"MIT"
] | 3 | 2021-01-11T14:27:12.000Z | 2021-10-02T16:48:12.000Z | # Assignment 1 Solution (Part 2)
# Subjects wit scores
# ** NOTE: Nothing is stopping you from entering - 101 or 120 or -20 or ten or london
english_score = int(input("Enter a score for English : \t"))
math_score = int(input("Enter a score for Math : \t\t"))
science_score = int(input("Enter a score for Science : \t"))... | 33.695652 | 85 | 0.658065 |
cc39cbd30af0680b83e38d9efc1b9ccaf5e53443 | 1,765 | py | Python | events/api.py | MohamedAbdultawab/events | 3d4acaf73628135addb7f1e98b4351cbba50c27e | [
"MIT"
] | null | null | null | events/api.py | MohamedAbdultawab/events | 3d4acaf73628135addb7f1e98b4351cbba50c27e | [
"MIT"
] | null | null | null | events/api.py | MohamedAbdultawab/events | 3d4acaf73628135addb7f1e98b4351cbba50c27e | [
"MIT"
] | null | null | null | import frappe
from frappe import _
from frappe.utils import add_days, nowdate
@frappe.whitelist()
def send_invitation_emails(event):
"""
Send Email Invitations to event invitees.
"""
event = frappe.get_doc("Custom Event", event)
# event.check_permission("email")
if event.status == "Planned":
frappe.sendmai... | 22.628205 | 67 | 0.695184 |
b72300fd63b7085e66767ff06df772e29cbb8159 | 10,817 | py | Python | website/project/views/register.py | h-ci-user01/osf.h-test | a61db2c639a26031aa5b7f58c4dd719919aa5ece | [
"Apache-2.0"
] | null | null | null | website/project/views/register.py | h-ci-user01/osf.h-test | a61db2c639a26031aa5b7f58c4dd719919aa5ece | [
"Apache-2.0"
] | 18 | 2020-03-24T15:26:02.000Z | 2022-03-08T21:30:39.000Z | website/project/views/register.py | h-ci-user01/osf.h-test | a61db2c639a26031aa5b7f58c4dd719919aa5ece | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import httplib as http
import itertools
from flask import request
from framework import status
from framework.exceptions import HTTPError
from framework.flask import redirect # VOL-aware redirect
from framework.auth.decorators import must_be_signed
from website.archiver import ARCHIVER_SUCC... | 38.358156 | 166 | 0.686512 |
3db732e9f0b66224b391783feef4e5e832566c34 | 1,276 | py | Python | commands/today.py | quentinguidee/todo-cli | 7e91579a9046ef6ce7720835550410ef068bbfbb | [
"MIT"
] | 4 | 2021-06-14T10:19:11.000Z | 2022-01-25T20:24:54.000Z | commands/today.py | quentinguidee/todo-cli | 7e91579a9046ef6ce7720835550410ef068bbfbb | [
"MIT"
] | 2 | 2021-06-14T17:30:32.000Z | 2021-06-19T08:47:47.000Z | commands/today.py | quentinguidee/todo-cli | 7e91579a9046ef6ce7720835550410ef068bbfbb | [
"MIT"
] | 2 | 2021-06-14T17:12:57.000Z | 2021-06-18T18:09:37.000Z | import save
import datetime
from rich.console import Console
from rich.table import Table
from rich.text import Text
from commands.command import Command
from models.event import Event
from utils.time import DeltaTime, Time
class TodayCommand(Command):
def execute(self, args):
events: list[Event] = save... | 28.355556 | 88 | 0.618339 |
f3026a064162380d3d6ab8239282d051ca4c6f25 | 3,533 | py | Python | Medium/721.py | Hellofafar/Leetcode | 7a459e9742958e63be8886874904e5ab2489411a | [
"CNRI-Python"
] | 6 | 2017-09-25T18:05:50.000Z | 2019-03-27T00:23:15.000Z | Medium/721.py | Hellofafar/Leetcode | 7a459e9742958e63be8886874904e5ab2489411a | [
"CNRI-Python"
] | 1 | 2017-10-29T12:04:41.000Z | 2018-08-16T18:00:37.000Z | Medium/721.py | Hellofafar/Leetcode | 7a459e9742958e63be8886874904e5ab2489411a | [
"CNRI-Python"
] | null | null | null | # ------------------------------
# 721. Accounts Merge
#
# Description:
# Given a list accounts, each element accounts[i] is a list of strings, where the first
# element accounts[i][0] is a name, and the rest of the elements are emails representing
# emails of the account.
#
# Now, we would like to merge these acco... | 40.609195 | 129 | 0.617039 |
5254875cbdfedf5ffa1ab7132ab63ab9b2f748fb | 117,148 | py | Python | tests/test_api_cache_clearer.py | enterstudio/the-blue-alliance | b53f752fe1f059b4b6f91c841e1865a6c6b81268 | [
"MIT"
] | null | null | null | tests/test_api_cache_clearer.py | enterstudio/the-blue-alliance | b53f752fe1f059b4b6f91c841e1865a6c6b81268 | [
"MIT"
] | null | null | null | tests/test_api_cache_clearer.py | enterstudio/the-blue-alliance | b53f752fe1f059b4b6f91c841e1865a6c6b81268 | [
"MIT"
] | null | null | null | import json
import unittest2
import webtest
import webapp2
from datetime import datetime
from google.appengine.ext import ndb
from google.appengine.ext import deferred
from google.appengine.api import taskqueue
from google.appengine.ext import testbed
import api_main
import tba_config
from consts.award_type import A... | 78.307487 | 157 | 0.778477 |
74f03351c20d4a682fed0b6ba9f1d2e1ac386650 | 678 | py | Python | yatube/yatube/urls.py | Dimanitto/yatube | 1d93d5b90c2a9f7c888ce83eac5acdc4d9ed40e2 | [
"MIT"
] | null | null | null | yatube/yatube/urls.py | Dimanitto/yatube | 1d93d5b90c2a9f7c888ce83eac5acdc4d9ed40e2 | [
"MIT"
] | null | null | null | yatube/yatube/urls.py | Dimanitto/yatube | 1d93d5b90c2a9f7c888ce83eac5acdc4d9ed40e2 | [
"MIT"
] | null | null | null | from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import include, path
urlpatterns = [
path('', include('posts.urls', namespace='posts')),
path('admin/', admin.site.urls),
path('auth/', include('users.urls', namespace='users')),
... | 30.818182 | 61 | 0.712389 |
da0fb022a71a375df57da7605498060263f4c062 | 413 | py | Python | polls/urls.py | elciosato/django_polls | 9d44bf88abc8a26dd66f911329448083d42757f3 | [
"MIT"
] | null | null | null | polls/urls.py | elciosato/django_polls | 9d44bf88abc8a26dd66f911329448083d42757f3 | [
"MIT"
] | 6 | 2021-03-19T02:04:25.000Z | 2021-09-22T18:57:58.000Z | polls/urls.py | elciosato/django_polls | 9d44bf88abc8a26dd66f911329448083d42757f3 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
app_name = 'polls'
urlpatterns = [
# ex: /polls/
path('', views.index, name='index'),
# ex: /polls/5/
path('<int:question_id>/', views.detail, name='detail'),
# ex: /polls/5/vote/
path('<int:question_id>/vote/', views.vote, name='vote'),
# ex... | 27.533333 | 70 | 0.615012 |
4de2be85a4fb82173fd90fec64a5262a4635427b | 2,673 | py | Python | ts_decompose.py | Pu-nk/Offline_pump_scheduling | 13b913a5f530d70ae5fc33d65adc46e74731154a | [
"MIT"
] | null | null | null | ts_decompose.py | Pu-nk/Offline_pump_scheduling | 13b913a5f530d70ae5fc33d65adc46e74731154a | [
"MIT"
] | null | null | null | ts_decompose.py | Pu-nk/Offline_pump_scheduling | 13b913a5f530d70ae5fc33d65adc46e74731154a | [
"MIT"
] | null | null | null | import pywt as wt
import pandas as pd
import matplotlib.pyplot as plt
class wavelet_strcuture(object):
def __init__(self, ts_array, wave_func='db4'):
self.ts_array = ts_array.copy()
self.wave_func = wave_func
self.cA3 = self._ts_decompose()[0]
self.cD3 = self._ts_decompose()[1]
... | 41.123077 | 96 | 0.671904 |
df8648bfe7b1db800d61dde1581b21beb3c9d3cd | 2,162 | py | Python | tests/test_price_account_header.py | superfive666/pyth-client-py | 243298ba3beeae8712a993113ce3f5f792e1e09b | [
"Apache-2.0"
] | 1 | 2022-03-18T04:06:54.000Z | 2022-03-18T04:06:54.000Z | tests/test_price_account_header.py | superfive666/pyth-client-py | 243298ba3beeae8712a993113ce3f5f792e1e09b | [
"Apache-2.0"
] | null | null | null | tests/test_price_account_header.py | superfive666/pyth-client-py | 243298ba3beeae8712a993113ce3f5f792e1e09b | [
"Apache-2.0"
] | null | null | null | import pytest
from pythclient.pythaccounts import PythAccountType, _parse_header
@pytest.fixture
def valid_binary():
"""
magic=0xA1B2C3D4 version=2, type=price, size=16
"""
return bytes([212, 195, 178, 161, 2, 0, 0, 0, 3, 0, 0, 0, 16, 0, 0, 0])
@pytest.fixture
def valid_expected():
return PythA... | 23 | 94 | 0.659112 |
24562f47140ef9f3adad258f9c44eaedde4ca00b | 826 | py | Python | ocp_build_data/migrations/0001_initial.py | adarshtri/art-dashboard-server | c6c61147d49aa43b6e2892ce07d8a115c1478b0c | [
"Apache-2.0"
] | 1 | 2020-09-21T06:48:47.000Z | 2020-09-21T06:48:47.000Z | ocp_build_data/migrations/0001_initial.py | adarshtri/art-dashboard-server | c6c61147d49aa43b6e2892ce07d8a115c1478b0c | [
"Apache-2.0"
] | 5 | 2021-02-05T19:43:08.000Z | 2021-06-04T23:23:29.000Z | ocp_build_data/migrations/0001_initial.py | adarshtri/art-dashboard-server | c6c61147d49aa43b6e2892ce07d8a115c1478b0c | [
"Apache-2.0"
] | 6 | 2021-02-06T07:21:37.000Z | 2021-06-07T12:40:37.000Z | # Generated by Django 3.0.7 on 2020-07-30 04:44
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='OpenShiftCurrentAdvisory',
fields=[
('log_o... | 29.5 | 107 | 0.59201 |
3101ae9c802bb53a02bc7aaf1a5c1f7a65b5e913 | 548 | py | Python | game.py | Mickey758/Python-Game | 0c2b531856f00be387a643daf88598b41dc376c2 | [
"MIT"
] | 2 | 2021-12-25T12:05:59.000Z | 2022-01-08T19:11:18.000Z | game.py | Mickey758/Python-Game | 0c2b531856f00be387a643daf88598b41dc376c2 | [
"MIT"
] | null | null | null | game.py | Mickey758/Python-Game | 0c2b531856f00be387a643daf88598b41dc376c2 | [
"MIT"
] | null | null | null | from variables import player, food, progress
from console.utils import set_title
def title():
set_title(f"Score = {progress.score}")
def update(key):
match key:
case "down":
player.y += 1 if player.y < 29 else 0
case "up":
player.y -= 1 if player.y > 0 else 0
case... | 32.235294 | 49 | 0.54927 |
06611fd83c896c99d425cb552ba31893bc557aec | 68,251 | py | Python | yandex/cloud/ydb/v1/database_service_pb2.py | korsar182/python-sdk | 873bf2a9b136a8f2faae72e86fae1f5b5c3d896a | [
"MIT"
] | 36 | 2018-12-23T13:51:50.000Z | 2022-03-25T07:48:24.000Z | yandex/cloud/ydb/v1/database_service_pb2.py | korsar182/python-sdk | 873bf2a9b136a8f2faae72e86fae1f5b5c3d896a | [
"MIT"
] | 15 | 2019-02-28T04:55:09.000Z | 2022-03-06T23:17:24.000Z | yandex/cloud/ydb/v1/database_service_pb2.py | korsar182/python-sdk | 873bf2a9b136a8f2faae72e86fae1f5b5c3d896a | [
"MIT"
] | 18 | 2019-02-23T07:10:57.000Z | 2022-03-28T14:41:08.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: yandex/cloud/ydb/v1/database_service.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _r... | 51.705303 | 7,309 | 0.778362 |
e2f8befc7c97b67b8bd75b5ec6fe033ab029664c | 2,265 | py | Python | veneer/navigate.py | flowmatters/veneer-py | af551b49038f5f93358b510fb893015c590bf6d4 | [
"0BSD"
] | 7 | 2016-11-14T13:06:40.000Z | 2020-10-13T06:13:51.000Z | veneer/navigate.py | flowmatters/veneer-py | af551b49038f5f93358b510fb893015c590bf6d4 | [
"0BSD"
] | 3 | 2016-11-06T10:22:07.000Z | 2019-05-09T09:55:14.000Z | veneer/navigate.py | flowmatters/veneer-py | af551b49038f5f93358b510fb893015c590bf6d4 | [
"0BSD"
] | 4 | 2016-11-02T00:46:32.000Z | 2020-07-30T03:24:35.000Z | '''
Prototype functionality for interacting with the Source model directly, including tab-completion in IPython/Jupyter. Eg
v = veneer.Veneer()
scenario = Queryable(v)
scenario.Name = 'New Scenario Name'
'''
class Queryable(object):
def __init__(self,v,path='scenario',namespace=None):
self._v = v
... | 28.3125 | 119 | 0.595585 |
3413e5c4c6600514b96261dc9902b8527c09f68c | 600 | py | Python | awards/urls.py | NIelsen-Mudaki/Awwards | 6814a6e3c1cf0d0b68dff21b8e17171bf2bd91d4 | [
"Unlicense"
] | null | null | null | awards/urls.py | NIelsen-Mudaki/Awwards | 6814a6e3c1cf0d0b68dff21b8e17171bf2bd91d4 | [
"Unlicense"
] | null | null | null | awards/urls.py | NIelsen-Mudaki/Awwards | 6814a6e3c1cf0d0b68dff21b8e17171bf2bd91d4 | [
"Unlicense"
] | null | null | null | from django.conf.urls import url,include
from django.conf import settings
from django.conf.urls.static import static
from . import views
urlpatterns=[
url(r'^$',views.welcome,name = 'welcome'),
url(r'accounts/', include('django.contrib.auth.urls')),
url(r'^accounts/', include('registration.backends.simple.... | 40 | 81 | 0.703333 |
ec2d709688a8e3e049722b2e401e36c0f7b0b0b4 | 40,733 | py | Python | scout/server/blueprints/cases/controllers.py | bjhall/scout | ea772cf8d233223e0ec5271f61b95d3afcf719ad | [
"BSD-3-Clause"
] | null | null | null | scout/server/blueprints/cases/controllers.py | bjhall/scout | ea772cf8d233223e0ec5271f61b95d3afcf719ad | [
"BSD-3-Clause"
] | null | null | null | scout/server/blueprints/cases/controllers.py | bjhall/scout | ea772cf8d233223e0ec5271f61b95d3afcf719ad | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import datetime
import itertools
import logging
import os
import query_phenomizer
import requests
from bs4 import BeautifulSoup
from flask import current_app, url_for
from flask_login import current_user
from flask_mail import Message
from xlsxwriter import Workbook
from scout.constants import... | 36.962795 | 146 | 0.626765 |
0f877ada96c534c44c3c89a226e9baa62d6b005b | 2,387 | py | Python | pysc2/agents/myAgent/myAgent_15_BIC_DDPG_2/decisionMaker/level_1/level_1.py | Hotpotfish/pysc2 | 3d7f7ffc01a50ab69d435b65c892cd0bc11265a8 | [
"Apache-2.0"
] | null | null | null | pysc2/agents/myAgent/myAgent_15_BIC_DDPG_2/decisionMaker/level_1/level_1.py | Hotpotfish/pysc2 | 3d7f7ffc01a50ab69d435b65c892cd0bc11265a8 | [
"Apache-2.0"
] | null | null | null | pysc2/agents/myAgent/myAgent_15_BIC_DDPG_2/decisionMaker/level_1/level_1.py | Hotpotfish/pysc2 | 3d7f7ffc01a50ab69d435b65c892cd0bc11265a8 | [
"Apache-2.0"
] | null | null | null | from pysc2.agents.myAgent.myAgent_15_BIC_DDPG_2.config import config
from pysc2.agents.myAgent.myAgent_15_BIC_DDPG_2.decisionMaker.level_1.DQN_for_level_1 import DQN
from pysc2.agents.myAgent.myAgent_15_BIC_DDPG_2.decisionMaker.decision_maker import decision_maker
import pysc2.agents.myAgent.myAgent_15_BIC_DDPG_2.smart... | 55.511628 | 124 | 0.71638 |
6cc15869a6fd1c4225777070bd76e5c58a11220c | 10,704 | py | Python | planet/scripts/util.py | dakcarto/planet-client-python | fc151c29f2f5dd41e183768afab2814c117e7497 | [
"Apache-2.0"
] | null | null | null | planet/scripts/util.py | dakcarto/planet-client-python | fc151c29f2f5dd41e183768afab2814c117e7497 | [
"Apache-2.0"
] | null | null | null | planet/scripts/util.py | dakcarto/planet-client-python | fc151c29f2f5dd41e183768afab2814c117e7497 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Planet Labs, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | 33.45 | 78 | 0.63537 |
3a5ef0ae473daaa1a8153aff9d2c3a07022a3b19 | 6,382 | py | Python | release/scripts/addons/io_mesh_ply/export_ply.py | noorbeast/BlenderSource | 65ebecc5108388965678b04b43463b85f6c69c1d | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 2 | 2019-03-20T13:10:46.000Z | 2019-05-15T20:00:31.000Z | engine/2.80/scripts/addons/io_mesh_ply/export_ply.py | byteinc/Phasor | f7d23a489c2b4bcc3c1961ac955926484ff8b8d9 | [
"Unlicense"
] | null | null | null | engine/2.80/scripts/addons/io_mesh_ply/export_ply.py | byteinc/Phasor | f7d23a489c2b4bcc3c1961ac955926484ff8b8d9 | [
"Unlicense"
] | null | null | null | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | 28.238938 | 76 | 0.573018 |
715788c394886804e8834078fdbe03a0870797e7 | 14,481 | py | Python | delve/pca_layers.py | JustinShenk/delve | 55bec2cf6c7f34971c386de15e005edb91e2a64a | [
"MIT"
] | 3 | 2018-08-19T06:54:19.000Z | 2019-02-26T12:31:17.000Z | delve/pca_layers.py | JustinShenk/delve | 55bec2cf6c7f34971c386de15e005edb91e2a64a | [
"MIT"
] | 6 | 2018-06-14T18:05:58.000Z | 2018-12-27T14:04:05.000Z | delve/pca_layers.py | JustinShenk/delve | 55bec2cf6c7f34971c386de15e005edb91e2a64a | [
"MIT"
] | 3 | 2018-08-23T12:41:06.000Z | 2018-11-29T10:12:30.000Z | from typing import Tuple
import numpy as np
import torch
from torch.nn import Module
from torch.nn.functional import interpolate
from .logger import log
global num
def rvs(dim=3) -> np.ndarray:
"""Create random orthonormal matrix of size ``dim``.
.. note::
Yanked from hpaulj's implementation of S... | 40.225 | 232 | 0.560597 |
1f445feb5a0e101dd54ba153d62cf1379478205f | 22,310 | py | Python | tests/integration/test_storage_s3/test.py | mcspring/ClickHouse | 08f713f177f950c2f675c2c75d1261c91066888c | [
"Apache-2.0"
] | 3 | 2021-03-06T01:52:26.000Z | 2021-10-01T15:13:46.000Z | tests/integration/test_storage_s3/test.py | mcspring/ClickHouse | 08f713f177f950c2f675c2c75d1261c91066888c | [
"Apache-2.0"
] | null | null | null | tests/integration/test_storage_s3/test.py | mcspring/ClickHouse | 08f713f177f950c2f675c2c75d1261c91066888c | [
"Apache-2.0"
] | 1 | 2021-02-20T16:00:52.000Z | 2021-02-20T16:00:52.000Z | import gzip
import json
import logging
import os
import io
import random
import threading
import time
import helpers.client
import pytest
from helpers.cluster import ClickHouseCluster, ClickHouseInstance
logging.getLogger().setLevel(logging.INFO)
logging.getLogger().addHandler(logging.StreamHandler())
# Creates S3 ... | 39.209139 | 155 | 0.603765 |
e0dc7089ed1da621a13a12a1eb40c2b2a41a7d33 | 3,858 | py | Python | test/acceptance/integration/catalog/get_abstract_environment_details/steps.py | hmunfru/fiware-paas | dd808e986f5463dcbb85370b295404f167838ea1 | [
"Apache-2.0"
] | null | null | null | test/acceptance/integration/catalog/get_abstract_environment_details/steps.py | hmunfru/fiware-paas | dd808e986f5463dcbb85370b295404f167838ea1 | [
"Apache-2.0"
] | null | null | null | test/acceptance/integration/catalog/get_abstract_environment_details/steps.py | hmunfru/fiware-paas | dd808e986f5463dcbb85370b295404f167838ea1 | [
"Apache-2.0"
] | 2 | 2016-08-22T16:03:25.000Z | 2018-03-05T23:28:55.000Z | # -*- coding: utf-8 -*-
# Copyright 2014 Telefonica Investigación y Desarrollo, S.A.U
#
# This file is part of FI-WARE project.
#
# 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:
#
# h... | 41.042553 | 99 | 0.77268 |
0927bc831acd81a3356aaddf04eb95d4b4283f5e | 4,438 | py | Python | tests/integration/widgets/test_toggle.py | jeisch/bokeh | 6be4d5ebbec04117f2bb0693fe64dc664f8f1bb1 | [
"BSD-3-Clause"
] | 1 | 2020-03-21T04:11:51.000Z | 2020-03-21T04:11:51.000Z | tests/integration/widgets/test_toggle.py | jeisch/bokeh | 6be4d5ebbec04117f2bb0693fe64dc664f8f1bb1 | [
"BSD-3-Clause"
] | 2 | 2021-05-08T11:43:21.000Z | 2021-05-10T19:16:43.000Z | tests/integration/widgets/test_toggle.py | jeisch/bokeh | 6be4d5ebbec04117f2bb0693fe64dc664f8f1bb1 | [
"BSD-3-Clause"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2017, Anaconda, Inc. All rights reserved.
#
# Powered by the Bokeh Development Team.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#---------------------------------------------------... | 34.403101 | 116 | 0.54822 |
68892d21ec6ae208e5b299a236f2e780e8957752 | 1,142 | py | Python | ext_modules/_maix_nn/example/load_forward_sobel_edge_camera.py | znstj/MaixPy3 | f672b2049b668a5a72ad249933cf9a009760799e | [
"MIT"
] | 93 | 2021-01-12T01:56:06.000Z | 2022-03-30T12:52:01.000Z | ext_modules/_maix_nn/example/load_forward_sobel_edge_camera.py | JasperG1998/MaixPy3 | b36800b8d6aebf55018894c215c23a73d2fe406d | [
"MIT"
] | 29 | 2021-02-04T10:37:26.000Z | 2022-03-20T15:10:55.000Z | ext_modules/_maix_nn/example/load_forward_sobel_edge_camera.py | JasperG1998/MaixPy3 | b36800b8d6aebf55018894c215c23a73d2fe406d | [
"MIT"
] | 25 | 2021-01-25T18:10:09.000Z | 2022-03-31T13:55:36.000Z | from maix import nn
from PIL import Image, ImageDraw
import numpy as np
import time
from maix import display, camera
camera.config(size=(224, 224))
model = {
"param": "/root/models/sobel_int8.param",
"bin": "/root/models/sobel_int8.bin"
}
input_size = (224, 224, 3)
output_size = (222, 222, 3)
options = {
... | 23.791667 | 58 | 0.600701 |
f9d8bb640c32d2a7a807d931f7028bf57171d837 | 12,296 | py | Python | tests/components/sensor/test_device_condition.py | ymanton/home-assistant | 274cf232692396a6f0359a45d949ff94b681af52 | [
"Apache-2.0"
] | 5 | 2020-09-17T10:48:51.000Z | 2021-11-22T00:08:17.000Z | tests/components/sensor/test_device_condition.py | ymanton/home-assistant | 274cf232692396a6f0359a45d949ff94b681af52 | [
"Apache-2.0"
] | 9 | 2022-01-27T06:32:10.000Z | 2022-03-31T07:07:51.000Z | tests/components/sensor/test_device_condition.py | ymanton/home-assistant | 274cf232692396a6f0359a45d949ff94b681af52 | [
"Apache-2.0"
] | 2 | 2020-12-09T02:21:27.000Z | 2021-08-07T04:58:01.000Z | """The test for sensor device automation."""
import pytest
import homeassistant.components.automation as automation
from homeassistant.components.sensor import DOMAIN
from homeassistant.components.sensor.device_condition import ENTITY_CONDITIONS
from homeassistant.const import CONF_PLATFORM, STATE_UNKNOWN
from homeass... | 33.142857 | 87 | 0.557092 |
8ebe5b2741b77537b46b8057d9aa9c36dc99aeec | 17,952 | py | Python | ppocr/postprocess/rec_postprocess.py | maxberezov/PaddleOCR | 5ecd1447ad80b1e22a0126ce8bc845ffcd5ae773 | [
"Apache-2.0"
] | 2 | 2021-08-11T03:49:31.000Z | 2021-08-11T03:50:32.000Z | ppocr/postprocess/rec_postprocess.py | maxberezov/PaddleOCR | 5ecd1447ad80b1e22a0126ce8bc845ffcd5ae773 | [
"Apache-2.0"
] | 1 | 2021-07-19T10:41:33.000Z | 2021-07-19T13:38:34.000Z | ppocr/postprocess/rec_postprocess.py | maxberezov/PaddleOCR | 5ecd1447ad80b1e22a0126ce8bc845ffcd5ae773 | [
"Apache-2.0"
] | 1 | 2021-09-08T08:01:24.000Z | 2021-09-08T08:01:24.000Z | # copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 39.282276 | 126 | 0.575925 |
b5868a1a0eb89b66e805111fcce4058d00366d34 | 11,725 | py | Python | basetrainer/pruning/nni_pruning.py | PanJinquan/pytorch-base-trainer | 37799c948f72b2f9d3771ff469e06cdbff4a1d07 | [
"MIT"
] | 11 | 2022-01-18T10:07:52.000Z | 2022-03-16T02:40:31.000Z | basetrainer/pruning/nni_pruning.py | PanJinquan/pytorch-base-trainer | 37799c948f72b2f9d3771ff469e06cdbff4a1d07 | [
"MIT"
] | null | null | null | basetrainer/pruning/nni_pruning.py | PanJinquan/pytorch-base-trainer | 37799c948f72b2f9d3771ff469e06cdbff4a1d07 | [
"MIT"
] | 1 | 2022-01-26T06:31:29.000Z | 2022-01-26T06:31:29.000Z | # -*-coding: utf-8 -*-
"""
@Author : panjq
@E-mail : pan_jinquan@163.com
@Date : 2021-12-09 19:16:19
"""
import os
import copy
import torch
import torch.nn as nn
import torch.onnx
import torch.nn.functional as F
from nni.compression.pytorch.utils.counter import count_flops_params
from nni.compression.pyto... | 44.078947 | 119 | 0.640256 |
da64d5599ffc0cd156084f86fe521e5a3f4482ee | 5,519 | py | Python | tensorcv/experiment/experiment_spec.py | afcarl/tensorcv | 6545a48722dafb5c1cead3ed4f810ebcbef2c597 | [
"MIT"
] | 1 | 2019-04-22T16:37:36.000Z | 2019-04-22T16:37:36.000Z | tensorcv/experiment/experiment_spec.py | afcarl/tensorcv | 6545a48722dafb5c1cead3ed4f810ebcbef2c597 | [
"MIT"
] | null | null | null | tensorcv/experiment/experiment_spec.py | afcarl/tensorcv | 6545a48722dafb5c1cead3ed4f810ebcbef2c597 | [
"MIT"
] | null | null | null | import os
import json
from configparser import ConfigParser, ExtendedInterpolation
class ExperimentSpec(object):
def __init__(self, config_path):
assert os.path.exists(config_path), '{} not exists.'.format(config_path)
self.config = ConfigParser(
delimiters='=',
interpolatio... | 28.595855 | 83 | 0.633629 |
ea3604bbd8fab7946db1572dc0454d77187e2125 | 10,206 | py | Python | scan.py | boost/bucket-antivirus-function | 6eb93406e28f81a4c612f0dec29670451e0c5589 | [
"Apache-2.0"
] | null | null | null | scan.py | boost/bucket-antivirus-function | 6eb93406e28f81a4c612f0dec29670451e0c5589 | [
"Apache-2.0"
] | null | null | null | scan.py | boost/bucket-antivirus-function | 6eb93406e28f81a4c612f0dec29670451e0c5589 | [
"Apache-2.0"
] | 1 | 2020-07-16T12:47:24.000Z | 2020-07-16T12:47:24.000Z | # -*- coding: utf-8 -*-
# Upside Travel, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 35.193103 | 100 | 0.682932 |
aa7e60ec7b058e42ac43d6738ad9551b078a3702 | 1,961 | py | Python | files/programs/Chungle.py | ArezalGame89/ChungOS | 62c45a6ab80712d8a863fa9604d3e6519e7e04d1 | [
"MIT"
] | null | null | null | files/programs/Chungle.py | ArezalGame89/ChungOS | 62c45a6ab80712d8a863fa9604d3e6519e7e04d1 | [
"MIT"
] | 1 | 2022-02-20T15:07:17.000Z | 2022-02-20T15:08:11.000Z | files/programs/Chungle.py | ArezalGame89/ChungOS | 62c45a6ab80712d8a863fa9604d3e6519e7e04d1 | [
"MIT"
] | null | null | null | import sys
from PyQt5.QtWidgets import *
from PyQt5.QtWebEngineWidgets import *
from PyQt5.QtCore import *
class MainWindow(QMainWindow):
def __init__(self):
super(MainWindow, self).__init__()
self.browser = QWebEngineView()
self.browser.setU... | 44.568182 | 71 | 0.515043 |
2c82daa106423a89d59dfe63c1b36cb4f9ab02c2 | 275 | py | Python | src/11/simple_authentication_of_clients/client.py | tuanavu/python-gitbook | 948a05e065b0f40afbfd22f697dff16238163cde | [
"MIT"
] | 14 | 2017-05-20T04:06:46.000Z | 2022-01-23T06:48:45.000Z | src/11/simple_authentication_of_clients/client.py | tuanavu/python-gitbook | 948a05e065b0f40afbfd22f697dff16238163cde | [
"MIT"
] | 1 | 2021-06-10T20:17:55.000Z | 2021-06-10T20:17:55.000Z | src/11/simple_authentication_of_clients/client.py | tuanavu/python-gitbook | 948a05e065b0f40afbfd22f697dff16238163cde | [
"MIT"
] | 15 | 2017-03-29T17:57:33.000Z | 2021-08-24T02:20:08.000Z | from socket import socket, AF_INET, SOCK_STREAM
from auth import client_authenticate
secret_key = b'peekaboo'
s = socket(AF_INET, SOCK_STREAM)
s.connect(('localhost', 18000))
client_authenticate(s, secret_key)
s.send(b'Hello World')
resp = s.recv(1024)
print('Got:', resp)
| 22.916667 | 47 | 0.763636 |
de3e06e3f9a2d0cacc1a74e9f6b98371f4a1fa52 | 1,680 | py | Python | test/functional/feature_blocksdir.py | patentcoin/patentcoin | 5dd4ba6cf18946be6be0f564952a55358c81fe95 | [
"MIT"
] | 1 | 2021-12-11T19:14:32.000Z | 2021-12-11T19:14:32.000Z | test/functional/feature_blocksdir.py | Cryptogits/patentcoin | 5dd4ba6cf18946be6be0f564952a55358c81fe95 | [
"MIT"
] | null | null | null | test/functional/feature_blocksdir.py | Cryptogits/patentcoin | 5dd4ba6cf18946be6be0f564952a55358c81fe95 | [
"MIT"
] | 2 | 2020-06-27T10:26:01.000Z | 2021-12-11T15:33:50.000Z | #!/usr/bin/env python3
# Copyright (c) 2018-2019 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 the blocksdir option.
"""
import os
import shutil
from test_framework.test_framework import Pate... | 43.076923 | 167 | 0.704167 |
87c01afcd8ba8eb6a6f92139952ede0a633c53b1 | 6,915 | py | Python | backend/test_2_29699/settings.py | crowdbotics-apps/test-2-29699 | 985498b8dd29302ef219edbd95b7766a7f57622a | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/test_2_29699/settings.py | crowdbotics-apps/test-2-29699 | 985498b8dd29302ef219edbd95b7766a7f57622a | [
"FTL",
"AML",
"RSA-MD"
] | 29 | 2021-08-15T22:23:51.000Z | 2022-03-13T17:39:18.000Z | backend/test_2_29699/settings.py | crowdbotics-apps/test-2-29699 | 985498b8dd29302ef219edbd95b7766a7f57622a | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """
Django settings for test_2_29699 project.
Generated by 'django-admin startproject' using Django 2.2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import ... | 29.551282 | 112 | 0.730441 |
b06ffa1c4f2d8b7d26f684635663410cc43278e6 | 7,365 | py | Python | ee/clickhouse/queries/event_query.py | rightlyip/posthog | c00ad7a2b02df68930ca332675fc04ce4ed83a60 | [
"MIT"
] | null | null | null | ee/clickhouse/queries/event_query.py | rightlyip/posthog | c00ad7a2b02df68930ca332675fc04ce4ed83a60 | [
"MIT"
] | null | null | null | ee/clickhouse/queries/event_query.py | rightlyip/posthog | c00ad7a2b02df68930ca332675fc04ce4ed83a60 | [
"MIT"
] | null | null | null | from abc import ABCMeta, abstractmethod
from typing import Any, Dict, List, Tuple, Union
from ee.clickhouse.materialized_columns.columns import ColumnName
from ee.clickhouse.models.cohort import format_person_query, format_precalculated_cohort_query, is_precalculated_query
from ee.clickhouse.models.property import get... | 39.175532 | 118 | 0.670468 |
cd2ffca9e92a676c7372d0529e65f4813f91beb3 | 2,967 | py | Python | gyro.py | martyni/astro_bird | 2d6fb8a2071f9a89700af6ddb9bee8925139bfba | [
"MIT"
] | null | null | null | gyro.py | martyni/astro_bird | 2d6fb8a2071f9a89700af6ddb9bee8925139bfba | [
"MIT"
] | null | null | null | gyro.py | martyni/astro_bird | 2d6fb8a2071f9a89700af6ddb9bee8925139bfba | [
"MIT"
] | null | null | null | from sense_hat import SenseHat
from random import choice
import time
GREEN = (0, 255, 0)
YELLOW = (255, 255, 0)
BLUE = (0, 0, 255)
RED = (255, 0, 0)
WHITE = (255,255,255)
NOTHING = (0,0,0)
PINK = (255,105, 180)
class Screen(object):
def __init__(self, width=8, height=8):
self.s = SenseHat()
self.s.low_light... | 26.256637 | 124 | 0.61847 |
8e91a64535e50e749981bf8fa4041c02fa020d58 | 891 | py | Python | test/test_v1_load_balancer_ingress.py | RyanSiu1995/argocd-python-client | 2e8f097fe09f247a46ac70692241a93d1acd076a | [
"MIT"
] | 1 | 2021-11-20T13:37:43.000Z | 2021-11-20T13:37:43.000Z | test/test_v1_load_balancer_ingress.py | RyanSiu1995/argocd-python-client | 2e8f097fe09f247a46ac70692241a93d1acd076a | [
"MIT"
] | null | null | null | test/test_v1_load_balancer_ingress.py | RyanSiu1995/argocd-python-client | 2e8f097fe09f247a46ac70692241a93d1acd076a | [
"MIT"
] | null | null | null | """
Consolidate Services
Description of all APIs # noqa: E501
The version of the OpenAPI document: version not set
Generated by: https://openapi-generator.tech
"""
import sys
import unittest
import argocd_python_client
from argocd_python_client.model.v1_port_status import V1PortStatus
globals()['V... | 23.447368 | 85 | 0.72615 |
68c79f1e9c929a054f88178ac359e3e4c1d48169 | 143 | py | Python | codewars/8kyu/doha22/kata8/getting_age/getting_age.py | doha22/Training_one | 0cd7cf86c7da0f6175834146296b763d1841766b | [
"MIT"
] | null | null | null | codewars/8kyu/doha22/kata8/getting_age/getting_age.py | doha22/Training_one | 0cd7cf86c7da0f6175834146296b763d1841766b | [
"MIT"
] | 2 | 2019-01-22T10:53:42.000Z | 2019-01-31T08:02:48.000Z | codewars/8kyu/doha22/kata8/getting_age/getting_age.py | doha22/Training_one | 0cd7cf86c7da0f6175834146296b763d1841766b | [
"MIT"
] | 13 | 2019-01-22T10:37:42.000Z | 2019-01-25T13:30:43.000Z | def get_age(age):
for s in age.split():
if s.isdigit():
return int(s)
def get_age2(age):
return int(age[0])
| 14.3 | 26 | 0.517483 |
91514cd1e001a7f9d61afe68e13dc624c37c4b2a | 48,882 | py | Python | test/test_exception_scope.py | pdeardorff-r7/vm-console-client-python | 4bee83aa4db2b328ba6894cebac55743f922ce5a | [
"MIT"
] | null | null | null | test/test_exception_scope.py | pdeardorff-r7/vm-console-client-python | 4bee83aa4db2b328ba6894cebac55743f922ce5a | [
"MIT"
] | null | null | null | test/test_exception_scope.py | pdeardorff-r7/vm-console-client-python | 4bee83aa4db2b328ba6894cebac55743f922ce5a | [
"MIT"
] | null | null | null | # coding: utf-8
"""
InsightVM API
# Overview This guide documents the InsightVM Application Programming Interface (API) Version 3. This API supports the Representation State Transfer (REST) design pattern. Unless noted otherwise this API accepts and produces the `application/json` media type. This API uses ... | 1,192.243902 | 48,043 | 0.490303 |
9ee977281904c3a63b825f00a4d85a7cd762110c | 917 | py | Python | backend/database/settings/development.py | JMSoler7/database | b90326a8f3929d1bad9a810fcbe91d9bb2c3d5f4 | [
"MIT"
] | null | null | null | backend/database/settings/development.py | JMSoler7/database | b90326a8f3929d1bad9a810fcbe91d9bb2c3d5f4 | [
"MIT"
] | null | null | null | backend/database/settings/development.py | JMSoler7/database | b90326a8f3929d1bad9a810fcbe91d9bb2c3d5f4 | [
"MIT"
] | null | null | null | import os
from database.settings.common import * # NOQA F401,F403
from database.settings.common import SITE_PACKAGE_NAME
from database.settings.common import BASE_DIR
from database.settings.common import INSTALLED_APPS
from database.settings.common import MIDDLEWARE
from database.settings.common import LOGGING
from d... | 33.962963 | 67 | 0.76663 |
d57eb15ea86195774d84437c0cc542fe5ba507ea | 511 | py | Python | vtcff/_codec_avc.py | rtmigo/vtcff_py | e26a5e55ea455b10995932dccd319c1f7fc28385 | [
"MIT"
] | null | null | null | vtcff/_codec_avc.py | rtmigo/vtcff_py | e26a5e55ea455b10995932dccd319c1f7fc28385 | [
"MIT"
] | null | null | null | vtcff/_codec_avc.py | rtmigo/vtcff_py | e26a5e55ea455b10995932dccd319c1f7fc28385 | [
"MIT"
] | null | null | null | # SPDX-FileCopyrightText: (c) 2021 Artёm IG <github.com/rtmigo>
# SPDX-License-Identifier: MIT
from typing import Optional, Iterable, Tuple
from ._codec import VideoCodec
from ._codec_avc_preset import VcPreset
class Avc(VideoCodec):
def __init__(self, preset: VcPreset = None):
self.preset: Optional[VcP... | 26.894737 | 63 | 0.686888 |
2d05b0a21007de064483c38cdab66625ccea36cb | 579 | py | Python | opentmi_client/utils/__init__.py | OpenTMI/opentmi-pyclient | 034c539d36fe13a2d6538ea421e4c01f00f5687d | [
"MIT"
] | null | null | null | opentmi_client/utils/__init__.py | OpenTMI/opentmi-pyclient | 034c539d36fe13a2d6538ea421e4c01f00f5687d | [
"MIT"
] | 36 | 2018-06-18T10:03:58.000Z | 2022-03-30T00:16:31.000Z | opentmi_client/utils/__init__.py | OpenTMI/opentmi-pyclient | 034c539d36fe13a2d6538ea421e4c01f00f5687d | [
"MIT"
] | 1 | 2019-04-17T08:49:24.000Z | 2019-04-17T08:49:24.000Z | """
Collect all utils API's
"""
from opentmi_client.utils.tools import is_object_id
from opentmi_client.utils.tools import resolve_host, resolve_token
from opentmi_client.utils.tools import archive_files
from opentmi_client.utils.tools import remove_empty_from_dict
from opentmi_client.utils.logger import get_logger
fro... | 44.538462 | 76 | 0.870466 |
e5ebb4bea71ef32e49e516fd60e6e56c20cd5fd1 | 383 | py | Python | test/test_processor.py | eurotech/prom2teams | 8554be07071518e7a736f0d0d7a974b97a1061c5 | [
"MIT"
] | null | null | null | test/test_processor.py | eurotech/prom2teams | 8554be07071518e7a736f0d0d7a974b97a1061c5 | [
"MIT"
] | null | null | null | test/test_processor.py | eurotech/prom2teams | 8554be07071518e7a736f0d0d7a974b97a1061c5 | [
"MIT"
] | null | null | null | import prom2teams.processor
def test_processor():
with open("test/test_processor/template.j2", 'r') as template_file:
template = template_file.read()
processor = prom2teams.processor.Processor(template, ["http://localhost:18080/"])
with open("test/test_processor/alert.json", 'r') as alert_file:
... | 29.461538 | 85 | 0.704961 |
a0c6a3e6d5889f217418c2a238fa431257825fd6 | 7,638 | py | Python | IPython/kernel/client.py | chebee7i/ipython | 85b169fa3afc3d374973295c7f1409ededddbaca | [
"BSD-3-Clause-Clear"
] | 26 | 2018-02-14T23:52:58.000Z | 2021-08-16T13:50:03.000Z | IPython/kernel/client.py | chebee7i/ipython | 85b169fa3afc3d374973295c7f1409ededddbaca | [
"BSD-3-Clause-Clear"
] | null | null | null | IPython/kernel/client.py | chebee7i/ipython | 85b169fa3afc3d374973295c7f1409ededddbaca | [
"BSD-3-Clause-Clear"
] | 10 | 2018-08-13T19:38:39.000Z | 2020-04-19T03:02:00.000Z | """Base class to manage the interaction with a running kernel
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2013 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of t... | 36.898551 | 81 | 0.569259 |
1ef52dda36be3c428e8e73130f9cf7914e738d8b | 37,443 | py | Python | flytekit/core/promise.py | latchbio/flaightkit | 365e339cea21965680a9252b91085f6a5c3207d5 | [
"Apache-2.0"
] | null | null | null | flytekit/core/promise.py | latchbio/flaightkit | 365e339cea21965680a9252b91085f6a5c3207d5 | [
"Apache-2.0"
] | null | null | null | flytekit/core/promise.py | latchbio/flaightkit | 365e339cea21965680a9252b91085f6a5c3207d5 | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
import collections
import dataclasses
import typing
from enum import Enum
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Protocol
from flytekit.common import constants as _common_constants
from flytekit.common.exceptions import user as _use... | 40.218045 | 120 | 0.660257 |
ea87d07a557ceafc0a1084e64399446a45e55ae1 | 1,918 | py | Python | vscode/extensions/ms-python.python-2020.2.64397/pythonFiles/lib/python/new_ptvsd/no_wheels/ptvsd/server/options.py | Adespinoza/dotfiles | e2509402a7fd2623a3ea401b6f9fcbf6a372fc60 | [
"CC0-1.0"
] | null | null | null | vscode/extensions/ms-python.python-2020.2.64397/pythonFiles/lib/python/new_ptvsd/no_wheels/ptvsd/server/options.py | Adespinoza/dotfiles | e2509402a7fd2623a3ea401b6f9fcbf6a372fc60 | [
"CC0-1.0"
] | 8 | 2020-07-19T23:39:31.000Z | 2022-02-27T01:38:46.000Z | vscode/extensions/ms-python.python-2020.2.64397/pythonFiles/lib/python/new_ptvsd/wheels/ptvsd/server/options.py | Adespinoza/dotfiles | e2509402a7fd2623a3ea401b6f9fcbf6a372fc60 | [
"CC0-1.0"
] | null | null | null | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See LICENSE in the project root
# for license information.
from __future__ import absolute_import, division, print_function, unicode_literals
"""Global server options that are set via command line, environment variable... | 33.068966 | 93 | 0.73097 |
2ff26365e68a68eda44c728b29962e4d0f90a546 | 1,067 | py | Python | test_remove_duplicate_letter.py | brigitteunger/katas | 3f9af88fe5d98753360457084741f573c863dc25 | [
"MIT"
] | null | null | null | test_remove_duplicate_letter.py | brigitteunger/katas | 3f9af88fe5d98753360457084741f573c863dc25 | [
"MIT"
] | null | null | null | test_remove_duplicate_letter.py | brigitteunger/katas | 3f9af88fe5d98753360457084741f573c863dc25 | [
"MIT"
] | null | null | null | import unittest
import string
from collections import Counter
class Solution:
def removeDuplicateLetters(self, s: str) -> str:
stack = []
counter = Counter(s)
visited = {key: False for key in counter.keys()}
for letter in s:
counter[letter] -= 1
if visited[... | 23.711111 | 74 | 0.585754 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.