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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6b269d5b99914d3425678d7f3582d07b2c34d9e3 | 495 | py | Python | mayan/apps/document_states/queues.py | Syunkolee9891/Mayan-EDMS | 3759a9503a264a180b74cc8518388f15ca66ac1a | [
"Apache-2.0"
] | 1 | 2021-06-17T18:24:25.000Z | 2021-06-17T18:24:25.000Z | mayan/apps/document_states/queues.py | Syunkolee9891/Mayan-EDMS | 3759a9503a264a180b74cc8518388f15ca66ac1a | [
"Apache-2.0"
] | 7 | 2020-06-06T00:01:04.000Z | 2022-01-13T01:47:17.000Z | mayan/apps/document_states/queues.py | Syunkolee9891/Mayan-EDMS | 3759a9503a264a180b74cc8518388f15ca66ac1a | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import, unicode_literals
from django.utils.translation import ugettext_lazy as _
from mayan.apps.task_manager.classes import CeleryQueue
from mayan.apps.task_manager.workers import worker_slow
queue_document_states = CeleryQueue(
name='document_states', label=_('Document states'),... | 33 | 77 | 0.824242 |
84011e68b18b2661a55f6a6460760c092fc28194 | 2,715 | py | Python | test/test_build.py | FindDefinition/ccimport | 2be66fe4cdeb4daa915d2dfc75f2363c0c0bfb75 | [
"MIT"
] | 1 | 2021-11-23T08:36:48.000Z | 2021-11-23T08:36:48.000Z | test/test_build.py | FindDefinition/ccimport | 2be66fe4cdeb4daa915d2dfc75f2363c0c0bfb75 | [
"MIT"
] | null | null | null | test/test_build.py | FindDefinition/ccimport | 2be66fe4cdeb4daa915d2dfc75f2363c0c0bfb75 | [
"MIT"
] | 1 | 2021-11-23T08:26:52.000Z | 2021-11-23T08:26:52.000Z | import subprocess
from pathlib import Path
import ccimport
from ccimport import compat
from ccimport.utils import tempdir
import os
import sys
def test_cpp_build():
source = ccimport.autoimport([Path(__file__).parent / "source.cc"],
Path(__file__).parent / "source")
assert s... | 38.239437 | 105 | 0.523757 |
3df3c764ed6e853ac00744315e025f63df6e9ea2 | 1,628 | py | Python | loss/loss_functions.py | RyanDsilva/nn-from-scratch | ef2bc5794e2d88c948d62762a415c306dda4101f | [
"MIT"
] | 23 | 2020-04-22T08:53:31.000Z | 2021-12-14T12:26:22.000Z | loss/loss_functions.py | RyanDsilva/nn-from-scratch | ef2bc5794e2d88c948d62762a415c306dda4101f | [
"MIT"
] | 5 | 2020-05-09T04:24:54.000Z | 2020-10-09T16:46:25.000Z | loss/loss_functions.py | RyanDsilva/nn-from-scratch | ef2bc5794e2d88c948d62762a415c306dda4101f | [
"MIT"
] | 5 | 2020-05-22T10:44:11.000Z | 2021-10-01T09:33:34.000Z | import numpy as np
def MSE(y, yhat):
return np.mean(np.power(y-yhat, 2))
def dMSE(y, yhat):
return 2*(yhat-y)/y.size
def MAE(y, yhat):
return np.sum(np.abs(y-yhat))
def dMAE(y, yhat):
return 1 if y == yhat else -1
def kl_divergence(y, yhat):
"""
measures the difference between two prob... | 23.257143 | 92 | 0.648649 |
ba556a1972df6326643ee40a4f3063dca9a1f881 | 2,276 | py | Python | test/test_geolines.py | PlusWayne/pyecharts | 881771378e5fe1d0f55a13f2cf63c7d181eb1894 | [
"MIT"
] | null | null | null | test/test_geolines.py | PlusWayne/pyecharts | 881771378e5fe1d0f55a13f2cf63c7d181eb1894 | [
"MIT"
] | null | null | null | test/test_geolines.py | PlusWayne/pyecharts | 881771378e5fe1d0f55a13f2cf63c7d181eb1894 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
from __future__ import unicode_literals
from nose.tools import assert_raises
from pyecharts import GeoLines, Style
from pyecharts.datasets.coordinates import search_coordinates_by_keyword
style = Style(
title_top="#fff",
title_pos="center",
width=1200,
height=600,... | 23.957895 | 72 | 0.572935 |
51f5b067821c1beaa67545340764652bc6441c5a | 9,543 | py | Python | Lib/test/test_sort.py | raychorn/svn_Python-2.5.1 | 425005b1b489ba44ec0bb989e077297e8953d9be | [
"PSF-2.0"
] | null | null | null | Lib/test/test_sort.py | raychorn/svn_Python-2.5.1 | 425005b1b489ba44ec0bb989e077297e8953d9be | [
"PSF-2.0"
] | null | null | null | Lib/test/test_sort.py | raychorn/svn_Python-2.5.1 | 425005b1b489ba44ec0bb989e077297e8953d9be | [
"PSF-2.0"
] | null | null | null | from test import test_support
import random
import sys
import unittest
verbose = test_support.verbose
nerrors = 0
def check(tag, expected, raw, compare=None):
global nerrors
if verbose:
print " checking", tag
orig = raw[:] # save input in case of error
if compare:
... | 32.906897 | 88 | 0.507178 |
2c6f82ee65522f6fc19cc60e8669ae68f74028b2 | 13,128 | py | Python | timm_new/models/selecsls.py | Yuki-Tanaka-33937424/pytorch-image-models | 6c1da622dcb2a0421aeb6cdcadd03cc366331f66 | [
"Apache-2.0"
] | null | null | null | timm_new/models/selecsls.py | Yuki-Tanaka-33937424/pytorch-image-models | 6c1da622dcb2a0421aeb6cdcadd03cc366331f66 | [
"Apache-2.0"
] | null | null | null | timm_new/models/selecsls.py | Yuki-Tanaka-33937424/pytorch-image-models | 6c1da622dcb2a0421aeb6cdcadd03cc366331f66 | [
"Apache-2.0"
] | null | null | null | """PyTorch SelecSLS Net example for ImageNet Classification
License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/legalcode)
Author: Dushyant Mehta (@mehtadushy)
SelecSLS (core) Network Architecture as proposed in "XNect: Real-time Multi-person 3D
Human Pose Estimation with a Single RGB Camera, Mehta et al."... | 36.165289 | 121 | 0.587218 |
a5cab280478e1f01c8f252ac7758efa3cd252a3b | 762 | py | Python | ALPHABETS/SMALL_ALPHABETS/e.py | charansaim1819/Python_Patterns | 02e636855003346ec84c3d69f2be174dc9e9e3cb | [
"MIT"
] | null | null | null | ALPHABETS/SMALL_ALPHABETS/e.py | charansaim1819/Python_Patterns | 02e636855003346ec84c3d69f2be174dc9e9e3cb | [
"MIT"
] | null | null | null | ALPHABETS/SMALL_ALPHABETS/e.py | charansaim1819/Python_Patterns | 02e636855003346ec84c3d69f2be174dc9e9e3cb | [
"MIT"
] | null | null | null | #Shape of small e:
def for_e():
"""printing small 'e' using for loop"""
for row in range(7):
for col in range(4):
if col==0 and row not in(0,6) or col in(1,2) and row%3==0 or col==3 and row in(1,2,5):
print("*",end=" ")
else:
print(" ",end... | 25.4 | 133 | 0.39895 |
44e5b512bed9545444a35d0d99af33c016f1b0c2 | 323 | py | Python | sms_proxy/log.py | jmcparland/sms-proxy | 1e59ab9877be9dca5dea02f04f9404e6eb70edb2 | [
"MIT"
] | 12 | 2016-06-02T22:23:20.000Z | 2021-11-28T00:57:27.000Z | sms_poll/log.py | caseymacphee/sms-polling | 04aeb4114c46018cd94b50c57c461136a4dae5ff | [
"MIT"
] | 2 | 2019-04-10T02:26:35.000Z | 2020-06-13T06:34:28.000Z | sms_poll/log.py | caseymacphee/sms-polling | 04aeb4114c46018cd94b50c57c461136a4dae5ff | [
"MIT"
] | 8 | 2016-06-02T22:23:25.000Z | 2020-06-13T05:59:01.000Z | import sys
import os
import logging
from pythonjsonlogger import jsonlogger
log = logging.getLogger()
handler = logging.StreamHandler(sys.stdout)
formatter = jsonlogger.JsonFormatter()
handler.setFormatter(formatter)
log.addHandler(handler)
log.setLevel(int(os.environ.get('LOG_LEVEL', 20))) # Default to INFO log lev... | 24.846154 | 79 | 0.801858 |
575b3b1d27fc964715de0e9c302160aaffb4c772 | 807 | py | Python | FastAPI-Project-Template/settings/config.py | shikanon/privatecode | 85ffa80ef2815ff1af799e38d033d9c8a7a1cad1 | [
"MIT"
] | null | null | null | FastAPI-Project-Template/settings/config.py | shikanon/privatecode | 85ffa80ef2815ff1af799e38d033d9c8a7a1cad1 | [
"MIT"
] | 2 | 2022-02-13T13:48:19.000Z | 2022-02-27T05:07:02.000Z | FastAPI-Project-Template/settings/config.py | shikanon/privatecode | 85ffa80ef2815ff1af799e38d033d9c8a7a1cad1 | [
"MIT"
] | null | null | null | # coding=utf-8
'''
# Author: shikanon (shikanon@tensorbytes.com)
# File Created Time: 2020-03-31 11:04:51
#
# Project: settings
# File: config.py
# Description:
#
'''
import configparser
class Config:
'''配置
'''
def __init__(self):
self.config = configparser.ConfigParser()
self.mysqldb ... | 26.032258 | 88 | 0.592317 |
eeeb2fbfcc9befc64b80483380b12d3fcd88b229 | 10,047 | py | Python | prep_test_data.py | samirak93/NBA_Hackathon | 035c0cb87114e14ad033fa1b6928d6954ab47024 | [
"MIT"
] | 1 | 2019-07-24T19:23:37.000Z | 2019-07-24T19:23:37.000Z | prep_test_data.py | samirak93/NBA_Hackathon | 035c0cb87114e14ad033fa1b6928d6954ab47024 | [
"MIT"
] | null | null | null | prep_test_data.py | samirak93/NBA_Hackathon | 035c0cb87114e14ad033fa1b6928d6954ab47024 | [
"MIT"
] | null | null | null | import pandas as pd
from pandas.tseries.holiday import USFederalHolidayCalendar as calendar
#prepare columns for test data
df=pd.read_csv('test_set.csv')
data=pd.DataFrame(df)
mapping = {'CLE': 1, 'POR': 2,'GSW': 3,'ORL': 4,'IND': 5,'BOS': 6,'TOR': 7,'MIL': 8,'MEM': 9,
'PHI': 10,'PHX': 11,'LAL': 12,'ATL':... | 35.006969 | 131 | 0.599681 |
1649b1bcb3483747d649e7cd39dd913429cb6b3c | 10,798 | py | Python | NVLL/distribution/vmf_hypvae.py | jennhu/vmf_vae_nlp | 95a39fa9f7a0659e432475e8dfb9a46e305d53b7 | [
"MIT"
] | 159 | 2018-08-31T15:57:36.000Z | 2022-03-27T15:31:38.000Z | NVLL/distribution/vmf_hypvae.py | jennhu/vmf_vae_nlp | 95a39fa9f7a0659e432475e8dfb9a46e305d53b7 | [
"MIT"
] | 9 | 2018-10-11T15:58:50.000Z | 2019-04-16T03:13:33.000Z | NVLL/distribution/vmf_hypvae.py | jennhu/vmf_vae_nlp | 95a39fa9f7a0659e432475e8dfb9a46e305d53b7 | [
"MIT"
] | 21 | 2018-09-01T17:57:20.000Z | 2021-12-17T03:31:01.000Z | import torch
from scipy import special as sp
import numpy as np
from NVLL.util.util import GVar
from NVLL.util.gpu_flag import device
from torch.autograd import gradcheck
class BesselIve(torch.autograd.Function):
"""
We can implement our own custom autograd Functions by subclassing
torch.autograd.Functio... | 35.873754 | 120 | 0.576403 |
c7f667527161b701f9dccfad3c7aa7ea6fa76227 | 14,011 | py | Python | MAPS/scalar_train_small_fully_connected.py | gmooers96/CBRAIN-CAM | c5a26e415c031dea011d7cb0b8b4c1ca00751e2a | [
"MIT"
] | null | null | null | MAPS/scalar_train_small_fully_connected.py | gmooers96/CBRAIN-CAM | c5a26e415c031dea011d7cb0b8b4c1ca00751e2a | [
"MIT"
] | null | null | null | MAPS/scalar_train_small_fully_connected.py | gmooers96/CBRAIN-CAM | c5a26e415c031dea011d7cb0b8b4c1ca00751e2a | [
"MIT"
] | 5 | 2019-09-30T20:17:13.000Z | 2022-03-01T07:03:30.000Z | import math
import os
os.environ["CUDA_VISIBLE_DEVICES"]="0"
import argparse
import json
import tensorflow as tf
import tensorflow_probability as tfp
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import make_axes_locatable
import netCDF4
import keras
from keras import layers
from ... | 34.766749 | 135 | 0.65213 |
7918d7f7478ae872ea70a028ef308f4e3e3f5d72 | 7,647 | py | Python | gewittergefahr/plotting/feature_map_plotting.py | liuximarcus/GewitterGefahr | d819874d616f98a25187bfd3091073a2e6d5279e | [
"MIT"
] | 1 | 2020-11-19T08:15:03.000Z | 2020-11-19T08:15:03.000Z | gewittergefahr/plotting/feature_map_plotting.py | liuximarcus/GewitterGefahr | d819874d616f98a25187bfd3091073a2e6d5279e | [
"MIT"
] | null | null | null | gewittergefahr/plotting/feature_map_plotting.py | liuximarcus/GewitterGefahr | d819874d616f98a25187bfd3091073a2e6d5279e | [
"MIT"
] | null | null | null | """Plotting methods for CNN feature maps."""
import numpy
import matplotlib
matplotlib.use('agg')
import matplotlib.pyplot as pyplot
from gewittergefahr.gg_utils import error_checking
from gewittergefahr.plotting import plotting_utils
DEFAULT_FIG_WIDTH_INCHES = 15
DEFAULT_FIG_HEIGHT_INCHES = 15
DEFAULT_FONT_SIZE = 20... | 39.828125 | 80 | 0.722898 |
c0013262202fd4a1674f576fe3efcc747907a571 | 28,315 | py | Python | gluoncv/model_zoo/rcnn/faster_rcnn/predefined_models.py | aptsunny/gluon-cv | 7f050d3411b1ada7d2b9515d63b848c55139fdbb | [
"Apache-2.0"
] | 1 | 2020-03-18T04:19:26.000Z | 2020-03-18T04:19:26.000Z | gluoncv/model_zoo/rcnn/faster_rcnn/predefined_models.py | aptsunny/gluon-cv | 7f050d3411b1ada7d2b9515d63b848c55139fdbb | [
"Apache-2.0"
] | null | null | null | gluoncv/model_zoo/rcnn/faster_rcnn/predefined_models.py | aptsunny/gluon-cv | 7f050d3411b1ada7d2b9515d63b848c55139fdbb | [
"Apache-2.0"
] | null | null | null | """Predefined Faster RCNN Model."""
from __future__ import absolute_import
import warnings
import mxnet as mx
from mxnet.gluon import nn
from mxnet.gluon.contrib.nn import SyncBatchNorm
from ..faster_rcnn import get_faster_rcnn
from ....nn.feature import FPNFeatureExpander
__all__ = ['faster_rcnn_resnet50_v1b_voc',... | 49.938272 | 100 | 0.671446 |
fd42a12229725badd8822327248f7f2b9ba862b6 | 16,763 | py | Python | test/functional/test_framework/mininode.py | SovranoCoin/sovranocoin | d18c83a4f4db44393de271eb2b8fba6c1d536db1 | [
"MIT"
] | 4 | 2019-09-15T01:19:06.000Z | 2021-05-03T13:59:19.000Z | test/functional/test_framework/mininode.py | SovranoCoin/sovranocoin | d18c83a4f4db44393de271eb2b8fba6c1d536db1 | [
"MIT"
] | null | null | null | test/functional/test_framework/mininode.py | SovranoCoin/sovranocoin | d18c83a4f4db44393de271eb2b8fba6c1d536db1 | [
"MIT"
] | 5 | 2019-01-15T18:59:04.000Z | 2020-06-21T08:42:32.000Z | #!/usr/bin/env python3
# Copyright (c) 2010 ArtForz -- public domain half-a-node
# Copyright (c) 2012 Jeff Garzik
# Copyright (c) 2010-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Bitcoin P2P ... | 37.669663 | 182 | 0.633598 |
e766343ebc9e5cabfb88d1bccd35040f0e60872a | 7,827 | py | Python | test/test_bvr_rest_before_after.py | doedotdev/bvr | 023fc93424fa6a50c8a3c2ce2fc48b76a041b58c | [
"MIT"
] | null | null | null | test/test_bvr_rest_before_after.py | doedotdev/bvr | 023fc93424fa6a50c8a3c2ce2fc48b76a041b58c | [
"MIT"
] | 12 | 2019-12-07T21:40:23.000Z | 2019-12-07T21:43:54.000Z | test/test_bvr_rest_before_after.py | doedotdev/bvr | 023fc93424fa6a50c8a3c2ce2fc48b76a041b58c | [
"MIT"
] | null | null | null | from bvr.bvr_rest import bvr_rest_before_after
def test_bvr_rest_before_after_called_as_decorator(capsys):
@bvr_rest_before_after
def rest_before_after():
return 2
return_value = rest_before_after()
captured_ouput = capsys.readouterr().out
assert return_value == 2
assert "RESTING_B... | 41.632979 | 136 | 0.722755 |
b520f3e06410f6d8a645d661f9bb433101ffce2b | 2,761 | py | Python | challenge/tastyContribs.py | histrio/tastydata | 75b36954f851e0d22b9968bebdb5c77331853f54 | [
"Apache-2.0"
] | 2 | 2019-08-09T22:16:54.000Z | 2019-09-30T11:20:05.000Z | challenge/tastyContribs.py | histrio/tastydata | 75b36954f851e0d22b9968bebdb5c77331853f54 | [
"Apache-2.0"
] | 7 | 2015-06-11T06:50:44.000Z | 2016-10-25T18:07:06.000Z | challenge/tastyContribs.py | histrio/tastydata | 75b36954f851e0d22b9968bebdb5c77331853f54 | [
"Apache-2.0"
] | 3 | 2019-08-12T14:09:21.000Z | 2019-09-30T10:22:52.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
'''
Identifies and lists contributors to to the challenge
Largely based on contributors.py in the ÖDOK project
'''
import codecs
import json
import challengeStats
import WikiApi as wikiApi
import contributors # this one lives in the ÖDOK project
def run(start='2015-05-08'... | 34.08642 | 78 | 0.558493 |
7a28473fff017c7f441bd10c57583cd1dc369676 | 1,449 | py | Python | parser/team27/G-27/execution/function/mathematical/factorial.py | mr8ug/tytus | a09abe4095e49d333a8ed9ca81cb3d88f90872ba | [
"MIT"
] | 1 | 2021-01-09T05:32:35.000Z | 2021-01-09T05:32:35.000Z | parser/team27/G-27/execution/function/mathematical/factorial.py | XiomRB/tytus | 0873e4bdce5c110bee6ef2aa98240be6a93ae024 | [
"MIT"
] | null | null | null | parser/team27/G-27/execution/function/mathematical/factorial.py | XiomRB/tytus | 0873e4bdce5c110bee6ef2aa98240be6a93ae024 | [
"MIT"
] | null | null | null | import sys
sys.path.append('../tytus/parser/team27/G-27/execution/abstract')
sys.path.append('../tytus/parser/team27/G-27/execution/expression')
sys.path.append('../tytus/parser/team27/G-27/execution/symbol')
sys.path.append('../tytus/parser/team27/G-27/libraries')
from function import *
from typ import *
from math_fun... | 46.741935 | 134 | 0.602484 |
24381fe4c544f03b26f2fee1959bc5ace4ef98ea | 11,746 | py | Python | ghstack/shell.py | BowenBao/ghstack | 906274f42a28c690a49bff0af2063323bb06c5c3 | [
"MIT"
] | 1 | 2021-06-25T18:22:26.000Z | 2021-06-25T18:22:26.000Z | ghstack/shell.py | BowenBao/ghstack | 906274f42a28c690a49bff0af2063323bb06c5c3 | [
"MIT"
] | null | null | null | ghstack/shell.py | BowenBao/ghstack | 906274f42a28c690a49bff0af2063323bb06c5c3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import subprocess
import os
import logging
from typing import Dict, Sequence, Optional, TypeVar, Union, Any, overload, IO, Tuple
import asyncio
import sys
# Shell commands generally return str, but with exitcode=True
# they return a bool, and if stdout is piped straight to sys.stdout
# they re... | 35.062687 | 130 | 0.557211 |
add4393dbc084cd2372b7356452b5fc4953a8657 | 396 | py | Python | src/gethash/cli/blake2s.py | xymy/gethash | 88fd23f1c30338ceb95ff5b71a0112be349fe359 | [
"MIT"
] | null | null | null | src/gethash/cli/blake2s.py | xymy/gethash | 88fd23f1c30338ceb95ff5b71a0112be349fe359 | [
"MIT"
] | null | null | null | src/gethash/cli/blake2s.py | xymy/gethash | 88fd23f1c30338ceb95ff5b71a0112be349fe359 | [
"MIT"
] | null | null | null | from gethash.script import gethashcli, script_main
META = {
"cmdname": "blake2s",
"hashname": "BLAKE2s",
"suffix": ".blake2s",
"package": "hashlib",
"hasher": "blake2s",
}
@gethashcli(**META)
def main(files, **kwargs):
"""Generate or check BLAKE2s."""
from hashlib import blake2s as H
... | 17.217391 | 50 | 0.613636 |
7cde0dc896ee27661e89be3b0b359dd6112f5007 | 10,419 | py | Python | uniter_model/data/mrm.py | intersun/LightningDOT | 5f2880f69ba87b8701ab89348d70ebb11432578c | [
"MIT"
] | 64 | 2021-03-17T02:01:34.000Z | 2021-12-31T08:05:57.000Z | uniter_model/data/mrm.py | intersun/LightningDOT | 5f2880f69ba87b8701ab89348d70ebb11432578c | [
"MIT"
] | 9 | 2021-04-16T07:58:33.000Z | 2021-11-09T11:09:58.000Z | uniter_model/data/mrm.py | intersun/LightningDOT | 5f2880f69ba87b8701ab89348d70ebb11432578c | [
"MIT"
] | 5 | 2021-03-18T01:21:44.000Z | 2022-01-20T13:23:39.000Z | """
MRM Datasets
"""
import random
import torch
from torch.utils.data import Dataset
from torch.nn.utils.rnn import pad_sequence
from toolz.sandbox import unzip
from .data import DetectFeatTxtTokDataset, pad_tensors, get_gather_index
def _get_img_mask(mask_prob, num_bb):
img_mask = [random.random() < mask_prob f... | 36.177083 | 79 | 0.655533 |
59b61caf3b4a9d65a3fded6e3f174c33dc339596 | 6,507 | py | Python | theano/sandbox/jax_linker.py | canyon289/Theano-PyMC | 1a9b04bfe480b758ddfa54ba49c88bee3bec419c | [
"BSD-3-Clause"
] | null | null | null | theano/sandbox/jax_linker.py | canyon289/Theano-PyMC | 1a9b04bfe480b758ddfa54ba49c88bee3bec419c | [
"BSD-3-Clause"
] | null | null | null | theano/sandbox/jax_linker.py | canyon289/Theano-PyMC | 1a9b04bfe480b758ddfa54ba49c88bee3bec419c | [
"BSD-3-Clause"
] | 1 | 2020-08-15T17:09:10.000Z | 2020-08-15T17:09:10.000Z | from collections.abc import Sequence
from warnings import warn
from theano.gof.graph import Constant
from theano.gof.link import (
Container,
PerformLinker,
add_clear_storage,
gc_helper,
map_storage,
streamline,
utils,
)
class JAXLinker(PerformLinker):
"""A `Linker` that JIT-compiles ... | 32.054187 | 84 | 0.553865 |
3cf04ce323a2ca25ae724cc993b51973e59afec3 | 8,892 | py | Python | accelbyte_py_sdk/api/cloudsave/operations/admin_player_record/admin_put_player_public_record_handler_v1.py | encyphered/accelbyte-python-sdk | 09c1e989d7251de308150fdcd3119d662ca2d205 | [
"MIT"
] | null | null | null | accelbyte_py_sdk/api/cloudsave/operations/admin_player_record/admin_put_player_public_record_handler_v1.py | encyphered/accelbyte-python-sdk | 09c1e989d7251de308150fdcd3119d662ca2d205 | [
"MIT"
] | null | null | null | accelbyte_py_sdk/api/cloudsave/operations/admin_player_record/admin_put_player_public_record_handler_v1.py | encyphered/accelbyte-python-sdk | 09c1e989d7251de308150fdcd3119d662ca2d205 | [
"MIT"
] | null | null | null | # Auto-generated at 2021-09-27T17:01:31.247008+08:00
# from: Justice Cloudsave Service (3.38.0)
# Copyright (c) 2018 - 2021 AccelByte Inc. All Rights Reserved.
# This is licensed software from AccelByte Inc, for limitations
# and restrictions contact your company contract manager.
# pylint: disable=duplicate-code
# p... | 30.982578 | 137 | 0.607512 |
a4bb1893b7ecc310bc9ee7ffcf907aef60b35b52 | 3,779 | py | Python | homeassistant/components/deluge/config_flow.py | mib1185/core | b17d4ac65cde9a27ff6032d70b148792e5eba8df | [
"Apache-2.0"
] | null | null | null | homeassistant/components/deluge/config_flow.py | mib1185/core | b17d4ac65cde9a27ff6032d70b148792e5eba8df | [
"Apache-2.0"
] | null | null | null | homeassistant/components/deluge/config_flow.py | mib1185/core | b17d4ac65cde9a27ff6032d70b148792e5eba8df | [
"Apache-2.0"
] | null | null | null | """Config flow for the Deluge integration."""
from __future__ import annotations
from collections.abc import Mapping
import socket
from ssl import SSLError
from typing import Any
from deluge_client.client import DelugeRPCClient
import voluptuous as vol
from homeassistant.config_entries import SOURCE_REAUTH, ConfigFl... | 35.990476 | 87 | 0.588251 |
1213316c659236c3b5650550647c066f2e4e03c2 | 437 | py | Python | versions/v1/create_jobs.py | bric-tb-softwares/rxpixp2pixcycle | 3ec59373d777908210483a41478d6fbc2fe60f3e | [
"BSD-3-Clause"
] | null | null | null | versions/v1/create_jobs.py | bric-tb-softwares/rxpixp2pixcycle | 3ec59373d777908210483a41478d6fbc2fe60f3e | [
"BSD-3-Clause"
] | null | null | null | versions/v1/create_jobs.py | bric-tb-softwares/rxpixp2pixcycle | 3ec59373d777908210483a41478d6fbc2fe60f3e | [
"BSD-3-Clause"
] | null | null | null |
import json, os
output_path = 'jobs'
os.makedirs(output_path, exist_ok=True)
tests = 1
sorts = 9
for test in range(tests):
for sort in range(sorts):
d = {
'sort' : sort,
'test' : test,
'seed' : 512,
}
print(d)
o = ou... | 15.068966 | 65 | 0.462243 |
280622a5495276855ef0b3a4c3614289da4c3518 | 119,735 | py | Python | autoload/leaderf/python/leaderf/manager.py | paperboard/LeaderF | 5d39b1a704419436a812118c6281ddb5023137e3 | [
"Apache-2.0"
] | null | null | null | autoload/leaderf/python/leaderf/manager.py | paperboard/LeaderF | 5d39b1a704419436a812118c6281ddb5023137e3 | [
"Apache-2.0"
] | null | null | null | autoload/leaderf/python/leaderf/manager.py | paperboard/LeaderF | 5d39b1a704419436a812118c6281ddb5023137e3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import vim
import os
import sys
import json
import time
import operator
import itertools
import threading
import multiprocessing
from functools import partial
from functools import wraps
from .instance import LfInstance
from .cli import LfCli
from .utils import *
from .fuz... | 45.92827 | 133 | 0.536735 |
7e45cc960da12ae131782ea270240dc079dff488 | 2,326 | py | Python | crawler/27bao/app.py | hmumixaM/anything | 5810132118d6d3f3859d607fca068c8275d4bf42 | [
"MIT"
] | null | null | null | crawler/27bao/app.py | hmumixaM/anything | 5810132118d6d3f3859d607fca068c8275d4bf42 | [
"MIT"
] | null | null | null | crawler/27bao/app.py | hmumixaM/anything | 5810132118d6d3f3859d607fca068c8275d4bf42 | [
"MIT"
] | null | null | null | import requests
import re
import pymongo
import time
client = pymongo.MongoClient(host='127.0.0.1', port=27017)
db = client.baola
collection = db.gif
def data(info):
result = collection.insert_one(info)
def main():
pages = list_link()
for link in pages:
gifs, description = gif_match(link)
... | 26.735632 | 74 | 0.560189 |
9631bcb84a724f9556d588350db7aa3ed948a8d9 | 950 | py | Python | tests/test_services.py | Wicker25/intercom-test | af9bfbbf4fbc9b803e387f101332ef7af13d7676 | [
"MIT"
] | null | null | null | tests/test_services.py | Wicker25/intercom-test | af9bfbbf4fbc9b803e387f101332ef7af13d7676 | [
"MIT"
] | null | null | null | tests/test_services.py | Wicker25/intercom-test | af9bfbbf4fbc9b803e387f101332ef7af13d7676 | [
"MIT"
] | null | null | null | import pytest
from intercom.models import Location, Customer
from intercom.services import get_customers_close_to_office
@pytest.fixture()
def customer_repository():
class CustomerRepositoryMock:
def fetch_all(self):
return [
Customer(user_id=1, name='Ian', location=Location(l... | 38 | 110 | 0.722105 |
870f4ac860eb51d9709aaac4d8f2596cacfa5721 | 16,879 | py | Python | neutron/objects/qos/policy.py | acdc-cloud/neutron | 2510836886555179f9e9e39b1fdbf94296befc51 | [
"Apache-2.0"
] | 1 | 2018-10-19T01:48:37.000Z | 2018-10-19T01:48:37.000Z | neutron/objects/qos/policy.py | weiqiLee/neutron | ddc72ebd41a0e7804b33a21583d3add008191229 | [
"Apache-2.0"
] | null | null | null | neutron/objects/qos/policy.py | weiqiLee/neutron | ddc72ebd41a0e7804b33a21583d3add008191229 | [
"Apache-2.0"
] | 1 | 2018-08-28T17:13:16.000Z | 2018-08-28T17:13:16.000Z | # Copyright 2015 Red Hat, Inc.
# 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... | 39.529274 | 79 | 0.605486 |
4daa5d1bc78511764107c9706af4fd798f131cfe | 19,287 | py | Python | sdk/python/pulumi_azure_native/network/v20180601/route_filter_rule.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20180601/route_filter_rule.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20180601/route_filter_rule.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 55.742775 | 4,475 | 0.680095 |
d70cbfddf8575eea76be97a6df90d7cffaf43d98 | 7,120 | py | Python | kaolin/datasets/base.py | zuru/kaolin | 343a820c75383dd01b6f2247f237073f3e8dcb46 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | kaolin/datasets/base.py | zuru/kaolin | 343a820c75383dd01b6f2247f237073f3e8dcb46 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | kaolin/datasets/base.py | zuru/kaolin | 343a820c75383dd01b6f2247f237073f3e8dcb46 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-05-06T06:03:13.000Z | 2020-05-06T06:03:13.000Z | # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 40.454545 | 124 | 0.635112 |
825e7b700a5f39c734ab662d408e94a3c08b24e3 | 3,860 | py | Python | homeassistant/components/ecobee.py | loraxx753/skynet | 86a1b0a6c6a3f81bc92d4f61de6a9a6b9f964543 | [
"Apache-2.0"
] | 13 | 2017-02-01T13:25:34.000Z | 2022-01-26T01:30:39.000Z | homeassistant/components/ecobee.py | 1Forward1Back/home-assistant | ce24ef0c20dea0fd671d6f2c2a8b1456b4b66ba6 | [
"MIT"
] | 9 | 2017-07-26T18:05:32.000Z | 2021-12-05T14:16:34.000Z | homeassistant/components/ecobee.py | 1Forward1Back/home-assistant | ce24ef0c20dea0fd671d6f2c2a8b1456b4b66ba6 | [
"MIT"
] | 21 | 2017-07-26T17:09:40.000Z | 2022-03-27T22:37:22.000Z | """
Support for Ecobee.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/ecobee/
"""
import logging
import os
from datetime import timedelta
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers import ... | 30.15625 | 76 | 0.704404 |
f00dd97a90a95174346c00dd9e5cef796d2a6b18 | 2,443 | py | Python | BERT/train/model.py | ShuntaIto/azureml-pl-sample | e5ae7b0a06d72f7b1371675f42ef9708cc8ea2c5 | [
"MIT"
] | 6 | 2021-04-02T07:22:51.000Z | 2021-07-14T08:45:42.000Z | BERT/train/model.py | ShuntaIto/azureml-pl-sample | e5ae7b0a06d72f7b1371675f42ef9708cc8ea2c5 | [
"MIT"
] | null | null | null | BERT/train/model.py | ShuntaIto/azureml-pl-sample | e5ae7b0a06d72f7b1371675f42ef9708cc8ea2c5 | [
"MIT"
] | null | null | null | import torch
from torch import nn
import torch.nn.functional as F
import pytorch_lightning as pl
from transformers import BertJapaneseTokenizer
from transformers import BertModel
from azureml.core import Run
run = Run.get_context()
class BERTClassificationModel(pl.LightningModule):
def __init__(self, bert_lr=5e-... | 35.926471 | 96 | 0.618502 |
baf8df5344a0605ac4b758ec2135596f72816053 | 13,116 | py | Python | fdia_simulation/models/radar.py | QDucasse/FDIA_simulation | bdd0cb072f07b9a96fd82df581c9c7493ae66cbc | [
"MIT"
] | 7 | 2020-12-11T16:20:59.000Z | 2022-01-11T21:18:25.000Z | fdia_simulation/models/radar.py | QDucasse/FDIA_simulation | bdd0cb072f07b9a96fd82df581c9c7493ae66cbc | [
"MIT"
] | 2 | 2020-09-25T06:56:56.000Z | 2021-06-25T15:40:38.000Z | fdia_simulation/models/radar.py | QDucasse/FDIA_simulation | bdd0cb072f07b9a96fd82df581c9c7493ae66cbc | [
"MIT"
] | 5 | 2019-08-27T11:13:31.000Z | 2021-11-26T12:52:19.000Z | # -*- coding: utf-8 -*-
"""
Created on Fri Jun 21 13:07:46 2019
@author: qde
"""
import numpy as np
import matplotlib.pyplot as plt
from math import cos,sin,sqrt,pi,atan2
from numpy.random import randn
from filterpy.common import pretty_str
from fdia_simulation.models import Maneuver... | 31.990244 | 108 | 0.552531 |
92c56968de82a8225c5093b40891e57d1367f047 | 26,953 | py | Python | GearBot/Cogs/Moderation.py | Gh0stlyy/GearBot | aa918976017c1e864ab33ccd714bf25cbefa811c | [
"MIT"
] | null | null | null | GearBot/Cogs/Moderation.py | Gh0stlyy/GearBot | aa918976017c1e864ab33ccd714bf25cbefa811c | [
"MIT"
] | null | null | null | GearBot/Cogs/Moderation.py | Gh0stlyy/GearBot | aa918976017c1e864ab33ccd714bf25cbefa811c | [
"MIT"
] | null | null | null | import asyncio
import datetime
import time
import traceback
from concurrent.futures import CancelledError
import discord
from discord.ext import commands
from discord.ext.commands import BadArgument
from Util import Permissioncheckers, Configuration, Utils, GearbotLogging, Pages, InfractionUtils, Emoji, Translator, \... | 60.841986 | 348 | 0.627314 |
fc1a61e1c549812888870f868695ee461c905230 | 27,541 | py | Python | envoy.base.runner/tests/test_runner.py | phlax/abstracts | 53fbbee68d1f56effe0ded1ed4e28be870693877 | [
"Apache-2.0"
] | 1 | 2021-12-09T19:24:48.000Z | 2021-12-09T19:24:48.000Z | envoy.base.runner/tests/test_runner.py | envoyproxy/pytooling | db8b60184f8a61b3184a111b0cfaff4780511b46 | [
"Apache-2.0"
] | 392 | 2021-08-24T15:55:32.000Z | 2022-03-28T14:26:22.000Z | envoy.base.runner/tests/test_runner.py | phlax/abstracts | 53fbbee68d1f56effe0ded1ed4e28be870693877 | [
"Apache-2.0"
] | 3 | 2021-10-06T13:43:11.000Z | 2021-11-29T13:48:56.000Z |
import logging
import sys
from unittest.mock import AsyncMock, MagicMock, patch, PropertyMock
import pytest
from envoy.base import runner
class DummyRunner(runner.BaseRunner):
def __init__(self):
self.args = PropertyMock()
class DummyForkingRunner(runner.ForkingRunner):
def __init__(self):
... | 29.424145 | 76 | 0.605316 |
7475365537c7906a3cd5b899fbdb31404de8e118 | 13,422 | py | Python | src/test/clustering.py | fermi-lat/CalRecon | 69e123b523770baa1fc9e8f3b78e211b1064b0c0 | [
"BSD-3-Clause"
] | null | null | null | src/test/clustering.py | fermi-lat/CalRecon | 69e123b523770baa1fc9e8f3b78e211b1064b0c0 | [
"BSD-3-Clause"
] | null | null | null | src/test/clustering.py | fermi-lat/CalRecon | 69e123b523770baa1fc9e8f3b78e211b1064b0c0 | [
"BSD-3-Clause"
] | null | null | null |
from ReconReader import *
ROOT.gStyle.SetOptStat(111111)
ROOT.gStyle.SetPalette(1)
from optparse import OptionParser
parser = OptionParser()
parser.add_option('-c', '--skim-cut', type = str, dest = 'c',
default = '1',
help = 'a cut to filter the events')
parser.add_option('-s', '-... | 39.476471 | 160 | 0.626807 |
98b6f12fbd89732708260071d99695e847c1927b | 3,995 | py | Python | syntropy_sdk/models/check_mfa_for_new_social_account_response.py | SyntropyNet/syntropy-python-sdk | 27b7756b136f83886fd2a6e342fa4d4073779ff7 | [
"MIT"
] | 1 | 2020-12-17T17:30:12.000Z | 2020-12-17T17:30:12.000Z | syntropy_sdk/models/check_mfa_for_new_social_account_response.py | SyntropyNet/syntropy-python-sdk | 27b7756b136f83886fd2a6e342fa4d4073779ff7 | [
"MIT"
] | null | null | null | syntropy_sdk/models/check_mfa_for_new_social_account_response.py | SyntropyNet/syntropy-python-sdk | 27b7756b136f83886fd2a6e342fa4d4073779ff7 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
syntropy-auth-service
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 0.1.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
i... | 29.592593 | 119 | 0.582478 |
27a9a72bad8a0eb188dfba50afaf87c929935c16 | 20,906 | py | Python | astropy/time/tests/test_methods.py | jbkalmbach/astropy | 88ae8c615533efd1e60de4aded204943f66f881c | [
"BSD-3-Clause"
] | null | null | null | astropy/time/tests/test_methods.py | jbkalmbach/astropy | 88ae8c615533efd1e60de4aded204943f66f881c | [
"BSD-3-Clause"
] | 11 | 2017-12-18T16:27:29.000Z | 2018-08-29T14:54:22.000Z | astropy/time/tests/test_methods.py | jbkalmbach/astropy | 88ae8c615533efd1e60de4aded204943f66f881c | [
"BSD-3-Clause"
] | 1 | 2018-08-02T09:33:21.000Z | 2018-08-02T09:33:21.000Z | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import itertools
import copy
import pytest
import numpy as np
from .. import Time
@pytest.fixture(scope="module", params=[True, False])
def masked(request):
# Could not figure out a better way to parametrize the setup method
global use_masked_... | 48.05977 | 79 | 0.618913 |
47eecd07df4512f1d7f8ed4ba8b39648a1ea70fc | 6,079 | py | Python | tasks/infer_engine.py | harisankarh/IndianNLP-Transliteration | 0e0dd8139c75477346c985201b51315b3a4e4f48 | [
"Apache-2.0"
] | 31 | 2020-09-24T04:32:47.000Z | 2022-02-24T06:12:39.000Z | tasks/infer_engine.py | harisankarh/IndianNLP-Transliteration | 0e0dd8139c75477346c985201b51315b3a4e4f48 | [
"Apache-2.0"
] | 4 | 2021-05-26T11:38:36.000Z | 2022-01-27T12:28:21.000Z | tasks/infer_engine.py | harisankarh/IndianNLP-Transliteration | 0e0dd8139c75477346c985201b51315b3a4e4f48 | [
"Apache-2.0"
] | 8 | 2020-09-04T12:33:30.000Z | 2022-01-12T05:43:54.000Z | import os
import sys
import torch
import utilities.lang_data_utils as lutl
import utilities.running_utils as rutl
from utilities.logging_utils import LOG2CSV
''' VacabSanitizer usage
voc_sanitize = lutl.VocabSanitizer("data/X_word_list.json")
result = voc_sanitize.reposition(result)
'''
tgt_glyph = lutl.GlyphStrawbo... | 31.994737 | 101 | 0.681856 |
d1553d9108e407df986bef665d2e767a658d904c | 73,859 | py | Python | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_segment_routing_ms_oper.py | tkamata-test/ydk-py | b637e7853a8edbbd31fbc05afa3aa4110b31c5f9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_segment_routing_ms_oper.py | tkamata-test/ydk-py | b637e7853a8edbbd31fbc05afa3aa4110b31c5f9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_segment_routing_ms_oper.py | tkamata-test/ydk-py | b637e7853a8edbbd31fbc05afa3aa4110b31c5f9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | """ Cisco_IOS_XR_segment_routing_ms_oper
This module contains a collection of YANG definitions
for Cisco IOS\-XR segment\-routing\-ms package operational data.
This module contains definitions
for the following management objects\:
srms\: Segment Routing Mapping Server operational data
Copyright (c) 2013\-2016 by... | 36.782371 | 341 | 0.425703 |
94b2a563540154605983e19030545d645dc2443c | 1,165 | py | Python | cctbx_website/run_tests.py | whart222/cctbx_project | 32bb901af1431f845143eac06c244f20b1fbc26a | [
"BSD-3-Clause-LBNL"
] | null | null | null | cctbx_website/run_tests.py | whart222/cctbx_project | 32bb901af1431f845143eac06c244f20b1fbc26a | [
"BSD-3-Clause-LBNL"
] | 170 | 2020-09-26T19:17:07.000Z | 2022-03-31T21:32:41.000Z | cctbx_website/run_tests.py | whart222/cctbx_project | 32bb901af1431f845143eac06c244f20b1fbc26a | [
"BSD-3-Clause-LBNL"
] | null | null | null | from __future__ import absolute_import, division, print_function
from libtbx import test_utils
import libtbx.load_env
#tst_list = [
# "$D/regression/tst_py_from_html.py"
# ]
tst_list = [
"$D/regression/tst_1_template.py",
"$D/regression/tst_2_doc_hlo_intro.py",
"$D/regression/tst_3_doc_hlo_model_manager.py",
... | 31.486486 | 64 | 0.771674 |
68a8b55d16b8f8c8374a2457142211d79c703d9d | 4,399 | py | Python | python/perspective/perspective/client/table_api.py | shinny-yangyang/perspective | 91ade3c19bf9cdd39ce2d019cb92c6fa0d31d724 | [
"Apache-2.0"
] | 1,821 | 2017-12-08T22:38:48.000Z | 2019-04-29T19:29:31.000Z | python/perspective/perspective/client/table_api.py | shinny-yangyang/perspective | 91ade3c19bf9cdd39ce2d019cb92c6fa0d31d724 | [
"Apache-2.0"
] | 278 | 2018-01-19T22:27:09.000Z | 2019-04-27T00:16:00.000Z | python/perspective/perspective/client/table_api.py | shinny-yangyang/perspective | 91ade3c19bf9cdd39ce2d019cb92c6fa0d31d724 | [
"Apache-2.0"
] | 125 | 2017-12-08T20:57:50.000Z | 2019-04-23T07:57:05.000Z | ################################################################################
#
# Copyright (c) 2019, the Perspective Authors.
#
# This file is part of the Perspective library, distributed under the terms of
# the Apache License 2.0. The full license can be found in the LICENSE file.
#
import tornado
from functoo... | 30.978873 | 80 | 0.604228 |
97dc988bf9a61942a4ac395141b4c293c7ae790e | 974 | py | Python | myproject/myproject/urls.py | ObukhovVladislav/mysite-django | 715a3793351c19a0e7b052d2711796cafee4d5a9 | [
"Apache-2.0"
] | null | null | null | myproject/myproject/urls.py | ObukhovVladislav/mysite-django | 715a3793351c19a0e7b052d2711796cafee4d5a9 | [
"Apache-2.0"
] | null | null | null | myproject/myproject/urls.py | ObukhovVladislav/mysite-django | 715a3793351c19a0e7b052d2711796cafee4d5a9 | [
"Apache-2.0"
] | null | null | null | """myproject URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.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-bas... | 33.586207 | 77 | 0.696099 |
251b9d76ec9342a5e9b9de515c92fbd245e7dbae | 12,034 | py | Python | wz/ui_modules/tab_grade_editor.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | wz/ui_modules/tab_grade_editor.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | wz/ui_modules/tab_grade_editor.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
ui/tab_grade_editor.py
Last updated: 2021-04-06
Editor for grades.
=+LICENCE=============================
Copyright 2021 Michael Towers
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtai... | 33.99435 | 77 | 0.644424 |
465580a27506d20652f78949924c284c914a2235 | 660 | py | Python | Sistema/API/app/application/Controller/complejoController.py | francoo27/TPI | 53b7a88a491ef785046c208625c745de80200945 | [
"MIT"
] | 1 | 2021-04-27T21:22:30.000Z | 2021-04-27T21:22:30.000Z | Sistema/API/app/application/Controller/complejoController.py | francoo27/TPI | 53b7a88a491ef785046c208625c745de80200945 | [
"MIT"
] | null | null | null | Sistema/API/app/application/Controller/complejoController.py | francoo27/TPI | 53b7a88a491ef785046c208625c745de80200945 | [
"MIT"
] | null | null | null | from ..Model.ClasificacionModel import ClasificacionSchema
from ..Model.ComplejoModel import ComplejoSchema
from flask import Blueprint , Response , jsonify ,current_app as app
from flask.globals import request
from ..Logic import complejoService
from marshmallow import Schema, fields, ValidationError
# Blueprint Con... | 30 | 68 | 0.795455 |
5ec09aee03166ff42fcdeee8e2b432bd6f22c254 | 987 | py | Python | setup.py | mtrovo/python-clewareampel | 48cdec263d63b8a8549773d5fd787a1c326e7a9e | [
"MIT"
] | 1 | 2022-01-29T15:41:52.000Z | 2022-01-29T15:41:52.000Z | setup.py | mtrovo/python-clewareampel | 48cdec263d63b8a8549773d5fd787a1c326e7a9e | [
"MIT"
] | null | null | null | setup.py | mtrovo/python-clewareampel | 48cdec263d63b8a8549773d5fd787a1c326e7a9e | [
"MIT"
] | 1 | 2021-10-03T23:05:53.000Z | 2021-10-03T23:05:53.000Z | #!/usr/bin/env python
from setuptools import setup
import clewareampel
setup(
name='clewareampel',
version=clewareampel.__version__,
description='Control the Cleware USB Ampel (traffic lights) with Python.',
long_description='Control the Cleware USB Ampel (traffic lights) with '
... | 27.416667 | 78 | 0.614995 |
7cd286be5cd36f375d155442d95a5dbaf97b922a | 4,557 | py | Python | third_party/webports/src/src/lib/naclports/tests/test_main.py | ayaNader/chromeos_smart_card_connector | 78502e328634a210e27ef897405b66844ebefe62 | [
"Apache-2.0"
] | 79 | 2017-09-22T05:09:54.000Z | 2022-03-13T01:11:06.000Z | lib/naclports/tests/test_main.py | yeyus/naclports | ceb194315915c69a7266d695259e2c204f9cbbaf | [
"BSD-3-Clause"
] | 191 | 2017-10-23T22:34:58.000Z | 2022-03-05T18:10:06.000Z | lib/naclports/tests/test_main.py | yeyus/naclports | ceb194315915c69a7266d695259e2c204f9cbbaf | [
"BSD-3-Clause"
] | 32 | 2017-10-21T07:39:59.000Z | 2021-11-10T22:55:32.000Z | # Copyright 2014 The Native Client 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 mock
from mock import patch, Mock
import StringIO
import common
import naclports.__main__
from naclports import error
from naclports.c... | 38.948718 | 80 | 0.707483 |
3352bef5fbf40d331a92c6522ac7345d3b7b9bb9 | 8,627 | py | Python | beginner_source/blitz/neural_networks_tutorial.py | codewithkaranjeswani/tutorials | ce84ebbb764bef14e982076b5ca7d8906ac0db78 | [
"BSD-3-Clause"
] | null | null | null | beginner_source/blitz/neural_networks_tutorial.py | codewithkaranjeswani/tutorials | ce84ebbb764bef14e982076b5ca7d8906ac0db78 | [
"BSD-3-Clause"
] | null | null | null | beginner_source/blitz/neural_networks_tutorial.py | codewithkaranjeswani/tutorials | ce84ebbb764bef14e982076b5ca7d8906ac0db78 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Neural Networks
===============
Neural networks can be constructed using the ``torch.nn`` package.
Now that you had a glimpse of ``autograd``, ``nn`` depends on
``autograd`` to define models and differentiate them.
An ``nn.Module`` contains layers, and a method ``forward(input)``\ that
ret... | 32.927481 | 79 | 0.630115 |
590534b1eb0e72d2f54fc8b3b1b4337a132c97e8 | 39,077 | py | Python | pyopencl_extension/framework.py | piveloper/pyopencl-extension | 0f9fede4cfbb1c3f6d99c5e0aa94feddb23a5d4c | [
"MIT"
] | null | null | null | pyopencl_extension/framework.py | piveloper/pyopencl-extension | 0f9fede4cfbb1c3f6d99c5e0aa94feddb23a5d4c | [
"MIT"
] | null | null | null | pyopencl_extension/framework.py | piveloper/pyopencl-extension | 0f9fede4cfbb1c3f6d99c5e0aa94feddb23a5d4c | [
"MIT"
] | null | null | null | __author__ = "piveloper"
__copyright__ = "26.03.2020, piveloper"
__version__ = "1.0"
__email__ = "piveloper@gmail.com"
__doc__ = """This script includes helpful functions to extended PyOpenCl functionality."""
import os
import re
import time
from abc import abstractmethod, ABC
from dataclasses import dataclass, field
... | 42.382863 | 138 | 0.650152 |
717004c16aa303c94b3845706ad4664cb45eb6f9 | 3,602 | py | Python | src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/application_properties.py | mayank88mahajan/azure-cli-extensions | 8bd389a1877bffd14052bec5519ce75dc6fc34cf | [
"MIT"
] | 1 | 2018-09-22T10:39:43.000Z | 2018-09-22T10:39:43.000Z | src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/application_properties.py | mayank88mahajan/azure-cli-extensions | 8bd389a1877bffd14052bec5519ce75dc6fc34cf | [
"MIT"
] | null | null | null | src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/application_properties.py | mayank88mahajan/azure-cli-extensions | 8bd389a1877bffd14052bec5519ce75dc6fc34cf | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 43.926829 | 93 | 0.659078 |
c8593ebe105e13b970234b2da20db343df69b261 | 9,941 | py | Python | main.py | franciscorpuz/curl_rainbow | e3f6f2a9bee1ed6436e8cc55384b664220c7ab3b | [
"MIT"
] | 38 | 2020-07-07T11:29:18.000Z | 2022-03-28T13:38:04.000Z | main.py | franciscorpuz/curl_rainbow | e3f6f2a9bee1ed6436e8cc55384b664220c7ab3b | [
"MIT"
] | 6 | 2020-08-01T11:44:39.000Z | 2021-06-24T00:15:23.000Z | main.py | franciscorpuz/curl_rainbow | e3f6f2a9bee1ed6436e8cc55384b664220c7ab3b | [
"MIT"
] | 18 | 2020-08-07T04:42:37.000Z | 2021-12-08T22:42:14.000Z | # -*- coding: utf-8 -*-
# MIT License
#
# Copyright (c) 2017 Kai Arulkumaran
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use,... | 49.954774 | 434 | 0.715622 |
8cfd8e2575e7866e00b1ce9e159b6b15f15ffd69 | 10,070 | py | Python | contrib/spendfrom/spendfrom.py | Babacoins/Babacoin-v2 | 126ad0e4a744a1d7ae1629cf414ae6b033d59c9f | [
"MIT"
] | 1 | 2018-08-13T15:47:53.000Z | 2018-08-13T15:47:53.000Z | contrib/spendfrom/spendfrom.py | Babacoins/Babacoin-v2 | 126ad0e4a744a1d7ae1629cf414ae6b033d59c9f | [
"MIT"
] | null | null | null | contrib/spendfrom/spendfrom.py | Babacoins/Babacoin-v2 | 126ad0e4a744a1d7ae1629cf414ae6b033d59c9f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Use the raw transactions API to spend BABAs received on particular addresses,
# and send any change back to that same address.
#
# Example usage:
# spendfrom.py # Lists available funds
# spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00
#
# Assumes it will talk to a babacoind or babac... | 37.574627 | 111 | 0.633863 |
5cedbcc3ff41c810fc57341964a7f174ecfe3834 | 6,301 | py | Python | CustomExtension.extension/STVTools.tab/Modify.panel/Modify1.stack3/Replace.pulldown/Batch parameter change.pushbutton/script.py | Melca-G/Aeolus | e014cdbbffc1c650d569efd8750480bc5a4cdc3b | [
"MIT"
] | null | null | null | CustomExtension.extension/STVTools.tab/Modify.panel/Modify1.stack3/Replace.pulldown/Batch parameter change.pushbutton/script.py | Melca-G/Aeolus | e014cdbbffc1c650d569efd8750480bc5a4cdc3b | [
"MIT"
] | null | null | null | CustomExtension.extension/STVTools.tab/Modify.panel/Modify1.stack3/Replace.pulldown/Batch parameter change.pushbutton/script.py | Melca-G/Aeolus | e014cdbbffc1c650d569efd8750480bc5a4cdc3b | [
"MIT"
] | null | null | null | import sys
import ConfigParser
from os.path import expanduser
import csv
# Set system path
home = expanduser("~")
cfgfile = open(home + "\\STVTools.ini", 'r')
config = ConfigParser.ConfigParser()
config.read(home + "\\STVTools.ini")
# Master Path
syspath1 = config.get('SysDir','MasterPackage')
sys.path.append(syspath1)... | 42.288591 | 117 | 0.634026 |
deb13753ffcdf7bf53566168da155940070cac1f | 1,601 | py | Python | deepocr/models/detection/predictor/pytorch.py | das-projects/deepOCR | ffc6db691605b7b4837da9619ab6e918fa1c18de | [
"Apache-2.0"
] | 1 | 2022-01-28T09:48:34.000Z | 2022-01-28T09:48:34.000Z | deepocr/models/detection/predictor/pytorch.py | das-projects/deepOCR | ffc6db691605b7b4837da9619ab6e918fa1c18de | [
"Apache-2.0"
] | null | null | null | deepocr/models/detection/predictor/pytorch.py | das-projects/deepOCR | ffc6db691605b7b4837da9619ab6e918fa1c18de | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2022, Arijit Das.
# Code adapted from doctr and huggingface
# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.
from typing import Any, List, Union
import numpy as np
import torch
from torch i... | 30.207547 | 111 | 0.665209 |
37d818c6c8e76aef3cd39ee6847361955dd32599 | 8,584 | py | Python | src/python/turicreate/test/test_util.py | Bpowers4/turicreate | 73dad213cc1c4f74337b905baea2b3a1e5a0266c | [
"BSD-3-Clause"
] | 1 | 2020-02-21T02:24:45.000Z | 2020-02-21T02:24:45.000Z | src/python/turicreate/test/test_util.py | Bpowers4/turicreate | 73dad213cc1c4f74337b905baea2b3a1e5a0266c | [
"BSD-3-Clause"
] | 2 | 2019-03-28T00:17:14.000Z | 2019-03-28T00:17:47.000Z | src/python/turicreate/test/test_util.py | Bpowers4/turicreate | 73dad213cc1c4f74337b905baea2b3a1e5a0266c | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright © 2017 Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can
# be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
from __future__ import print_function as _
from __future__ import division as _
from... | 35.471074 | 85 | 0.632106 |
060418e1c83a7a5463c768915fb7e44420ada077 | 2,328 | py | Python | src/601_700/0639_decode-ways-ii/decode-ways-ii.py | himichael/LeetCode | d54f48e785af3d47a2a67a95fd3343d2b23f8ae5 | [
"Apache-2.0"
] | 1 | 2019-12-18T06:08:47.000Z | 2019-12-18T06:08:47.000Z | src/601_700/0639_decode-ways-ii/decode-ways-ii.py | himichael/LeetCode | d54f48e785af3d47a2a67a95fd3343d2b23f8ae5 | [
"Apache-2.0"
] | 1 | 2019-05-18T09:35:22.000Z | 2019-05-18T09:35:22.000Z | src/601_700/0639_decode-ways-ii/decode-ways-ii.py | himichael/LeetCode | d54f48e785af3d47a2a67a95fd3343d2b23f8ae5 | [
"Apache-2.0"
] | null | null | null | class Solution(object):
def numDecodings(self, s):
n = len(s)
cache = {}
M = 10 ** 9 + 7
def dfs(i):
if i >= n:
return 1
if i in cache:
return cache[i]
res = 0
if s[i] == '*':
res = 9 * d... | 34.235294 | 68 | 0.270619 |
3966694bc9cdbc7f2cb633478c58c3c89c53a5fd | 1,042 | py | Python | day24.py | binarygondola/adventofcode-2017 | fbcb545c19df6c5b3169714e74686d9a7b28a598 | [
"MIT"
] | null | null | null | day24.py | binarygondola/adventofcode-2017 | fbcb545c19df6c5b3169714e74686d9a7b28a598 | [
"MIT"
] | null | null | null | day24.py | binarygondola/adventofcode-2017 | fbcb545c19df6c5b3169714e74686d9a7b28a598 | [
"MIT"
] | null | null | null | def make_bridge(parts, current, end, m):
possible = [x for x in parts if end == x[0] or end == x[1]]
for p in possible:
parts.remove(p)
current.append(p)
if end == p[0]:
tmp = p[1]
else:
tmp = p[0]
b = sum(sum(x) for x in current)
max_len... | 22.170213 | 64 | 0.537428 |
fb42363fe0404e63e343602742d7855cdce91e38 | 5,400 | py | Python | hotpot_km/tests/test_pooled_manager.py | maartenbreddels/hotpot_km | 59640727ebef76064c9a4681a1f425987a1cccb4 | [
"BSD-3-Clause"
] | null | null | null | hotpot_km/tests/test_pooled_manager.py | maartenbreddels/hotpot_km | 59640727ebef76064c9a4681a1f425987a1cccb4 | [
"BSD-3-Clause"
] | null | null | null | hotpot_km/tests/test_pooled_manager.py | maartenbreddels/hotpot_km | 59640727ebef76064c9a4681a1f425987a1cccb4 | [
"BSD-3-Clause"
] | null | null | null |
from contextlib import contextmanager
from subprocess import PIPE
from unittest import TestCase
from jupyter_client.kernelspec import NATIVE_KERNEL_NAME
import pytest
from traitlets.config.loader import Config
from .. import (
PooledKernelManager,
MaximumKernelsException,
)
from .utils import shutdown_all_d... | 31.952663 | 91 | 0.629074 |
e6f48b68068814bbbb753e2aa6e8f723ebb74094 | 7,170 | py | Python | apyfal/_iterators.py | Accelize/apyfal | 22dfe791e0956d3d3353daeba0c7a21dfe2f9b77 | [
"Apache-2.0"
] | 5 | 2018-09-23T23:15:06.000Z | 2019-07-04T00:19:44.000Z | apyfal/_iterators.py | Accelize/apyfal | 22dfe791e0956d3d3353daeba0c7a21dfe2f9b77 | [
"Apache-2.0"
] | null | null | null | apyfal/_iterators.py | Accelize/apyfal | 22dfe791e0956d3d3353daeba0c7a21dfe2f9b77 | [
"Apache-2.0"
] | 4 | 2018-07-17T08:39:41.000Z | 2020-01-10T23:15:38.000Z | # coding=utf-8
"""Accelerator iterators"""
from concurrent.futures import ThreadPoolExecutor, as_completed
from itertools import chain
import re
from apyfal.host import Host
import apyfal.configuration as _cfg
import apyfal.exceptions as _exc
class _LazyClass:
"""
Class that get attributes from cached dict o... | 33.194444 | 90 | 0.65537 |
b145ad21c6109e164655f6075698d6fa4f10288c | 393 | py | Python | profiles/wsgi.py | rithik220/profiles-rest-api | d960ff98d75bec32f89fcfa11d6daa53f1b1db2d | [
"MIT"
] | null | null | null | profiles/wsgi.py | rithik220/profiles-rest-api | d960ff98d75bec32f89fcfa11d6daa53f1b1db2d | [
"MIT"
] | null | null | null | profiles/wsgi.py | rithik220/profiles-rest-api | d960ff98d75bec32f89fcfa11d6daa53f1b1db2d | [
"MIT"
] | null | null | null | """
WSGI config for profiles project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETT... | 23.117647 | 78 | 0.78626 |
98d628cc76db2b0feeb5f0b1db865c74fc5174ac | 518 | py | Python | isubscribe/migrations/0003_auto_20161007_2110.py | ilavender/sensu_drive | e874024aa157c7076ccc9465e9d6ae00a4f19fd0 | [
"MIT"
] | 71 | 2016-12-25T12:06:07.000Z | 2021-02-21T21:14:48.000Z | isubscribe/migrations/0003_auto_20161007_2110.py | ilavender/sensu_drive | e874024aa157c7076ccc9465e9d6ae00a4f19fd0 | [
"MIT"
] | 7 | 2016-12-23T23:18:45.000Z | 2021-06-10T18:58:14.000Z | isubscribe/migrations/0003_auto_20161007_2110.py | ilavender/sensu_drive | e874024aa157c7076ccc9465e9d6ae00a4f19fd0 | [
"MIT"
] | 30 | 2017-01-01T16:18:19.000Z | 2021-04-21T15:06:47.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-07 21:10
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('isubscribe', '0002_auto_20161007_2108'),
]
operations = [
migrations.AlterF... | 24.666667 | 111 | 0.6139 |
08f992626f6e23ddaa9284dafd3c3fe3f2a3c49c | 46 | py | Python | Exercicios/ex016/teste1.py | Carlos-Allison/Curso_de_HTML5_e_CCS3 | 20f2a639d792cd9e49ff9b54eeb69de44ba418e9 | [
"MIT"
] | null | null | null | Exercicios/ex016/teste1.py | Carlos-Allison/Curso_de_HTML5_e_CCS3 | 20f2a639d792cd9e49ff9b54eeb69de44ba418e9 | [
"MIT"
] | null | null | null | Exercicios/ex016/teste1.py | Carlos-Allison/Curso_de_HTML5_e_CCS3 | 20f2a639d792cd9e49ff9b54eeb69de44ba418e9 | [
"MIT"
] | null | null | null | def carro():
print('oi, mundo do caralho') | 23 | 33 | 0.630435 |
60177bcc979e6a6e5b4dfa37be153087d3d89cfb | 9,917 | py | Python | test/python/pulse/test_discrete_pulses.py | siddharthdangwal/qiskit-terra | af34eb06f28de18ef276e1e9029c62a4e35dd6a9 | [
"Apache-2.0"
] | null | null | null | test/python/pulse/test_discrete_pulses.py | siddharthdangwal/qiskit-terra | af34eb06f28de18ef276e1e9029c62a4e35dd6a9 | [
"Apache-2.0"
] | null | null | null | test/python/pulse/test_discrete_pulses.py | siddharthdangwal/qiskit-terra | af34eb06f28de18ef276e1e9029c62a4e35dd6a9 | [
"Apache-2.0"
] | 1 | 2020-07-13T17:56:46.000Z | 2020-07-13T17:56:46.000Z | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... | 41.493724 | 96 | 0.658163 |
817a7b305e39993614036e0a1674a611abd0b122 | 3,185 | py | Python | OathSaveFileParser.py | Ecophagy/OathSaveFileParser | c61d33417f7e7233b7289ceabd7604e48b7fdeec | [
"MIT"
] | 1 | 2021-04-05T07:59:59.000Z | 2021-04-05T07:59:59.000Z | OathSaveFileParser.py | Ecophagy/OathSaveFileParser | c61d33417f7e7233b7289ceabd7604e48b7fdeec | [
"MIT"
] | null | null | null | OathSaveFileParser.py | Ecophagy/OathSaveFileParser | c61d33417f7e7233b7289ceabd7604e48b7fdeec | [
"MIT"
] | null | null | null | import json
from os import path
from pathlib import Path
from suits import Suit
from visions import visions
import tkinter as tk
from tkinter import filedialog
tts_save_location = path.join(str(Path.home()), "Documents", "My Games", "Tabletop Simulator", "Saves")
game_state_key = "LuaScriptState"
dispossessed_cards_k... | 31.534653 | 103 | 0.686342 |
2c88d693c8677652e9d81616596b3c6d534e7491 | 1,522 | py | Python | src/flask_tat/http2kafka.py | cdumay/flask-tat | 94a1cbee2e4be424eefc9009004df819e90c2b32 | [
"Apache-2.0"
] | null | null | null | src/flask_tat/http2kafka.py | cdumay/flask-tat | 94a1cbee2e4be424eefc9009004df819e90c2b32 | [
"Apache-2.0"
] | null | null | null | src/flask_tat/http2kafka.py | cdumay/flask-tat | 94a1cbee2e4be424eefc9009004df819e90c2b32 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
.. codeauthor:: Cédric Dumay <cedric.dumay@gmail.com>
"""
from cdumay_rest_client.client import RESTClient
from flask_tat.base import BaseTATClient
class HTTP2KafkaClient(BaseTATClient):
def message_add(self, topic, **kwargs):
return self.client.do_requ... | 32.382979 | 77 | 0.580815 |
d06787023b511b1cd1c7ac93c9a31c5366cb9162 | 5,308 | py | Python | modeling/backbones/deit.py | BrandonHanx/reid-strong-baseline | 9df1dc3d6217af2d3cb40d0627f77b36a66e5f89 | [
"MIT"
] | null | null | null | modeling/backbones/deit.py | BrandonHanx/reid-strong-baseline | 9df1dc3d6217af2d3cb40d0627f77b36a66e5f89 | [
"MIT"
] | null | null | null | modeling/backbones/deit.py | BrandonHanx/reid-strong-baseline | 9df1dc3d6217af2d3cb40d0627f77b36a66e5f89 | [
"MIT"
] | null | null | null | import copy
import math
from functools import partial
import numpy as np
import timm.models.vision_transformer as ViTcls
import torch
import torch.nn.functional as F
from timm.models.helpers import load_pretrained
class ViT(ViTcls.VisionTransformer):
def __init__(self, mode, **kwargs):
super().__init__(*... | 34.025641 | 96 | 0.623964 |
62c8449617cd10b2b9ad513a2b62d50465bea566 | 24,374 | py | Python | compiler/dna/parser/parser.py | AnonymousDeveloper65535/libpandadna | 3110a8d576d22093e4c735081c5f639d28397a17 | [
"BSD-3-Clause"
] | 1 | 2021-02-13T22:40:50.000Z | 2021-02-13T22:40:50.000Z | compiler/dna/parser/parser.py | AnonymousDeveloper65535/libpandadna | 3110a8d576d22093e4c735081c5f639d28397a17 | [
"BSD-3-Clause"
] | 1 | 2018-07-28T20:07:04.000Z | 2018-07-30T18:28:34.000Z | compiler/dna/parser/parser.py | AnonymousDeveloper65535/libpandadna | 3110a8d576d22093e4c735081c5f639d28397a17 | [
"BSD-3-Clause"
] | 2 | 2019-12-02T01:39:10.000Z | 2021-02-13T22:41:00.000Z | import os
from dna.components.DNAAnimBuilding import DNAAnimBuilding
from dna.components.DNAAnimProp import DNAAnimProp
from dna.components.DNABattleCell import DNABattleCell
from dna.components.DNACornice import DNACornice
from dna.components.DNADoor import DNADoor
from dna.components.DNAFlatBuilding import DNAFlatBui... | 23.618217 | 88 | 0.613071 |
3c0e30fd8826a6d64e72c087d608db1e0990c05f | 23,667 | py | Python | cardpay/api/payments_api.py | Sinkler/python-sdk-v2 | a1ad7cc9900f8adf967ca4dec0bb05d8eddc2999 | [
"MIT"
] | null | null | null | cardpay/api/payments_api.py | Sinkler/python-sdk-v2 | a1ad7cc9900f8adf967ca4dec0bb05d8eddc2999 | [
"MIT"
] | null | null | null | cardpay/api/payments_api.py | Sinkler/python-sdk-v2 | a1ad7cc9900f8adf967ca4dec0bb05d8eddc2999 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
CardPay REST API
Welcome to the CardPay REST API. The CardPay API uses HTTP verbs and a [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) resources endpoint structure (see more info about REST). Request and response payloads are formatted as JSON. Merchant uses API to c... | 42.490126 | 546 | 0.620357 |
f530970a2ccba43192e634aa9f1b6a2bea51339a | 839 | py | Python | ykdl/extractors/bilibili/vc.py | panda-mute/ykdl | 56cea24f1513f21aedbe80b75c25f7c3b1e07704 | [
"MIT"
] | null | null | null | ykdl/extractors/bilibili/vc.py | panda-mute/ykdl | 56cea24f1513f21aedbe80b75c25f7c3b1e07704 | [
"MIT"
] | null | null | null | ykdl/extractors/bilibili/vc.py | panda-mute/ykdl | 56cea24f1513f21aedbe80b75c25f7c3b1e07704 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from .._common import *
class BiliVC(VideoExtractor):
name = '哔哩哔哩 小视频 (Bili VC)'
def prepare(self):
info = VideoInfo(self.name)
self.vid = match1(self.url, 'video/(\d+)')
video_data = get_response(
'https://api.vc.bilibili.com/clip/v1/video/... | 25.424242 | 67 | 0.539928 |
0d97cc9704487494d5ab19baa806a7d3e64d8b5e | 123 | py | Python | simfile/_private/dedent.py | ianklatzco/simfile | 8f4ec2fb9437b4071f6f92cca3d8de1b4071a2bc | [
"MIT"
] | 22 | 2017-04-24T05:37:13.000Z | 2022-03-08T00:41:37.000Z | simfile/_private/dedent.py | ianklatzco/simfile | 8f4ec2fb9437b4071f6f92cca3d8de1b4071a2bc | [
"MIT"
] | 10 | 2021-05-31T01:21:56.000Z | 2022-03-17T04:26:54.000Z | simfile/_private/dedent.py | ianklatzco/simfile | 8f4ec2fb9437b4071f6f92cca3d8de1b4071a2bc | [
"MIT"
] | 3 | 2019-06-05T15:23:53.000Z | 2021-09-11T02:39:36.000Z | from textwrap import dedent
def dedent_and_trim(string: str) -> str:
return dedent(string.lstrip('\r\n').rstrip(' ')) | 24.6 | 52 | 0.699187 |
500a52a206b7dbc231a02183c2e61b698775f744 | 4,496 | py | Python | env/lib/python3.6/site-packages/django_coverage/utils/module_tools/module_walker.py | anthowen/duplify | 846d01c1b21230937fdf0281b0cf8c0b08a8c24e | [
"MIT"
] | 1 | 2019-04-21T18:57:57.000Z | 2019-04-21T18:57:57.000Z | env/lib/python3.6/site-packages/django_coverage/utils/module_tools/module_walker.py | anthowen/duplify | 846d01c1b21230937fdf0281b0cf8c0b08a8c24e | [
"MIT"
] | null | null | null | env/lib/python3.6/site-packages/django_coverage/utils/module_tools/module_walker.py | anthowen/duplify | 846d01c1b21230937fdf0281b0cf8c0b08a8c24e | [
"MIT"
] | null | null | null | """
Copyright 2009 55 Minutes (http://www.55minutes.com)
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 t... | 33.058824 | 77 | 0.604315 |
fc3df84d8c1609864fd145a2874cb5a587e3b768 | 2,334 | py | Python | tests/models/test_vision.py | lavoiems/lightning-bolts | 208e92ba3dcdbc029afd37e09ec9461fbcf3f293 | [
"Apache-2.0"
] | 822 | 2020-04-21T03:30:43.000Z | 2021-03-07T06:41:31.000Z | tests/models/test_vision.py | lavoiems/lightning-bolts | 208e92ba3dcdbc029afd37e09ec9461fbcf3f293 | [
"Apache-2.0"
] | 538 | 2020-04-18T01:07:58.000Z | 2021-03-09T13:48:50.000Z | tests/models/test_vision.py | lavoiems/lightning-bolts | 208e92ba3dcdbc029afd37e09ec9461fbcf3f293 | [
"Apache-2.0"
] | 162 | 2020-04-17T15:44:54.000Z | 2021-03-09T14:04:02.000Z | import pytest
import torch
from packaging import version
from pytorch_lightning import LightningDataModule, Trainer
from pytorch_lightning import __version__ as pl_version
from pytorch_lightning import seed_everything
from torch.utils.data import DataLoader
from pl_bolts.datamodules import FashionMNISTDataModule, MNIS... | 26.522727 | 107 | 0.697087 |
d5589c962083b52d957741cadbcac76a2de5af2b | 4,614 | py | Python | theano/sparse/tests/test_sp2.py | intel/Theano-dev | 6ca6fd4646f9e958058c7bce52cd51923c05c2f4 | [
"BSD-3-Clause"
] | 64 | 2016-10-02T20:41:56.000Z | 2020-03-11T14:59:40.000Z | theano/sparse/tests/test_sp2.py | intel/Theano-dev | 6ca6fd4646f9e958058c7bce52cd51923c05c2f4 | [
"BSD-3-Clause"
] | 4 | 2017-06-12T05:12:38.000Z | 2018-03-15T03:16:30.000Z | theano/sparse/tests/test_sp2.py | intel/Theano-dev | 6ca6fd4646f9e958058c7bce52cd51923c05c2f4 | [
"BSD-3-Clause"
] | 30 | 2016-10-27T21:59:00.000Z | 2021-02-20T09:55:14.000Z | from __future__ import absolute_import, print_function, division
import unittest
from nose.plugins.skip import SkipTest
import numpy
try:
import scipy.sparse as sp
except ImportError:
pass # The variable enable_sparse will be used to disable the test file.
import theano
from theano import config
from theano ... | 31.82069 | 78 | 0.55505 |
9d2c49c2e414ca26cb7ee9138aebc5ce489201b9 | 146 | py | Python | haweb/apps/issues/models.py | edilio/tobeawebproperty | 317205bf27ab76a430ea56a474e1739ee71f164e | [
"MIT"
] | null | null | null | haweb/apps/issues/models.py | edilio/tobeawebproperty | 317205bf27ab76a430ea56a474e1739ee71f164e | [
"MIT"
] | 4 | 2015-01-02T21:39:58.000Z | 2015-06-23T02:18:57.000Z | haweb/apps/issues/models.py | edilio/tobeawebproperty | 317205bf27ab76a430ea56a474e1739ee71f164e | [
"MIT"
] | null | null | null | from django.db import models
ISSUES_TYPE_OPTIONS = (
(1, 'Maintenance Issues'),
(2, 'Tenant Health Issues'),
(3, 'Safety Issues'),
)
| 18.25 | 32 | 0.636986 |
d61339c23639e7098fc2c352fd233c048038e0a8 | 5,401 | py | Python | tests/test_root_object_type.py | Informasjonsforvaltning/modelldcatnotordf | 995129ff9f6fb95f9a9d875b27f3aa14bac9b7f1 | [
"Apache-2.0"
] | 1 | 2020-11-29T18:36:21.000Z | 2020-11-29T18:36:21.000Z | tests/test_root_object_type.py | Informasjonsforvaltning/modelldcatnotordf | 995129ff9f6fb95f9a9d875b27f3aa14bac9b7f1 | [
"Apache-2.0"
] | 142 | 2020-10-07T08:52:55.000Z | 2021-11-18T15:09:31.000Z | tests/test_root_object_type.py | Informasjonsforvaltning/modelldcatnotordf | 995129ff9f6fb95f9a9d875b27f3aa14bac9b7f1 | [
"Apache-2.0"
] | null | null | null | """Test cases for the root object type module."""
from concepttordf import Concept
import pytest
from pytest_mock import MockFixture
from rdflib import Graph
from skolemizer.testutils import skolemization
from modelldcatnotordf.modelldcatno import RootObjectType
from tests.testutils import assert_isomorphic
"""
A te... | 36.248322 | 85 | 0.65673 |
227dba9107d875763f662515083c420a6e39b4d2 | 10,812 | py | Python | fake news challenge (FNC-1)/util.py | kishormishra3/DeepLearn | bc0dfad7b4694aa5d872b5bdddd6e3a17d139d7d | [
"MIT"
] | 1,756 | 2017-05-24T12:46:44.000Z | 2022-03-30T15:23:26.000Z | fake news challenge (FNC-1)/util.py | kshitizbhansali/DeepLearn | e4b72d921695062d5cc84f4968c3fb57e258428f | [
"Apache-2.0"
] | 20 | 2017-05-23T15:23:39.000Z | 2019-04-12T18:07:04.000Z | fake news challenge (FNC-1)/util.py | kshitizbhansali/DeepLearn | e4b72d921695062d5cc84f4968c3fb57e258428f | [
"Apache-2.0"
] | 355 | 2017-05-29T12:37:19.000Z | 2022-01-25T15:23:50.000Z | # -*- coding: utf-8 -*-
from csv import DictReader
from csv import DictWriter
import numpy as np
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.feature_extraction.text import TfidfTransformer
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise imp... | 42.070039 | 121 | 0.584073 |
36e9d603260d35f07378e699ad3aaf617af8ddb3 | 46,998 | py | Python | daal4py/sklearn/linear_model/_logistic_path_0_21.py | agorshk/daal4py | 58a9b2301c47cd2d5144a403a59c210e10b75f8f | [
"Apache-2.0"
] | null | null | null | daal4py/sklearn/linear_model/_logistic_path_0_21.py | agorshk/daal4py | 58a9b2301c47cd2d5144a403a59c210e10b75f8f | [
"Apache-2.0"
] | null | null | null | daal4py/sklearn/linear_model/_logistic_path_0_21.py | agorshk/daal4py | 58a9b2301c47cd2d5144a403a59c210e10b75f8f | [
"Apache-2.0"
] | null | null | null | #
#*******************************************************************************
# Copyright 2014-2020 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.a... | 44.379603 | 112 | 0.575365 |
7a4b43adb96afcf047df0bdc3dea6b32a6926822 | 12,377 | py | Python | sourcecode/src/vx/bone/Util.py | ivarvb/BONE | 92efabe4873495e5e7d35a953135f414b4e2dcb0 | [
"MIT"
] | null | null | null | sourcecode/src/vx/bone/Util.py | ivarvb/BONE | 92efabe4873495e5e7d35a953135f414b4e2dcb0 | [
"MIT"
] | null | null | null | sourcecode/src/vx/bone/Util.py | ivarvb/BONE | 92efabe4873495e5e7d35a953135f414b4e2dcb0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Author: Ivar
"""
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import os
import ujson
import copy
from datetime import datetime
class Util:
@staticmethod
def write(file, obj):
with open(file, "w") as fi... | 32.830239 | 138 | 0.492446 |
f0a67a1431c3a0c3327f1b9af36c6f8e1ac7d22e | 1,612 | py | Python | chariot/transformer/tokenizer/ja_tokenizer.py | Y-Kuro-u/chariot | 032f3eecdd55b30c65351e1e636c939c4b20919e | [
"Apache-2.0"
] | 134 | 2018-06-11T01:40:14.000Z | 2021-11-15T12:34:38.000Z | chariot/transformer/tokenizer/ja_tokenizer.py | Y-Kuro-u/chariot | 032f3eecdd55b30c65351e1e636c939c4b20919e | [
"Apache-2.0"
] | 10 | 2018-06-17T10:45:50.000Z | 2021-04-05T05:51:11.000Z | chariot/transformer/tokenizer/ja_tokenizer.py | Y-Kuro-u/chariot | 032f3eecdd55b30c65351e1e636c939c4b20919e | [
"Apache-2.0"
] | 8 | 2019-02-23T06:43:21.000Z | 2021-02-18T06:05:11.000Z | from collections import namedtuple
from chariot.transformer.tokenizer.token import Token
class MeCabTokenizer():
JanomeToken = namedtuple("JanomeToken", ("surface", "part_of_speech",
"infl_type", "infl_form",
"base_form", "r... | 32.897959 | 73 | 0.491935 |
2cf8130e9ecd14f6389b8db60bed4707ccdcd037 | 2,050 | py | Python | mlfromscratch/examples/lasso_regression.py | Krishna00111/Machine-Learning-from-Scratch | 5d6f5b1a2096acbb57a060385e471123b77b9a68 | [
"MIT"
] | null | null | null | mlfromscratch/examples/lasso_regression.py | Krishna00111/Machine-Learning-from-Scratch | 5d6f5b1a2096acbb57a060385e471123b77b9a68 | [
"MIT"
] | null | null | null | mlfromscratch/examples/lasso_regression.py | Krishna00111/Machine-Learning-from-Scratch | 5d6f5b1a2096acbb57a060385e471123b77b9a68 | [
"MIT"
] | null | null | null | from __future__ import print_function
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
# Import helper functions
from mlfromscratch.supervised_learning import LassoRegression
from mlfromscratch.utils import k_fold_cross_validation_sets, normalize, mean_squared_error
from mlfromscratch.utils... | 32.539683 | 92 | 0.640976 |
0d342ac7c6277d255d46456db4279d130eb796fa | 657 | py | Python | src/shortner/validators.py | diabolicfreak/url_shortner | 4ea30962afaed530e873e6613641883a60f380c7 | [
"MIT"
] | null | null | null | src/shortner/validators.py | diabolicfreak/url_shortner | 4ea30962afaed530e873e6613641883a60f380c7 | [
"MIT"
] | null | null | null | src/shortner/validators.py | diabolicfreak/url_shortner | 4ea30962afaed530e873e6613641883a60f380c7 | [
"MIT"
] | null | null | null | from django.core.validators import URLValidator
from django.core.exceptions import ValidationError
def validate_url(value):
url_validator = URLValidator()
value_1_valid = False
value_2_valid = False
try:
url_validator(value)
except:
value_1_valid = True
value_2 = "http://"+va... | 21.9 | 59 | 0.681887 |
61bb009ff8f21c78ebe60a67b2d013135f2b8a27 | 3,453 | py | Python | tests/components/spaceapi/test_init.py | shanbs/home-assistant | 818776d2b4f11e4f51992dc88bc0a6f9055833b2 | [
"Apache-2.0"
] | 4 | 2019-07-03T22:36:57.000Z | 2019-08-10T15:33:25.000Z | tests/components/spaceapi/test_init.py | shanbs/home-assistant | 818776d2b4f11e4f51992dc88bc0a6f9055833b2 | [
"Apache-2.0"
] | 7 | 2019-08-23T05:26:02.000Z | 2022-03-11T23:57:18.000Z | tests/components/spaceapi/test_init.py | shanbs/home-assistant | 818776d2b4f11e4f51992dc88bc0a6f9055833b2 | [
"Apache-2.0"
] | 3 | 2019-04-28T16:35:45.000Z | 2020-05-28T15:21:59.000Z | """The tests for the Home Assistant SpaceAPI component."""
# pylint: disable=protected-access
from unittest.mock import patch
import pytest
from tests.common import mock_coro
from homeassistant.components.spaceapi import (
DOMAIN, SPACEAPI_VERSION, URL_API_SPACEAPI)
from homeassistant.setup import async_setup_com... | 30.289474 | 67 | 0.580075 |
3122d364c922e9d4ca267ce7689339686d4df60a | 58,287 | py | Python | src/azure-cli/azure/cli/command_modules/storage/_validators_azure_stack.py | akashsinghal/azure-cli | 8ab2f7604a834de790bdea849b3e83f2466428b9 | [
"MIT"
] | 2 | 2020-08-08T11:00:25.000Z | 2020-08-08T11:00:30.000Z | src/azure-cli/azure/cli/command_modules/storage/_validators_azure_stack.py | akashsinghal/azure-cli | 8ab2f7604a834de790bdea849b3e83f2466428b9 | [
"MIT"
] | 1 | 2021-06-02T02:49:48.000Z | 2021-06-02T02:49:48.000Z | src/azure-cli/azure/cli/command_modules/storage/_validators_azure_stack.py | akashsinghal/azure-cli | 8ab2f7604a834de790bdea849b3e83f2466428b9 | [
"MIT"
] | 1 | 2020-07-31T17:22:13.000Z | 2020-07-31T17:22:13.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 45.009266 | 120 | 0.676686 |
0502674c44ef059c42049a98f38ffc9d89f1c684 | 5,093 | py | Python | end2end_detector.py | penolove/keras-yolo3 | 4b0b9a3c998b35be73a3509baf275ff862a086de | [
"MIT"
] | null | null | null | end2end_detector.py | penolove/keras-yolo3 | 4b0b9a3c998b35be73a3509baf275ff862a086de | [
"MIT"
] | null | null | null | end2end_detector.py | penolove/keras-yolo3 | 4b0b9a3c998b35be73a3509baf275ff862a086de | [
"MIT"
] | null | null | null | import argparse
import os
import arrow
import cv2
import time
import PIL
from eyewitness.config import (IN_MEMORY, BBOX, RAW_IMAGE_PATH)
from eyewitness.image_id import ImageId
from eyewitness.image_utils import (ImageProducer, swap_channel_rgb_bgr, ImageHandler, Image)
from eyewitness.result_handler.db_writer import ... | 34.646259 | 94 | 0.709798 |
8c60a1cc690a0a300ae5ee018dfa35dd018b5f0a | 297 | py | Python | nj_resoldhouse/pipelines.py | TedMore/nj_resoldhouse | 5851135df23b5d09e7162098c724195f1d105613 | [
"MIT"
] | null | null | null | nj_resoldhouse/pipelines.py | TedMore/nj_resoldhouse | 5851135df23b5d09e7162098c724195f1d105613 | [
"MIT"
] | null | null | null | nj_resoldhouse/pipelines.py | TedMore/nj_resoldhouse | 5851135df23b5d09e7162098c724195f1d105613 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
class NjResoldhousePipeline(object):
def process_item(self, item, spider):
return item
| 24.75 | 65 | 0.707071 |
945a765bb6b0aaaeb864b456df323a834a890d96 | 17,009 | py | Python | readthedocs/rtd_tests/tests/test_sync_versions.py | kennethlarsen/readthedocs.org | 735d630d83f79ae24772d10e66fd35b8f5675a30 | [
"MIT"
] | 2 | 2018-01-14T14:04:00.000Z | 2021-02-07T19:25:45.000Z | readthedocs/rtd_tests/tests/test_sync_versions.py | kennethlarsen/readthedocs.org | 735d630d83f79ae24772d10e66fd35b8f5675a30 | [
"MIT"
] | 4 | 2021-03-31T20:17:21.000Z | 2021-12-13T20:49:19.000Z | readthedocs/rtd_tests/tests/test_sync_versions.py | kennethlarsen/readthedocs.org | 735d630d83f79ae24772d10e66fd35b8f5675a30 | [
"MIT"
] | 1 | 2021-01-28T19:18:28.000Z | 2021-01-28T19:18:28.000Z | # -*- coding: utf-8 -*-
from __future__ import (
absolute_import, division, print_function, unicode_literals)
import json
from django.test import TestCase
from readthedocs.builds.constants import BRANCH, STABLE, TAG
from readthedocs.builds.models import Version
from readthedocs.projects.models import Project
... | 31.556586 | 83 | 0.491857 |
fd338e1b3f2941410376544f9ebe22dd3b60b564 | 1,986 | py | Python | script.mrknow.urlresolver/lib/urlresolver9/plugins/sharerepo.py | mrknow/filmkodi | 0162cde9ae25ddbf4a69330948714833ff2f78c9 | [
"Apache-2.0"
] | 105 | 2015-11-28T00:03:11.000Z | 2021-05-05T20:47:42.000Z | script.mrknow.urlresolver/lib/urlresolver9/plugins/sharerepo.py | rrosajp/filmkodi | 0162cde9ae25ddbf4a69330948714833ff2f78c9 | [
"Apache-2.0"
] | 918 | 2015-11-28T14:12:40.000Z | 2022-03-23T20:24:49.000Z | script.mrknow.urlresolver/lib/urlresolver9/plugins/sharerepo.py | rrosajp/filmkodi | 0162cde9ae25ddbf4a69330948714833ff2f78c9 | [
"Apache-2.0"
] | 111 | 2015-12-01T14:06:10.000Z | 2020-08-01T10:44:39.000Z | '''
Sharerepo urlresolver plugin
Copyright (C) 2013 Vinnydude
This program 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, either version 3 of the License, or
(at your option) any later version.
This program is ... | 34.241379 | 95 | 0.656596 |
ac743b6e8a8b04df3a5ace42ec013316e3709b47 | 102 | py | Python | core/miscellaneous.py | 0alpha/magma | d302029b1f36ba1fdae6c776a47405ceb72e9817 | [
"MIT"
] | 10 | 2018-03-18T13:00:44.000Z | 2021-07-10T09:22:50.000Z | core/miscellaneous.py | 0alpha/magma | d302029b1f36ba1fdae6c776a47405ceb72e9817 | [
"MIT"
] | 1 | 2018-06-05T07:32:50.000Z | 2018-06-05T07:32:50.000Z | core/miscellaneous.py | 0alpha/magma | d302029b1f36ba1fdae6c776a47405ceb72e9817 | [
"MIT"
] | 5 | 2018-06-05T07:12:03.000Z | 2021-12-09T19:08:03.000Z | import time
def format_time(millis):
return time.strftime('%H:%M:%S', time.gmtime(millis/1000))
| 17 | 62 | 0.696078 |
27184996077a27b142d68df24e0284e55439a7bf | 5,838 | py | Python | homeassistant/config/custom_components/home_connect_alt/switch.py | yuvalabou/homeassistant | e25885db33d2144455928d07d7e9b044278ba291 | [
"Unlicense"
] | 5 | 2022-02-17T09:22:24.000Z | 2022-03-15T20:14:50.000Z | homeassistant/config/custom_components/home_connect_alt/switch.py | yuvalabou/homeassistant | e25885db33d2144455928d07d7e9b044278ba291 | [
"Unlicense"
] | 11 | 2022-02-11T06:56:55.000Z | 2022-03-20T15:53:43.000Z | homeassistant/config/custom_components/home_connect_alt/switch.py | yuvalabou/homeassistant | e25885db33d2144455928d07d7e9b044278ba291 | [
"Unlicense"
] | 5 | 2022-02-13T11:15:58.000Z | 2022-03-05T19:07:57.000Z | """ Implement the Switch entities of this implementation """
from __future__ import annotations
from typing import Any
from home_connect_async import Appliance, HomeConnect, HomeConnectError, Events
from homeassistant.components.switch import SwitchEntity
from homeassistant.core import HomeAssistant
from homeassistan... | 38.662252 | 137 | 0.667181 |
5a6ab35298c09adaf625595ee3b2ef77f9b92935 | 661 | py | Python | goticket/users/tests/test_drf_urls.py | pmburu/GoTicketV2 | 97ca68a9ca5e1c5793c03c6983c5b343f59dc4d2 | [
"MIT"
] | null | null | null | goticket/users/tests/test_drf_urls.py | pmburu/GoTicketV2 | 97ca68a9ca5e1c5793c03c6983c5b343f59dc4d2 | [
"MIT"
] | 7 | 2022-02-14T23:32:37.000Z | 2022-03-31T23:29:05.000Z | goticket/users/tests/test_drf_urls.py | pmburu/GoTicketV2 | 97ca68a9ca5e1c5793c03c6983c5b343f59dc4d2 | [
"MIT"
] | null | null | null | import pytest
from django.urls import resolve, reverse
from goticket.users.models import User
pytestmark = pytest.mark.django_db
def test_user_detail(user: User):
assert (
reverse("api:user-detail", kwargs={"username": user.username})
== f"/api/users/{user.username}/"
)
assert resolve(f"... | 26.44 | 81 | 0.668684 |
e75b2790ee39809f0af144c1ba2b986396be6783 | 1,810 | py | Python | projects/faces/pcn/test.py | Bingwen-Hu/hackaway | 69727d76fd652390d9660e9ea4354ba5cc76dd5c | [
"BSD-2-Clause"
] | null | null | null | projects/faces/pcn/test.py | Bingwen-Hu/hackaway | 69727d76fd652390d9660e9ea4354ba5cc76dd5c | [
"BSD-2-Clause"
] | null | null | null | projects/faces/pcn/test.py | Bingwen-Hu/hackaway | 69727d76fd652390d9660e9ea4354ba5cc76dd5c | [
"BSD-2-Clause"
] | null | null | null | from pcn import *
import unittest
class TestPCN(unittest.TestCase):
def test_smooth_angel(self):
a = 120
b = 60
output = smooth_angle(a, b)
self.assertEqual(output, 90)
def test_iou(self):
w1 = Window2(100, 20, 40, 60, 80.5, 0.5, 1)
w2 = Window2(90, 22, 38, 50, ... | 34.807692 | 66 | 0.527072 |
88deadcd31da26e8fa46c82f8684f5fda405572b | 9,215 | py | Python | autokeras/utils/io_utils.py | lc0/autokeras | 413508a5f6aaa38ee7aba719aadb057c0b029591 | [
"Apache-2.0"
] | 3,979 | 2019-04-02T02:01:52.000Z | 2022-03-31T16:53:14.000Z | autokeras/utils/io_utils.py | lc0/autokeras | 413508a5f6aaa38ee7aba719aadb057c0b029591 | [
"Apache-2.0"
] | 939 | 2019-04-02T18:13:53.000Z | 2022-03-31T16:25:08.000Z | autokeras/utils/io_utils.py | lc0/autokeras | 413508a5f6aaa38ee7aba719aadb057c0b029591 | [
"Apache-2.0"
] | 826 | 2019-04-02T00:53:31.000Z | 2022-03-31T10:11:02.000Z | # Copyright 2020 The AutoKeras 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 i... | 36.56746 | 85 | 0.660119 |
cb86ef9c345a6a15f9b72213fb84e8654651eebc | 1,257 | py | Python | isiscb/isisdata/migrations/0005_searchquery.py | bgopalachary/IsisCB | c28e3f504eea60ebeff38318d8bb2071abb28ebb | [
"MIT"
] | 4 | 2016-01-25T20:35:33.000Z | 2020-04-07T15:39:52.000Z | isiscb/isisdata/migrations/0005_searchquery.py | bgopalachary/IsisCB | c28e3f504eea60ebeff38318d8bb2071abb28ebb | [
"MIT"
] | 41 | 2015-08-19T17:34:41.000Z | 2022-03-11T23:19:01.000Z | isiscb/isisdata/migrations/0005_searchquery.py | bgopalachary/IsisCB | c28e3f504eea60ebeff38318d8bb2071abb28ebb | [
"MIT"
] | 2 | 2020-11-25T20:18:18.000Z | 2021-06-24T15:15:41.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('isisdata', '0004_auto_20151025_2110'),
... | 41.9 | 167 | 0.636436 |
a4f18e1ee8b3e5917fb0eb2f227147a8965393ef | 2,085 | py | Python | research/cv/ssd_mobilenetV2_FPNlite/src/init_params.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/ssd_mobilenetV2_FPNlite/src/init_params.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/ssd_mobilenetV2_FPNlite/src/init_params.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 44.361702 | 94 | 0.666667 |
be2300c02deaa684b9a7d8252bb2c8ef3e87806c | 18,269 | py | Python | backend/api.py | prasys/detecting-fake-text | de1fe92b726fa50849517f02233f86ee62f2435b | [
"Apache-2.0"
] | null | null | null | backend/api.py | prasys/detecting-fake-text | de1fe92b726fa50849517f02233f86ee62f2435b | [
"Apache-2.0"
] | null | null | null | backend/api.py | prasys/detecting-fake-text | de1fe92b726fa50849517f02233f86ee62f2435b | [
"Apache-2.0"
] | null | null | null | import numpy as np
import torch
import time
from pytorch_pretrained_bert import (GPT2LMHeadModel, GPT2Tokenizer,
BertTokenizer, BertForMaskedLM)
from .class_register import register_api
class AbstractLanguageChecker():
"""
Abstract Class that defines the Backend API of GL... | 42.09447 | 337 | 0.583502 |
b9bab67b3478fba0284f86826d4a92ee106550b1 | 3,904 | py | Python | code/models/get_random_cnn_params.py | mrbarbasa/kaggle-spooky-author | a2ded542288efa0e85a25426722619ed2542d98b | [
"MIT"
] | 1 | 2018-10-09T04:57:03.000Z | 2018-10-09T04:57:03.000Z | code/models/get_random_cnn_params.py | mrbarbasa/kaggle-spooky-author | a2ded542288efa0e85a25426722619ed2542d98b | [
"MIT"
] | null | null | null | code/models/get_random_cnn_params.py | mrbarbasa/kaggle-spooky-author | a2ded542288efa0e85a25426722619ed2542d98b | [
"MIT"
] | null | null | null | import numpy as np
def get_random_cnn_params(normal_arch_threshold=0.8):
"""Retrieve random CNN parameters and hyperparameters.
Parameters
----------
normal_arch_threshold : float, optional
A fraction between 0 and 1 that specifies the probability of
using the normal CNN architecture o... | 41.978495 | 86 | 0.61373 |
7ca03a71c54b622873a8393041189ae284b9e123 | 45,226 | py | Python | comdb2/dbapi2.py | vishalbelsare/python-comdb2 | 05da300c739bcc7e63036ab79f8552165954035b | [
"Apache-2.0"
] | 20 | 2017-07-13T09:04:21.000Z | 2021-11-09T05:32:17.000Z | comdb2/dbapi2.py | vishalbelsare/python-comdb2 | 05da300c739bcc7e63036ab79f8552165954035b | [
"Apache-2.0"
] | 10 | 2017-07-12T20:15:26.000Z | 2021-12-22T20:04:49.000Z | comdb2/dbapi2.py | vishalbelsare/python-comdb2 | 05da300c739bcc7e63036ab79f8552165954035b | [
"Apache-2.0"
] | 21 | 2017-07-12T19:51:22.000Z | 2021-11-09T05:32:07.000Z | # Copyright 2017 Bloomberg Finance L.P.
# 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... | 39.39547 | 79 | 0.657277 |
beeccd82c643ace8391f7591995991251000781e | 1,458 | py | Python | sis_provisioner/tests/account_managers/test_terminate.py | uw-it-aca/bridge-sis-provisioner | 6dd31e5ef59263acbcade5e6e4f74b815c16bdee | [
"Apache-2.0"
] | null | null | null | sis_provisioner/tests/account_managers/test_terminate.py | uw-it-aca/bridge-sis-provisioner | 6dd31e5ef59263acbcade5e6e4f74b815c16bdee | [
"Apache-2.0"
] | 175 | 2016-07-18T23:25:45.000Z | 2022-02-07T20:44:05.000Z | sis_provisioner/tests/account_managers/test_terminate.py | uw-it-aca/bridge-sis-provisioner | 6dd31e5ef59263acbcade5e6e4f74b815c16bdee | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0
from django.test import TransactionTestCase
from unittest.mock import patch
from sis_provisioner.account_managers.terminate import TerminateUser
from sis_provisioner.account_managers.bridge_worker import BridgeWorker
from sis_provis... | 39.405405 | 71 | 0.758573 |
3221963c01409c2458b36cad2b5ce313f2a133a3 | 1,179 | py | Python | PositivosMedia1064.py | SricardoSdSouza/LogicaDeProgramacao | f39763bd3378640ff8de674c0b932f36fd09296a | [
"MIT"
] | null | null | null | PositivosMedia1064.py | SricardoSdSouza/LogicaDeProgramacao | f39763bd3378640ff8de674c0b932f36fd09296a | [
"MIT"
] | null | null | null | PositivosMedia1064.py | SricardoSdSouza/LogicaDeProgramacao | f39763bd3378640ff8de674c0b932f36fd09296a | [
"MIT"
] | null | null | null | '''
Leia 6 valores. Em seguida, mostre quantos destes valores digitados foram positivos. Na próxima linha, deve-se
mostrar a média de todos os valores positivos digitados, com um dígito após o ponto decimal.
Entrada = A entrada contém 6 números que podem ser valores inteiros ou de ponto flutuante. Pelo menos um destes... | 28.756098 | 111 | 0.641221 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.