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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
217d631aee6a0e46f63c306242136b06ed113ba7 | 1,458 | py | Python | scripts/nodes/filter/setupSensors.py | AutonomousFieldRoboticsLab/jetyak_uav_utils | 7926df2cf34b0be2647b62896c98af82ca6f1e53 | [
"MIT"
] | null | null | null | scripts/nodes/filter/setupSensors.py | AutonomousFieldRoboticsLab/jetyak_uav_utils | 7926df2cf34b0be2647b62896c98af82ca6f1e53 | [
"MIT"
] | null | null | null | scripts/nodes/filter/setupSensors.py | AutonomousFieldRoboticsLab/jetyak_uav_utils | 7926df2cf34b0be2647b62896c98af82ca6f1e53 | [
"MIT"
] | 1 | 2021-12-09T01:30:58.000Z | 2021-12-09T01:30:58.000Z | import numpy as np
from sensor import Sensor
def setupSensors(n):
# Critical chi-squared values for P = 0.001 and different degrees of freedom
chiSquared_1 = 10.828
chiSquared_3 = 16.266
# Transition Matrix for Tag measurements
Htag = np.matrix(np.zeros((4, n)))
Htag[0:3, 0:3] = np.matrix(-1 * np.eye(3))
Ht... | 31.695652 | 77 | 0.678326 |
0341ee0a3f23cb6a01cd879ea1c2351af4b1b924 | 6,356 | py | Python | oneflow/python/test/ops/test_argwhere.py | 666DZY666/oneflow | 2062cb211dd1e0619d610659e6d41598d5f73e17 | [
"Apache-2.0"
] | null | null | null | oneflow/python/test/ops/test_argwhere.py | 666DZY666/oneflow | 2062cb211dd1e0619d610659e6d41598d5f73e17 | [
"Apache-2.0"
] | null | null | null | oneflow/python/test/ops/test_argwhere.py | 666DZY666/oneflow | 2062cb211dd1e0619d610659e6d41598d5f73e17 | [
"Apache-2.0"
] | 1 | 2021-11-10T07:57:01.000Z | 2021-11-10T07:57:01.000Z | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | 31.621891 | 87 | 0.66394 |
0f956d6ee6c26c231168507e7127ae034d5d9743 | 7,834 | py | Python | eval_sem.py | arassadin/sgpn | d9bb6e2df0cc255051a7a97950bbb51950642e0c | [
"MIT"
] | 1 | 2020-05-12T15:53:46.000Z | 2020-05-12T15:53:46.000Z | eval_sem.py | arassadin/sgpn | d9bb6e2df0cc255051a7a97950bbb51950642e0c | [
"MIT"
] | null | null | null | eval_sem.py | arassadin/sgpn | d9bb6e2df0cc255051a7a97950bbb51950642e0c | [
"MIT"
] | null | null | null | import argparse
import tensorflow as tf
import numpy as np
import os
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" # see issue #152
import sys
import torch
from utils import pc_util
from models import model
import torchnet as tnt
import scannet_dataset
import suncg_dataset
from utils import provider
BASE_DIR = os.pa... | 40.381443 | 154 | 0.667347 |
497c1180223ac2abc2c76c5329403d4a2797380c | 229,713 | py | Python | cisco-ios-xr/ydk/models/cisco_ios_xr/_meta/_Cisco_IOS_XR_infra_sla_oper.py | tkamata-test/ydk-py | b637e7853a8edbbd31fbc05afa3aa4110b31c5f9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | cisco-ios-xr/ydk/models/cisco_ios_xr/_meta/_Cisco_IOS_XR_infra_sla_oper.py | tkamata-test/ydk-py | b637e7853a8edbbd31fbc05afa3aa4110b31c5f9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | cisco-ios-xr/ydk/models/cisco_ios_xr/_meta/_Cisco_IOS_XR_infra_sla_oper.py | tkamata-test/ydk-py | b637e7853a8edbbd31fbc05afa3aa4110b31c5f9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
import re
import collections
from enum import Enum
from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum
from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict
from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI... | 56.579557 | 324 | 0.548223 |
32705d3d0392df580342584c2bd9765216b0a3c2 | 8,667 | py | Python | resurces/docking/prepare_dpf42.py | jRicciL/Taller_Simulacion_Molecular | d8141e7197bf5c6b19f7446b72a0765966d06982 | [
"MIT"
] | null | null | null | resurces/docking/prepare_dpf42.py | jRicciL/Taller_Simulacion_Molecular | d8141e7197bf5c6b19f7446b72a0765966d06982 | [
"MIT"
] | null | null | null | resurces/docking/prepare_dpf42.py | jRicciL/Taller_Simulacion_Molecular | d8141e7197bf5c6b19f7446b72a0765966d06982 | [
"MIT"
] | 1 | 2022-01-03T20:01:03.000Z | 2022-01-03T20:01:03.000Z | #!/usr/bin/env python
#
#
#
# $Header: /mnt/raid/services/cvs/python/packages/share1.5/AutoDockTools/Utilities24/prepare_dpf42.py,v 1.13.2.3 2016/03/11 00:52:51 annao Exp $
#
import string
import os.path
from MolKit import Read
from AutoDockTools.DockingParameters import DockingParameters, genetic_algorithm_list4_2, ... | 39.940092 | 144 | 0.591785 |
74b0d37ca70ddaf563de68175a17473a70d3ee69 | 686 | py | Python | exatomic/adf/dirac/dirac.py | tjduigna/exatomic | 3e27233084588bc6a58b63fc81aaf5a6b67a968d | [
"Apache-2.0"
] | null | null | null | exatomic/adf/dirac/dirac.py | tjduigna/exatomic | 3e27233084588bc6a58b63fc81aaf5a6b67a968d | [
"Apache-2.0"
] | 1 | 2017-05-25T21:05:40.000Z | 2017-05-25T23:54:15.000Z | exatomic/adf/dirac/dirac.py | tjduigna/exatomic | 3e27233084588bc6a58b63fc81aaf5a6b67a968d | [
"Apache-2.0"
] | 1 | 2017-05-25T20:48:33.000Z | 2017-05-25T20:48:33.000Z | ## -*- coding: utf-8 -*-
## Copyright (c) 2015-2018, Exa Analytics Development Team
## Distributed under the terms of the Apache License 2.0
#"""
#ADF Dirac Parser
##########################
#Parser for the output of the DIRAC program (part of the ADF suite).
#"""
#from exa import Parser, Matches
#
#
#class DIRAC(Parse... | 29.826087 | 96 | 0.521866 |
30bc77b44ad2e719566d27e5eb87e6dbd6545a39 | 412 | py | Python | Python32/ED/quicksort.py | andersonsilvade/python_C | ffc00184883089f1c2d9b8a6c32503b2c8b8d035 | [
"MIT"
] | null | null | null | Python32/ED/quicksort.py | andersonsilvade/python_C | ffc00184883089f1c2d9b8a6c32503b2c8b8d035 | [
"MIT"
] | null | null | null | Python32/ED/quicksort.py | andersonsilvade/python_C | ffc00184883089f1c2d9b8a6c32503b2c8b8d035 | [
"MIT"
] | 1 | 2020-11-04T08:36:28.000Z | 2020-11-04T08:36:28.000Z | def quicksort(lista):
lista = list(range(8))
random.shuffle(lista)
if len(lista) <= 1:
return lista
pivô = lista[0]
iguais = [x for x in lista if x == pivô]
menores = [x for x in lista if x < pivô]
maiores = [x for x in lista if x > pivô]
return quicksort(menores) + igua... | 7.357143 | 59 | 0.538835 |
37eda6e7d3567d25fa9ebb1229e4abda54d34713 | 2,077 | py | Python | pi/perma-proto-organized-hw-test.py | CrazyJ36/python | 4cff6e7240672a273d978521bb511065f45d4312 | [
"MIT"
] | null | null | null | pi/perma-proto-organized-hw-test.py | CrazyJ36/python | 4cff6e7240672a273d978521bb511065f45d4312 | [
"MIT"
] | null | null | null | pi/perma-proto-organized-hw-test.py | CrazyJ36/python | 4cff6e7240672a273d978521bb511065f45d4312 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# This test my "organized" hardware setup on perma-proto
print("Loading.. Press Ctrl-c to exit A test.")
import sys
from time import sleep
from signal import pause
from gpiozero import Button, ButtonBoard, LEDBoard, Buzzer
usage = "Usage: ./perma-proto-org... [leds, buttons, buzzer, all]"
try... | 20.362745 | 85 | 0.616273 |
44cbec44471edbf7fabcf10a3a6888eb36f362b0 | 3,435 | py | Python | examples/OSPFv2/8400/ospfv2_network_lsa_count_monitor.1.0.py | nishanthprakash-hpe/nae-scripts | bf14e5155308683d59e7a95d21436a767d9132a8 | [
"Apache-2.0"
] | null | null | null | examples/OSPFv2/8400/ospfv2_network_lsa_count_monitor.1.0.py | nishanthprakash-hpe/nae-scripts | bf14e5155308683d59e7a95d21436a767d9132a8 | [
"Apache-2.0"
] | null | null | null | examples/OSPFv2/8400/ospfv2_network_lsa_count_monitor.1.0.py | nishanthprakash-hpe/nae-scripts | bf14e5155308683d59e7a95d21436a767d9132a8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Hewlett Packard Enterprise Development LP
#
# 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
#
# U... | 33.349515 | 68 | 0.572344 |
8757270c227802e35ac150eec2a474f5c4e99af7 | 9,986 | py | Python | cky/cky.py | dqd/heap | 6247eebfc87ea0447d199f3c2ef044727b7d3ad6 | [
"WTFPL"
] | 1 | 2017-07-03T19:58:08.000Z | 2017-07-03T19:58:08.000Z | cky/cky.py | dqd/heap | 6247eebfc87ea0447d199f3c2ef044727b7d3ad6 | [
"WTFPL"
] | null | null | null | cky/cky.py | dqd/heap | 6247eebfc87ea0447d199f3c2ef044727b7d3ad6 | [
"WTFPL"
] | null | null | null | #! /usr/bin/python
# coding=utf-8
"""
The Cocke–Kasami–Younger algorithm
2010 Pavel Dvořák <id@dqd.cz>
"""
# Feel free to edit.
ENCODING = 'latin2'
AJKA_CMD = '/nlp/projekty/ajka/bin/ajka -b'
GRAMMAR_FILE = 'cky.data'
GRAMMAR_LIMIT = 100000
import re
import sys
import nltk
import getopt
import subprocess
import uni... | 27.66205 | 122 | 0.558983 |
9c42304aa0998e62a7e7d7dcec114f7bd5b89ce6 | 8,408 | py | Python | docs/conf.py | PyXRD/pyxrd | 26bacdf64f3153fa74b8caa62e219b76d91a55c1 | [
"BSD-2-Clause"
] | 27 | 2018-06-15T15:28:18.000Z | 2022-03-10T12:23:50.000Z | docs/conf.py | PyXRD/pyxrd | 26bacdf64f3153fa74b8caa62e219b76d91a55c1 | [
"BSD-2-Clause"
] | 22 | 2018-06-14T08:29:16.000Z | 2021-07-05T13:33:44.000Z | docs/conf.py | PyXRD/pyxrd | 26bacdf64f3153fa74b8caa62e219b76d91a55c1 | [
"BSD-2-Clause"
] | 8 | 2019-04-13T13:03:51.000Z | 2021-06-19T09:29:11.000Z | # -*- coding: utf-8 -*-
#
# PyXRD documentation build configuration file, created by
# sphinx-quickstart on Wed Feb 12 10:27:39 2014.
#
# 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.
#
# All c... | 31.373134 | 80 | 0.7098 |
817636fb7de1c2e46351604b0691300599cf8823 | 7,411 | py | Python | shiiba/regression3a.py | yaukwankiu/armor | 6c57df82fe3e7761f43f9fbfe4f3b21882c91436 | [
"CC0-1.0"
] | 1 | 2015-11-06T06:41:33.000Z | 2015-11-06T06:41:33.000Z | shiiba/regression3a.py | yaukwankiu/armor | 6c57df82fe3e7761f43f9fbfe4f3b21882c91436 | [
"CC0-1.0"
] | null | null | null | shiiba/regression3a.py | yaukwankiu/armor | 6c57df82fe3e7761f43f9fbfe4f3b21882c91436 | [
"CC0-1.0"
] | null | null | null | # test script for regression3
# regression3 : a more streamlined version of the shiiba regression and advection function/module
###########
#imports
import numpy as np
import numpy.ma as ma
from .. import pattern
from . import regression2 as regression
from ..advection import semiLagrangian
sl = semiLagrangian
from... | 27.14652 | 99 | 0.532722 |
7b030e72ee242d8cf5253784fcbe02d5089814d2 | 88 | py | Python | main.py | Ruiii-w/ImageRetrieval | 76fde37de3dc7fc4401315c26513f82cadf582cd | [
"MIT"
] | null | null | null | main.py | Ruiii-w/ImageRetrieval | 76fde37de3dc7fc4401315c26513f82cadf582cd | [
"MIT"
] | null | null | null | main.py | Ruiii-w/ImageRetrieval | 76fde37de3dc7fc4401315c26513f82cadf582cd | [
"MIT"
] | null | null | null | import model.WindowModel as WM
if __name__ == '__main__':
WM.SearchingWindowModel() | 22 | 30 | 0.75 |
03553bb166dd3a23cb9249888664551a938f62e2 | 23,844 | py | Python | tensorlayerx/nn/core/common.py | tensorlayer/TensorLayerX | 4e3e6f13687309dda7787f0b86e35a62bb3adbad | [
"Apache-2.0"
] | 34 | 2021-12-03T08:19:23.000Z | 2022-03-13T08:34:34.000Z | tensorlayerx/nn/core/common.py | tensorlayer/TensorLayerX | 4e3e6f13687309dda7787f0b86e35a62bb3adbad | [
"Apache-2.0"
] | null | null | null | tensorlayerx/nn/core/common.py | tensorlayer/TensorLayerX | 4e3e6f13687309dda7787f0b86e35a62bb3adbad | [
"Apache-2.0"
] | 3 | 2021-12-28T16:57:20.000Z | 2022-03-18T02:23:14.000Z | #! /usr/bin/python
# -*- coding: utf-8 -*-
import os
import tensorlayerx as tlx
from tensorlayerx.files import utils
from tensorlayerx import logging
import numpy as np
from queue import Queue
from tensorlayerx.nn.initializers import *
if tlx.BACKEND == 'mindspore':
from mindspore.ops.operations import Assign
... | 39.02455 | 117 | 0.62305 |
abafb95f761dec82ce3fb36e979308e247b2fe15 | 26,639 | py | Python | async_upnp_client/client.py | Consolatis/async_upnp_client | 6303ae832e3184915a120772e5c4bc559e33ceaa | [
"Apache-2.0"
] | null | null | null | async_upnp_client/client.py | Consolatis/async_upnp_client | 6303ae832e3184915a120772e5c4bc559e33ceaa | [
"Apache-2.0"
] | null | null | null | async_upnp_client/client.py | Consolatis/async_upnp_client | 6303ae832e3184915a120772e5c4bc559e33ceaa | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""UPnP client module."""
import logging
import urllib.parse
from datetime import datetime, timezone
from typing import (
Any,
Callable,
Generic,
List,
Mapping,
Optional,
Sequence,
Tuple,
TypeVar,
Union,
)
from xml.etree import ElementTree as ET
from xml.... | 31.48818 | 88 | 0.596118 |
7c1fe26e9f7975a5c3f58fa68165fd1815843e40 | 12,885 | py | Python | scipy/sparse/construct.py | lesserwhirls/scipy-cwt | ee673656d879d9356892621e23ed0ced3d358621 | [
"BSD-3-Clause"
] | 8 | 2015-10-07T00:37:32.000Z | 2022-01-21T17:02:33.000Z | scipy/sparse/construct.py | lesserwhirls/scipy-cwt | ee673656d879d9356892621e23ed0ced3d358621 | [
"BSD-3-Clause"
] | null | null | null | scipy/sparse/construct.py | lesserwhirls/scipy-cwt | ee673656d879d9356892621e23ed0ced3d358621 | [
"BSD-3-Clause"
] | 8 | 2015-05-09T14:23:57.000Z | 2018-11-15T05:56:00.000Z | """Functions to construct sparse matrices
"""
__docformat__ = "restructuredtext en"
__all__ = [ 'spdiags', 'eye', 'identity', 'kron', 'kronsum',
'hstack', 'vstack', 'bmat', 'rand']
from warnings import warn
import numpy as np
from sputils import upcast
from csr import csr_matrix
from csc import csc_m... | 28.506637 | 95 | 0.554366 |
cfd7c8397ae9dddeb154e4ef45c1529ebaec7ef9 | 464 | py | Python | redis_helpers/tests/test_redis_helpers.py | ChristopherHaydenTodd/ctodd-python-lib-redis | d59018937c0f4d786af291e8cf82b901af9fcc53 | [
"MIT"
] | 1 | 2019-02-24T14:04:30.000Z | 2019-02-24T14:04:30.000Z | redis_helpers/tests/test_redis_helpers.py | ChristopherHaydenTodd/ctodd-python-lib-redis | d59018937c0f4d786af291e8cf82b901af9fcc53 | [
"MIT"
] | null | null | null | redis_helpers/tests/test_redis_helpers.py | ChristopherHaydenTodd/ctodd-python-lib-redis | d59018937c0f4d786af291e8cf82b901af9fcc53 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Purpose:
Test File for redis_helpers.py
"""
# Python Library Imports
import os
import sys
import fakeredis
import pytest
import redis
from unittest import mock
# Import File to Test
from redis_helpers import redis_helpers
###
# Fixtures
###
# None at the Moment (Empty Test S... | 11.317073 | 39 | 0.6875 |
1f991022c01781b3b5d89ba160d05a83ef29db94 | 31,598 | py | Python | statsmodels/graphics/gofplots.py | ADI10HERO/statsmodels | d932507dc71c93b5d162a678042fb0701ee4bf57 | [
"BSD-3-Clause"
] | 76 | 2019-12-28T08:37:10.000Z | 2022-03-29T02:19:41.000Z | statsmodels/graphics/gofplots.py | ADI10HERO/statsmodels | d932507dc71c93b5d162a678042fb0701ee4bf57 | [
"BSD-3-Clause"
] | null | null | null | statsmodels/graphics/gofplots.py | ADI10HERO/statsmodels | d932507dc71c93b5d162a678042fb0701ee4bf57 | [
"BSD-3-Clause"
] | 35 | 2020-02-04T14:46:25.000Z | 2022-03-24T03:56:17.000Z | from statsmodels.compat.python import lzip
import numpy as np
from scipy import stats
from statsmodels.regression.linear_model import OLS
from statsmodels.tools.tools import add_constant
from statsmodels.tools.decorators import cache_readonly
from statsmodels.distributions import ECDF
from . import utils
__all__ = [... | 36.784633 | 80 | 0.589151 |
7f2c483caefba7c32792fbfa7c5db3cf5a6f907e | 149 | py | Python | nostrint/redat.py | CiKu370/no-strint | 4f4fbe71517b84c00abd4fbdee15bacba01c0079 | [
"MIT"
] | 1 | 2020-02-05T00:18:27.000Z | 2020-02-05T00:18:27.000Z | nostrint/redat.py | CiKu370/no-strint | 4f4fbe71517b84c00abd4fbdee15bacba01c0079 | [
"MIT"
] | null | null | null | nostrint/redat.py | CiKu370/no-strint | 4f4fbe71517b84c00abd4fbdee15bacba01c0079 | [
"MIT"
] | null | null | null | __version__ = '1.4.9'
BANNER = ''' _
(o)
(_|_) <no strint> {0} @ zvtyrdt.id
||| (https://github.com/zevtyardt)
'''.format(__version__)
| 16.555556 | 38 | 0.550336 |
12d2487557834a5c5bda41b512ea74ae5b38dfdf | 315 | py | Python | src/osmo/config_osmo.py | 0xChief/staketaxcsv | 3122736c4044e9a22237fffacee80ca1d7604be1 | [
"MIT"
] | null | null | null | src/osmo/config_osmo.py | 0xChief/staketaxcsv | 3122736c4044e9a22237fffacee80ca1d7604be1 | [
"MIT"
] | null | null | null | src/osmo/config_osmo.py | 0xChief/staketaxcsv | 3122736c4044e9a22237fffacee80ca1d7604be1 | [
"MIT"
] | null | null | null | from common import ExporterTypes as et
class localconfig:
job = None
debug = False
limit = 10000 # max txs
# Treat LP deposits/withdrawals as "transfers"/"omit"/"trades" (ignored for koinly)
lp_treatment = et.LP_TREATMENT_DEFAULT
cache = False
ibc_addresses = {}
exponents = {}
| 21 | 87 | 0.669841 |
d95058fcc73b500e17507ab146c253f12afd3e16 | 704 | py | Python | wardrobe/use_cases/user_detail.py | wardrobe-auth/wardrobe | fd2f95e50c1d035a2a60e0fdc68685ce45b6e653 | [
"MIT"
] | null | null | null | wardrobe/use_cases/user_detail.py | wardrobe-auth/wardrobe | fd2f95e50c1d035a2a60e0fdc68685ce45b6e653 | [
"MIT"
] | null | null | null | wardrobe/use_cases/user_detail.py | wardrobe-auth/wardrobe | fd2f95e50c1d035a2a60e0fdc68685ce45b6e653 | [
"MIT"
] | null | null | null | from ca_util import ResponseFailure, ResponseSuccess
from wardrobe.request_objects.user_id import UserIdRequestObject
from wardrobe.request_objects.user_paginate import UserPaginateRequestObject
class UserDetailUseCase:
def __init__(self, user_repo):
self.user_repo = user_repo
def execute(self, requ... | 33.52381 | 85 | 0.755682 |
3a9aa7ad202c0fff2185e87998722978a676998b | 46,815 | py | Python | src/benchmarks/gc/src/analysis/types.py | BruceForstall/performance | 47524b9060aa7cb13205fa281a6be6e2d404995c | [
"MIT"
] | 547 | 2018-11-06T21:14:57.000Z | 2022-03-31T21:14:57.000Z | src/benchmarks/gc/src/analysis/types.py | BruceForstall/performance | 47524b9060aa7cb13205fa281a6be6e2d404995c | [
"MIT"
] | 1,572 | 2018-11-06T21:30:31.000Z | 2022-03-31T23:31:25.000Z | src/benchmarks/gc/src/analysis/types.py | BruceForstall/performance | 47524b9060aa7cb13205fa281a6be6e2d404995c | [
"MIT"
] | 196 | 2018-11-06T20:58:21.000Z | 2022-03-29T21:04:21.000Z | # Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the MIT license.
# See the LICENSE file in the project root for more information.
from abc import ABC, abstractmethod
from dataclasses import dataclass
from enum import Enum
from functools import reduc... | 29.517654 | 100 | 0.67049 |
e9367ed77eb2a2219ddf1398fa36142efc89937d | 1,470 | py | Python | script.py | konay1122/Auto-Filter-Bot-V2 | 436940c83bd4c8943b089f6b1b02df7656dad70f | [
"MIT"
] | 1 | 2022-03-29T09:34:12.000Z | 2022-03-29T09:34:12.000Z | script.py | konay1122/Auto-Filter-Bot-V2 | 436940c83bd4c8943b089f6b1b02df7656dad70f | [
"MIT"
] | null | null | null | script.py | konay1122/Auto-Filter-Bot-V2 | 436940c83bd4c8943b089f6b1b02df7656dad70f | [
"MIT"
] | 1 | 2021-12-24T04:46:32.000Z | 2021-12-24T04:46:32.000Z | class script(object):
START_MSG = """ <b>ဟဲဟဲ😊 {}
ဒါကို ဒီလိုခေါ်ပါတယ်😁😁 :D
ဟဲဟဲ😊
ဟဲဟဲ😊 !
တခြားဖေတာတွေမထည့်ရတော့ဘူး!
For more click <i>help</i></b>"""
HELP_MSG = """<b>How to use the bot??</b>
<i>
* ဖြုတ်ထားတယ် 😂
* ဖြုတ်ထားတယ် 😂 <b>all admin rights</b>!
</i>
<b>Bot Commands - Works in Group ... | 21 | 95 | 0.626531 |
f250ba4e8b27a55e521c87c613e60a85dec828bd | 3,160 | py | Python | drivers.py | AvalZ/RevOK | 4a697e448d0130d2757dad0467298bb05fdc5fb6 | [
"Apache-2.0"
] | 24 | 2020-06-18T09:55:18.000Z | 2021-12-19T17:54:16.000Z | drivers.py | watchmen-coder/RevOK | 855b7b1f871c72b6a4965ab700ed6ee945fe9fa5 | [
"Apache-2.0"
] | 2 | 2021-06-08T22:33:09.000Z | 2022-03-12T00:49:43.000Z | drivers.py | watchmen-coder/RevOK | 855b7b1f871c72b6a4965ab700ed6ee945fe9fa5 | [
"Apache-2.0"
] | 4 | 2021-03-12T03:03:40.000Z | 2021-10-22T01:27:33.000Z | import asyncio
import time
from abc import abstractmethod, ABC
from selenium import webdriver
from selenium.webdriver import ActionChains
from selenium.webdriver.common.by import By
from loguru import logger
class Driver(ABC):
@abstractmethod
def start_scan(self):
pass
@abstractmethod
def ... | 31.287129 | 94 | 0.673101 |
43e7a78f6e7f2f3bb659df06b6a0063e3ff99a16 | 6,011 | py | Python | src/NUPathCourseScraper.py | chauhankaranraj/EquivalentCourseFinder | b0eef6bc3e8533f79ea6526d4e17ef5b977b9b98 | [
"MIT"
] | null | null | null | src/NUPathCourseScraper.py | chauhankaranraj/EquivalentCourseFinder | b0eef6bc3e8533f79ea6526d4e17ef5b977b9b98 | [
"MIT"
] | null | null | null | src/NUPathCourseScraper.py | chauhankaranraj/EquivalentCourseFinder | b0eef6bc3e8533f79ea6526d4e17ef5b977b9b98 | [
"MIT"
] | null | null | null | import argparse
import pickle as pkl
import os.path as osp
import datetime as dt
from tqdm import tqdm
import pandas as pd
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.webdriver... | 38.286624 | 110 | 0.679754 |
3121f6d54690f58bccaeaeef9d09947ba23f2cf9 | 1,716 | py | Python | Day 12/day12.py | neethan/adventofcode2021 | 862d4062cdfc22a6e2f03378db6755e20e5f8f81 | [
"WTFPL"
] | 1 | 2021-12-04T20:25:48.000Z | 2021-12-04T20:25:48.000Z | Day 12/day12.py | neethan/adventofcode2021 | 862d4062cdfc22a6e2f03378db6755e20e5f8f81 | [
"WTFPL"
] | null | null | null | Day 12/day12.py | neethan/adventofcode2021 | 862d4062cdfc22a6e2f03378db6755e20e5f8f81 | [
"WTFPL"
] | null | null | null | import re
import numpy as np
from pprint import pprint as pp
from collections import defaultdict
def getInput():
with open("input.txt") as fp:
lines = [x.strip() for x in fp.readlines()]
return lines
def findRoutes(idx, caves, currentRoute, routes):
#print(" " * len(currentRoute), "Now on:", current... | 30.105263 | 99 | 0.629953 |
7274ab275bb4909264b8377115af76cf3b650b54 | 285 | py | Python | imagefit/urls.py | serdardurbaris/django-imagefit | 5d2a8f7e99eb165dbabc455a1e69654f74887542 | [
"BSD-3-Clause"
] | null | null | null | imagefit/urls.py | serdardurbaris/django-imagefit | 5d2a8f7e99eb165dbabc455a1e69654f74887542 | [
"BSD-3-Clause"
] | null | null | null | imagefit/urls.py | serdardurbaris/django-imagefit | 5d2a8f7e99eb165dbabc455a1e69654f74887542 | [
"BSD-3-Clause"
] | null | null | null | from django.conf.urls import url, re_path
from . import views
"""
Master URL using
path('image', include('imagefit.urls')),
"""
urlpatterns = [
url(
r'^(?P<url>.*)/(?P<format>[,\w-]+)/(?P<path_name>[\w_-]*)/?$',
views.resize,
name="imagefit_resize"),
]
| 19 | 70 | 0.561404 |
62a097df40eb174792bc7dcc97ae5d2d3f27ef6a | 2,140 | py | Python | setup.py | bhumikapahariapuresoftware/visions | 8838d89b4f02e401112378b4662a779227ead9f8 | [
"BSD-4-Clause"
] | null | null | null | setup.py | bhumikapahariapuresoftware/visions | 8838d89b4f02e401112378b4662a779227ead9f8 | [
"BSD-4-Clause"
] | null | null | null | setup.py | bhumikapahariapuresoftware/visions | 8838d89b4f02e401112378b4662a779227ead9f8 | [
"BSD-4-Clause"
] | null | null | null | from pathlib import Path
from setuptools import find_packages, setup
# Read the contents of README file
source_root = Path(".")
with (source_root / "README.md").open(encoding="utf-8") as f:
long_description = f.read()
# Read the requirements
with (source_root / "requirements.txt").open(encoding="utf8") as f:
... | 30.571429 | 73 | 0.684112 |
832486bd35787328483693ffe42ccbb083fc169b | 32,197 | py | Python | transformers/data/processors/factcheck_old.py | HLTCHKUST/Perplexity-FactChecking | aec341410d7c66273ecdb52daa7d39abd786edc3 | [
"MIT"
] | 7 | 2021-04-22T06:42:36.000Z | 2021-09-28T11:43:06.000Z | transformers/data/processors/factcheck_old.py | HLTCHKUST/Perplexity-FactChecking | aec341410d7c66273ecdb52daa7d39abd786edc3 | [
"MIT"
] | null | null | null | transformers/data/processors/factcheck_old.py | HLTCHKUST/Perplexity-FactChecking | aec341410d7c66273ecdb52daa7d39abd786edc3 | [
"MIT"
] | 1 | 2021-08-03T04:18:43.000Z | 2021-08-03T04:18:43.000Z | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 44.594183 | 146 | 0.580178 |
38ccec60b7cd795d3982ec33d9e5c5f33790a2b9 | 859 | py | Python | tests/test_feed.py | nacknime-official/freelancehunt-api | fddbb45470e644be7fe12766177e05ba6889bf71 | [
"MIT"
] | 3 | 2020-10-19T06:41:19.000Z | 2022-01-09T03:33:54.000Z | tests/test_feed.py | nacknime-official/freelancehunt-api | fddbb45470e644be7fe12766177e05ba6889bf71 | [
"MIT"
] | 5 | 2020-10-20T06:16:58.000Z | 2021-06-19T00:24:59.000Z | tests/test_feed.py | nacknime-official/freelancehunt-api | fddbb45470e644be7fe12766177e05ba6889bf71 | [
"MIT"
] | 1 | 2020-10-20T09:21:57.000Z | 2020-10-20T09:21:57.000Z | #!usr/bin/python3
"""#TODO: Write comments."""
from freelancehunt import Feed
from freelancehunt.models.feed import FeedMessage
class Feed:
def __init__(self, token=None, **kwargs):
pass
def update(self):
pass
def read(self):
pass
#property
def projects(self):
p... | 15.070175 | 69 | 0.571595 |
f3b38c1828817382df2118db56f53472a342a91e | 1,305 | py | Python | stack/stack.py | komratovaanastasiia/programming-2021-19fpl | a3a71f760ff27fac35e81f9b692bd930349650c2 | [
"MIT"
] | null | null | null | stack/stack.py | komratovaanastasiia/programming-2021-19fpl | a3a71f760ff27fac35e81f9b692bd930349650c2 | [
"MIT"
] | null | null | null | stack/stack.py | komratovaanastasiia/programming-2021-19fpl | a3a71f760ff27fac35e81f9b692bd930349650c2 | [
"MIT"
] | null | null | null | """
Implementation of the data structure "Stack"
"""
from typing import Iterable
class Stack:
"""
Stack Data Structure
"""
def __init__(self, data: Iterable = None):
if isinstance(data, Iterable):
self.data = list(data)
else:
self.data = []
def push(self... | 22.5 | 60 | 0.535632 |
6bddf00505cb768c45ad38bd5d989415e1c77307 | 647 | py | Python | lib/pylint/test/input/func_w0112.py | willemneal/Docky | d3504e1671b4a6557468234c263950bfab461ce4 | [
"MIT"
] | 3 | 2018-11-25T01:09:55.000Z | 2021-08-24T01:56:36.000Z | lib/pylint/test/input/func_w0112.py | willemneal/Docky | d3504e1671b4a6557468234c263950bfab461ce4 | [
"MIT"
] | null | null | null | lib/pylint/test/input/func_w0112.py | willemneal/Docky | d3504e1671b4a6557468234c263950bfab461ce4 | [
"MIT"
] | 3 | 2018-11-09T03:38:09.000Z | 2020-02-24T06:26:10.000Z | """test max branch
"""
# pylint: disable=print-statement
__revision__ = ''
def stupid_function(arg):
"""reallly stupid function"""
if arg == 1:
print 1
elif arg == 2:
print 2
elif arg == 3:
print 3
elif arg == 4:
print 4
elif arg == 5:
print 5
elif ar... | 17.026316 | 33 | 0.451314 |
57a3900e29b7546a8c6ebdad0a6e0ecdc19a7466 | 1,298 | py | Python | openmdao.gui/src/openmdao/gui/test/functional/pageobjects/login.py | Kenneth-T-Moore/OpenMDAO-Framework | 76e0ebbd6f424a03b547ff7b6039dea73d8d44dc | [
"Apache-2.0"
] | null | null | null | openmdao.gui/src/openmdao/gui/test/functional/pageobjects/login.py | Kenneth-T-Moore/OpenMDAO-Framework | 76e0ebbd6f424a03b547ff7b6039dea73d8d44dc | [
"Apache-2.0"
] | null | null | null | openmdao.gui/src/openmdao/gui/test/functional/pageobjects/login.py | Kenneth-T-Moore/OpenMDAO-Framework | 76e0ebbd6f424a03b547ff7b6039dea73d8d44dc | [
"Apache-2.0"
] | null | null | null | from selenium.webdriver.common.by import By
from basepageobject import BasePageObject
from elements import ButtonElement, InputElement
class LoginPage(BasePageObject):
""" There doesn't seem to be a 'login' page anymore... """
# url = '/accounts/login/?next=/'
url = '/'
username = InputElement((By.I... | 30.904762 | 71 | 0.631741 |
6dd564c7f678c695c5d1ec79f33c0b1b4b8e7a67 | 2,031 | py | Python | dataactcore/utils/jsonResponse.py | COEJKnight/one | 6a5f8cd9468ab368019eb2597821b7837f74d9e2 | [
"CC0-1.0"
] | 1 | 2018-10-29T12:54:44.000Z | 2018-10-29T12:54:44.000Z | dataactcore/utils/jsonResponse.py | COEJKnight/one | 6a5f8cd9468ab368019eb2597821b7837f74d9e2 | [
"CC0-1.0"
] | null | null | null | dataactcore/utils/jsonResponse.py | COEJKnight/one | 6a5f8cd9468ab368019eb2597821b7837f74d9e2 | [
"CC0-1.0"
] | null | null | null | import json
import logging
import traceback
import flask
from dataactcore.utils.responseException import ResponseException
logger = logging.getLogger(__name__)
class JsonResponse:
""" Used to create an http response object containing JSON """
debugMode = True
@staticmethod
def create(code, dictio... | 34.423729 | 87 | 0.656819 |
1e27fd99b9b7966939c6cd2029add6d453606285 | 14,679 | py | Python | poolings/SAGPool.py | PangYunsheng8/CGIPool | 2cf22019bad510804021f768c6a0d76bf79b62f6 | [
"MIT"
] | 1 | 2022-01-28T02:57:38.000Z | 2022-01-28T02:57:38.000Z | poolings/SAGPool.py | LiuChuang0059/CGIPool | 2cf22019bad510804021f768c6a0d76bf79b62f6 | [
"MIT"
] | null | null | null | poolings/SAGPool.py | LiuChuang0059/CGIPool | 2cf22019bad510804021f768c6a0d76bf79b62f6 | [
"MIT"
] | 5 | 2021-06-14T04:42:39.000Z | 2021-12-21T03:39:19.000Z | from torch_geometric.nn import GCNConv, GATConv, LEConv, SAGEConv, GraphConv
from torch_geometric.data import Data
from torch_geometric.nn.pool.topk_pool import topk,filter_adj
from torch.nn import Parameter
import torch
from torch_geometric.nn.conv import MessagePassing
from torch_geometric.utils import add_rema... | 42.921053 | 121 | 0.630356 |
74b6d993ec38fe9856920e124776427a09fb070f | 3,530 | py | Python | bindings/python/ensmallen/datasets/string/chlamydiasprubis.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/chlamydiasprubis.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/chlamydiasprubis.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph Chlamydia sp. Rubis.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING v11: protein--protein as... | 32.685185 | 223 | 0.674221 |
e7aa9ba91b88d8e09a3b52be4296da2cdd04d142 | 1,192 | py | Python | trash/really weird bug when separating files/corpus.py | mounir4023/MSA_POS_Tagger | d34cace777504a4121b675048ddbaa12297cc20b | [
"MIT"
] | 3 | 2020-02-04T19:01:30.000Z | 2021-07-05T18:09:36.000Z | trash/really weird bug when separating files/corpus.py | mounir4023/MSA_POS_Tagger | d34cace777504a4121b675048ddbaa12297cc20b | [
"MIT"
] | null | null | null | trash/really weird bug when separating files/corpus.py | mounir4023/MSA_POS_Tagger | d34cace777504a4121b675048ddbaa12297cc20b | [
"MIT"
] | null | null | null | from lxml import etree
import random
import re
import nltk
##### preparing data into dict
def get_data( path ):
# init
root = etree.parse("corpus.xml")
sents = [ ]
# xml to dict for each sentence
for s in root.xpath("/CORPUS/Phrase"):
tokens = re.sub(r'\s+',' ',s[2].text)
t... | 21.285714 | 56 | 0.453859 |
f43d41773d077e59a3d34f3e24a48f313c9ef4b2 | 68,735 | py | Python | gitee/api/gists_api.py | pygitee/pygitee | 7622314a4dbb08cf2f729b6cdd0a2887b96e394e | [
"MIT"
] | null | null | null | gitee/api/gists_api.py | pygitee/pygitee | 7622314a4dbb08cf2f729b6cdd0a2887b96e394e | [
"MIT"
] | null | null | null | gitee/api/gists_api.py | pygitee/pygitee | 7622314a4dbb08cf2f729b6cdd0a2887b96e394e | [
"MIT"
] | null | null | null | # coding: utf-8
from __future__ import absolute_import
import re # noqa: F401
# python 2 and python 3 compatibility library
import six
from gitee.api_client import ApiClient
class GistsApi(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manual... | 38.313824 | 128 | 0.592667 |
841e1b4ea059f5fa1805d43217f2334f808d0f31 | 322 | py | Python | sound.py | AileenBanshee/MicroPython | 0f51759851d601780b6eac9d2201bf3e02022638 | [
"CC0-1.0"
] | null | null | null | sound.py | AileenBanshee/MicroPython | 0f51759851d601780b6eac9d2201bf3e02022638 | [
"CC0-1.0"
] | null | null | null | sound.py | AileenBanshee/MicroPython | 0f51759851d601780b6eac9d2201bf3e02022638 | [
"CC0-1.0"
] | null | null | null | from machine import Pin, ADC
from time import sleep_ms
import time
# sound_sensor functionality (sensor big sound):
adc = ADC (Pin (26))
sound = Pin(27, Pin.IN, Pin.PULL_DOWN)
while(True):
q = 0
for i in range(10000):
q = q + sound.value()
print(q)
#print(snd_secret)
#time.sleep(... | 18.941176 | 48 | 0.627329 |
ce718f2abd81a257988bd5841be9afd57588e9b0 | 1,246 | py | Python | src/tests/test_e2e_install.py | paul-maidment/assisted-test-infra | 2b2c86e37a1a7c6b3c25b3899e6d87d6313333c4 | [
"Apache-2.0"
] | null | null | null | src/tests/test_e2e_install.py | paul-maidment/assisted-test-infra | 2b2c86e37a1a7c6b3c25b3899e6d87d6313333c4 | [
"Apache-2.0"
] | null | null | null | src/tests/test_e2e_install.py | paul-maidment/assisted-test-infra | 2b2c86e37a1a7c6b3c25b3899e6d87d6313333c4 | [
"Apache-2.0"
] | null | null | null | import pytest
from junit_report import JunitTestSuite
import consts
from tests.base_test import BaseTest
from tests.conftest import get_available_openshift_versions, get_supported_operators
class TestInstall(BaseTest):
@JunitTestSuite()
@pytest.mark.parametrize("openshift_version", get_available_openshift_ve... | 38.9375 | 113 | 0.784109 |
72a3b7ac51fcd592cea11eb8491ba340b108c076 | 2,257 | py | Python | manim/utils/caching.py | naveen521kk/manimce-deprecated | 52a0cb0e49f79cb48f78b51c724f049d522fc465 | [
"MIT"
] | 1 | 2021-05-06T13:05:01.000Z | 2021-05-06T13:05:01.000Z | manim/utils/caching.py | naveen521kk/manimce-deprecated | 52a0cb0e49f79cb48f78b51c724f049d522fc465 | [
"MIT"
] | 1 | 2020-11-01T03:27:09.000Z | 2020-11-01T03:27:09.000Z | manim/utils/caching.py | naveen521kk/manimce-deprecated | 52a0cb0e49f79cb48f78b51c724f049d522fc465 | [
"MIT"
] | null | null | null | from .. import config, logger
from ..utils.hashing import get_hash_from_play_call
def handle_caching_play(func):
"""Decorator that returns a wrapped version of func that will compute
the hash of the play invocation.
The returned function will act according to the computed hash: either skip
the animat... | 41.036364 | 116 | 0.6358 |
36459d4d2df050326f22f0deafbc3688585e698e | 924 | py | Python | setup.py | trialspark/aptible-api | c0b843b8de93b50eb3cafe051e13421bd8c3f039 | [
"MIT"
] | 1 | 2021-07-13T14:43:43.000Z | 2021-07-13T14:43:43.000Z | setup.py | trialspark/aptible-api | c0b843b8de93b50eb3cafe051e13421bd8c3f039 | [
"MIT"
] | 1 | 2021-09-23T19:20:20.000Z | 2021-09-23T19:20:20.000Z | setup.py | trialspark/aptible-api | c0b843b8de93b50eb3cafe051e13421bd8c3f039 | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="aptible-api",
version="0.4.0",
author="Zachary Elliott",
author_email="zellio@trialspark.com",
description="Object Oriented interface for Aptible API",
long_descripti... | 28.875 | 67 | 0.632035 |
e28aede06f39d2feaa354ecc49e4ce1f3b2df4a0 | 685 | py | Python | space_script/pdm_space_netbeans.py | irving-muller/TraceSim_EMSE | f0d1f7c99fe4f427e40ac29f7736a30b8b513009 | [
"MIT"
] | 3 | 2022-02-18T12:58:07.000Z | 2022-03-02T09:48:39.000Z | space_script/pdm_space_netbeans.py | irving-muller/TraceSim_EMSE | f0d1f7c99fe4f427e40ac29f7736a30b8b513009 | [
"MIT"
] | null | null | null | space_script/pdm_space_netbeans.py | irving-muller/TraceSim_EMSE | f0d1f7c99fe4f427e40ac29f7736a30b8b513009 | [
"MIT"
] | null | null | null | from hyperopt import hp
fixed_values= {
"filter_func": "threshold_trim"
}
space = {
"c": hp.uniform("c", 0.0, 30.0),
"o": hp.uniform("o", 0.0, 30.0),
# "keep_ukn": hp.choice("keep_ukn", (False, True)),
# "static_df_ukn": hp.choice("static_df_ukn", (False, True)),
"aggregate": hp.choice("agg... | 32.619048 | 117 | 0.630657 |
f7f120247722d959a07182e68bad0b7a2ba61c0d | 2,169 | py | Python | geotrek/feedback/views.py | fossabot/Geotrek-admin | ea2c873511ad724c742c64d81cbf31f37dbe3093 | [
"BSD-2-Clause"
] | null | null | null | geotrek/feedback/views.py | fossabot/Geotrek-admin | ea2c873511ad724c742c64d81cbf31f37dbe3093 | [
"BSD-2-Clause"
] | null | null | null | geotrek/feedback/views.py | fossabot/Geotrek-admin | ea2c873511ad724c742c64d81cbf31f37dbe3093 | [
"BSD-2-Clause"
] | null | null | null | from django.conf import settings
from django.views.generic.list import ListView
from django.core.mail import send_mail
from rest_framework.decorators import list_route
from rest_framework.permissions import AllowAny
from mapentity import views as mapentity_views
from geotrek.feedback.filters import ReportFilterSet
fro... | 32.863636 | 74 | 0.716459 |
ee5cf98a9afa3d611128c6b9d084f0f8ea329b38 | 1,216 | py | Python | lib/spack/spack/schema/bootstrap.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | lib/spack/spack/schema/bootstrap.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 8 | 2021-11-09T20:28:40.000Z | 2022-03-15T03:26:33.000Z | lib/spack/spack/schema/bootstrap.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2019-02-08T20:37:20.000Z | 2019-03-31T15:19:26.000Z | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""Schema for bootstrap.yaml configuration file."""
#: Schema of a single source
_source_schema = {
'type': 'object',
... | 26.434783 | 73 | 0.525493 |
0ade2dfd347d83daf0039aab394d3fac6f3ec8b6 | 161,382 | py | Python | bin/temp/var/usd/cd/tmp/usd/data/data/data/data/data/temp/twitter.py | RazorKenway/All-Downloader | e1c6d9ee277166faff8876e967b521fd752f0e7f | [
"MIT"
] | 44 | 2021-06-28T15:57:18.000Z | 2022-03-22T07:36:13.000Z | bin/temp/var/usd/cd/tmp/usd/data/data/data/data/data/temp/twitter.py | RazorKenway/All-Downloader | e1c6d9ee277166faff8876e967b521fd752f0e7f | [
"MIT"
] | 1 | 2021-11-26T13:28:10.000Z | 2022-01-10T21:23:41.000Z | bin/temp/var/usd/cd/tmp/usd/data/data/data/data/data/temp/twitter.py | RazorKenway/All-Downloader | e1c6d9ee277166faff8876e967b521fd752f0e7f | [
"MIT"
] | 5 | 2021-08-23T17:34:56.000Z | 2022-02-25T19:23:59.000Z | #ENCODE BY CRYPTO
#YOU CAN TRY THIS DECODE GOD BLESS
import gzip,marshal,zlib,base64,binascii,lzma
try:
exec(gzip.decompress(marshal.loads(b's\xd2\xdb\x00\x00\x1f\x8b\x08\x002\x87\x98a\x02\xffl]Y[\x14K\xb0|\xbf\xbf\xc2\x05\x95M\xe8\xbd\xabQdS\xdc\x15\x14Da\x04z\x05Q\xf6MA\xf8\xedw"2\xca9\xdfw\xef\x83\xe7\xb0\x0c3\xd... | 14,671.090909 | 161,223 | 0.734258 |
9354540bc893f59e36ecde6e8e37256131b2eae2 | 23,746 | py | Python | modular_client/modular_client.py | janelia-pypi/modular_device_python | dde4b9555c9898316f5afb6ba95a8110d1077ef9 | [
"BSD-3-Clause"
] | 1 | 2021-03-23T15:10:22.000Z | 2021-03-23T15:10:22.000Z | modular_client/modular_client.py | janelia-pypi/modular_device_python | dde4b9555c9898316f5afb6ba95a8110d1077ef9 | [
"BSD-3-Clause"
] | null | null | null | modular_client/modular_client.py | janelia-pypi/modular_device_python | dde4b9555c9898316f5afb6ba95a8110d1077ef9 | [
"BSD-3-Clause"
] | 1 | 2015-12-10T19:35:22.000Z | 2015-12-10T19:35:22.000Z | import serial
import time
import atexit
import json
import functools
import operator
import platform
import os
import inflection
import sre_yield
from serial_interface import SerialInterface, SerialInterfaces, find_serial_interface_ports, WriteFrequencyError
try:
from pkg_resources import get_distribution, Distri... | 41.154246 | 159 | 0.605323 |
0f412935d33f7885e2b545d945fbc07222feeab5 | 2,258 | py | Python | swatcher/image.py | joshbduncan/swatcher | 91e459df75be4c50d38540b8cf49c6c4ed6a5764 | [
"MIT"
] | null | null | null | swatcher/image.py | joshbduncan/swatcher | 91e459df75be4c50d38540b8cf49c6c4ed6a5764 | [
"MIT"
] | null | null | null | swatcher/image.py | joshbduncan/swatcher | 91e459df75be4c50d38540b8cf49c6c4ed6a5764 | [
"MIT"
] | null | null | null | from collections import Counter
from PIL import Image, ImageChops
from .color import normalize_rgb_values
def trim_excess(image: object) -> object:
"""
Trim excess background pixels from around an image.
:param image: PIL Image object
:returns: PIL Image object
"""
w, h = image.size
# ge... | 34.738462 | 80 | 0.671833 |
731b3338ed4a11cc0ed88b9c776e65438c4f9969 | 850 | py | Python | gcloud/apigw/constants.py | wkma/bk-sops | 8fb5609c0c4495c28d588fbafa9d9f5f2976929b | [
"Apache-2.0"
] | 2 | 2021-07-28T01:48:31.000Z | 2021-11-17T11:02:26.000Z | gcloud/apigw/constants.py | wkma/bk-sops | 8fb5609c0c4495c28d588fbafa9d9f5f2976929b | [
"Apache-2.0"
] | null | null | null | gcloud/apigw/constants.py | wkma/bk-sops | 8fb5609c0c4495c28d588fbafa9d9f5f2976929b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | 53.125 | 115 | 0.785882 |
9decb5da52bef2cf77f44480edb90a21902e593d | 1,423 | py | Python | Kai/crab/NANOv7_Fri13/2017/ElMu/crab_cfg_2017_ElMu_C.py | NJManganelli/FourTopNAOD | 9743d5b49bdbad27a74abb7b2d5b7295f678a0e3 | [
"Apache-2.0"
] | 1 | 2022-01-17T17:29:38.000Z | 2022-01-17T17:29:38.000Z | Kai/crab/NANOv7_Fri13/2017/ElMu/crab_cfg_2017_ElMu_C.py | NJManganelli/FourTopNAOD | 9743d5b49bdbad27a74abb7b2d5b7295f678a0e3 | [
"Apache-2.0"
] | null | null | null | Kai/crab/NANOv7_Fri13/2017/ElMu/crab_cfg_2017_ElMu_C.py | NJManganelli/FourTopNAOD | 9743d5b49bdbad27a74abb7b2d5b7295f678a0e3 | [
"Apache-2.0"
] | 1 | 2021-12-15T10:56:50.000Z | 2021-12-15T10:56:50.000Z | import os
from WMCore.Configuration import Configuration
from CRABClient.UserUtilities import config, getUsernameFromCRIC
config = Configuration()
config.section_("General")
config.General.requestName = '2017_ElMu_C'
config.General.transferOutputs = True
config.General.transferLogs = True
config.section_("JobType")
c... | 36.487179 | 120 | 0.762474 |
556b11ae92eb13375000e60f7d49996e57129370 | 3,933 | py | Python | openstack_exporter/exporter.py | sapcc/openstack-exporter | d9472fcf5790bd02664bf57a890ca4d3eab73960 | [
"Apache-2.0"
] | null | null | null | openstack_exporter/exporter.py | sapcc/openstack-exporter | d9472fcf5790bd02664bf57a890ca4d3eab73960 | [
"Apache-2.0"
] | 3 | 2020-10-22T14:49:22.000Z | 2022-03-23T13:53:51.000Z | openstack_exporter/exporter.py | sapcc/openstack-exporter | d9472fcf5790bd02664bf57a890ca4d3eab73960 | [
"Apache-2.0"
] | null | null | null | # All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 32.504132 | 78 | 0.67938 |
0063ed4a186f3a11208534193b7127a86da1ac8f | 4,456 | py | Python | Utils.py | Alaszun/ALttPEntranceRandomizer | 390bd1f5615deff621970e135c07d45b0bb59ec1 | [
"MIT"
] | 27 | 2019-05-06T21:12:24.000Z | 2020-08-17T17:33:34.000Z | Utils.py | Alaszun/ALttPEntranceRandomizer | 390bd1f5615deff621970e135c07d45b0bb59ec1 | [
"MIT"
] | 17 | 2019-05-04T18:18:19.000Z | 2020-05-07T00:21:53.000Z | Utils.py | Alaszun/ALttPEntranceRandomizer | 390bd1f5615deff621970e135c07d45b0bb59ec1 | [
"MIT"
] | 37 | 2019-05-04T17:45:54.000Z | 2022-01-30T10:20:23.000Z | import os
import subprocess
import sys
def int16_as_bytes(value):
value = value & 0xFFFF
return [value & 0xFF, (value >> 8) & 0xFF]
def int32_as_bytes(value):
value = value & 0xFFFFFFFF
return [value & 0xFF, (value >> 8) & 0xFF, (value >> 16) & 0xFF, (value >> 24) & 0xFF]
def pc_to_snes(value):
r... | 36.227642 | 196 | 0.654399 |
ef2f8b0cfa6914d4f5c741d8ac1eae90ce7c3bc0 | 1,184 | py | Python | test_query_counter/models.py | silentninja/django-test-query-counter | 0aadc440d0dad62586121db25aad9ff77cb34204 | [
"MIT"
] | null | null | null | test_query_counter/models.py | silentninja/django-test-query-counter | 0aadc440d0dad62586121db25aad9ff77cb34204 | [
"MIT"
] | null | null | null | test_query_counter/models.py | silentninja/django-test-query-counter | 0aadc440d0dad62586121db25aad9ff77cb34204 | [
"MIT"
] | null | null | null | from __future__ import annotations
from dataclasses import dataclass
from typing import Optional
from django.http import HttpResponse, HttpRequest
@dataclass
class IArbitraryData:
shapeHashV1Base64: str
asJsonString: str
asText: str
@dataclass
class IBody:
contentType: str
value: IArbitraryDat... | 18.5 | 93 | 0.711993 |
5fe04504e73a3b705fe931c04dce18255cdebf0d | 5,685 | py | Python | anytask/users/migrations/0003_auto__add_field_userprofile_ya_uid.py | AnnaSvalova/anytask | f814b43c496f67a2efe2a150873a1ae32ad97449 | [
"MIT"
] | 1 | 2018-12-03T05:48:43.000Z | 2018-12-03T05:48:43.000Z | anytask/users/migrations/0003_auto__add_field_userprofile_ya_uid.py | AnnaSvalova/anytask | f814b43c496f67a2efe2a150873a1ae32ad97449 | [
"MIT"
] | null | null | null | anytask/users/migrations/0003_auto__add_field_userprofile_ya_uid.py | AnnaSvalova/anytask | f814b43c496f67a2efe2a150873a1ae32ad97449 | [
"MIT"
] | 1 | 2021-09-18T22:38:20.000Z | 2021-09-18T22:38:20.000Z | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'UserProfile.ya_uid'
db.add_column('users_userprofile', 'y... | 72.884615 | 182 | 0.566755 |
4d39f3cc519187b6029ee0292f0ebe854f0db85e | 24,527 | py | Python | Assets/Python/Plugins/Resources/Lib/SocketServer.py | OpenColonyShip/OpenColonyShip-Core | 3dd8fd5c86ca89b1bf76d4dc4e0372f2c924d2ae | [
"MIT"
] | 42 | 2018-12-12T01:00:59.000Z | 2022-03-27T07:32:29.000Z | Assets/Python/Plugins/Resources/Lib/SocketServer.py | OpenColonyShip/OpenColonyShip-Core | 3dd8fd5c86ca89b1bf76d4dc4e0372f2c924d2ae | [
"MIT"
] | 13 | 2020-11-06T13:50:45.000Z | 2022-01-25T07:17:37.000Z | Assets/Python/Plugins/Resources/Lib/SocketServer.py | OpenColonyShip/OpenColonyShip-Core | 3dd8fd5c86ca89b1bf76d4dc4e0372f2c924d2ae | [
"MIT"
] | 8 | 2020-11-14T04:30:26.000Z | 2021-01-16T17:55:19.000Z | """Generic socket server classes.
This module tries to capture the various aspects of defining a server:
For socket-based servers:
- address family:
- AF_INET{,6}: IP (Internet Protocol) sockets (default)
- AF_UNIX: Unix domain sockets
- others, e.g. AF_DECNET are conceivable (see <s... | 33.506831 | 85 | 0.63057 |
5af8129d7aeda12ef558a42ba50dc6f20579c668 | 12,130 | py | Python | propagator/opentelemetry-propagator-ot-trace/tests/test_ot_trace_propagator.py | seemk/opentelemetry-python-contrib | 10a448ee754394ccfff2c3a3c9af129af59e6775 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | propagator/opentelemetry-propagator-ot-trace/tests/test_ot_trace_propagator.py | seemk/opentelemetry-python-contrib | 10a448ee754394ccfff2c3a3c9af129af59e6775 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | propagator/opentelemetry-propagator-ot-trace/tests/test_ot_trace_propagator.py | seemk/opentelemetry-python-contrib | 10a448ee754394ccfff2c3a3c9af129af59e6775 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 32.872629 | 79 | 0.551278 |
2dedb37b353d5987e9d97b601cdeac32bb8317ca | 5,958 | py | Python | niftycloud/pyami/bootstrap.py | yudai09/niftycloud | b34ef2504f12e3f423c18b2fa155b17b9d0d7ca7 | [
"MIT"
] | null | null | null | niftycloud/pyami/bootstrap.py | yudai09/niftycloud | b34ef2504f12e3f423c18b2fa155b17b9d0d7ca7 | [
"MIT"
] | null | null | null | niftycloud/pyami/bootstrap.py | yudai09/niftycloud | b34ef2504f12e3f423c18b2fa155b17b9d0d7ca7 | [
"MIT"
] | null | null | null | # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modi... | 44.133333 | 139 | 0.637462 |
f9e2bc5b69b415ba1cbe11e45e93a47aaf24aceb | 188 | py | Python | Farmacia/apps/ventas/urls.py | cluco91/Django_Farmacia | 10d787533bcebac8ba35cf8a7feb10ffb14ca45f | [
"MIT"
] | 2 | 2018-11-06T04:05:20.000Z | 2020-05-28T23:19:23.000Z | Farmacia/apps/ventas/urls.py | cluco91/Django_Farmacia | 10d787533bcebac8ba35cf8a7feb10ffb14ca45f | [
"MIT"
] | null | null | null | Farmacia/apps/ventas/urls.py | cluco91/Django_Farmacia | 10d787533bcebac8ba35cf8a7feb10ffb14ca45f | [
"MIT"
] | 2 | 2018-11-06T04:12:17.000Z | 2019-11-21T18:34:26.000Z | from django.conf.urls import patterns, url
from views import *
urlpatterns = patterns('',
url(r'^$',todo_listCreateView.as_view()),
url(r'^author-ajax/$', 'app.views.TodoitemAjax'),
)
| 23.5 | 50 | 0.707447 |
6c7814d19aed12312307675d5b66843e71bb227e | 8,075 | py | Python | cloudvolume/datasource/graphene/mesh/unsharded.py | austinhoag/cloud-volume | 122c009f327a6ebcb1025732fac05affba4823d3 | [
"BSD-3-Clause"
] | null | null | null | cloudvolume/datasource/graphene/mesh/unsharded.py | austinhoag/cloud-volume | 122c009f327a6ebcb1025732fac05affba4823d3 | [
"BSD-3-Clause"
] | null | null | null | cloudvolume/datasource/graphene/mesh/unsharded.py | austinhoag/cloud-volume | 122c009f327a6ebcb1025732fac05affba4823d3 | [
"BSD-3-Clause"
] | null | null | null | import six
from collections import defaultdict
import itertools
import json
import os
import posixpath
import re
import requests
import numpy as np
from tqdm import tqdm
from ....lib import red, toiter, Bbox, Vec, jsonify
from ....mesh import Mesh
from .... import paths
from ....storage import Storage, GreenStorage
... | 35.262009 | 113 | 0.679133 |
21f6364fdc58e1d357d3fcb257701311088f7662 | 4,067 | py | Python | packager.py | xpl/gop2 | c0d76e5c46766887446419022b2701509cb0c218 | [
"MIT"
] | 3 | 2019-03-30T15:43:18.000Z | 2021-07-14T14:09:30.000Z | packager.py | xpl/gop2 | c0d76e5c46766887446419022b2701509cb0c218 | [
"MIT"
] | null | null | null | packager.py | xpl/gop2 | c0d76e5c46766887446419022b2701509cb0c218 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import sys, os, subprocess
if len(sys.argv) < 3:
print 'To package a single file:'
print ' python %s PACKAGE_NAME FILE' % sys.argv[0];
print 'To package a directory tree:'
print ' python %s PACKAGE_NAME DIRECTORY FILE_TO_RUN' % sys.argv[0];
print ''
print 'Requires dosbo... | 29.471014 | 79 | 0.592574 |
b176e9df9ecc2d5d8f0464dabc285c20995185c1 | 148 | py | Python | gary/coordinates/setup_package.py | adrn/gary-old | 065b371534baa03deeb860893640068d90ba5881 | [
"MIT"
] | null | null | null | gary/coordinates/setup_package.py | adrn/gary-old | 065b371534baa03deeb860893640068d90ba5881 | [
"MIT"
] | null | null | null | gary/coordinates/setup_package.py | adrn/gary-old | 065b371534baa03deeb860893640068d90ba5881 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
def get_package_data():
return {'gary.coordinates': ['tests/idl_vgsr_vhel.txt', 'tests/SgrCoord_data']}
| 29.6 | 83 | 0.77027 |
8ded974abad2d91d9ee610c6d863e154810b2393 | 2,392 | py | Python | checkers/compare_json_outputs.py | vicpopov/subways | 6596d9789cb280d9cc7ff1ac39cecf4d0317c4d1 | [
"Apache-2.0"
] | 27 | 2017-11-04T19:19:49.000Z | 2021-07-24T04:20:56.000Z | checkers/compare_json_outputs.py | vicpopov/subways | 6596d9789cb280d9cc7ff1ac39cecf4d0317c4d1 | [
"Apache-2.0"
] | 88 | 2017-10-07T08:34:05.000Z | 2020-10-13T15:44:52.000Z | checkers/compare_json_outputs.py | vicpopov/subways | 6596d9789cb280d9cc7ff1ac39cecf4d0317c4d1 | [
"Apache-2.0"
] | 17 | 2018-02-19T03:14:59.000Z | 2021-10-02T09:51:12.000Z | """This utility allows one to check equivalency of outputs (defined
by --output command line parameter) of process_subways.py.
Due to unordered nature of sets/dicts, two runs of process_subways.py
even on the same input generate equivalent jsons,
which cannot be compared with 'diff' command. The compare_js... | 36.8 | 77 | 0.686455 |
5e57839b82463bbda34ec0ba074df2123d5fdd44 | 1,464 | py | Python | setup.py | remorses/yaml | 9e6008ce47bf9700671c4fe3b24e65dd0ac17785 | [
"MIT"
] | null | null | null | setup.py | remorses/yaml | 9e6008ce47bf9700671c4fe3b24e65dd0ac17785 | [
"MIT"
] | null | null | null | setup.py | remorses/yaml | 9e6008ce47bf9700671c4fe3b24e65dd0ac17785 | [
"MIT"
] | null | null | null | from os import path
from codecs import open
from setuptools import setup, find_packages
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
with open(path.join(here, 'VERSION'), 'r... | 31.148936 | 77 | 0.668033 |
e5b683ef5531b5f0a6cf16e59296132540ac5f3d | 1,774 | py | Python | src/utils/corpus.py | HephaestusProject/pytorch-Sencnn | d7ff5725dbc4b8ffdb7a6ecfa50b859c3f3d883b | [
"MIT"
] | 5 | 2020-07-26T08:09:59.000Z | 2020-10-27T21:52:08.000Z | src/utils/corpus.py | HephaestusProject/pytorch-Sencnn | d7ff5725dbc4b8ffdb7a6ecfa50b859c3f3d883b | [
"MIT"
] | 38 | 2020-07-25T06:17:39.000Z | 2021-12-13T20:56:47.000Z | src/utils/corpus.py | HephaestusProject/pytorch-Sencnn | d7ff5725dbc4b8ffdb7a6ecfa50b859c3f3d883b | [
"MIT"
] | null | null | null | from typing import Callable, List, Tuple
import pandas as pd
import torch
from torch.utils.data import Dataset
class NSMCCorpus(Dataset):
"""NSMCCorpus class"""
def __init__(self, filepath: str, encode_fn: Callable[[str], List[int]]) -> None:
"""Instantiating NSMCCorpus class
Args:
... | 30.067797 | 85 | 0.625141 |
e55437397f7adeb5c320fbc745f39a9591ebd8de | 1,727 | py | Python | adjutant/wsgi.py | CCI-MOC/adjutant | 032db3124ea0b0632afdfc27afc60b6c66cf5f66 | [
"Apache-2.0"
] | null | null | null | adjutant/wsgi.py | CCI-MOC/adjutant | 032db3124ea0b0632afdfc27afc60b6c66cf5f66 | [
"Apache-2.0"
] | null | null | null | adjutant/wsgi.py | CCI-MOC/adjutant | 032db3124ea0b0632afdfc27afc60b6c66cf5f66 | [
"Apache-2.0"
] | 1 | 2019-04-18T12:21:59.000Z | 2019-04-18T12:21:59.000Z | # Copyright (C) 2015 Catalyst IT Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 35.244898 | 78 | 0.745223 |
1b0caac652c81db1741175645eb45c73929aaaf7 | 979 | py | Python | helios/url_names.py | cassius3m/Helios | e76171f57a7bdde680a7c488ccd2051cbdfb76ed | [
"Apache-2.0"
] | 525 | 2015-01-04T11:51:26.000Z | 2022-03-31T17:15:20.000Z | helios/url_names.py | cassius3m/Helios | e76171f57a7bdde680a7c488ccd2051cbdfb76ed | [
"Apache-2.0"
] | 238 | 2015-01-02T17:50:37.000Z | 2022-02-09T16:39:49.000Z | helios/url_names.py | cassius3m/Helios | e76171f57a7bdde680a7c488ccd2051cbdfb76ed | [
"Apache-2.0"
] | 238 | 2015-01-05T23:09:20.000Z | 2022-03-21T16:47:33.000Z | from helios import election_url_names as election, stats_url_names as stats
__all__ = [
"election", "stats",
"COOKIE_TEST", "COOKIE_TEST_2", "COOKIE_NO",
"ELECTION_SHORTCUT", "ELECTION_SHORTCUT_VOTE", "CAST_VOTE_SHORTCUT", "CAST_VOTE_FULLHASH_SHORTCUT",
"TRUSTEE_LOGIN",
"ELECTIONS_PARAMS", "ELECTIO... | 33.758621 | 103 | 0.812053 |
86d159a4592157382f878e299f05d05910cb36c9 | 1,601 | py | Python | plate_recognition/ocr.py | 73VW/ImageClassification | b4d15de0bf261b05612bd405005ff33b4e395121 | [
"MIT"
] | null | null | null | plate_recognition/ocr.py | 73VW/ImageClassification | b4d15de0bf261b05612bd405005ff33b4e395121 | [
"MIT"
] | 1 | 2018-02-22T15:09:36.000Z | 2018-02-22T15:29:14.000Z | plate_recognition/ocr.py | 73VW/ImageClassification | b4d15de0bf261b05612bd405005ff33b4e395121 | [
"MIT"
] | null | null | null | # import the necessary packages
from PIL import Image
import pytesseract
import argparse
import cv2
import os
from os import system
# construct the argument parse and parse the arguments
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--image", required=False,
help="path to input image to be OCR'd")
ap.add_argu... | 30.788462 | 122 | 0.733916 |
4f525d0a675ee652763e0e1fed3ea3796d0d71c1 | 4,486 | py | Python | loophole/polar/pb/map_information_pb2.py | oscarpicas/loophole | f9389c73f06b419c97ad32847346663a30d80225 | [
"MIT"
] | 153 | 2016-02-12T22:52:25.000Z | 2022-02-05T21:55:19.000Z | loophole/polar/pb/map_information_pb2.py | oscarpicas/loophole | f9389c73f06b419c97ad32847346663a30d80225 | [
"MIT"
] | 14 | 2016-02-28T13:56:34.000Z | 2020-02-16T20:33:41.000Z | loophole/polar/pb/map_information_pb2.py | oscarpicas/loophole | f9389c73f06b419c97ad32847346663a30d80225 | [
"MIT"
] | 20 | 2016-02-28T13:05:15.000Z | 2021-07-20T18:21:46.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: map_information.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection a... | 34.244275 | 420 | 0.756799 |
7664f482fc0986616be11689e511a09e9fbab706 | 8,446 | py | Python | docs/conf.py | myuanz/wechatpy | f131e1808ffd51f61881188fc080c36523063c2b | [
"MIT"
] | 821 | 2016-09-16T03:05:37.000Z | 2022-03-30T07:18:06.000Z | docs/conf.py | myuanz/wechatpy | f131e1808ffd51f61881188fc080c36523063c2b | [
"MIT"
] | 160 | 2017-08-28T03:32:56.000Z | 2022-03-31T09:16:10.000Z | docs/conf.py | myuanz/wechatpy | f131e1808ffd51f61881188fc080c36523063c2b | [
"MIT"
] | 168 | 2016-05-30T16:40:07.000Z | 2022-03-25T15:17:18.000Z | # -*- coding: utf-8 -*-
#
# wechatpy documentation build configuration file, created by
# sphinx-quickstart on Thu Sep 25 14:26:14 2014.
#
# 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.
#
# ... | 31.514925 | 79 | 0.709567 |
4c68ae770d8e01cf9e8a3ce075048063cb29a20f | 3,613 | py | Python | commanderbot/lib/json_file_database_adapter.py | CommanderBot-Dev/commanderbot-ext | c8798b4475b892c234a1e4ffbfb4fed3fb702938 | [
"MIT"
] | 4 | 2020-09-25T19:22:48.000Z | 2021-06-16T18:08:49.000Z | commanderbot/lib/json_file_database_adapter.py | CommanderBot-Dev/commanderbot-py | 835841f733e466c5a0e6724d4020747c55856fe3 | [
"MIT"
] | 23 | 2021-08-30T04:07:29.000Z | 2021-11-08T17:44:41.000Z | commanderbot/lib/json_file_database_adapter.py | CommanderBot-Dev/commanderbot-py | 835841f733e466c5a0e6724d4020747c55856fe3 | [
"MIT"
] | 3 | 2020-09-25T19:23:22.000Z | 2021-03-16T18:19:48.000Z | import asyncio
from dataclasses import dataclass, field
from logging import Logger, getLogger
from typing import Callable, Generic, Optional, TypeVar
from commanderbot.lib.database_options import JsonFileDatabaseOptions
from commanderbot.lib.json import json_dump_async, json_load_async
from commanderbot.lib.types impo... | 38.031579 | 103 | 0.661223 |
a27e76c3886a4475dc8d0e572c5643ee82b272fb | 5,749 | py | Python | test/integration/component/test_baremetal.py | ycyun/ablestack-cloud | b7bd36a043e2697d05303246373988aa033c9229 | [
"Apache-2.0"
] | 1,131 | 2015-01-08T18:59:06.000Z | 2022-03-29T11:31:10.000Z | test/integration/component/test_baremetal.py | ycyun/ablestack-cloud | b7bd36a043e2697d05303246373988aa033c9229 | [
"Apache-2.0"
] | 5,908 | 2015-01-13T15:28:37.000Z | 2022-03-31T20:31:07.000Z | test/integration/component/test_baremetal.py | ycyun/ablestack-cloud | b7bd36a043e2697d05303246373988aa033c9229 | [
"Apache-2.0"
] | 1,083 | 2015-01-05T01:16:52.000Z | 2022-03-31T12:14:10.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... | 46.362903 | 149 | 0.532788 |
3597991cfff65a24f4cbaf28bef6b1c70de99177 | 1,019 | py | Python | data/checkpointManager.py | kennethsinder/exit-dash-hyperion | d44ea77ef5e8a6ce9490e3f802636da5b44e6e74 | [
"MIT"
] | 2 | 2018-01-29T14:34:51.000Z | 2020-10-20T23:30:26.000Z | data/checkpointManager.py | kennethsinder/exit-dash-hyperion | d44ea77ef5e8a6ce9490e3f802636da5b44e6e74 | [
"MIT"
] | null | null | null | data/checkpointManager.py | kennethsinder/exit-dash-hyperion | d44ea77ef5e8a6ce9490e3f802636da5b44e6e74 | [
"MIT"
] | null | null | null | # coding=utf-8
import pygame
class CheckpointManager(object):
def __init__(self, platforms, blocks, character):
# Initialize lists for the co-ordinates for every checkpoint and the direction needed to get there
self.checkpointsLeft, self.checkpointsRight = [] * 2
self.checkpointDir... | 40.76 | 107 | 0.672228 |
70f70bbe883b92cb3fb625d507170482ad47c0c6 | 4,192 | py | Python | utils/MQTT.py | JuanPabloBeco/py-nbiot | a498b34f53f5a50bacea8d6ab56c6a3071eb4de5 | [
"MIT"
] | 1 | 2022-01-23T12:18:25.000Z | 2022-01-23T12:18:25.000Z | utils/MQTT.py | JuanPabloBeco/py-nbiot | a498b34f53f5a50bacea8d6ab56c6a3071eb4de5 | [
"MIT"
] | null | null | null | utils/MQTT.py | JuanPabloBeco/py-nbiot | a498b34f53f5a50bacea8d6ab56c6a3071eb4de5 | [
"MIT"
] | null | null | null | import sys
sys.path.append( '..' )
import serial
from serial_tools.send_cmd import send_cmd
from constants import MY_PHONE_PASS
DEFALUT_PRINT_RESPONSE = True
DEFAULT_TCP_CONNECT_ID = 0
DEFAULT_HOST_NAME = "54.191.221.113"
DEFAULT_PORT = 1883
DEFAULT_USERNAME = "topic"
DEFEULT_PASSWORD = "password o string secreto"
... | 32 | 146 | 0.683206 |
defecf8e2b27589433e6ea74f945233886053ec3 | 2,029 | py | Python | scru/scru.py | Alquimista/scru | 331e0213a0a3a3c53b8da5bfd541767412479bee | [
"MIT"
] | null | null | null | scru/scru.py | Alquimista/scru | 331e0213a0a3a3c53b8da5bfd541767412479bee | [
"MIT"
] | null | null | null | scru/scru.py | Alquimista/scru | 331e0213a0a3a3c53b8da5bfd541767412479bee | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
import clipboard
import imgur
import screenshot
import utils
import os
import subprocess
import urllib
APP_ICON = '/usr/share/icons/hicolor/scalable/apps/scru.svg'
XDG_CACHE_HOME = os.environ['XDG_CACHE_HOME']
APP_CACHE = os.path.join(XDG_CACHE_HOME, 'scru')
if not os.pa... | 31.703125 | 78 | 0.643667 |
3a047361ca9a1cd438a2f259e16d7d029337c536 | 11,508 | py | Python | tests/performance/test_performance.py | gnomonsis/model_server | bdd7eccde5dfa4f518f6964c103b4389cd00caaf | [
"Apache-2.0"
] | null | null | null | tests/performance/test_performance.py | gnomonsis/model_server | bdd7eccde5dfa4f518f6964c103b4389cd00caaf | [
"Apache-2.0"
] | null | null | null | tests/performance/test_performance.py | gnomonsis/model_server | bdd7eccde5dfa4f518f6964c103b4389cd00caaf | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2020 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 39.010169 | 120 | 0.602103 |
cf92e06022a0033791565af4034c4ae9f87afbca | 13,864 | py | Python | tests/api/test_slack.py | cham11ng/boss | 71e67cf2c4411787d319e2bd842fd93402aeaef3 | [
"MIT"
] | 25 | 2017-10-23T09:22:06.000Z | 2021-09-15T11:04:51.000Z | tests/api/test_slack.py | cham11ng/boss | 71e67cf2c4411787d319e2bd842fd93402aeaef3 | [
"MIT"
] | 37 | 2017-10-18T15:40:18.000Z | 2021-12-19T12:59:29.000Z | tests/api/test_slack.py | cham11ng/boss | 71e67cf2c4411787d319e2bd842fd93402aeaef3 | [
"MIT"
] | 17 | 2017-10-19T08:39:09.000Z | 2021-11-01T09:35:05.000Z | ''' Tests for boss.api.slack module. '''
from mock import patch
from pytest import fixture
from boss.api import slack
from boss.core.constants.notification_types import (
DEPLOYMENT_STARTED,
DEPLOYMENT_FINISHED,
RUNNING_SCRIPT_STARTED,
RUNNING_SCRIPT_FINISHED
)
@fixture(scope='function')
def slack_ur... | 31.9447 | 182 | 0.593263 |
545a3084f8f487541f95e312e36ccea39a2792b7 | 2,032 | py | Python | update_price.py | Block-Way/sync | 48970311e29c4e2fbe1db56140328f22c4accca8 | [
"Apache-2.0"
] | null | null | null | update_price.py | Block-Way/sync | 48970311e29c4e2fbe1db56140328f22c4accca8 | [
"Apache-2.0"
] | null | null | null | update_price.py | Block-Way/sync | 48970311e29c4e2fbe1db56140328f22c4accca8 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import json
import requests
import time
import config
import pymysql
def Update():
conn = pymysql.connect(host=config.host, port=config.port, user=config.user, password=config.password, db=config.db)
cursor = conn.cursor()
url = 'https://dncapi.fxhapp.com/api... | 42.333333 | 120 | 0.576772 |
907ea6700105a12cb9ef69caf9a93a97247f1b0e | 3,344 | py | Python | openprocurement/medicines/registry/databridge/caching.py | ProzorroUKR/openprocurement.medicines.registry | 3faa63de9eeb21fbf94346d3b67339bae7389099 | [
"Apache-2.0"
] | null | null | null | openprocurement/medicines/registry/databridge/caching.py | ProzorroUKR/openprocurement.medicines.registry | 3faa63de9eeb21fbf94346d3b67339bae7389099 | [
"Apache-2.0"
] | null | null | null | openprocurement/medicines/registry/databridge/caching.py | ProzorroUKR/openprocurement.medicines.registry | 3faa63de9eeb21fbf94346d3b67339bae7389099 | [
"Apache-2.0"
] | 1 | 2018-07-25T14:07:17.000Z | 2018-07-25T14:07:17.000Z | import logging
import redis
from ConfigParser import ConfigParser
from rediscluster import StrictRedisCluster
logger = logging.getLogger(__name__)
class DB(object):
def __init__(self, config):
self.config = config
cache_backend = self.config_get('cache_backend') or 'redis'
if cache_bac... | 31.847619 | 98 | 0.610048 |
0725493300e9c62b869e9db92cdfd21c74233609 | 1,281 | py | Python | parse_apache_configs/test/test_get_apache_config.py | daladim/parse_apache_configs | 5f585c099095176ae4708c65593bef315d930033 | [
"Apache-2.0"
] | 7 | 2017-05-10T12:03:48.000Z | 2022-01-31T09:05:25.000Z | parse_apache_configs/test/test_get_apache_config.py | daladim/parse_apache_configs | 5f585c099095176ae4708c65593bef315d930033 | [
"Apache-2.0"
] | 8 | 2015-11-04T16:08:25.000Z | 2015-12-01T16:16:16.000Z | parse_apache_configs/test/test_get_apache_config.py | elextro/parse_apache_configs | d40292e5f938147a558f4a8c94a5e6668d213df3 | [
"Apache-2.0"
] | 5 | 2017-01-17T15:17:52.000Z | 2022-01-11T22:48:28.000Z | from os import listdir
from os.path import isfile, join
import unittest
from parse_apache_configs import parse_config
import pprint
class testGetApacheConfig(unittest.TestCase):
#print "ENTERING TEST_PARSE_CONFIG" + "-"*8
def test_get_apache_config(self):
test_files = [ f for f in listdir("./test_conf... | 44.172414 | 108 | 0.654957 |
84ee6ce295c0fbb5469f9ecd92400430d966a489 | 58 | py | Python | dev.py | actiniumn404/SICL | 218b832fafd7613051a9b29b10b3223e4f7b102a | [
"MIT"
] | null | null | null | dev.py | actiniumn404/SICL | 218b832fafd7613051a9b29b10b3223e4f7b102a | [
"MIT"
] | null | null | null | dev.py | actiniumn404/SICL | 218b832fafd7613051a9b29b10b3223e4f7b102a | [
"MIT"
] | null | null | null | import main
main.SICL(open("tests/dev.sicl", "r").read()) | 19.333333 | 45 | 0.672414 |
0552fc4833f35fb1f18e735402bcad9ed192d9c2 | 16,767 | py | Python | twilio/rest/sync/v1/service/sync_stream/__init__.py | NCPlayz/twilio-python | 08898a4a1a43b636a64c9e98fbb0b6ee1792c687 | [
"MIT"
] | null | null | null | twilio/rest/sync/v1/service/sync_stream/__init__.py | NCPlayz/twilio-python | 08898a4a1a43b636a64c9e98fbb0b6ee1792c687 | [
"MIT"
] | 1 | 2021-06-02T00:27:34.000Z | 2021-06-02T00:27:34.000Z | exercise/venv/lib/python3.7/site-packages/twilio/rest/sync/v1/service/sync_stream/__init__.py | assuzzanne/notifications-dispatcher-api | 81ae0eab417a1dbc0ae6b1778ebfdd71591c3c5b | [
"MIT"
] | null | null | null | # coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_context import InstanceContext
from twilio.base.instance_resource import InstanceResource
from twilio.base... | 33.941296 | 103 | 0.62957 |
2781964a090b618563f2c2fba7803bccd90b8f69 | 23,412 | py | Python | toontown/building/DistributedElevator.py | AnonymousDeveloper65535/open-toontown | 3d05c22a7d960ad843dde231140447c46973dba5 | [
"BSD-3-Clause"
] | 8 | 2017-10-10T11:41:01.000Z | 2021-02-23T12:55:47.000Z | toontown/building/DistributedElevator.py | AnonymousDeveloper65535/open-toontown | 3d05c22a7d960ad843dde231140447c46973dba5 | [
"BSD-3-Clause"
] | 1 | 2018-07-28T20:07:04.000Z | 2018-07-30T18:28:34.000Z | toontown/building/DistributedElevator.py | AnonymousDeveloper65535/open-toontown | 3d05c22a7d960ad843dde231140447c46973dba5 | [
"BSD-3-Clause"
] | 2 | 2019-04-06T16:18:23.000Z | 2021-02-25T06:25:01.000Z | from pandac.PandaModules import *
from direct.distributed.ClockDelta import *
from direct.interval.IntervalGlobal import *
from ElevatorConstants import *
from ElevatorUtils import *
from direct.showbase import PythonUtil
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from d... | 40.858639 | 370 | 0.63019 |
fcec59580e4a552078198972ec1e8f72d7db34e6 | 735 | py | Python | accounts/urls.py | abhishek593/IITISOC_LaFrescoInPocket | dd91b99ea60fb2753d4715e8890c0c7dc26b8b99 | [
"MIT"
] | null | null | null | accounts/urls.py | abhishek593/IITISOC_LaFrescoInPocket | dd91b99ea60fb2753d4715e8890c0c7dc26b8b99 | [
"MIT"
] | null | null | null | accounts/urls.py | abhishek593/IITISOC_LaFrescoInPocket | dd91b99ea60fb2753d4715e8890c0c7dc26b8b99 | [
"MIT"
] | null | null | null | from django.urls import path
from accounts import views
app_name = 'accounts'
urlpatterns = [
path('profile/<int:user_id>/', views.profile, name='profile'),
path('login/', views.login_user, name='login'),
path('logout/', views.logout_user, name='logout'),
path('register/', views.register_user, name='... | 40.833333 | 117 | 0.717007 |
5b506ac97aad12c0b004564221cea7987e848f50 | 55 | py | Python | wf_core_database/__init__.py | WildflowerSchools/wf-core-database | 9b8eecd84a1451831634fef3681f38a03850830e | [
"MIT"
] | null | null | null | wf_core_database/__init__.py | WildflowerSchools/wf-core-database | 9b8eecd84a1451831634fef3681f38a03850830e | [
"MIT"
] | null | null | null | wf_core_database/__init__.py | WildflowerSchools/wf-core-database | 9b8eecd84a1451831634fef3681f38a03850830e | [
"MIT"
] | null | null | null | from .utils import *
from .wf_database_pandas import *
| 18.333333 | 33 | 0.781818 |
a42dfca47500827207f8d5321444817b92be3c4c | 8,023 | py | Python | amap_distance_matrix/services/osrm.py | Euraxluo/distance_matrix | 680e3147c263ea5f1abb26998aeb0b1985442a4b | [
"MIT"
] | 1 | 2022-03-15T06:47:36.000Z | 2022-03-15T06:47:36.000Z | amap_distance_matrix/services/osrm.py | Euraxluo/distance_matrix | 680e3147c263ea5f1abb26998aeb0b1985442a4b | [
"MIT"
] | null | null | null | amap_distance_matrix/services/osrm.py | Euraxluo/distance_matrix | 680e3147c263ea5f1abb26998aeb0b1985442a4b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Time: 2022-03-01 11:00
# Copyright (c) 2022
# author: Euraxluo
import copy
import asyncio
import warnings
import polyline
from concurrent import futures
from amap_distance_matrix.helper import *
from amap_distance_matrix.services.register import register
"""
Osrm webapi接口服务包装
"""
#######... | 37.84434 | 190 | 0.567369 |
42b627cf4566be7c1549c7b495d42c1acfe0e71c | 5,332 | py | Python | nova/api/openstack/compute/flavors.py | stryng/nova | 5dba32a23e67341bfdc03a00781ab491238e21f4 | [
"Apache-2.0"
] | 1 | 2021-04-08T10:13:03.000Z | 2021-04-08T10:13:03.000Z | nova/api/openstack/compute/flavors.py | stryng/nova | 5dba32a23e67341bfdc03a00781ab491238e21f4 | [
"Apache-2.0"
] | null | null | null | nova/api/openstack/compute/flavors.py | stryng/nova | 5dba32a23e67341bfdc03a00781ab491238e21f4 | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 OpenStack Foundation
# 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.apach... | 35.546667 | 78 | 0.652101 |
fc59b77d1d807915a342dd5c515a1ebe06412148 | 1,513 | py | Python | pyshadowsocks/packet/datagram_packer.py | FTwOoO/pyShadowsocks | 452323e30c4b97d322cbb67e9bbc7c4549e67b5f | [
"MIT"
] | 21 | 2016-08-01T06:48:01.000Z | 2021-04-05T18:20:53.000Z | pyshadowsocks/packet/datagram_packer.py | zen-of-proxy/pyShadowsocks | 452323e30c4b97d322cbb67e9bbc7c4549e67b5f | [
"MIT"
] | 2 | 2016-07-23T02:33:17.000Z | 2018-03-13T09:50:02.000Z | pyshadowsocks/packet/datagram_packer.py | FTwOoO/pyShadowsocks | 452323e30c4b97d322cbb67e9bbc7c4549e67b5f | [
"MIT"
] | 7 | 2017-04-22T16:53:53.000Z | 2021-02-08T06:33:05.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Author: booopooob@gmail.com
#
# Info:
#
#
from packet.packet_header import PacketHeader
class DatagramPacker(object):
def __init__(self, header_type=None):
pass
def pack(self, header: PacketHeader = None, data=None):
"""return encode or comp... | 27.017857 | 61 | 0.547918 |
d2b86ab173254e8698faa3d138f606052f8462f2 | 910 | py | Python | Lectures/revision lecture/5_loops_revision_update_variable_using_if.py | CLAHRCWessex/math6005-python | 934d3eeccf7a2a08da995dcd2f441304115578c6 | [
"MIT"
] | 2 | 2019-11-25T14:02:23.000Z | 2020-04-27T13:39:35.000Z | Lectures/revision lecture/5_loops_revision_update_variable_using_if.py | CLAHRCWessex/math6005-python | 934d3eeccf7a2a08da995dcd2f441304115578c6 | [
"MIT"
] | null | null | null | Lectures/revision lecture/5_loops_revision_update_variable_using_if.py | CLAHRCWessex/math6005-python | 934d3eeccf7a2a08da995dcd2f441304115578c6 | [
"MIT"
] | 3 | 2019-01-30T18:30:55.000Z | 2022-02-05T18:28:34.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
MATH6005: Loops Revision
Example: Looping over a list to search for a largest or smallest value
We need to make use of if-statements to keep track of 'if'
an update to a variable is required.
"""
# ==================================================================... | 25.277778 | 79 | 0.517582 |
5303d243acccde16f65b604899852e9dfef3fd74 | 5,317 | py | Python | docs/conf.py | Aniket979Kanodia/primitive | 70148ffa508c26a55e09110ec5d435d774354895 | [
"Apache-2.0"
] | 1 | 2018-01-13T03:15:56.000Z | 2018-01-13T03:15:56.000Z | docs/conf.py | Aniket979Kanodia/primitive | 70148ffa508c26a55e09110ec5d435d774354895 | [
"Apache-2.0"
] | 17 | 2018-09-22T13:48:58.000Z | 2018-10-03T21:17:37.000Z | docs/conf.py | Aniket979Kanodia/primitive | 70148ffa508c26a55e09110ec5d435d774354895 | [
"Apache-2.0"
] | 1 | 2021-06-30T15:09:46.000Z | 2021-06-30T15:09:46.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# primitivefxmvc documentation build configuration file, created by
# sphinx-quickstart on Thu Nov 23 13:17:10 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in th... | 30.557471 | 79 | 0.684597 |
36bdb2e6c906ba035db37c2eff4027850af212a8 | 1,272 | py | Python | moi/indicators/migrations/0002_auto_20151229_2332.py | Ecotrust/F2S-MOI | aeb38942d6539c50f252ea3ff6fbff07aabc5088 | [
"Apache-2.0"
] | null | null | null | moi/indicators/migrations/0002_auto_20151229_2332.py | Ecotrust/F2S-MOI | aeb38942d6539c50f252ea3ff6fbff07aabc5088 | [
"Apache-2.0"
] | 33 | 2015-05-06T00:47:20.000Z | 2016-11-08T21:13:44.000Z | moi/indicators/migrations/0002_auto_20151229_2332.py | Ecotrust/F2S-MOI | aeb38942d6539c50f252ea3ff6fbff07aabc5088 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2015-12-29 23:32
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import wagtail.wagtailcore.fields
class Migration(migrations.Migration):
dependencies = [
('wagtailimages', '0010_change... | 32.615385 | 163 | 0.632862 |
396725c20117532b0ba89f769a7fe85a85fa926e | 594 | py | Python | _unittests/ut_helpgen/test_helper_helpgen.py | Pandinosaurus/pyquickhelper | 326276f656cf88989e4d0fcd006ada0d3735bd9e | [
"MIT"
] | null | null | null | _unittests/ut_helpgen/test_helper_helpgen.py | Pandinosaurus/pyquickhelper | 326276f656cf88989e4d0fcd006ada0d3735bd9e | [
"MIT"
] | null | null | null | _unittests/ut_helpgen/test_helper_helpgen.py | Pandinosaurus/pyquickhelper | 326276f656cf88989e4d0fcd006ada0d3735bd9e | [
"MIT"
] | null | null | null | """
@brief test log(time=8s)
@author Xavier Dupre
"""
import sys
import os
import unittest
from pyquickhelper.loghelper.flog import fLOG
from pyquickhelper.helpgen.utils_sphinx_config import locate_image_documentation, NbImage
from IPython.core.display import Image
class TestHelperHelpGen(unittest.TestCas... | 20.482759 | 89 | 0.688552 |
191653264c00da00f325e066dc53b74bbf16ab41 | 757 | py | Python | dags/DagFetcher.py | cicerojmm/aws-ecs-airflow | 665d859760c2231a692246b5b8ad1df92ee09c93 | [
"MIT"
] | 1 | 2022-03-29T00:24:12.000Z | 2022-03-29T00:24:12.000Z | dags/DagFetcher.py | cicerojmm/aws-ecs-airflow | 665d859760c2231a692246b5b8ad1df92ee09c93 | [
"MIT"
] | null | null | null | dags/DagFetcher.py | cicerojmm/aws-ecs-airflow | 665d859760c2231a692246b5b8ad1df92ee09c93 | [
"MIT"
] | null | null | null | from airflow.models import DAG
from airflow.operators.bash_operator import BashOperator
from airflow.utils.dates import days_ago
from airflow.models import Variable
airflow_bucket = Variable.get('airflow_bucket_dags')
airflow_home = Variable.get('airflow_home_dags')
args = {
'owner': 'Airflow',
'start_date':... | 27.035714 | 93 | 0.675033 |
f943a11e9408079b336950ed516590e4cb2d9a96 | 1,619 | py | Python | tests/core/test_merkle_set.py | Flax-Network/flax-light-wallet | 1745850a28a47bbbc4b5f3d460f35b34b4ed4f25 | [
"Apache-2.0"
] | 1 | 2021-12-02T14:38:11.000Z | 2021-12-02T14:38:11.000Z | tests/core/test_merkle_set.py | Flax-Network/flax-light-wallet | 1745850a28a47bbbc4b5f3d460f35b34b4ed4f25 | [
"Apache-2.0"
] | null | null | null | tests/core/test_merkle_set.py | Flax-Network/flax-light-wallet | 1745850a28a47bbbc4b5f3d460f35b34b4ed4f25 | [
"Apache-2.0"
] | 6 | 2021-11-21T00:38:27.000Z | 2021-12-03T01:25:19.000Z | import asyncio
import itertools
import pytest
from flaxlight.util.merkle_set import MerkleSet, confirm_included_already_hashed
from tests.setup_nodes import bt
@pytest.fixture(scope="module")
def event_loop():
loop = asyncio.get_event_loop()
yield loop
class TestMerkleSet:
@pytest.mark.asyncio
asy... | 34.446809 | 118 | 0.697344 |
3ef50be98944e9e332a7173ddde86c957e8c987a | 202 | py | Python | ecommerce/users/tests/test_models.py | sorwarduet/ecommerce | d1e0818d2b8372d668b672a5f0737900d144c38a | [
"MIT"
] | null | null | null | ecommerce/users/tests/test_models.py | sorwarduet/ecommerce | d1e0818d2b8372d668b672a5f0737900d144c38a | [
"MIT"
] | null | null | null | ecommerce/users/tests/test_models.py | sorwarduet/ecommerce | d1e0818d2b8372d668b672a5f0737900d144c38a | [
"MIT"
] | null | null | null | import pytest
from ecommerce.users.models import User
pytestmark = pytest.mark.django_db
def test_user_get_absolute_url(user: User):
assert user.get_absolute_url() == f"/users/{user.username}/"
| 20.2 | 64 | 0.772277 |
add63f96d39f5140700e9ed0bcc835f045153122 | 5,851 | py | Python | data/utils_optuna_trials/hulm_sample_data_utils.py | humanlab/HaRT | ab5da16cb1bfdadc3fb77a99f0fda8123ea1fe02 | [
"Apache-2.0"
] | null | null | null | data/utils_optuna_trials/hulm_sample_data_utils.py | humanlab/HaRT | ab5da16cb1bfdadc3fb77a99f0fda8123ea1fe02 | [
"Apache-2.0"
] | null | null | null | data/utils_optuna_trials/hulm_sample_data_utils.py | humanlab/HaRT | ab5da16cb1bfdadc3fb77a99f0fda8123ea1fe02 | [
"Apache-2.0"
] | null | null | null | import os
import pandas as pd
from sqlalchemy import create_engine
from sqlalchemy.engine.url import URL
from data.utils_hart.hulm_data_utils import transform_data, group_data
def get_conn(data_args):
myDB = URL(drivername='mysql', host=data_args.hostname,
database=data_args.db, query={'read_defaul... | 50.008547 | 230 | 0.667065 |
ade7b9ca40b92e1d0a0842cc3ef1a99b348e1347 | 2,358 | py | Python | pupa/cli/commands/dbinit.py | azban/pupa | 158378e19bcc322796aa4fb766784cbd4fd08413 | [
"BSD-3-Clause"
] | 62 | 2015-01-08T05:46:46.000Z | 2022-01-31T03:27:14.000Z | pupa/cli/commands/dbinit.py | azban/pupa | 158378e19bcc322796aa4fb766784cbd4fd08413 | [
"BSD-3-Clause"
] | 199 | 2015-01-10T03:19:37.000Z | 2021-05-21T20:34:58.000Z | pupa/cli/commands/dbinit.py | azban/pupa | 158378e19bcc322796aa4fb766784cbd4fd08413 | [
"BSD-3-Clause"
] | 35 | 2015-03-09T19:41:42.000Z | 2021-06-22T20:01:35.000Z | import django
from django.db import connection
from django.core.management import call_command
from .base import BaseCommand
def copy_tmp(tablename):
cursor = connection.cursor()
print('copying data from table ' + tablename)
cursor.execute("DROP TABLE IF EXISTS tmp_{t};".format(t=tablename))
cursor.e... | 36.276923 | 96 | 0.647159 |
87b306af7991f1dc913ce49227f425a9318f1cd3 | 743 | py | Python | redirect/tests.py | seancallaway/shrtn | 730cf0c0f70617a88a431c47fc6dd4f83b6c6461 | [
"MIT"
] | 2 | 2020-12-02T17:36:02.000Z | 2021-03-29T15:09:04.000Z | redirect/tests.py | seancallaway/shrtn | 730cf0c0f70617a88a431c47fc6dd4f83b6c6461 | [
"MIT"
] | null | null | null | redirect/tests.py | seancallaway/shrtn | 730cf0c0f70617a88a431c47fc6dd4f83b6c6461 | [
"MIT"
] | null | null | null | from django.shortcuts import reverse
from django.test import TestCase
from redirect.models import Redirect, SLUG_LENGTH
class RedirectModelTests(TestCase):
def setUp(self) -> None:
self.redirect = Redirect.objects.create(
target='https://mail.google.com/'
)
def test_redirect_cre... | 32.304348 | 116 | 0.69852 |
1f9190c838c22954346476e35c5c50fabf5bffa6 | 11,218 | py | Python | release/stubs.min/Autodesk/Revit/DB/Analysis_parts/SpatialFieldManager.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 182 | 2017-06-27T02:26:15.000Z | 2022-03-30T18:53:43.000Z | release/stubs.min/Autodesk/Revit/DB/Analysis_parts/SpatialFieldManager.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 28 | 2017-06-27T13:38:23.000Z | 2022-03-15T11:19:44.000Z | release/stubs.min/Autodesk/Revit/DB/Analysis_parts/SpatialFieldManager.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 67 | 2017-06-28T09:43:59.000Z | 2022-03-20T21:17:10.000Z | class SpatialFieldManager(Element,IDisposable):
"""
Exposes all API for an external analysis application.
Its primary role is creation,deletion and modification of SpatialFieldElement elements.
"""
def AddSpatialFieldPrimitive(self,*__args):
"""
AddSpatialFieldPrimitive(self: SpatialFieldManager,re... | 24.124731 | 215 | 0.717864 |
b93c48fb34e165465f94848f00504f4b25650638 | 588 | py | Python | Actividades/LimpiezaRobot/cleaning_test.py | joeirigoyen/MultiAgent-Projects | c3112dc999e7db3b2295cddbf5d7660896ead551 | [
"MIT"
] | null | null | null | Actividades/LimpiezaRobot/cleaning_test.py | joeirigoyen/MultiAgent-Projects | c3112dc999e7db3b2295cddbf5d7660896ead551 | [
"MIT"
] | null | null | null | Actividades/LimpiezaRobot/cleaning_test.py | joeirigoyen/MultiAgent-Projects | c3112dc999e7db3b2295cddbf5d7660896ead551 | [
"MIT"
] | null | null | null | #%%
from cleaning_model import CleaningModel
MAX_STEPS = 800
model = CleaningModel(10, 10, 20, 50)
for i in range(MAX_STEPS):
model.step()
required_steps = model.ticks
cleaned_cells = model.dirtycell_datacollector.get_model_vars_dataframe()
total_moves = model.dirtycell_datacollector.get_agent_vars_dataframe()... | 24.5 | 109 | 0.767007 |
d6f11a9990152426431d94e5c01fc165d9e54bb5 | 295 | py | Python | app/setdb.py | gregdek/factoryman | c4056e6b23ca6a6bb50d5e1e768d3da322592fb4 | [
"Apache-2.0"
] | null | null | null | app/setdb.py | gregdek/factoryman | c4056e6b23ca6a6bb50d5e1e768d3da322592fb4 | [
"Apache-2.0"
] | null | null | null | app/setdb.py | gregdek/factoryman | c4056e6b23ca6a6bb50d5e1e768d3da322592fb4 | [
"Apache-2.0"
] | null | null | null | # This is a separate script that sets game-independent
# variables, like commodity prices.
import redis
r = redis.StrictRedis('localhost', 6379, charset="utf-8", decode_responses=True)
# Set commodity prices
r.set("buy:A", "2")
r.set("sell:A", "1")
r.set("buy:B", "10")
r.set("sell:B", "8")
| 22.692308 | 80 | 0.681356 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.