hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 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 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7960a4b9ec7318912f10feed8cd58804a8130b53 | 83 | py | Python | deepmachine/networks/__init__.py | yuxiang-zhou/deepmachine | b8a64354f7d37664172ef79a66b1fc0a9fa0f493 | [
"MIT"
] | 1 | 2018-09-04T11:12:11.000Z | 2018-09-04T11:12:11.000Z | deepmachine/networks/__init__.py | yuxiang-zhou/deepmachine | b8a64354f7d37664172ef79a66b1fc0a9fa0f493 | [
"MIT"
] | null | null | null | deepmachine/networks/__init__.py | yuxiang-zhou/deepmachine | b8a64354f7d37664172ef79a66b1fc0a9fa0f493 | [
"MIT"
] | null | null | null | from .sequence import *
from .mrcnn import *
from .mesh import *
from .tfl import * | 20.75 | 23 | 0.722892 |
7960a5bbde1f9254c39a53f2c8784e24dcdc0819 | 102,088 | py | Python | gluon/contrib/pypyodbc.py | himelpdas/biddrive | 786e0fc58d8c0afeef0bcad9125b0d98eaabc709 | [
"BSD-3-Clause"
] | 97 | 2015-01-17T09:41:57.000Z | 2022-03-15T11:39:03.000Z | webui/gluon/contrib/pypyodbc.py | pouyana/teireader | ac0a92d8b2e570eae1c0a03fd35a7b281eccd250 | [
"MIT"
] | 26 | 2015-01-02T13:35:48.000Z | 2015-06-10T14:39:07.000Z | webui/gluon/contrib/pypyodbc.py | pouyana/teireader | ac0a92d8b2e570eae1c0a03fd35a7b281eccd250 | [
"MIT"
] | 35 | 2015-01-25T04:48:37.000Z | 2021-01-29T20:32:26.000Z | # -*- coding: utf-8 -*-
# PyPyODBC is develped from RealPyODBC 0.1 beta released in 2004 by Michele Petrazzo. Thanks Michele.
# The MIT License (MIT)
#
# Copyright (c) 2013 Henry Zhou <jiangwen365@gmail.com> and PyPyODBC contributors
# Copyright (c) 2004 Michele Petrazzo
# Permission is hereby granted, free of charg... | 38.049944 | 165 | 0.603509 |
7960a6b71b71ab1ee64b5a3c1d3d14d9c1ad28cc | 2,945 | py | Python | cairis/controllers/CExportController.py | khanghuynhle/cairis | 3fa2b7b55eb6cf1dbe4b43dd93dbed9a42d36fd9 | [
"Apache-2.0"
] | null | null | null | cairis/controllers/CExportController.py | khanghuynhle/cairis | 3fa2b7b55eb6cf1dbe4b43dd93dbed9a42d36fd9 | [
"Apache-2.0"
] | null | null | null | cairis/controllers/CExportController.py | khanghuynhle/cairis | 3fa2b7b55eb6cf1dbe4b43dd93dbed9a42d36fd9 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may... | 38.246753 | 122 | 0.771477 |
7960a75bb56915fe9db4954b895247d84bfdb1c4 | 3,266 | py | Python | ros/src/twist_controller/twist_controller.py | zakiryne/CarND_ROS | 8a9e5ae1fb2aa84b1a7a490ebbbac74853574b5c | [
"MIT"
] | null | null | null | ros/src/twist_controller/twist_controller.py | zakiryne/CarND_ROS | 8a9e5ae1fb2aa84b1a7a490ebbbac74853574b5c | [
"MIT"
] | 4 | 2020-11-13T18:43:01.000Z | 2022-03-12T00:21:29.000Z | ros/src/twist_controller/twist_controller.py | towardsautonomy/self_driving_car_udacity | 2cd4ecdea637437a671423dafb13e8bd181c1c57 | [
"MIT"
] | null | null | null | import rospy
from geometry_msgs.msg import TwistStamped
from pid import PID
from yaw_controller import YawController
from lowpass import LowPassFilter
GAS_DENSITY = 2.858
ONE_MPH = 0.44704
THROTTLE_MIN = -1.0 # Actual minimum is 0.0, it is set to -1.0 to find the amount of braking
THROTTLE_MAX = 1.0
BRAKE_SLOWDOWN_TO... | 41.871795 | 122 | 0.547152 |
7960a7867c92503b501a64f80c68f1da1ce3b401 | 142 | py | Python | ds2/deque/__init__.py | keelya/datastructures | 467794cc67a124509d9edad0648a87a76ed2b0fc | [
"MIT"
] | 159 | 2017-10-02T22:03:14.000Z | 2022-03-10T23:02:22.000Z | ds2/deque/__init__.py | keelya/datastructures | 467794cc67a124509d9edad0648a87a76ed2b0fc | [
"MIT"
] | 9 | 2019-02-04T14:55:09.000Z | 2021-06-05T13:30:28.000Z | ds2/deque/__init__.py | keelya/datastructures | 467794cc67a124509d9edad0648a87a76ed2b0fc | [
"MIT"
] | 49 | 2017-09-29T17:51:16.000Z | 2022-03-10T23:12:17.000Z | from ds2.deque.linkedlist import LinkedList
from ds2.deque.listdeque import ListDeque
from ds2.deque.doublylinkedlist import DoublyLinkedList
| 35.5 | 55 | 0.873239 |
7960a8000c818a551fca7997b0e72007c3bceb09 | 120 | py | Python | example/counter.py | hi1280/pytest-example | 1fa03b5d118d47d52beb707b5d8ce2ffffc786a1 | [
"MIT"
] | null | null | null | example/counter.py | hi1280/pytest-example | 1fa03b5d118d47d52beb707b5d8ce2ffffc786a1 | [
"MIT"
] | null | null | null | example/counter.py | hi1280/pytest-example | 1fa03b5d118d47d52beb707b5d8ce2ffffc786a1 | [
"MIT"
] | null | null | null | class Counter:
def __init__(self):
self.count = 0
def increment(self):
self.count += 1
return self.count | 20 | 22 | 0.65 |
7960a8c1a9728fd7939a36025b4e9989199a366f | 348 | py | Python | Search/39. Combination Sum.py | viewv/leetcode | b31e643846bb38978746342e3e3a94991178565a | [
"MIT"
] | 2 | 2018-02-26T09:12:19.000Z | 2019-06-07T13:38:10.000Z | Search/39. Combination Sum.py | viewv/leetcode | b31e643846bb38978746342e3e3a94991178565a | [
"MIT"
] | 1 | 2018-12-24T07:03:34.000Z | 2018-12-24T07:03:34.000Z | Search/39. Combination Sum.py | viewv/leetcode | b31e643846bb38978746342e3e3a94991178565a | [
"MIT"
] | 2 | 2018-12-24T07:01:03.000Z | 2019-06-07T13:38:07.000Z | from itertools import product, compress
class Solution:
def combinationSum(self, candidates: List[int], target: int) -> List[List[int]]:
ans = []
for pattern in product((0, 1), repeat=len(candidates)):
temp = list(compress(candidates, pattern))
if sum(temp) == target:
... | 31.636364 | 84 | 0.600575 |
7960a8d1cc607873bb814cca20e84bbd743597e3 | 477 | py | Python | post/migrations/0003_post_uid.py | thedognexttothetrashcan/bbstest | 4996e9a7dbd4e14b33c41667b94e57db7a5f963b | [
"Apache-2.0"
] | null | null | null | post/migrations/0003_post_uid.py | thedognexttothetrashcan/bbstest | 4996e9a7dbd4e14b33c41667b94e57db7a5f963b | [
"Apache-2.0"
] | 2 | 2019-01-15T09:54:42.000Z | 2019-01-15T14:11:01.000Z | post/migrations/0003_post_uid.py | thedognexttothetrashcan/bbstest | 4996e9a7dbd4e14b33c41667b94e57db7a5f963b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2019-01-20 11:49
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('post', '0002_auto_20190116_1510'),
]
operations = [
migrations.AddField(
... | 21.681818 | 49 | 0.60587 |
7960a91006a49b0fefa582ba133f48e31a356611 | 1,025 | py | Python | main.py | lisa-wilkinson/threezerozeroeight | b5de230c9a5a3c78e5f52ef6dc9dbed861a0c8cd | [
"BSD-2-Clause"
] | null | null | null | main.py | lisa-wilkinson/threezerozeroeight | b5de230c9a5a3c78e5f52ef6dc9dbed861a0c8cd | [
"BSD-2-Clause"
] | null | null | null | main.py | lisa-wilkinson/threezerozeroeight | b5de230c9a5a3c78e5f52ef6dc9dbed861a0c8cd | [
"BSD-2-Clause"
] | null | null | null | #! /usr/bin/env python3
import numpy as np
import h5py
import note_decompose as nde
import note_recompose as nre
import noisegate as ngate
import note_utils as note
import sys
import math_fun
def main():
print("decomposing")
nde_class = nde.decompose('test.wav')
nde_class.octaves = (2,15)
nde_class.decompose('n... | 21.354167 | 77 | 0.668293 |
7960a9eea43aa24ed62ec34933906da660159321 | 64,514 | py | Python | Versions/v_2.1/BOID_v2.0_2.py | Lamouse/Evolutionary-Creativity | 9e9a4094285241d0541e0b87a3bd2c5e4ba804d3 | [
"MIT"
] | null | null | null | Versions/v_2.1/BOID_v2.0_2.py | Lamouse/Evolutionary-Creativity | 9e9a4094285241d0541e0b87a3bd2c5e4ba804d3 | [
"MIT"
] | null | null | null | Versions/v_2.1/BOID_v2.0_2.py | Lamouse/Evolutionary-Creativity | 9e9a4094285241d0541e0b87a3bd2c5e4ba804d3 | [
"MIT"
] | null | null | null | import breve
import random
import math
import copy
import cPickle
import time
__author__ = 'Paulo Pereira'
class Swarm( breve.Control ):
def __init__( self ):
breve.Control.__init__( self )
# Random Number Generator
random.seed( 5 )
self.setRandomSeed( 5 )
# self.setRandomSeedFromDevRandom()
self.show... | 29.71626 | 342 | 0.676861 |
7960aa134d24a5ae6ed4f71de91a8951093b668f | 13,474 | py | Python | google/cloud/translate/v3/translation-v3-py/google/cloud/translate_v3/services/translation_service/transports/base.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/cloud/translate/v3/translation-v3-py/google/cloud/translate_v3/services/translation_service/transports/base.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/cloud/translate/v3/translation-v3-py/google/cloud/translate_v3/services/translation_service/transports/base.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 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... | 39.629412 | 161 | 0.61986 |
7960ab2ddd839bc16507a9748f8b98e2de2c6bdc | 2,869 | py | Python | modules/debugger/terminals/terminal_process.py | kortschak/sublime_debugger | 3fb4d231fe6459727000f6635e38eb88f88335f9 | [
"MIT"
] | null | null | null | modules/debugger/terminals/terminal_process.py | kortschak/sublime_debugger | 3fb4d231fe6459727000f6635e38eb88f88335f9 | [
"MIT"
] | null | null | null | modules/debugger/terminals/terminal_process.py | kortschak/sublime_debugger | 3fb4d231fe6459727000f6635e38eb88f88335f9 | [
"MIT"
] | null | null | null | from ...typecheck import *
from ...import core
from .import Terminal
import threading
import re
try:
if core.platform.windows:
from winpty import PtyProcess #type: ignore
else:
from ...libs.ptyprocess import PtyProcess as _PtyProcess #type: ignore
class PtyProcess(_PtyProcess): #type: ignore
def read(s... | 26.321101 | 149 | 0.70129 |
7960abe234fbca4a5e9e644a730fe9a877c34b65 | 624 | py | Python | dcbr-api/manage.py | WadeBarnes/agri-dcbr | 92a62ec8c22a3b7b6dd1978eaa7320494a9ca9d9 | [
"Apache-2.0"
] | 1 | 2020-07-11T23:20:16.000Z | 2020-07-11T23:20:16.000Z | dcbr-api/manage.py | WadeBarnes/agri-dcbr | 92a62ec8c22a3b7b6dd1978eaa7320494a9ca9d9 | [
"Apache-2.0"
] | 19 | 2019-07-26T22:47:49.000Z | 2020-12-15T22:06:25.000Z | dcbr-api/manage.py | WadeBarnes/agri-dcbr | 92a62ec8c22a3b7b6dd1978eaa7320494a9ca9d9 | [
"Apache-2.0"
] | 7 | 2019-04-15T17:13:09.000Z | 2019-12-09T23:52:53.000Z | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'dcbr.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportErr... | 28.363636 | 73 | 0.68109 |
7960abe5c2e85d990e4bc68abeb5673d845650fa | 2,586 | py | Python | test/test_pipeline/components/feature_preprocessing/test_kernel_pca.py | FelixNeutatz/auto-sklearn | b5d141603332041475ed746aa1640334f5561aea | [
"BSD-3-Clause"
] | 2 | 2020-02-22T15:00:49.000Z | 2020-06-28T08:20:19.000Z | test/test_pipeline/components/feature_preprocessing/test_kernel_pca.py | FelixNeutatz/auto-sklearn | b5d141603332041475ed746aa1640334f5561aea | [
"BSD-3-Clause"
] | null | null | null | test/test_pipeline/components/feature_preprocessing/test_kernel_pca.py | FelixNeutatz/auto-sklearn | b5d141603332041475ed746aa1640334f5561aea | [
"BSD-3-Clause"
] | 1 | 2021-01-17T14:05:08.000Z | 2021-01-17T14:05:08.000Z | import sys
import unittest
from sklearn.linear_model import RidgeClassifier
from autosklearn.pipeline.components.feature_preprocessing.kernel_pca import \
KernelPCA
from autosklearn.pipeline.util import _test_preprocessing, PreprocessingTestCase, \
get_dataset
import sklearn.metrics
class KernelPCAComponentT... | 48.792453 | 83 | 0.610596 |
7960ac78b1dbe6aaf92be41b2bd7c1d5599b6f79 | 2,407 | py | Python | customers/views.py | ThePokerFaCcCe/onlineshop | 1cda1fc567cdc8cbcc5ddab28e094ae433efcacd | [
"MIT"
] | 1 | 2022-02-23T10:53:48.000Z | 2022-02-23T10:53:48.000Z | customers/views.py | ThePokerFaCcCe/onlineshop | 1cda1fc567cdc8cbcc5ddab28e094ae433efcacd | [
"MIT"
] | null | null | null | customers/views.py | ThePokerFaCcCe/onlineshop | 1cda1fc567cdc8cbcc5ddab28e094ae433efcacd | [
"MIT"
] | null | null | null | from rest_framework.permissions import IsAdminUser, IsAuthenticated
from utils.permissions import IsAdmin, IsOwnerOfItem, IsSuperUser
from rest_framework import generics, viewsets
from rest_framework.decorators import action, permission_classes
from rest_framework.response import Response
from rest_framework.parsers im... | 43.763636 | 156 | 0.740341 |
7960af3287cea009b13cae6fa3a6a577815df026 | 3,710 | py | Python | imagepy/menus/Kit3D/Binary 3D/binary3d_plgs.py | BioinfoTongLI/imagepy | b86f33f20e872ee8b86471a9ddfbd5ad064fd64d | [
"BSD-4-Clause"
] | 2 | 2019-08-15T06:19:18.000Z | 2021-10-09T15:51:57.000Z | imagepy/menus/Kit3D/Binary 3D/binary3d_plgs.py | BioinfoTongLI/imagepy | b86f33f20e872ee8b86471a9ddfbd5ad064fd64d | [
"BSD-4-Clause"
] | null | null | null | imagepy/menus/Kit3D/Binary 3D/binary3d_plgs.py | BioinfoTongLI/imagepy | b86f33f20e872ee8b86471a9ddfbd5ad064fd64d | [
"BSD-4-Clause"
] | null | null | null | # -*- coding: utf-8 -*
import scipy.ndimage as ndimg
from imagepy.core.engine import Simple
from skimage.morphology import skeletonize_3d
from imagepy.ipyalg import find_maximum, watershed
from skimage.filters import apply_hysteresis_threshold
from imagepy.ipyalg import distance_transform_edt
import numpy as np
class ... | 33.727273 | 99 | 0.580593 |
7960af4dac57e25f3cdb5401e947950ffd77dd9d | 961 | py | Python | pyhessian/__init__.py | vikranth22446/PyHessian | e8b1fbadb24349eef8f3a137ecfd27dfc6e3bb53 | [
"MIT"
] | 357 | 2019-12-13T01:59:00.000Z | 2022-03-31T14:00:45.000Z | pyhessian/__init__.py | vikranth22446/PyHessian | e8b1fbadb24349eef8f3a137ecfd27dfc6e3bb53 | [
"MIT"
] | 12 | 2020-02-15T13:08:02.000Z | 2022-03-28T04:03:37.000Z | pyhessian/__init__.py | vikranth22446/PyHessian | e8b1fbadb24349eef8f3a137ecfd27dfc6e3bb53 | [
"MIT"
] | 62 | 2019-12-13T18:45:07.000Z | 2022-03-09T17:14:30.000Z | #*
# @file Different utility functions
# Copyright (c) Zhewei Yao, Amir Gholami
# All rights reserved.
# This file is part of PyHessian library.
#
# PyHessian is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, ei... | 35.592593 | 111 | 0.776275 |
7960afbffcde8934ae0f3cfeb732680b3432d57f | 121 | py | Python | output/models/ms_data/regex/re_c57_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/ms_data/regex/re_c57_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/ms_data/regex/re_c57_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from output.models.ms_data.regex.re_c57_xsd.re_c57 import (
Regex,
Doc,
)
__all__ = [
"Regex",
"Doc",
]
| 12.1 | 59 | 0.603306 |
7960afc797ba4c5e015a62e53d55574d45ada8b2 | 6,162 | py | Python | fabfile.py | mike1729/Aleph-Testnet | 2584b092c74de6a268e755fb287e4f6d190097a2 | [
"Apache-2.0"
] | null | null | null | fabfile.py | mike1729/Aleph-Testnet | 2584b092c74de6a268e755fb287e4f6d190097a2 | [
"Apache-2.0"
] | null | null | null | fabfile.py | mike1729/Aleph-Testnet | 2584b092c74de6a268e755fb287e4f6d190097a2 | [
"Apache-2.0"
] | null | null | null | '''Routines called by fab. Assumes that all are called from */experiments/aws.'''
from subprocess import call
from fabric import task
from os import remove
# ======================================================================================
# setup
# =============================... | 29.625 | 97 | 0.518825 |
7960b09c935f71de95af7791e13b16ce54a9abd9 | 2,420 | py | Python | scripts/contracheque_to_csv.py | AndreAngelucci/analises | 86c86f536aab30ea8d4517530b1ac229252bc9b0 | [
"MIT"
] | 31 | 2020-01-06T17:41:03.000Z | 2021-12-03T13:10:28.000Z | scripts/contracheque_to_csv.py | AndreAngelucci/analises | 86c86f536aab30ea8d4517530b1ac229252bc9b0 | [
"MIT"
] | 71 | 2020-05-30T18:20:24.000Z | 2022-03-01T21:04:00.000Z | scripts/contracheque_to_csv.py | AndreAngelucci/analises | 86c86f536aab30ea8d4517530b1ac229252bc9b0 | [
"MIT"
] | 16 | 2019-11-27T01:18:44.000Z | 2021-10-11T11:07:51.000Z | import argparse
import sys
from pathlib import Path
import pandas as pd
from scripts.parsers import currency_to_float
from unidecode import unidecode
"""
Os arquivos precisam ser salvos no formato `ano_mes_entidade.xls`.
Exemplo: `2020_04_prefeitura.xls`
O script funciona em arquivos `.xls` onde as duas primeiras
l... | 26.593407 | 88 | 0.666942 |
7960b1bb22655a09ba0d11b6cd22f4da89ea0a74 | 619 | py | Python | tests/test_CoreCli.py | pbianchi/climatic | dc0fa65640e9b8161d07b10c73245c33244124b9 | [
"MIT"
] | 12 | 2021-03-08T13:22:13.000Z | 2022-02-10T01:02:41.000Z | tests/test_CoreCli.py | pbianchi/climatic | dc0fa65640e9b8161d07b10c73245c33244124b9 | [
"MIT"
] | 1 | 2022-02-03T22:59:33.000Z | 2022-02-03T23:46:42.000Z | tests/test_CoreCli.py | pbianchi/climatic | dc0fa65640e9b8161d07b10c73245c33244124b9 | [
"MIT"
] | 2 | 2021-10-18T01:38:31.000Z | 2022-01-26T23:19:21.000Z | import pexpect
import pytest
import re
from expects import *
from unittest.mock import MagicMock
from unittest.mock import Mock
from climatic.CoreCli import CoreCli
def test_core_cli_constructor_destructor(core_cli):
connection = Mock()
cmd = core_cli(connection)
del cmd
connection.connect.assert_ca... | 21.344828 | 51 | 0.705977 |
7960b20cc70cdbcecd8f69c22a2e605e8e5c1066 | 19,913 | py | Python | ctm_api_client/models/deployment_file_results.py | tadinve/ctm_python_client | de44e5012214ec42bb99b7f9b4ebc5394cd14328 | [
"BSD-3-Clause"
] | null | null | null | ctm_api_client/models/deployment_file_results.py | tadinve/ctm_python_client | de44e5012214ec42bb99b7f9b4ebc5394cd14328 | [
"BSD-3-Clause"
] | null | null | null | ctm_api_client/models/deployment_file_results.py | tadinve/ctm_python_client | de44e5012214ec42bb99b7f9b4ebc5394cd14328 | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
"""
Control-M Services
Provides access to BMC Control-M Services # noqa: E501
OpenAPI spec version: 9.20.215
Contact: customer_support@bmc.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from ctm_api_cl... | 35.62254 | 138 | 0.678401 |
7960b2142d868e2cbdf38e441dddcfec0540c53f | 6,660 | py | Python | basil_refapi/storage.py | eve-basil/refapi | 37415883b43f6fa63b35911f47aa45db2976a670 | [
"Apache-2.0"
] | null | null | null | basil_refapi/storage.py | eve-basil/refapi | 37415883b43f6fa63b35911f47aa45db2976a670 | [
"Apache-2.0"
] | 2 | 2016-01-12T20:12:20.000Z | 2016-02-03T07:25:34.000Z | basil_refapi/storage.py | eve-basil/refapi | 37415883b43f6fa63b35911f47aa45db2976a670 | [
"Apache-2.0"
] | null | null | null | import json
from sqlalchemy import Column, Float, Integer, String, Boolean
from sqlalchemy.ext.declarative import declarative_base
from basil_common import logging
LOG = logging.getLogger(__name__)
Base = declarative_base()
class Region(Base):
__tablename__ = 'mapRegions'
id = Column('regionID', Integer, p... | 34.6875 | 77 | 0.646697 |
7960b26951a7854cb9472565cf3d71fce09d54aa | 4,384 | py | Python | mangacover/datasets/internals/MangaDex.py | taksqth/MangaCover | e71f0b96bc1620d4ada6a1402213ba8f752b56cc | [
"Apache-2.0"
] | null | null | null | mangacover/datasets/internals/MangaDex.py | taksqth/MangaCover | e71f0b96bc1620d4ada6a1402213ba8f752b56cc | [
"Apache-2.0"
] | 1 | 2021-06-21T03:08:13.000Z | 2021-06-21T03:08:13.000Z | mangacover/datasets/internals/MangaDex.py | taksqth/MangaCover | e71f0b96bc1620d4ada6a1402213ba8f752b56cc | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: notebooks/00_datasets.internals.mangadex.ipynb (unless otherwise specified).
__all__ = ['MangaDexClient', 'get_covers_for_all_tags']
# Cell
import requests
import json
class MangaDexClient:
"""Client for the MangaDex API"""
def __init__(self, credentials_file):
... | 35.072 | 120 | 0.560903 |
7960b61f57e3c2564a288ac20e6bd31a9796e6e9 | 392 | py | Python | tests/conftest.py | evancolvin/hypermodern-python-emc | 0063ac755e09e1b98b60408e3df4d950dd0ded6f | [
"MIT"
] | null | null | null | tests/conftest.py | evancolvin/hypermodern-python-emc | 0063ac755e09e1b98b60408e3df4d950dd0ded6f | [
"MIT"
] | null | null | null | tests/conftest.py | evancolvin/hypermodern-python-emc | 0063ac755e09e1b98b60408e3df4d950dd0ded6f | [
"MIT"
] | null | null | null | import pytest
@pytest.fixture
def mock_requests_get(mocker):
mock = mocker.patch("requests.get")
mock.return_value.__enter__.return_value.json.return_value = {
"title": "Lorem Ipsum",
"extract": "Lorem ipsum dolar sit amet"
}
return mock
def pytest_configure(config):
... | 26.133333 | 71 | 0.660714 |
7960b6c0ad8f9c35b8d40f65607762c909fb2330 | 8,431 | py | Python | utils/deeplearningutilities/torch/evolution_trainer.py | benjaminum/adaptive-surface-reconstruction | 32fa4cdcb56e10451cc93e574d6a628f883277b7 | [
"Apache-2.0"
] | 29 | 2021-11-02T08:35:33.000Z | 2022-03-28T16:26:17.000Z | utils/deeplearningutilities/torch/evolution_trainer.py | benjaminum/adaptive-surface-reconstruction | 32fa4cdcb56e10451cc93e574d6a628f883277b7 | [
"Apache-2.0"
] | 1 | 2022-03-24T12:36:50.000Z | 2022-03-24T12:36:50.000Z | utils/deeplearningutilities/torch/evolution_trainer.py | benjaminum/adaptive-surface-reconstruction | 32fa4cdcb56e10451cc93e574d6a628f883277b7 | [
"Apache-2.0"
] | 4 | 2021-12-11T00:34:14.000Z | 2021-12-20T00:24:24.000Z | from .trainer import Trainer, STOP_TIME
from .my_checkpoint_management import MyCheckpointManager
import signal
class EvolutionTrainer(Trainer):
def __init__(
self,
root_dir,
evolutions,
keep_checkpoint_steps,
save_interval_minutes=30,
signal_handler_signals=(signa... | 40.729469 | 107 | 0.596371 |
7960b8c3b2df26391200ff105a5f390c4bab336b | 307 | py | Python | mapping.py | athn-nik/cognitive_nlp | 289619ce3746df47d4ff65165add847f43a6ac60 | [
"MIT"
] | null | null | null | mapping.py | athn-nik/cognitive_nlp | 289619ce3746df47d4ff65165add847f43a6ac60 | [
"MIT"
] | 8 | 2018-04-13T03:06:13.000Z | 2018-05-03T20:40:29.000Z | mapping.py | nathan74/cognitive_nlp | 289619ce3746df47d4ff65165add847f43a6ac60 | [
"MIT"
] | 1 | 2018-10-29T16:21:41.000Z | 2018-10-29T16:21:41.000Z | '''
We have
X source space
Y target space
We want the "mapping" matrix
'''
from numpy.linalg import svd
import numpy as np
h = np.matmul(x, y.T, out=None)
U,S,V = svd(h, full_matrices=True, compute_uv=True)
#U,_,V=svd(X*Y')
S = np.eye(U.shape[1], V.shape[0]) * S
#U*V'
tr_m = np.matmul(U, V.T, out=None) | 17.055556 | 51 | 0.654723 |
7960b8e16b61a762d1c2f21eeabbc7182d076f7c | 28,482 | py | Python | src/robot/libraries/DateTime.py | ldtri0209/robotframework | 6bc11a350cbaf5d0801cc5431f32cc1435bb65df | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/robot/libraries/DateTime.py | ldtri0209/robotframework | 6bc11a350cbaf5d0801cc5431f32cc1435bb65df | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/robot/libraries/DateTime.py | ldtri0209/robotframework | 6bc11a350cbaf5d0801cc5431f32cc1435bb65df | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2008-2014 Nokia Solutions and Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 43.818462 | 114 | 0.643529 |
7960b97d78be13bf7dfa407a2751d8929fa9653d | 2,540 | py | Python | python/tests/source/external/test_deltatable_source.py | fvaleye/metadata-guardian | ab5d6cada67785c3cfd98112f68e8fdb193d1617 | [
"Apache-2.0"
] | 9 | 2021-12-31T20:32:35.000Z | 2022-02-18T17:51:49.000Z | python/tests/source/external/test_deltatable_source.py | fvaleye/metadata-guardian | ab5d6cada67785c3cfd98112f68e8fdb193d1617 | [
"Apache-2.0"
] | 1 | 2022-02-25T16:35:04.000Z | 2022-02-28T21:08:53.000Z | python/tests/source/external/test_deltatable_source.py | fvaleye/metadata-guardian | ab5d6cada67785c3cfd98112f68e8fdb193d1617 | [
"Apache-2.0"
] | null | null | null | from unittest.mock import Mock, patch
from deltalake import Field, Schema
from metadata_guardian.source import ColumnMetadata, DeltaTableSource
@patch("deltalake.DeltaTable")
def test_deltatable_source_get_column_names(mock_connection):
uri = "s3://test_table"
schema = Schema(
fields=[
F... | 29.534884 | 85 | 0.588976 |
7960ba08c316f2698338909eedfeeecb57bc8fc8 | 3,085 | py | Python | myuw/views/api/resources.py | timtim17/myuw | d59702a8095daf049d7e57cbb1f7f2a5bebc69af | [
"Apache-2.0"
] | null | null | null | myuw/views/api/resources.py | timtim17/myuw | d59702a8095daf049d7e57cbb1f7f2a5bebc69af | [
"Apache-2.0"
] | null | null | null | myuw/views/api/resources.py | timtim17/myuw | d59702a8095daf049d7e57cbb1f7f2a5bebc69af | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0
import logging
import traceback
from myuw.logger.timer import Timer
from myuw.logger.logresp import log_api_call
from myuw.dao import is_action_disabled
from myuw.views.api import ProtectedAPI
from myuw.views.error import handle_exc... | 32.473684 | 79 | 0.620746 |
7960bb39c40ad1932b4660d4db5db22696ccb27e | 248 | py | Python | JanggiGame/SocketServer/messages/__init__.py | MohamedAl-Hussein/janggi-game | 0664a408563b824c0b665d755ff9b232b6f24644 | [
"MIT"
] | null | null | null | JanggiGame/SocketServer/messages/__init__.py | MohamedAl-Hussein/janggi-game | 0664a408563b824c0b665d755ff9b232b6f24644 | [
"MIT"
] | null | null | null | JanggiGame/SocketServer/messages/__init__.py | MohamedAl-Hussein/janggi-game | 0664a408563b824c0b665d755ff9b232b6f24644 | [
"MIT"
] | null | null | null | from .message import Message
from .message_action import MessageAction
from .message_data import MessageData, SetupCompleted, PieceDestinations, MoveCompleted, GameStatus, PieceData
from .message_serialization import MessageDecoder, MessageEncoder
| 49.6 | 110 | 0.870968 |
7960bb79370bddd222f90e2c77cd5db7b899bca5 | 5,955 | py | Python | pype/hosts/maya/plugins/publish/collect_vrayscene.py | simonebarbieri/pype | a6dc83aa1300738749cbe8e5e2e6d2d1794e0289 | [
"MIT"
] | null | null | null | pype/hosts/maya/plugins/publish/collect_vrayscene.py | simonebarbieri/pype | a6dc83aa1300738749cbe8e5e2e6d2d1794e0289 | [
"MIT"
] | null | null | null | pype/hosts/maya/plugins/publish/collect_vrayscene.py | simonebarbieri/pype | a6dc83aa1300738749cbe8e5e2e6d2d1794e0289 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Collect Vray Scene and prepare it for extraction and publishing."""
import re
import maya.app.renderSetup.model.renderSetup as renderSetup
from maya import cmds
import pyblish.api
from avalon import api
from pype.hosts.maya import lib
class CollectVrayScene(pyblish.api.InstancePlugin):
... | 38.173077 | 101 | 0.552477 |
7960bd38375bcb26637c6adc0161b4932ee6f85b | 830 | py | Python | EXAMPLE/.vaultpass-client.py | dseeley/jenkins-ansible | 82a20173f319bd0b03cca65dae0321db8b5d00f6 | [
"BSD-3-Clause"
] | 1 | 2020-11-24T12:11:02.000Z | 2020-11-24T12:11:02.000Z | EXAMPLE/.vaultpass-client.py | dseeley/jenkins-ansible | 82a20173f319bd0b03cca65dae0321db8b5d00f6 | [
"BSD-3-Clause"
] | null | null | null | EXAMPLE/.vaultpass-client.py | dseeley/jenkins-ansible | 82a20173f319bd0b03cca65dae0321db8b5d00f6 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import os
import sys
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--vault-id", type=str)
args = parser.parse_args()
if args.vault_id is None or args.vault_id == "None" or args.vault_id == "default":
if os.environ.get('VAULT_PASSWORD_ALL') is not None and os.enviro... | 33.2 | 103 | 0.722892 |
7960be3d8f9e6b0cde32a3bc22f5bd8c52065bf8 | 3,096 | py | Python | app.py | Tiamat-Tech/SkinDeep | e407fa11978f4cf5d96caaaa279ee51612171792 | [
"Apache-2.0"
] | 785 | 2021-04-11T17:16:44.000Z | 2022-03-25T07:06:01.000Z | app.py | Tiamat-Tech/SkinDeep | e407fa11978f4cf5d96caaaa279ee51612171792 | [
"Apache-2.0"
] | 9 | 2021-04-14T04:38:13.000Z | 2021-12-11T13:06:54.000Z | app.py | Tiamat-Tech/SkinDeep | e407fa11978f4cf5d96caaaa279ee51612171792 | [
"Apache-2.0"
] | 92 | 2021-04-11T18:57:02.000Z | 2022-03-20T07:58:07.000Z | import streamlit as st
import fastai
from fastai.vision import *
from fastai.utils.mem import *
from fastai.vision import open_image, load_learner, image, torch
import numpy as np4
import urllib.request
import PIL.Image
from io import BytesIO
import torchvision.transforms as T
from PIL import Image
import requests
from... | 35.586207 | 103 | 0.679264 |
7960bf725524bb3bad060f60709b5141ff86403a | 855 | py | Python | sales/config/sales.py | dngupta78/sales | aee6be4ac46f6b63e85f819f68f14c242f1c9480 | [
"MIT"
] | 1 | 2015-10-06T14:03:29.000Z | 2015-10-06T14:03:29.000Z | sales/config/sales.py | dngupta78/sales | aee6be4ac46f6b63e85f819f68f14c242f1c9480 | [
"MIT"
] | null | null | null | sales/config/sales.py | dngupta78/sales | aee6be4ac46f6b63e85f819f68f14c242f1c9480 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from frappe import _
def get_data():
return [
{
"label": _("Documents"),
"icon": "icon-star",
"items": [
{
"type": "doctype",
"label":"Sales Invoice",
"name": "Flat Invoice",
"description": _("Create Flat Invoice")
},
{
"type": "d... | 19 | 49 | 0.51462 |
7960c0a206b59994bc3459d574e6ac1cab246a83 | 756 | py | Python | reciprocalspaceship/utils/cell.py | marinegor/reciprocalspaceship | 6a5ef478cea85183d178c35963016bdbe2c582bf | [
"MIT"
] | null | null | null | reciprocalspaceship/utils/cell.py | marinegor/reciprocalspaceship | 6a5ef478cea85183d178c35963016bdbe2c582bf | [
"MIT"
] | null | null | null | reciprocalspaceship/utils/cell.py | marinegor/reciprocalspaceship | 6a5ef478cea85183d178c35963016bdbe2c582bf | [
"MIT"
] | null | null | null | import numpy as np
def compute_dHKL(H, cell):
"""
Compute the real space lattice plane spacing, d, associated with
miller indices and cell.
Parameters
----------
H : array
An nx3 array of numerical miller indices.
cell : gemmi.UnitCell
The gemmi UnitCell object with the c... | 29.076923 | 75 | 0.64418 |
7960c0c8a0db81e1ab17b46e5599b356794696f7 | 1,433 | py | Python | test_extract_voltage_time_arrays.py | matthew-huber/bme590hrm | 8ecfd49fb2f374733e85ec262b4a7d9fa650f5e1 | [
"MIT"
] | null | null | null | test_extract_voltage_time_arrays.py | matthew-huber/bme590hrm | 8ecfd49fb2f374733e85ec262b4a7d9fa650f5e1 | [
"MIT"
] | 4 | 2018-10-19T20:05:31.000Z | 2018-10-30T15:33:51.000Z | test_extract_voltage_time_arrays.py | matthew-huber/bme590hrm | 8ecfd49fb2f374733e85ec262b4a7d9fa650f5e1 | [
"MIT"
] | null | null | null |
from analyze_data import extract_voltage_time_arrays
import pytest
from fileReader import load_csv
times, voltages = load_csv('./test_data/test_data3.csv')
@pytest.mark.parametrize("end,interval,expected", [
(0.025, 0.025,
[-0.2, -0.2, -0.2, -0.2, -0.2, -0.2, -0.2, -0.2, -0.19, -0.175]),
(1.001, 0.012,... | 34.119048 | 73 | 0.62596 |
7960c17b1259dcdecac9e9b5d5073db7b9dc7b76 | 5,072 | py | Python | mlflow/store/artifact/ftp_artifact_repo.py | trangevi/mlflow | 71c11aa181ee68dc3d8ac7bc1742dc54ba053052 | [
"Apache-2.0"
] | null | null | null | mlflow/store/artifact/ftp_artifact_repo.py | trangevi/mlflow | 71c11aa181ee68dc3d8ac7bc1742dc54ba053052 | [
"Apache-2.0"
] | null | null | null | mlflow/store/artifact/ftp_artifact_repo.py | trangevi/mlflow | 71c11aa181ee68dc3d8ac7bc1742dc54ba053052 | [
"Apache-2.0"
] | null | null | null | import os
import ftplib
from ftplib import FTP
from contextlib import contextmanager
import posixpath
from six.moves import urllib
from mlflow.entities.file_info import FileInfo
from mlflow.store.artifact.artifact_repo import ArtifactRepository
from mlflow.utils.file_utils import relative_path_to_artifact_path
from m... | 38.717557 | 97 | 0.621845 |
7960c1cca8b566fc943102f625c01e9284ffd45b | 29,865 | py | Python | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/operations/_resource_groups_operations.py | xolve/azure-sdk-for-python | 9f5baa19c392f77f811d936ee43450e4ea524002 | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/operations/_resource_groups_operations.py | xolve/azure-sdk-for-python | 9f5baa19c392f77f811d936ee43450e4ea524002 | [
"MIT"
] | null | null | null | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/operations/_resource_groups_operations.py | xolve/azure-sdk-for-python | 9f5baa19c392f77f811d936ee43450e4ea524002 | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # 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 ... | 40.195155 | 153 | 0.667269 |
7960c3389035868a19a2e45f7df6274de2832378 | 5,141 | py | Python | tests/test_util.py | MaestroGraph/quicksort | 54e1aba3b8a1acf3cd5326f5efab2b0a853f4b40 | [
"MIT"
] | null | null | null | tests/test_util.py | MaestroGraph/quicksort | 54e1aba3b8a1acf3cd5326f5efab2b0a853f4b40 | [
"MIT"
] | null | null | null | tests/test_util.py | MaestroGraph/quicksort | 54e1aba3b8a1acf3cd5326f5efab2b0a853f4b40 | [
"MIT"
] | null | null | null | import _context
import unittest
import torch, sys
#import sparse.layers.densities
import util
class TestLayers(unittest.TestCase):
def test_unique(self):
r = util.unique(torch.tensor( [[1,2,3,4],[4,3,2,1],[1,2,3,4]] ))
self.assertEqual((3, 1), r.size())
self.assertEqual(r[0], r[2])
... | 28.72067 | 106 | 0.447773 |
7960c3fba08db8e421cea9010e017536f35620b1 | 9,048 | py | Python | metrics.py | kevinchoy/oct-schlemm-seg | e8b78695521dc65a7bbd1bcdb65b0a6200af25b3 | [
"BSD-4-Clause-UC"
] | 1 | 2021-11-17T01:54:53.000Z | 2021-11-17T01:54:53.000Z | metrics.py | kevinchoy/oct-schlemm-seg | e8b78695521dc65a7bbd1bcdb65b0a6200af25b3 | [
"BSD-4-Clause-UC"
] | 1 | 2022-01-24T18:20:04.000Z | 2022-01-24T18:20:04.000Z | metrics.py | kevinchoy/oct-schlemm-seg | e8b78695521dc65a7bbd1bcdb65b0a6200af25b3 | [
"BSD-4-Clause-UC"
] | null | null | null | import csv
import glob
import os
from pathlib import Path
"""Code for "K. C. Choy, G. Li, W. D. Stamer, S. Farsiu, Open-source deep learning-based automatic segmentation of
mouse Schlemm’s canal in optical coherence tomography images. Experimental Eye Research, 108844 (2021)."
Link: https://www.sciencedirect.com/scien... | 42.083721 | 221 | 0.705902 |
7960c41822f3838e609fff69cf2db170c8515621 | 3,609 | py | Python | crds/tests/test_newcontext.py | nden/crds | b72f14cf07531ca70b61daa6b58e762e5899afa4 | [
"BSD-3-Clause"
] | null | null | null | crds/tests/test_newcontext.py | nden/crds | b72f14cf07531ca70b61daa6b58e762e5899afa4 | [
"BSD-3-Clause"
] | null | null | null | crds/tests/test_newcontext.py | nden/crds | b72f14cf07531ca70b61daa6b58e762e5899afa4 | [
"BSD-3-Clause"
] | null | null | null | """This module contains doctests and unit tests which exercise some of the more
complex features of the basic rmap infrastructure.
"""
from __future__ import division # confidence high
from __future__ import with_statement
from __future__ import print_function
import os, os.path
from pprint import pprint as pp
from ... | 38.393617 | 160 | 0.678304 |
7960c4219ae50fed87e22a88a471e1931c38ce8c | 749 | py | Python | TasKing/urls.py | BelikovStud/TasKing | a0a5fcba99eb117efafc623f60236fdf20070d20 | [
"MIT"
] | null | null | null | TasKing/urls.py | BelikovStud/TasKing | a0a5fcba99eb117efafc623f60236fdf20070d20 | [
"MIT"
] | null | null | null | TasKing/urls.py | BelikovStud/TasKing | a0a5fcba99eb117efafc623f60236fdf20070d20 | [
"MIT"
] | null | null | null | """TasKing URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/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... | 34.045455 | 77 | 0.708945 |
7960c437e0155d372b11e1b1f23d151a269974e6 | 1,866 | py | Python | venv/Lib/site-packages/pyrogram/raw/base/labeled_price.py | iamgeorgiy/heroku-userbot | 5a92417d16f8ead949d88cb38da213fc2da5d3a4 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/base/labeled_price.py | iamgeorgiy/heroku-userbot | 5a92417d16f8ead949d88cb38da213fc2da5d3a4 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/base/labeled_price.py | iamgeorgiy/heroku-userbot | 5a92417d16f8ead949d88cb38da213fc2da5d3a4 | [
"Apache-2.0"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2020 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 37.32 | 91 | 0.639871 |
7960c453709de9e2fb79551312919e742fcda42f | 2,030 | py | Python | tests/test_load_resolved_tool_contract.py | mpkocher/pbcommand | 78514aba81d131569e97ae339eab5271502cf4b7 | [
"BSD-3-Clause-Clear"
] | 1 | 2021-05-21T11:28:59.000Z | 2021-05-21T11:28:59.000Z | tests/test_load_resolved_tool_contract.py | mpkocher/pbcommand | 78514aba81d131569e97ae339eab5271502cf4b7 | [
"BSD-3-Clause-Clear"
] | null | null | null | tests/test_load_resolved_tool_contract.py | mpkocher/pbcommand | 78514aba81d131569e97ae339eab5271502cf4b7 | [
"BSD-3-Clause-Clear"
] | null | null | null | import pprint
import tempfile
import unittest
import logging
import os.path
from base_utils import get_data_file, get_tool_contract, get_resolved_tool_contract
from pbcommand.resolver import resolve_tool_contract
from pbcommand.pb_io.tool_contract_io import (load_resolved_tool_contract_from,
... | 34.40678 | 115 | 0.700985 |
7960c75ffc50e0051a803bea5e06d280033dd5e5 | 484 | py | Python | dashvisor/backends/file.py | alexsilva/django-dashvisor | 0126b894b5d52a601fedde92a3833b4d1d882160 | [
"ISC"
] | 3 | 2020-03-17T02:56:37.000Z | 2020-12-18T02:54:08.000Z | dashvisor/backends/file.py | alexsilva/django-dashvisor | 0126b894b5d52a601fedde92a3833b4d1d882160 | [
"ISC"
] | null | null | null | dashvisor/backends/file.py | alexsilva/django-dashvisor | 0126b894b5d52a601fedde92a3833b4d1d882160 | [
"ISC"
] | 2 | 2020-06-24T10:14:11.000Z | 2020-12-11T15:00:32.000Z | from django.conf import settings
from dashvisor.backends.base import BackendBase
from dashvisor.server import Server
class Backend(BackendBase):
def __init__(self):
super(Backend, self).__init__()
with open(settings.DASHVISOR_CONFIG_FILE) as fp:
for index, line in enumerate(fp.readlin... | 30.25 | 57 | 0.621901 |
7960c7cc6891493ed32852151cb07a7762d9fc13 | 26,022 | py | Python | examples/pytorch/speech-recognition/run_speech_recognition_ctc.py | studytutorials/transformers | 27b1516d32b691533fc497e7ee4ceb88c39cdfdf | [
"Apache-2.0"
] | 2 | 2021-11-01T23:43:30.000Z | 2021-11-12T11:24:14.000Z | examples/pytorch/speech-recognition/run_speech_recognition_ctc.py | feifeivv/transformers | 08a5f57567d8a975d900b66658bfd3c28c9dbec5 | [
"Apache-2.0"
] | 1 | 2021-11-11T16:16:49.000Z | 2021-11-12T17:49:08.000Z | examples/pytorch/speech-recognition/run_speech_recognition_ctc.py | feifeivv/transformers | 08a5f57567d8a975d900b66658bfd3c28c9dbec5 | [
"Apache-2.0"
] | 2 | 2021-11-01T20:43:29.000Z | 2021-11-08T19:14:09.000Z | #!/usr/bin/env python
# coding=utf-8
# Copyright 2021 The HuggingFace Inc. team. 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/LI... | 41.370429 | 145 | 0.680924 |
7960c945ffdbe4dadc586651a58d86d45b324620 | 675 | py | Python | opsi/util/fps.py | kushagharahi/opensight | f7384129702e91d0e33dcaeedcd7662b5a056656 | [
"MIT"
] | 48 | 2019-09-22T07:08:35.000Z | 2022-01-15T16:19:42.000Z | opsi/util/fps.py | kushagharahi/opensight | f7384129702e91d0e33dcaeedcd7662b5a056656 | [
"MIT"
] | 16 | 2019-10-02T18:48:59.000Z | 2020-12-06T04:23:03.000Z | opsi/util/fps.py | kushagharahi/opensight | f7384129702e91d0e33dcaeedcd7662b5a056656 | [
"MIT"
] | 11 | 2019-09-19T15:57:06.000Z | 2020-08-12T01:08:44.000Z | from collections import deque
from time import perf_counter
get_time = perf_counter # in case it needs to be changed later
# monotonic is too low-res on windows, and causes division by zero issues
# Rolling average framerate
class FPS:
__slots__ = ("times", "fps")
ROLLING_AVERAGE_SIZE = 20
def __init__(... | 28.125 | 88 | 0.663704 |
7960c9ba3228eab0f4b77690845adc031bd739f2 | 2,853 | py | Python | distributed/protocol/numpy.py | brinkar/distributed | 4b881ee011e1e16dd1a64e197a38e5a09106a8e9 | [
"BSD-3-Clause"
] | null | null | null | distributed/protocol/numpy.py | brinkar/distributed | 4b881ee011e1e16dd1a64e197a38e5a09106a8e9 | [
"BSD-3-Clause"
] | null | null | null | distributed/protocol/numpy.py | brinkar/distributed | 4b881ee011e1e16dd1a64e197a38e5a09106a8e9 | [
"BSD-3-Clause"
] | 1 | 2019-02-21T14:25:34.000Z | 2019-02-21T14:25:34.000Z | from __future__ import print_function, division, absolute_import
import sys
import numpy as np
from numpy.lib import stride_tricks
try:
import blosc
n = blosc.set_nthreads(2)
except ImportError:
blosc = False
from .compression import byte_sample
from .utils import frame_split_size
from .serialize import... | 26.174312 | 88 | 0.590957 |
7960cb0335a47aacdf8347a571b81b8d2314bfaa | 1,669 | py | Python | flight_booking/apps/users/serializers.py | tosmak16/flight-booking-api | 18fe7e6530c42e25a37598f00a169573077faddc | [
"MIT"
] | 1 | 2018-12-26T16:47:52.000Z | 2018-12-26T16:47:52.000Z | flight_booking/apps/users/serializers.py | tosmak16/flight-booking-api | 18fe7e6530c42e25a37598f00a169573077faddc | [
"MIT"
] | 2 | 2020-06-05T19:44:48.000Z | 2021-06-10T21:09:24.000Z | flight_booking/apps/users/serializers.py | tosmak16/flight-booking-api | 18fe7e6530c42e25a37598f00a169573077faddc | [
"MIT"
] | null | null | null | import re
from rest_framework import serializers
from django.contrib.auth import get_user_model
class UserSerializer(serializers.ModelSerializer):
"""
UserSerializer
"""
password = serializers.CharField(
write_only=True,
min_length=9,
required=True,
)
class Meta:
... | 29.280702 | 109 | 0.548832 |
7960cbbda33f370bb0889c4fa5b69df1f8723e51 | 7,972 | py | Python | ratemyprofessor/professor.py | ScriptedButton/RateMyProfessorAPI | 7da52dcbd8eb3867b4ef5eeae09209c8b3bc311e | [
"Apache-2.0"
] | null | null | null | ratemyprofessor/professor.py | ScriptedButton/RateMyProfessorAPI | 7da52dcbd8eb3867b4ef5eeae09209c8b3bc311e | [
"Apache-2.0"
] | null | null | null | ratemyprofessor/professor.py | ScriptedButton/RateMyProfessorAPI | 7da52dcbd8eb3867b4ef5eeae09209c8b3bc311e | [
"Apache-2.0"
] | null | null | null | import requests
import json
import base64
import os
import datetime
from functools import total_ordering
from .school import School
current_path = os.path.dirname(__file__)
with open(os.path.join(current_path, "json/ratingsquery.json"), 'r') as f:
ratings_query = json.load(f)
with open(os.path.join(current_path... | 38.326923 | 124 | 0.61716 |
7960cc21b4542ad811852303c84280fa081203bb | 9,913 | py | Python | gbj_iot/iot.py | mrkalePythonLib/gbj_iot | 094c6720b8891a5d35689436b10ba3b61a4183a6 | [
"MIT"
] | null | null | null | gbj_iot/iot.py | mrkalePythonLib/gbj_iot | 094c6720b8891a5d35689436b10ba3b61a4183a6 | [
"MIT"
] | null | null | null | gbj_iot/iot.py | mrkalePythonLib/gbj_iot | 094c6720b8891a5d35689436b10ba3b61a4183a6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Module with common functionalities of plugins.
"""
__version__ = '0.1.0'
__status__ = 'Beta'
__author__ = 'Libor Gabaj'
__copyright__ = 'Copyright 2019-2020, ' + __author__
__credits__ = [__author__]
__license__ = 'MIT'
__maintainer__ = __author__
__email__ = 'libor.gabaj@gmail.com'
# Stan... | 29.94864 | 79 | 0.557652 |
7960cd94cd504b5f5b6416f076b962919ffecd60 | 24,699 | py | Python | httpie/input.py | takeratta/httpie | 95c33e31a2f7d35fb8cae3b4a392bb640503c3de | [
"BSD-3-Clause"
] | 2 | 2020-06-27T09:40:36.000Z | 2020-12-27T17:56:31.000Z | httpie/input.py | ImgBotApp/httpie | dfe6245cd603b26216fd147a3647899148b03973 | [
"BSD-3-Clause"
] | null | null | null | httpie/input.py | ImgBotApp/httpie | dfe6245cd603b26216fd147a3647899148b03973 | [
"BSD-3-Clause"
] | null | null | null | """Parsing and processing of CLI input (args, auth credentials, files, stdin).
"""
import os
import ssl
import sys
import re
import errno
import mimetypes
import getpass
from io import BytesIO
from collections import namedtuple, Iterable
# noinspection PyCompatibility
from argparse import ArgumentParser, ArgumentTypeE... | 32.670635 | 79 | 0.568727 |
7960cdd3a81bdb1a10c518834fc46996bd72d30e | 1,508 | py | Python | rest_basics/junos_space.py | ksator/python-training-for-network-engineers | 0d2265fd5441607d3b1152172244a26738fcb9c5 | [
"MIT"
] | 100 | 2016-12-19T13:51:37.000Z | 2022-03-24T18:20:12.000Z | rest_basics/junos_space.py | Abd-Elrazek/python-training-for-network-engineers | 0d2265fd5441607d3b1152172244a26738fcb9c5 | [
"MIT"
] | 1 | 2017-01-24T15:22:13.000Z | 2017-01-24T15:22:13.000Z | rest_basics/junos_space.py | Abd-Elrazek/python-training-for-network-engineers | 0d2265fd5441607d3b1152172244a26738fcb9c5 | [
"MIT"
] | 45 | 2016-12-02T14:01:27.000Z | 2022-03-20T14:56:24.000Z | #extract the ip address of all EX4300-48T from junos space
from pprint import pprint as pp
from requests import get
from requests.auth import HTTPBasicAuth
'''
https://www.juniper.net/techpubs/en_US/junos-space-sdk/13.3/apiref/com.juniper.junos_space.sdk.help/JSInventoryManagerSVC/Docs/rest.managed-elements.html
'''... | 41.888889 | 156 | 0.733422 |
7960cf4fa3574cebfd17d069b16304a845f96ca2 | 1,533 | py | Python | src/gradient/main.py | signalwerk/drawbot.experiments | 79a6452109c4a1c3a2f5a9d3d8f5472af9a12a03 | [
"MIT"
] | null | null | null | src/gradient/main.py | signalwerk/drawbot.experiments | 79a6452109c4a1c3a2f5a9d3d8f5472af9a12a03 | [
"MIT"
] | null | null | null | src/gradient/main.py | signalwerk/drawbot.experiments | 79a6452109c4a1c3a2f5a9d3d8f5472af9a12a03 | [
"MIT"
] | null | null | null | import math
from random import choice
import config as conf
import helper as h
import element as el
from imp import reload
# don't cache config, element and Helpers
# dirty but works
reload (conf)
reload (h)
reload (el)
# all elements are stored
allElements = []
## setup elements
for i in range(conf.elementCount):
... | 23.584615 | 65 | 0.632746 |
7960cfa8c2113dd60619e0cca50e2a60b1de3036 | 1,266 | py | Python | var/spack/repos/builtin/packages/py-checkm-genome/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2020-09-10T22:50:08.000Z | 2021-01-12T22:18:54.000Z | var/spack/repos/builtin/packages/py-checkm-genome/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 17 | 2019-03-21T15:54:00.000Z | 2022-03-29T19:34:28.000Z | var/spack/repos/builtin/packages/py-checkm-genome/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2021-04-07T18:27:09.000Z | 2022-03-31T22:52:38.000Z | # Copyright 2013-2021 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)
from spack import *
class PyCheckmGenome(PythonPackage):
"""Assess the quality of microbial genomes recovered from i... | 43.655172 | 96 | 0.685624 |
7960cfb22a956f796ba01df6a594486b18dabfc5 | 10,134 | py | Python | cping/protocols/tests/test___init__.py | hSaria/Pinger | 194ffe8bf4ab286d67803a78266a83bcb1208d45 | [
"MIT"
] | null | null | null | cping/protocols/tests/test___init__.py | hSaria/Pinger | 194ffe8bf4ab286d67803a78266a83bcb1208d45 | [
"MIT"
] | null | null | null | cping/protocols/tests/test___init__.py | hSaria/Pinger | 194ffe8bf4ab286d67803a78266a83bcb1208d45 | [
"MIT"
] | null | null | null | '''cping.protocols tests'''
import threading
import time
import unittest
import cping.protocols
# pylint: disable=protected-access,too-many-public-methods
class TestHost(unittest.TestCase):
'''cping.protocols.Host tests.'''
def test_add_result(self):
'''Add a result.'''
host = cping.protoco... | 34.944828 | 79 | 0.634596 |
7960d00d1bebfb52f3210ef9f1cea57ff47d65e1 | 985 | py | Python | np_rw_buffer/circular_indexes.py | HashSplat/np_rw_buffer | 95f936ebfc21c659983dbb387564ce3bb0a74028 | [
"MIT"
] | 4 | 2019-03-27T03:46:33.000Z | 2022-01-22T03:05:45.000Z | np_rw_buffer/circular_indexes.py | HashSplat/np_rw_buffer | 95f936ebfc21c659983dbb387564ce3bb0a74028 | [
"MIT"
] | 1 | 2018-11-13T15:32:06.000Z | 2018-11-13T17:46:10.000Z | np_rw_buffer/circular_indexes.py | justengel/np_rw_buffer | 95f936ebfc21c659983dbb387564ce3bb0a74028 | [
"MIT"
] | null | null | null | """
Fast method to get the proper indexes for a circular buffer.
See history of version control. Python C tuple '_circular_indexes.c' building a tuple was much slower.
"""
import numpy as np
__all__ = ['get_indexes']
def get_indexes(start, length, maxsize):
"""Return the indexes from the given start position t... | 28.970588 | 102 | 0.610152 |
7960d16b5a8760ba4990c09ef9681c88adc60292 | 436 | py | Python | tests/unit/test_utils.py | rven/python-teamleader | 021383836188620f473c526ad63ad03e7bd5ba26 | [
"MIT"
] | null | null | null | tests/unit/test_utils.py | rven/python-teamleader | 021383836188620f473c526ad63ad03e7bd5ba26 | [
"MIT"
] | null | null | null | tests/unit/test_utils.py | rven/python-teamleader | 021383836188620f473c526ad63ad03e7bd5ba26 | [
"MIT"
] | null | null | null | import pytest
from teamleader.api import Teamleader
from teamleader.exceptions import InvalidInputError
def test_validate_type():
for arg, t in ((['item'], list), ({'key': 'value'}, dict)):
assert Teamleader._validate_type(arg, t) == arg
for t in (list, dict):
assert Teamleader._validate_typ... | 27.25 | 63 | 0.683486 |
7960d309e980a8b1705b02d35adb84a3745acf9b | 10,704 | py | Python | integration_tests/test_model.py | andrewdhicks/datacube-explorer | e372da5b697e57113deb239edc52411f5ddad551 | [
"Apache-2.0"
] | null | null | null | integration_tests/test_model.py | andrewdhicks/datacube-explorer | e372da5b697e57113deb239edc52411f5ddad551 | [
"Apache-2.0"
] | null | null | null | integration_tests/test_model.py | andrewdhicks/datacube-explorer | e372da5b697e57113deb239edc52411f5ddad551 | [
"Apache-2.0"
] | null | null | null | """
Tests related to the store
"""
import operator
from collections import Counter
from datetime import datetime, date
import pytest
from shapely.geometry import shape
from shapely.geometry.base import BaseGeometry
from cubedash._model import TimePeriodOverview
from datacube.model import Range
ANTIMERIDIAN_POLY = sh... | 39.791822 | 84 | 0.535688 |
7960d3b039b6e476d084d83f18c2810ff8576eae | 35,391 | py | Python | yt_dlp/__init__.py | schnusch/yt-dlp | d52cd2f5cd54bd100a51fca8e4044b4f2a89fade | [
"Unlicense"
] | 1 | 2022-01-31T11:08:38.000Z | 2022-01-31T11:08:38.000Z | yt_dlp/__init__.py | schnusch/yt-dlp | d52cd2f5cd54bd100a51fca8e4044b4f2a89fade | [
"Unlicense"
] | null | null | null | yt_dlp/__init__.py | schnusch/yt-dlp | d52cd2f5cd54bd100a51fca8e4044b4f2a89fade | [
"Unlicense"
] | 1 | 2021-11-19T06:18:33.000Z | 2021-11-19T06:18:33.000Z | #!/usr/bin/env python3
# coding: utf-8
f'You are using an unsupported version of Python. Only Python versions 3.6 and above are supported by yt-dlp' # noqa: F541
__license__ = 'Public Domain'
import codecs
import io
import itertools
import os
import random
import re
import sys
from .options import (
parseOpts,... | 43.800743 | 223 | 0.660592 |
7960d3cf95e5cdc516b42a67b2065b80ee2243d7 | 6,300 | py | Python | vagga2lithos/update.py | tailhook/vagga2lithos | fc174479b953b382e097dd51643ac2b4c2d56dee | [
"Apache-2.0",
"MIT"
] | 5 | 2016-11-18T03:19:02.000Z | 2019-04-16T19:52:50.000Z | vagga2lithos/update.py | tailhook/vagga2lithos | fc174479b953b382e097dd51643ac2b4c2d56dee | [
"Apache-2.0",
"MIT"
] | 1 | 2018-03-15T18:23:50.000Z | 2018-03-15T18:23:50.000Z | vagga2lithos/update.py | tailhook/vagga2lithos | fc174479b953b382e097dd51643ac2b4c2d56dee | [
"Apache-2.0",
"MIT"
] | null | null | null | import os
import sys
import copy
import difflib
import click
from .vagga import Config as Vagga
from . import lithos
from . import metadata
from .main import main as cli
from .human import panic
from .vagga_command import extract_command_info
def _careful_update(old_config, old_info, new_info, *, verbose):
new... | 36.206897 | 78 | 0.590952 |
7960d4053ffb1a18a77adf9cd58de48f705d03b6 | 7,720 | py | Python | Question_semaseg/answers/transposeconv_tensorflow_slim.py | skn047/DeepLearningMugenKnock | 73d2b903816b380d56020c8336041883bc0d131c | [
"MIT"
] | 10 | 2021-12-17T06:07:25.000Z | 2022-03-25T13:50:05.000Z | Question_semaseg/answers/transposeconv_tensorflow_slim.py | skn047/DeepLearningMugenKnock | 73d2b903816b380d56020c8336041883bc0d131c | [
"MIT"
] | null | null | null | Question_semaseg/answers/transposeconv_tensorflow_slim.py | skn047/DeepLearningMugenKnock | 73d2b903816b380d56020c8336041883bc0d131c | [
"MIT"
] | 2 | 2022-03-15T02:42:09.000Z | 2022-03-30T23:19:55.000Z | import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
import tensorflow as tf
from tensorflow.contrib import slim
import argparse
import cv2
import numpy as np
from glob import glob
import matplotlib.pyplot as plt
num_classes = 2
img_height, img_width = 64, 64#572, 572
out_height, out_width = 64, 64#388, 388
def ... | 31.255061 | 99 | 0.533161 |
7960d5bbc122db33372d4b405b7d386e54da299a | 931 | py | Python | tests/helper.py | nicholas-ramsey/oauth-pythonclient | 6a40386a17cc913828b1d9c420cc91f937813299 | [
"Apache-2.0"
] | 51 | 2018-10-17T21:53:55.000Z | 2022-03-02T05:51:20.000Z | tests/helper.py | nicholas-ramsey/oauth-pythonclient | 6a40386a17cc913828b1d9c420cc91f937813299 | [
"Apache-2.0"
] | 22 | 2018-12-12T21:11:58.000Z | 2022-01-26T11:45:07.000Z | tests/helper.py | nicholas-ramsey/oauth-pythonclient | 6a40386a17cc913828b1d9c420cc91f937813299 | [
"Apache-2.0"
] | 25 | 2018-10-19T08:29:15.000Z | 2022-02-24T08:05:49.000Z | # Copyright (c) 2018 Intuit
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | 33.25 | 75 | 0.677766 |
7960d66633b5cc968700f444d9f1bc75daed991a | 413 | py | Python | every_election/apps/election_snooper/management/commands/snoop.py | DemocracyClub/EveryElection | da8a561cb4a84d9b432b1508a68f8cfada3d9515 | [
"BSD-3-Clause"
] | 8 | 2017-06-29T10:11:33.000Z | 2019-12-16T16:17:51.000Z | every_election/apps/election_snooper/management/commands/snoop.py | DemocracyClub/EveryElection | da8a561cb4a84d9b432b1508a68f8cfada3d9515 | [
"BSD-3-Clause"
] | 1,300 | 2017-01-08T14:02:24.000Z | 2022-03-31T09:11:30.000Z | every_election/apps/election_snooper/management/commands/snoop.py | DemocracyClub/EveryElection | da8a561cb4a84d9b432b1508a68f8cfada3d9515 | [
"BSD-3-Clause"
] | 11 | 2017-02-04T10:48:04.000Z | 2021-01-27T15:07:55.000Z | from django.core.management.base import BaseCommand
from election_snooper.snoopers.aldc import ALDCScraper
from election_snooper.snoopers.customsearch import CustomSearchScraper
class Command(BaseCommand):
# def add_arguments(self, parser):
# parser.add_argument('sample', nargs='+')
def handle(self... | 27.533333 | 70 | 0.738499 |
7960d69585d8af4c32df46e7b8ce971dbf5f902a | 3,186 | py | Python | spare/cmds/netspace_funcs.py | zcomputerwiz/sparev2-blockchain | ce4344321de909704ad8df9785299da25761059e | [
"Apache-2.0"
] | 3 | 2021-11-20T16:21:45.000Z | 2022-02-09T04:33:04.000Z | spare/cmds/netspace_funcs.py | zcomputerwiz/sparev2-blockchain | ce4344321de909704ad8df9785299da25761059e | [
"Apache-2.0"
] | null | null | null | spare/cmds/netspace_funcs.py | zcomputerwiz/sparev2-blockchain | ce4344321de909704ad8df9785299da25761059e | [
"Apache-2.0"
] | null | null | null | from typing import Optional
import aiohttp
from spare.rpc.full_node_rpc_client import FullNodeRpcClient
from spare.util.byte_types import hexstr_to_bytes
from spare.util.config import load_config
from spare.util.default_root import DEFAULT_ROOT_PATH
from spare.util.ints import uint16
from spare.util.misc import forma... | 42.48 | 107 | 0.614878 |
7960d6a4375265451047764d9375f8b2c9444799 | 292 | py | Python | tests/test_other.py | IMTMarburg/mbf_fileformats | cbf522d433e2122b073f06deb44a3076e08858e4 | [
"MIT"
] | null | null | null | tests/test_other.py | IMTMarburg/mbf_fileformats | cbf522d433e2122b073f06deb44a3076e08858e4 | [
"MIT"
] | null | null | null | tests/test_other.py | IMTMarburg/mbf_fileformats | cbf522d433e2122b073f06deb44a3076e08858e4 | [
"MIT"
] | null | null | null | def test_version_is_correct():
import configparser
from pathlib import Path
import mbf_fileformats
c = configparser.ConfigParser()
c.read(Path(__file__).parent.parent / "setup.cfg")
version = c["metadata"]["version"]
assert version == mbf_fileformats.__version__
| 29.2 | 54 | 0.719178 |
7960d6a71ad771677271485cdcb23051eab470cc | 15,153 | py | Python | district_FIRs.py | sangharshbyss/online_FIRs | 564eeccf045f0a7462e859221c7b2d93b7331c89 | [
"CC0-1.0"
] | null | null | null | district_FIRs.py | sangharshbyss/online_FIRs | 564eeccf045f0a7462e859221c7b2d93b7331c89 | [
"CC0-1.0"
] | null | null | null | district_FIRs.py | sangharshbyss/online_FIRs | 564eeccf045f0a7462e859221c7b2d93b7331c89 | [
"CC0-1.0"
] | null | null | null | """This file is not fully ready, coz, selection act is not going well."""
import base64
from typing import List
from selenium import webdriver
from selenium.webdriver.support.expected_conditions import staleness_of
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support.ui import Select
... | 40.843666 | 120 | 0.65591 |
7960d6c7d7796748d52992fca434a8bd336fc68a | 7,534 | py | Python | mnist_autograd.py | newcodevelop/DL-Adventures | 76d4fcaf7c7b53cb1a2241a03d6d32bcd4406e92 | [
"MIT"
] | null | null | null | mnist_autograd.py | newcodevelop/DL-Adventures | 76d4fcaf7c7b53cb1a2241a03d6d32bcd4406e92 | [
"MIT"
] | null | null | null | mnist_autograd.py | newcodevelop/DL-Adventures | 76d4fcaf7c7b53cb1a2241a03d6d32bcd4406e92 | [
"MIT"
] | 1 | 2020-08-04T15:22:37.000Z | 2020-08-04T15:22:37.000Z | # -*- coding: utf-8 -*-
"""mnist_autograd.ipynb
Automatically generated by Colaboratory.
"""
class Value:
""" stores a value and its gradient """
def __init__(self, data, _children=(), _op=''):
self.data = data
self.grad = 0
# internal variables used for autograd graph construction
... | 30.136 | 147 | 0.602336 |
7960d729c50e00ba0f32fa5b935f7a80836264a0 | 7,358 | py | Python | src/eye_tools/lattice_builder.py | jpcurrea/eye_tools | 004c8ab774a6b27c021a628ae8f7fe8dc45e5e1e | [
"MIT"
] | null | null | null | src/eye_tools/lattice_builder.py | jpcurrea/eye_tools | 004c8ab774a6b27c021a628ae8f7fe8dc45e5e1e | [
"MIT"
] | null | null | null | src/eye_tools/lattice_builder.py | jpcurrea/eye_tools | 004c8ab774a6b27c021a628ae8f7fe8dc45e5e1e | [
"MIT"
] | null | null | null | from analysis_tools import *
class Lattice():
def __init__(self, p_vector1, p_vector2):
"""A Bravais Lattice defined by two primitive vectors.
Parameters
----------
p_vector1, p_vector2 : np.ndarray, shape=(1, 2)
The primitive vectors defining the spacing and orientati... | 40.428571 | 89 | 0.603833 |
7960d72aae19f036345a6cacfa17fbd7568bde2b | 8,609 | py | Python | colcon_core/verb/test.py | BryceStevenWilley/colcon-core | 7670fd5b664244adb7100ce4c03b782568e8c5bf | [
"Apache-2.0"
] | null | null | null | colcon_core/verb/test.py | BryceStevenWilley/colcon-core | 7670fd5b664244adb7100ce4c03b782568e8c5bf | [
"Apache-2.0"
] | null | null | null | colcon_core/verb/test.py | BryceStevenWilley/colcon-core | 7670fd5b664244adb7100ce4c03b782568e8c5bf | [
"Apache-2.0"
] | null | null | null | # Copyright 2016-2018 Dirk Thomas
# Licensed under the Apache License, Version 2.0
from collections import OrderedDict
import os
import types
from colcon_core.argument_parser.destination_collector \
import DestinationCollectorDecorator
from colcon_core.event.test import TestFailure
from colcon_core.event_handler ... | 39.131818 | 78 | 0.630271 |
7960d72c7019bacc5bb9e18fa6de92db00de46cf | 1,313 | py | Python | 04_Bandit/xarray_opendap.py | pnorton-usgs/notebooks | 17a38ecd3f3c052b9bd785c2e53e16a9082d1e71 | [
"MIT"
] | null | null | null | 04_Bandit/xarray_opendap.py | pnorton-usgs/notebooks | 17a38ecd3f3c052b9bd785c2e53e16a9082d1e71 | [
"MIT"
] | null | null | null | 04_Bandit/xarray_opendap.py | pnorton-usgs/notebooks | 17a38ecd3f3c052b9bd785c2e53e16a9082d1e71 | [
"MIT"
] | null | null | null | # ---
# jupyter:
# jupytext:
# formats: ipynb,py:percent
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.13.7
# kernelspec:
# display_name: Python [conda env:bandit_38]
# language: python
# name: conda-env-bandi... | 19.028986 | 86 | 0.669459 |
7960d7997643dc4485ebf9f2caa18f4c6cfda846 | 290 | py | Python | Error Handling/custom_error.py | elipopovadev/Tournament-Tracker | 5b0acbd460257869438e27d3db770ff269ac6d40 | [
"MIT"
] | null | null | null | Error Handling/custom_error.py | elipopovadev/Tournament-Tracker | 5b0acbd460257869438e27d3db770ff269ac6d40 | [
"MIT"
] | 1 | 2022-02-21T12:40:21.000Z | 2022-02-21T12:40:21.000Z | Error Handling/custom_error.py | elipopovadev/Complete-Python-Developer | 5b0acbd460257869438e27d3db770ff269ac6d40 | [
"MIT"
] | null | null | null | class ValueCannotbeNegativeOrZeroError(Exception):
pass
def validate_numbers(numbers):
for num in numbers:
if num <= 0:
raise ValueCannotbeNegativeOrZeroError("Please, enter only positive numbers!")
numbers = [1, 2, 3, 4, 0]
validate_numbers(numbers)
| 24.166667 | 90 | 0.686207 |
7960d79a91e3d9a2835b178a9f1753e6379cf74a | 1,372 | py | Python | test/D/HSTeoh/sconstest-arLibIssue_ldc.py | moroten/scons | 20927b42ed4f0cb87f51287fa3b4b6cf915afcf8 | [
"MIT"
] | 1,403 | 2017-11-23T14:24:01.000Z | 2022-03-30T20:59:39.000Z | test/D/HSTeoh/sconstest-arLibIssue_ldc.py | moroten/scons | 20927b42ed4f0cb87f51287fa3b4b6cf915afcf8 | [
"MIT"
] | 3,708 | 2017-11-27T13:47:12.000Z | 2022-03-29T17:21:17.000Z | test/D/HSTeoh/sconstest-arLibIssue_ldc.py | moroten/scons | 20927b42ed4f0cb87f51287fa3b4b6cf915afcf8 | [
"MIT"
] | 281 | 2017-12-01T23:48:38.000Z | 2022-03-31T15:25:44.000Z | """
Test compiling and executing using the ldc tool.
"""
#
# __COPYRIGHT__
#
# 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... | 35.179487 | 73 | 0.772595 |
7960d7a5c2b4e3d374ed27984db45d66a9691a44 | 5,310 | py | Python | python_modules/dagster-graphql/dagster_graphql_tests/graphql/test_misc.py | dbatten5/dagster | d76e50295054ffe5a72f9b292ef57febae499528 | [
"Apache-2.0"
] | 4,606 | 2018-06-21T17:45:20.000Z | 2022-03-31T23:39:42.000Z | python_modules/dagster-graphql/dagster_graphql_tests/graphql/test_misc.py | dbatten5/dagster | d76e50295054ffe5a72f9b292ef57febae499528 | [
"Apache-2.0"
] | 6,221 | 2018-06-12T04:36:01.000Z | 2022-03-31T21:43:05.000Z | python_modules/dagster-graphql/dagster_graphql_tests/graphql/test_misc.py | dbatten5/dagster | d76e50295054ffe5a72f9b292ef57febae499528 | [
"Apache-2.0"
] | 619 | 2018-08-22T22:43:09.000Z | 2022-03-31T22:48:06.000Z | import csv
from collections import OrderedDict
from dagster import (
AssetMaterialization,
DependencyDefinition,
InputDefinition,
OutputDefinition,
PipelineDefinition,
PythonObjectDagsterType,
SolidDefinition,
dagster_type_loader,
dagster_type_materializer,
repository,
)
from da... | 25.165877 | 96 | 0.619021 |
7960d8409e991fee1b935819018027a2ff31f1f7 | 6,143 | py | Python | ros/src/twist_controller/dbw_node.py | futbalmaniac/CarND-Capstone | 4af408d3698f497525b6279994c5145283202527 | [
"MIT"
] | null | null | null | ros/src/twist_controller/dbw_node.py | futbalmaniac/CarND-Capstone | 4af408d3698f497525b6279994c5145283202527 | [
"MIT"
] | null | null | null | ros/src/twist_controller/dbw_node.py | futbalmaniac/CarND-Capstone | 4af408d3698f497525b6279994c5145283202527 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import rospy
from std_msgs.msg import Bool
from dbw_mkz_msgs.msg import ThrottleCmd, SteeringCmd, BrakeCmd, SteeringReport
from geometry_msgs.msg import TwistStamped
import math
from twist_controller import Controller
'''
You can build this node only after you have built (or partially built) th... | 44.194245 | 151 | 0.615172 |
7960da8daabee3bdf5c23751f7635bf3af6d4551 | 1,557 | py | Python | Object-Oriented Programming/Python/python_assignments_set1/sol6.py | neeladripal/bcse-lab | 915d2f535ae95a062438fc85980419646a3951ad | [
"MIT"
] | null | null | null | Object-Oriented Programming/Python/python_assignments_set1/sol6.py | neeladripal/bcse-lab | 915d2f535ae95a062438fc85980419646a3951ad | [
"MIT"
] | null | null | null | Object-Oriented Programming/Python/python_assignments_set1/sol6.py | neeladripal/bcse-lab | 915d2f535ae95a062438fc85980419646a3951ad | [
"MIT"
] | 1 | 2021-08-06T14:39:53.000Z | 2021-08-06T14:39:53.000Z | import re
# dummy user data
userData = [("helo", "helo@x.com", 17), ("alex", "alex@y.com", -20), ("nova", "novaz.com", 20)]
# custom exception class
class NotUniqueUsernameException (Exception):
def __init__ (self, name):
self.name = name
def __str__ (self):
return "Username (%s) already exists." % (self.name)
... | 27.315789 | 95 | 0.674374 |
7960dac80b240506df88e394b6900952da8e10c8 | 5,133 | py | Python | tests/test_0007-single-chunk-interface.py | eic/uproot4 | deb8d88c2643521f372bf5005c51af8926016c7e | [
"BSD-3-Clause"
] | null | null | null | tests/test_0007-single-chunk-interface.py | eic/uproot4 | deb8d88c2643521f372bf5005c51af8926016c7e | [
"BSD-3-Clause"
] | null | null | null | tests/test_0007-single-chunk-interface.py | eic/uproot4 | deb8d88c2643521f372bf5005c51af8926016c7e | [
"BSD-3-Clause"
] | null | null | null | # BSD 3-Clause License; see https://github.com/scikit-hep/uproot4/blob/main/LICENSE
from __future__ import absolute_import
import os
import sys
import numpy
import pytest
import uproot
def tobytes(x):
if hasattr(x, "tobytes"):
return x.tobytes()
else:
return x.tostring()
def test_file(tm... | 30.921687 | 104 | 0.570816 |
7960dc67313ebb0ee94aa3a8b2c48e6ba33829a1 | 311 | py | Python | tasks/sched.py | CartoDB/bigmetadata | a32325382500f23b8a607e4e02cc0ec111360869 | [
"BSD-3-Clause"
] | 45 | 2015-12-14T03:05:55.000Z | 2021-06-29T22:46:40.000Z | tasks/sched.py | talos/bigmetadata | 2dd801558087e5b51fe444d1d94140bc59f14a2b | [
"BSD-3-Clause"
] | 480 | 2016-02-19T15:58:44.000Z | 2021-09-10T16:38:56.000Z | tasks/sched.py | talos/bigmetadata | 2dd801558087e5b51fe444d1d94140bc59f14a2b | [
"BSD-3-Clause"
] | 13 | 2016-08-09T21:03:02.000Z | 2020-04-29T23:40:20.000Z | from luigi import Task, Parameter, LocalTarget
import os
class TestTask(Task):
time = Parameter()
def run(self):
with self.output().open('w') as outfile:
outfile.write('foobar')
def output(self):
return LocalTarget(os.path.join('tmp', 'test-' + self.time + '.txt'))
| 20.733333 | 77 | 0.614148 |
7960dde2aee3f752b112c7d108cef4c79fff18b0 | 112 | py | Python | flow_model/__init__.py | ekarpovs/flow_model | 906cb97e23318699514771f5c2abcb9b4bbccd58 | [
"MIT"
] | null | null | null | flow_model/__init__.py | ekarpovs/flow_model | 906cb97e23318699514771f5c2abcb9b4bbccd58 | [
"MIT"
] | null | null | null | flow_model/__init__.py | ekarpovs/flow_model | 906cb97e23318699514771f5c2abcb9b4bbccd58 | [
"MIT"
] | null | null | null | from .flowmodel import FlowModel
from .flowitemmodel import FlowItemModel
from .flowitemtype import FlowItemType | 37.333333 | 40 | 0.875 |
7960de5862da92380198f4c713ee7bf27fc2a28e | 673 | py | Python | app/controller/engines.py | vyahello/trump-bullet | 7648f9722471323ddec1aa6b6d7db38166bebc91 | [
"Apache-2.0"
] | null | null | null | app/controller/engines.py | vyahello/trump-bullet | 7648f9722471323ddec1aa6b6d7db38166bebc91 | [
"Apache-2.0"
] | 2 | 2021-08-29T08:39:16.000Z | 2021-10-03T15:36:20.000Z | app/controller/engines.py | vyahello/trump-bullet | 7648f9722471323ddec1aa6b6d7db38166bebc91 | [
"Apache-2.0"
] | null | null | null | from abc import ABC
import pygame
class Engine(ABC):
"""The class represents engine abstraction."""
def initialize(self) -> None:
"""Initializes engine."""
pass
def quit(self) -> None:
"""Quites from engine."""
pass
def set_delay(self) -> None:
"""Sets delay ... | 19.228571 | 50 | 0.573551 |
7960de9e528a40364d9306a353e9cbe1b4b6f48d | 2,488 | py | Python | data/p4VQE/R4/benchmark/startQiskit113.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R4/benchmark/startQiskit113.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R4/benchmark/startQiskit113.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=3
# total number=11
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
import networkx as nx
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collectio... | 27.340659 | 118 | 0.633441 |
7960deed88d57c92a6781fc87ca5b302966d6ac9 | 5,235 | py | Python | docs/generate_sidebar.py | fuliucansheng/UniTorch | 47038321593ce4e7eabda555bd58c0cf89482146 | [
"MIT"
] | 2 | 2022-02-05T08:52:00.000Z | 2022-03-27T07:01:34.000Z | docs/generate_sidebar.py | Lixin-Qian/unitorch | 47038321593ce4e7eabda555bd58c0cf89482146 | [
"MIT"
] | null | null | null | docs/generate_sidebar.py | Lixin-Qian/unitorch | 47038321593ce4e7eabda555bd58c0cf89482146 | [
"MIT"
] | 1 | 2022-03-27T07:01:13.000Z | 2022-03-27T07:01:13.000Z | # Copyright (c) FULIUCANSHENG.
# Licensed under the MIT License.
import os
from collections import OrderedDict
from lazydocs import generate_docs
generate_docs(
["../"],
output_path="./references",
src_root_path="../",
src_base_url="https://github.com/fuliucansheng/unitorch/blob/master/",
ignored_... | 29.744318 | 282 | 0.641261 |
7960defa7e27a224c1f4ea0ceaa8bfa3c95a1345 | 823 | py | Python | mysite/urls.py | TraXIcoN/mysite | 1709d2e75ef524e26e661fe0bea05066077fe97a | [
"MIT"
] | null | null | null | mysite/urls.py | TraXIcoN/mysite | 1709d2e75ef524e26e661fe0bea05066077fe97a | [
"MIT"
] | null | null | null | mysite/urls.py | TraXIcoN/mysite | 1709d2e75ef524e26e661fe0bea05066077fe97a | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import path
from django.conf import settings
from django.conf.urls.static import static
from mysite.core import views
urlpatterns = [
path('', views.Home.as_view(), name='home'),
path('upload/', views.upload, name='upload'),
path('books/', views.book_list... | 31.653846 | 79 | 0.685298 |
7960df7b90b9311e4502bf7bee0a1eecba98176e | 3,761 | py | Python | apptools/apptools-linux-tests/apptools/manifest_start_url.py | jennycao/crosswalk-test-suite | 64874a2941276681cc9823c11dfc024cfe7aac47 | [
"BSD-3-Clause"
] | null | null | null | apptools/apptools-linux-tests/apptools/manifest_start_url.py | jennycao/crosswalk-test-suite | 64874a2941276681cc9823c11dfc024cfe7aac47 | [
"BSD-3-Clause"
] | null | null | null | apptools/apptools-linux-tests/apptools/manifest_start_url.py | jennycao/crosswalk-test-suite | 64874a2941276681cc9823c11dfc024cfe7aac47 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2015 Intel Corporation.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of works must retain the original copyright notice, this
# list of conditions and t... | 41.788889 | 107 | 0.702473 |
7960dfd2c35b1cfd282b90a4df5ca4bbeef4f643 | 866 | py | Python | src/django/api/migrations/0017_add_is_active_field_to_facilitymatch.py | azavea/open-apparel-registry | 20f7a6d502d9152c85ee7f2696b25b6badf98924 | [
"MIT"
] | 32 | 2019-01-26T05:04:03.000Z | 2022-03-11T15:09:09.000Z | src/django/api/migrations/0017_add_is_active_field_to_facilitymatch.py | azavea/open-apparel-registry | 20f7a6d502d9152c85ee7f2696b25b6badf98924 | [
"MIT"
] | 1,586 | 2019-01-15T21:54:42.000Z | 2022-03-31T17:38:14.000Z | src/django/api/migrations/0017_add_is_active_field_to_facilitymatch.py | Home-ac/Base0 | 04f03b8bf31146783c583df0871ab69fd6309a27 | [
"MIT"
] | 7 | 2019-02-28T03:32:46.000Z | 2021-11-04T17:03:46.000Z | # Generated by Django 2.0.13 on 2019-06-19 15:33
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('api', '0016_historicalfacilityalias')
]
operations = [
migrations.AddField(
model_name='facilitymatch',
name='is_ac... | 36.083333 | 200 | 0.661663 |
7960e07f1f641057e7f012b2b1ceb25bd238668c | 24,819 | py | Python | src/toil/test/provisioners/aws/awsProvisionerTest.py | Hexotical/toil | 312b6e1f221ee7f7f187dd6dbfce1aecffd00e09 | [
"Apache-2.0"
] | 348 | 2018-07-08T03:38:28.000Z | 2022-03-11T18:57:44.000Z | src/toil/test/provisioners/aws/awsProvisionerTest.py | Hexotical/toil | 312b6e1f221ee7f7f187dd6dbfce1aecffd00e09 | [
"Apache-2.0"
] | 1,700 | 2018-07-05T18:28:49.000Z | 2022-03-31T14:09:04.000Z | src/toil/test/provisioners/aws/awsProvisionerTest.py | Hexotical/toil | 312b6e1f221ee7f7f187dd6dbfce1aecffd00e09 | [
"Apache-2.0"
] | 126 | 2018-07-11T18:59:29.000Z | 2022-01-24T03:14:02.000Z | # Copyright (C) 2015-2021 Regents of the University of California
#
# 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 app... | 39.395238 | 133 | 0.611507 |
7960e25ec60601300697bf3d9345f6a8a173285a | 4,020 | py | Python | fruitfly/fruitfly.py | movermeyer/fruitfly | 180dc97572e985e2d89ae0bc1a07ccfc34835d08 | [
"WTFPL"
] | 1 | 2015-02-21T14:07:17.000Z | 2015-02-21T14:07:17.000Z | fruitfly/fruitfly.py | movermeyer/fruitfly | 180dc97572e985e2d89ae0bc1a07ccfc34835d08 | [
"WTFPL"
] | null | null | null | fruitfly/fruitfly.py | movermeyer/fruitfly | 180dc97572e985e2d89ae0bc1a07ccfc34835d08 | [
"WTFPL"
] | 1 | 2018-03-04T20:43:48.000Z | 2018-03-04T20:43:48.000Z | # stdlib
import os
import imp
import glob
import time
import yaml
import logging.handlers
import inspect
import module
class FruitFly(object):
def __init__(self, basedir = None, debug = False, logdestination = "stderr"):
# Find basedir
self._basedir = basedir or os.path.dirname(os.path.abspath(insp... | 38.653846 | 123 | 0.607711 |
7960e3f5c966dfc7fe5063ac635678cd81dc8808 | 138 | py | Python | options/__init__.py | TencentYoutuResearch/CrowdCounting-UEPNet | 98739cfedadc5a9cbded6b2f1620803dda606190 | [
"BSD-3-Clause"
] | 9 | 2021-08-23T06:57:58.000Z | 2022-03-25T05:46:38.000Z | options/__init__.py | TencentYoutuResearch/CrowdCounting-UEPNet | 98739cfedadc5a9cbded6b2f1620803dda606190 | [
"BSD-3-Clause"
] | 1 | 2021-11-11T09:15:48.000Z | 2021-11-11T09:15:48.000Z | options/__init__.py | TencentYoutuResearch/CrowdCounting-UEPNet | 98739cfedadc5a9cbded6b2f1620803dda606190 | [
"BSD-3-Clause"
] | 2 | 2021-08-10T03:12:26.000Z | 2021-11-10T08:12:22.000Z | """This package options includes option modules:
training options, test options, and basic options
(used in both training and test)."""
| 34.5 | 50 | 0.76087 |
7960e685739f8ac32a83b9e59b5564d5c99e0454 | 4,509 | py | Python | test_edge.py | xiaogangw/VE-PCN | f47e9528bac9bfb2db090616c863d2d190bd67c9 | [
"MIT"
] | 8 | 2021-08-24T10:54:40.000Z | 2022-03-04T14:34:34.000Z | test_edge.py | xiaogangw/VE-PCN | f47e9528bac9bfb2db090616c863d2d190bd67c9 | [
"MIT"
] | 1 | 2022-02-25T09:22:25.000Z | 2022-02-25T09:22:25.000Z | test_edge.py | xiaogangw/VE-PCN | f47e9528bac9bfb2db090616c863d2d190bd67c9 | [
"MIT"
] | null | null | null | import argparse
import os
import random
import numpy as np
import torch
import shapenet_edge as shapenet_dataset
import model_edge as models
import util_edge as util
import ops
parser = argparse.ArgumentParser()
parser.add_argument('--remove_point_num', type=int, default=512)
parser.add_argument('--cal_edge', action='... | 42.942857 | 142 | 0.710357 |
7960e69531c65f5ea72ecf06f62ee72e992d239d | 593 | py | Python | pipeline/metric_startplot.py | gaabrielfranco/ia-moba-tcc | 3f4b4e5be3e09619d1e893ee9234c835f21ecb83 | [
"MIT"
] | null | null | null | pipeline/metric_startplot.py | gaabrielfranco/ia-moba-tcc | 3f4b4e5be3e09619d1e893ee9234c835f21ecb83 | [
"MIT"
] | 2 | 2018-02-17T13:46:13.000Z | 2018-02-21T23:26:26.000Z | pipeline/metric_startplot.py | gaabrielfranco/ia-moba-tcc | 3f4b4e5be3e09619d1e893ee9234c835f21ecb83 | [
"MIT"
] | null | null | null | from joblib import load
import pandas as pd
from modules.plots import radarplot
def main():
df = pd.read_csv("create_database/df_database_all.csv", index_col=0)
folder = "all"
clf = load("kmeans.joblib")
df_centroids = pd.DataFrame(clf.cluster_centers_, columns=df.columns)
label = ["Centroid " ... | 26.954545 | 92 | 0.664418 |
7960e6969b3a66ffdf4b1e3a2589296b38391fc4 | 429 | py | Python | tests/system/spotwave/conftest.py | vallen-systems/pyWaveLine | d5bddda16c1f41261dc2d76896b768c469c7218d | [
"MIT"
] | 3 | 2021-01-20T08:31:58.000Z | 2021-12-09T19:18:41.000Z | tests/system/spotwave/conftest.py | vallen-systems/pyWaveLine | d5bddda16c1f41261dc2d76896b768c469c7218d | [
"MIT"
] | null | null | null | tests/system/spotwave/conftest.py | vallen-systems/pyWaveLine | d5bddda16c1f41261dc2d76896b768c469c7218d | [
"MIT"
] | 2 | 2021-01-20T08:32:03.000Z | 2021-08-18T01:42:32.000Z | import pytest
from waveline import SpotWave
@pytest.fixture(scope="module")
def sw():
devices = SpotWave.discover()
if not devices:
raise RuntimeError(
"No spotWave devices found. Please connect a device to run the system tests"
)
with SpotWave(devices[0]) as sw:
sw.se... | 23.833333 | 88 | 0.636364 |
7960e7a61e286416c07a0559ae0ca9e83c5dc619 | 1,704 | py | Python | python/208_implement_trie.py | ufjfeng/leetcode-soln | cbf2db0d81d5ef98f48c8d1df486559f89142bfd | [
"MIT"
] | null | null | null | python/208_implement_trie.py | ufjfeng/leetcode-soln | cbf2db0d81d5ef98f48c8d1df486559f89142bfd | [
"MIT"
] | null | null | null | python/208_implement_trie.py | ufjfeng/leetcode-soln | cbf2db0d81d5ef98f48c8d1df486559f89142bfd | [
"MIT"
] | 1 | 2019-11-22T19:28:11.000Z | 2019-11-22T19:28:11.000Z | """
Implement a trie with insert, search, and startsWith methods.
Note:
You may assume that all inputs are consist of lowercase letters a-z.
"""
class TrieNode(object):
def __init__(self):
"""
Initialize your data structure here.
"""
self.leaves = {}
self.nil = False
cl... | 22.72 | 72 | 0.522887 |
7960e9351cda48e902ac0cae50803233373471f3 | 407 | py | Python | cleaning_schedule/utils/filesystem.py | Erik-Lamers1/OS3-cleaning-schedule | 388bc273cf0578bee813aa27bfe4977d68073901 | [
"MIT"
] | null | null | null | cleaning_schedule/utils/filesystem.py | Erik-Lamers1/OS3-cleaning-schedule | 388bc273cf0578bee813aa27bfe4977d68073901 | [
"MIT"
] | null | null | null | cleaning_schedule/utils/filesystem.py | Erik-Lamers1/OS3-cleaning-schedule | 388bc273cf0578bee813aa27bfe4977d68073901 | [
"MIT"
] | 1 | 2019-03-24T13:45:32.000Z | 2019-03-24T13:45:32.000Z | def get_lines_from_file(path):
with open(path, 'r') as fh:
return fh.read().splitlines()
def write_lines_to_file(path, lines):
"""
Takes a list of strings and writes them to <path> with a \n after each element
:param path: str: The filepath to write to
:param lines: list: The list of strin... | 29.071429 | 82 | 0.636364 |
7960e94c0d1dab9298b671800eb9d85a20654f13 | 2,053 | py | Python | tests/unit/commands/local/lib/test_provider.py | wingkwong/aws-sam-cli | 32b048e4379e22264a78518ede99b4bc7a54f8c1 | [
"Apache-2.0"
] | 1 | 2019-06-27T15:18:46.000Z | 2019-06-27T15:18:46.000Z | tests/unit/commands/local/lib/test_provider.py | wingkwong/aws-sam-cli | 32b048e4379e22264a78518ede99b4bc7a54f8c1 | [
"Apache-2.0"
] | 1 | 2021-06-02T02:44:08.000Z | 2021-06-02T02:44:08.000Z | tests/unit/commands/local/lib/test_provider.py | wingkwong/aws-sam-cli | 32b048e4379e22264a78518ede99b4bc7a54f8c1 | [
"Apache-2.0"
] | 1 | 2019-12-02T06:06:55.000Z | 2019-12-02T06:06:55.000Z | from unittest import TestCase
from parameterized import parameterized
from samcli.commands.local.lib.provider import LayerVersion
from samcli.commands.local.cli_common.user_exceptions import InvalidLayerVersionArn, UnsupportedIntrinsic
class TestLayerVersion(TestCase):
@parameterized.expand(
[
... | 38.018519 | 110 | 0.709206 |
7960e98afb3f0db23c94b1e247f2d13a4c5f99b5 | 6,096 | py | Python | 2021/quals/hw-parking/src/game.py | BearerPipelineTest/google-ctf | a0cab9cb6663ab908b9186d5428aa9674253c5c3 | [
"Apache-2.0"
] | 2,757 | 2018-04-28T21:41:36.000Z | 2022-03-29T06:33:36.000Z | 2021/quals/hw-parking/src/game.py | BearerPipelineTest/google-ctf | a0cab9cb6663ab908b9186d5428aa9674253c5c3 | [
"Apache-2.0"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | 2021/quals/hw-parking/src/game.py | BearerPipelineTest/google-ctf | a0cab9cb6663ab908b9186d5428aa9674253c5c3 | [
"Apache-2.0"
] | 449 | 2018-05-09T05:54:05.000Z | 2022-03-30T14:54:18.000Z | # Copyright 2021 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 25.613445 | 139 | 0.547244 |
7960eaa5835e1468df158c76fa7f9abef379f7dd | 152 | py | Python | FuN/tests/run_tests.py | alt113/Hierarchical-Actor-Critc-HAC- | 4c508ffcc35444b02b130d7fee5689370b283fd9 | [
"MIT"
] | null | null | null | FuN/tests/run_tests.py | alt113/Hierarchical-Actor-Critc-HAC- | 4c508ffcc35444b02b130d7fee5689370b283fd9 | [
"MIT"
] | 2 | 2019-06-25T17:19:36.000Z | 2019-07-05T19:42:00.000Z | FuN/tests/run_tests.py | alt113/Hierarchical-Actor-Critc-HAC- | 4c508ffcc35444b02b130d7fee5689370b283fd9 | [
"MIT"
] | null | null | null | import unittest
test_loader = unittest.defaultTestLoader.discover('.')
test_runner = unittest.TextTestRunner(verbosity=2)
test_runner.run(test_loader)
| 25.333333 | 54 | 0.828947 |
7960eb0b9d92c75cf95b364b76e2939c14799efd | 584 | py | Python | rovers/fastdownward/experiments/issue551/v1-lama-opt.py | mehrdadzakershahrak/Online-Explanation-Generation | e41ad9b5a390abdaf271562a56105c191e33b74d | [
"MIT"
] | 1 | 2021-09-09T13:03:02.000Z | 2021-09-09T13:03:02.000Z | rovers/fastdownward/experiments/issue551/v1-lama-opt.py | mehrdadzakershahrak/Online-Explanation-Generation | e41ad9b5a390abdaf271562a56105c191e33b74d | [
"MIT"
] | null | null | null | rovers/fastdownward/experiments/issue551/v1-lama-opt.py | mehrdadzakershahrak/Online-Explanation-Generation | e41ad9b5a390abdaf271562a56105c191e33b74d | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import os
from downward import suites
from common_setup import IssueConfig, IssueExperiment
REVS = ["issue551-base", "issue551-v1"]
BENCHMARKS = os.path.expanduser('~/downward-benchmarks')
SUITE = suites.suite_optimal_strips()
CONFIGS = [
IssueConfig("seq-opt-bjolp... | 20.137931 | 82 | 0.703767 |
7960ec989b1ef4bde556853b9ac441dfa93f9652 | 596 | py | Python | nomadgram/users/urls.py | seon54/python-cloning-instagram | ee7124c95e64105de045b096965c0c953a114c6d | [
"MIT"
] | 1 | 2020-08-16T12:47:50.000Z | 2020-08-16T12:47:50.000Z | nomadgram/users/urls.py | seon54/python-cloning-instagram | ee7124c95e64105de045b096965c0c953a114c6d | [
"MIT"
] | 1 | 2019-09-19T02:07:40.000Z | 2019-09-19T02:07:40.000Z | nomadgram/users/urls.py | seon54/python-cloning-instagram | ee7124c95e64105de045b096965c0c953a114c6d | [
"MIT"
] | null | null | null | from django.urls import path
from .views import *
urlpatterns = [
path('explore', ExploreUsers.as_view(), name='explore_users'),
path('<int:user_id>/follow', FollowUser.as_view(), name='follow_users'),
path('<int:user_id>/unfollow', UnfollowUser.as_view(), name='unfollow_users'),
path('search', Search... | 39.733333 | 85 | 0.697987 |
7960ed187a83f663365d91310d38daa4b25617da | 2,967 | py | Python | students/k3343/laboratory_works/Bogdanova Elizaveta/laboratory_work_2+kursovik/college/urls.py | TonikX/ITMO_ICT_-WebProgramming_2020 | ba566c1b3ab04585665c69860b713741906935a0 | [
"MIT"
] | 10 | 2020-03-20T09:06:12.000Z | 2021-07-27T13:06:02.000Z | students/k3343/laboratory_works/Bogdanova Elizaveta/laboratory_work_2+kursovik/college/urls.py | TonikX/ITMO_ICT_-WebProgramming_2020 | ba566c1b3ab04585665c69860b713741906935a0 | [
"MIT"
] | 134 | 2020-03-23T09:47:48.000Z | 2022-03-12T01:05:19.000Z | students/k3343/laboratory_works/Bogdanova Elizaveta/laboratory_work_2+kursovik/college/urls.py | TonikX/ITMO_ICT_-WebProgramming_2020 | ba566c1b3ab04585665c69860b713741906935a0 | [
"MIT"
] | 71 | 2020-03-20T12:45:56.000Z | 2021-10-31T19:22:25.000Z | from django.urls import path
from . import views
urlpatterns = [
path("attestat/", views.AttestatViewSet.as_view({'get': 'list'})),
path("attestat/<int:pk>/", views.AttestatViewSet.as_view({'get': 'retrieve'})),
path("attestat/create", views.AttestatViewSet.as_view({'post': 'create'})),
path("at... | 72.365854 | 106 | 0.66397 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.