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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
046f7ca774853f5d3eb7867b83c71d1422a4ad73 | 36 | py | Python | deliverable1/test_case_05/__init__.py | TrackerSB/IEEEAITestChallenge2021 | 836f0cfa39a3e25a8149a9adb77c3a8270417a39 | [
"MIT"
] | 1 | 2021-09-14T16:30:44.000Z | 2021-09-14T16:30:44.000Z | deliverable1/test_case_05/__init__.py | TrackerSB/IEEEAITestChallenge2021 | 836f0cfa39a3e25a8149a9adb77c3a8270417a39 | [
"MIT"
] | 22 | 2021-02-26T06:35:00.000Z | 2021-07-16T12:37:58.000Z | deliverable1/test_case_05/__init__.py | TrackerSB/IEEEAITestChallenge2021 | 836f0cfa39a3e25a8149a9adb77c3a8270417a39 | [
"MIT"
] | 2 | 2021-03-10T19:50:28.000Z | 2021-08-23T08:02:36.000Z | from .test_case_05 import TestCase05 | 36 | 36 | 0.888889 |
2ae6ba46f28ed48df44a8138db1d245f4df6587f | 580 | py | Python | crypto/gain/deposit.py | tmackenzie/Crypto-Trading-Gains | 4d789bb80d7adde3edb0560b17da0bda2e863f85 | [
"MIT"
] | 1 | 2022-02-28T18:11:36.000Z | 2022-02-28T18:11:36.000Z | crypto/gain/deposit.py | tmackenzie/crypto-trading-gains | 4d789bb80d7adde3edb0560b17da0bda2e863f85 | [
"MIT"
] | null | null | null | crypto/gain/deposit.py | tmackenzie/crypto-trading-gains | 4d789bb80d7adde3edb0560b17da0bda2e863f85 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from decimal import Decimal
from functools import reduce
from . import util
def usd_deposits(trxs, start_date, end_date):
start_epoch = start_date.timestamp()
end_epoch = end_date.timestamp()
total = 0
deposits = []
for trx in trxs:
if trx["trx_type"] == "receive" a... | 29 | 139 | 0.648276 |
9655b5bd896bc75634579d27b873e08c352cfcf0 | 813 | py | Python | app/auth/authorize_api_request.py | jiansoung/flask-todos-api | 7c8aed54b042790a8b3ab11de856566005849fd4 | [
"MIT"
] | null | null | null | app/auth/authorize_api_request.py | jiansoung/flask-todos-api | 7c8aed54b042790a8b3ab11de856566005849fd4 | [
"MIT"
] | null | null | null | app/auth/authorize_api_request.py | jiansoung/flask-todos-api | 7c8aed54b042790a8b3ab11de856566005849fd4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from app.lib import Message
from app.lib import JsonWebToken
from app.models import User
from app.exceptions import exceptions
class AuthorizeApiRequest:
def __init__(self, headers):
self.__headers = headers
@property
def user(self):
decoded_auth_token = self.__de... | 30.111111 | 73 | 0.690037 |
1572685f61f49268f1ea72c9285105125589aaf2 | 681 | py | Python | euler/problem_1.py | cooperdramsey/project-euler-solutions | c67a771f4544735504f7050af9a68b4bece93992 | [
"MIT"
] | null | null | null | euler/problem_1.py | cooperdramsey/project-euler-solutions | c67a771f4544735504f7050af9a68b4bece93992 | [
"MIT"
] | null | null | null | euler/problem_1.py | cooperdramsey/project-euler-solutions | c67a771f4544735504f7050af9a68b4bece93992 | [
"MIT"
] | null | null | null | # Problem 1
# Multiples of 3 and 5
# If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9.
# The sum of these multiples is 23.
# Find the sum of all the multiples of 3 or 5 below 1000.
import numpy as np
def sum_of_multiples(value):
value_list = np.arange(1, value)
v... | 29.608696 | 97 | 0.684288 |
3e774a82e7b00e88caaeeba1ab5c1c1364553bda | 260 | py | Python | app/models/__init__.py | h1-the-swan/science_history_institute_chp_app | 0e99dec17403dfcaa2e7fbcd0374c39a773445b1 | [
"MIT"
] | null | null | null | app/models/__init__.py | h1-the-swan/science_history_institute_chp_app | 0e99dec17403dfcaa2e7fbcd0374c39a773445b1 | [
"MIT"
] | 2 | 2021-03-31T19:15:56.000Z | 2021-12-13T20:10:25.000Z | app/models/__init__.py | h1-the-swan/science_history_institute_chp_app | 0e99dec17403dfcaa2e7fbcd0374c39a773445b1 | [
"MIT"
] | null | null | null | """
These imports enable us to make all defined models members of the models
module (as opposed to just their python files)
"""
from .user import * # noqa
from .miscellaneous import * # noqa
from .oral_history import * # noqa
from .entity import * # noqa
| 26 | 72 | 0.723077 |
35be1941a77bc3ec1e4cbe9a137c2fe22a78d786 | 312 | py | Python | dev/circuitpython/examples/apds9960_simpletest.py | scripsi/picodeebee | 0ec77e92f09fa8711705623482e57a5e0b702696 | [
"MIT"
] | null | null | null | dev/circuitpython/examples/apds9960_simpletest.py | scripsi/picodeebee | 0ec77e92f09fa8711705623482e57a5e0b702696 | [
"MIT"
] | null | null | null | dev/circuitpython/examples/apds9960_simpletest.py | scripsi/picodeebee | 0ec77e92f09fa8711705623482e57a5e0b702696 | [
"MIT"
] | null | null | null | # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
import time
import board
from adafruit_apds9960.apds9960 import APDS9960
i2c = board.I2C()
apds = APDS9960(i2c)
apds.enable_proximity = True
while True:
print(apds.proximity)
time.sleep(0.2)
| 19.5 | 63 | 0.733974 |
d1c54034827fa8d6fa890e01d40c81f13ee8b06b | 20,226 | py | Python | src/preproc/slicetime_params.py | erramuzpe/ruber | cf510a4cf9b0b15d870b6506a1593c3b2b00a3b7 | [
"MIT"
] | 2 | 2018-11-07T07:54:34.000Z | 2022-01-13T13:06:06.000Z | src/preproc/slicetime_params.py | erramuzpe/ruber | cf510a4cf9b0b15d870b6506a1593c3b2b00a3b7 | [
"MIT"
] | null | null | null | src/preproc/slicetime_params.py | erramuzpe/ruber | cf510a4cf9b0b15d870b6506a1593c3b2b00a3b7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
Helper functions and nipype interface for
reading slice timing correction parameters specially from Siemens acquisitions
"""
import os.path as op
import numpy as np
import nib... | 41.617284 | 151 | 0.582963 |
438292857390bbfd3ffca0527ea431eff8652328 | 19,550 | py | Python | nnunet/postprocessing/connected_components.py | gasperpodobnik/nnUNet | f11906b13344db9f54e303378748a0defdea8331 | [
"Apache-2.0"
] | null | null | null | nnunet/postprocessing/connected_components.py | gasperpodobnik/nnUNet | f11906b13344db9f54e303378748a0defdea8331 | [
"Apache-2.0"
] | null | null | null | nnunet/postprocessing/connected_components.py | gasperpodobnik/nnUNet | f11906b13344db9f54e303378748a0defdea8331 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Division of Medical Image Computing, German Cancer Research Center (DKFZ), Heidelberg, Germany
#
# 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
#
# ht... | 45.571096 | 128 | 0.628184 |
07af434a860b58de1e3322111fb1896e565d344a | 1,846 | py | Python | calc/migrations/0004_speedups.py | ifireball/sos-calc | 9941c543534306c77fe0f08be55af68d5514a2c8 | [
"MIT"
] | null | null | null | calc/migrations/0004_speedups.py | ifireball/sos-calc | 9941c543534306c77fe0f08be55af68d5514a2c8 | [
"MIT"
] | null | null | null | calc/migrations/0004_speedups.py | ifireball/sos-calc | 9941c543534306c77fe0f08be55af68d5514a2c8 | [
"MIT"
] | 1 | 2021-05-19T14:10:21.000Z | 2021-05-19T14:10:21.000Z | # Generated by Django 3.1.5 on 2021-01-08 07:11
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('calc', '0003_auto_20210106_1104'),
]
operations = [
migrations.CreateModel(
name='Speedups',
... | 42.930233 | 114 | 0.568797 |
1efb86e66f365dd2e24bbbfb830dea37bdab7e4c | 6,260 | py | Python | autolens/pipeline/phase/dataset/meta_dataset.py | PyJedi/PyAutoLens | bcfb2e7b447aa24508fc648d60b6fd9b4fd852e7 | [
"MIT"
] | null | null | null | autolens/pipeline/phase/dataset/meta_dataset.py | PyJedi/PyAutoLens | bcfb2e7b447aa24508fc648d60b6fd9b4fd852e7 | [
"MIT"
] | null | null | null | autolens/pipeline/phase/dataset/meta_dataset.py | PyJedi/PyAutoLens | bcfb2e7b447aa24508fc648d60b6fd9b4fd852e7 | [
"MIT"
] | null | null | null | import autofit as af
import autoarray as aa
from autolens import exc
from autolens.fit import fit
from autoarray.operators.inversion import pixelizations as pix
import numpy as np
def isprior(obj):
if isinstance(obj, af.PriorModel):
return True
return False
def isinstance_or_prior(obj, cls):
if... | 34.777778 | 119 | 0.633227 |
8f729045223d49c94883e46fa1a31a3eb4b4fdce | 114 | py | Python | grokking_algorithms/04_quicksort/python/sum_recursion.py | youaresherlock/PythonPractice | 2e22d3fdcb26353cb0d8215c150e84d11bc9a022 | [
"Apache-2.0"
] | null | null | null | grokking_algorithms/04_quicksort/python/sum_recursion.py | youaresherlock/PythonPractice | 2e22d3fdcb26353cb0d8215c150e84d11bc9a022 | [
"Apache-2.0"
] | null | null | null | grokking_algorithms/04_quicksort/python/sum_recursion.py | youaresherlock/PythonPractice | 2e22d3fdcb26353cb0d8215c150e84d11bc9a022 | [
"Apache-2.0"
] | 1 | 2019-11-05T01:10:15.000Z | 2019-11-05T01:10:15.000Z | # -*- coding: utf-8 -*-
# 列表元素之和-递归写法
def sum(list):
if list == []:
return 0
return list[0] + sum(list[1:])
| 16.285714 | 31 | 0.54386 |
41c0336a5368610e436642dad8a47d0f8c85364a | 1,158 | py | Python | Ejemplos/28.py | ampotty/uip-pc3 | 8362680226df6629791e7a4c6cdf1b738eadc5de | [
"MIT"
] | 10 | 2015-10-27T18:29:06.000Z | 2019-04-03T04:05:31.000Z | Ejemplos/28.py | abdelgmartinezl/uip-pc3 | 8362680226df6629791e7a4c6cdf1b738eadc5de | [
"MIT"
] | 5 | 2015-10-13T01:12:51.000Z | 2016-10-08T18:01:17.000Z | Ejemplos/28.py | ampotty/uip-pc3 | 8362680226df6629791e7a4c6cdf1b738eadc5de | [
"MIT"
] | 25 | 2015-09-19T00:40:17.000Z | 2018-02-08T02:54:55.000Z | """
Ej. 28
Autor: Zahir Gudiño
Email: zahir.gudino@gmail.com
Descripcion:
Demostrar uso sencillo del hilo-individual event loop comunmente empleaod programacion asincronas. Tenga en cuenta
este un ejemplo muy artificial sólo para demostrar el patrón común. asyncio ofrece muchisimas funcionalidades
--ej. pa... | 27.571429 | 118 | 0.678756 |
f2e8216f7f4a7872ea09034e6a6793dde120bb1c | 4,015 | py | Python | llvm/utils/lit/tests/shtest-env.py | mkinsner/llvm | 589d48844edb12cd357b3024248b93d64b6760bf | [
"Apache-2.0"
] | 2,338 | 2018-06-19T17:34:51.000Z | 2022-03-31T11:00:37.000Z | llvm/utils/lit/tests/shtest-env.py | mkinsner/llvm | 589d48844edb12cd357b3024248b93d64b6760bf | [
"Apache-2.0"
] | 3,740 | 2019-01-23T15:36:48.000Z | 2022-03-31T22:01:13.000Z | llvm/utils/lit/tests/shtest-env.py | mkinsner/llvm | 589d48844edb12cd357b3024248b93d64b6760bf | [
"Apache-2.0"
] | 500 | 2019-01-23T07:49:22.000Z | 2022-03-30T02:59:37.000Z | # Check the env command
# RUN: not %{lit} -a -v %{inputs}/shtest-env \
# RUN: | FileCheck -match-full-lines %s
#
# END.
# Make sure env commands are included in printed commands.
# CHECK: -- Testing: 16 tests{{.*}}
# CHECK: FAIL: shtest-env :: env-args-last-is-assign.txt ({{[^)]*}})
# CHECK: $ "env" "FOO=1"
# CHECK... | 40.555556 | 109 | 0.571357 |
88b8ab05075cf7babe213b3abfed3d14822b7cfc | 5,266 | py | Python | sdk/netapp/azure-mgmt-netapp/tests/test_backup_policies.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/netapp/azure-mgmt-netapp/tests/test_backup_policies.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/netapp/azure-mgmt-netapp/tests/test_backup_policies.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | import time
from azure.mgmt.resource import ResourceManagementClient
from devtools_testutils import AzureMgmtRecordedTestCase, recorded_by_proxy
from azure.mgmt.netapp.models import BackupPolicy, BackupPolicyPatch
from test_account import create_account, delete_account
from setup import *
import azure.mgmt.netapp.model... | 40.821705 | 136 | 0.731485 |
1dcc8f6b606fe2a9ac23e1af40d487d87d02fb15 | 2,799 | py | Python | main.py | Alaa-MK/-Verilog-Netlist-Enhancer | a3e50b6cc008a16fa75ce1dbe02cf1c0388e4e52 | [
"MIT"
] | null | null | null | main.py | Alaa-MK/-Verilog-Netlist-Enhancer | a3e50b6cc008a16fa75ce1dbe02cf1c0388e4e52 | [
"MIT"
] | null | null | null | main.py | Alaa-MK/-Verilog-Netlist-Enhancer | a3e50b6cc008a16fa75ce1dbe02cf1c0388e4e52 | [
"MIT"
] | null | null | null | from Netlist import Netlist
#from Liberty import Liberty
import matplotlib.pyplot as plt
import networkx as nx
import sys, getopt
import os
def main(argv):
# vfile=input('please enter the name of the v file: ')
# libfile = input('please enter the name of the liberty file: ')
vfile='examples/new/uart_synth... | 35.884615 | 82 | 0.570918 |
914bc080e805eac826641f7cc8b60c4e1e2ea7a9 | 9,111 | py | Python | test/color/test_hsv.py | pworinger/kornia | a8bddbc5412694d778b1a7338e0d001910bb8024 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-06-25T18:10:22.000Z | 2021-06-25T18:10:22.000Z | test/color/test_hsv.py | pworinger/kornia | a8bddbc5412694d778b1a7338e0d001910bb8024 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | test/color/test_hsv.py | pworinger/kornia | a8bddbc5412694d778b1a7338e0d001910bb8024 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-05-15T03:22:24.000Z | 2021-05-15T03:22:24.000Z | import pytest
import math
import kornia
from kornia.testing import BaseTester
import torch
from torch.autograd import gradcheck
from torch.testing import assert_allclose
class TestRgbToHsv(BaseTester):
def test_smoke(self, device, dtype):
C, H, W = 3, 4, 5
img = torch.rand(C, H, W, device=device... | 46.015152 | 92 | 0.596532 |
ad11615d80dbe531dc668ca2dee05a16c9f43de4 | 837 | py | Python | python/services/config_db_service.py | filipemot/sistema_distancia_entre_cidades | 2798acf2f8b92ed793b203c0ac7c5bf50e008e46 | [
"MIT"
] | null | null | null | python/services/config_db_service.py | filipemot/sistema_distancia_entre_cidades | 2798acf2f8b92ed793b203c0ac7c5bf50e008e46 | [
"MIT"
] | null | null | null | python/services/config_db_service.py | filipemot/sistema_distancia_entre_cidades | 2798acf2f8b92ed793b203c0ac7c5bf50e008e46 | [
"MIT"
] | null | null | null | import logging
import os
import sys
from configparser import ConfigParser
class ConfigDbService:
@staticmethod
def config(filename=os.path.dirname(sys.modules['__main__'].__file__) + '\\database.ini',
section='postgresql') -> dict:
try:
parser: ConfigParser = ConfigParser(... | 28.862069 | 98 | 0.565114 |
9f8438d139776111a4ddd1ba76f218fa770b52b3 | 6,444 | py | Python | endpoints/v2/__init__.py | jakedt/quay | 424c1a19d744be444ed27aa1718fd74af311d863 | [
"Apache-2.0"
] | 1 | 2020-10-16T19:30:41.000Z | 2020-10-16T19:30:41.000Z | endpoints/v2/__init__.py | jakedt/quay | 424c1a19d744be444ed27aa1718fd74af311d863 | [
"Apache-2.0"
] | 15 | 2020-06-18T15:32:06.000Z | 2022-03-03T23:06:24.000Z | endpoints/v2/__init__.py | jakedt/quay | 424c1a19d744be444ed27aa1718fd74af311d863 | [
"Apache-2.0"
] | null | null | null | import logging
import os.path
from functools import wraps
from urlparse import urlparse
from urllib import urlencode
from flask import Blueprint, make_response, url_for, request, jsonify
from semantic_version import Spec
import features
from app import app, get_app_url
from auth.auth_context import get_authenticate... | 32.545455 | 100 | 0.671167 |
9fc87c3768bc8d83fb18735358d755b9425d1c24 | 2,788 | py | Python | dnms/udp/client.py | jacksontj/dnms_prototype | cadc8dde0460ba5e1b3e7e77bc9f754c6363707a | [
"MIT"
] | null | null | null | dnms/udp/client.py | jacksontj/dnms_prototype | cadc8dde0460ba5e1b3e7e77bc9f754c6363707a | [
"MIT"
] | null | null | null | dnms/udp/client.py | jacksontj/dnms_prototype | cadc8dde0460ba5e1b3e7e77bc9f754c6363707a | [
"MIT"
] | null | null | null | import tornado.iostream
import tornado.ioloop
import tornado.concurrent
import tornado
import time
import socket
import functools
import collections
class UDPRequest(object):
def __init__(self, addr, port, data, src_port=0):
self.addr = addr
self.port = port
self.data = data
self... | 29.659574 | 84 | 0.596844 |
e53de675a692ed487a7f94a58102ec995ed4bee6 | 1,151 | py | Python | services/consuming_services_apis/setup.py | OblongCheese/ConsumingServicesWithPython | a8057720f110c13a5f1e1256e4cc5d5f14386d15 | [
"MIT"
] | null | null | null | services/consuming_services_apis/setup.py | OblongCheese/ConsumingServicesWithPython | a8057720f110c13a5f1e1256e4cc5d5f14386d15 | [
"MIT"
] | null | null | null | services/consuming_services_apis/setup.py | OblongCheese/ConsumingServicesWithPython | a8057720f110c13a5f1e1256e4cc5d5f14386d15 | [
"MIT"
] | null | null | null | import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.txt')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()
requires = [
'pyramid',
'pyramid_chameleon',
'waitress'... | 22.568627 | 63 | 0.604692 |
e40afcaefa6203b3b7103ce01c3e4298d440fd88 | 890 | py | Python | simulator_runner.py | MikaelBertze/HallonDisp | b83ef5d3550ad6e6debab69ae65e73efccf6fa74 | [
"MIT"
] | null | null | null | simulator_runner.py | MikaelBertze/HallonDisp | b83ef5d3550ad6e6debab69ae65e73efccf6fa74 | [
"MIT"
] | null | null | null | simulator_runner.py | MikaelBertze/HallonDisp | b83ef5d3550ad6e6debab69ae65e73efccf6fa74 | [
"MIT"
] | null | null | null | from consolemenu import *
from consolemenu.items import *
from hallondisp.utils.iot_simulators import *
broker = "bulbasaur.bertze.se"
powerSimulator = PowerSensorSimulator(broker, .1, 5, 200)
#powerSimulator.connect()
powerSimulator.run()
tempSimulator = TempSimulator(broker, -10, 30, 200, 5)
#tempSimulator.connec... | 23.421053 | 86 | 0.732584 |
9b0869c88320ec6ec40c3f3da67135dddfe31579 | 193 | py | Python | fibo.py | ATrain951/01.python_function-milaan9 | 0e776b98dd6349efe2789ded1d54ccb453325414 | [
"MIT"
] | 167 | 2021-06-28T03:50:28.000Z | 2022-03-21T14:56:29.000Z | fibo.py | olivia0000/04_Python_Functions | 0e776b98dd6349efe2789ded1d54ccb453325414 | [
"MIT"
] | null | null | null | fibo.py | olivia0000/04_Python_Functions | 0e776b98dd6349efe2789ded1d54ccb453325414 | [
"MIT"
] | 155 | 2021-06-28T03:55:09.000Z | 2022-03-21T14:56:30.000Z | # Fibonacci numbers module
def fib(n): # return Fibonacci series up to n
result = []
a, b = 0, 1
while b < n:
result.append(b)
a, b = b, a + b
return result
| 14.846154 | 45 | 0.528497 |
c29be88a7e88f97b66742f48dc659e6d9297764d | 6,663 | py | Python | mirror/App.py | FrancescoSaverioZuppichini/mirror | db38362a8ce300bab04d86f2659d6d9bf516c850 | [
"MIT"
] | 234 | 2018-12-02T12:53:53.000Z | 2022-02-04T22:11:18.000Z | mirror/App.py | garain/mirror | a099f8eb87ec6517463123e514acaf63741136ea | [
"MIT"
] | 12 | 2019-01-06T17:38:34.000Z | 2022-02-27T21:35:23.000Z | mirror/App.py | garain/mirror | a099f8eb87ec6517463123e514acaf63741136ea | [
"MIT"
] | 23 | 2018-12-17T13:44:15.000Z | 2021-07-06T17:58:54.000Z | import json
import io
import torch
import time
from flask import Flask, request, Response, send_file, jsonify
from torchvision.transforms import ToPILImage
from .visualisations.web import Weights
from .ModuleTracer import ModuleTracer
class App(Flask):
default_visualisations = [Weights]
MAX_LINKS_EVERY_REQUE... | 39.660714 | 116 | 0.538496 |
b77beaa9661c0ea030f8b68c2a59be0755fc6cab | 151 | py | Python | test/test_widgets/__init__.py | SunChuquin/pyqode.core | edf29204446e3679701e74343288cf692eb07d86 | [
"MIT"
] | 23 | 2015-01-08T15:04:47.000Z | 2022-03-08T07:47:08.000Z | test/test_widgets/__init__.py | SunChuquin/pyqode.core | edf29204446e3679701e74343288cf692eb07d86 | [
"MIT"
] | 16 | 2021-02-01T08:54:08.000Z | 2022-01-09T10:23:57.000Z | test/test_widgets/__init__.py | SunChuquin/pyqode.core | edf29204446e3679701e74343288cf692eb07d86 | [
"MIT"
] | 24 | 2015-01-09T14:16:41.000Z | 2021-12-06T15:11:22.000Z | """
Those tests are very basic, we just check if the widget can be instantiated
without error (to make sure they work for the supported environmne
"""
| 30.2 | 75 | 0.768212 |
c31bc096977a1f5c2aaf1b58c1c0515700a36bae | 3,191 | py | Python | legacy/legacy/recommenders/cdl.py | csmithchicago/openrec | 5a9cf03abe0db0636107985f9f19d6351e4afe68 | [
"MIT"
] | null | null | null | legacy/legacy/recommenders/cdl.py | csmithchicago/openrec | 5a9cf03abe0db0636107985f9f19d6351e4afe68 | [
"MIT"
] | 6 | 2020-01-28T22:51:16.000Z | 2022-02-10T00:11:19.000Z | legacy/legacy/recommenders/cdl.py | csmithchicago/openrec | 5a9cf03abe0db0636107985f9f19d6351e4afe68 | [
"MIT"
] | null | null | null | from openrec.legacy.recommenders import PMF
from openrec.legacy.modules.extractions import SDAE
from openrec.legacy.modules.fusions import Average
class CDL(PMF):
def __init__(
self,
batch_size,
max_user,
max_item,
dim_embed,
item_f,
dims,
dropout=No... | 28.747748 | 85 | 0.530241 |
b218444d59a36e45b2febe2614451ec35e689484 | 945 | py | Python | kubernetes/test/test_v1_node_selector.py | scele/kubernetes-client-python | 9e982cbdb5f19dc1a3935a75bdd92288f3b807fb | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1_node_selector.py | scele/kubernetes-client-python | 9e982cbdb5f19dc1a3935a75bdd92288f3b807fb | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1_node_selector.py | scele/kubernetes-client-python | 9e982cbdb5f19dc1a3935a75bdd92288f3b807fb | [
"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.8.2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
im... | 21 | 105 | 0.703704 |
62b9b6bdcb2c17b12dbdc14a7aab8bea12efa2c9 | 210 | py | Python | docs/examples/led_board_4.py | NotBobTheBuilder/gpiozero | aeb9d30056ec97e6bf896152e71a870bd0099b4e | [
"BSD-3-Clause"
] | 743 | 2019-07-31T02:57:08.000Z | 2022-03-31T08:48:30.000Z | docs/examples/led_board_4.py | NotBobTheBuilder/gpiozero | aeb9d30056ec97e6bf896152e71a870bd0099b4e | [
"BSD-3-Clause"
] | 259 | 2019-07-29T14:26:40.000Z | 2022-03-27T00:17:56.000Z | docs/examples/led_board_4.py | NotBobTheBuilder/gpiozero | aeb9d30056ec97e6bf896152e71a870bd0099b4e | [
"BSD-3-Clause"
] | 127 | 2019-08-03T19:30:18.000Z | 2022-02-24T14:33:50.000Z | from gpiozero import LEDBoard
from time import sleep
leds = LEDBoard(2, 3, 4, 5, 6, 7, 8, 9)
leds[0].on() # first led on
sleep(1)
leds[7].on() # last led on
sleep(1)
leds[-1].off() # last led off
sleep(1)
| 17.5 | 39 | 0.638095 |
a6a5a3231736b8a21108ffd952ba04aae9555026 | 23,457 | py | Python | scripts/config_apicv10.py | jesusmah/apic-config-pipeline | 2ac53be31e7cf7a68cac0a2f22ab3408faac434d | [
"Apache-2.0"
] | null | null | null | scripts/config_apicv10.py | jesusmah/apic-config-pipeline | 2ac53be31e7cf7a68cac0a2f22ab3408faac434d | [
"Apache-2.0"
] | 1 | 2022-03-15T08:30:05.000Z | 2022-03-15T08:30:05.000Z | scripts/config_apicv10.py | jesusmah/apic-config-pipeline | 2ac53be31e7cf7a68cac0a2f22ab3408faac434d | [
"Apache-2.0"
] | 6 | 2021-11-03T16:56:15.000Z | 2022-03-11T18:46:20.000Z | import os, json
import utils
import api_calls
"""
API Connect v10 post install configuration steps --> https://www.ibm.com/docs/en/api-connect/10.0.x?topic=environment-cloud-manager-configuration-checklist
"""
FILE_NAME = "config_apicv10.py"
DEBUG = os.getenv('DEBUG','')
# This is the default out of the box catalog... | 45.283784 | 180 | 0.564949 |
be9a1434c3fd8d3ee8f0e184a30beb28aae074fc | 3,783 | py | Python | tests/www/api/experimental/test_kerberos_endpoints.py | ayushSethi22/airflow | d8c473e9119286f5fdb769880134c76f40bf42f6 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | tests/www/api/experimental/test_kerberos_endpoints.py | ayushSethi22/airflow | d8c473e9119286f5fdb769880134c76f40bf42f6 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 22 | 2019-12-09T23:22:07.000Z | 2021-05-12T23:15:40.000Z | tests/www/api/experimental/test_kerberos_endpoints.py | ayushSethi22/airflow | d8c473e9119286f5fdb769880134c76f40bf42f6 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 5 | 2019-11-18T13:19:29.000Z | 2020-03-25T13:20:29.000Z | # -*- coding: utf-8 -*-
#
# 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
#... | 36.728155 | 84 | 0.628337 |
042a702908fec92602748874914051af2d3969fc | 1,424 | py | Python | examples/sdk_examples/build_index.py | AlexeyPichugin/lunasdk | e1e3cb053c0969abf6f5419617654372ac89f61b | [
"MIT"
] | 8 | 2019-04-17T06:50:43.000Z | 2022-02-09T07:54:28.000Z | examples/sdk_examples/build_index.py | AlexeyPichugin/lunasdk | e1e3cb053c0969abf6f5419617654372ac89f61b | [
"MIT"
] | 71 | 2019-04-17T06:50:48.000Z | 2022-03-22T22:12:43.000Z | examples/sdk_examples/build_index.py | AlexeyPichugin/lunasdk | e1e3cb053c0969abf6f5419617654372ac89f61b | [
"MIT"
] | 7 | 2019-10-14T07:13:29.000Z | 2022-03-24T08:00:36.000Z | """Module realize simple examples following features:
* build index with descriptors
* search for descriptors with the shorter distance to passed descriptor
"""
import pprint
from lunavl.sdk.faceengine.engine import VLFaceEngine
from lunavl.sdk.faceengine.setting_provider import DetectorType
from lunavl.sdk.im... | 34.731707 | 91 | 0.753511 |
a35c22e4b16f5f6384bda48c42f6e8c0f20fde79 | 5,281 | py | Python | src/bin/shipyard_airflow/shipyard_airflow/plugins/armada_base_operator.py | rb560u/airship-shipyard | 01b6960c1f80b44d1db31c081139649c40b82308 | [
"Apache-2.0"
] | 12 | 2018-05-18T18:59:23.000Z | 2019-05-10T12:31:44.000Z | src/bin/shipyard_airflow/shipyard_airflow/plugins/armada_base_operator.py | rb560u/airship-shipyard | 01b6960c1f80b44d1db31c081139649c40b82308 | [
"Apache-2.0"
] | 4 | 2021-07-28T14:36:57.000Z | 2022-03-22T16:39:23.000Z | src/bin/shipyard_airflow/shipyard_airflow/plugins/armada_base_operator.py | rb560u/airship-shipyard | 01b6960c1f80b44d1db31c081139649c40b82308 | [
"Apache-2.0"
] | 9 | 2018-05-18T16:42:41.000Z | 2019-04-18T20:12:14.000Z | # Copyright 2018 AT&T Intellectual Property. All other rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | 34.97351 | 78 | 0.655558 |
a2eb5ba2c495078f635d851ac80752120c307e91 | 21,926 | py | Python | src/mobile_control/mobile_4wis_4wid_hoffman_path_tracking_without_servo.py | Musyue/mobile_robot | ed8a75c41e8ccaf1b48639239e4119bf2d1d5f65 | [
"MIT"
] | 6 | 2019-08-16T07:29:21.000Z | 2021-12-27T01:25:35.000Z | src/mobile_control/mobile_4wis_4wid_hoffman_path_tracking_without_servo.py | Musyue/mobile_robot | ed8a75c41e8ccaf1b48639239e4119bf2d1d5f65 | [
"MIT"
] | null | null | null | src/mobile_control/mobile_4wis_4wid_hoffman_path_tracking_without_servo.py | Musyue/mobile_robot | ed8a75c41e8ccaf1b48639239e4119bf2d1d5f65 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# coding=utf-8
import rospy
import sys
from std_msgs.msg import String,Float64,Bool,Int64MultiArray
from sensor_msgs.msg import Imu
import time
from math import *
import numpy as np
from mobile_control.mobileplatform_driver_steptech import *
from geometry_msgs.msg import Twist,Pose
from scipy.io... | 47.051502 | 249 | 0.643939 |
ba759def51e7543ba88ae83a81f0fe0c0faff9f3 | 223 | py | Python | centralized_pre_commit_conf/__init__.py | Pierre-Sassoulas/centralized-pre-commit-conf | 84d4397a93157ccc2fc67f9eb8c9076787118ec2 | [
"MIT"
] | 6 | 2020-05-25T07:11:53.000Z | 2021-02-03T01:53:14.000Z | centralized_pre_commit_conf/__init__.py | Pierre-Sassoulas/centralized-pre-commit-conf | 84d4397a93157ccc2fc67f9eb8c9076787118ec2 | [
"MIT"
] | 1 | 2020-09-02T15:51:38.000Z | 2020-09-02T15:51:38.000Z | centralized_pre_commit_conf/__init__.py | Pierre-Sassoulas/centralized-pre-commit-conf | 84d4397a93157ccc2fc67f9eb8c9076787118ec2 | [
"MIT"
] | 1 | 2020-07-22T08:03:45.000Z | 2020-07-22T08:03:45.000Z | """Easily install and update centralized pre-commit hooks and their configuration files in decentralized repositories"""
from centralized_pre_commit_conf.install import install
__version__ = "0.4.0"
__all__ = ["install"]
| 31.857143 | 120 | 0.802691 |
d93b4e5f84e92f155f767054c3803e1bc14aac3e | 304 | py | Python | wagtail_graphql/apps.py | yatesrates/wagtail-graphql-api | 8183c3c69340c9a48e2c352fc398e8bd255efa96 | [
"BSD-3-Clause"
] | 4 | 2019-07-19T21:17:02.000Z | 2020-08-30T05:15:07.000Z | wagtail_graphql/apps.py | yatesrates/wagtail-graphql-api | 8183c3c69340c9a48e2c352fc398e8bd255efa96 | [
"BSD-3-Clause"
] | 1 | 2019-11-06T03:44:42.000Z | 2019-11-06T03:44:42.000Z | wagtail_graphql/apps.py | yatesrates/wagtail-graphql-api | 8183c3c69340c9a48e2c352fc398e8bd255efa96 | [
"BSD-3-Clause"
] | 3 | 2019-07-19T21:17:06.000Z | 2019-10-31T03:34:44.000Z | from django import apps
class WagtailGraphQLConfig(apps.AppConfig):
name = 'wagtail_graphql'
def ready(self):
from wagtail_graphql.checks import register_checks
from wagtail_graphql.converters import register_converters
register_checks()
register_converters()
| 23.384615 | 66 | 0.733553 |
7d520a5d4960904ead911e7662a85cf47660f676 | 8,215 | py | Python | main.py | pastelmind/slack-post-grabber | ab83d53de62f2398130fdd995f42d00788ed9eec | [
"MIT"
] | null | null | null | main.py | pastelmind/slack-post-grabber | ab83d53de62f2398130fdd995f42d00788ed9eec | [
"MIT"
] | 6 | 2019-07-17T09:53:19.000Z | 2019-08-28T06:57:36.000Z | main.py | pastelmind/slack-message-inspector | ab83d53de62f2398130fdd995f42d00788ed9eec | [
"MIT"
] | null | null | null | """Slack bot that grabs the source of Slack posts."""
import hmac
import json
import os
from hashlib import sha256
from http import HTTPStatus
from sys import stderr
from time import time, perf_counter
from typing import Any, Dict, Tuple
import flask
from requests import Session
TIMEOUT_POST_MESSAGE = float(os.gete... | 36.838565 | 111 | 0.684601 |
0a69e30b6b4544c208ee3c53163643b768d36a98 | 834 | py | Python | mysite/mysite/urls.py | marktiu7/demo | 07df5d706b17b2d9a6275a96d803914b32ab1630 | [
"Apache-2.0"
] | null | null | null | mysite/mysite/urls.py | marktiu7/demo | 07df5d706b17b2d9a6275a96d803914b32ab1630 | [
"Apache-2.0"
] | null | null | null | mysite/mysite/urls.py | marktiu7/demo | 07df5d706b17b2d9a6275a96d803914b32ab1630 | [
"Apache-2.0"
] | null | null | null | """mysite URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/dev/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-base... | 32.076923 | 79 | 0.697842 |
7b2c6034d61f77a06b46d687b6c0211a6f248a6b | 4,678 | py | Python | benchmarks/PETSc/hm1_1Dbeam/hm1_1Dbeam.py | GeoStat-Framework/ogs5py_benchmarks | 0b6db19b87cfad36459757f99ce2458f8e12b20b | [
"BSD-4-Clause"
] | 3 | 2019-01-15T17:38:11.000Z | 2020-01-07T23:44:12.000Z | benchmarks/PETSc/hm1_1Dbeam/hm1_1Dbeam.py | GeoStat-Framework/ogs5py_benchmarks | 0b6db19b87cfad36459757f99ce2458f8e12b20b | [
"BSD-4-Clause"
] | 1 | 2020-05-12T09:18:09.000Z | 2020-05-12T10:48:32.000Z | benchmarks/PETSc/hm1_1Dbeam/hm1_1Dbeam.py | GeoStat-Framework/ogs5py_benchmarks | 0b6db19b87cfad36459757f99ce2458f8e12b20b | [
"BSD-4-Clause"
] | 1 | 2020-01-08T13:28:50.000Z | 2020-01-08T13:28:50.000Z | # -*- coding: utf-8 -*-
from ogs5py import OGS
model = OGS(
task_root='hm1_1Dbeam_root',
task_id='hm1_1Dbeam',
output_dir='out',
)
model.msh.read_file('hm1_1Dbeam.msh')
model.gli.read_file('hm1_1Dbeam.gli')
model.pcs.add_block(
main_key='PROCESS',
PCS_TYPE='LIQUID_FLOW',
ELEMENT_MATRIX_OUTPUT=0... | 22.27619 | 61 | 0.570543 |
551db97944b1ef8364c49959e4edb9460495c838 | 1,992 | py | Python | Course-4-python_databases/w2_sql/assignment_count_email.py | Mohamed2011-bit/-Python-For-Everybody-Coursera- | ec9686e0d21bb4f05436187abf36a1424bfd155a | [
"MIT"
] | 3 | 2020-06-06T05:48:03.000Z | 2022-01-15T23:27:13.000Z | Course-4-python_databases/w2_sql/assignment_count_email.py | Mohamed2011-bit/-Python-For-Everybody-Coursera- | ec9686e0d21bb4f05436187abf36a1424bfd155a | [
"MIT"
] | null | null | null | Course-4-python_databases/w2_sql/assignment_count_email.py | Mohamed2011-bit/-Python-For-Everybody-Coursera- | ec9686e0d21bb4f05436187abf36a1424bfd155a | [
"MIT"
] | 3 | 2021-03-24T22:05:38.000Z | 2022-03-27T13:45:30.000Z | # 1. Import sqlite3
# 2. Call .connect() method to create connection object
# 3. Create cursor object
# 4. Delete table if it exists
# 5. Create table with domains and counts as attributes
# 6. Request file name
# 7. Create file handle
# 8. Loop through file to retrieve domain of emails
# 9a. Retrieve data
# 9b. Call f... | 26.56 | 72 | 0.6501 |
23a25b1b4ab45b7a65a7502a1ad006fed053743f | 1,954 | py | Python | examples/dbpedia/dbpedia/writers.py | aitrek/quepy3 | 977452585bd04765a1e3d30d3d354b73d4a261cf | [
"BSD-3-Clause"
] | 1 | 2022-03-20T06:37:30.000Z | 2022-03-20T06:37:30.000Z | examples/dbpedia/dbpedia/writers.py | aitrek/quepy3 | 977452585bd04765a1e3d30d3d354b73d4a261cf | [
"BSD-3-Clause"
] | null | null | null | examples/dbpedia/dbpedia/writers.py | aitrek/quepy3 | 977452585bd04765a1e3d30d3d354b73d4a261cf | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# Copyright (c) 2012, Machinalis S.R.L.
# This file is part of quepy and is distributed under the Modified BSD License.
# You should have received a copy of license in the LICENSE file.
#
# Authors: Rafael Carrascosa <rcarrascosa@machinalis.com>
# Gonzalo Garcia Berrotaran <ggarcia@machinalis.... | 27.914286 | 81 | 0.619243 |
6a8d06a1e6f5271c87808a3e6055cae6ca564cf7 | 3,932 | py | Python | mysql_insert_assignment(1).py | Lucy815-bit/Insert-values-in-Mysqldb-using-python | c83301f5f0c7e1d868f2e1b01cadad6d53cff5c0 | [
"Apache-2.0"
] | null | null | null | mysql_insert_assignment(1).py | Lucy815-bit/Insert-values-in-Mysqldb-using-python | c83301f5f0c7e1d868f2e1b01cadad6d53cff5c0 | [
"Apache-2.0"
] | null | null | null | mysql_insert_assignment(1).py | Lucy815-bit/Insert-values-in-Mysqldb-using-python | c83301f5f0c7e1d868f2e1b01cadad6d53cff5c0 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import mysql.connector as mysql
db = mysql.connect(
host = "localhost",
user = "root",
passwd = "Enter your password here"
)
print(db)
# In[2]:
import mysql.connector as mysql
db = mysql.connect(
host = "localhost",
user = "root",
passwd = ... | 28.28777 | 210 | 0.676246 |
2d5c87a1ab26cbbd28250a9f880072e42d5ce64d | 932 | py | Python | src/jfk/input_code.py | LeHack/Lex-Yacc-PLY | 9e268c805107600a085e1d42bb445816f80d238e | [
"Beerware"
] | 14 | 2017-06-22T19:32:26.000Z | 2021-07-11T21:09:29.000Z | src/jfk/input_code.py | LeHack/Lex-Yacc-PLY | 9e268c805107600a085e1d42bb445816f80d238e | [
"Beerware"
] | null | null | null | src/jfk/input_code.py | LeHack/Lex-Yacc-PLY | 9e268c805107600a085e1d42bb445816f80d238e | [
"Beerware"
] | 6 | 2017-11-17T19:49:39.000Z | 2020-06-07T22:30:35.000Z | # math expressions
x = 2 ** 8 + (-1 - 6) * 8
# variables
y = 2
x = x + 5 * y
# logical expressions
t1 = x < 5
t2 = (x >= 200 and True)
# printing and string support
print(x + 5)
print('x =', x)
print('x + 5 =', x + 5)
print('x % 100 =', x % 100)
print("x == 205 is", x == 205, '; x != 210 is', x != 210, "; x < 5 is",... | 19.020408 | 75 | 0.537554 |
fe4d3fc29f94aa6b87c17db89caf18c4d1069d34 | 5,734 | py | Python | lightly/cli/train_cli.py | umami-ware/lightly | 5d70b34df7f784af249f9e9a6bfd6256756a877f | [
"MIT"
] | null | null | null | lightly/cli/train_cli.py | umami-ware/lightly | 5d70b34df7f784af249f9e9a6bfd6256756a877f | [
"MIT"
] | null | null | null | lightly/cli/train_cli.py | umami-ware/lightly | 5d70b34df7f784af249f9e9a6bfd6256756a877f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""**Lightly Train:** Train a self-supervised model from the command-line.
This module contains the entrypoint for the **lightly-train**
command-line interface.
"""
# Copyright (c) 2020. Lightly AG and its affiliates.
# All Rights Reserved
import os
import hydra
import torch
import torch.nn a... | 32.954023 | 89 | 0.648587 |
02b6c6435d96ecb7030468bfecbae53e1c0655e9 | 1,479 | py | Python | python/5_Info_JR.py | sashaboulouds/statistics | bfda7a83353be6f3ebc2e50ca35050829b11c745 | [
"MIT"
] | null | null | null | python/5_Info_JR.py | sashaboulouds/statistics | bfda7a83353be6f3ebc2e50ca35050829b11c745 | [
"MIT"
] | null | null | null | python/5_Info_JR.py | sashaboulouds/statistics | bfda7a83353be6f3ebc2e50ca35050829b11c745 | [
"MIT"
] | null | null | null | ## import numpy, panda, statsmodels
import pandas as pd
import numpy as np
import statsmodels.api as sm
import scipy
import matplotlib as mpl
mpl.use('TkAgg') # backend adjustment
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
from math import sqrt
import random
import seaborn as sns
def Info(vy):
... | 26.890909 | 70 | 0.645707 |
649eac88304e80117335adf3ebf6a4f3615a8d43 | 1,350 | py | Python | components/driver/test_apps/gptimer/app_test.py | guvvei/esp-idf | dae8bdb60bed819094137a52c2f86a1e49195a34 | [
"Apache-2.0"
] | 2 | 2021-12-23T23:58:32.000Z | 2022-03-19T03:42:31.000Z | components/driver/test_apps/gptimer/app_test.py | guvvei/esp-idf | dae8bdb60bed819094137a52c2f86a1e49195a34 | [
"Apache-2.0"
] | null | null | null | components/driver/test_apps/gptimer/app_test.py | guvvei/esp-idf | dae8bdb60bed819094137a52c2f86a1e49195a34 | [
"Apache-2.0"
] | 3 | 2021-08-07T09:17:31.000Z | 2022-03-20T21:54:52.000Z | # SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0
import glob
import os
import ttfw_idf
from tiny_test_fw import Utility
@ttfw_idf.idf_component_unit_test(env_tag='COMPONENT_UT_GENERIC', target=['esp32', 'esp32s2', 'esp32s3', 'esp32c3'])
def test_component_... | 43.548387 | 116 | 0.706667 |
f83ddb3c79b649b0b6771f4f548a6be2f8f895a3 | 17,110 | py | Python | tensorflow/python/framework/struct_field.py | xuxin0509/tensorflow | e77736b0e51cb816ad239afd040557d46e1e9290 | [
"Apache-2.0"
] | 1 | 2021-07-20T22:58:45.000Z | 2021-07-20T22:58:45.000Z | tensorflow/python/framework/struct_field.py | dfki-thsc/tensorflow | 8d746f768196a2434d112e98fc26c99590986d73 | [
"Apache-2.0"
] | 2 | 2021-11-10T20:10:39.000Z | 2022-02-10T05:15:31.000Z | tensorflow/python/framework/struct_field.py | dfki-thsc/tensorflow | 8d746f768196a2434d112e98fc26c99590986d73 | [
"Apache-2.0"
] | 1 | 2019-04-03T17:21:16.000Z | 2019-04-03T17:21:16.000Z | # Copyright 2021 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 38.536036 | 81 | 0.675511 |
cfedb9613e4db5a4661068473d953686b1870962 | 905 | py | Python | product/migrations/0001_initial.py | rodkiewicz/pola-backend | e26df1cea07b43c8b4272739234b7e78e2ce08c9 | [
"BSD-3-Clause"
] | 30 | 2015-08-13T01:05:36.000Z | 2022-01-22T03:02:50.000Z | product/migrations/0001_initial.py | rodkiewicz/pola-backend | e26df1cea07b43c8b4272739234b7e78e2ce08c9 | [
"BSD-3-Clause"
] | 1,428 | 2015-10-08T07:38:26.000Z | 2022-03-31T08:36:08.000Z | product/migrations/0001_initial.py | rodkiewicz/pola-backend | e26df1cea07b43c8b4272739234b7e78e2ce08c9 | [
"BSD-3-Clause"
] | 13 | 2015-12-27T22:35:25.000Z | 2022-02-01T15:55:58.000Z | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('company', '__first__'),
]
operations = [
migrations.CreateModel(
name='Product',
fields=[
(
'id',
models.Auto... | 29.193548 | 110 | 0.478453 |
48c4c0aff0a2a80352b46d9406a2c516976582f8 | 2,601 | py | Python | app.py | jorgemuriel/takseebot | c3529def6c32bdf7d9f948374ff3aba634d5b8f7 | [
"Apache-2.0"
] | null | null | null | app.py | jorgemuriel/takseebot | c3529def6c32bdf7d9f948374ff3aba634d5b8f7 | [
"Apache-2.0"
] | null | null | null | app.py | jorgemuriel/takseebot | c3529def6c32bdf7d9f948374ff3aba634d5b8f7 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import urllib
import json
import os
from flask import Flask
from flask import request
from flask import make_response
# Flask app should start in global layout
app = Flask(__name__)
@app.route('/webhook', methods=['POST'])
def webhook():
req = request.get_json(silent=True, force=True)
... | 24.537736 | 118 | 0.608997 |
e757098295632284265a6be6a9d70e88db50edaa | 1,105 | py | Python | read_wkshader.py | entropia/Warpkern-Software | ffd8849b0de6d8e980914b5b1436269ad3977b3f | [
"MIT"
] | null | null | null | read_wkshader.py | entropia/Warpkern-Software | ffd8849b0de6d8e980914b5b1436269ad3977b3f | [
"MIT"
] | null | null | null | read_wkshader.py | entropia/Warpkern-Software | ffd8849b0de6d8e980914b5b1436269ad3977b3f | [
"MIT"
] | null | null | null | import sys
import base64
from PIL import Image
from urllib.parse import urlparse
import json
import io
from itertools import chain, cycle
import numpy as np
from warpkern import PrerenderedAnim
def load_image_from_datauri(datauri: str):
path = urlparse(datauri).path
data = base64.b64decode(path.split(",")[-1])... | 26.309524 | 127 | 0.669683 |
25d44e5021e719e87c2af9e29b3a856c61376222 | 76,639 | py | Python | nova/compute/manager.py | xushiwei/nova | f27956708b0aaeabb06125e6a72b4d61747934b7 | [
"Apache-2.0"
] | 1 | 2021-11-08T10:11:44.000Z | 2021-11-08T10:11:44.000Z | nova/compute/manager.py | xushiwei/nova | f27956708b0aaeabb06125e6a72b4d61747934b7 | [
"Apache-2.0"
] | null | null | null | nova/compute/manager.py | xushiwei/nova | f27956708b0aaeabb06125e6a72b4d61747934b7 | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
#... | 44.765771 | 79 | 0.59916 |
549113866e7dfe949945e273539297e622ed8626 | 7,115 | py | Python | chromedriver_autoinstaller/utils.py | jaymegordo/python-chromedriver-autoinstaller | 5578d224f1bdfb286437605ec093c9513b0c074b | [
"MIT"
] | null | null | null | chromedriver_autoinstaller/utils.py | jaymegordo/python-chromedriver-autoinstaller | 5578d224f1bdfb286437605ec093c9513b0c074b | [
"MIT"
] | null | null | null | chromedriver_autoinstaller/utils.py | jaymegordo/python-chromedriver-autoinstaller | 5578d224f1bdfb286437605ec093c9513b0c074b | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Helper functions for filename and URL generation.
"""
import sys
import os
import subprocess
import urllib.request
import urllib.error
import zipfile
import xml.etree.ElementTree as elemTree
import logging
import re
from io import BytesIO
__author__ = 'Yeongbin Jo <iam.yeongbin.jo@gmail.com>'
... | 32.939815 | 137 | 0.666901 |
ec5edfea34428f0cda1e6e5c433e392bebf44589 | 1,888 | py | Python | setup.py | nicedexter/landslide | 0af037f37c34e351a271f80e4479193aaa48ea56 | [
"Apache-2.0"
] | 1,025 | 2015-01-05T09:19:40.000Z | 2022-03-30T09:11:18.000Z | setup.py | nicedexter/landslide | 0af037f37c34e351a271f80e4479193aaa48ea56 | [
"Apache-2.0"
] | 82 | 2015-01-21T19:49:36.000Z | 2021-02-02T01:08:54.000Z | setup.py | nicedexter/landslide | 0af037f37c34e351a271f80e4479193aaa48ea56 | [
"Apache-2.0"
] | 241 | 2015-01-23T09:22:18.000Z | 2021-11-24T11:13:23.000Z | from setuptools import setup
import landslide
setup(
name=landslide.__title__,
version=landslide.__version__,
description='HTML5 slideshow generator for Markdown, ReST, and Textile',
packages=['landslide'],
include_package_data=True,
zip_safe=False,
author=landslide.__author__,
author_... | 30.95082 | 78 | 0.608581 |
6432e2520a5f559d925ea79b26815bcbf1573230 | 3,542 | py | Python | src/bcsim/__main__.py | geozeke/bcsim | cda4c7b458f434033b001c06bc53bc544d703256 | [
"MIT"
] | null | null | null | src/bcsim/__main__.py | geozeke/bcsim | cda4c7b458f434033b001c06bc53bc544d703256 | [
"MIT"
] | 6 | 2021-12-23T15:49:33.000Z | 2022-01-21T15:47:28.000Z | src/bcsim/__main__.py | geozeke/bcsim | cda4c7b458f434033b001c06bc53bc544d703256 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Main entry point for bcsim."""
import argparse
import curses
import sys
from datetime import datetime as dt
from pathlib import Path
from bcsim import clear
from bcsim import runSimulation
# --------------------------------------------------------------------
def numballs_type(n):
""... | 28.111111 | 72 | 0.572276 |
458e0417d97738bb52dea8d4d1edf065cc0f28dc | 4,057 | py | Python | TextBoxSeg/tools/demo_ic15.py | weijiawu/Unconstrained-Text-Detection-with-Box-Supervisionand-Dynamic-Self-Training | b4954e20a3ce0c5b97e8d992c4282b97c7a8c1f0 | [
"Apache-1.1"
] | 31 | 2020-11-26T02:10:11.000Z | 2022-03-14T06:21:46.000Z | TextBoxSeg/tools/demo_ic15.py | weijiawu/Unconstrained-Text-Detection-with-Box-Supervisionand-Dynamic-Self-Training | b4954e20a3ce0c5b97e8d992c4282b97c7a8c1f0 | [
"Apache-1.1"
] | 4 | 2020-11-25T18:34:46.000Z | 2021-04-29T03:10:38.000Z | TextBoxSeg/tools/demo_ic15.py | weijiawu/Unconstrained-Text-Detection-with-Box-Supervisionand-Dynamic-Self-Training | b4954e20a3ce0c5b97e8d992c4282b97c7a8c1f0 | [
"Apache-1.1"
] | 3 | 2020-11-30T16:25:16.000Z | 2022-01-14T12:39:37.000Z | import os
import sys
import torch
cur_path = os.path.abspath(os.path.dirname(__file__))
root_path = os.path.split(cur_path)[0]
sys.path.append(root_path)
from torchvision import transforms
from PIL import Image
from segmentron.utils.visualize import get_color_pallete
from segmentron.models.model_zoo import get_segmen... | 34.092437 | 95 | 0.629529 |
2b41fbf258e421555e1cf3e3608ed7f38c349d07 | 116 | py | Python | src/onevision/models/classification/convnext/__init__.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | 2 | 2022-03-28T09:46:38.000Z | 2022-03-28T14:12:32.000Z | src/onevision/models/classification/convnext/__init__.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | src/onevision/models/classification/convnext/__init__.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
"""
from __future__ import annotations
from .convnext import *
| 11.6 | 34 | 0.637931 |
85ee3138f0ba6225b746d4c6c86cb184ca645641 | 238 | py | Python | examples/04relative-nested/app/config.py | podhmo/magicalimport | b9c516d9d134ca578a85f934caa8c9f9ce6b4fa9 | [
"MIT"
] | null | null | null | examples/04relative-nested/app/config.py | podhmo/magicalimport | b9c516d9d134ca578a85f934caa8c9f9ce6b4fa9 | [
"MIT"
] | 9 | 2016-10-01T15:25:20.000Z | 2021-02-18T05:25:43.000Z | examples/04relative-nested/app/config.py | podhmo/magicalimport | b9c516d9d134ca578a85f934caa8c9f9ce6b4fa9 | [
"MIT"
] | 1 | 2017-07-19T12:38:56.000Z | 2017-07-19T12:38:56.000Z | from . import shapes # this is OK
# "import shapes" is NG, because this module not in sys.path
# ModuleNotFoundError: No module named 'shapes'
# see also: ../../03relative/config.py
config = shapes.Config(host="localhost", port=44444)
| 29.75 | 60 | 0.722689 |
128cd18f26a885dbdb8dee324092bc3877e18ef7 | 8,175 | py | Python | src/schedule/algorithms/bf.py | HiEST/gpu-topo-aware | 8125c2875ad942b9cecd9d5178062ee0d5100d04 | [
"Apache-2.0"
] | 7 | 2019-02-28T09:53:59.000Z | 2022-01-06T06:18:02.000Z | src/schedule/algorithms/bf.py | HiEST/gpu-topo-aware | 8125c2875ad942b9cecd9d5178062ee0d5100d04 | [
"Apache-2.0"
] | null | null | null | src/schedule/algorithms/bf.py | HiEST/gpu-topo-aware | 8125c2875ad942b9cecd9d5178062ee0d5100d04 | [
"Apache-2.0"
] | 4 | 2018-05-06T14:42:10.000Z | 2021-11-30T03:28:49.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# The second queue is used to add the jobs that could not be placed in the current scenario, e.g. load. This queue
# is defined to have priority against the former queue.
#
# Copyright © 2017 Marcelo Amaral <marcelo.amaral@bsc.es>
import copy
import random
random.seed(1234)... | 45.165746 | 122 | 0.539572 |
2452d0e5b744fcd399f14d8b147a42e7bcd90220 | 1,931 | py | Python | skmultilearn/problem_transform/__init__.py | emrecncelik/scikit-multilearn | 1d7f7b74702cb9a5a8245726bf38e23e1f2f3382 | [
"BSD-2-Clause"
] | 763 | 2015-03-22T18:54:33.000Z | 2022-03-25T07:54:04.000Z | skmultilearn/problem_transform/__init__.py | emrecncelik/scikit-multilearn | 1d7f7b74702cb9a5a8245726bf38e23e1f2f3382 | [
"BSD-2-Clause"
] | 187 | 2015-01-27T15:06:35.000Z | 2022-03-22T21:41:47.000Z | skmultilearn/problem_transform/__init__.py | emrecncelik/scikit-multilearn | 1d7f7b74702cb9a5a8245726bf38e23e1f2f3382 | [
"BSD-2-Clause"
] | 157 | 2015-04-13T16:47:36.000Z | 2022-03-17T19:12:59.000Z | """
The :mod:`skmultilearn.problem_transform` module provides classifiers
that follow the problem transformation approaches to multi-label classification.
The problem transformation approach to multi-label classification converts multi-label problems to
single-label problems: single-class or multi-class.
+----------... | 58.515152 | 109 | 0.397204 |
fb80e583de6a468b2474efa1dcfc20d1531d5aeb | 49,050 | py | Python | src/data_processor/data_processor.py | krezac/tesla-race-analyzer | d86c18f335abea3801335dd8bcd58b9b35b487fe | [
"MIT"
] | 1 | 2021-01-27T23:26:49.000Z | 2021-01-27T23:26:49.000Z | src/data_processor/data_processor.py | krezac/tesla-race-analyzer | d86c18f335abea3801335dd8bcd58b9b35b487fe | [
"MIT"
] | 1 | 2021-01-05T10:58:15.000Z | 2021-01-05T10:58:15.000Z | src/data_processor/data_processor.py | krezac/tesla-race-analyzer | d86c18f335abea3801335dd8bcd58b9b35b487fe | [
"MIT"
] | null | null | null | import pendulum
from typing import Dict, Any, List, Optional, Callable
from pydantic import BaseModel
import src.data_source.teslamate
from src.data_processor.labels import generate_labels
from src.data_models import Configuration, JsonLabelItem, JsonLabelGroup, JsonStatusResponse, JsonLapsResponse, JsonStaticSnapshot,... | 49.898271 | 155 | 0.556126 |
65a88d1023787306aa9049cdc3bbaba633827c47 | 242 | py | Python | CodeForces/Round555Div3/A.py | takaaki82/Java-Lessons | c4f11462bf84c091527dde5f25068498bfb2cc49 | [
"MIT"
] | 1 | 2018-11-25T04:15:45.000Z | 2018-11-25T04:15:45.000Z | CodeForces/Round555Div3/A.py | takaaki82/Java-Lessons | c4f11462bf84c091527dde5f25068498bfb2cc49 | [
"MIT"
] | null | null | null | CodeForces/Round555Div3/A.py | takaaki82/Java-Lessons | c4f11462bf84c091527dde5f25068498bfb2cc49 | [
"MIT"
] | 2 | 2018-08-08T13:01:14.000Z | 2018-11-25T12:38:36.000Z | N = int(input())
def f(x):
x += 1
x = str(x)
while x[-1] == "0":
x = x[:-1]
return x
prev = set()
prev.add(N)
n = N
while int(f(n)) not in prev:
tmp = int(f(n))
prev.add(tmp)
n = tmp
print(len(prev))
| 11 | 28 | 0.450413 |
79be4714235b94387059ea08d71c56821b5d4dba | 397 | py | Python | back_front/back_front/wsgi.py | LaraEvdokimova/Aviato | 93084b70f5fae86997228878fd3b093b588d6d46 | [
"Apache-2.0"
] | null | null | null | back_front/back_front/wsgi.py | LaraEvdokimova/Aviato | 93084b70f5fae86997228878fd3b093b588d6d46 | [
"Apache-2.0"
] | null | null | null | back_front/back_front/wsgi.py | LaraEvdokimova/Aviato | 93084b70f5fae86997228878fd3b093b588d6d46 | [
"Apache-2.0"
] | 1 | 2020-06-06T15:54:05.000Z | 2020-06-06T15:54:05.000Z | """
WSGI config for back_front project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SE... | 23.352941 | 78 | 0.788413 |
eb9ebff865dc0c09c66751b6b918907cbc7e008d | 2,244 | py | Python | tokens/views.py | salimsuleiman/plt | b0a4fdbb5e765518e44440f12ef306a7aa60c382 | [
"MIT"
] | 2 | 2022-03-25T09:22:54.000Z | 2022-03-30T19:57:42.000Z | tokens/views.py | salimsuleiman/plt | b0a4fdbb5e765518e44440f12ef306a7aa60c382 | [
"MIT"
] | null | null | null | tokens/views.py | salimsuleiman/plt | b0a4fdbb5e765518e44440f12ef306a7aa60c382 | [
"MIT"
] | 1 | 2022-03-30T19:58:54.000Z | 2022-03-30T19:58:54.000Z | from rest_framework.response import Response
from rest_framework.decorators import api_view
from .models import Token, TokenBlackList
import jwt
from rest_framework import status
from .serializers import TokenSerializer
from wallets.serializers import WalletSerializers
from users.serializers import UserSerializer
from ... | 44.88 | 120 | 0.697415 |
fd9d2340fc4a7fd50aee82e5af243013c65aa011 | 136 | py | Python | dnsagent/__init__.py | account-login/dnsagent | c27235c5234d13a0f5d6e3b7735ff35d73d121d0 | [
"MIT"
] | 2 | 2020-02-05T08:49:31.000Z | 2020-03-19T19:04:46.000Z | dnsagent/__init__.py | account-login/dnsagent | c27235c5234d13a0f5d6e3b7735ff35d73d121d0 | [
"MIT"
] | null | null | null | dnsagent/__init__.py | account-login/dnsagent | c27235c5234d13a0f5d6e3b7735ff35d73d121d0 | [
"MIT"
] | null | null | null | """
A configurable dns proxy powered by twisted.
"""
import logging
logger = logging.getLogger(__name__)
__version__ = '0.2.1.dev0'
| 12.363636 | 44 | 0.720588 |
8503993b399c99888607e58d0bb04a96efebd220 | 16,178 | py | Python | Tools/Scripts/webkitpy/w3c/test_converter_unittest.py | igordmn/blink-typo | 4b25f34cb6580373beb900fd46886e05604fe6c3 | [
"BSD-3-Clause"
] | null | null | null | Tools/Scripts/webkitpy/w3c/test_converter_unittest.py | igordmn/blink-typo | 4b25f34cb6580373beb900fd46886e05604fe6c3 | [
"BSD-3-Clause"
] | null | null | null | Tools/Scripts/webkitpy/w3c/test_converter_unittest.py | igordmn/blink-typo | 4b25f34cb6580373beb900fd46886e05604fe6c3 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above
# copyright n... | 37.623256 | 198 | 0.682594 |
0df6348f6b637f5b31e1a8e22c7590dac5c47d31 | 3,967 | py | Python | alipay/aop/api/request/AlipayPayCodecQrcodecacheAddRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AlipayPayCodecQrcodecacheAddRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AlipayPayCodecQrcodecacheAddRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayPayCodecQrcodecacheAddModel import AlipayPayCodecQrcodecacheAddModel
class AlipayPayCodecQrcodecacheAddRequest(object):
d... | 27.358621 | 148 | 0.644316 |
bccab32b5543cb1fd57f6756f1a1383bff7a08cb | 424 | py | Python | configs/selfsup/_base_/datasets/imagenet100/mocov3_cnn_sz224_bs64.py | Westlake-AI/openmixup | ea81250819e740dd823e30cb7ce382d14a3c1b91 | [
"Apache-2.0"
] | 10 | 2021-12-30T10:22:27.000Z | 2022-03-30T02:31:38.000Z | configs/selfsup/_base_/datasets/imagenet100/mocov3_cnn_sz224_bs64.py | Westlake-AI/openmixup | ea81250819e740dd823e30cb7ce382d14a3c1b91 | [
"Apache-2.0"
] | 3 | 2022-01-20T21:02:48.000Z | 2022-03-19T13:49:45.000Z | configs/selfsup/_base_/datasets/imagenet100/mocov3_cnn_sz224_bs64.py | Westlake-AI/openmixup | ea81250819e740dd823e30cb7ce382d14a3c1b91 | [
"Apache-2.0"
] | null | null | null | _base_ = '../imagenet/mocov3_cnn_sz224_bs64.py'
# dataset settings
data_source_cfg = dict(type='ImageNet', return_label=False)
# ImageNet dataset, 100 class
data_train_list = 'data/meta/ImageNet100/train.txt'
data_train_root = 'data/ImageNet/train'
# dataset summary
data = dict(
train=dict(
data_source=di... | 26.5 | 60 | 0.709906 |
0ef33fe4c7deea448911316b631b051d5a7857c4 | 1,226 | py | Python | app/models/items.py | boconlonton/python-fastapi-tutorial | ff3d08730e948e7cc972ecd1d9a55e7cc75fe335 | [
"MIT"
] | null | null | null | app/models/items.py | boconlonton/python-fastapi-tutorial | ff3d08730e948e7cc972ecd1d9a55e7cc75fe335 | [
"MIT"
] | null | null | null | app/models/items.py | boconlonton/python-fastapi-tutorial | ff3d08730e948e7cc972ecd1d9a55e7cc75fe335 | [
"MIT"
] | null | null | null | from typing import Optional
from typing import Set
from typing import List
from pydantic import BaseModel
from pydantic import Field
from pydantic import HttpUrl
class Image(BaseModel):
url: HttpUrl
name: str
class Item(BaseModel):
"""Contains the definition of the item"""
name: str
description... | 28.511628 | 76 | 0.541599 |
7da05ec453a26d3c4d3b1d509f059692c970fac9 | 10,656 | py | Python | src/datamodules/mri_datamodule.py | MohammedAljahdali/mental-disorder-brain-mri | 0b6a348e0d741f363e7806a8aacefd1ef59a5ee6 | [
"MIT"
] | null | null | null | src/datamodules/mri_datamodule.py | MohammedAljahdali/mental-disorder-brain-mri | 0b6a348e0d741f363e7806a8aacefd1ef59a5ee6 | [
"MIT"
] | null | null | null | src/datamodules/mri_datamodule.py | MohammedAljahdali/mental-disorder-brain-mri | 0b6a348e0d741f363e7806a8aacefd1ef59a5ee6 | [
"MIT"
] | null | null | null | from typing import Optional, Tuple
from pytorch_lightning import LightningDataModule
from torch.utils.data import DataLoader, Dataset, random_split
from torchvision.transforms import transforms
from src.datamodules.datasets.brian_scans_t1w import BrianScansT1w
from src.utils.utils import calculate_mean
from sklearn.mo... | 50.985646 | 106 | 0.621997 |
b9e8ef1abcac155ebe5f904f3c274048ada2725d | 4,324 | py | Python | homeassistant/components/adax/config_flow.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | homeassistant/components/adax/config_flow.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 24,710 | 2016-04-13T08:27:26.000Z | 2020-03-02T12:59:13.000Z | homeassistant/components/adax/config_flow.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """Config flow for Adax integration."""
from __future__ import annotations
import logging
from typing import Any
import adax
import adax_local
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.const import (
CONF_IP_ADDRESS,
CONF_PASSWORD,
CONF_TOKEN,
CONF_UNIQUE_ID... | 29.82069 | 81 | 0.593663 |
81c33fd117135c3d1d6a9bcebae6840224dc8e13 | 15,475 | py | Python | econml/tests/test_bootstrap.py | SpencerCompton/EconML | 35c5418618d4ca9828f5465c090dd17e5e9a263c | [
"BSD-3-Clause"
] | null | null | null | econml/tests/test_bootstrap.py | SpencerCompton/EconML | 35c5418618d4ca9828f5465c090dd17e5e9a263c | [
"BSD-3-Clause"
] | null | null | null | econml/tests/test_bootstrap.py | SpencerCompton/EconML | 35c5418618d4ca9828f5465c090dd17e5e9a263c | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from econml.bootstrap import BootstrapEstimator
from econml.inference import BootstrapInference
from econml.dml import LinearDML
from econml.ortho_iv import LinearIntentToTreatDRIV
from econml.two_stage_least_squares import N... | 46.611446 | 112 | 0.587334 |
6036c4c88d2f0b7694d189829fd0d72400f900b6 | 4,933 | py | Python | venv/Lib/site-packages/flask_api/app.py | matuhn/FPT-Capstone | d67217b77ce723136bafd436e664a6d9fa4fb00b | [
"MIT"
] | 1 | 2021-05-07T13:07:47.000Z | 2021-05-07T13:07:47.000Z | venv/Lib/site-packages/flask_api/app.py | matuhn/FPT-Capstone | d67217b77ce723136bafd436e664a6d9fa4fb00b | [
"MIT"
] | 2 | 2021-05-07T12:58:34.000Z | 2021-06-12T22:17:07.000Z | venv/Lib/site-packages/flask_api/app.py | matuhn/FPT-Capstone | d67217b77ce723136bafd436e664a6d9fa4fb00b | [
"MIT"
] | 2 | 2021-04-22T08:20:28.000Z | 2022-01-11T01:13:29.000Z | # coding: utf8
from __future__ import unicode_literals
from flask import request, Flask, Blueprint
from flask._compat import reraise, string_types, text_type
from flask_api.exceptions import APIException
from flask_api.request import APIRequest
from flask_api.response import APIResponse
from flask_api.settings import A... | 37.090226 | 78 | 0.647071 |
2e4f416f372b8c428f380961959b7fcb4589c7ea | 9,615 | py | Python | resources/scripts/documentation/conf.py | DerekMRoberts93/PromptAdminWebsite | b2eb455f4825ff3efc498e0df693101f898e8fb0 | [
"MIT"
] | null | null | null | resources/scripts/documentation/conf.py | DerekMRoberts93/PromptAdminWebsite | b2eb455f4825ff3efc498e0df693101f898e8fb0 | [
"MIT"
] | null | null | null | resources/scripts/documentation/conf.py | DerekMRoberts93/PromptAdminWebsite | b2eb455f4825ff3efc498e0df693101f898e8fb0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# MongoDB API documentation build configuration file, created by
# sphinx-quickstart on Mon Jun 20 16:00:31 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 file.
#... | 28.616071 | 80 | 0.702444 |
046042090287d045c8a937a80260878e3eb34bcd | 3,741 | py | Python | moksha/hub/amqp/qpid010.py | lmacken/moksha | b75325b8fd0fb3ea2d393ddb81c27f32ae7e0b96 | [
"Apache-2.0"
] | 1 | 2019-06-27T11:36:50.000Z | 2019-06-27T11:36:50.000Z | moksha/hub/amqp/qpid010.py | lmacken/moksha | b75325b8fd0fb3ea2d393ddb81c27f32ae7e0b96 | [
"Apache-2.0"
] | null | null | null | moksha/hub/amqp/qpid010.py | lmacken/moksha | b75325b8fd0fb3ea2d393ddb81c27f32ae7e0b96 | [
"Apache-2.0"
] | null | null | null | # This file is part of Moksha.
# Copyright (C) 2008-2010 Red Hat, 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 b... | 37.039604 | 76 | 0.62363 |
4baf4cb66c1767a160add23924fc109fe46abc20 | 27,548 | py | Python | python/ccxt/coinmate.py | evgenyfedorenko/ccxt | 97874a8562026087c836a269246ce27665113497 | [
"MIT"
] | null | null | null | python/ccxt/coinmate.py | evgenyfedorenko/ccxt | 97874a8562026087c836a269246ce27665113497 | [
"MIT"
] | null | null | null | python/ccxt/coinmate.py | evgenyfedorenko/ccxt | 97874a8562026087c836a269246ce27665113497 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import ArgumentsRequired
from ccxt... | 38.691011 | 174 | 0.46301 |
fbc6fae520f1b570bd139df8fdbf83665d30280d | 461 | py | Python | Main_FusionLeafs.py | ransalmo/data-augmentation-scripts | d4f298c31b60cbc65ca2bee0f352497cd4cb0091 | [
"MIT"
] | null | null | null | Main_FusionLeafs.py | ransalmo/data-augmentation-scripts | d4f298c31b60cbc65ca2bee0f352497cd4cb0091 | [
"MIT"
] | null | null | null | Main_FusionLeafs.py | ransalmo/data-augmentation-scripts | d4f298c31b60cbc65ca2bee0f352497cd4cb0091 | [
"MIT"
] | null | null | null | import fusion_leaf.fusion_leaf_stains
leaf_source_folder = "/Users/randysalas/Desktop/data/healthy"
stains_source_folder = "/Users/randysalas/Desktop/data/strains"
destiny_folder = "/Users/randysalas/Desktop/data/generated"
to_generate = 2500
fusion_leaf.fusion_leaf_stains.generate_synthetic_images(leaf_source_fol... | 28.8125 | 119 | 0.737527 |
5484b1d8092fd3604039bb46b2b6851892e1648f | 6,521 | py | Python | tensorflow/tools/test/gpu_info_lib.py | uve/tensorflow | e08079463bf43e5963acc41da1f57e95603f8080 | [
"Apache-2.0"
] | null | null | null | tensorflow/tools/test/gpu_info_lib.py | uve/tensorflow | e08079463bf43e5963acc41da1f57e95603f8080 | [
"Apache-2.0"
] | null | null | null | tensorflow/tools/test/gpu_info_lib.py | uve/tensorflow | e08079463bf43e5963acc41da1f57e95603f8080 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 35.82967 | 81 | 0.636405 |
fea6ec906ee8fe17a40dad9a77ad927c093d9a4b | 328 | py | Python | SmtApi/session/session.py | Inaruslynx/SmtApi | 09ecc20cb0e40f2693c67740191a570952e86b39 | [
"MIT"
] | null | null | null | SmtApi/session/session.py | Inaruslynx/SmtApi | 09ecc20cb0e40f2693c67740191a570952e86b39 | [
"MIT"
] | 2 | 2021-01-15T17:23:45.000Z | 2021-01-21T16:46:14.000Z | SmtApi/session/session.py | Inaruslynx/SmtApi | 09ecc20cb0e40f2693c67740191a570952e86b39 | [
"MIT"
] | null | null | null | from typing import Tuple
import requests
class SmtApiSession(requests.Session):
def __init__(self, *args, **kwargs):
super(SmtApiSession, self).__init__(*args, **kwargs)
def init_basic_auth(self, username:str, password:str, cert:Tuple):
self.auth = (username, password)
self.cert... | 23.428571 | 70 | 0.676829 |
5b692607b89ac3e2e516a39298d95567250c2ee6 | 11,160 | py | Python | tests/command tests/test_post_one_page.py | VTimofeenko/confluence_poster | 4c09d487662540d5e6b3e8cde754dc766c12d4f3 | [
"MIT"
] | 2 | 2021-06-01T05:30:11.000Z | 2022-03-12T18:40:39.000Z | tests/command tests/test_post_one_page.py | VTimofeenko/confluence_poster | 4c09d487662540d5e6b3e8cde754dc766c12d4f3 | [
"MIT"
] | 36 | 2020-12-22T03:36:33.000Z | 2021-09-09T16:06:36.000Z | tests/command tests/test_post_one_page.py | SabbathHex/confluence_poster | 4c09d487662540d5e6b3e8cde754dc766c12d4f3 | [
"MIT"
] | null | null | null | from typer.testing import CliRunner
import pytest
from confluence_poster.main import app
from utils import (
clone_local_config,
generate_run_cmd,
real_confluence_config,
real_config,
confluence_instance,
mk_fake_file,
page_created,
fake_title_generator,
get_page_body,
get_page_t... | 37.830508 | 116 | 0.678315 |
2b27d8f5dd96a399689bc536a4267de5b6e3fe08 | 672 | py | Python | MatchMe-New/old/server/Accounts/urls.py | joonyoungleeduke/MatchMe | 8ff6aeff06e5b8d6a83c531e9992a7b14f6fc074 | [
"MIT"
] | null | null | null | MatchMe-New/old/server/Accounts/urls.py | joonyoungleeduke/MatchMe | 8ff6aeff06e5b8d6a83c531e9992a7b14f6fc074 | [
"MIT"
] | null | null | null | MatchMe-New/old/server/Accounts/urls.py | joonyoungleeduke/MatchMe | 8ff6aeff06e5b8d6a83c531e9992a7b14f6fc074 | [
"MIT"
] | null | null | null | from django.urls import path, include
from Accounts.views import RegisterViewSet, LogoutView, UserViewSet
from rest_framework_simplejwt import views as jwt_views
user_create = RegisterViewSet.as_view({
'post': 'create',
})
user_id = UserViewSet.as_view({
'get': 'get_user_id',
})
urlpatterns = [
path('us... | 37.333333 | 106 | 0.71875 |
9c9c23302e36abc4f6f1413ad08d3fb87aef5d47 | 1,096 | py | Python | step3_benchmark_analysis/get_tuning_curves.py | njw0709/ShapeY | f2272f799fe779c3e4b3d0d06e88ecde9e4b039c | [
"MIT"
] | 1 | 2022-03-22T17:19:57.000Z | 2022-03-22T17:19:57.000Z | step3_benchmark_analysis/get_tuning_curves.py | njw0709/ShapeY | f2272f799fe779c3e4b3d0d06e88ecde9e4b039c | [
"MIT"
] | null | null | null | step3_benchmark_analysis/get_tuning_curves.py | njw0709/ShapeY | f2272f799fe779c3e4b3d0d06e88ecde9e4b039c | [
"MIT"
] | null | null | null | from shapey.dataprocess.raw_data import AllImgPairCorrelationData, PostProcessedAllImgPairCorrelationData
from shapey.utils.configs import ShapeYConfig
from hydra import compose, initialize
import logging
log = logging.getLogger(__name__)
def get_tuning_curve(args: ShapeYConfig) -> None:
input_name = args.pipeline... | 42.153846 | 105 | 0.736314 |
4d1b7661b9b8b26a6da850d1997b03b6e695c163 | 19,446 | py | Python | meeus.py | mcoatanhay/meeuscalc | 707f7332944220330d4fc7608e7cba928a0b60db | [
"MIT"
] | null | null | null | meeus.py | mcoatanhay/meeuscalc | 707f7332944220330d4fc7608e7cba928a0b60db | [
"MIT"
] | null | null | null | meeus.py | mcoatanhay/meeuscalc | 707f7332944220330d4fc7608e7cba928a0b60db | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# Fichier: meeus.py
# Auteur: Marc COATANHAY
"""
Implémentation des "calculs astronomiques à l'usage des amateurs"
de Jean MEEUS, édition 2014.
"""
# Import des modules
try:
import mes_modules_path
except:
pass
import coordonnees.coord as coord
import etoiles... | 32.903553 | 83 | 0.539803 |
3080a1bcb974dd6a80efc890a746aeb2806018cf | 670 | py | Python | pytorch3d/transforms/__init__.py | michele-arrival/pytorch3d | f358b9b14dbc1414c588f308b35f55705d777873 | [
"BSD-3-Clause"
] | 2 | 2020-02-08T07:08:45.000Z | 2020-02-19T16:31:06.000Z | pytorch3d/transforms/__init__.py | michele-arrival/pytorch3d | f358b9b14dbc1414c588f308b35f55705d777873 | [
"BSD-3-Clause"
] | null | null | null | pytorch3d/transforms/__init__.py | michele-arrival/pytorch3d | f358b9b14dbc1414c588f308b35f55705d777873 | [
"BSD-3-Clause"
] | 1 | 2020-12-12T20:42:33.000Z | 2020-12-12T20:42:33.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
from .rotation_conversions import (
euler_angles_to_matrix,
matrix_to_euler_angles,
matrix_to_quaternion,
quaternion_apply,
quaternion_invert,
quaternion_multiply,
quaternion_raw_multiply,
quaternion_to_matrix,
... | 25.769231 | 79 | 0.749254 |
d68a008f08da788d6b6f67f568b9cd909dce6aeb | 16,875 | py | Python | mitmproxy/net/tls.py | asfaltboy/mitmproxy | f245d247674b0d7c7cca327cd2be5a0bcf01b27d | [
"MIT"
] | 1 | 2020-03-05T19:46:30.000Z | 2020-03-05T19:46:30.000Z | mitmproxy/net/tls.py | asfaltboy/mitmproxy | f245d247674b0d7c7cca327cd2be5a0bcf01b27d | [
"MIT"
] | 2 | 2021-09-02T02:29:12.000Z | 2021-12-08T08:49:45.000Z | mitmproxy/net/tls.py | asfaltboy/mitmproxy | f245d247674b0d7c7cca327cd2be5a0bcf01b27d | [
"MIT"
] | null | null | null | # To enable all SSL methods use: SSLv23
# then add options to disable certain methods
# https://bugs.launchpad.net/pyopenssl/+bug/1020632/comments/3
import binascii
import io
import os
import struct
import threading
import typing
from ssl import match_hostname, CertificateError
import certifi
from OpenSSL import SSL
f... | 35.010373 | 116 | 0.630044 |
2bf04020b9639d669e1fef127e70214940105174 | 6,144 | py | Python | src/lib/unittest/__init__.py | danmed71/skulpt | 8dd42cf25511307082dabb6341aeaccfb505b120 | [
"MIT"
] | null | null | null | src/lib/unittest/__init__.py | danmed71/skulpt | 8dd42cf25511307082dabb6341aeaccfb505b120 | [
"MIT"
] | null | null | null | src/lib/unittest/__init__.py | danmed71/skulpt | 8dd42cf25511307082dabb6341aeaccfb505b120 | [
"MIT"
] | null | null | null | __author__ = 'bmiller'
'''
This is the start of something that behaves like
the unittest module from cpython.
'''
class TestCase:
def __init__(self):
self.numPassed = 0
self.numFailed = 0
self.assertPassed = 0
self.assertFailed = 0
self.verbose = True
self.tlist = [... | 33.032258 | 96 | 0.558268 |
d55117979232cc6b0baf9cc597f59cd7054539f6 | 4,537 | py | Python | msgraph/cli/command_modules/usersfunctions/azext_usersfunctions/vendored_sdks/usersfunctions/aio/operations/_usersonenotepagesparentsectionpages_operations.py | microsoftgraph/msgraph-cli-archived | 489f70bf4ede1ce67b84bfb31e66da3e4db76062 | [
"MIT"
] | null | null | null | msgraph/cli/command_modules/usersfunctions/azext_usersfunctions/vendored_sdks/usersfunctions/aio/operations/_usersonenotepagesparentsectionpages_operations.py | microsoftgraph/msgraph-cli-archived | 489f70bf4ede1ce67b84bfb31e66da3e4db76062 | [
"MIT"
] | 22 | 2022-03-29T22:54:37.000Z | 2022-03-29T22:55:27.000Z | msgraph/cli/command_modules/usersfunctions/azext_usersfunctions/vendored_sdks/usersfunctions/aio/operations/_usersonenotepagesparentsectionpages_operations.py | microsoftgraph/msgraph-cli-archived | 489f70bf4ede1ce67b84bfb31e66da3e4db76062 | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 44.048544 | 161 | 0.677761 |
542377c46ac01a50a3e859b5246f6f51c354dab0 | 18,516 | py | Python | mlpf/tfmodel/utils.py | luqiang21/particleflow | a78ca76fd0b58fce0dc12ca307e3d3fe0be351ef | [
"Apache-2.0"
] | null | null | null | mlpf/tfmodel/utils.py | luqiang21/particleflow | a78ca76fd0b58fce0dc12ca307e3d3fe0be351ef | [
"Apache-2.0"
] | null | null | null | mlpf/tfmodel/utils.py | luqiang21/particleflow | a78ca76fd0b58fce0dc12ca307e3d3fe0be351ef | [
"Apache-2.0"
] | 2 | 2020-11-23T11:11:27.000Z | 2021-12-02T20:14:56.000Z | import os
import yaml
from pathlib import Path
import datetime
import platform
import random
import glob
import numpy as np
from tqdm import tqdm
import re
import logging
import tensorflow as tf
import tensorflow_addons as tfa
import keras_tuner as kt
from .data import Dataset
from .onecycle_scheduler import OneCycle... | 36.37721 | 153 | 0.640311 |
2c004bfc253190c94fa11b24f7cff3f8a7d5e1fe | 295 | py | Python | examples/plot_sequence_distribution.py | pysan-dev/pysan_classic | 27f6133bc0c5d299376e8d181fc7fcdee73bc657 | [
"BSD-3-Clause"
] | 1 | 2021-09-12T09:46:55.000Z | 2021-09-12T09:46:55.000Z | examples/plot_sequence_distribution.py | pysan-dev/pysan_classic | 27f6133bc0c5d299376e8d181fc7fcdee73bc657 | [
"BSD-3-Clause"
] | null | null | null | examples/plot_sequence_distribution.py | pysan-dev/pysan_classic | 27f6133bc0c5d299376e8d181fc7fcdee73bc657 | [
"BSD-3-Clause"
] | null | null | null | """
Create a sequence distribution plot
==================================================
Objective
------------
write objective here
Solution
------------
write solution here
"""
import pysan as ps
sequence = [1,1,1,2,2,3,2,2,3,3,2,1,1,2,3,3,3,2,2,2,3,2,1,1]
ps.plot_sequence(sequence) | 14.047619 | 60 | 0.518644 |
ba24a66e1e601cf490c65ffadf41d1e3029733c1 | 12,137 | py | Python | fhir/lung-cancer/inference/main.py | kourtneyshort/healthcare | 1d1e2375304ac99f43a8b6aee7374fcdf641eb6f | [
"Apache-2.0"
] | 310 | 2018-02-23T01:40:01.000Z | 2022-03-30T12:25:56.000Z | fhir/lung-cancer/inference/main.py | kourtneyshort/healthcare | 1d1e2375304ac99f43a8b6aee7374fcdf641eb6f | [
"Apache-2.0"
] | 189 | 2018-06-19T15:32:10.000Z | 2022-03-11T23:48:14.000Z | fhir/lung-cancer/inference/main.py | animesh/healthcare | 7d3d4dc9deb3d31eab99035780ccb9a44f00b687 | [
"Apache-2.0"
] | 165 | 2018-03-06T19:29:18.000Z | 2022-03-21T10:53:45.000Z | #!/usr/bin/python3
#
# 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 a... | 32.980978 | 92 | 0.681552 |
93244c8e8eaef4e4fc43d8454d2947ad58fd8cec | 929 | py | Python | series/migrations/0007_auto_20191108_1134.py | AdventistChurchFinland/hopechannel-wagtail | b5b06e0696a929d5d2e29a368002d27f54a8ff75 | [
"MIT"
] | null | null | null | series/migrations/0007_auto_20191108_1134.py | AdventistChurchFinland/hopechannel-wagtail | b5b06e0696a929d5d2e29a368002d27f54a8ff75 | [
"MIT"
] | 9 | 2020-06-05T23:26:12.000Z | 2021-06-17T20:23:14.000Z | series/migrations/0007_auto_20191108_1134.py | AdventistChurchFinland/hopechannel-wagtail | b5b06e0696a929d5d2e29a368002d27f54a8ff75 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.7 on 2019-11-08 09:34
from django.db import migrations
import wagtail.core.blocks
import wagtail.core.fields
class Migration(migrations.Migration):
dependencies = [
('series', '0006_auto_20191108_1130'),
]
operations = [
migrations.AlterField(
model... | 44.238095 | 543 | 0.710441 |
7c7952b68dd75ae1d37c6909ac182fcfc8f2efd0 | 1,010 | py | Python | isi_sdk_8_0/test/test_directory_query_scope_conditions.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_0/test/test_directory_query_scope_conditions.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_0/test/test_directory_query_scope_conditions.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 3
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import isi_sdk_8_0
from isi... | 24.634146 | 115 | 0.736634 |
17a8304ef845e9cc03cb7439986746111e5622ac | 3,499 | py | Python | setup.py | wholesomegarden/WhatsappReminder | c6814c28b78738e36f2a82df65c4bc6714ce68da | [
"MIT"
] | 1 | 2021-05-04T10:19:51.000Z | 2021-05-04T10:19:51.000Z | setup.py | wholesomegarden/WhatsappReminder | c6814c28b78738e36f2a82df65c4bc6714ce68da | [
"MIT"
] | null | null | null | setup.py | wholesomegarden/WhatsappReminder | c6814c28b78738e36f2a82df65c4bc6714ce68da | [
"MIT"
] | null | null | null | """A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
import ast
# To use a consistent encoding
from codecs import open
import os
# Always prefer setuptools over distutils
from setuptools import setup
PACKAGE_NAME = "webwhatsapi"... | 32.700935 | 87 | 0.614175 |
e9a279c180121cd8181ad75f27df46b8cccff288 | 9,784 | py | Python | chemlearning_data/gaussian_job.py | chemistry-scripts/chemlearning_data | f57425c063b9cfeccfc7f5e5d356bd3906b2a0db | [
"MIT"
] | null | null | null | chemlearning_data/gaussian_job.py | chemistry-scripts/chemlearning_data | f57425c063b9cfeccfc7f5e5d356bd3906b2a0db | [
"MIT"
] | null | null | null | chemlearning_data/gaussian_job.py | chemistry-scripts/chemlearning_data | f57425c063b9cfeccfc7f5e5d356bd3906b2a0db | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2019, E. Nicolas
"""Gaussian Job class to start job, run it and analyze it"""
import logging
import os
import shutil
from cclib.io import ccread
from cclib.parser.utils import PeriodicTable
class GaussianJob:
"""
Class that can be used as a conta... | 32.290429 | 96 | 0.554783 |
1c8cc8d777e6b8f4987676a9eea7431921cccc64 | 2,148 | py | Python | KAMC 2021.1.0.3-^.py | ArdaKC/KAMC | 5a0d5fc5fda0ef2de3488e5a76d25043c7998c1c | [
"MIT"
] | 6 | 2021-06-04T05:27:08.000Z | 2021-08-23T09:20:16.000Z | KAMC 2021.1.0.3-^.py | ArdaKC/KAMC | 5a0d5fc5fda0ef2de3488e5a76d25043c7998c1c | [
"MIT"
] | null | null | null | KAMC 2021.1.0.3-^.py | ArdaKC/KAMC | 5a0d5fc5fda0ef2de3488e5a76d25043c7998c1c | [
"MIT"
] | null | null | null | from io import StringIO
import os
import os.path
print("KCS Auto MacChanger 2021.1.0.3-^")
print("Gerekli paketleri kurdukdan sonra macı değiştirmek için 1 yazın. : Sadece Mac Değiştirmek İçin 2 Yazın : Metin belgesine ağ aygıtını kaydetmek için 3 : Kayıt Edilmiş Ağ Cihazını Kullanmak için 4 : Hakkında Kısmına Bakmak İ... | 39.777778 | 243 | 0.702048 |
8a0a883617409b051074e5c530b894b9d9038cfa | 4,463 | py | Python | purity_fb/purity_fb_1dot3/models/admin_response.py | tlewis-ps/purity_fb_python_client | 652835cbd485c95a86da27f8b661679727ec6ea0 | [
"Apache-2.0"
] | 5 | 2017-09-08T20:47:22.000Z | 2021-06-29T02:11:05.000Z | purity_fb/purity_fb_1dot3/models/admin_response.py | tlewis-ps/purity_fb_python_client | 652835cbd485c95a86da27f8b661679727ec6ea0 | [
"Apache-2.0"
] | 16 | 2017-11-27T20:57:48.000Z | 2021-11-23T18:46:43.000Z | purity_fb/purity_fb_1dot3/models/admin_response.py | tlewis-ps/purity_fb_python_client | 652835cbd485c95a86da27f8b661679727ec6ea0 | [
"Apache-2.0"
] | 22 | 2017-10-13T15:33:05.000Z | 2021-11-08T19:56:21.000Z | # coding: utf-8
"""
Pure Storage FlashBlade REST 1.3 Python SDK
Pure Storage FlashBlade REST 1.3 Python SDK, developed by [Pure Storage, Inc](http://www.purestorage.com/). Documentations can be found at [purity-fb.readthedocs.io](http://purity-fb.readthedocs.io/).
OpenAPI spec version: 1.3
Contact: i... | 29.556291 | 204 | 0.594219 |
d9411baf0e9c69075296b7f145a16c985fea89bd | 4,221 | py | Python | editor/editor.py | kennnyshiwa/Toxic-Cogs | 0d547fde220b7e2dc69e4a77403e187f26725e4b | [
"MIT"
] | null | null | null | editor/editor.py | kennnyshiwa/Toxic-Cogs | 0d547fde220b7e2dc69e4a77403e187f26725e4b | [
"MIT"
] | null | null | null | editor/editor.py | kennnyshiwa/Toxic-Cogs | 0d547fde220b7e2dc69e4a77403e187f26725e4b | [
"MIT"
] | null | null | null | from redbot.core import commands, checks
from typing import Union
import discord
class Editor(commands.Cog):
"""Allows for Administrators to edit a bot's messages by providing the new content or by copying another message"""
def __init__(self, bot):
self.bot = bot
@commands.command()
@checks... | 46.384615 | 215 | 0.619995 |
fe52ead09047d942e3b32d89f52e11966e254a02 | 21,395 | py | Python | msticpy/sectools/iocextract.py | Dqirvin/msticpy | 9c9f54b755bf4f2b917f30b41ab2336caf102f3e | [
"MIT"
] | null | null | null | msticpy/sectools/iocextract.py | Dqirvin/msticpy | 9c9f54b755bf4f2b917f30b41ab2336caf102f3e | [
"MIT"
] | null | null | null | msticpy/sectools/iocextract.py | Dqirvin/msticpy | 9c9f54b755bf4f2b917f30b41ab2336caf102f3e | [
"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.
# --------------------------------------------------------------------------
"""
Module... | 35.363636 | 88 | 0.5785 |
ba240e9888114e1b9434ec6cb550695e335f096c | 1,523 | py | Python | mmfashion/core/evaluation/attr_predict_demo.py | aleksandrkrivolap/mmfashion | ca7f045d02db47b3d77fe15657fa0fddcadcb4ca | [
"Apache-2.0"
] | 1 | 2019-12-12T11:15:02.000Z | 2019-12-12T11:15:02.000Z | mmfashion/core/evaluation/attr_predict_demo.py | aleksandrkrivolap/mmfashion | ca7f045d02db47b3d77fe15657fa0fddcadcb4ca | [
"Apache-2.0"
] | null | null | null | mmfashion/core/evaluation/attr_predict_demo.py | aleksandrkrivolap/mmfashion | ca7f045d02db47b3d77fe15657fa0fddcadcb4ca | [
"Apache-2.0"
] | null | null | null | import numpy as np
import operator
from scipy.spatial.distance import cdist
import torch
class AttrPredictor(object):
def __init__(self, cfg, tops_type=[3, 5, 10]):
""" create the empty array to count
true positive(tp), true negative(tn), false positive(fp) and false negative(fn);
Args:
... | 30.46 | 88 | 0.571898 |
088ec8e9ec20e83609bf4c99e1d770702ee32cd3 | 1,211 | py | Python | aiub/urls.py | shakil-muntasir/aiub | 23a0796059ec5192ee14ca48b979dad23e9d9cf4 | [
"MIT"
] | 1 | 2021-09-14T14:11:45.000Z | 2021-09-14T14:11:45.000Z | aiub/urls.py | shakil-muntasir/aiub | 23a0796059ec5192ee14ca48b979dad23e9d9cf4 | [
"MIT"
] | null | null | null | aiub/urls.py | shakil-muntasir/aiub | 23a0796059ec5192ee14ca48b979dad23e9d9cf4 | [
"MIT"
] | null | null | null | """aiub URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based vi... | 27.522727 | 77 | 0.723369 |
5cb2bc045544e0d7ef61fb25db8dfb8af3abe669 | 597 | py | Python | labs/lab-09/checkpoint5.py | niclee500/oss-repo-template | 19a6cf14253355c540ecf2a7d82486c9cf524709 | [
"MIT"
] | null | null | null | labs/lab-09/checkpoint5.py | niclee500/oss-repo-template | 19a6cf14253355c540ecf2a7d82486c9cf524709 | [
"MIT"
] | null | null | null | labs/lab-09/checkpoint5.py | niclee500/oss-repo-template | 19a6cf14253355c540ecf2a7d82486c9cf524709 | [
"MIT"
] | null | null | null | from pymongo import MongoClient
client = MongoClient()
db = client.mongo_db_lab
collection = db.definitions
from bson.objectid import ObjectId
import random
import datetime
def random_word_requester():
def_list = []
for definition in collection.find():
def_list.append(definition)
random_def = rand... | 28.428571 | 137 | 0.726968 |
563ea44203fcf8aa7eb19ab79fce8c271669942d | 8,373 | py | Python | tests/test_template.py | ruke47/squadron | 311bd93f11502917ce4e479cb89bde6764c83f27 | [
"MIT"
] | null | null | null | tests/test_template.py | ruke47/squadron | 311bd93f11502917ce4e479cb89bde6764c83f27 | [
"MIT"
] | null | null | null | tests/test_template.py | ruke47/squadron | 311bd93f11502917ce4e479cb89bde6764c83f27 | [
"MIT"
] | null | null | null | from __future__ import print_function
from squadron import template
from squadron.template import FileConfig, get_config, apply_config
from squadron.exthandlers.extutils import get_filename
from squadron.log import log, setup_log
from tempfile import mkdtemp
from shutil import rmtree
import pytest
from helper import ar... | 36.246753 | 118 | 0.676221 |
35a9dcc4cd39d772880a2604e8415ce8ce0515f5 | 4,436 | py | Python | egs/multi_en/s5/local/swbd_format_acronyms_dict.py | vingo555/kaldi | 63774a54255ee102c5442ab8c1fc1a3bea4e83dc | [
"Apache-2.0"
] | 14 | 2019-02-12T02:59:02.000Z | 2020-09-10T12:19:04.000Z | egs/multi_en/s5/local/swbd_format_acronyms_dict.py | Acidburn0zzz/kaldi | 134cf7ee5c9604a431080db14cf6dc19f6524047 | [
"Apache-2.0"
] | null | null | null | egs/multi_en/s5/local/swbd_format_acronyms_dict.py | Acidburn0zzz/kaldi | 134cf7ee5c9604a431080db14cf6dc19f6524047 | [
"Apache-2.0"
] | 4 | 2019-01-05T12:40:11.000Z | 2021-02-05T22:07:38.000Z | #!/usr/bin/env python
# Copyright 2015 Minhua Wu
# Apache 2.0
###########################################################################################
# This script was copied from egs/fisher_swbd/s5/local/format_acronyms_dict.py
# The source commit was e69198c3dc5633f98eb88e1cdf20b2521a598f21
# No changes were m... | 42.247619 | 93 | 0.548242 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.