hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
edb80640f49ed45b49afa0b05f95dc82ba5f444a | 16,133 | py | Python | photutils/psf/funcs.py | barentsen/photutils | 57cbe18c8c1b8b08c93daa3d5c8dd74c10c3daae | [
"BSD-3-Clause"
] | null | null | null | photutils/psf/funcs.py | barentsen/photutils | 57cbe18c8c1b8b08c93daa3d5c8dd74c10c3daae | [
"BSD-3-Clause"
] | null | null | null | photutils/psf/funcs.py | barentsen/photutils | 57cbe18c8c1b8b08c93daa3d5c8dd74c10c3daae | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Models and functions for doing PSF/PRF fitting photometry on image data.
"""
from __future__ import division
import warnings
import copy
import numpy as np
from astropy.table import Table, Column
from astropy.modeling import models
from astropy.modeli... | 41.050891 | 78 | 0.616314 |
72b07700613f8b5f49e7e5659a2d12dacf3a8bf4 | 1,375 | py | Python | BYOL/utils.py | Kennethborup/BYOL | 8752c6572896c12496517c92c8ec6ed64e5e9a3f | [
"MIT"
] | 3 | 2020-09-25T06:55:45.000Z | 2022-01-13T19:46:50.000Z | BYOL/utils.py | Kennethborup/BYOL | 8752c6572896c12496517c92c8ec6ed64e5e9a3f | [
"MIT"
] | null | null | null | BYOL/utils.py | Kennethborup/BYOL | 8752c6572896c12496517c92c8ec6ed64e5e9a3f | [
"MIT"
] | 1 | 2021-05-13T14:10:02.000Z | 2021-05-13T14:10:02.000Z | import torch
import torch.nn as nn
class EMA(object):
"""
Exponential Moving Average class.
:param beta: float; decay parameter
"""
def __init__(self, beta):
self.beta = beta
def __call__(self, MA, value):
return MA * self.beta + (1 - self.beta) * value
class... | 23.305085 | 90 | 0.551273 |
c08c9edf24f2d28c6cabe836fded8d2b0f8d6547 | 13,491 | py | Python | emolga/run.py | shengwenbo/CopyNet | 013508d10ad5ed09514b233a75e7f41ce7f8fa94 | [
"MIT"
] | 193 | 2016-09-19T02:55:00.000Z | 2022-03-10T13:43:50.000Z | emolga/run.py | Lencof/CopyNet | 361910930337cd6a446df5dd27c539e0a17bfaf9 | [
"MIT"
] | 6 | 2016-11-25T03:38:23.000Z | 2019-03-30T06:11:31.000Z | emolga/run.py | Lencof/CopyNet | 361910930337cd6a446df5dd27c539e0a17bfaf9 | [
"MIT"
] | 77 | 2016-10-14T10:08:44.000Z | 2021-03-11T05:01:27.000Z | # coding=utf-8
__author__ = 'jiataogu'
import logging
from matplotlib import pyplot
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
from config import setup, setup_main
from dataset import deserialize_from_file, divide_dataset, build_fuel, GuessOrder
from game.asker import Asker
from game.respo... | 36.860656 | 111 | 0.55563 |
3914489d0bc923b0be652454f3c57405afa6128c | 701 | py | Python | datacenter/storage_information_view.py | FaHoLo/Watching_storage | de74a734547c01e27d1ff9c2578e8cfaea8d0130 | [
"MIT"
] | null | null | null | datacenter/storage_information_view.py | FaHoLo/Watching_storage | de74a734547c01e27d1ff9c2578e8cfaea8d0130 | [
"MIT"
] | 3 | 2019-11-03T12:17:08.000Z | 2020-06-06T11:50:03.000Z | datacenter/storage_information_view.py | FaHoLo/Watching_storage | de74a734547c01e27d1ff9c2578e8cfaea8d0130 | [
"MIT"
] | null | null | null | from datacenter.models import Passcard
from datacenter.models import Visit
from django.shortcuts import render
def storage_information_view(request):
people_in_storage = Visit.objects.filter(leaved_at=None).select_related('passcard')
non_closed_visits = [collect_non_closed_visit_info(visit) for visit in peopl... | 31.863636 | 93 | 0.74893 |
808df97557060829c5ce98a5d11374d755d5ff45 | 1,185 | py | Python | reid/utils/data/sampler.py | nuannuanhcc/DomainAdaptiveReID | b0f23a01ff25e96db1581f62449df54576d73309 | [
"MIT"
] | null | null | null | reid/utils/data/sampler.py | nuannuanhcc/DomainAdaptiveReID | b0f23a01ff25e96db1581f62449df54576d73309 | [
"MIT"
] | null | null | null | reid/utils/data/sampler.py | nuannuanhcc/DomainAdaptiveReID | b0f23a01ff25e96db1581f62449df54576d73309 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from collections import defaultdict
import numpy as np
import torch
from IPython import embed
from torch.utils.data.sampler import (
Sampler, SequentialSampler, RandomSampler, SubsetRandomSampler,
WeightedRandomSampler)
class RandomIdentitySampler(Sampler):
def __in... | 32.027027 | 77 | 0.658228 |
918f03926945195f948bf94b0bcac1cb9e42632f | 1,093 | py | Python | backend/src/exceptions.py | sdediego/blockchain | 786246c3fc4d80a827d5a6f54e2257b836cc1cf3 | [
"MIT"
] | null | null | null | backend/src/exceptions.py | sdediego/blockchain | 786246c3fc4d80a827d5a6f54e2257b836cc1cf3 | [
"MIT"
] | null | null | null | backend/src/exceptions.py | sdediego/blockchain | 786246c3fc4d80a827d5a6f54e2257b836cc1cf3 | [
"MIT"
] | null | null | null | # encoding: utf-8
class BaseError(Exception):
"""
Handle generic exception.
"""
def __init__(self, message: str = None, code: int = None):
"""
Initialize BaseError class instance.
:param str message: error description message.
:param int code: error code number.
... | 19.517857 | 62 | 0.610247 |
38866de23df57920f8688a88f5a44c251b7f5602 | 4,467 | py | Python | main.py | dbeltman/MountnSync | 3f3fdbcffc33580bd3de89c358ef4a69115b5807 | [
"MIT"
] | 1 | 2022-03-05T19:42:11.000Z | 2022-03-05T19:42:11.000Z | main.py | dbeltman/MountnSync | 3f3fdbcffc33580bd3de89c358ef4a69115b5807 | [
"MIT"
] | null | null | null | main.py | dbeltman/MountnSync | 3f3fdbcffc33580bd3de89c358ef4a69115b5807 | [
"MIT"
] | null | null | null | from os import wait, getenv
from time import sleep
import docker_connector, json, argparse, sys
# Main Args
parser = argparse.ArgumentParser()
parser.add_argument("container", type=str, metavar='container', help="Name or ID of Container")
parser.add_argument("-b", "--backup", type=str, help = "Make a backup of the con... | 45.581633 | 216 | 0.65122 |
fd1c06ce06756f3e95aa04ae72df07ca3b4725ca | 869 | py | Python | docs/source/plots/graphics_regression_regress_exog.py | ginggs/statsmodels | a74a179d2a3267ed992871f8d9ef6c6d86c9b934 | [
"BSD-3-Clause"
] | 76 | 2019-12-28T08:37:10.000Z | 2022-03-29T02:19:41.000Z | docs/source/plots/graphics_regression_regress_exog.py | ginggs/statsmodels | a74a179d2a3267ed992871f8d9ef6c6d86c9b934 | [
"BSD-3-Clause"
] | 11 | 2015-07-22T22:11:59.000Z | 2020-10-09T08:02:15.000Z | docs/source/plots/graphics_regression_regress_exog.py | ginggs/statsmodels | a74a179d2a3267ed992871f8d9ef6c6d86c9b934 | [
"BSD-3-Clause"
] | 35 | 2020-02-04T14:46:25.000Z | 2022-03-24T03:56:17.000Z | # -*- coding: utf-8 -*-
'''
Load the Statewide Crime data set and build a model with regressors
including the rate of high school graduation (hs_grad), population in urban
areas (urban), households below poverty line (poverty), and single person
households (single). Outcome variable is the murder rate (murder).
Build... | 36.208333 | 76 | 0.749137 |
f2cd8a18eee0c83f79a7c1e5b88db1bca30a9b60 | 8,455 | py | Python | deep_face.py | collincebecky/FaceSicknessDetection | 9146972585947aef6b351d32100361f6e1c6cba9 | [
"MIT"
] | 1 | 2020-03-26T18:17:14.000Z | 2020-03-26T18:17:14.000Z | deep_face.py | collincebecky/FaceSicknessDetection | 9146972585947aef6b351d32100361f6e1c6cba9 | [
"MIT"
] | 6 | 2021-03-19T11:23:52.000Z | 2022-03-12T00:17:53.000Z | deep_face.py | collinsokumu/FaceSicknessDetection | 9146972585947aef6b351d32100361f6e1c6cba9 | [
"MIT"
] | 2 | 2020-03-12T05:09:02.000Z | 2020-03-18T21:48:45.000Z | from face_recognition.face_recognition_cli import image_files_in_folder
from PIL import Image, ImageDraw
from sklearn import neighbors
import face_recognition
import cv2, imutils
import random as r
import os.path
import pickle
import math
import os
ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg'}
model_path= "trained_faces... | 35.52521 | 116 | 0.588291 |
800a1c292cfbc9fd80f5242d1131eeca81fd8577 | 2,756 | py | Python | mmdet/core/bbox/samplers/ohem_sampler.py | TJUsym/TJU_Advanced_CV_Homework | 2d85943390e9ba53b80988e0ab8d50aef0cd17da | [
"Apache-2.0"
] | 643 | 2020-01-28T11:29:49.000Z | 2022-03-31T08:28:32.000Z | mmdet/core/bbox/samplers/ohem_sampler.py | TJUsym/TJU_Advanced_CV_Homework | 2d85943390e9ba53b80988e0ab8d50aef0cd17da | [
"Apache-2.0"
] | 148 | 2021-03-18T09:44:02.000Z | 2022-03-31T06:01:39.000Z | mmdet/core/bbox/samplers/ohem_sampler.py | TJUsym/TJU_Advanced_CV_Homework | 2d85943390e9ba53b80988e0ab8d50aef0cd17da | [
"Apache-2.0"
] | 197 | 2020-01-29T09:58:27.000Z | 2022-03-25T12:08:56.000Z | import torch
from .base_sampler import BaseSampler
from ..transforms import bbox2roi
class OHEMSampler(BaseSampler):
def __init__(self,
num,
pos_fraction,
context,
neg_pos_ub=-1,
add_gt_as_proposals=True,
**kwa... | 37.243243 | 77 | 0.544267 |
f8af020b705e9f0a0fc4d6d2db4b1bb5c2efa16a | 1,847 | py | Python | ejercicio1.py | jacubillos10/Aplicacion-de-Tausand | 7487ef5337a1ff1c7aa50f5ac748e4413c149b56 | [
"MIT"
] | null | null | null | ejercicio1.py | jacubillos10/Aplicacion-de-Tausand | 7487ef5337a1ff1c7aa50f5ac748e4413c149b56 | [
"MIT"
] | null | null | null | ejercicio1.py | jacubillos10/Aplicacion-de-Tausand | 7487ef5337a1ff1c7aa50f5ac748e4413c149b56 | [
"MIT"
] | null | null | null | #! usr/bin/env/python
#-*- coding: utf-8 -*-
import sys
import PyQt5.uic as gui
from PyQt5.QtWidgets import QMainWindow, QApplication
from PyQt5.QtCore import QProcess
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import keyboard
global h, x_vals, y_vals, y_acum, reinicio... | 23.0875 | 74 | 0.71738 |
b87215d868979786241c8650bbec9e7e486c58a5 | 1,028 | py | Python | plato/clients/registry.py | SamuelGong/plato | 726f965620e63dfe18cc2edf07cc010a751f0231 | [
"Apache-2.0"
] | null | null | null | plato/clients/registry.py | SamuelGong/plato | 726f965620e63dfe18cc2edf07cc010a751f0231 | [
"Apache-2.0"
] | null | null | null | plato/clients/registry.py | SamuelGong/plato | 726f965620e63dfe18cc2edf07cc010a751f0231 | [
"Apache-2.0"
] | null | null | null | """
The registry that contains all available federated learning clients.
Having a registry of all available classes is convenient for retrieving an instance based
on a configuration at run-time.
"""
import logging
from collections import OrderedDict
from plato.clients import (
simple,
mistnet,
)
from plato.c... | 27.783784 | 133 | 0.719844 |
4551dccf2e453a2bb039b50a74e86f176f234f09 | 8,748 | py | Python | ros/src/tl_detector/tl_detector.py | tairaO/CarND-Capstone | 927227c0b3404f9628b1c8f4e961d078ea512802 | [
"MIT"
] | null | null | null | ros/src/tl_detector/tl_detector.py | tairaO/CarND-Capstone | 927227c0b3404f9628b1c8f4e961d078ea512802 | [
"MIT"
] | null | null | null | ros/src/tl_detector/tl_detector.py | tairaO/CarND-Capstone | 927227c0b3404f9628b1c8f4e961d078ea512802 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import rospy
import os
from std_msgs.msg import Int32
from geometry_msgs.msg import PoseStamped, Pose
from styx_msgs.msg import TrafficLightArray, TrafficLight
from styx_msgs.msg import Lane
from sensor_msgs.msg import Image
from cv_bridge import CvBridge
from light_classification.tl_classifier im... | 36.911392 | 125 | 0.648148 |
f220753207ebff68478af827e22ebf4cd6720546 | 13,348 | py | Python | semantic_release/cli.py | R0ll1ngSt0ne/python-semantic-release | 9e15854bea146ca9ff37d5383c6d1b26c52508bf | [
"MIT"
] | null | null | null | semantic_release/cli.py | R0ll1ngSt0ne/python-semantic-release | 9e15854bea146ca9ff37d5383c6d1b26c52508bf | [
"MIT"
] | null | null | null | semantic_release/cli.py | R0ll1ngSt0ne/python-semantic-release | 9e15854bea146ca9ff37d5383c6d1b26c52508bf | [
"MIT"
] | null | null | null | """CLI
"""
import logging
import os
import sys
import click
import click_log
from semantic_release import ci_checks
from semantic_release.errors import GitError, ImproperConfigurationError
from .changelog import markdown_changelog
from .dist import build_dists, remove_dists, should_build, should_remove_dist
from .hi... | 30.130926 | 94 | 0.651034 |
30f98955cf64b7b6ca2181f298a0048a078cc2c0 | 32,206 | py | Python | numba/dispatcher.py | AndrewYY/numba | 3f6f4a3f642e26b1691460ac1f10a9be839baa28 | [
"BSD-2-Clause"
] | 1 | 2019-02-13T09:22:51.000Z | 2019-02-13T09:22:51.000Z | numba/dispatcher.py | bill52547/numba | 3f6f4a3f642e26b1691460ac1f10a9be839baa28 | [
"BSD-2-Clause"
] | null | null | null | numba/dispatcher.py | bill52547/numba | 3f6f4a3f642e26b1691460ac1f10a9be839baa28 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf8 -*-
from __future__ import print_function, division, absolute_import
import collections
import functools
import os
import struct
import sys
import uuid
import weakref
from numba import _dispatcher, compiler, utils, types, config, errors
from numba.typeconv.rules import default_type_manager
from nu... | 36.89118 | 93 | 0.598988 |
646a0f7e90bad814cad18df1149cc6fbd8e75f43 | 19,801 | py | Python | python/ray/serve/tests/test_standalone.py | dsctt/ray | 29d94a22114b02adfd3745c4991a3ce70592dd16 | [
"Apache-2.0"
] | 1 | 2021-09-20T15:45:59.000Z | 2021-09-20T15:45:59.000Z | python/ray/serve/tests/test_standalone.py | dsctt/ray | 29d94a22114b02adfd3745c4991a3ce70592dd16 | [
"Apache-2.0"
] | 53 | 2021-10-06T20:08:04.000Z | 2022-03-21T20:17:25.000Z | python/ray/serve/tests/test_standalone.py | dsctt/ray | 29d94a22114b02adfd3745c4991a3ce70592dd16 | [
"Apache-2.0"
] | null | null | null | """
The test file for all standalone tests that doesn't
requires a shared Serve instance.
"""
import os
import subprocess
import sys
import socket
from typing import Optional
from tempfile import mkstemp
import pytest
import pydantic
import requests
import ray
from ray import serve
from ray.cluster_utils import Clust... | 29.248154 | 88 | 0.660118 |
692ac3d5192c78c39ca4a9eda8673ec2c2ae5e1c | 12,507 | py | Python | glycan_profiling/serialize/spectrum.py | mstim/glycresoft | 1d305c42c7e6cba60326d8246e4a485596a53513 | [
"Apache-2.0"
] | null | null | null | glycan_profiling/serialize/spectrum.py | mstim/glycresoft | 1d305c42c7e6cba60326d8246e4a485596a53513 | [
"Apache-2.0"
] | null | null | null | glycan_profiling/serialize/spectrum.py | mstim/glycresoft | 1d305c42c7e6cba60326d8246e4a485596a53513 | [
"Apache-2.0"
] | null | null | null | from sqlalchemy.orm.session import object_session
from sqlalchemy import (
Column, Numeric, Integer, String, ForeignKey, PickleType,
Boolean, select)
from sqlalchemy.orm import relationship, backref, deferred
from sqlalchemy.ext.mutable import MutableDict, MutableList
import numpy as np
from ms_peak_picker i... | 37.002959 | 100 | 0.674103 |
d86d78993f1c5786689dd87993b67c16c319fb97 | 47,198 | py | Python | tests/unit/test_loader.py | hvbarker/salt | 0b1e299b8983854bd55163439e4ac20d81a9dab7 | [
"Apache-2.0"
] | 1 | 2020-05-17T18:00:38.000Z | 2020-05-17T18:00:38.000Z | tests/unit/test_loader.py | hvbarker/salt | 0b1e299b8983854bd55163439e4ac20d81a9dab7 | [
"Apache-2.0"
] | null | null | null | tests/unit/test_loader.py | hvbarker/salt | 0b1e299b8983854bd55163439e4ac20d81a9dab7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
unit.loader
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Test Salt's loader
"""
from __future__ import absolute_import, print_function, unicode_literals
import collections
import compileall
import copy
import imp
import inspect
import logging
import os
import shutil
import sys
import tempfil... | 31.804582 | 109 | 0.602292 |
2ba80853219734ef235ba99d91f786c29bf6301a | 45,842 | py | Python | electrum/transaction.py | yashbhutwala/electrum | 7bea1cce1fbb0e0a502288b381ce12fbc1e93dd7 | [
"MIT"
] | null | null | null | electrum/transaction.py | yashbhutwala/electrum | 7bea1cce1fbb0e0a502288b381ce12fbc1e93dd7 | [
"MIT"
] | null | null | null | electrum/transaction.py | yashbhutwala/electrum | 7bea1cce1fbb0e0a502288b381ce12fbc1e93dd7 | [
"MIT"
] | 1 | 2019-01-10T23:00:02.000Z | 2019-01-10T23:00:02.000Z | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2011 Thomas Voegtlin
#
# 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... | 37.980116 | 159 | 0.608459 |
01a1fda148acb2e8b5cbf520805d3afb4d73f63a | 1,533 | py | Python | tests/unit/trace/test_config_integration.py | bshaffer/opencensus-python | c624558c6829982d3464a5df29b48952f1fe23bc | [
"Apache-2.0"
] | null | null | null | tests/unit/trace/test_config_integration.py | bshaffer/opencensus-python | c624558c6829982d3464a5df29b48952f1fe23bc | [
"Apache-2.0"
] | null | null | null | tests/unit/trace/test_config_integration.py | bshaffer/opencensus-python | c624558c6829982d3464a5df29b48952f1fe23bc | [
"Apache-2.0"
] | null | null | null | # Copyright 2017, OpenCensus 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 w... | 31.285714 | 74 | 0.712981 |
85651abc920628a4fc1f876bdae998a467b7605b | 666 | py | Python | core/migrations/0007_paste_author.py | winny-/sillypaste | bf6125b35225046226328d1077d7bc7ea5e11c94 | [
"Unlicense"
] | 3 | 2021-05-21T03:45:59.000Z | 2022-01-23T18:26:45.000Z | core/migrations/0007_paste_author.py | winny-/sillypaste | bf6125b35225046226328d1077d7bc7ea5e11c94 | [
"Unlicense"
] | 13 | 2021-04-03T19:56:35.000Z | 2022-01-23T18:39:47.000Z | core/migrations/0007_paste_author.py | winny-/sillypaste | bf6125b35225046226328d1077d7bc7ea5e11c94 | [
"Unlicense"
] | 1 | 2021-10-03T18:22:55.000Z | 2021-10-03T18:22:55.000Z | # Generated by Django 3.1.1 on 2020-09-06 23:57
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('core', '0006_paste_size'... | 24.666667 | 66 | 0.593093 |
1caab59bc2055e49b53d8f470b182965fa717ab8 | 4,483 | py | Python | src/utils.py | kant/open-solution-value-prediction | 708d0958cba1b8a551a10a9959678441f3eaa1dc | [
"MIT"
] | 27 | 2018-06-29T18:38:53.000Z | 2019-08-22T21:49:19.000Z | src/utils.py | kant/open-solution-value-prediction | 708d0958cba1b8a551a10a9959678441f3eaa1dc | [
"MIT"
] | 16 | 2018-06-19T22:15:18.000Z | 2018-06-26T09:15:59.000Z | src/utils.py | kant/open-solution-value-prediction | 708d0958cba1b8a551a10a9959678441f3eaa1dc | [
"MIT"
] | 15 | 2018-07-01T00:28:39.000Z | 2019-08-08T01:16:24.000Z | import logging
import os
import random
import sys
import numpy as np
import pandas as pd
import yaml
from attrdict import AttrDict
from deepsense import neptune
from sklearn.metrics import mean_squared_error
from sklearn.model_selection import BaseCrossValidator
from steppy.base import BaseTransformer
# Alex Martell... | 30.496599 | 107 | 0.68414 |
325f99f333ea3868a6b1084f842e8e9a18f07378 | 5,266 | py | Python | src/retrieve_season_data.py | brokenintuition/nascar_data | 9635d36b611b047cd4b5f54e6b31100b84ad9ef8 | [
"MIT"
] | null | null | null | src/retrieve_season_data.py | brokenintuition/nascar_data | 9635d36b611b047cd4b5f54e6b31100b84ad9ef8 | [
"MIT"
] | null | null | null | src/retrieve_season_data.py | brokenintuition/nascar_data | 9635d36b611b047cd4b5f54e6b31100b84ad9ef8 | [
"MIT"
] | null | null | null | import bs4
import requests
import os
import sys
import re
import argparse
import logging
import pandas as pd
from itertools import product
from datetime import date
base_url = 'https://www.racing-reference.info/season-stats/{year}/{series}/'
output_format = '{series}_{year}_season_v1.csv'
# presumably for Winston, Bu... | 36.068493 | 136 | 0.654577 |
576c66b0119fbaa768bc764634d236696b70f855 | 266 | py | Python | step2/ExpressionBuilder.py | faisalp4p/slang-python | 5e9465dc0ebec9947886dc49373c726b0d4fa1ef | [
"MIT"
] | 7 | 2015-02-22T09:45:08.000Z | 2021-08-17T11:57:42.000Z | step2/ExpressionBuilder.py | faisalp4p/slang-python | 5e9465dc0ebec9947886dc49373c726b0d4fa1ef | [
"MIT"
] | null | null | null | step2/ExpressionBuilder.py | faisalp4p/slang-python | 5e9465dc0ebec9947886dc49373c726b0d4fa1ef | [
"MIT"
] | 1 | 2016-12-23T15:48:50.000Z | 2016-12-23T15:48:50.000Z |
from RDParser import RDParser
class ExpressionBuilder:
@classmethod
def __init__(self, expr):
self. _expr_string = expr
@classmethod
def GetExpression(self):
p = RDParser(self._expr_string)
return p.CallExpr()
| 17.733333 | 39 | 0.635338 |
739257c26aaa54b6f7f7aa60c2d440de86555856 | 2,172 | py | Python | lib/node_modules/@stdlib/math/base/special/log10/benchmark/python/benchmark.py | andbmme/stdlib | c1994db25727c32cd0065cdc5f0c019dd4fc855c | [
"Apache-2.0"
] | 1 | 2020-03-02T15:44:24.000Z | 2020-03-02T15:44:24.000Z | lib/node_modules/@stdlib/math/base/special/log10/benchmark/python/benchmark.py | andbmme/stdlib | c1994db25727c32cd0065cdc5f0c019dd4fc855c | [
"Apache-2.0"
] | null | null | null | lib/node_modules/@stdlib/math/base/special/log10/benchmark/python/benchmark.py | andbmme/stdlib | c1994db25727c32cd0065cdc5f0c019dd4fc855c | [
"Apache-2.0"
] | 1 | 2020-11-23T03:46:24.000Z | 2020-11-23T03:46:24.000Z | #!/usr/bin/env python
#
# @license Apache-2.0
#
# Copyright (c) 2018 The Stdlib 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
#
# ... | 22.163265 | 74 | 0.63628 |
5349dfe8cfe75eb2606d8f23c0f24137a996d8ee | 5,192 | py | Python | mmdet/core/bbox/samplers/sampling_result.py | jinfagang/mmdetection | 707c90ff1621c509eecba21ee7a9b97955003873 | [
"Apache-2.0"
] | null | null | null | mmdet/core/bbox/samplers/sampling_result.py | jinfagang/mmdetection | 707c90ff1621c509eecba21ee7a9b97955003873 | [
"Apache-2.0"
] | null | null | null | mmdet/core/bbox/samplers/sampling_result.py | jinfagang/mmdetection | 707c90ff1621c509eecba21ee7a9b97955003873 | [
"Apache-2.0"
] | null | null | null | import torch
from mmdet.utils import util_mixins
class SamplingResult(util_mixins.NiceRepr):
"""
Example:
>>> # xdoctest: +IGNORE_WANT
>>> from mmdet.core.bbox.samplers.sampling_result import * # NOQA
>>> self = SamplingResult.random(rng=10)
>>> print('self = {}'.format(self)... | 33.496774 | 81 | 0.563945 |
e8871b4599e6f73fbb3a84133d94afd4af212244 | 693 | py | Python | iped_jobs/test_k8s.py | setecrs/iped_jobs | e67db569ffc81e03f0ff67412fd6fcc764bccc31 | [
"MIT"
] | null | null | null | iped_jobs/test_k8s.py | setecrs/iped_jobs | e67db569ffc81e03f0ff67412fd6fcc764bccc31 | [
"MIT"
] | null | null | null | iped_jobs/test_k8s.py | setecrs/iped_jobs | e67db569ffc81e03f0ff67412fd6fcc764bccc31 | [
"MIT"
] | null | null | null | import unittest
import requests
from kubernetes import client
from .k8s import _addJob
class Test_AddJob(unittest.TestCase):
def test_addJob(self):
d = dict(
image='a10',
IPEDJAR='a20',
EVIDENCE_PATH='a30',
OUTPUT_PATH='a40',
IPED_PROFILE='a50',... | 33 | 104 | 0.549784 |
e70136eeba1fdefe7b84978f347dde443042501d | 1,863 | py | Python | penkins/resources/projects.py | penkins/penkins_ci | 668606b505d02eed7fbe65604655e140ab60d6dd | [
"Apache-2.0"
] | 2 | 2015-04-03T19:12:46.000Z | 2016-04-06T09:49:17.000Z | penkins/resources/projects.py | penkins/penkins_ci | 668606b505d02eed7fbe65604655e140ab60d6dd | [
"Apache-2.0"
] | 5 | 2015-02-25T19:22:47.000Z | 2019-02-09T08:48:00.000Z | penkins/resources/projects.py | penkins/penkins_ci | 668606b505d02eed7fbe65604655e140ab60d6dd | [
"Apache-2.0"
] | 1 | 2016-04-06T09:49:19.000Z | 2016-04-06T09:49:19.000Z | import re
import os
import sys
import subprocess
import logging
import git
import yaml
from flask import request
from flask_restful import Resource
from tinydb import TinyDB, Query
import jsonschema
from penkins import PenkinsConfig
from penkins import PenkinsMail
from penkins.db import db, Query
from penkins.control... | 25.175676 | 83 | 0.4584 |
3597a5e75e458ed6cd29327a8bb15101b32cc4ee | 3,367 | py | Python | test/integration/scmp_echo_test.py | sasjafor/scion | cdcbd186d1350ad78f365556b771ada522bd33ed | [
"Apache-2.0"
] | 1 | 2018-03-18T14:46:34.000Z | 2018-03-18T14:46:34.000Z | test/integration/scmp_echo_test.py | sasjafor/scion | cdcbd186d1350ad78f365556b771ada522bd33ed | [
"Apache-2.0"
] | null | null | null | test/integration/scmp_echo_test.py | sasjafor/scion | cdcbd186d1350ad78f365556b771ada522bd33ed | [
"Apache-2.0"
] | 1 | 2018-03-14T14:59:57.000Z | 2018-03-14T14:59:57.000Z | #!/usr/bin/python3
# Copyright 2016 ETH Zurich
#
# 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... | 30.0625 | 78 | 0.665281 |
55f27dd445c8a3ae147f7bf3a7de6bc2bb94cec1 | 9,853 | py | Python | pychron/lasers/laser_managers/chromium_laser_manager.py | ael-noblegas/pychron | 6ebbbb1f66a614972b62b7a9be4c784ae61b5d62 | [
"Apache-2.0"
] | null | null | null | pychron/lasers/laser_managers/chromium_laser_manager.py | ael-noblegas/pychron | 6ebbbb1f66a614972b62b7a9be4c784ae61b5d62 | [
"Apache-2.0"
] | null | null | null | pychron/lasers/laser_managers/chromium_laser_manager.py | ael-noblegas/pychron | 6ebbbb1f66a614972b62b7a9be4c784ae61b5d62 | [
"Apache-2.0"
] | null | null | null | # ===============================================================================
# Copyright 2015 Jake Ross
#
# 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... | 31.479233 | 115 | 0.556582 |
f7200016b3e4bb76f1473df3974edfb197cc475a | 2,321 | py | Python | tests/hazmat/backends/test_commoncrypto.py | balabit-deps/balabit-os-6-python-cryptography | c31d184a56a18bad89a6444313367be71b5b0877 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2015-09-25T16:03:32.000Z | 2015-09-25T16:03:32.000Z | tests/hazmat/backends/test_commoncrypto.py | balabit-deps/balabit-os-6-python-cryptography | c31d184a56a18bad89a6444313367be71b5b0877 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | tests/hazmat/backends/test_commoncrypto.py | balabit-deps/balabit-os-6-python-cryptography | c31d184a56a18bad89a6444313367be71b5b0877 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2020-07-17T12:26:45.000Z | 2020-07-17T12:26:45.000Z | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
import pytest
from cryptography import utils
from cryptography.exception... | 37.435484 | 79 | 0.734166 |
aee46701e234984a75059c835c29e43d5d2bd2ed | 729 | py | Python | tests/conftest.py | katherine-atwell/DiscourseSenser | 73008c9437a0466005be5f6d130050eece4069a6 | [
"MIT"
] | 15 | 2016-05-13T12:15:54.000Z | 2020-01-03T11:33:56.000Z | tests/conftest.py | katherine-atwell/DiscourseSenser | 73008c9437a0466005be5f6d130050eece4069a6 | [
"MIT"
] | 4 | 2016-06-19T09:56:51.000Z | 2016-10-12T22:07:51.000Z | tests/conftest.py | katherine-atwell/DiscourseSenser | 73008c9437a0466005be5f6d130050eece4069a6 | [
"MIT"
] | 2 | 2016-05-23T08:49:12.000Z | 2020-07-28T00:02:11.000Z | #!/usr/bin/env python
# -*- coding: utf-8; mode: python; -*-
##################################################################
# Imports
from pytest import fixture
import codecs
import json
import os
##################################################################
# Constants
ENCODING = "utf-8"
DIRNAME = os.path... | 25.137931 | 66 | 0.522634 |
cb3bf6208238aede9deebc247d14c71c9c461be5 | 32,637 | py | Python | scripts/release-notes.py | divbhasin/cockroach | 3078ef8af2f797d77869af469964a320c28c395e | [
"MIT",
"BSD-3-Clause"
] | 1 | 2019-12-18T08:03:16.000Z | 2019-12-18T08:03:16.000Z | scripts/release-notes.py | ff3456789/cockroach | 2f1e342c386973c35246bef68c177fcd0b8b609b | [
"MIT",
"BSD-3-Clause"
] | null | null | null | scripts/release-notes.py | ff3456789/cockroach | 2f1e342c386973c35246bef68c177fcd0b8b609b | [
"MIT",
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python3
#
# Show a compact release note summary of a range of Git commits.
#
# Example use: release-notes.py --help
#
# Note: the first commit in the range is excluded!
#
# Requires:
# - GitPython https://pypi.python.org/pypi/GitPython/
# - You need to configure your local repo to pull the PR refs f... | 35.321429 | 186 | 0.621473 |
025a47ebc1a9f99a88c75e2a4a95663a4560032d | 1,111 | py | Python | src/fasta_manipulation/tab_to_singlefastas_gui.py | olgatsiouri1996/bioinfo_Gooey_scripts | 234a42e8367e8032bf1fb451716c7aa53e2f3e31 | [
"MIT"
] | 2 | 2020-09-21T09:11:04.000Z | 2022-03-29T19:17:34.000Z | fasta_manipulation/tab_to_singlefastas_gui.py | olgatsiouri1996/bioinfo_gui_scripts | 611923d9e96e5347e4bc8451c6de9f1cbf7cf177 | [
"MIT"
] | null | null | null | fasta_manipulation/tab_to_singlefastas_gui.py | olgatsiouri1996/bioinfo_gui_scripts | 611923d9e96e5347e4bc8451c6de9f1cbf7cf177 | [
"MIT"
] | null | null | null | # python3
import itertools
from gooey import *
from Bio import SeqIO
from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecord
import pandas as pd
# input arguments
@Gooey(required_cols=1, program_name='tabular to single-fasta files', header_bg_color= '#DCDCDC', terminal_font_color= '#DCDCDC', terminal_panel_color= '... | 42.730769 | 162 | 0.711071 |
155f611fe8a7b03ea8f059e1ed7636037a7a62c1 | 5,969 | py | Python | django/docs/howto/outputting-csv.txt.py | roshanba/mangal | f7b428811dc07214009cc33f0beb665ead402038 | [
"bzip2-1.0.6",
"MIT"
] | null | null | null | django/docs/howto/outputting-csv.txt.py | roshanba/mangal | f7b428811dc07214009cc33f0beb665ead402038 | [
"bzip2-1.0.6",
"MIT"
] | null | null | null | django/docs/howto/outputting-csv.txt.py | roshanba/mangal | f7b428811dc07214009cc33f0beb665ead402038 | [
"bzip2-1.0.6",
"MIT"
] | null | null | null | XXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXX XXX XXXX XXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXX
XXXX XXXXXXXX XXXXXXXX XXX XX XXXXXX XXX XXXXXX XXXXXXXXX XXXXXXX XXXXXXXXXXX
XXXXX XXXXXX XXXXXX XX XX XXXXX XXX XXX XXXXXX XXX XXX XXXXXX XXX XXXXXXX XX XXX
XXXXXX XXXXXXXX XXXXXXX
XXXXX XXX XXXXXX XXX XXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXX... | 40.331081 | 87 | 0.795108 |
d89bb3676b297cd68761d7f8068e18ce56bebadb | 503 | py | Python | saleor/unurshop/package/migrations/0011_package_package_type.py | nlkhagva/saleor | 0d75807d08ac49afcc904733724ac870e8359c10 | [
"CC-BY-4.0"
] | null | null | null | saleor/unurshop/package/migrations/0011_package_package_type.py | nlkhagva/saleor | 0d75807d08ac49afcc904733724ac870e8359c10 | [
"CC-BY-4.0"
] | 1 | 2022-02-15T03:31:12.000Z | 2022-02-15T03:31:12.000Z | saleor/unurshop/package/migrations/0011_package_package_type.py | nlkhagva/ushop | abf637eb6f7224e2d65d62d72a0c15139c64bb39 | [
"CC-BY-4.0"
] | null | null | null | # Generated by Django 3.1 on 2020-11-10 03:50
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('package', '0010_auto_20200921_1323'),
]
operations = [
migrations.AddField(
model_name='package',
name='... | 26.473684 | 147 | 0.580517 |
a377c3dec524ed81c5147778b5f4c2ac27400340 | 14,447 | py | Python | fairseq_cli/train.py | ashkanalinejad/Supervised-Simultaneous-MT | d09397ed86bbf4133d5d9b906030a8881ee4c13f | [
"MIT"
] | 2 | 2022-01-11T19:27:11.000Z | 2022-01-12T11:06:53.000Z | fairseq_cli/train.py | sfu-natlang/Supervised-Simultaneous-MT | 12c3a53887c985ae24199ecef2f7b2335fe214c6 | [
"MIT"
] | 1 | 2022-02-12T03:02:52.000Z | 2022-02-12T04:27:10.000Z | fairseq_cli/train.py | sfu-natlang/Supervised-Simultaneous-MT | 12c3a53887c985ae24199ecef2f7b2335fe214c6 | [
"MIT"
] | 1 | 2022-02-27T14:22:36.000Z | 2022-02-27T14:22:36.000Z | #!/usr/bin/env python3 -u
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
Train a new model on one or across multiple GPUs.
"""
import argparse
import logging
import math
import os
impor... | 34.479714 | 106 | 0.656676 |
01277b8cad5810a95916b011d00dc37241e682dc | 192 | py | Python | imbi/endpoints/ui/groups.py | in-op/imbi-api | 28cc46a9707df1da1e907412878c389fc82dc068 | [
"BSD-3-Clause"
] | null | null | null | imbi/endpoints/ui/groups.py | in-op/imbi-api | 28cc46a9707df1da1e907412878c389fc82dc068 | [
"BSD-3-Clause"
] | null | null | null | imbi/endpoints/ui/groups.py | in-op/imbi-api | 28cc46a9707df1da1e907412878c389fc82dc068 | [
"BSD-3-Clause"
] | null | null | null | from imbi.endpoints import base
class GroupsRequestHandler(base.CRUDRequestHandler):
ENDPOINT = 'ui-groups'
GET_SQL = 'SELECT name FROM v1.groups ORDER BY name ASC;'
TTL = 300
| 19.2 | 61 | 0.723958 |
e1f9a38ed61d1fa0d8ce83da75349b9568296200 | 1,134 | py | Python | bm_chamfer.py | Lynn-Vang42/demo-data | 70fc946d2d67d66fabfee89f00ba71247a9c8014 | [
"BSD-3-Clause"
] | 1 | 2021-08-30T12:28:21.000Z | 2021-08-30T12:28:21.000Z | bm_chamfer.py | Lynn-Vang42/demo-data | 70fc946d2d67d66fabfee89f00ba71247a9c8014 | [
"BSD-3-Clause"
] | null | null | null | bm_chamfer.py | Lynn-Vang42/demo-data | 70fc946d2d67d66fabfee89f00ba71247a9c8014 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
import torch
from fvcore.common.benchmark import benchmark
from test_chamfer import TestChamfer
def bm_chamfer() -> None:
kwargs_list_naive = [
{"batch_size": 1, "P1": 32, "P2": 64, "return_normals": False},
... | 32.4 | 125 | 0.609347 |
5149675016049a5c3fe5842d0bd5acf2c043491a | 2,836 | py | Python | opencv/sources/samples/python/tutorial_code/core/mat_mask_operations/mat_mask_operations.py | vrushank-agrawal/opencv-x64-cmake | 3f9486510d706c8ac579ac82f5d58f667f948124 | [
"Apache-2.0"
] | null | null | null | opencv/sources/samples/python/tutorial_code/core/mat_mask_operations/mat_mask_operations.py | vrushank-agrawal/opencv-x64-cmake | 3f9486510d706c8ac579ac82f5d58f667f948124 | [
"Apache-2.0"
] | null | null | null | opencv/sources/samples/python/tutorial_code/core/mat_mask_operations/mat_mask_operations.py | vrushank-agrawal/opencv-x64-cmake | 3f9486510d706c8ac579ac82f5d58f667f948124 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
import sys
import time
import numpy as np
import cv2 as cv
## [basic_method]
def is_grayscale(my_image):
return len(my_image.shape) < 3
def saturated(sum_value):
if sum_value > 255:
sum_value = 255
if sum_value < 0:
sum_value = 0
... | 28.079208 | 91 | 0.531735 |
34168c000a4ded29556cd0fecd995cef38a61ca9 | 1,461 | py | Python | pygsp/graphs/nngraphs/grid2dimgpatches.py | jafluri/pygsp | ff8c0023c25df4cbcfd88a7ef63c6223f3030a51 | [
"BSD-3-Clause"
] | 341 | 2015-09-07T16:59:41.000Z | 2022-03-23T20:27:55.000Z | pygsp/graphs/nngraphs/grid2dimgpatches.py | jafluri/pygsp | ff8c0023c25df4cbcfd88a7ef63c6223f3030a51 | [
"BSD-3-Clause"
] | 96 | 2017-04-16T04:38:57.000Z | 2021-11-02T18:36:41.000Z | pygsp/graphs/nngraphs/grid2dimgpatches.py | jafluri/pygsp | ff8c0023c25df4cbcfd88a7ef63c6223f3030a51 | [
"BSD-3-Clause"
] | 95 | 2016-03-25T14:35:28.000Z | 2022-02-08T18:54:29.000Z | # -*- coding: utf-8 -*-
# prevent circular import in Python < 3.5
from pygsp.graphs import Graph, Grid2d, ImgPatches
class Grid2dImgPatches(Graph):
r"""Union of a patch graph with a 2D grid graph.
Parameters
----------
img : array
Input image.
aggregate: callable, optional
Functi... | 28.647059 | 75 | 0.563313 |
8c36f70883f19efe97accf67e5f4564e66e2a79e | 3,218 | py | Python | tools/test_net.py | singhnarotam1997/Detectron | ecc6b25fc8869486126f1384b4e6e042a718bd5b | [
"Apache-2.0"
] | 60 | 2021-08-07T09:16:52.000Z | 2022-03-14T09:09:00.000Z | tools/test_net.py | singhnarotam1997/Detectron | ecc6b25fc8869486126f1384b4e6e042a718bd5b | [
"Apache-2.0"
] | 4 | 2021-10-14T02:44:49.000Z | 2022-03-14T08:18:20.000Z | tools/test_net.py | singhnarotam1997/Detectron | ecc6b25fc8869486126f1384b4e6e042a718bd5b | [
"Apache-2.0"
] | 11 | 2021-11-01T00:30:37.000Z | 2021-12-08T10:01:52.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
##############################################################################
"""Perform inference on one or more datasets... | 28.477876 | 78 | 0.669049 |
d5857257c98a6122ab5c59a6b83dd81804473ffd | 866 | py | Python | ExtendRegister/bp_register.py | keyuansen/Flask_BestPractices | c96f849c426f7b5d6a78be5ffb4ba24e861dd806 | [
"MIT"
] | 1 | 2021-01-26T08:10:46.000Z | 2021-01-26T08:10:46.000Z | ExtendRegister/bp_register.py | keyuansen/Flask_BestPractices | c96f849c426f7b5d6a78be5ffb4ba24e861dd806 | [
"MIT"
] | null | null | null | ExtendRegister/bp_register.py | keyuansen/Flask_BestPractices | c96f849c426f7b5d6a78be5ffb4ba24e861dd806 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# @Time : 2019/4/18 10:47 AM
# @Author : ShaHeTop-Almighty-ares
# @Email : yang6333yyx@126.com
# @File : bp_register.py
# @Software: PyCharm
from app.api import route_api
from app.controllers.cms.cms_bp import route_admin
from app.controllers.other_module_01.module_01 import route_mod... | 29.862069 | 69 | 0.73903 |
38d366a46e10754651e99a2e6bcd85b23b502da3 | 3,845 | py | Python | PlotlyandPython/Lessons/(07) Chart Presentation 3/Notebooks/Python Scripts/Chart Presentation (3) - Positioning the legend.py | peternewman22/Python_Courses | 07a798b6f264fc6069eb1205c9d429f00fb54bc5 | [
"MIT"
] | null | null | null | PlotlyandPython/Lessons/(07) Chart Presentation 3/Notebooks/Python Scripts/Chart Presentation (3) - Positioning the legend.py | peternewman22/Python_Courses | 07a798b6f264fc6069eb1205c9d429f00fb54bc5 | [
"MIT"
] | null | null | null | PlotlyandPython/Lessons/(07) Chart Presentation 3/Notebooks/Python Scripts/Chart Presentation (3) - Positioning the legend.py | peternewman22/Python_Courses | 07a798b6f264fc6069eb1205c9d429f00fb54bc5 | [
"MIT"
] | null | null | null |
# coding: utf-8
# # Chart Presentation (3) - Positioning the legend
# In this lesson we're going to learn how to position the legend. The legend can be positioned in the same way that we position annotations - by setting an x- and y-position.
# ## Module Imports
# In[1]:
#plotly.offline doesn't push your charts t... | 39.234694 | 268 | 0.749545 |
1a579dcf87716b2900811f66459e622f31e65f92 | 2,992 | py | Python | selection/models.py | namantw/Hostel-Management-System | be37678a4a3d5577f60fb55e7325e2221ce585e0 | [
"MIT"
] | 3 | 2019-09-25T10:10:43.000Z | 2021-11-25T07:41:33.000Z | selection/models.py | namantw/Hostel-Management-System | be37678a4a3d5577f60fb55e7325e2221ce585e0 | [
"MIT"
] | null | null | null | selection/models.py | namantw/Hostel-Management-System | be37678a4a3d5577f60fb55e7325e2221ce585e0 | [
"MIT"
] | 2 | 2019-04-28T14:26:34.000Z | 2021-11-15T15:40:06.000Z | from django.db import models
from django.contrib.auth.models import AbstractUser
class User(AbstractUser):
is_warden = models.BooleanField(default=False)
class Student(models.Model):
user = models.OneToOneField(
User,
default=None,
null=True,
on_delete=models.CASCADE)
gen... | 30.845361 | 156 | 0.656083 |
c34c82891bbb9c413e25cbd65e33aa5bfafb86a5 | 12,716 | py | Python | kubernetes_py/K8sCronJob.py | Venkat1729/kubernetes-py | ad494056700793f3b56eec6f6c9c8b8faeebfe79 | [
"Apache-2.0"
] | 129 | 2016-01-23T03:21:25.000Z | 2022-03-31T16:40:33.000Z | kubernetes_py/K8sCronJob.py | Venkat1729/kubernetes-py | ad494056700793f3b56eec6f6c9c8b8faeebfe79 | [
"Apache-2.0"
] | 42 | 2016-02-22T08:33:46.000Z | 2021-02-25T03:02:14.000Z | kubernetes_py/K8sCronJob.py | Venkat1729/kubernetes-py | ad494056700793f3b56eec6f6c9c8b8faeebfe79 | [
"Apache-2.0"
] | 56 | 2016-05-14T19:20:59.000Z | 2022-03-11T19:43:36.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This file is subject to the terms and conditions defined in
# file 'LICENSE.md', which is part of this source code package.
#
import time
from kubernetes_py.K8sContainer import K8sContainer
from kubernetes_py.K8sExceptions import CronJobAlreadyRunningException, CronJ... | 35.224377 | 116 | 0.554105 |
401e0525196b1954c3e7855b40a77f30e47739b4 | 1,035 | py | Python | aiovalidator/fields/date.py | vir-mir/aiovalidator | e800ac735a5c9c98e4b3469ff9a0f05d0e3b33c7 | [
"Apache-2.0"
] | 7 | 2016-12-06T19:30:11.000Z | 2019-04-11T19:35:11.000Z | aiovalidator/fields/date.py | vir-mir/aiovalidator | e800ac735a5c9c98e4b3469ff9a0f05d0e3b33c7 | [
"Apache-2.0"
] | 219 | 2016-12-06T17:08:09.000Z | 2022-03-28T10:50:18.000Z | aiovalidator/fields/date.py | vir-mir/aiovalidator | e800ac735a5c9c98e4b3469ff9a0f05d0e3b33c7 | [
"Apache-2.0"
] | 2 | 2017-01-02T13:07:42.000Z | 2017-01-23T18:10:05.000Z | import datetime
from .number import IntegerField
from .string import StrField
from ..middlewares import abort
__all__ = ['DateTimeField', 'DateField', 'TimeStampField']
class DateTimeField(StrField):
def __init__(self, format_='%Y-%m-%d %H:%M:%S', **kwargs):
self.format = format_
super().__init_... | 27.972973 | 75 | 0.625121 |
b32adfece7cf62bab92e03317aeb250b8c602953 | 1,332 | py | Python | Clash Royale Helper/Clash Royale Helper/load_train_test_1.py | AmarSaini/Clash-Royale-AI-Card-Tracker | 8cc85f71946921a13e6ffc4e33e155937de32873 | [
"Apache-2.0"
] | 45 | 2018-07-07T17:54:57.000Z | 2021-12-06T14:34:43.000Z | Clash Royale Helper/Clash Royale Helper/load_train_test_1.py | AmarSaini/Clash-Royale-AI-Card-Tracker | 8cc85f71946921a13e6ffc4e33e155937de32873 | [
"Apache-2.0"
] | 7 | 2018-09-04T20:33:59.000Z | 2021-09-16T16:15:47.000Z | Clash Royale Helper/Clash Royale Helper/load_train_test_1.py | AmarSaini/Clash-Royale-AI-Card-Tracker | 8cc85f71946921a13e6ffc4e33e155937de32873 | [
"Apache-2.0"
] | 11 | 2018-07-07T19:34:28.000Z | 2022-02-06T15:26:15.000Z | import numpy as np
# Setting up data
import cv2
from keras.preprocessing.image import img_to_array
from keras.preprocessing.image import array_to_img
from keras.utils import to_categorical
from imutils import paths
def loadTrainingImages1():
x_train = np.zeros((96, 32, 32, 3))
imagePaths = sorted(list(paths.... | 25.615385 | 62 | 0.668168 |
ad72f9aa74521a0c1cac2212947001102a52dbe5 | 911 | py | Python | setup.py | tmxkn1/pythonpancakes | 3812e862a9c9a0f55d571fc6d42a643c53ae774c | [
"MIT"
] | 23 | 2021-05-12T16:22:58.000Z | 2022-03-02T00:16:39.000Z | setup.py | tmxkn1/pythonpancakes | 3812e862a9c9a0f55d571fc6d42a643c53ae774c | [
"MIT"
] | 7 | 2021-05-18T09:25:49.000Z | 2022-02-27T18:21:09.000Z | setup.py | tmxkn1/pythonpancakes | 3812e862a9c9a0f55d571fc6d42a643c53ae774c | [
"MIT"
] | 12 | 2021-05-12T16:23:03.000Z | 2022-02-25T20:55:34.000Z | import pathlib
from setuptools import setup
# The directory containing this file
HERE = pathlib.Path(__file__).parent
# The text of the README file
README = (HERE / "README.md").read_text()
# This call to setup() does all the work
setup(
name="pythonpancakes",
version="1.0.1",
description="A basic reques... | 29.387097 | 66 | 0.688255 |
691b6b61246e6607753f1df65657bfd7ce8e2efa | 13,026 | py | Python | tests/helpers/test_perturb_func.py | sebastian-lapuschkin/Quantus | c3b8a9fb2018f34bd89ba38efa2b2b8c38128b3f | [
"MIT"
] | null | null | null | tests/helpers/test_perturb_func.py | sebastian-lapuschkin/Quantus | c3b8a9fb2018f34bd89ba38efa2b2b8c38128b3f | [
"MIT"
] | null | null | null | tests/helpers/test_perturb_func.py | sebastian-lapuschkin/Quantus | c3b8a9fb2018f34bd89ba38efa2b2b8c38128b3f | [
"MIT"
] | null | null | null | from typing import Union
import numpy as np
import pytest
from pytest_lazyfixture import lazy_fixture
from ..fixtures import *
from ...quantus.helpers import *
from ...quantus.helpers import utils
@pytest.fixture
def input_zeros_1d_1ch():
return np.zeros(shape=(1, 224))
@pytest.fixture
def input_zeros_1d_3ch()... | 25.293204 | 82 | 0.49762 |
9cab26a551ce266411fa21b4d82e8034f32bdc24 | 1,312 | py | Python | app.py | aws-samples/aws-cdk-ecs-windows-fsx | 53ba4abc731f2b0fdfcbe09bafd166c0a54be11d | [
"MIT-0"
] | 4 | 2021-03-05T16:52:15.000Z | 2022-03-20T14:28:54.000Z | app.py | aws-samples/aws-cdk-ecs-windows-fsx | 53ba4abc731f2b0fdfcbe09bafd166c0a54be11d | [
"MIT-0"
] | null | null | null | app.py | aws-samples/aws-cdk-ecs-windows-fsx | 53ba4abc731f2b0fdfcbe09bafd166c0a54be11d | [
"MIT-0"
] | 1 | 2021-03-31T15:00:11.000Z | 2021-03-31T15:00:11.000Z | #!/usr/bin/env python3
import boto3
from aws_cdk import core
from cdk_ecs_windows_fsx.cdk_ecs_windows_fsx_cluster import CdkEcsWindowsFSXCluster
from cdk_ecs_windows_fsx.cdk_ecs_windows_fsx_bastion import CdkEcsWindowsFSXBastion
from cdk_ecs_windows_fsx.cdk_ecs_windows_fsx_website import CdkEcsWindowsFSXWebsite
# Pa... | 28.521739 | 90 | 0.766006 |
b747e9ae4daf0744d1822e552a17e08708422682 | 2,821 | py | Python | tests/system/providers/apache/spark/example_spark_dag.py | holly-evans/airflow | 865406cbab4defd35c95afbf0a8d5987ff7788b1 | [
"Apache-2.0"
] | 3 | 2017-08-06T23:19:48.000Z | 2018-05-11T05:50:25.000Z | tests/system/providers/apache/spark/example_spark_dag.py | holly-evans/airflow | 865406cbab4defd35c95afbf0a8d5987ff7788b1 | [
"Apache-2.0"
] | 20 | 2016-11-21T22:54:28.000Z | 2018-10-28T20:03:13.000Z | tests/system/providers/apache/spark/example_spark_dag.py | holly-evans/airflow | 865406cbab4defd35c95afbf0a8d5987ff7788b1 | [
"Apache-2.0"
] | 3 | 2016-10-13T09:59:18.000Z | 2017-02-22T11:29:09.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... | 34.82716 | 93 | 0.732364 |
8664c41d4461de96537c3e285c71e03551b89051 | 657 | py | Python | oo/visibility_access.py | gabrielcostasilva/python-basic-examples | d9c20887b94b823fc59bc82f250d39d76b918ad8 | [
"MIT"
] | null | null | null | oo/visibility_access.py | gabrielcostasilva/python-basic-examples | d9c20887b94b823fc59bc82f250d39d76b918ad8 | [
"MIT"
] | null | null | null | oo/visibility_access.py | gabrielcostasilva/python-basic-examples | d9c20887b94b823fc59bc82f250d39d76b918ad8 | [
"MIT"
] | null | null | null | from dataclasses import dataclass
class User:
def __init__(self, id, name):
self.__id = id
self.__name = name
def print_data(self):
print(f"{self.__id}, {self.__name}")
@dataclass
class UserDataclass:
__id: int
__name: str
def __str__(self):
return "UserDataclass... | 22.655172 | 82 | 0.633181 |
9cb97930d41710033cf11304387f602028cefae4 | 1,670 | py | Python | bdd/group_steps.py | tankisleva/python_training | be305f745abfc84bc824641e45670c2203bca9d5 | [
"Apache-2.0"
] | null | null | null | bdd/group_steps.py | tankisleva/python_training | be305f745abfc84bc824641e45670c2203bca9d5 | [
"Apache-2.0"
] | null | null | null | bdd/group_steps.py | tankisleva/python_training | be305f745abfc84bc824641e45670c2203bca9d5 | [
"Apache-2.0"
] | null | null | null | from pytest_bdd import given, when, then
from model.group import Group
import random
@given('a group list')
def group_list(db):
return db.get_group_list()
@given('a group with <name>, <header> and <footer>')
def new_group(name, header, footer):
return Group(name=name, header=header, footer=footer)
@given(... | 30.925926 | 113 | 0.736527 |
ff7abc7a6d7a5fbb9e723eb342adc5237a1cdccc | 568 | py | Python | backend/emprestimos/migrations/0006_livros_usuarios.py | alfmorais/pi-univesp | 45a149e9a404f7b0238b84eb335db7111cd15ebb | [
"MIT"
] | 1 | 2021-12-24T20:32:51.000Z | 2021-12-24T20:32:51.000Z | backend/livro/migrations/0006_livros_usuarios.py | alfmorais/pi-univesp | 45a149e9a404f7b0238b84eb335db7111cd15ebb | [
"MIT"
] | null | null | null | backend/livro/migrations/0006_livros_usuarios.py | alfmorais/pi-univesp | 45a149e9a404f7b0238b84eb335db7111cd15ebb | [
"MIT"
] | null | null | null | # Generated by Django 3.2.8 on 2021-11-02 23:01
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('usuarios', '0001_initial'),
('livro', '0005_rename_catagoria_categoria'),
]
operations = [
migratio... | 25.818182 | 119 | 0.637324 |
f6a320e878365bde10c583aa0cae8e09d3f7186c | 2,007 | py | Python | parsing/prepare_global_param.py | GavinPHR/Parser | 3e7dd453d756526105edf8cacd35c72481940c0e | [
"MIT"
] | 1 | 2021-08-04T12:24:46.000Z | 2021-08-04T12:24:46.000Z | parsing/prepare_global_param.py | GavinPHR/Parser | 3e7dd453d756526105edf8cacd35c72481940c0e | [
"MIT"
] | null | null | null | parsing/prepare_global_param.py | GavinPHR/Parser | 3e7dd453d756526105edf8cacd35c72481940c0e | [
"MIT"
] | null | null | null | import config
from numba.core import types
from numba.typed import Dict
import numpy as np
import numba
numba.config.THREADING_LAYER = 'safe'
def to_typed_dict_rule_tensor(untyped_d, dimension, pi=False):
if dimension == 1:
t = types.float64[:]
elif dimension == 2:
t = types.float64[:, :]
... | 35.839286 | 75 | 0.709018 |
976d8749f098f1bf1db3e2cc9a5d5bdf96f8db83 | 1,692 | py | Python | practice_python/13_fibonacci.py | facmartoni/python_exercises | 7f05c7491a0eee05e32f04c7f07ddc1ba688b7a2 | [
"Apache-2.0"
] | null | null | null | practice_python/13_fibonacci.py | facmartoni/python_exercises | 7f05c7491a0eee05e32f04c7f07ddc1ba688b7a2 | [
"Apache-2.0"
] | null | null | null | practice_python/13_fibonacci.py | facmartoni/python_exercises | 7f05c7491a0eee05e32f04c7f07ddc1ba688b7a2 | [
"Apache-2.0"
] | 1 | 2021-10-11T00:25:14.000Z | 2021-10-11T00:25:14.000Z | # Write a program that asks the user how many Fibonnaci numbers to generate and then generates them.
# Take this opportunity to think about how you can use functions.
# Make sure to ask the user to enter the number of numbers in the sequence to generate.
# (Hint: The Fibonnaci seqence is a sequence of numbers where the... | 36 | 149 | 0.716903 |
aa209f3b7b1ee4a5ab161de4f795c9024895a8bf | 3,324 | py | Python | pyqt-samples/video capture.py | jpmaldonado/opencv-np-workshop | be28cf3c2d39659cd7c2ac7cb73ab2a55da46088 | [
"MIT"
] | 1 | 2019-02-28T07:18:35.000Z | 2019-02-28T07:18:35.000Z | pyqt-samples/video capture.py | jpmaldonado/opencv-np-workshop | be28cf3c2d39659cd7c2ac7cb73ab2a55da46088 | [
"MIT"
] | null | null | null | pyqt-samples/video capture.py | jpmaldonado/opencv-np-workshop | be28cf3c2d39659cd7c2ac7cb73ab2a55da46088 | [
"MIT"
] | null | null | null | # Code from: https://www.kurokesu.com/main/2016/08/01/opencv-usb-camera-widget-in-pyqt/
# How to use pyqt designer: http://pyqt.sourceforge.net/Docs/PyQt5/designer.html
from PyQt5 import QtCore, QtGui, QtWidgets, uic
import sys
import cv2
import numpy as np
import threading
import time
import queue
form_class = uic.... | 30.218182 | 92 | 0.619134 |
f0b5ce4915396f3a98f51a396ea0a9cc7cb15cb6 | 4,410 | py | Python | django_cas_ng/utils.py | modernNeo/django-cas-ng | 132b2da79f84c1859f168f9dcbbe73cbe0b31be6 | [
"MIT"
] | 120 | 2020-01-23T20:01:59.000Z | 2022-03-25T18:23:44.000Z | django_cas_ng/utils.py | modernNeo/django-cas-ng | 132b2da79f84c1859f168f9dcbbe73cbe0b31be6 | [
"MIT"
] | 69 | 2020-01-22T04:21:36.000Z | 2022-03-24T09:30:54.000Z | django_cas_ng/utils.py | modernNeo/django-cas-ng | 132b2da79f84c1859f168f9dcbbe73cbe0b31be6 | [
"MIT"
] | 38 | 2020-01-24T07:05:42.000Z | 2022-03-18T19:56:07.000Z | import warnings
from typing import Optional, Union
from urllib import parse as urllib_parse
from cas import CASClient
from django.conf import settings as django_settings
from django.contrib.auth import (
BACKEND_SESSION_KEY,
REDIRECT_FIELD_NAME,
SESSION_KEY,
load_backend,
)
from django.contrib.auth.mod... | 34.724409 | 95 | 0.685941 |
510f246420f0a30613b7a4bd11bfcd37913896b6 | 8,009 | py | Python | pandarallel/_pandarallel.py | AlexandreGazagnes/pandarallel | 6091b631873f9bb9e567c626968265930eff1db5 | [
"BSD-3-Clause"
] | null | null | null | pandarallel/_pandarallel.py | AlexandreGazagnes/pandarallel | 6091b631873f9bb9e567c626968265930eff1db5 | [
"BSD-3-Clause"
] | null | null | null | pandarallel/_pandarallel.py | AlexandreGazagnes/pandarallel | 6091b631873f9bb9e567c626968265930eff1db5 | [
"BSD-3-Clause"
] | null | null | null | import pandas as _pd
import pyarrow.plasma as _plasma
from pyarrow.lib import PlasmaStoreFull as _PlasmaStoreFull
import multiprocessing as _multiprocessing
import itertools as _itertools
from concurrent.futures import ProcessPoolExecutor as _ProcessPoolExecutor
from tqdm._tqdm_notebook import tqdm_notebook
SHM_SIZE_M... | 34.226496 | 89 | 0.56886 |
52153f347eb3dda7c8d3e27d7c32687d25cf174a | 6,669 | py | Python | examples/leaf_shakespeare_pytorch/fl_utils/model_utils.py | yinfredyue/flower | d68976e8983e90868e7fa2e53e7e502349f13087 | [
"Apache-2.0"
] | null | null | null | examples/leaf_shakespeare_pytorch/fl_utils/model_utils.py | yinfredyue/flower | d68976e8983e90868e7fa2e53e7e502349f13087 | [
"Apache-2.0"
] | null | null | null | examples/leaf_shakespeare_pytorch/fl_utils/model_utils.py | yinfredyue/flower | d68976e8983e90868e7fa2e53e7e502349f13087 | [
"Apache-2.0"
] | null | null | null | import json
import os
import numpy as np
from .language_utils import word_to_indices, letter_to_vec,\
bag_of_words, get_word_emb_arr, val_to_vec, split_line, \
letter_to_idx
# TODO: capitalize global vars names and initialize to None
VOCAB_DIR = 0
emb_array = 0
vocab = 0
embed_dim = 0
def batch_data(... | 32.852217 | 147 | 0.630229 |
970f00aa3e45992b4667814e5b3b6a79b7e76b70 | 7,698 | py | Python | chromium/tools/android/loading/loading_model_unittest.py | wedataintelligence/vivaldi-source | 22a46f2c969f6a0b7ca239a05575d1ea2738768c | [
"BSD-3-Clause"
] | 27 | 2016-04-27T01:02:03.000Z | 2021-12-13T08:53:19.000Z | chromium/tools/android/loading/loading_model_unittest.py | wedataintelligence/vivaldi-source | 22a46f2c969f6a0b7ca239a05575d1ea2738768c | [
"BSD-3-Clause"
] | 2 | 2017-03-09T09:00:50.000Z | 2017-09-21T15:48:20.000Z | chromium/tools/android/loading/loading_model_unittest.py | wedataintelligence/vivaldi-source | 22a46f2c969f6a0b7ca239a05575d1ea2738768c | [
"BSD-3-Clause"
] | 17 | 2016-04-27T02:06:39.000Z | 2019-12-18T08:07:00.000Z | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import sys
import unittest
import dag
import loading_model
import log_parser
class LoadingModelTestCase(unittest.TestCase):
def MakeParserRequ... | 49.664516 | 79 | 0.658613 |
91a4707acbb8901ad19d0dcda97f4dcbc46cf211 | 700 | py | Python | zenora/base/mapper.py | StarrMan303/zenora | c003775caabb209137bd2fda497031c34c94b47e | [
"MIT"
] | 1 | 2021-09-24T22:48:33.000Z | 2021-09-24T22:48:33.000Z | zenora/base/mapper.py | StarrMan303/zenora | c003775caabb209137bd2fda497031c34c94b47e | [
"MIT"
] | null | null | null | zenora/base/mapper.py | StarrMan303/zenora | c003775caabb209137bd2fda497031c34c94b47e | [
"MIT"
] | null | null | null | import abc
import typing
from zenora.channels import GuildTextChannel
class ChannelMapper(abc.ABC):
@abc.abstractmethod
def map(self, response) -> typing.Any:
"""Interface of channel mapper
Maps channel response to object according to channel type.
Parameters
----------
... | 24.137931 | 66 | 0.612857 |
91a73754770a3527b3f1eedad5f1c7a11dcfaadc | 4,565 | py | Python | helper_scripts/analyze.py | CarstenWalther/pricewars | dd847b933c3fb3b832cf49717fef7f7f4abfbf52 | [
"MIT"
] | null | null | null | helper_scripts/analyze.py | CarstenWalther/pricewars | dd847b933c3fb3b832cf49717fef7f7f4abfbf52 | [
"MIT"
] | null | null | null | helper_scripts/analyze.py | CarstenWalther/pricewars | dd847b933c3fb3b832cf49717fef7f7f4abfbf52 | [
"MIT"
] | null | null | null | """
Analyzes the dump of kafka data, that was created by benchmark.py.
Results (e.g. a merchant's profit and revenue) are saved to a CSV file.
"""
import argparse
import csv
import datetime
import os
import json
from collections import defaultdict
import matplotlib
matplotlib.use('Agg') # required for headless plotti... | 41.5 | 119 | 0.693538 |
9b49f56005da850a915917740e047ef79209f4bf | 3,611 | py | Python | datapackage_pipelines/lib/load_resource.py | loleg/datapackage-pipelines | 53d29c20c5968d11e9c5bb7bb53f185b66cf8af7 | [
"MIT"
] | null | null | null | datapackage_pipelines/lib/load_resource.py | loleg/datapackage-pipelines | 53d29c20c5968d11e9c5bb7bb53f185b66cf8af7 | [
"MIT"
] | null | null | null | datapackage_pipelines/lib/load_resource.py | loleg/datapackage-pipelines | 53d29c20c5968d11e9c5bb7bb53f185b66cf8af7 | [
"MIT"
] | null | null | null | import itertools
import copy
import logging
import datapackage
from datapackage_pipelines.wrapper import ingest, spew, get_dependency_datapackage_url
from datapackage_pipelines.utilities.resource_matcher import ResourceMatcher
from datapackage_pipelines.utilities.resources import tabular, PROP_STREAMING, \
PROP_S... | 39.681319 | 107 | 0.590418 |
321ca7896d537e3af82513c1ea354375358ce6c8 | 1,066 | py | Python | cryptopals/set5/challenge33.py | svkirillov/cryptopals-python3 | 199eaa0ae0345672703430904965a0a55b00e6e1 | [
"MIT"
] | null | null | null | cryptopals/set5/challenge33.py | svkirillov/cryptopals-python3 | 199eaa0ae0345672703430904965a0a55b00e6e1 | [
"MIT"
] | null | null | null | cryptopals/set5/challenge33.py | svkirillov/cryptopals-python3 | 199eaa0ae0345672703430904965a0a55b00e6e1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from functions.dh import DHClient
def challenge33() -> bool:
p = int.from_bytes(
bytes.fromhex(
"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024"
"e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd"
"3a431b302b0a6df25f14374fe1356d6d51c24... | 26 | 72 | 0.685741 |
d036f582cb1abd4eb43818ad4fc5bdccec740a1e | 1,122 | py | Python | graphene_django_cud/mutations/patch.py | goderecho/graphene-django-cud | 690dcbd989d857575b77961d5dc749b1ed4aca82 | [
"MIT"
] | null | null | null | graphene_django_cud/mutations/patch.py | goderecho/graphene-django-cud | 690dcbd989d857575b77961d5dc749b1ed4aca82 | [
"MIT"
] | null | null | null | graphene_django_cud/mutations/patch.py | goderecho/graphene-django-cud | 690dcbd989d857575b77961d5dc749b1ed4aca82 | [
"MIT"
] | null | null | null |
from graphene_django.utils import get_model_fields
from .update import DjangoUpdateMutation
from .core import DjangoCudBaseOptions
class DjangoPatchMutationOptions(DjangoCudBaseOptions):
pass
class DjangoPatchMutation(DjangoUpdateMutation):
class Meta:
abstract = True
@classmethod
def __i... | 25.5 | 80 | 0.66221 |
27715f254c2649d524edc083367f96c7f4ea162e | 22,275 | py | Python | xarray/core/duck_array_ops.py | aijams/xarray | 4434f034a36886609ac0492d3307954163ecbea6 | [
"CC-BY-4.0",
"PSF-2.0",
"BSD-2-Clause",
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2020-08-05T09:59:37.000Z | 2020-08-05T09:59:37.000Z | xarray/core/duck_array_ops.py | bopen/xarray | 4e61a26fca46635a5f6c1eba60950fc33d88459a | [
"CC-BY-4.0",
"PSF-2.0",
"BSD-2-Clause",
"Apache-2.0",
"BSD-3-Clause"
] | 15 | 2020-07-15T14:20:59.000Z | 2022-02-14T04:05:13.000Z | xarray/core/duck_array_ops.py | aijams/xarray | 4434f034a36886609ac0492d3307954163ecbea6 | [
"CC-BY-4.0",
"PSF-2.0",
"BSD-2-Clause",
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2022-03-23T16:42:50.000Z | 2022-03-23T16:42:50.000Z | """Compatibility module defining operations on duck numpy-arrays.
Currently, this means Dask or NumPy arrays. None of these functions should
accept or return xarray objects.
"""
import contextlib
import datetime
import inspect
import warnings
from functools import partial
import numpy as np
import pandas as pd
from ... | 33.75 | 129 | 0.664691 |
d337d062fb895f44aab3e712a6174a9854939590 | 4,164 | py | Python | project/people/migrations/0001_initial.py | mrclro/kbxrec | 49728303387d0ce25588461c3148d9c36af56101 | [
"MIT"
] | null | null | null | project/people/migrations/0001_initial.py | mrclro/kbxrec | 49728303387d0ce25588461c3148d9c36af56101 | [
"MIT"
] | null | null | null | project/people/migrations/0001_initial.py | mrclro/kbxrec | 49728303387d0ce25588461c3148d9c36af56101 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-22 19:46
from __future__ import unicode_literals
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('events', '0... | 46.786517 | 168 | 0.566763 |
3b0f095d114a95696d6bbf2eadf5d7a67b73bd49 | 120,588 | py | Python | tensorflow/python/ops/image_ops_impl.py | VikramTiwari/tensorflow | 99e1f661ca724edf7fd679c1a1418535c4e80512 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/ops/image_ops_impl.py | VikramTiwari/tensorflow | 99e1f661ca724edf7fd679c1a1418535c4e80512 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/ops/image_ops_impl.py | VikramTiwari/tensorflow | 99e1f661ca724edf7fd679c1a1418535c4e80512 | [
"Apache-2.0"
] | 1 | 2020-06-17T05:39:40.000Z | 2020-06-17T05:39:40.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 39.151948 | 80 | 0.685425 |
24ec897a0dcb659db94f7332154ae18257b50da6 | 2,280 | py | Python | app/validation/type_validator_factory.py | qateam123/eq | 704757952323647d659c49a71975c56406ff4047 | [
"MIT"
] | null | null | null | app/validation/type_validator_factory.py | qateam123/eq | 704757952323647d659c49a71975c56406ff4047 | [
"MIT"
] | 8 | 2020-03-24T15:24:18.000Z | 2022-03-02T04:32:56.000Z | app/validation/type_validator_factory.py | qateam123/eq | 704757952323647d659c49a71975c56406ff4047 | [
"MIT"
] | null | null | null | from app.schema.answer import Answer
from app.schema.question import Question
from app.validation.date_range_check import DateRangeCheck
from app.validation.date_type_check import DateTypeCheck
from app.validation.integer_type_check import IntegerTypeCheck
from app.validation.percentage_type_check import PercentageType... | 33.529412 | 79 | 0.599561 |
2035f3946ff60ab9a94b5e6f3866065ab0b6b974 | 22,267 | py | Python | lexpar/LuaScriptEventParser.py | lumbermixalot/ScriptEvent_Transpiler | e84b4ef70bab584fba7dbfd62d260519984966b0 | [
"MIT"
] | 3 | 2020-07-13T16:34:13.000Z | 2020-12-15T03:31:11.000Z | lexpar/LuaScriptEventParser.py | lumbermixalot/ScriptEvent_Transpiler | e84b4ef70bab584fba7dbfd62d260519984966b0 | [
"MIT"
] | null | null | null | lexpar/LuaScriptEventParser.py | lumbermixalot/ScriptEvent_Transpiler | e84b4ef70bab584fba7dbfd62d260519984966b0 | [
"MIT"
] | null | null | null | # Generated from LuaScriptEvent.g4 by ANTLR 4.8
# encoding: utf-8
from antlr4 import *
from io import StringIO
import sys
if sys.version_info[1] > 5:
from typing import TextIO
else:
from typing.io import TextIO
def serializedATN():
with StringIO() as buf:
buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be... | 32.697504 | 103 | 0.588943 |
08b68d5a9f740fde17ddfb870a449cd15ff2de4e | 1,940 | py | Python | get_alpha.py | arymandeshwal/Learn-Sign-Language | 97728203ba2b654782b47001b4fb28b9bb14ce67 | [
"MIT"
] | 1 | 2021-06-14T11:57:27.000Z | 2021-06-14T11:57:27.000Z | get_alpha.py | arymandeshwal/Learn-Sign-Language | 97728203ba2b654782b47001b4fb28b9bb14ce67 | [
"MIT"
] | 1 | 2021-06-16T13:41:43.000Z | 2021-06-16T13:41:43.000Z | get_alpha.py | arymandeshwal/Learn-Sign-Language | 97728203ba2b654782b47001b4fb28b9bb14ce67 | [
"MIT"
] | 1 | 2021-06-17T11:08:35.000Z | 2021-06-17T11:08:35.000Z |
def get_current_alpha(index):
alpha = [['A', (739, 304),(628, 380),(591, 390),(544, 388),(493, 391)],
['B', (584, 396), (675, 297), (616, 287), (566, 306), (510, 347)],
['C', (722, 361), (680, 309), (643, 318), (609, 331), (545, 331)],
['D', (557, 393), (562, 263), (524, 381), (482, 399), (445, 40... | 57.058824 | 75 | 0.439691 |
f2aac7452fccb5d2581042c788a0ab5db8aacd5d | 19,211 | py | Python | tests/test_level1.py | lweydemann/ascat | 9c986ba40694a13356c44f403c66d73ccaab83bf | [
"MIT"
] | null | null | null | tests/test_level1.py | lweydemann/ascat | 9c986ba40694a13356c44f403c66d73ccaab83bf | [
"MIT"
] | null | null | null | tests/test_level1.py | lweydemann/ascat | 9c986ba40694a13356c44f403c66d73ccaab83bf | [
"MIT"
] | null | null | null | # Copyright (c) 2020, TU Wien, Department of Geodesy and Geoinformation
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright notice,... | 44.264977 | 133 | 0.60304 |
b6727caeb2b664892ba8be942d768a5f8dba0f1b | 3,315 | py | Python | 00_rename_GUI_interface_only.py | Joshu4l/renameGUI | 0f55f1dfbb24415db1404945931c47518d41b88a | [
"MIT"
] | null | null | null | 00_rename_GUI_interface_only.py | Joshu4l/renameGUI | 0f55f1dfbb24415db1404945931c47518d41b88a | [
"MIT"
] | null | null | null | 00_rename_GUI_interface_only.py | Joshu4l/renameGUI | 0f55f1dfbb24415db1404945931c47518d41b88a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Jul 28 15:56:22 2021
@author: joshua.albert
"""
import tkinter
window = tkinter.Tk()
# Set the GUI window's size
window.geometry("1380x450")
# Give the window a title
window.title("rename your pictures :)")
# Create
tkinter.Label(window, text = """
... | 35.265957 | 201 | 0.668175 |
c195807f8c2bdfcde91dda715afefdd3b084d46d | 402 | py | Python | async_search_client/models/client.py | qw-in/async-search-client | 457596b2f44f0ef9dda3c15d8d67587c1981ebd9 | [
"MIT"
] | null | null | null | async_search_client/models/client.py | qw-in/async-search-client | 457596b2f44f0ef9dda3c15d8d67587c1981ebd9 | [
"MIT"
] | null | null | null | async_search_client/models/client.py | qw-in/async-search-client | 457596b2f44f0ef9dda3c15d8d67587c1981ebd9 | [
"MIT"
] | null | null | null | from datetime import datetime
from typing import Dict, Optional
from camel_converter.pydantic_base import CamelBase
from async_search_client.models.index import IndexStats
class ClientStats(CamelBase):
database_size: int
last_update: Optional[datetime] = None
indexes: Optional[Dict[str, IndexStats]] = N... | 22.333333 | 55 | 0.776119 |
f1de94762b417b6c1a2b59263c5281494b0dc881 | 1,915 | py | Python | TimeSeriesTools/tests/test_feature_extraction.py | Psicowired87/TimeSeriesTools | de42dbcc5371ee576df6c9521b1c79a47c147dd1 | [
"MIT"
] | 1 | 2015-05-01T14:14:02.000Z | 2015-05-01T14:14:02.000Z | TimeSeriesTools/tests/test_feature_extraction.py | Psicowired87/TimeSeriesTools | de42dbcc5371ee576df6c9521b1c79a47c147dd1 | [
"MIT"
] | null | null | null | TimeSeriesTools/tests/test_feature_extraction.py | Psicowired87/TimeSeriesTools | de42dbcc5371ee576df6c9521b1c79a47c147dd1 | [
"MIT"
] | 1 | 2015-05-01T14:15:03.000Z | 2015-05-01T14:15:03.000Z |
"""
Test_feature_extraction
-----------------------
"""
import numpy as np
from ..Feature_extraction.feature_transformation import feature_transformation
from ..Feature_extraction.feature_extraction import feature_extraction
from ..Feature_extraction.feature_representation import haar_wavelet_transf,\
daubechies... | 34.196429 | 79 | 0.686162 |
15d55190ae289a10a0a9032aeaecc22eaab2997b | 5,803 | py | Python | MetaScreener/external_sw/mgltools/MGLToolsPckgs/AutoDockTools/Utilities24/compute_interatomic_distance_per_pose.py | bio-hpc/metascreener | 6900497629f601c4b6c0c37da26de58ffa221988 | [
"Apache-2.0"
] | 8 | 2021-12-14T21:30:01.000Z | 2022-02-14T11:30:03.000Z | MetaScreener/external_sw/mgltools/MGLToolsPckgs/AutoDockTools/Utilities24/compute_interatomic_distance_per_pose.py | bio-hpc/metascreener | 6900497629f601c4b6c0c37da26de58ffa221988 | [
"Apache-2.0"
] | null | null | null | MetaScreener/external_sw/mgltools/MGLToolsPckgs/AutoDockTools/Utilities24/compute_interatomic_distance_per_pose.py | bio-hpc/metascreener | 6900497629f601c4b6c0c37da26de58ffa221988 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
#
#
# $Header: /opt/cvs/python/packages/share1.5/AutoDockTools/Utilities24/compute_interatomic_distance_per_pose.py,v 1.4 2013/11/08 17:29:16 rhuey Exp $
#
import os, glob
import numpy.oldnumeric as Numeric
from math import sqrt
from MolKit import Read
from MolKit.molecule import MoleculeSet
f... | 35.169697 | 200 | 0.619335 |
8a5e57588454c31109ea4406e3e0c4952b771644 | 9,215 | py | Python | notebooks/dot_stratifold_reproduce.py | peekxc/tallem | 949af20c1f50f9b6784ee32463e59123cd64294b | [
"Apache-2.0"
] | null | null | null | notebooks/dot_stratifold_reproduce.py | peekxc/tallem | 949af20c1f50f9b6784ee32463e59123cd64294b | [
"Apache-2.0"
] | null | null | null | notebooks/dot_stratifold_reproduce.py | peekxc/tallem | 949af20c1f50f9b6784ee32463e59123cd64294b | [
"Apache-2.0"
] | 1 | 2021-07-25T04:58:58.000Z | 2021-07-25T04:58:58.000Z | from matplotlib import gridspec
import numpy as np
from tallem import TALLEM
from tallem.datasets import *
from tallem.samplers import landmarks
from tallem.cover import T, LandmarkCover
from tallem.alignment import procrustes
from itertools import product
# %% (1) Generate large data set
samples, params, blob, norm_... | 37.766393 | 109 | 0.681823 |
14bc3daa63d764ca63f15decb472bca7b6d5fe8b | 28,305 | py | Python | mmd_scripting/scripts_for_gui/make_ik_from_vmd.py | Nuthouse01/VMD-to-text-Conversion-Tool | 0d9334bd5735accdd8bb6e1b69889fbe054a7481 | [
"MIT"
] | 4 | 2020-03-02T00:27:24.000Z | 2020-05-29T15:23:50.000Z | mmd_scripting/scripts_for_gui/make_ik_from_vmd.py | Nuthouse01/VMD-to-text-Conversion-Tool | 0d9334bd5735accdd8bb6e1b69889fbe054a7481 | [
"MIT"
] | null | null | null | mmd_scripting/scripts_for_gui/make_ik_from_vmd.py | Nuthouse01/VMD-to-text-Conversion-Tool | 0d9334bd5735accdd8bb6e1b69889fbe054a7481 | [
"MIT"
] | null | null | null | from typing import List, Dict
import mmd_scripting.core.nuthouse01_core as core
import mmd_scripting.core.nuthouse01_pmx_parser as pmxlib
import mmd_scripting.core.nuthouse01_pmx_struct as pmxstruct
import mmd_scripting.core.nuthouse01_vmd_parser as vmdlib
import mmd_scripting.core.nuthouse01_vmd_struct as vmdstruct
f... | 50.008834 | 334 | 0.732874 |
0cb9bd688ce0de33d7a3394abe6f0e5012a88c48 | 7,618 | py | Python | tessia/server/state_machines/autoinstall/sm_autoyast.py | tessia-project/tessia | b9ded8dc7f0b9a7a0ea00d95b5ccc4af4d2e7540 | [
"Apache-2.0"
] | 5 | 2020-06-04T10:20:33.000Z | 2020-10-26T15:09:19.000Z | tessia/server/state_machines/autoinstall/sm_autoyast.py | tessia-project/tessia | b9ded8dc7f0b9a7a0ea00d95b5ccc4af4d2e7540 | [
"Apache-2.0"
] | null | null | null | tessia/server/state_machines/autoinstall/sm_autoyast.py | tessia-project/tessia | b9ded8dc7f0b9a7a0ea00d95b5ccc4af4d2e7540 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016, 2017 IBM Corp.
#
# 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 writin... | 33.707965 | 79 | 0.606983 |
1cb566f8ba373097bce9f0de31a4f82a301224e0 | 1,154 | py | Python | var/spack/repos/builtin/packages/dssp/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/dssp/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 14 | 2021-07-20T01:04:53.000Z | 2022-03-02T01:08:36.000Z | var/spack/repos/builtin/packages/dssp/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1 | 2021-05-06T00:17:46.000Z | 2021-05-06T00:17:46.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 Dssp(AutotoolsPackage):
"""'mkdssp' utility. (dictionary of protein secondary structure)""... | 34.969697 | 95 | 0.666378 |
76522559ae512bd03d132553e02fdd2c1148c405 | 4,997 | py | Python | tests/test_cli.py | cogeotiff/rio-chop | d527c118aba36511a4c1d98375b2d20df1f45c78 | [
"BSD-3-Clause"
] | null | null | null | tests/test_cli.py | cogeotiff/rio-chop | d527c118aba36511a4c1d98375b2d20df1f45c78 | [
"BSD-3-Clause"
] | 1 | 2021-11-27T08:24:45.000Z | 2021-11-27T08:24:45.000Z | tests/test_cli.py | cogeotiff/rio-chop | d527c118aba36511a4c1d98375b2d20df1f45c78 | [
"BSD-3-Clause"
] | null | null | null | """tests rio_chop.cli."""
import os
import rasterio
from rio_cogeo import cog_validate, utils
from rio_chop.scripts.cli import chop
PREFIX = os.path.join(os.path.dirname(__file__), "fixtures")
def test_rio_chop_cli(runner):
"""Should work as expected."""
with runner.isolated_filesystem():
src_path... | 30.284848 | 87 | 0.507905 |
5f7a0bd6290f11462fab06c3e90ed2c6dca44080 | 8,888 | py | Python | AppServer/lib/django-1.4/tests/regressiontests/views/views.py | loftwah/appscale | 586fc1347ebc743d7a632de698f4dbfb09ae38d6 | [
"Apache-2.0"
] | 790 | 2015-01-03T02:13:39.000Z | 2020-05-10T19:53:57.000Z | AppServer/lib/django-1.4/tests/regressiontests/views/views.py | nlake44/appscale | 6944af660ca4cb772c9b6c2332ab28e5ef4d849f | [
"Apache-2.0"
] | 1,361 | 2015-01-08T23:09:40.000Z | 2020-04-14T00:03:04.000Z | AppServer/lib/django-1.4/tests/regressiontests/views/views.py | nlake44/appscale | 6944af660ca4cb772c9b6c2332ab28e5ef4d849f | [
"Apache-2.0"
] | 155 | 2015-01-08T22:59:31.000Z | 2020-04-08T08:01:53.000Z | from __future__ import absolute_import
import sys
from django import forms
from django.core.exceptions import PermissionDenied
from django.core.urlresolvers import get_resolver
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render_to_response, render
from django.template impor... | 35.269841 | 95 | 0.655716 |
906ae6a05d15b3ef580885f51aed986b5a5bdc26 | 4,530 | py | Python | tests/api/test_modules.py | ljakab/spectrometer | 92bfcb4987cb362e6686d3694b9cdd2d624368f3 | [
"Apache-2.0"
] | null | null | null | tests/api/test_modules.py | ljakab/spectrometer | 92bfcb4987cb362e6686d3694b9cdd2d624368f3 | [
"Apache-2.0"
] | null | null | null | tests/api/test_modules.py | ljakab/spectrometer | 92bfcb4987cb362e6686d3694b9cdd2d624368f3 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2013 Mirantis Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 47.684211 | 78 | 0.484547 |
92183cc498abe5f24a970ac4f9bf9d83d8103cd5 | 1,764 | py | Python | python/phonenumbers/data/region_DK.py | vemel/python-phonenumbers | 595c322bf12106a3b95e3f202e948a7c6b6c15b8 | [
"Apache-2.0"
] | 1 | 2021-02-16T10:02:00.000Z | 2021-02-16T10:02:00.000Z | python/phonenumbers/data/region_DK.py | vemel/python-phonenumbers | 595c322bf12106a3b95e3f202e948a7c6b6c15b8 | [
"Apache-2.0"
] | null | null | null | python/phonenumbers/data/region_DK.py | vemel/python-phonenumbers | 595c322bf12106a3b95e3f202e948a7c6b6c15b8 | [
"Apache-2.0"
] | null | null | null | """Auto-generated file, do not edit by hand. DK metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_DK = PhoneMetadata(id='DK', country_code=45, international_prefix='00',
general_desc=PhoneNumberDesc(national_number_pattern='[2-9]\\d{7}', possible_number_pattern='\\... | 92.842105 | 155 | 0.757937 |
8f01f12536dadfaaf033274c45655ea247b2eadf | 4,999 | py | Python | lib/display.py | janesmithgirl/Instagram--1 | 4391d19b6601833a0b24d5b45bb2c8c0cea64c8d | [
"MIT"
] | null | null | null | lib/display.py | janesmithgirl/Instagram--1 | 4391d19b6601833a0b24d5b45bb2c8c0cea64c8d | [
"MIT"
] | null | null | null | lib/display.py | janesmithgirl/Instagram--1 | 4391d19b6601833a0b24d5b45bb2c8c0cea64c8d | [
"MIT"
] | null | null | null | # 12/29/2018
# Author: Mohamed
# Description: Display
from os import system
from time import sleep
from .const import debug
from colorama import Fore
from builtins import input
from platform import system as platform
class Display(object):
__is_color = None
total_lines = None
account_exists = None
... | 31.049689 | 122 | 0.522304 |
6bd281213e9b238dc631925d84b0f1614ce3f387 | 1,211 | py | Python | spotify_dl/cache.py | kaiulr/spotify1-dl | 3d2e3c33f2c697c4a936f8c0a89a04564bca0c74 | [
"MIT"
] | 1 | 2021-03-30T06:29:18.000Z | 2021-03-30T06:29:18.000Z | spotify_dl/cache.py | tonyd33/spotify-dl | f453ad8e9ab3de45064045bfb8e7ae46434e31eb | [
"MIT"
] | null | null | null | spotify_dl/cache.py | tonyd33/spotify-dl | f453ad8e9ab3de45064045bfb8e7ae46434e31eb | [
"MIT"
] | null | null | null | from spotify_dl.models import Song
from peewee import DoesNotExist
from spotify_dl.scaffold import log
def check_if_in_cache(search_term):
"""
Checks if the specified search term is in the local database cache.
and returns the video id if it exists.
:param search_term: String to be searched f... | 37.84375 | 91 | 0.692816 |
37bb93f2108d56dc71e12ebec4ee11aee44c9e59 | 4,017 | py | Python | tests/systemtest.py | stg93/blaulichtsms_einsatzmonitor | db595f535ece0f944ec70a9eac70af7b667f63ef | [
"MIT"
] | 18 | 2017-07-24T18:08:04.000Z | 2021-05-06T06:50:22.000Z | tests/systemtest.py | stg93/blaulichtsms_einsatzmonitor | db595f535ece0f944ec70a9eac70af7b667f63ef | [
"MIT"
] | 19 | 2018-09-25T20:42:17.000Z | 2021-11-23T21:26:18.000Z | tests/systemtest.py | stg93/blaulichtsms_einsatzmonitor | db595f535ece0f944ec70a9eac70af7b667f63ef | [
"MIT"
] | 11 | 2018-05-05T04:49:41.000Z | 2022-02-18T17:33:13.000Z | import configparser
from multiprocessing import Process
from blaulichtsmscontroller import BlaulichtSmsController
from chromiumbrowsercontroller import ChromiumBrowserController
from main import get_logging_config, set_up_logging, get_cec_controller
from tests import dashboardapimock
from tests.alarmmonitortest import... | 42.284211 | 114 | 0.718198 |
e341b783ce3986e47dad8d18d03249e138247077 | 5,864 | py | Python | test/webapi/controllers/test_tiles.py | tiagoams/xcube | 3e49f3f9e376937ebddeeb1bc01240627cfd4543 | [
"MIT"
] | null | null | null | test/webapi/controllers/test_tiles.py | tiagoams/xcube | 3e49f3f9e376937ebddeeb1bc01240627cfd4543 | [
"MIT"
] | null | null | null | test/webapi/controllers/test_tiles.py | tiagoams/xcube | 3e49f3f9e376937ebddeeb1bc01240627cfd4543 | [
"MIT"
] | null | null | null | import unittest
from xcube.webapi.context import ServiceContext
from xcube.webapi.controllers.tiles import get_dataset_tile, get_ne2_tile, get_dataset_tile_grid, get_ne2_tile_grid, \
get_legend
from xcube.webapi.errors import ServiceBadRequestError, ServiceResourceNotFoundError
from ..helpers import new_test_servi... | 46.539683 | 120 | 0.594134 |
b21e177f9beb846559f0d8d9e7b77d8d4b5a582b | 2,152 | py | Python | wxbot/wxconf.py | tamuliyuanhong/wxBot | 3bca859fcdadcacd79965d6d9bc4ba9631bcb4a6 | [
"MIT"
] | null | null | null | wxbot/wxconf.py | tamuliyuanhong/wxBot | 3bca859fcdadcacd79965d6d9bc4ba9631bcb4a6 | [
"MIT"
] | null | null | null | wxbot/wxconf.py | tamuliyuanhong/wxBot | 3bca859fcdadcacd79965d6d9bc4ba9631bcb4a6 | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
import os
import sys
import configparser
class WXConf:
def __init__(self):
self.cf = configparser.ConfigParser()
self.cf.read(os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))+"\wxbot\wx.conf")
# 基本配置
self.baseconf = {
# 调试模式
... | 27.948052 | 119 | 0.4921 |
51bb94eae208034c3c8084f438e16696c4f0bed7 | 37,292 | py | Python | tests/integration/test_events.py | andrei-gypaetus/localstack | 67746d56bfed6927379033ec1d7aa015c3aa4e2e | [
"Apache-2.0"
] | 3 | 2021-07-19T08:12:14.000Z | 2021-12-16T19:08:22.000Z | tests/integration/test_events.py | andrei-gypaetus/localstack | 67746d56bfed6927379033ec1d7aa015c3aa4e2e | [
"Apache-2.0"
] | null | null | null | tests/integration/test_events.py | andrei-gypaetus/localstack | 67746d56bfed6927379033ec1d7aa015c3aa4e2e | [
"Apache-2.0"
] | 1 | 2021-06-15T08:24:46.000Z | 2021-06-15T08:24:46.000Z | # -*- coding: utf-8 -*-
import os
import json
import uuid
import unittest
from datetime import datetime
from localstack import config
from localstack.utils import testutil
from localstack.utils.aws import aws_stack
from localstack.utils.common import (
load_file, retry, short_uid, get_free_tcp_port, wait_for_port_o... | 38.209016 | 120 | 0.588598 |
bdc9172a15af34a45b63c67d3a3efb85f436a946 | 11,812 | py | Python | tests/test_cookies.py | tzuryby/requests | 7125fe5554332b636ce42dcbe8224d0918381917 | [
"0BSD"
] | 1 | 2015-11-05T12:29:33.000Z | 2015-11-05T12:29:33.000Z | tests/test_cookies.py | tzuryby/requests | 7125fe5554332b636ce42dcbe8224d0918381917 | [
"0BSD"
] | null | null | null | tests/test_cookies.py | tzuryby/requests | 7125fe5554332b636ce42dcbe8224d0918381917 | [
"0BSD"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import json
import os
import tempfile
import unittest
# Path hack.
sys.path.insert(0, os.path.abspath('..'))
import requests
from requests.compat import cookielib
# More hacks
sys.path.append('.')
from test_requests import httpbin, TestBaseMixin
class CookieT... | 45.083969 | 116 | 0.651456 |
50cbb6cea734382b295b7b34e2a26c3194069892 | 204 | py | Python | tests/commands/test_tman_find.py | Leovalcante/tmanager | df6d893e7fde41fe2722bb8f5259a88440ed2214 | [
"MIT"
] | null | null | null | tests/commands/test_tman_find.py | Leovalcante/tmanager | df6d893e7fde41fe2722bb8f5259a88440ed2214 | [
"MIT"
] | 1 | 2019-09-13T14:14:47.000Z | 2019-11-21T17:01:46.000Z | tests/commands/test_tman_find.py | Leovalcante/tmanager | df6d893e7fde41fe2722bb8f5259a88440ed2214 | [
"MIT"
] | null | null | null | from click.testing import CliRunner
from tmanager.tman import tman
runner = CliRunner()
def test_tman_find_help():
result = runner.invoke(tman, ["find", "--help"])
assert result.exit_code == 0
| 20.4 | 52 | 0.715686 |
173aba7575e11f2aa772e0bbb6d68ec87ccc6080 | 162,093 | py | Python | envanter.py | yhasansenyurt/InventoryManagementSoftware-DepoTakipYazilimi | 87633f3764b3e25d4050904ee7eeb9f410f562e3 | [
"MIT"
] | null | null | null | envanter.py | yhasansenyurt/InventoryManagementSoftware-DepoTakipYazilimi | 87633f3764b3e25d4050904ee7eeb9f410f562e3 | [
"MIT"
] | null | null | null | envanter.py | yhasansenyurt/InventoryManagementSoftware-DepoTakipYazilimi | 87633f3764b3e25d4050904ee7eeb9f410f562e3 | [
"MIT"
] | null | null | null | # This program is made by Hasan Senyurt for ISTAC A.S. - Inventory Management Software
from tkinter import *
import pandas as pd
from tkinter import ttk
from tkinter import messagebox
from datetime import datetime
import getpass
############################################################
# Arranging row co... | 46.391815 | 246 | 0.518036 |
3694fa6c08a7a55452da4c3dda0368a518c3d8d8 | 63 | py | Python | invenio_oarepo_oai_pmh_harvester/__init__.py | Semtexcz/invenio-oarepo-oai-pmh-harvester | 2866c7d7355f6885b4f443ee1e82baa24502b36e | [
"MIT"
] | null | null | null | invenio_oarepo_oai_pmh_harvester/__init__.py | Semtexcz/invenio-oarepo-oai-pmh-harvester | 2866c7d7355f6885b4f443ee1e82baa24502b36e | [
"MIT"
] | null | null | null | invenio_oarepo_oai_pmh_harvester/__init__.py | Semtexcz/invenio-oarepo-oai-pmh-harvester | 2866c7d7355f6885b4f443ee1e82baa24502b36e | [
"MIT"
] | null | null | null | from invenio_oarepo_oai_pmh_harvester.register import registry
| 31.5 | 62 | 0.920635 |
9b1d353476551c80df4cd8e0a970de40d2f0e441 | 4,901 | py | Python | tests/lib/feed/reader/sql/test_alchemy.py | formlio/forml | fd070da74a0107e37c0c643dd8df8680618fef74 | [
"Apache-2.0"
] | 78 | 2020-11-04T18:27:20.000Z | 2022-02-07T03:32:53.000Z | tests/lib/feed/reader/sql/test_alchemy.py | formlio/forml | fd070da74a0107e37c0c643dd8df8680618fef74 | [
"Apache-2.0"
] | 3 | 2020-11-05T20:42:15.000Z | 2021-01-13T19:57:01.000Z | tests/lib/feed/reader/sql/test_alchemy.py | formlio/forml | fd070da74a0107e37c0c643dd8df8680618fef74 | [
"Apache-2.0"
] | 7 | 2020-11-18T17:18:15.000Z | 2021-03-24T05:14:29.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... | 35.514493 | 117 | 0.654764 |
b75cfd7ee31f52e26f96438dc5429c7c88eabb2b | 110 | py | Python | python/problem027/__init__.py | alexandrempierre/project-euler | f71da8a8b279655f2a165d97a9b692e69c7727cf | [
"MIT"
] | 1 | 2021-08-22T10:24:21.000Z | 2021-08-22T10:24:21.000Z | python/problem027/__init__.py | alexandrempierre/project-euler | f71da8a8b279655f2a165d97a9b692e69c7727cf | [
"MIT"
] | null | null | null | python/problem027/__init__.py | alexandrempierre/project-euler | f71da8a8b279655f2a165d97a9b692e69c7727cf | [
"MIT"
] | null | null | null | '''problem027 module
'''
__all__ = []
__author__ = 'Alexandre Pierre'
import sys
sys.path.append('../')
| 8.461538 | 31 | 0.636364 |
7fc4ddda92509b46fcde0c9afead9ab5ca51286c | 5,554 | py | Python | tests/test_decompose.py | nehz/librosa | 0dcd53f462db124ed3f54edf2334f28738d2ecc6 | [
"ISC"
] | 2 | 2018-10-24T09:04:54.000Z | 2021-03-29T16:49:01.000Z | tests/test_decompose.py | nehz/librosa | 0dcd53f462db124ed3f54edf2334f28738d2ecc6 | [
"ISC"
] | null | null | null | tests/test_decompose.py | nehz/librosa | 0dcd53f462db124ed3f54edf2334f28738d2ecc6 | [
"ISC"
] | 2 | 2022-01-28T06:40:44.000Z | 2022-02-06T19:03:58.000Z | #!/usr/bin/env python
# CREATED: 2013-10-06 22:31:29 by Dawen Liang <dl2771@columbia.edu>
# unit tests for librosa.decompose
import warnings
# Disable cache
import os
try:
os.environ.pop('LIBROSA_CACHE_DIR')
except:
pass
import numpy as np
import scipy.sparse
import librosa
import sklearn.decomposition
from... | 25.832558 | 80 | 0.623515 |
380ddc54306a0668427257f2f5e9cc076fd17205 | 219 | py | Python | 8KYU/goose_filter.py | yaznasivasai/python_codewars | 25493591dde4649dc9c1ec3bece8191a3bed6818 | [
"MIT"
] | 4 | 2021-07-17T22:48:03.000Z | 2022-03-25T14:10:58.000Z | 8KYU/goose_filter.py | yaznasivasai/python_codewars | 25493591dde4649dc9c1ec3bece8191a3bed6818 | [
"MIT"
] | null | null | null | 8KYU/goose_filter.py | yaznasivasai/python_codewars | 25493591dde4649dc9c1ec3bece8191a3bed6818 | [
"MIT"
] | 3 | 2021-06-14T14:18:16.000Z | 2022-03-16T06:02:02.000Z | geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]
def goose_filter(birds: list) -> list:
return list(filter(lambda x: x not in geese, birds))
# return [i for i in birds if i not in geese] | 54.75 | 73 | 0.671233 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.