hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dcfe16c4b74a57b1beb9083467221ccbce12c23d | 6,009 | py | Python | test/functional/zmq_test.py | cashgoldcoin/cashgoldcoin | ec774b51a09379d2b9d16aaca6edc7e3661a64ab | [
"MIT"
] | null | null | null | test/functional/zmq_test.py | cashgoldcoin/cashgoldcoin | ec774b51a09379d2b9d16aaca6edc7e3661a64ab | [
"MIT"
] | null | null | null | test/functional/zmq_test.py | cashgoldcoin/cashgoldcoin | ec774b51a09379d2b9d16aaca6edc7e3661a64ab | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2016 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 ZMQ API."""
import configparser
import os
import struct
from test_framework.test_framework im... | 39.019481 | 123 | 0.611416 |
92812e3681e17b20508bee1f1259ea2ba50da2d5 | 595 | py | Python | 3007/aula3.py | viniciuSSimizu/linguagem_e_programacao_II | 5e50aee361a9599ed40aab78c2f1c51514882be2 | [
"MIT"
] | null | null | null | 3007/aula3.py | viniciuSSimizu/linguagem_e_programacao_II | 5e50aee361a9599ed40aab78c2f1c51514882be2 | [
"MIT"
] | null | null | null | 3007/aula3.py | viniciuSSimizu/linguagem_e_programacao_II | 5e50aee361a9599ed40aab78c2f1c51514882be2 | [
"MIT"
] | null | null | null | '''
import os
os.system("cls") # Limpa o prompt
os.system("notepad") # Abre o bloco de notas
valor = abs(int(input("Qual a sua idade? ")))
if valor < 18:
print("Você foi hackeado pelo pedro quebrador de códigos\nPERDEU HAHAHHAHAHAHHAH%c" % (chr(33)))
elif valor > 18:
print("Seu estrato bancario foi ... | 25.869565 | 101 | 0.613445 |
0cad7087dfa0885afa8d89b5778818dcaa02cf14 | 2,817 | py | Python | sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_input.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_input.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_input.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 46.95 | 107 | 0.698616 |
67591114f4e2aa83d6b843590e8ba87ccd7e5dc3 | 7,192 | py | Python | Machine_learning_model/top_k_expt.py | HPCCS/PARIS | a245b3c9ea201a098329b1d2c52c825286a4199a | [
"MIT"
] | null | null | null | Machine_learning_model/top_k_expt.py | HPCCS/PARIS | a245b3c9ea201a098329b1d2c52c825286a4199a | [
"MIT"
] | null | null | null | Machine_learning_model/top_k_expt.py | HPCCS/PARIS | a245b3c9ea201a098329b1d2c52c825286a4199a | [
"MIT"
] | null | null | null | import pdb
import csv
import numpy as np
from numpy import linalg as LA
from scipy import stats
import matplotlib.pyplot as plt
from sklearn.model_selection import GridSearchCV
from sklearn.model_selection import RandomizedSearchCV
from sklearn import linear_model
from sklearn.kernel_ridge import KernelRidge
from skle... | 47.629139 | 153 | 0.71371 |
da0c7007f22be4ec1dbe38e69b3b94a74cbc3a61 | 339 | py | Python | tests/test_reproducer.py | mbukatov/tox-sitepackages-reproducer | 91fe327f5f8d725f70f24598540577f02e9fd559 | [
"Apache-2.0"
] | null | null | null | tests/test_reproducer.py | mbukatov/tox-sitepackages-reproducer | 91fe327f5f8d725f70f24598540577f02e9fd559 | [
"Apache-2.0"
] | null | null | null | tests/test_reproducer.py | mbukatov/tox-sitepackages-reproducer | 91fe327f5f8d725f70f24598540577f02e9fd559 | [
"Apache-2.0"
] | null | null | null | import reproducer.const
def test_one():
assert reproducer.const.ONE == 1
def test_two():
assert reproducer.const.TWO == 2
def test_import_lxml():
import lxml
assert lxml.__file__.startswith("/usr/lib64")
def test_import_kernelconfig():
import kernelconfig
assert "/.tox/python/lib" in ker... | 16.95 | 54 | 0.716814 |
412b3cca24f2a0bfde000b796b3c79d03d34f67e | 311 | py | Python | synalgo/interfaces/__init__.py | aimakerspace/synergos_algorithm | 9d07fa10ae78c0da5ad0415c58230b9712642134 | [
"Apache-2.0"
] | 2 | 2021-11-02T01:53:15.000Z | 2021-12-04T13:34:36.000Z | synalgo/interfaces/__init__.py | aimakerspace/synergos_algorithm | 9d07fa10ae78c0da5ad0415c58230b9712642134 | [
"Apache-2.0"
] | null | null | null | synalgo/interfaces/__init__.py | aimakerspace/synergos_algorithm | 9d07fa10ae78c0da5ad0415c58230b9712642134 | [
"Apache-2.0"
] | 1 | 2022-01-21T01:05:26.000Z | 2022-01-21T01:05:26.000Z | #!/usr/bin/env python
####################
# Required Modules #
####################
# Generic/Built-in
# Libs
# Custom
##################
# Configurations #
##################
from .arguments import Arguments
from .early_stopping import EarlyStopping
from .model import Model #ModelPlan | 16.368421 | 42 | 0.5209 |
2e2f4efe38b9d877596582a5bc53a90202921a7c | 407 | py | Python | aulas/aula04/aula04.py | joao-vitor-viera-rodacki/SQLlite | 8d43c4b80e65f3e7aae3e83a448e8de3593c5deb | [
"MIT"
] | null | null | null | aulas/aula04/aula04.py | joao-vitor-viera-rodacki/SQLlite | 8d43c4b80e65f3e7aae3e83a448e8de3593c5deb | [
"MIT"
] | null | null | null | aulas/aula04/aula04.py | joao-vitor-viera-rodacki/SQLlite | 8d43c4b80e65f3e7aae3e83a448e8de3593c5deb | [
"MIT"
] | null | null | null | import sqlite3 as sq
banco = sq.connect('database.db')
cursor = banco.cursor()
#cursor.execute('CREATE TABLE pessoas (nome text, idade integer, email text)')
#cursor.execute('INSERT INTO pessoas VALUES("joao",12,"text@gmail.com")')
sql = 'SELECT * FROM pessoas WHERE nome = ?'
def red (palavra):
for row in curso... | 21.421053 | 78 | 0.685504 |
87886ac324f48357ef7a3de14ccc031cdc86ac11 | 13,421 | py | Python | graphic_plot.py | Marco-Frattini/Comfort_measurement_system | f4487e420d60dbc5ebcdd9bf9669f5488f7e93d7 | [
"MIT"
] | null | null | null | graphic_plot.py | Marco-Frattini/Comfort_measurement_system | f4487e420d60dbc5ebcdd9bf9669f5488f7e93d7 | [
"MIT"
] | null | null | null | graphic_plot.py | Marco-Frattini/Comfort_measurement_system | f4487e420d60dbc5ebcdd9bf9669f5488f7e93d7 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import plotly.graph_objects as go
import plotly.io as pio
import scipy.fftpack
from scipy import signal
from plotly.subplots import make_subplots
import random
import os
class PlotAcc:
def __init__(self,
samp=0.005,
t=200,
... | 38.01983 | 145 | 0.489308 |
b94ef2873f6e780cf3f312e6992eb6b60b2457b6 | 9,734 | py | Python | raiden/tests/unit/test_version_check.py | yahgwai/raiden | a76809872468890d7f2a66b293876aff93b6ea97 | [
"MIT"
] | null | null | null | raiden/tests/unit/test_version_check.py | yahgwai/raiden | a76809872468890d7f2a66b293876aff93b6ea97 | [
"MIT"
] | null | null | null | raiden/tests/unit/test_version_check.py | yahgwai/raiden | a76809872468890d7f2a66b293876aff93b6ea97 | [
"MIT"
] | 4 | 2019-01-24T14:45:06.000Z | 2019-04-01T16:12:40.000Z | import json
import re
from unittest.mock import patch
import requests
from pkg_resources import parse_version
from raiden.tasks import SECURITY_EXPRESSION, _do_check_version
LATEST_RELEASE_RESPONSE = """{"url":
"https://api.github.com/repos/raiden-network/raiden/releases/14541434",
"assets_ur... | 50.963351 | 110 | 0.613417 |
218b319dbcec62b9ecbeb460b02dcda7a371f215 | 11,885 | py | Python | xonsh/diff_history.py | stefb965/gitsome | a6a396411470f4a35420357c9f88e2ea62efff5c | [
"Apache-2.0"
] | 3 | 2016-11-08T08:56:02.000Z | 2021-04-11T14:23:14.000Z | xonsh/diff_history.py | batermj/gitsome | 77f599ef8b84336afc0a3d6525365da18cd510d8 | [
"Apache-2.0"
] | null | null | null | xonsh/diff_history.py | batermj/gitsome | 77f599ef8b84336afc0a3d6525365da18cd510d8 | [
"Apache-2.0"
] | 1 | 2017-08-10T08:26:29.000Z | 2017-08-10T08:26:29.000Z | """Tools for diff'ing two xonsh history files in a meaningful fashion."""
from datetime import datetime
from itertools import zip_longest
from difflib import SequenceMatcher
from xonsh import lazyjson
from xonsh.tools import TERM_COLORS
NO_COLOR = TERM_COLORS['NO_COLOR'].replace('\001', '').replace('\002', '')
RED = ... | 37.971246 | 89 | 0.526294 |
32ceecd04f42338e71c748f19d1a217a606db3f2 | 6,213 | py | Python | tests/integration/api_test.py | vijaykilari/docker-py | cdec9d38a0db0767e5165a012b0ad95c689f1441 | [
"Apache-2.0"
] | null | null | null | tests/integration/api_test.py | vijaykilari/docker-py | cdec9d38a0db0767e5165a012b0ad95c689f1441 | [
"Apache-2.0"
] | null | null | null | tests/integration/api_test.py | vijaykilari/docker-py | cdec9d38a0db0767e5165a012b0ad95c689f1441 | [
"Apache-2.0"
] | null | null | null | import base64
import os
import tempfile
import time
import unittest
import warnings
import docker
from .. import helpers
class InformationTest(helpers.BaseTestCase):
def test_version(self):
res = self.client.version()
self.assertIn('GoVersion', res)
self.assertIn('Version', res)
... | 35.101695 | 79 | 0.6216 |
1f88598f9f45eebf08b6b31eb8d3b3525ea8ed9e | 933 | py | Python | users/migrations/0018_auto_20210407_0900.py | OlexandrTopuzov/Data_converter | 0ac2319ccaae790af35ab2202724c65d83d32ecc | [
"MIT"
] | null | null | null | users/migrations/0018_auto_20210407_0900.py | OlexandrTopuzov/Data_converter | 0ac2319ccaae790af35ab2202724c65d83d32ecc | [
"MIT"
] | null | null | null | users/migrations/0018_auto_20210407_0900.py | OlexandrTopuzov/Data_converter | 0ac2319ccaae790af35ab2202724c65d83d32ecc | [
"MIT"
] | null | null | null | # Generated by Django 3.1.7 on 2021-04-07 09:00
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0017_auto_20210330_1650'),
]
operations = [
migrations.AlterField(
model_name='candidateu... | 37.32 | 361 | 0.655949 |
e3e12ca7c70bfc0d65b0169643847465950791dd | 416 | py | Python | exercicios-turtle/.history/flower_20210624115651.py | Aleff13/poo-ufsc | bc1574df26f840a3c0fd5b1e0c72e5d69f61493d | [
"MIT"
] | 1 | 2021-11-28T18:49:21.000Z | 2021-11-28T18:49:21.000Z | exercicios-turtle/.history/flower_20210624115651.py | Aleff13/poo-ufsc | bc1574df26f840a3c0fd5b1e0c72e5d69f61493d | [
"MIT"
] | null | null | null | exercicios-turtle/.history/flower_20210624115651.py | Aleff13/poo-ufsc | bc1574df26f840a3c0fd5b1e0c72e5d69f61493d | [
"MIT"
] | null | null | null | import turtle
tortuguita = turtle.Turtle()
tortuguita.color('blue')
tortuguita.speed(100)
for i in range (18):
tortuguita.circle(200,100)
tortuguita.left(110)
tortuguita.up()
tortuguita.left(35)
tortuguita.forward(160)
tortuguita.down()
tortuguita.dot(70,"black")
tortuguita.left(60)
tortuguita.up()
tortugui... | 16.64 | 30 | 0.754808 |
01833ba2267328ea37291cdb8f82b0356fb73478 | 38,257 | py | Python | zerver/decorator.py | DD2480-group7-2020/zulip | 9a1e18bcf383c38c35da168563a7345768c6d784 | [
"Apache-2.0"
] | 1 | 2020-02-28T11:26:19.000Z | 2020-02-28T11:26:19.000Z | zerver/decorator.py | DD2480-group7-2020/zulip | 9a1e18bcf383c38c35da168563a7345768c6d784 | [
"Apache-2.0"
] | null | null | null | zerver/decorator.py | DD2480-group7-2020/zulip | 9a1e18bcf383c38c35da168563a7345768c6d784 | [
"Apache-2.0"
] | null | null | null | import django_otp
from two_factor.utils import default_device
from django_otp import user_has_device
from django.contrib.auth.decorators import user_passes_test as django_user_passes_test
from django.contrib.auth.models import AnonymousUser
from django.utils.translation import ugettext as _
from django.http import Htt... | 45.489893 | 108 | 0.672557 |
8ec3bd9afafc78cf2cdecef487ba3462d3c24d71 | 184 | py | Python | test_imports.py | berquist/namespace_package_testing | a570bc94f3bc6b773e06afc18d9e19917b978b95 | [
"MIT"
] | null | null | null | test_imports.py | berquist/namespace_package_testing | a570bc94f3bc6b773e06afc18d9e19917b978b95 | [
"MIT"
] | null | null | null | test_imports.py | berquist/namespace_package_testing | a570bc94f3bc6b773e06afc18d9e19917b978b95 | [
"MIT"
] | null | null | null | from vistanlp.core import Document
from vistanlp.allennlp import AllenNLP
from vistanlp.spacy import SpacyAnnotator
print(Document().x)
print(AllenNLP().y)
print(SpacyAnnotator().z)
| 20.444444 | 41 | 0.809783 |
c112588f16b70f7fd004837761dc1ada707d2398 | 15,024 | py | Python | astroquery/mast/tests/test_mast.py | cam72cam/astroquery | 4bdc1ea36bb44b87549ce75ff1275113a2b1b2e7 | [
"BSD-3-Clause"
] | null | null | null | astroquery/mast/tests/test_mast.py | cam72cam/astroquery | 4bdc1ea36bb44b87549ce75ff1275113a2b1b2e7 | [
"BSD-3-Clause"
] | 1 | 2018-11-08T03:17:04.000Z | 2018-11-08T03:17:04.000Z | astroquery/mast/tests/test_mast.py | cam72cam/astroquery | 4bdc1ea36bb44b87549ce75ff1275113a2b1b2e7 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import print_function
import os
import re
from shutil import copyfile
from astropy.table import Table
from astropy.tests.helper import pytest
from astropy.coordinates import SkyCoord
from astropy.io import fits
import astropy.units as u... | 34.458716 | 93 | 0.648496 |
b482f4471f1ea6e3f4e4843de632ca39daae57ba | 897 | py | Python | Medium/String_to_Integer_atoi/String_to_Integer_atoi.py | nitin3685/LeetCode_Solutions | ab920e96cd27e0b2c3c895ce20853edceef0cce8 | [
"MIT"
] | null | null | null | Medium/String_to_Integer_atoi/String_to_Integer_atoi.py | nitin3685/LeetCode_Solutions | ab920e96cd27e0b2c3c895ce20853edceef0cce8 | [
"MIT"
] | null | null | null | Medium/String_to_Integer_atoi/String_to_Integer_atoi.py | nitin3685/LeetCode_Solutions | ab920e96cd27e0b2c3c895ce20853edceef0cce8 | [
"MIT"
] | null | null | null | class Solution:
def myAtoi(self, str: str) -> int:
s = str
if not s:
return 0
s = s.strip()
print(s)
if s == "":
return 0
multiplier = 1
if s[0] == '+':
multiplier = 1
s = s[1:]
elif s[0] == '-':
... | 24.916667 | 50 | 0.38573 |
eb5d8d4a200d4a320dc0f825f5e58b72ba03d537 | 1,071 | py | Python | setup.py | hampusjohansson1/sseclient | efd91934c446b0d313f2a1beea9682db31af9819 | [
"MIT"
] | 1 | 2021-02-23T21:53:58.000Z | 2021-02-23T21:53:58.000Z | setup.py | hampusjohansson1/sseclient | efd91934c446b0d313f2a1beea9682db31af9819 | [
"MIT"
] | null | null | null | setup.py | hampusjohansson1/sseclient | efd91934c446b0d313f2a1beea9682db31af9819 | [
"MIT"
] | null | null | null | #!/usr/bin/python
"""Installer script sseclient package."""
#
# Distributed under the terms of the MIT license.
#
from __future__ import unicode_literals
import sys
from setuptools import setup
needs_pytest = set(['pytest', 'test']).intersection(sys.argv)
pytest_runner = ['pytest_runner>=2.1'] if needs_pytest else []... | 30.6 | 72 | 0.664799 |
9260e6f4886e20e70aa1149eb79e4d6bcd0aff57 | 356 | py | Python | v1.0.0.test/toontown/cogdominium/DistributedCogdoElevatorExtAI.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 4 | 2019-07-01T15:46:43.000Z | 2021-07-23T16:26:48.000Z | v1.0.0.test/toontown/cogdominium/DistributedCogdoElevatorExtAI.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 1 | 2019-06-29T03:40:05.000Z | 2021-06-13T01:15:16.000Z | v1.0.0.test/toontown/cogdominium/DistributedCogdoElevatorExtAI.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 4 | 2019-07-28T21:18:46.000Z | 2021-02-25T06:37:25.000Z | from direct.directnotify import DirectNotifyGlobal
from toontown.building.DistributedElevatorExtAI import DistributedElevatorExtAI
class DistributedCogdoElevatorExtAI(DistributedElevatorExtAI):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCogdoElevatorExtAI')
def _createInterior(self):
... | 44.5 | 89 | 0.851124 |
965695af2e49d599776bb165413af01a8c611f1e | 460 | py | Python | config.py | mtfalch/kulTUR | 67d296537b55be59f52a557ee54a6b22a40b7b2d | [
"Apache-2.0"
] | null | null | null | config.py | mtfalch/kulTUR | 67d296537b55be59f52a557ee54a6b22a40b7b2d | [
"Apache-2.0"
] | null | null | null | config.py | mtfalch/kulTUR | 67d296537b55be59f52a557ee54a6b22a40b7b2d | [
"Apache-2.0"
] | null | null | null | import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config(object):
SECRET_KEY = os.environ.get('SECRET_KEY') or 'you-will-never-guess'
SQLALCHEMY_DATABASE_URI = 'postgres://vmewlvproubfvc:3fcf73c0763ae68782d5059c9a61b64a2a7493cb18ed64d8c53ee6a2d31393d9@ec2-50-19-109-120.compute-1.amazonaws.com:54... | 46 | 186 | 0.743478 |
0aa5a24c7d36ba4f931b0819945fb46bfd80ba77 | 9,463 | py | Python | texar/modules/decoders/beam_search_decode.py | lemondan/texar | f352912555ffee31f63a300fc632de52c29e05f8 | [
"Apache-2.0"
] | null | null | null | texar/modules/decoders/beam_search_decode.py | lemondan/texar | f352912555ffee31f63a300fc632de52c29e05f8 | [
"Apache-2.0"
] | null | null | null | texar/modules/decoders/beam_search_decode.py | lemondan/texar | f352912555ffee31f63a300fc632de52c29e05f8 | [
"Apache-2.0"
] | 1 | 2018-09-06T01:27:05.000Z | 2018-09-06T01:27:05.000Z | #
"""
Beam search decoding for RNN decoders.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
from tensorflow.contrib.seq2seq import \
dynamic_decode, AttentionWrapperState, AttentionWrapper, \
BeamSearchDecoder, tile_batc... | 41.323144 | 80 | 0.620945 |
7e3ca541d609de4713280c6f7c7cf968022377b1 | 812 | py | Python | apps/maps/migrations/0001_initial.py | silverlogic/bit-tag-api | 22bc1d79b3d48493ff3880f4c976c4e7c8135973 | [
"MIT"
] | null | null | null | apps/maps/migrations/0001_initial.py | silverlogic/bit-tag-api | 22bc1d79b3d48493ff3880f4c976c4e7c8135973 | [
"MIT"
] | null | null | null | apps/maps/migrations/0001_initial.py | silverlogic/bit-tag-api | 22bc1d79b3d48493ff3880f4c976c4e7c8135973 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-15 00:23
from __future__ import unicode_literals
import django.contrib.gis.db.models.fields
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migra... | 30.074074 | 114 | 0.607143 |
3ed5291a88b5e34950c0bf2e3ba65636aeff339e | 5,442 | bzl | Python | repositories.bzl | kuatbro/grpc | 132a40a1cfb8e703dbf86ad0b6baccdef4f8d926 | [
"Apache-2.0"
] | 1 | 2021-04-15T02:16:44.000Z | 2021-04-15T02:16:44.000Z | repositories.bzl | kuatbro/grpc | 132a40a1cfb8e703dbf86ad0b6baccdef4f8d926 | [
"Apache-2.0"
] | 2 | 2021-01-26T15:13:41.000Z | 2021-01-26T17:25:48.000Z | repositories.bzl | kuatbro/grpc | 132a40a1cfb8e703dbf86ad0b6baccdef4f8d926 | [
"Apache-2.0"
] | null | null | null | """External dependencies for grpc-java."""
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# For use with maven_install's artifacts.
# maven_install(
# ...
# artifacts = [
# # Your own deps
# ] + IO_GRPC_GRPC_JAVA_ARTIFACTS,
# )
IO_GRPC_GRPC_JAVA_ARTIFACTS = [
"com.google.... | 40.917293 | 107 | 0.694046 |
ba4a1137e3764d08208e2febbe83e85ab9983482 | 12,716 | py | Python | labml_nn/uncertainty/evidence/__init__.py | techthiyanes/annotated_deep_learning_paper_implementations | 8af24da2dd39a9a87482a4d18c2dc829bbd3fd47 | [
"MIT"
] | 3,714 | 2021-05-26T03:42:15.000Z | 2022-03-31T16:45:20.000Z | labml_nn/uncertainty/evidence/__init__.py | techthiyanes/annotated_deep_learning_paper_implementations | 8af24da2dd39a9a87482a4d18c2dc829bbd3fd47 | [
"MIT"
] | 43 | 2021-05-26T05:26:42.000Z | 2022-03-23T11:50:56.000Z | labml_nn/uncertainty/evidence/__init__.py | techthiyanes/annotated_deep_learning_paper_implementations | 8af24da2dd39a9a87482a4d18c2dc829bbd3fd47 | [
"MIT"
] | 349 | 2021-05-26T21:07:09.000Z | 2022-03-31T07:52:00.000Z | """
---
title: "Evidential Deep Learning to Quantify Classification Uncertainty"
summary: >
A PyTorch implementation/tutorial of the paper Evidential Deep Learning to Quantify Classification
Uncertainty.
---
# Evidential Deep Learning to Quantify Classification Uncertainty
This is a [PyTorch](https://pytorch.org) i... | 39.368421 | 131 | 0.61112 |
89ec02cf5b73292b4978fbe84beb5cfeb353cf89 | 734 | py | Python | code/network_list.py | MartinHarvey/WiFI-Audit-Device-Final-Project | ea72d30729fd0b27a14296f26a8f46d77d3d3426 | [
"MIT"
] | null | null | null | code/network_list.py | MartinHarvey/WiFI-Audit-Device-Final-Project | ea72d30729fd0b27a14296f26a8f46d77d3d3426 | [
"MIT"
] | null | null | null | code/network_list.py | MartinHarvey/WiFI-Audit-Device-Final-Project | ea72d30729fd0b27a14296f26a8f46d77d3d3426 | [
"MIT"
] | null | null | null | import subprocess
import sys
def main(output=None):
#If path present, open file at that path
if (output is not None):
sys.stdout = open(output, 'w')
#Run the process and save the stdout
# "-f BSSID,SSID,CHAN,SIGNAL,SECURITY" filters output to those columns
proc = subprocess.Popen(
[... | 29.36 | 74 | 0.63079 |
6fb56b2f544588507f7d1c1cad93f9350056f1e9 | 478 | py | Python | toggle_press.py | baranusluel/launchpad-mini | c0f24c6ae6c0694208a57966de558d75f11b03bf | [
"MIT"
] | null | null | null | toggle_press.py | baranusluel/launchpad-mini | c0f24c6ae6c0694208a57966de558d75f11b03bf | [
"MIT"
] | null | null | null | toggle_press.py | baranusluel/launchpad-mini | c0f24c6ae6c0694208a57966de558d75f11b03bf | [
"MIT"
] | null | null | null | """
Turns the pressed button's light on for as long as it is pressed.
"""
import mido
from mido import Message
inputPortName = "Launchpad Mini 0"
outputPortName = "Launchpad Mini 1"
try:
with mido.open_output(outputPortName) as outputPort, mido.open_input(inputPortName) as inputPort:
print(f'Using {input... | 26.555556 | 101 | 0.698745 |
8d41bba35a3be329674614633fdf5b210b1d44ea | 2,669 | py | Python | source/tools.py | Marszhewei/SuperMario | 4d895aebf497860aa79b5cc99d343f111732e8fe | [
"MIT"
] | 3 | 2022-01-03T08:19:33.000Z | 2022-01-04T07:09:16.000Z | source/tools.py | Marszhewei/SuperMario | 4d895aebf497860aa79b5cc99d343f111732e8fe | [
"MIT"
] | null | null | null | source/tools.py | Marszhewei/SuperMario | 4d895aebf497860aa79b5cc99d343f111732e8fe | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@Time : 16/11/2021 下午9:35
@Auth : Mars
@File :tools.py
@IDE :PyCharm
"""
import os
import pygame as pg
import random, sys
from . import const_var as cst
class Game:
'''
游戏主调类
'''
def __init__(self, state_dict, start_state):
self.screen = pg.display.get_surface() ... | 27.802083 | 76 | 0.52042 |
1607ba4b44908747c7f65f0b07183fee755a3372 | 25,681 | py | Python | src/encoders.py | jhunhwang/goldenretriever | 08df451c2d726678d91bab372936e95b6cf88732 | [
"Apache-2.0"
] | 8 | 2020-03-06T02:22:24.000Z | 2022-03-08T04:18:42.000Z | src/encoders.py | jhunhwang/goldenretriever | 08df451c2d726678d91bab372936e95b6cf88732 | [
"Apache-2.0"
] | 7 | 2020-11-13T18:54:23.000Z | 2022-02-10T02:29:15.000Z | src/encoders.py | jhunhwang/goldenretriever | 08df451c2d726678d91bab372936e95b6cf88732 | [
"Apache-2.0"
] | 3 | 2020-11-12T13:18:13.000Z | 2021-10-15T05:50:44.000Z | import logging
import os
import tensorflow as tf
# import tensorflow_addons as tfa
import tensorflow_hub as hub
from abc import ABC, abstractmethod
from transformers import AlbertTokenizer, TFAlbertModel
from .loss_functions import triplet_loss
from .tokenizers.bert_tokenization import FullTokenizer, preprocess_str
... | 36.530583 | 207 | 0.586504 |
98e588e82d1d71e1da4542c16844832b3b6861dc | 8,883 | py | Python | openstackclient/tests/functional/network/v2/test_network_qos_rule.py | cloudification-io/python-openstackclient | e07324e30fbb24e89fd63d1c5a5fe485f693a45c | [
"Apache-2.0"
] | 262 | 2015-01-29T20:10:49.000Z | 2022-03-23T01:59:23.000Z | openstackclient/tests/functional/network/v2/test_network_qos_rule.py | cloudification-io/python-openstackclient | e07324e30fbb24e89fd63d1c5a5fe485f693a45c | [
"Apache-2.0"
] | 5 | 2015-01-21T02:37:35.000Z | 2021-11-23T02:26:00.000Z | openstackclient/tests/functional/network/v2/test_network_qos_rule.py | cloudification-io/python-openstackclient | e07324e30fbb24e89fd63d1c5a5fe485f693a45c | [
"Apache-2.0"
] | 194 | 2015-01-08T07:39:27.000Z | 2022-03-30T13:51:23.000Z | # Copyright (c) 2016, Intel Corporation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | 40.377273 | 78 | 0.600698 |
da604dfa89a2edfa4b591c55ae46c039442942f6 | 1,204 | py | Python | snakebids/project_template/{{cookiecutter.app_name}}/setup.py | LouFel/snakebids | 6fdf64fb65471868b9cc9d55fd77654096c07686 | [
"MIT"
] | null | null | null | snakebids/project_template/{{cookiecutter.app_name}}/setup.py | LouFel/snakebids | 6fdf64fb65471868b9cc9d55fd77654096c07686 | [
"MIT"
] | 2 | 2022-02-11T22:08:36.000Z | 2022-02-11T22:08:47.000Z | snakebids/project_template/{{cookiecutter.app_name}}/setup.py | kaitj/snakebids | f205ab279223e9f5bb87ba170fe29d8324bc7484 | [
"MIT"
] | null | null | null | import json
import setuptools
with open("README.rst", "r") as fh:
long_description = fh.read()
with open("pipeline_description.json", "r") as fh:
pipeline = json.load(fh)
name = pipeline["GeneratedBy"][0]["Name"]
description = pipeline["Name"]
version = pipeline["GeneratedBy"][0]["Version"]
u... | 29.365854 | 84 | 0.653654 |
81d2a6855f41f7747a80c95dfd860f5d647c5e1d | 915 | py | Python | cemu/const.py | RMPR/cemu | c21b0a24bc050a91df39abbb03f8132ac4b82490 | [
"MIT"
] | 1 | 2021-03-12T11:07:15.000Z | 2021-03-12T11:07:15.000Z | cemu/const.py | RMPR/cemu | c21b0a24bc050a91df39abbb03f8132ac4b82490 | [
"MIT"
] | null | null | null | cemu/const.py | RMPR/cemu | c21b0a24bc050a91df39abbb03f8132ac4b82490 | [
"MIT"
] | null | null | null | import os
PROGNAME = 'cemu'
AUTHOR = 'hugsy'
EMAIL = 'hugsy+github@blah.cat'
VERSION = '0.5'
URL = 'https://github.com/{}/{}'.format(AUTHOR, PROGNAME)
ISSUE_LINK = 'https://github.com/{}/{}/issues'.format(AUTHOR, PROGNAME)
RELEASE_LINK ... | 38.125 | 80 | 0.562842 |
9ae7e535a57b59a40ef8123fbce8b2c606013085 | 99 | py | Python | bigearthnet_patch_interface/__init__.py | kai-tub/bigearthnet_patch_interface | 395f40f486c471f383a74667d1ae2006ee13e328 | [
"Apache-2.0"
] | 1 | 2022-01-30T22:20:07.000Z | 2022-01-30T22:20:07.000Z | bigearthnet_patch_interface/__init__.py | kai-tub/bigearthnet_patch_interface | 395f40f486c471f383a74667d1ae2006ee13e328 | [
"Apache-2.0"
] | 1 | 2022-01-11T11:20:54.000Z | 2022-01-13T10:15:37.000Z | bigearthnet_patch_interface/__init__.py | kai-tub/bigearthnet_patch_interface | 395f40f486c471f383a74667d1ae2006ee13e328 | [
"Apache-2.0"
] | null | null | null | import importlib.metadata
__version__ = importlib.metadata.version("bigearthnet_patch_interface")
| 24.75 | 71 | 0.858586 |
a626116ad4783b7a798265793a76e4d82b010afa | 19,986 | py | Python | test/functional/rpc_psbt.py | pavhash5/bitcoinroyale | 74711b2767e1a64cd4af172d40fada969e03505c | [
"MIT"
] | 5 | 2019-09-19T22:24:28.000Z | 2020-08-26T00:07:59.000Z | test/functional/rpc_psbt.py | pavhash5/bitcoinroyale | 74711b2767e1a64cd4af172d40fada969e03505c | [
"MIT"
] | 6 | 2019-10-01T00:00:54.000Z | 2021-07-26T12:57:40.000Z | test/functional/rpc_psbt.py | pavhash5/bitcoinroyale | 74711b2767e1a64cd4af172d40fada969e03505c | [
"MIT"
] | 3 | 2019-09-30T15:03:26.000Z | 2019-12-09T18:47:52.000Z | #!/usr/bin/env python3
# Copyright (c) 2018 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 Partially Signed Transaction RPCs.
"""
from decimal import Decimal
from test_framework.test_framew... | 54.457766 | 266 | 0.656259 |
4fc9f44b901cce18310e7b757b62ee9406b4145d | 1,439 | py | Python | examples/test_basic_cluster.py | nvtkaszpir/pytest-helm-charts | 24e31891f56f1487caa526264344e376b45c373f | [
"Apache-2.0"
] | 2 | 2020-09-27T21:14:31.000Z | 2021-05-10T12:29:01.000Z | examples/test_basic_cluster.py | nvtkaszpir/pytest-helm-charts | 24e31891f56f1487caa526264344e376b45c373f | [
"Apache-2.0"
] | 97 | 2020-07-03T13:08:09.000Z | 2022-03-31T16:05:23.000Z | examples/test_basic_cluster.py | ubergesundheit/pytest-helm-charts-kubectl | 4d16ffbc7fc65956580284ed25dae25e32beea2a | [
"Apache-2.0"
] | 3 | 2020-09-27T19:12:34.000Z | 2021-09-01T13:45:31.000Z | """This module shows some very basic examples of how to use fixtures in pytest-helm-charts.
"""
import logging
from typing import Dict
import pykube
from pytest_helm_charts.fixtures import Cluster
logger = logging.getLogger(__name__)
def test_api_working(kube_cluster: Cluster) -> None:
"""Very minimalistic exa... | 42.323529 | 108 | 0.76025 |
1dcf3ee0bb0d380c318ef13367af45125f84e771 | 7,404 | py | Python | ServidorPython/python32_web/Lib/site-packages/qtconsole/completion_widget.py | mak213k/Servidor_automatizado_python | 4403ef8027a2f814220baacc95856cf5fbf01d21 | [
"MIT"
] | null | null | null | ServidorPython/python32_web/Lib/site-packages/qtconsole/completion_widget.py | mak213k/Servidor_automatizado_python | 4403ef8027a2f814220baacc95856cf5fbf01d21 | [
"MIT"
] | 1 | 2019-08-19T07:42:20.000Z | 2019-08-19T07:42:20.000Z | ServidorPython/python32_web/Lib/site-packages/qtconsole/completion_widget.py | mak213k/Servidor_automatizado_python | 4403ef8027a2f814220baacc95856cf5fbf01d21 | [
"MIT"
] | null | null | null | """A dropdown completer widget for the qtconsole."""
import os
import sys
from qtconsole.qt import QtCore, QtGui
class CompletionWidget(QtGui.QListWidget):
""" A widget for GUI tab completion.
"""
#--------------------------------------------------------------------------
# 'QObject' interface
... | 38.5625 | 79 | 0.567126 |
c9b8d55b71956dff15068646a1cb1a97c3e1cece | 5,455 | py | Python | syft/workers/socketio_server.py | sashank06/PySyft | dd288be096dba8cb9074de9d27de97c9c659ba98 | [
"Apache-2.0"
] | null | null | null | syft/workers/socketio_server.py | sashank06/PySyft | dd288be096dba8cb9074de9d27de97c9c659ba98 | [
"Apache-2.0"
] | null | null | null | syft/workers/socketio_server.py | sashank06/PySyft | dd288be096dba8cb9074de9d27de97c9c659ba98 | [
"Apache-2.0"
] | null | null | null | import asyncio
import time
from threading import Thread
from typing import List
from typing import Union
import torch
from flask import Flask
from flask_socketio import SocketIO
import syft as sy
from syft.frameworks.torch.tensors.interpreters import AbstractTensor
from syft.workers.virtual import VirtualWorker
cla... | 37.881944 | 114 | 0.628964 |
b002c23491547a92aa84b1bcb95576f1af1917a7 | 4,066 | py | Python | app.py | ToothAndClaw/auto3dgm_nazar | c8202c964ebb8f8e2410bbd739bfb01d1ba4dcf4 | [
"MIT"
] | null | null | null | app.py | ToothAndClaw/auto3dgm_nazar | c8202c964ebb8f8e2410bbd739bfb01d1ba4dcf4 | [
"MIT"
] | 9 | 2018-12-14T18:46:54.000Z | 2019-03-29T17:40:23.000Z | app.py | ToothAndClaw/auto3dgm_nazar | c8202c964ebb8f8e2410bbd739bfb01d1ba4dcf4 | [
"MIT"
] | 4 | 2018-12-07T21:03:30.000Z | 2019-01-26T22:07:11.000Z | """
Main control flow for auto3dgm. Mainly used as a speculative document for now.
"""
from auto3dgm_nazar.dataset.datasetfactory import DatasetFactory
from auto3dgm_nazar.mesh.subsample import Subsample
from auto3dgm_nazar.analysis.correspondence import Correspondence
class Auto3dgmNazar:
def __init__(self, config=... | 41.489796 | 285 | 0.759469 |
521740ce1060139ae7bba4c0555173b1c58c4b55 | 16,194 | py | Python | app/portal/horizon/openstack_dashboard/dashboards/project/floating_ips/tests.py | haoshen61/f5-adcaas-openstack | 4bda29271930bf7c621f4184bda8d43b2fa96336 | [
"Apache-2.0"
] | 4 | 2019-06-21T06:42:07.000Z | 2020-12-04T11:59:25.000Z | app/portal/horizon/openstack_dashboard/dashboards/project/floating_ips/tests.py | haoshen61/f5-adcaas-openstack | 4bda29271930bf7c621f4184bda8d43b2fa96336 | [
"Apache-2.0"
] | 106 | 2019-01-18T03:06:55.000Z | 2019-11-29T05:06:18.000Z | app/portal/horizon/openstack_dashboard/dashboards/project/floating_ips/tests.py | haoshen61/f5-adcaas-openstack | 4bda29271930bf7c621f4184bda8d43b2fa96336 | [
"Apache-2.0"
] | 23 | 2019-01-10T01:49:08.000Z | 2020-05-26T01:10:38.000Z | # Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
# Copyright (c) 2012 X.commerce, a business unit of eBay Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License")... | 46.401146 | 78 | 0.605903 |
03bbd83939ae7cc3c3203ebcebe36c151b3fa5e4 | 42 | py | Python | trello_cli/__init__.py | whitef0x0/trello-cli | b7fa73b13747f3d4313c2ce22dbbe7c8880e2362 | [
"MIT"
] | null | null | null | trello_cli/__init__.py | whitef0x0/trello-cli | b7fa73b13747f3d4313c2ce22dbbe7c8880e2362 | [
"MIT"
] | null | null | null | trello_cli/__init__.py | whitef0x0/trello-cli | b7fa73b13747f3d4313c2ce22dbbe7c8880e2362 | [
"MIT"
] | 1 | 2018-08-18T20:12:12.000Z | 2018-08-18T20:12:12.000Z | from .start import *
__version__ = '1.1.1' | 21 | 21 | 0.690476 |
f386e51ab76a1152281f526a3d29280c4b1c43ce | 466 | py | Python | social/forms.py | michaelfeigen/portal | fafde88e02ef3ed7aa29a2dfea209d928b5e58d6 | [
"MIT"
] | 2 | 2018-08-01T19:50:40.000Z | 2018-08-01T20:26:53.000Z | social/forms.py | michaelfeigen/portal | fafde88e02ef3ed7aa29a2dfea209d928b5e58d6 | [
"MIT"
] | null | null | null | social/forms.py | michaelfeigen/portal | fafde88e02ef3ed7aa29a2dfea209d928b5e58d6 | [
"MIT"
] | null | null | null | """
This module contains classes that describe a form and determines how it works.
Each class contains fields that map to HTML form <input> elements.
Name: Michael Feigen
Date Completed: 7/31/2018
"""
from django.forms import ModelForm
from .models import social
class socialForm(ModelForm):
class Me... | 22.190476 | 79 | 0.7103 |
4aeb2da7fdcda3695e9a2238cc277090b27c4341 | 3,973 | py | Python | kubernetes/client/models/v1_secret_env_source.py | redjohn/python | 5e512ff564c244c50cab780d821542ed56aa965a | [
"Apache-2.0"
] | 1 | 2019-04-14T23:51:35.000Z | 2019-04-14T23:51:35.000Z | kubernetes/client/models/v1_secret_env_source.py | redjohn/python | 5e512ff564c244c50cab780d821542ed56aa965a | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_secret_env_source.py | redjohn/python | 5e512ff564c244c50cab780d821542ed56aa965a | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.14.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re... | 25.632258 | 119 | 0.555248 |
e6d36299a26d325c17f88b9dc5cc790679ccb1f7 | 7,308 | py | Python | broker/ipfs/submit.py | ebloc/EBlocBroker | 8e0a8be0fb4e998b0b7214c3eb3eff20b90a8253 | [
"MIT"
] | null | null | null | broker/ipfs/submit.py | ebloc/EBlocBroker | 8e0a8be0fb4e998b0b7214c3eb3eff20b90a8253 | [
"MIT"
] | null | null | null | broker/ipfs/submit.py | ebloc/EBlocBroker | 8e0a8be0fb4e998b0b7214c3eb3eff20b90a8253 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import sys
from pathlib import Path
from web3.logs import DISCARD
from broker import cfg
from broker._utils.tools import _remove, log
from broker._utils.web3_tools import get_tx_status
from broker.config import env
from broker.eblocbroker_scripts.job import Job
from broker.errors imp... | 35.134615 | 120 | 0.614258 |
244d2abe4b90ad8911c164b8b943332839b85132 | 211 | py | Python | web-app/config.py | brunocozendey/Pythonplayground | 41257c5010274f7964b3f72a2d00513ddf8ad3c1 | [
"MIT"
] | null | null | null | web-app/config.py | brunocozendey/Pythonplayground | 41257c5010274f7964b3f72a2d00513ddf8ad3c1 | [
"MIT"
] | null | null | null | web-app/config.py | brunocozendey/Pythonplayground | 41257c5010274f7964b3f72a2d00513ddf8ad3c1 | [
"MIT"
] | null | null | null | import os
SECRET_KEY = 'alura'
MYSQL_HOST = "127.0.0.1"
MYSQL_USER = "root"
MYSQL_PASSWORD = "root"
MYSQL_DB = "jogoteca"
MYSQL_PORT = 3306
UPLOAD_PATH = os.path.dirname(os.path.abspath(__file__)) + '/uploads' | 21.1 | 69 | 0.725118 |
c6706102f4bf8ff7eb1669ad6e6084767d0b01df | 337 | py | Python | exercisio28.py | bruno194/EXERCICIOS | cf7f00020515731031275a9b8d2696d7bf3bb5dc | [
"MIT"
] | 1 | 2022-02-25T13:28:46.000Z | 2022-02-25T13:28:46.000Z | exercisio28.py | bruno194/EXERCICIOS | cf7f00020515731031275a9b8d2696d7bf3bb5dc | [
"MIT"
] | null | null | null | exercisio28.py | bruno194/EXERCICIOS | cf7f00020515731031275a9b8d2696d7bf3bb5dc | [
"MIT"
] | null | null | null | from random import choice
frase = str(print('vou pensar em um numero entre 0 e 5. tente adivinhar...'))
lista = [0, 1, 2, 3, 4, 5]
adivinhacao = choice(lista)
usuario = int(input('em que número eu pensei?'))
if usuario == adivinhacao:
print('PARABÉNS! você me venceu!')
else:
print('ERROU! o numero era {}'.form... | 33.7 | 77 | 0.679525 |
048da51250dfb8d2ea364b7ac37a9225a39ef489 | 10,997 | py | Python | sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_custom_model_async.py | semick-dev/azure-sdk-for-python | dbad6c19b2812e5490137aac886edd8a80e407f7 | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_custom_model_async.py | acrofrank/azure-sdk-for-python | 699acfe143cc0ca570de2d040c8ffcf7cb2a3c55 | [
"MIT"
] | null | null | null | sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_custom_model_async.py | acrofrank/azure-sdk-for-python | 699acfe143cc0ca570de2d040c8ffcf7cb2a3c55 | [
"MIT"
] | null | null | null | # coding=utf-8
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import pytest
import functools
from devtools_testutils.aio import recorded_by_proxy_async
from devtools_testutils import set_bodiless_matcher
from azure.... | 47.197425 | 131 | 0.72347 |
f8286b184843253766b39b170f78791ef3c20e15 | 2,655 | py | Python | envs/state_occupancy_counter.py | wulfebw/neurips2020-procgen | e131684cfa15188473873144933fc73bd54a2e60 | [
"Apache-2.0"
] | null | null | null | envs/state_occupancy_counter.py | wulfebw/neurips2020-procgen | e131684cfa15188473873144933fc73bd54a2e60 | [
"Apache-2.0"
] | null | null | null | envs/state_occupancy_counter.py | wulfebw/neurips2020-procgen | e131684cfa15188473873144933fc73bd54a2e60 | [
"Apache-2.0"
] | null | null | null | import collections
import gym
import numpy as np
class StateOccupancyCounter(gym.Wrapper):
def __init__(self, env):
super().__init__(env)
self.reset()
def reset(self):
self.state_occupancy_counts = collections.Counter()
obs = self.env.reset()
self.prev_obs_hash = None... | 28.548387 | 96 | 0.607533 |
63e7a93b91748a7f49a00d377c9abe77fba33fe6 | 12,180 | py | Python | bmtk/simulator/filternet/lgnmodel/movie.py | aaberbach/bmtk | 42aa70ce2003227a32df6ce5a95420dbf4bdfbd4 | [
"BSD-3-Clause"
] | 1 | 2021-04-06T16:33:57.000Z | 2021-04-06T16:33:57.000Z | bmtk/simulator/filternet/lgnmodel/movie.py | moekay/bmtk | 6efdf6387d2a6badf276b917ee15d238daeae883 | [
"BSD-3-Clause"
] | null | null | null | bmtk/simulator/filternet/lgnmodel/movie.py | moekay/bmtk | 6efdf6387d2a6badf276b917ee15d238daeae883 | [
"BSD-3-Clause"
] | 1 | 2020-04-28T23:53:07.000Z | 2020-04-28T23:53:07.000Z | import numpy as np
from .utilities import convert_tmin_tmax_framerate_to_trange
class Movie(object):
def __init__(self, data, row_range=None, col_range=None, labels=('time', 'y', 'x'),
units=('second', 'pixel', 'pixel'), frame_rate=None, t_range=None):
self.data = data
self.label... | 41.712329 | 120 | 0.604516 |
fb09577bdbc0658be1989c59083db6fd2464b580 | 3,377 | py | Python | VAE/vanilla_vae/vae_pytorch.py | eastonhou/generative-models | 02f19ff8f8980afea44ed0a8834bc5e1c4322b4d | [
"Unlicense"
] | 7,386 | 2016-12-15T06:54:40.000Z | 2022-03-31T16:21:47.000Z | VAE/vanilla_vae/vae_pytorch.py | milanhzj/generative-models | b930d5fa9e2f69adfd4ea8ec759f38f6ce6da4c2 | [
"Unlicense"
] | 68 | 2017-02-01T19:41:54.000Z | 2021-07-04T02:06:27.000Z | VAE/vanilla_vae/vae_pytorch.py | milanhzj/generative-models | b930d5fa9e2f69adfd4ea8ec759f38f6ce6da4c2 | [
"Unlicense"
] | 2,247 | 2017-01-12T04:20:12.000Z | 2022-03-27T00:42:14.000Z | import torch
import torch.nn.functional as nn
import torch.autograd as autograd
import torch.optim as optim
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
import os
from torch.autograd import Variable
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_d... | 27.016 | 85 | 0.592242 |
4fd5d075a5c5a9fc2b818efa17df9b4026a1f5ee | 562 | py | Python | read_save.py | WidgetA/Pic_quality_test | 9980d0c2e5cb2ec8d799a7e7beb02ab34b33e6fd | [
"MIT"
] | null | null | null | read_save.py | WidgetA/Pic_quality_test | 9980d0c2e5cb2ec8d799a7e7beb02ab34b33e6fd | [
"MIT"
] | null | null | null | read_save.py | WidgetA/Pic_quality_test | 9980d0c2e5cb2ec8d799a7e7beb02ab34b33e6fd | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import os
video = './test_video/test_video.mp4'
cap = cv2.VideoCapture(video)
cap.set(cv2.CAP_PROP_FRAME_COUNT, 4)
ret = True
frame_count = 1
while ret:
ret, img = cap.read()
if img is None:
continue
else:
pass
cv2.imwrite(f'./bmp/test{frame_count}.bmp', im... | 25.545455 | 86 | 0.674377 |
b234372b8cb346f521fca5e934c236f75f922c1a | 3,541 | py | Python | MyScript/python/hello.py | ChenZeBin/blogs | 971bd46c26bd6eabdb18608d15930f196154d790 | [
"MIT"
] | 5 | 2021-05-17T01:45:07.000Z | 2021-08-25T09:34:57.000Z | MyScript/python/hello.py | ChenZeBin/blogs | 971bd46c26bd6eabdb18608d15930f196154d790 | [
"MIT"
] | null | null | null | MyScript/python/hello.py | ChenZeBin/blogs | 971bd46c26bd6eabdb18608d15930f196154d790 | [
"MIT"
] | 11 | 2021-05-17T01:51:24.000Z | 2021-08-25T09:35:46.000Z | #!/user/bin/env python3
import sys
import re
# 获取文件内容
def readFileContent(path):
f = open(path,'r')
lines = f.readlines()
f.close()
all_str = ''
for line in lines:
all_str = all_str + line
return all_str;
def transformWorker(str):
regularStr1 = r'\[GPBEnumDescriptor allocDescriptorForName:(\... | 34.715686 | 266 | 0.66789 |
36fd4da75c59e3b61a4d1b9211baefc24eabf4fd | 1,103 | py | Python | src/profiles/migrations/0007_auto_20170513_2020.py | MisaelMvM/bookAnalytics-ACC-Project | 954eb47f19c5fd83abbc46a6224dc588dbd20887 | [
"MIT"
] | null | null | null | src/profiles/migrations/0007_auto_20170513_2020.py | MisaelMvM/bookAnalytics-ACC-Project | 954eb47f19c5fd83abbc46a6224dc588dbd20887 | [
"MIT"
] | null | null | null | src/profiles/migrations/0007_auto_20170513_2020.py | MisaelMvM/bookAnalytics-ACC-Project | 954eb47f19c5fd83abbc46a6224dc588dbd20887 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-05-14 00:20
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_depende... | 34.46875 | 136 | 0.647325 |
b6fd845373c88674c41bd8e892192f05a956dfec | 7,579 | py | Python | tests/test_mongo_core.py | signalityai/cachier | 9d896a03a817b20743d0d58369814d9219194edb | [
"MIT"
] | null | null | null | tests/test_mongo_core.py | signalityai/cachier | 9d896a03a817b20743d0d58369814d9219194edb | [
"MIT"
] | null | null | null | tests/test_mongo_core.py | signalityai/cachier | 9d896a03a817b20743d0d58369814d9219194edb | [
"MIT"
] | null | null | null | """Testing the MongoDB core of cachier."""
from __future__ import print_function
import sys
import datetime
from datetime import timedelta
from random import random
from time import sleep
import threading
try:
import queue
except ImportError: # python 2
import Queue as queue
import pytest
import pymongo
impo... | 28.07037 | 99 | 0.694287 |
e5a8fddc4c55b15f83a8b0b72a21621b80663fcd | 1,037 | py | Python | manage.py | DoomPatrol/bernie-calc | d18324e9adeb5212842136d56ef259192061b142 | [
"MIT"
] | 1 | 2020-02-14T05:39:28.000Z | 2020-02-14T05:39:28.000Z | manage.py | DoomPatrol/bernie-calc | d18324e9adeb5212842136d56ef259192061b142 | [
"MIT"
] | 1 | 2020-02-19T16:23:27.000Z | 2020-02-19T16:23:27.000Z | manage.py | DoomPatrol/bernie-calc | d18324e9adeb5212842136d56ef259192061b142 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure tha... | 33.451613 | 77 | 0.658631 |
20b6c4869d2a59bf3ebf5bba103194019394328a | 31,088 | py | Python | src/compas_singular/algorithms/twocoloring.py | BlockResearchGroup/singular | 660245618ef99a6bf6fdb767719e4377e6b4d761 | [
"MIT"
] | 6 | 2019-02-12T17:49:41.000Z | 2020-04-15T10:28:49.000Z | src/compas_singular/algorithms/twocoloring.py | BlockResearchGroup/singular | 660245618ef99a6bf6fdb767719e4377e6b4d761 | [
"MIT"
] | 3 | 2020-07-01T13:45:44.000Z | 2020-10-07T14:40:52.000Z | src/compas_singular/algorithms/twocoloring.py | BlockResearchGroup/singular | 660245618ef99a6bf6fdb767719e4377e6b4d761 | [
"MIT"
] | 6 | 2019-02-21T11:20:19.000Z | 2020-04-02T10:20:00.000Z | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import time
import itertools
from compas.topology import adjacency_from_edges
from compas_singular.datastructures import QuadMesh
from compas_singular.datastructures import delete_strips
from compas_singular.... | 59.555556 | 5,574 | 0.521101 |
58af8f036afa4b2e5af27f60713ab66394891fb7 | 1,184 | py | Python | weaward/migrations/0004_rating.py | claudiahW/AwardMe | 04487d012ccbd2da7d0103f6dc5bf880afd4b80d | [
"MIT"
] | null | null | null | weaward/migrations/0004_rating.py | claudiahW/AwardMe | 04487d012ccbd2da7d0103f6dc5bf880afd4b80d | [
"MIT"
] | null | null | null | weaward/migrations/0004_rating.py | claudiahW/AwardMe | 04487d012ccbd2da7d0103f6dc5bf880afd4b80d | [
"MIT"
] | null | null | null | # Generated by Django 3.2.9 on 2021-12-13 15:45
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('weaward', '0003_alter_pr... | 40.827586 | 118 | 0.643581 |
500b4393bf4dbc4644b5e6e56fb65319f5b54d01 | 9,688 | py | Python | vyper/compiler/output.py | onlymaresia/vyper | e46466aae2c8cc124fdb403a768551fe4a05bb4b | [
"Apache-2.0"
] | null | null | null | vyper/compiler/output.py | onlymaresia/vyper | e46466aae2c8cc124fdb403a768551fe4a05bb4b | [
"Apache-2.0"
] | null | null | null | vyper/compiler/output.py | onlymaresia/vyper | e46466aae2c8cc124fdb403a768551fe4a05bb4b | [
"Apache-2.0"
] | null | null | null | import warnings
from collections import OrderedDict, deque
from pathlib import Path
import asttokens
from vyper.ast import ast_to_dict, parse_natspec
from vyper.codegen.ir_node import IRnode
from vyper.compiler.phases import CompilerData
from vyper.compiler.utils import build_gas_estimates
from vyper.evm import opcod... | 35.101449 | 99 | 0.66185 |
5b61c7e1004944005b891144913764b47a3259f0 | 5,933 | py | Python | sac_example_elif/model.py | Berk035/SimStar-Racer | 6deec22b02ed80195bf854d1ccce164ebc724d13 | [
"MIT"
] | null | null | null | sac_example_elif/model.py | Berk035/SimStar-Racer | 6deec22b02ed80195bf854d1ccce164ebc724d13 | [
"MIT"
] | null | null | null | sac_example_elif/model.py | Berk035/SimStar-Racer | 6deec22b02ed80195bf854d1ccce164ebc724d13 | [
"MIT"
] | null | null | null | import torch
import itertools
from network import Actor, Critic
from utils import Memory
from torch.autograd import Variable
class Model(torch.nn.Module):
def __init__(self, env, params, n_insize, n_outsize):
super().__init__()
self.n_states = n_insize
self.n_actions = n_outsize
se... | 40.917241 | 106 | 0.655149 |
8a344cd98373278e1ab3f42e4d3073b1e0c14c91 | 6,521 | py | Python | Lib/site-packages/django/template/loader.py | ashutoshsuman99/Web-Blog-D19 | a01a0ccc40e8823110c01ebe4f43d9351df57295 | [
"bzip2-1.0.6"
] | 123 | 2015-01-15T06:56:45.000Z | 2022-03-19T22:18:55.000Z | Lib/site-packages/django/template/loader.py | ashutoshsuman99/Web-Blog-D19 | a01a0ccc40e8823110c01ebe4f43d9351df57295 | [
"bzip2-1.0.6"
] | 21 | 2015-03-25T18:00:33.000Z | 2019-08-12T17:11:10.000Z | Lib/site-packages/django/template/loader.py | ashutoshsuman99/Web-Blog-D19 | a01a0ccc40e8823110c01ebe4f43d9351df57295 | [
"bzip2-1.0.6"
] | 72 | 2015-01-14T16:29:47.000Z | 2021-10-09T16:31:47.000Z | import warnings
from django.utils import six
from django.utils.deprecation import (
DeprecationInstanceCheck, RemovedInDjango20Warning,
RemovedInDjango110Warning,
)
from . import engines
from .backends.django import DjangoTemplates
from .base import Origin
from .engine import (
_context_instance_undefined... | 40.75625 | 84 | 0.62015 |
a9b8197d173b634aa87cfc4242526c35255ae439 | 1,182 | py | Python | extra_foam/logger.py | scottwedge/EXtra-foam | 9a170e3097987bf8abf30abb64a52439624367b8 | [
"BSD-3-Clause"
] | null | null | null | extra_foam/logger.py | scottwedge/EXtra-foam | 9a170e3097987bf8abf30abb64a52439624367b8 | [
"BSD-3-Clause"
] | null | null | null | extra_foam/logger.py | scottwedge/EXtra-foam | 9a170e3097987bf8abf30abb64a52439624367b8 | [
"BSD-3-Clause"
] | null | null | null | """
Distributed under the terms of the BSD 3-Clause License.
The full license is in the file LICENSE, distributed with this software.
Author: Jun Zhu <jun.zhu@xfel.eu>
Copyright (C) European X-Ray Free-Electron Laser Facility GmbH.
All rights reserved.
"""
import os
import logging
from logging.handlers import TimedRo... | 23.64 | 72 | 0.701354 |
0bee34d81b026639e8f068083bd6ddd92cf526e1 | 437 | py | Python | Assignments/Comprehensions/Exercise/04. Number Classification.py | KaloyankerR/python-advanced-repository | 711672d0f033a5adffc3ca689d02d2a7a9a26bfb | [
"MIT"
] | null | null | null | Assignments/Comprehensions/Exercise/04. Number Classification.py | KaloyankerR/python-advanced-repository | 711672d0f033a5adffc3ca689d02d2a7a9a26bfb | [
"MIT"
] | null | null | null | Assignments/Comprehensions/Exercise/04. Number Classification.py | KaloyankerR/python-advanced-repository | 711672d0f033a5adffc3ca689d02d2a7a9a26bfb | [
"MIT"
] | null | null | null | numbers = [int(x) for x in input().split(", ")]
positive = [x for x in numbers if x >= 0]
negative = [x for x in numbers if x < 0]
even = [x for x in numbers if x % 2 == 0]
odd = [x for x in numbers if x % 2 != 0]
print(f"Positive: {', '.join([str(x) for x in positive])}")
print(f"Negative: {', '.join([str(x) for x in... | 39.727273 | 59 | 0.572082 |
06461b5591930dec2644498d927bf85f8d8263a9 | 898 | py | Python | okta/models/catalog_application_status.py | corylevine/okta-sdk-python | c86b8fdc4525e84199143c27213c0aebc6b2af8f | [
"Apache-2.0"
] | 145 | 2017-06-13T21:54:04.000Z | 2022-02-25T05:44:34.000Z | okta/models/catalog_application_status.py | corylevine/okta-sdk-python | c86b8fdc4525e84199143c27213c0aebc6b2af8f | [
"Apache-2.0"
] | 146 | 2017-06-02T17:46:12.000Z | 2022-03-29T15:52:15.000Z | okta/models/catalog_application_status.py | corylevine/okta-sdk-python | c86b8fdc4525e84199143c27213c0aebc6b2af8f | [
"Apache-2.0"
] | 98 | 2017-06-27T03:44:51.000Z | 2022-03-23T04:58:18.000Z | # flake8: noqa
"""
Copyright 2020 - Present Okta, 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 ... | 26.411765 | 72 | 0.752784 |
9c9c144db54a32c6254198c886d1c70ea215bef2 | 27,396 | py | Python | ocbpy/tests/test_dmsp_ssj_files.py | aburrell/ocbpy | 453c8ef5d2c5e3484d5a9cf40f490367bf71d4b0 | [
"BSD-3-Clause"
] | 5 | 2017-07-12T18:15:06.000Z | 2018-10-30T22:05:14.000Z | ocbpy/tests/test_dmsp_ssj_files.py | aburrell/ocbpy | 453c8ef5d2c5e3484d5a9cf40f490367bf71d4b0 | [
"BSD-3-Clause"
] | 95 | 2017-07-12T02:26:45.000Z | 2022-03-28T18:38:57.000Z | ocbpy/tests/test_dmsp_ssj_files.py | aburrell/ocbpy | 453c8ef5d2c5e3484d5a9cf40f490367bf71d4b0 | [
"BSD-3-Clause"
] | 5 | 2019-05-22T15:09:58.000Z | 2021-08-19T17:59:05.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2019, AGB
# Full license can be found in License.md
# -----------------------------------------------------------------------------
""" Tests the boundaries.dmsp_ssj_files functions"""
from __future__ import absolute_import, unicode_literals
import datetime... | 41.762195 | 79 | 0.597861 |
47fc585cc2fc474b97666ae0949314ba0aabdcfb | 2,087 | py | Python | pyfos/utils/maps/maps_group_show.py | madhavinaiduprathap/pyfosbrocade | ec100e77c441761c3e688f1d8e5d18ad38cc83f4 | [
"Apache-2.0"
] | 44 | 2017-11-17T12:03:11.000Z | 2022-02-03T20:57:56.000Z | pyfos/utils/maps/maps_group_show.py | madhavinaiduprathap/pyfosbrocade | ec100e77c441761c3e688f1d8e5d18ad38cc83f4 | [
"Apache-2.0"
] | 13 | 2018-10-09T15:34:15.000Z | 2022-02-24T20:03:17.000Z | pyfos/utils/maps/maps_group_show.py | madhavinaiduprathap/pyfosbrocade | ec100e77c441761c3e688f1d8e5d18ad38cc83f4 | [
"Apache-2.0"
] | 23 | 2017-12-14T18:08:33.000Z | 2022-02-03T15:33:40.000Z | #!/usr/bin/env python3
# Copyright 2018 Brocade Communications Systems LLC. 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 also obtain a copy of the License at
# http://www.apache.org/licenses/LICENS... | 31.149254 | 76 | 0.672257 |
ce037fb5eca73eab778649e46611c77e04e8b948 | 1,809 | py | Python | gfootball/scenarios/tests/11_vs_4_offence_deterministic.py | seccoboy/football | c5c6a5c1d587a94673597ff6d61da43044a0c9ac | [
"Apache-2.0"
] | 3,091 | 2019-06-03T13:00:48.000Z | 2022-03-31T05:45:56.000Z | gfootball/scenarios/tests/11_vs_4_offence_deterministic.py | seccoboy/football | c5c6a5c1d587a94673597ff6d61da43044a0c9ac | [
"Apache-2.0"
] | 287 | 2019-06-07T14:35:25.000Z | 2022-03-19T12:36:42.000Z | gfootball/scenarios/tests/11_vs_4_offence_deterministic.py | seccoboy/football | c5c6a5c1d587a94673597ff6d61da43044a0c9ac | [
"Apache-2.0"
] | 1,418 | 2019-06-03T13:11:19.000Z | 2022-03-31T02:51:30.000Z | # coding=utf-8
# Copyright 2019 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | 39.326087 | 74 | 0.766722 |
96091e8a61d970add8582fd633b0d5c494e20d58 | 762 | py | Python | python/pattern_server/pattern_server.py | multispot-software/LCOS_LabVIEW | bbf5653203bb734d1d2d1b31c7f65f309545de7a | [
"MIT"
] | null | null | null | python/pattern_server/pattern_server.py | multispot-software/LCOS_LabVIEW | bbf5653203bb734d1d2d1b31c7f65f309545de7a | [
"MIT"
] | null | null | null | python/pattern_server/pattern_server.py | multispot-software/LCOS_LabVIEW | bbf5653203bb734d1d2d1b31c7f65f309545de7a | [
"MIT"
] | 3 | 2018-10-30T21:06:20.000Z | 2020-03-27T08:14:41.000Z | #! python3
import socketserver
import yaml
from patternlib import compute_pattern
def process_recv_data(data):
#print(data)
params = yaml.load(data)
print(params, end='\n\n')
a = compute_pattern(**params)
return a.tobytes()
class MyTCPHandler(socketserver.BaseRequestHandler):
def handle(self... | 25.4 | 64 | 0.674541 |
8af6f31ab2d0805872c95f57a7a1f8c9e0b02eb0 | 619 | py | Python | code/extract_asthma.py | translational-informatics/MIMICIII-ML-experiments | c549fd9625614eb7bd5d237291b1da9800f0094c | [
"MIT"
] | 5 | 2018-12-20T11:19:09.000Z | 2019-11-20T07:43:15.000Z | code/extract_asthma.py | translational-informatics/MIMICIII-ML-experiments | c549fd9625614eb7bd5d237291b1da9800f0094c | [
"MIT"
] | null | null | null | code/extract_asthma.py | translational-informatics/MIMICIII-ML-experiments | c549fd9625614eb7bd5d237291b1da9800f0094c | [
"MIT"
] | 2 | 2020-06-11T20:02:13.000Z | 2021-09-20T08:46:58.000Z | #
# extract_asthma.py
#
# Author:
# Kenneth Roe
#
# This file extracts the asthama patients using those present in died.csv
import os
import csv
import directories
data_source_dir = directories.all_episode_data
data_target_dir = directories.episode_data
#os.mkdir(data_target_dir)
with open(directories.processed_cs... | 23.807692 | 73 | 0.676898 |
aae9c396aa054641fa49e2aab7635512fb827cbb | 671 | py | Python | app/core/management/commands/wait_for_db.py | JOsorio01/recipe-app-api | 4ea9f8f178bf4f76c11553b0f328791f847ff91c | [
"MIT"
] | null | null | null | app/core/management/commands/wait_for_db.py | JOsorio01/recipe-app-api | 4ea9f8f178bf4f76c11553b0f328791f847ff91c | [
"MIT"
] | 1 | 2020-01-12T19:20:20.000Z | 2020-01-12T19:20:20.000Z | app/core/management/commands/wait_for_db.py | JOsorio01/recipe-app-api | 4ea9f8f178bf4f76c11553b0f328791f847ff91c | [
"MIT"
] | null | null | null | import time
from django.db import connections
from django.db.utils import OperationalError
from django.core.management.base import BaseCommand
class Command(BaseCommand):
"""Django command to pause execution until database is available"""
def handle(self, *args, **options):
self.stdout.write("Waitin... | 31.952381 | 78 | 0.652757 |
1149a06e949e3169b8ba9409afc620a07d149368 | 12,974 | py | Python | DIP/fluo_beads_sim/dynamics.py | ssklykov/collection_numCalc | f6c69aa582fc811b998a0989b99157b8566c884f | [
"Unlicense"
] | null | null | null | DIP/fluo_beads_sim/dynamics.py | ssklykov/collection_numCalc | f6c69aa582fc811b998a0989b99157b8566c884f | [
"Unlicense"
] | null | null | null | DIP/fluo_beads_sim/dynamics.py | ssklykov/collection_numCalc | f6c69aa582fc811b998a0989b99157b8566c884f | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Simulation of diffusion / motion of microbeads in medium. Calculates only 2D coordinates (center of a microbead).
@author: ssklykov
"""
# %% Imports
import numpy as np
import matplotlib.pyplot as plt
import os
# %% Class definition
class diffusion():
D = 1.0 # Diffusion coefficient
... | 44.584192 | 120 | 0.607446 |
3a1bc5083c3a20f781b06a3f022cac72cdc1316d | 2,378 | py | Python | sa/profiles/Planar/SDO3000/get_version.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 84 | 2017-10-22T11:01:39.000Z | 2022-02-27T03:43:48.000Z | sa/profiles/Planar/SDO3000/get_version.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 22 | 2017-12-11T07:21:56.000Z | 2021-09-23T02:53:50.000Z | sa/profiles/Planar/SDO3000/get_version.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 23 | 2017-12-06T06:59:52.000Z | 2022-02-24T00:02:25.000Z | # ----------------------------------------------------------------------
# Planar.SDO3000.get_version
# ----------------------------------------------------------------------
# Copyright (C) 2007-2018 The NOC Project
# See LICENSE for details
# ----------------------------------------------------------------------
# P... | 34.463768 | 100 | 0.491169 |
1feeb4bd92b42b7b87cfb6f62126c3adb10e43c6 | 1,554 | py | Python | filesystem/storm - v0.5.01.0002-f75d82d - 0.0.0/ui/settings.py | LEGO-Robotics/SPIKE-Prime | 90673d1b650877df9b4df5c18fbcb609ddf35402 | [
"MIT"
] | 1 | 2021-11-28T06:44:30.000Z | 2021-11-28T06:44:30.000Z | filesystem/storm - v0.5.01.0002-f75d82d - 0.0.0/ui/settings.py | LEGO-Robotics/SPIKE-Prime | 90673d1b650877df9b4df5c18fbcb609ddf35402 | [
"MIT"
] | null | null | null | filesystem/storm - v0.5.01.0002-f75d82d - 0.0.0/ui/settings.py | LEGO-Robotics/SPIKE-Prime | 90673d1b650877df9b4df5c18fbcb609ddf35402 | [
"MIT"
] | null | null | null | """
This product is released under the MIT License (MIT)
Copyright (c) 2019, LEGO System A/S, Aastvej 1, 7190 Billund, Denmark
See LICENSE.txt for the full MIT license notice.
"""
from hub import Image
LONG_PRESS_MS = 3000
class Sounds(object):
NAVIGATION = "sounds/Flipper_Navigation_LeftClick"
NAVIGATION... | 33.782609 | 69 | 0.676963 |
970e9704e1a66148b6bc828eff30975137860003 | 951 | py | Python | env_backup/src/util.py | ucsd-ets/local-env-backup | a1a07b649011e83c7fb92897c1a296601655163f | [
"MIT"
] | null | null | null | env_backup/src/util.py | ucsd-ets/local-env-backup | a1a07b649011e83c7fb92897c1a296601655163f | [
"MIT"
] | null | null | null | env_backup/src/util.py | ucsd-ets/local-env-backup | a1a07b649011e83c7fb92897c1a296601655163f | [
"MIT"
] | null | null | null | from datetime import datetime as dt
import os, shutil, sys
import re
_kernel_name_description = "Kernel names can only contain ASCII letters and numbers and these separators:" \
" - . _ (hyphen, period, and underscore)."
def fmt_now():
return dt.now().strftime('%F_%H%M%S')
def backup_local(dest):
if os... | 22.642857 | 108 | 0.657203 |
faec8fa8d9952a40f50aa869b2edd4b3bcb17cb4 | 13,387 | py | Python | iss/modeller.py | alienzj/InSilicoSeq | e50ca2da3c101e8bd42461f5cf4b49a90a06cbfc | [
"MIT"
] | 1 | 2021-04-14T06:16:27.000Z | 2021-04-14T06:16:27.000Z | iss/modeller.py | apcamargo/InSilicoSeq | e50ca2da3c101e8bd42461f5cf4b49a90a06cbfc | [
"MIT"
] | null | null | null | iss/modeller.py | apcamargo/InSilicoSeq | e50ca2da3c101e8bd42461f5cf4b49a90a06cbfc | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import division
from builtins import dict, range, zip
from iss import util
from scipy import stats
from joblib import Parallel, delayed
import logging
import numpy as np
def insert_size(insert_size_distribution):
"""Calculate cumulative distribution... | 35.89008 | 79 | 0.587361 |
571b14cc6e039fbc30a8309c6a4187ce23071413 | 12,968 | py | Python | tf2_ros/src/tf2_ros/buffer.py | yathartha3/geometry2 | 3da9a9fdf570aa9eabbf1b924587ce27d1dbb251 | [
"BSD-3-Clause"
] | null | null | null | tf2_ros/src/tf2_ros/buffer.py | yathartha3/geometry2 | 3da9a9fdf570aa9eabbf1b924587ce27d1dbb251 | [
"BSD-3-Clause"
] | null | null | null | tf2_ros/src/tf2_ros/buffer.py | yathartha3/geometry2 | 3da9a9fdf570aa9eabbf1b924587ce27d1dbb251 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2008, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of co... | 47.328467 | 132 | 0.682758 |
1702dafee67af88bb827437dea8632bafb1f4879 | 11,274 | py | Python | scripts/smap.py | Tacha-S/smap_ros | 5c30f19bc3d6da02478ab5c8d66066d4944b3d7f | [
"Apache-2.0"
] | 1 | 2021-02-09T10:45:54.000Z | 2021-02-09T10:45:54.000Z | scripts/smap.py | Tacha-S/smap_ros | 5c30f19bc3d6da02478ab5c8d66066d4944b3d7f | [
"Apache-2.0"
] | null | null | null | scripts/smap.py | Tacha-S/smap_ros | 5c30f19bc3d6da02478ab5c8d66066d4944b3d7f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import json
import os
import sys
import time
import cv2
import numpy as np
from tqdm import tqdm
from torch.utils.data import DataLoader
import torchvision.transforms as transforms
import rospy
from cv_bridge import CvBridge, CvBridgeError
from sensor_msgs.msg import Image
sys.path.append("/r... | 41.296703 | 112 | 0.55659 |
3b6c43e838a0c4aaafe3c1f48405b7d0702e5594 | 1,987 | py | Python | src/fhir_types/FHIR_SubstancePolymer_MonomerSet.py | anthem-ai/fhir-types | 42348655fb3a9b3f131b911d6bc0782da8c14ce4 | [
"Apache-2.0"
] | 2 | 2022-02-03T00:51:30.000Z | 2022-02-03T18:42:43.000Z | src/fhir_types/FHIR_SubstancePolymer_MonomerSet.py | anthem-ai/fhir-types | 42348655fb3a9b3f131b911d6bc0782da8c14ce4 | [
"Apache-2.0"
] | null | null | null | src/fhir_types/FHIR_SubstancePolymer_MonomerSet.py | anthem-ai/fhir-types | 42348655fb3a9b3f131b911d6bc0782da8c14ce4 | [
"Apache-2.0"
] | null | null | null | from typing import Any, List, Literal, TypedDict
from .FHIR_CodeableConcept import FHIR_CodeableConcept
from .FHIR_string import FHIR_string
from .FHIR_SubstancePolymer_StartingMaterial import (
FHIR_SubstancePolymer_StartingMaterial,
)
# Todo.
FHIR_SubstancePolymer_MonomerSet = TypedDict(
"FHIR_SubstancePoly... | 76.423077 | 836 | 0.777051 |
04519ac6c5795898b8b7d24e571a0ba907e7f793 | 9,866 | py | Python | doc/source/conf.py | iiasa/gams_stub | 463a440ae3483ab241d7f1746ce38c086749f7fc | [
"BSD-3-Clause"
] | 7 | 2016-03-03T10:34:08.000Z | 2019-04-18T08:45:55.000Z | doc/source/conf.py | iiasa/gams_stub | 463a440ae3483ab241d7f1746ce38c086749f7fc | [
"BSD-3-Clause"
] | 2 | 2016-05-04T10:59:47.000Z | 2018-04-17T16:34:18.000Z | doc/source/conf.py | iiasa/gams_stub | 463a440ae3483ab241d7f1746ce38c086749f7fc | [
"BSD-3-Clause"
] | 6 | 2016-03-02T09:59:04.000Z | 2020-02-27T00:01:49.000Z | # -*- coding: utf-8 -*-
#
# pystub documentation build configuration file, created by
# sphinx-quickstart on Tue Feb 9 09:59:03 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated fil... | 33.218855 | 111 | 0.694506 |
c46fbe35a3a5f18ad7d5f80f7d7f9653cb9c2963 | 11,391 | py | Python | nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/appfw/appfwpolicylabel.py | culbertm/NSttyPython | ff9f6aedae3fb8495342cd0fc4247c819cf47397 | [
"Apache-2.0"
] | null | null | null | nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/appfw/appfwpolicylabel.py | culbertm/NSttyPython | ff9f6aedae3fb8495342cd0fc4247c819cf47397 | [
"Apache-2.0"
] | null | null | null | nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/appfw/appfwpolicylabel.py | culbertm/NSttyPython | ff9f6aedae3fb8495342cd0fc4247c819cf47397 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2008-2016 Citrix Systems, 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 l... | 31.729805 | 300 | 0.711351 |
f8c3e20058b1fbd7a5c1e857aceb5a6db96430d7 | 553 | py | Python | test.py | mathczh/GANL2L | fdffbcb1547cf8f3a7287a4a21d3f4871f3e4e42 | [
"MIT"
] | null | null | null | test.py | mathczh/GANL2L | fdffbcb1547cf8f3a7287a4a21d3f4871f3e4e42 | [
"MIT"
] | null | null | null | test.py | mathczh/GANL2L | fdffbcb1547cf8f3a7287a4a21d3f4871f3e4e42 | [
"MIT"
] | null | null | null | LOSS_TYPE = 'dcgan'
ARCH = "cnnv2"
SHOW_SV_INFO = True
SHOW_BN_INFO = True
# NORM_TYPE = 'SN+BN'
# main()
# NORM_TYPE = 'WC+BN'
# main()
# NORM_TYPE = 'BN'
# main()
# NORM_TYPE = 'WC+BN'
# main()
# NORM_TYPE = 'OR+BN'
# main()
# NORM_TYPE = 'BN'
# main()
#
# NORM_TYPE = 'UVR+BN'
# UVR_MODE = 1
# ADDITIONAL_INFO = "... | 13.825 | 28 | 0.62387 |
00ba7858f65ef7b0e56f27897b52da91dfe1f640 | 23 | py | Python | p0/elftools/__init__.py | wrestle/CMU-15410 | 9a2d67acd95917a82fa4f2125c5b9568127a00ae | [
"MIT"
] | null | null | null | p0/elftools/__init__.py | wrestle/CMU-15410 | 9a2d67acd95917a82fa4f2125c5b9568127a00ae | [
"MIT"
] | null | null | null | p0/elftools/__init__.py | wrestle/CMU-15410 | 9a2d67acd95917a82fa4f2125c5b9568127a00ae | [
"MIT"
] | 1 | 2019-07-17T16:49:14.000Z | 2019-07-17T16:49:14.000Z | __version__ = '0.10'
| 5.75 | 20 | 0.608696 |
469bd85132dfd9ddab2fc677a4d884f8e939c139 | 624 | py | Python | tests/test_util.py | amirkdv/oval | 8acd50bbdc4c96ef25d9680710e0afef455a88f3 | [
"BSD-3-Clause"
] | 1 | 2018-11-29T11:39:45.000Z | 2018-11-29T11:39:45.000Z | tests/test_util.py | amirkdv/oval | 8acd50bbdc4c96ef25d9680710e0afef455a88f3 | [
"BSD-3-Clause"
] | null | null | null | tests/test_util.py | amirkdv/oval | 8acd50bbdc4c96ef25d9680710e0afef455a88f3 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from StringIO import StringIO
from biseqt.util import ProgressIndicator
def test_progress_indicator():
logs = StringIO()
ProgressIndicator.write = lambda self, message: logs.write(message)
indic = ProgressIndicator(num_total=1)
indic.start()
indic.progress()
assert log... | 28.363636 | 71 | 0.673077 |
660db2a6c62d7775cb5f3e6cfceec0c012e3f2fd | 4,960 | py | Python | thrift/lib/py/protocol/TProtocol.py | jesboat/fbthrift | 7d8e1dcec59024e526e6768d3d4a66f6c4abe5ac | [
"Apache-2.0"
] | 5 | 2015-11-23T00:26:06.000Z | 2020-07-31T12:56:08.000Z | thrift/lib/py/protocol/TProtocol.py | jesboat/fbthrift | 7d8e1dcec59024e526e6768d3d4a66f6c4abe5ac | [
"Apache-2.0"
] | 2 | 2017-05-10T15:43:34.000Z | 2018-01-04T22:36:04.000Z | thrift/lib/py/protocol/TProtocol.py | jesboat/fbthrift | 7d8e1dcec59024e526e6768d3d4a66f6c4abe5ac | [
"Apache-2.0"
] | 7 | 2017-09-01T01:30:25.000Z | 2019-02-04T17:46:24.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 21.85022 | 61 | 0.587903 |
97456cdb8eec042e23e515095a0e16eec513f2e1 | 1,886 | py | Python | drf_util/config.py | elasmd/drf-util | ac1d12e09cd7b0682fdad00118a3cc60e12fb76e | [
"MIT"
] | null | null | null | drf_util/config.py | elasmd/drf-util | ac1d12e09cd7b0682fdad00118a3cc60e12fb76e | [
"MIT"
] | null | null | null | drf_util/config.py | elasmd/drf-util | ac1d12e09cd7b0682fdad00118a3cc60e12fb76e | [
"MIT"
] | null | null | null | import os
from django.core.exceptions import ImproperlyConfigured
def default_logging(DEBUG_LEVEL='INFO'):
return {
'version': 1,
'disable_existing_loggers': True,
'formatters': {
'standard': {
'format': '%(asctime)s [%(levelname)s]- %(message)s'}
},
... | 27.333333 | 88 | 0.509544 |
2a7d954b773801f05411ab61966fee1910848813 | 7,040 | py | Python | rich/markup.py | msaroufim/rich | 51165f4b21e2b3af896eca750ae6a080fc4d7cf5 | [
"MIT"
] | 7 | 2021-09-29T09:46:36.000Z | 2022-03-24T08:30:41.000Z | rich/markup.py | msaroufim/rich | 51165f4b21e2b3af896eca750ae6a080fc4d7cf5 | [
"MIT"
] | 23 | 2021-07-05T01:25:33.000Z | 2022-03-28T01:30:36.000Z | rich/markup.py | ewels/rich | 03b2c71193bc62a6e25bfff48fe7ea218c2cb57c | [
"MIT"
] | 1 | 2021-09-29T22:34:05.000Z | 2021-09-29T22:34:05.000Z | from ast import literal_eval
from operator import attrgetter
import re
from typing import Callable, Iterable, List, Match, NamedTuple, Optional, Tuple, Union
from .errors import MarkupError
from .style import Style
from .text import Span, Text
from ._emoji_replace import _emoji_replace
RE_TAGS = re.compile(
r"""... | 32.146119 | 107 | 0.551278 |
fd582dd99c41d6dcb63bc5dd347f5506946fa303 | 7,804 | py | Python | netbox/circuits/filtersets.py | Lavakara/netbox | f1472d218e157160306e7007fb3a705208901a71 | [
"Apache-2.0"
] | 1 | 2021-12-09T13:41:46.000Z | 2021-12-09T13:41:46.000Z | netbox/circuits/filtersets.py | Lavakara/netbox | f1472d218e157160306e7007fb3a705208901a71 | [
"Apache-2.0"
] | null | null | null | netbox/circuits/filtersets.py | Lavakara/netbox | f1472d218e157160306e7007fb3a705208901a71 | [
"Apache-2.0"
] | 1 | 2022-02-07T20:36:31.000Z | 2022-02-07T20:36:31.000Z | import django_filters
from django.db.models import Q
from dcim.filtersets import CableTerminationFilterSet
from dcim.models import Region, Site, SiteGroup
from extras.filters import TagFilter
from netbox.filtersets import ChangeLoggedModelFilterSet, OrganizationalModelFilterSet, PrimaryModelFilterSet
from tenancy.filt... | 31.467742 | 109 | 0.647873 |
c99a405cc036c24893423fd6aecc68b39b92c732 | 16,092 | py | Python | blender_driver/bpyutils.py | sjjhsjjh/blender-driver | 7e164f4049f1bb7292c835c084eaed5faf7be5fd | [
"MIT"
] | 2 | 2017-08-21T13:42:05.000Z | 2020-06-14T11:02:43.000Z | blender_driver/bpyutils.py | sjjhsjjh/blender-driver | 7e164f4049f1bb7292c835c084eaed5faf7be5fd | [
"MIT"
] | null | null | null | blender_driver/bpyutils.py | sjjhsjjh/blender-driver | 7e164f4049f1bb7292c835c084eaed5faf7be5fd | [
"MIT"
] | null | null | null | #!/usr/bin/python
# (c) 2018 Jim Hawkins. MIT licensed, see https://opensource.org/licenses/MIT
# Part of Blender Driver, see https://github.com/sjjhsjjh/blender-driver
"""Utility layer on the main Blender Python programming interface. This isn't
the utilities for the Blender Game Engine.
This module can only be used ... | 38.314286 | 80 | 0.661695 |
be74811bc0d50bd5d348cf74c2a583fa93566826 | 9,915 | py | Python | ignition/dsl/flame/tensors/tests/test_solvers.py | IgnitionProject/ignition | 0eeb3a7878d828bc3c06d2cb2dd781e17776a8a6 | [
"BSD-2-Clause-FreeBSD"
] | 7 | 2015-01-25T18:15:48.000Z | 2022-03-09T17:39:12.000Z | ignition/dsl/flame/tensors/tests/test_solvers.py | IgnitionProject/ignition | 0eeb3a7878d828bc3c06d2cb2dd781e17776a8a6 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | ignition/dsl/flame/tensors/tests/test_solvers.py | IgnitionProject/ignition | 0eeb3a7878d828bc3c06d2cb2dd781e17776a8a6 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | from sympy import S
from ignition.dsl.flame.tensors import (expr_rank, expr_shape, solve_vec_eqn,
T, Tensor, Transpose)
from ignition.dsl.flame.tensors.solvers import (all_back_sub, assump_solve,
backward_sub, branching_assump_solve, forward_solve, sol_without_recomputes)
def t... | 34.307958 | 110 | 0.523046 |
fab55ba185e976278f8acbd6ec6ba0c553cb8578 | 61 | py | Python | tests/tests/test_simple.py | vincentchsn/sampleproject | a4fb420bde311300721593471151acc8cb59cc95 | [
"MIT"
] | null | null | null | tests/tests/test_simple.py | vincentchsn/sampleproject | a4fb420bde311300721593471151acc8cb59cc95 | [
"MIT"
] | null | null | null | tests/tests/test_simple.py | vincentchsn/sampleproject | a4fb420bde311300721593471151acc8cb59cc95 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
def test_success():
assert True
| 10.166667 | 22 | 0.672131 |
7efc2e31e301a2489e044ffd77ee9d1ab138bb6d | 2,870 | py | Python | aoc/event2015/day21/solve.py | rjbatista/AoC | 5c6ca4bcb376c24ec730eb12fd7044f5326ee473 | [
"MIT"
] | null | null | null | aoc/event2015/day21/solve.py | rjbatista/AoC | 5c6ca4bcb376c24ec730eb12fd7044f5326ee473 | [
"MIT"
] | null | null | null | aoc/event2015/day21/solve.py | rjbatista/AoC | 5c6ca4bcb376c24ec730eb12fd7044f5326ee473 | [
"MIT"
] | null | null | null | from itertools import combinations
########
# PART 1
#Shop
_DEBUG = False
WEAPONS = [
#Weapons: Cost Damage Armor
('Dagger', ( 8, 4, 0)),
('Shortsword', (10, 5, 0)),
('Warhammer', (25, 6, 0)),
('Longsword', (40, 7, 0)),
('Greataxe', (74, 8, 0))
]
ARMORS = [
#Armor: ... | 21.742424 | 88 | 0.536237 |
155a2b6a491242ee60191539d3af8afc8755e0df | 4,465 | py | Python | ross/defects/integrate_solver.py | hssaabbl/ross | 5e548d24c8522c8a9a294479c580c21b4eb3bb65 | [
"MIT"
] | 69 | 2018-12-26T19:21:26.000Z | 2022-02-10T08:48:03.000Z | ross/defects/integrate_solver.py | hssaabbl/ross | 5e548d24c8522c8a9a294479c580c21b4eb3bb65 | [
"MIT"
] | 639 | 2018-12-18T16:44:11.000Z | 2022-03-27T16:46:41.000Z | ross/defects/integrate_solver.py | hssaabbl/ross | 5e548d24c8522c8a9a294479c580c21b4eb3bb65 | [
"MIT"
] | 136 | 2019-01-08T12:37:32.000Z | 2022-03-30T07:14:35.000Z | """Time integration module.
This module defines the time integration routines to evaluate time responses from
the rotors. These simulate the transient evolution of the dynamic behavior of the
rotors defined by the user, and return the time signals for rotor displacement.
"""
import numpy as np
class Integrator:
... | 31.443662 | 141 | 0.486226 |
47d3481690b751c1d7686f97fb91bf779c72c277 | 6,438 | py | Python | zp/zp/pipelines.py | DYC2016/zhaopin | eb3920d05160a9e5570c958e08e9b950db660f64 | [
"Apache-2.0"
] | null | null | null | zp/zp/pipelines.py | DYC2016/zhaopin | eb3920d05160a9e5570c958e08e9b950db660f64 | [
"Apache-2.0"
] | null | null | null | zp/zp/pipelines.py | DYC2016/zhaopin | eb3920d05160a9e5570c958e08e9b950db660f64 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
<<<<<<< HEAD
from scrapy.exceptions import DropItem
import jieba.analyse as jb_an
from zp.zw_model import DB_Util,Zp
import json
import requests
import time
import redis
import re
from scrapy.exceptions import DropItem
from zp.base_model import DB_Util, DD, Zwmc, Gsmc, Zwlb, ZwlbBig, Gshy, Gsxz,... | 54.10084 | 715 | 0.649736 |
d157cfe2798e64df207ee77f0c9666839d37cf7a | 8,230 | py | Python | python/sbp/vehicle.py | Patrick-Luo-THR/libsbp | d42e4a1e3cedf6a82b1d993b82e0da148401f80d | [
"MIT"
] | 65 | 2015-03-25T10:28:10.000Z | 2022-02-24T12:36:49.000Z | python/sbp/vehicle.py | Patrick-Luo-THR/libsbp | d42e4a1e3cedf6a82b1d993b82e0da148401f80d | [
"MIT"
] | 654 | 2015-03-24T17:43:55.000Z | 2022-03-31T21:42:49.000Z | python/sbp/vehicle.py | Patrick-Luo-THR/libsbp | d42e4a1e3cedf6a82b1d993b82e0da148401f80d | [
"MIT"
] | 110 | 2015-03-24T17:38:35.000Z | 2022-03-21T02:05:19.000Z | #!/usr/bin/env python
# Copyright (C) 2015-2021 Swift Navigation Inc.
# Contact: https://support.swiftnav.com
#
# This source is subject to the license found in the file 'LICENSE' which must
# be be distributed together with this source. All other rights reserved.
#
# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHO... | 31.653846 | 85 | 0.684812 |
4d1bf60daafa27eb0c49c91d40dc4e18547115fd | 281 | py | Python | paystack_erpnext/config/desktop.py | isaaclarbi/paystack_erpnext | 1b6701f9385fb9c15c9a80a5214e0cd0960d1f25 | [
"MIT"
] | null | null | null | paystack_erpnext/config/desktop.py | isaaclarbi/paystack_erpnext | 1b6701f9385fb9c15c9a80a5214e0cd0960d1f25 | [
"MIT"
] | null | null | null | paystack_erpnext/config/desktop.py | isaaclarbi/paystack_erpnext | 1b6701f9385fb9c15c9a80a5214e0cd0960d1f25 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from frappe import _
def get_data():
return [
{
"module_name": "Paystack Erpnext",
"color": "grey",
"icon": "octicon octicon-file-directory",
"type": "module",
"label": _("Paystack Erpnext")
}
]
| 18.733333 | 44 | 0.629893 |
50f60c17c37e6c665675acef4e3e16edd2a039c7 | 6,049 | py | Python | test/functional/rpc_part_mnemonic.py | BitcoinConfidentialDev/BitcoinC-Core | 3e37f42cce11d73757a08eaaa1191352e4d5fe0e | [
"MIT"
] | 9 | 2019-04-01T12:08:47.000Z | 2019-05-21T20:52:35.000Z | test/functional/rpc_part_mnemonic.py | BitcoinConfidentialDev/BitcoinC-Core | 3e37f42cce11d73757a08eaaa1191352e4d5fe0e | [
"MIT"
] | 3 | 2019-05-22T19:42:10.000Z | 2021-06-27T22:14:26.000Z | test/functional/rpc_part_mnemonic.py | BitcoinConfidentialDev/BitcoinC-Core | 3e37f42cce11d73757a08eaaa1191352e4d5fe0e | [
"MIT"
] | 5 | 2019-04-27T19:38:36.000Z | 2020-08-19T14:55:52.000Z | #!/usr/bin/env python3
# Copyright (c) 2017 The BitcoinC Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.test_bitcoinc import BitcoinCTestFramework
from test_framework.util import *
class Mnemo... | 43.207143 | 235 | 0.613159 |
07d5dce0e328edae839f8ae375ea6a06ed901b45 | 456 | py | Python | backend/uclapi/workspaces/management/commands/feed_occupeye_cache_mini.py | balping/uclapi | 57cb77a58a2f8fc5bb523b459fa074380f4d8dcc | [
"MIT"
] | null | null | null | backend/uclapi/workspaces/management/commands/feed_occupeye_cache_mini.py | balping/uclapi | 57cb77a58a2f8fc5bb523b459fa074380f4d8dcc | [
"MIT"
] | null | null | null | backend/uclapi/workspaces/management/commands/feed_occupeye_cache_mini.py | balping/uclapi | 57cb77a58a2f8fc5bb523b459fa074380f4d8dcc | [
"MIT"
] | null | null | null | from django.core.management.base import BaseCommand
from workspaces.occupeye.cache import OccupeyeCache
class Command(BaseCommand):
help = (
'Caches current OccupEye sensor statuses into Redis'
)
def handle(self, *args, **options):
print("Running Mini OccupEye Caching Operatio... | 26.823529 | 61 | 0.644737 |
e7171ad7cc850c87a4a77cbb094db0cc97305ccd | 3,774 | py | Python | packages/syft/src/syft/core/common/event_loop.py | callezenwaka/PySyft | 2545c302441cfe727ec095c4f9aa136bff02be32 | [
"Apache-1.1"
] | 2 | 2022-02-18T03:48:27.000Z | 2022-03-05T06:13:57.000Z | packages/syft/src/syft/core/common/event_loop.py | callezenwaka/PySyft | 2545c302441cfe727ec095c4f9aa136bff02be32 | [
"Apache-1.1"
] | 3 | 2021-11-17T15:34:03.000Z | 2021-12-08T14:39:10.000Z | packages/syft/src/syft/core/common/event_loop.py | callezenwaka/PySyft | 2545c302441cfe727ec095c4f9aa136bff02be32 | [
"Apache-1.1"
] | 1 | 2021-08-19T12:23:01.000Z | 2021-08-19T12:23:01.000Z | # stdlib
import asyncio
import atexit
import os
from typing import Any as TypeAny
from typing import Dict as TypeDict
from typing import Optional
# third party
import nest_asyncio
# relative
from ...logger import info
from .environment import is_interactive
from .environment import is_jupyter
# Depending on where sy... | 32.534483 | 88 | 0.704557 |
648ca505fbc64983d3634fe8f0e51df418953281 | 1,143 | py | Python | user_manager/manager/models/user_view.py | voegtlel/auth-manager-backend | 20d40de0abc9deeb3fcddd892ffe2e635301917a | [
"MIT"
] | null | null | null | user_manager/manager/models/user_view.py | voegtlel/auth-manager-backend | 20d40de0abc9deeb3fcddd892ffe2e635301917a | [
"MIT"
] | null | null | null | user_manager/manager/models/user_view.py | voegtlel/auth-manager-backend | 20d40de0abc9deeb3fcddd892ffe2e635301917a | [
"MIT"
] | null | null | null | from datetime import datetime, date
from typing import List, Optional, Union
from pydantic import BaseModel
from user_manager.common.models import UserFilterOp
from user_manager.common.models.user_view import UserGroupPropertyType
class UserFilter(BaseModel):
op: UserFilterOp
field: Optional[str]
value:... | 19.372881 | 70 | 0.730534 |
05c84d9f5941aec5696a09f05ad4cfec4a11d2f1 | 6,265 | py | Python | hypercane/synthesize/warcs.py | ato/hypercane | 290ef402006ee8f8d98090e31da52819e26145a0 | [
"MIT"
] | 2 | 2020-06-11T18:42:02.000Z | 2020-10-06T21:17:15.000Z | hypercane/synthesize/warcs.py | ato/hypercane | 290ef402006ee8f8d98090e31da52819e26145a0 | [
"MIT"
] | 55 | 2020-06-01T00:23:00.000Z | 2022-02-21T20:52:29.000Z | hypercane/synthesize/warcs.py | ato/hypercane | 290ef402006ee8f8d98090e31da52819e26145a0 | [
"MIT"
] | 3 | 2021-02-07T05:36:24.000Z | 2021-12-17T05:45:14.000Z | import logging
import hypercane.errors
module_logger = logging.getLogger('hypercane.synthesize.warcs')
def extract_image_uris(html):
from bs4 import BeautifulSoup
imageurls = []
soup = BeautifulSoup(html, 'html5lib')
for img in soup.find_all('img'):
if 'src' in img.attrs:
if img... | 31.014851 | 125 | 0.622985 |
bceff4245dfa9e4c7a074365658c90c9dbb05574 | 6,514 | py | Python | accenv/lib/python3.4/site-packages/allauth/socialaccount/providers/facebook/provider.py | adamshamsudeen/clubdin-dj | eb48c67dab3a4ae7c4032544eb4d64e0b1d7e15a | [
"MIT"
] | 1 | 2016-03-20T18:32:23.000Z | 2016-03-20T18:32:23.000Z | accenv/lib/python3.4/site-packages/allauth/socialaccount/providers/facebook/provider.py | adamshamsudeen/clubdin-dj | eb48c67dab3a4ae7c4032544eb4d64e0b1d7e15a | [
"MIT"
] | 9 | 2020-06-05T17:18:43.000Z | 2022-03-11T23:15:04.000Z | zubio/allauth/socialaccount/providers/facebook/provider.py | tejesh0/Zubio.in | a0a71d2fafd21e97b5a5062215149a9756d46e0b | [
"MIT"
] | null | null | null | import json
from django.conf import settings
from django.core.urlresolvers import reverse
from django.core.exceptions import ImproperlyConfigured
from django.middleware.csrf import get_token
from django.template.loader import render_to_string
from django.template import RequestContext
from django.utils.html import mark... | 38.093567 | 114 | 0.611759 |
7dc517a03e8e7475ed98e672cb6fde9c3af2ae5c | 1,680 | py | Python | conans/test/command/copy_packages_test.py | datalogics-kam/conan | 7bf230cd5f8ef68eb804908777ebaad75e951b16 | [
"MIT"
] | null | null | null | conans/test/command/copy_packages_test.py | datalogics-kam/conan | 7bf230cd5f8ef68eb804908777ebaad75e951b16 | [
"MIT"
] | null | null | null | conans/test/command/copy_packages_test.py | datalogics-kam/conan | 7bf230cd5f8ef68eb804908777ebaad75e951b16 | [
"MIT"
] | null | null | null | import unittest
from conans.test.utils.tools import TestClient
import os
from conans.model.ref import ConanFileReference
class CopyPackagesTest(unittest.TestCase):
def test_copy_command(self):
client = TestClient()
conanfile = """from conans import ConanFile
class Pkg(ConanFile):
settings = "... | 40 | 91 | 0.669048 |
9021eada92889406b8bb4efe3f6e34a5a7be0598 | 231 | py | Python | wikivir/app/templatetags/urlDecode.py | ALivingVendingMachine/wikivir | f642a91523653de54ac94735f9cf6e9160696c56 | [
"MIT"
] | null | null | null | wikivir/app/templatetags/urlDecode.py | ALivingVendingMachine/wikivir | f642a91523653de54ac94735f9cf6e9160696c56 | [
"MIT"
] | null | null | null | wikivir/app/templatetags/urlDecode.py | ALivingVendingMachine/wikivir | f642a91523653de54ac94735f9cf6e9160696c56 | [
"MIT"
] | null | null | null | from django.template.defaultfilters import stringfilter
from django import template
from urllib.parse import unquote
register = template.Library()
@register.filter()
@stringfilter
def unquote_raw(value):
return unquote(value) | 23.1 | 55 | 0.813853 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.