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
1b96ffd78834b48c5e69e7914a7ad5e0db45e6ea
50,266
py
Python
src/cryptography/x509/extensions.py
abarto/cryptography
5526dca15bded0687e507a065b141694ee5f1530
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause" ]
2
2021-01-30T13:23:54.000Z
2021-06-07T21:35:19.000Z
src/cryptography/x509/extensions.py
abarto/cryptography
5526dca15bded0687e507a065b141694ee5f1530
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/cryptography/x509/extensions.py
abarto/cryptography
5526dca15bded0687e507a065b141694ee5f1530
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# 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 abc import datetime import hashlib import ipaddress from enum impo...
31.494987
79
0.648072
6e2219099741bde4aa9c49ba41f08ec7c990462e
3,111
py
Python
packit/utils/repo.py
cheese/packit
790b01a30575b6bfd680fdc991542ba60e40a9f2
[ "MIT" ]
1
2020-12-28T18:00:22.000Z
2020-12-28T18:00:22.000Z
packit/utils/repo.py
cheese/packit
790b01a30575b6bfd680fdc991542ba60e40a9f2
[ "MIT" ]
7
2020-12-28T19:57:35.000Z
2021-04-17T14:43:15.000Z
packit/utils/repo.py
cheese/packit
790b01a30575b6bfd680fdc991542ba60e40a9f2
[ "MIT" ]
null
null
null
# Copyright Contributors to the Packit project. # SPDX-License-Identifier: MIT import logging import tempfile from pathlib import Path from typing import Tuple, Optional, Union, List import git from ogr.parsing import parse_git_repo from packit.exceptions import PackitException logger = logging.getLogger(__name__) ...
30.203883
87
0.660559
bfcac2f292a5ae64e20851bbb719fa57aa75698e
3,353
py
Python
model/embedding/generator.py
ab3llini/News2Title
80b5117d5495890425ddeaddd77ef64624df5855
[ "MIT" ]
null
null
null
model/embedding/generator.py
ab3llini/News2Title
80b5117d5495890425ddeaddd77ef64624df5855
[ "MIT" ]
null
null
null
model/embedding/generator.py
ab3llini/News2Title
80b5117d5495890425ddeaddd77ef64624df5855
[ "MIT" ]
1
2019-11-04T01:17:40.000Z
2019-11-04T01:17:40.000Z
import os import sys import pickle from sklearn.model_selection import train_test_split from tqdm import tqdm import numpy as np this_path = os.path.dirname(os.path.realpath(__file__)) root_path = os.path.abspath(os.path.join(this_path, os.pardir, os.pardir)) sys.path.append(root_path) from model import config from m...
44.706667
142
0.584551
b575dda7ea0321844b657459f6924f4ee783733e
25
py
Python
main.py
fhk/lamborghini
e053204a4906c9b78d078359e9d7f6ca916d1690
[ "MIT" ]
2
2015-10-13T05:13:55.000Z
2018-06-22T22:54:59.000Z
main.py
fhk/lamborghini
e053204a4906c9b78d078359e9d7f6ca916d1690
[ "MIT" ]
2
2015-10-13T05:14:27.000Z
2015-10-13T06:10:13.000Z
main.py
fhk/lamborghini
e053204a4906c9b78d078359e9d7f6ca916d1690
[ "MIT" ]
null
null
null
def main(): return 0
8.333333
12
0.56
b8a93f5f44a1815d9fae147abde1a02d749d0c3a
4,148
py
Python
model.py
felixnon/foveated-visual-attention
7e7d9a5ef24ec42eb76ba72f783bb2227bdb4851
[ "MIT" ]
null
null
null
model.py
felixnon/foveated-visual-attention
7e7d9a5ef24ec42eb76ba72f783bb2227bdb4851
[ "MIT" ]
null
null
null
model.py
felixnon/foveated-visual-attention
7e7d9a5ef24ec42eb76ba72f783bb2227bdb4851
[ "MIT" ]
null
null
null
import torch import torch.nn as nn from modules import baseline_network from modules import glimpse_network, core_network from modules import action_network, location_network class RecurrentAttention(nn.Module): """ A Recurrent Model of Visual Attention (RAM) [1]. RAM is a recurrent neural network that ...
38.407407
73
0.606557
7402b3d8afe25ea2ed099a1f31e179ca7ae793e7
2,566
py
Python
rpyc/core/channel.py
DanielShaulov/rpyc
a5f146a36a02da0492db6e3d40c673ccd33a05b4
[ "MIT" ]
null
null
null
rpyc/core/channel.py
DanielShaulov/rpyc
a5f146a36a02da0492db6e3d40c673ccd33a05b4
[ "MIT" ]
null
null
null
rpyc/core/channel.py
DanielShaulov/rpyc
a5f146a36a02da0492db6e3d40c673ccd33a05b4
[ "MIT" ]
null
null
null
"""*Channel* is an abstraction layer over streams that works with *packets of data*, rather than an endless stream of bytes, and adds support for compression. """ from rpyc.lib import safe_import from rpyc.lib.compat import Struct, BYTES_LITERAL zlib = safe_import("zlib") # * 64 bit length field? # * separate \n into ...
33.763158
85
0.650429
c2f87b9c0efb1d2a3f4c5d938cec653f26fcdb13
2,870
py
Python
client/client.py
ray1888/Python-socket-programming
6df052597ab552d1104b160f0c1d33439950fe87
[ "MIT" ]
1
2017-06-13T17:09:43.000Z
2017-06-13T17:09:43.000Z
client/client.py
ray1888/Python-socket-programming
6df052597ab552d1104b160f0c1d33439950fe87
[ "MIT" ]
2
2017-06-16T16:12:46.000Z
2017-06-18T10:16:21.000Z
client/client.py
ray1888/Python-socket-programming
6df052597ab552d1104b160f0c1d33439950fe87
[ "MIT" ]
null
null
null
import socket import json import os import re from random import randint class Control(): def __init__(self): self.s = socket.socket() #此处s为控制信道的socket self.pwd = os.getcwd() self.Connect(self.s) self.InputCmd(self.s,self.host) def Getconfig(self): Path = os.getcwd() with open(Path+'/clientconfig.json...
24.741379
109
0.60453
f21ec45ca6b619271ebd69b2bdedff3d1d450db7
369
py
Python
event_manager/events/migrations/0009_auto_20200219_0030.py
abeeshp/eventSignUpRestApp
77e7769628af23feaeea33eed4a4d48a01acdec7
[ "MIT" ]
null
null
null
event_manager/events/migrations/0009_auto_20200219_0030.py
abeeshp/eventSignUpRestApp
77e7769628af23feaeea33eed4a4d48a01acdec7
[ "MIT" ]
6
2021-03-19T00:28:45.000Z
2021-09-22T18:44:08.000Z
event_manager/events/migrations/0009_auto_20200219_0030.py
abeeshp/eventSignUpRestApp
77e7769628af23feaeea33eed4a4d48a01acdec7
[ "MIT" ]
null
null
null
# Generated by Django 3.0.3 on 2020-02-19 00:30 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('events', '0008_remove_registration_last_name'), ] operations = [ migrations.AlterUniqueTogether( name='registration', unique...
20.5
57
0.615176
4b5b84e2f2e98b429ac20f43bfd10f4435528214
1,667
py
Python
setup.py
hashbrowncipher/spectator-py
65590d5367bd58f40f77d02534ceda0f25d2b4e5
[ "Apache-2.0" ]
null
null
null
setup.py
hashbrowncipher/spectator-py
65590d5367bd58f40f77d02534ceda0f25d2b4e5
[ "Apache-2.0" ]
null
null
null
setup.py
hashbrowncipher/spectator-py
65590d5367bd58f40f77d02534ceda0f25d2b4e5
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import os from setuptools import setup # Utility function to read the README file. # https://pythonhosted.org/an_example_pypi_project/setuptools.html#setting-up-setup-py def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name='netflix-spectator-...
34.020408
86
0.647271
bf8911c0562f8d283eef3daa1ec3c07fd615e045
30,722
py
Python
electrum/plugins/trezor/qt.py
p3ngu19z/electrum
427b396c24ec1a3cfdca8e1a70c94537b35ad882
[ "MIT" ]
12
2020-11-12T08:53:05.000Z
2021-07-06T17:30:39.000Z
electrum/plugins/trezor/qt.py
p3ngu19z/electrum
427b396c24ec1a3cfdca8e1a70c94537b35ad882
[ "MIT" ]
209
2020-09-23T06:58:18.000Z
2021-11-18T11:25:41.000Z
electrum/plugins/trezor/qt.py
p3ngu19z/electrum
427b396c24ec1a3cfdca8e1a70c94537b35ad882
[ "MIT" ]
19
2020-10-13T11:42:26.000Z
2022-02-06T01:26:34.000Z
from functools import partial import threading from PyQt5.QtCore import Qt, QEventLoop, pyqtSignal from PyQt5.QtWidgets import (QVBoxLayout, QLabel, QGridLayout, QPushButton, QHBoxLayout, QButtonGroup, QGroupBox, QDialog, QLineEdit, QRadioButton, QCheckBox, QWi...
40.002604
115
0.617896
c60a52a1cdd765368070d806be1644fa520e36d9
46
py
Python
tests/factorymind/test_exceptions.py
factorymind/factorymind
0c9fccac853ea0e0cee27bce18f641ca9436b788
[ "MIT" ]
1
2021-11-07T09:39:43.000Z
2021-11-07T09:39:43.000Z
tests/factorymind/test_exceptions.py
factorymind/factorymind
0c9fccac853ea0e0cee27bce18f641ca9436b788
[ "MIT" ]
null
null
null
tests/factorymind/test_exceptions.py
factorymind/factorymind
0c9fccac853ea0e0cee27bce18f641ca9436b788
[ "MIT" ]
null
null
null
""" Test suite for factorymind.exceptions """
11.5
37
0.717391
5b528e2199a7c19b8406a551366a8f92afe154b6
2,306
py
Python
ingesters/resolve_redirects.py
beefoo/sort-media
d72beeb81d206347b7f09ca5125c2ee2775bbdfa
[ "MIT" ]
13
2019-12-09T07:56:13.000Z
2021-08-03T01:45:53.000Z
ingesters/resolve_redirects.py
beefoo/sort-media
d72beeb81d206347b7f09ca5125c2ee2775bbdfa
[ "MIT" ]
1
2020-04-29T00:00:14.000Z
2021-07-09T14:24:19.000Z
ingesters/resolve_redirects.py
beefoo/sort-media
d72beeb81d206347b7f09ca5125c2ee2775bbdfa
[ "MIT" ]
3
2020-04-27T15:36:36.000Z
2021-03-29T17:52:35.000Z
# -*- coding: utf-8 -*- import argparse import inspect import math import os from pprint import pprint import sys import time # add parent directory to sys path to import relative modules currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(currentdir) sys...
35.476923
138
0.717693
5ae5b05aa7dfd113cee6eb500921d2888236b1c2
317
py
Python
models/models/__init__.py
Minys233/GCN-BMP
21b64a3c8cc9bc33718ae09c65aa917e575132eb
[ "MIT" ]
null
null
null
models/models/__init__.py
Minys233/GCN-BMP
21b64a3c8cc9bc33718ae09c65aa917e575132eb
[ "MIT" ]
null
null
null
models/models/__init__.py
Minys233/GCN-BMP
21b64a3c8cc9bc33718ae09c65aa917e575132eb
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 3/15/2019 1:37 PM # @Author : chinshin # @FileName: __init__.py.py import sys from os.path import abspath, dirname ROOT_PATH = dirname(dirname(dirname(abspath(__file__)))) sys.path.insert(0, ROOT_PATH) from ggnn import GGNN from nfp import NFP
24.384615
57
0.681388
f87796709e1c6853ca0fca7455935b7e726b6a5b
4,854
py
Python
src/gdds/app/api/v1/resources/oem_bulk_imeis_download.py
munawwaranwar/Genuine-Device-Detection-Subsystem
5fa26a869d2155c4b592dfd8de6cf7d3aeaa445f
[ "Unlicense" ]
null
null
null
src/gdds/app/api/v1/resources/oem_bulk_imeis_download.py
munawwaranwar/Genuine-Device-Detection-Subsystem
5fa26a869d2155c4b592dfd8de6cf7d3aeaa445f
[ "Unlicense" ]
null
null
null
src/gdds/app/api/v1/resources/oem_bulk_imeis_download.py
munawwaranwar/Genuine-Device-Detection-Subsystem
5fa26a869d2155c4b592dfd8de6cf7d3aeaa445f
[ "Unlicense" ]
null
null
null
""" Copyright (c) 2018-2021 Qualcomm Technologies, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met: * Redistributions of source code must retain...
51.094737
120
0.678822
5d5d353c07956e045e57a54172623ab0a3b1735b
7,425
py
Python
tests/test_items/test_bulk.py
lmverity/exchangelib
15002565dfea30705c74b256b3a601f95e2afb00
[ "BSD-2-Clause" ]
null
null
null
tests/test_items/test_bulk.py
lmverity/exchangelib
15002565dfea30705c74b256b3a601f95e2afb00
[ "BSD-2-Clause" ]
null
null
null
tests/test_items/test_bulk.py
lmverity/exchangelib
15002565dfea30705c74b256b3a601f95e2afb00
[ "BSD-2-Clause" ]
null
null
null
from exchangelib.errors import ErrorItemNotFound, ErrorInvalidChangeKey, ErrorInvalidIdMalformed from exchangelib.ewsdatetime import EWSDate from exchangelib.fields import FieldPath from exchangelib.folders import Inbox, Folder, Calendar from exchangelib.items import Item, Message, SAVE_ONLY, SEND_ONLY, SEND_AND_SAVE_C...
46.993671
115
0.652256
16a0d2859942991906299a5ab5f7fdfb99883ffc
1,640
py
Python
mmdet2trt/converters/DeformPool.py
DableUTeeF/mmdetection-to-tensorrt
370afa902534b17e94aa692cc30f87f128688b98
[ "Apache-2.0" ]
null
null
null
mmdet2trt/converters/DeformPool.py
DableUTeeF/mmdetection-to-tensorrt
370afa902534b17e94aa692cc30f87f128688b98
[ "Apache-2.0" ]
null
null
null
mmdet2trt/converters/DeformPool.py
DableUTeeF/mmdetection-to-tensorrt
370afa902534b17e94aa692cc30f87f128688b98
[ "Apache-2.0" ]
null
null
null
from torch2trt_dynamic.torch2trt_dynamic import (get_arg, tensorrt_converter, trt_) from .plugins import create_deformable_pool_plugin @tensorrt_converter('mmdet2trt.models.roi_heads.roi_extractors.pooling_layers' '.deform_roi_pool_extractor.deform...
42.051282
79
0.634756
423d33bf36bb6753ceb63417c1d8e58533610f37
4,958
py
Python
src/tensorrt/python/host2device.py
LaudateCorpus1/dlcookbook-dlbs
998a44940eb80f534ed682f8ef010e35df6b89a2
[ "Apache-2.0" ]
123
2017-11-28T20:21:24.000Z
2022-03-22T11:21:04.000Z
src/tensorrt/python/host2device.py
LaudateCorpus1/dlcookbook-dlbs
998a44940eb80f534ed682f8ef010e35df6b89a2
[ "Apache-2.0" ]
17
2018-01-05T00:05:13.000Z
2020-09-18T05:12:45.000Z
src/tensorrt/python/host2device.py
LaudateCorpus1/dlcookbook-dlbs
998a44940eb80f534ed682f8ef010e35df6b89a2
[ "Apache-2.0" ]
48
2018-01-04T20:52:51.000Z
2022-03-06T00:47:17.000Z
import json import shlex import argparse import itertools import subprocess import typing as t from dlbs.utils import LogEvent """ Example configuration file (JSON). GPU format: [CPU_CORES:]GPU (cpu cores are optional, is used for numactl). ```json { "gpu": ["0-9:0", "10-10:1"], "size_mb": [19, 38, 75, 151, 3...
38.138462
117
0.612142
a51d9e14b7297debb32ff46fd8878137462e9ae1
3,860
py
Python
numba_dpcomp/numba_dpcomp/mlir/builtin/funcs.py
nbpatel/mlir-extensions
1270a2550694a53a0c70fd5b17d518eef133802b
[ "Apache-2.0" ]
null
null
null
numba_dpcomp/numba_dpcomp/mlir/builtin/funcs.py
nbpatel/mlir-extensions
1270a2550694a53a0c70fd5b17d518eef133802b
[ "Apache-2.0" ]
null
null
null
numba_dpcomp/numba_dpcomp/mlir/builtin/funcs.py
nbpatel/mlir-extensions
1270a2550694a53a0c70fd5b17d518eef133802b
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
25.228758
80
0.610104
cbbec47e477c17d5f328e20f1dc860f9b810850d
6,364
py
Python
src/spn/algorithms/LearningWrappers.py
minimrbanana/SPFlow
32233bf29d107c62f0f727b0e64aaa74b37cfe1e
[ "Apache-2.0" ]
2
2021-04-22T09:20:20.000Z
2021-05-17T12:26:59.000Z
src/spn/algorithms/LearningWrappers.py
minimrbanana/SPFlow
32233bf29d107c62f0f727b0e64aaa74b37cfe1e
[ "Apache-2.0" ]
null
null
null
src/spn/algorithms/LearningWrappers.py
minimrbanana/SPFlow
32233bf29d107c62f0f727b0e64aaa74b37cfe1e
[ "Apache-2.0" ]
null
null
null
""" Created on March 30, 2018 @author: Alejandro Molina """ import numpy as np from spn.algorithms.StructureLearning import get_next_operation, learn_structure from spn.algorithms.CnetStructureLearning import get_next_operation_cnet, learn_structure_cnet from spn.algorithms.Validity import is_valid from spn.structu...
30.893204
131
0.709145
f494dc3d93ae2dd04b6d55ba6b0401a274f5315e
316
py
Python
polling_stations/apps/pollingstations/migrations/0015_delete_residential_address.py
smsmith97/UK-Polling-Stations
ecbd98cb99e89e97354da3960b0063aa36181b11
[ "BSD-3-Clause" ]
29
2015-03-10T08:41:34.000Z
2022-01-12T08:51:38.000Z
polling_stations/apps/pollingstations/migrations/0015_delete_residential_address.py
smsmith97/UK-Polling-Stations
ecbd98cb99e89e97354da3960b0063aa36181b11
[ "BSD-3-Clause" ]
4,112
2015-04-01T21:27:38.000Z
2022-03-31T19:22:11.000Z
polling_stations/apps/pollingstations/migrations/0015_delete_residential_address.py
smsmith97/UK-Polling-Stations
ecbd98cb99e89e97354da3960b0063aa36181b11
[ "BSD-3-Clause" ]
31
2015-03-18T14:52:50.000Z
2022-02-24T10:31:07.000Z
# Generated by Django 2.2.16 on 2020-11-03 21:54 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("pollingstations", "0014_auto_20180314_1100"), ] operations = [ migrations.DeleteModel( name="ResidentialAddress", ), ]
18.588235
55
0.629747
9e5d922403a186bca6b2cc3d0397260ebf00cc2a
2,216
py
Python
webapp/api/gps.py
zorglub42/marv2plage
436fb8b6b05a1c28011786ce390b45b4a5567483
[ "Apache-2.0" ]
null
null
null
webapp/api/gps.py
zorglub42/marv2plage
436fb8b6b05a1c28011786ce390b45b4a5567483
[ "Apache-2.0" ]
null
null
null
webapp/api/gps.py
zorglub42/marv2plage
436fb8b6b05a1c28011786ce390b45b4a5567483
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2020 Zorglub42 {contact(at)zorglub42.fr}. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICEN...
29.546667
81
0.580776
91c1d44280b9715d92af5c97076fb1dc1b0865ca
393
py
Python
docs/conftest.py
FHTMitchell/scrapy
c911e802097ecd3309bb826d48b7b08ce108f4ce
[ "BSD-3-Clause" ]
1
2019-11-12T19:25:33.000Z
2019-11-12T19:25:33.000Z
docs/conftest.py
gauthamsaimr/scrapy
c911e802097ecd3309bb826d48b7b08ce108f4ce
[ "BSD-3-Clause" ]
null
null
null
docs/conftest.py
gauthamsaimr/scrapy
c911e802097ecd3309bb826d48b7b08ce108f4ce
[ "BSD-3-Clause" ]
1
2020-03-01T14:59:56.000Z
2020-03-01T14:59:56.000Z
from doctest import ELLIPSIS from sybil import Sybil from sybil.parsers.codeblock import CodeBlockParser from sybil.parsers.doctest import DocTestParser from sybil.parsers.skip import skip pytest_collect_file = Sybil( parsers=[ DocTestParser(optionflags=ELLIPSIS), CodeBlockParser(future_imports=[...
23.117647
59
0.735369
0a643b5d1f2084e0e79455df4bfbd1d2b1325e66
529
py
Python
leet/greedy/productExceptSelf.py
peterlamar/python-cp-cheatsheet
f9f854064a3c657c04fab27d0a496401bfa97da1
[ "Apache-2.0" ]
140
2020-10-21T13:23:52.000Z
2022-03-31T15:09:45.000Z
leet/greedy/productExceptSelf.py
stacykutyepov/python-cp-cheatsheet
a00a57e1b36433648d1cace331e15ff276cef189
[ "Apache-2.0" ]
1
2021-07-22T14:01:25.000Z
2021-07-22T14:01:25.000Z
leet/greedy/productExceptSelf.py
stacykutyepov/python-cp-cheatsheet
a00a57e1b36433648d1cace331e15ff276cef189
[ "Apache-2.0" ]
33
2020-10-21T14:17:02.000Z
2022-03-25T11:25:03.000Z
""" time: 5 min errors: forgot range needed len to process list! Product of Array Except Self """ class Solution: def productExceptSelf(self, nums: List[int]) -> List[int]: rtn = [0] * len(nums) if len(nums) <= 1: return nums cur = 1 for i in range(len(n...
23
62
0.468809
1fc5646ba18b7e5bf4e81791b279015c9fc7ad08
3,649
py
Python
tests/utils.py
yzernik/squeaknode
f437939895f1f15dfeaa2bb50cab29efe5f7f612
[ "MIT" ]
14
2021-01-13T19:52:32.000Z
2021-12-01T14:30:20.000Z
tests/utils.py
yzernik/squeaknode
f437939895f1f15dfeaa2bb50cab29efe5f7f612
[ "MIT" ]
603
2020-10-30T03:35:54.000Z
2021-12-12T08:04:06.000Z
tests/utils.py
yzernik/squeaknode
f437939895f1f15dfeaa2bb50cab29efe5f7f612
[ "MIT" ]
5
2020-11-02T21:33:35.000Z
2021-11-02T00:54:13.000Z
# MIT License # # Copyright (c) 2020 Jonathan Zernik # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, mer...
29.192
80
0.747054
cd414f60a3556847d15cb5c7a3a66728ce4c7e95
2,303
py
Python
tests/testapp/tests/test_cache_to_use.py
starexpress/django-admin-caching
7247bc1242c42381de413c9b3ca1e20e893d2fe3
[ "BSD-3-Clause" ]
15
2016-09-27T09:20:16.000Z
2019-10-28T06:59:24.000Z
tests/testapp/tests/test_cache_to_use.py
starexpress/django-admin-caching
7247bc1242c42381de413c9b3ca1e20e893d2fe3
[ "BSD-3-Clause" ]
17
2016-09-27T15:10:09.000Z
2019-06-21T13:05:52.000Z
tests/testapp/tests/test_cache_to_use.py
starexpress/django-admin-caching
7247bc1242c42381de413c9b3ca1e20e893d2fe3
[ "BSD-3-Clause" ]
5
2017-06-29T10:52:34.000Z
2020-10-27T07:59:48.000Z
from django.core import cache from django.core.cache.backends.dummy import DummyCache from django.core.cache.backends.base import InvalidCacheBackendError from django.test.utils import override_settings from django_admin_caching.caching import CacheConfig import pytest from testapp.sixmock import patch class TestAdmi...
41.125
79
0.660443
4b3c016c7ef444898f5da6f026c91b333cec123a
4,684
py
Python
scripts/pklhisto2root.py
umd-lhcb/lhcb-ntuples-gen
d306895a0dc6bad2def19ca3d7d1304a5a9be239
[ "BSD-2-Clause" ]
null
null
null
scripts/pklhisto2root.py
umd-lhcb/lhcb-ntuples-gen
d306895a0dc6bad2def19ca3d7d1304a5a9be239
[ "BSD-2-Clause" ]
105
2018-12-20T19:09:19.000Z
2022-03-19T09:53:06.000Z
scripts/pklhisto2root.py
umd-lhcb/lhcb-ntuples-gen
d306895a0dc6bad2def19ca3d7d1304a5a9be239
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python3 # # Stolen almost verbatim from: # https://gitlab.cern.ch/lhcb-rta/pidcalib2/-/blob/master/src/pidcalib2/pklhisto2root.py ############################################################################### # (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration # # ...
35.755725
107
0.604825
d3cd4ab91dd45a4246709b824949900077672f81
22,159
py
Python
lib/processing.py
Aziroshin/blockchaintools
72bf833b500628f35502914d5ef2d2248af84055
[ "MIT" ]
null
null
null
lib/processing.py
Aziroshin/blockchaintools
72bf833b500628f35502914d5ef2d2248af84055
[ "MIT" ]
null
null
null
lib/processing.py
Aziroshin/blockchaintools
72bf833b500628f35502914d5ef2d2248af84055
[ "MIT" ]
null
null
null
#-*- coding: utf-8 -*- #======================================================================================= # Imports #======================================================================================= # Python. from collections import namedtuple, UserList, UserDict from subprocess import Popen, PIPE from pa...
34.090769
116
0.656573
7a400c47af362a2ef6620ae106ee2dc76eccc7dd
1,595
py
Python
dev_scripts/git/gsp.py
ajmal017/amp
8de7e3b88be87605ec3bad03c139ac64eb460e5c
[ "BSD-3-Clause" ]
null
null
null
dev_scripts/git/gsp.py
ajmal017/amp
8de7e3b88be87605ec3bad03c139ac64eb460e5c
[ "BSD-3-Clause" ]
null
null
null
dev_scripts/git/gsp.py
ajmal017/amp
8de7e3b88be87605ec3bad03c139ac64eb460e5c
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python """ Stash the changes in a Git client without changing the client, besides a reset of the index. """ import argparse import logging import helpers.dbg as dbg import helpers.git as git import helpers.parser as prsr import helpers.printing as pri import helpers.system_interaction as si _LOG = lo...
24.538462
81
0.642633
5d848e6b082dc633768fb3c07c12fca6f832a20c
354
py
Python
src/platform.py
Tas-Kit/services
da7e3eb7dba39501dd9c3a8ea335f9b60753b74f
[ "Apache-2.0" ]
null
null
null
src/platform.py
Tas-Kit/services
da7e3eb7dba39501dd9c3a8ea335f9b60753b74f
[ "Apache-2.0" ]
null
null
null
src/platform.py
Tas-Kit/services
da7e3eb7dba39501dd9c3a8ea335f9b60753b74f
[ "Apache-2.0" ]
null
null
null
"""Summary """ import requests from .generic import APISERVICE class PLATFORM(APISERVICE): SCHEME = 'http' HOST = 'platform' PORT = 8000 API_VERSION = 'v1' def get_platform_root_key(self, uid): resp = requests.get(self.get_full_url('/internal/'), cookies={ 'uid': str(uid) ...
19.666667
70
0.60452
a4131c36c3fd2e90309678e468607551c8fbf1ef
4,401
py
Python
TESTS/crear_objetos_2.py
thiago1623/Tempo_Back-End
5ef2e404be776955417ff36e53423f4aaceb248e
[ "Unlicense" ]
null
null
null
TESTS/crear_objetos_2.py
thiago1623/Tempo_Back-End
5ef2e404be776955417ff36e53423f4aaceb248e
[ "Unlicense" ]
null
null
null
TESTS/crear_objetos_2.py
thiago1623/Tempo_Back-End
5ef2e404be776955417ff36e53423f4aaceb248e
[ "Unlicense" ]
null
null
null
#!/usr/bin/python3 """ SCRIPT QUE INCIALIZA CON FAKE DATA NUESTRA DB DE TEMPO """ import datetime from models import storage from models.city import City from models.venue import Venue from models.show import Show, ShowArtist from models.artist import Artist from models.social_organizer import SocialOrganizer from mode...
26.196429
136
0.70484
c96be82b3759e1a709e59f8514779b6c97d9770a
11,309
py
Python
openGaussBase/testcase/AI/AI_INDEXADV/Opengauss_Function_Ai_Indexadv_Ustore_Case0001.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/AI/AI_INDEXADV/Opengauss_Function_Ai_Indexadv_Ustore_Case0001.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/AI/AI_INDEXADV/Opengauss_Function_Ai_Indexadv_Ustore_Case0001.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
""" Copyright (c) 2022 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W...
41.577206
84
0.568927
ef31b882ed3d467d88a2f39dad29ea856f02d1f4
708
py
Python
weather/managers/measure_manager.py
Arthuchaut/weather-monitor
736dfcd51c5c14a923e410a374dc08121eb0811c
[ "MIT" ]
null
null
null
weather/managers/measure_manager.py
Arthuchaut/weather-monitor
736dfcd51c5c14a923e410a374dc08121eb0811c
[ "MIT" ]
null
null
null
weather/managers/measure_manager.py
Arthuchaut/weather-monitor
736dfcd51c5c14a923e410a374dc08121eb0811c
[ "MIT" ]
null
null
null
from django.db import models class MeasureManager(models.Manager): '''The measure management class.''' def latest_measure_num(self) -> int: '''Returns the latest measure_num. Returns: int: The latest measure num. None if no measure exists yet. ''' measure: dict[s...
27.230769
75
0.628531
848b9d1cf5c2f1548c3fb6d7b7abbd0ee97c0edc
1,821
py
Python
tests/optimization_test.py
Paethon/pytorch-pretrained-BERT
2152bfeae82439600dc5b5deab057a3c4331c62d
[ "Apache-2.0" ]
244
2019-09-06T07:53:57.000Z
2022-03-28T19:32:15.000Z
tests/optimization_test.py
Paethon/pytorch-pretrained-BERT
2152bfeae82439600dc5b5deab057a3c4331c62d
[ "Apache-2.0" ]
13
2019-10-19T06:02:16.000Z
2022-03-10T12:46:08.000Z
tests/optimization_test.py
Paethon/pytorch-pretrained-BERT
2152bfeae82439600dc5b5deab057a3c4331c62d
[ "Apache-2.0" ]
61
2019-09-14T07:06:57.000Z
2022-03-16T07:02:52.000Z
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
35.705882
93
0.654585
ec9cd194207764029fc656705bde74f82ce83cb4
13,125
py
Python
trainers/DepthTrainer.py
anglixjtu/MSG_CHN_WACV20
6910894cf3caed2ffde27586f96b132b0c1d1a98
[ "Apache-2.0" ]
61
2020-06-16T07:20:23.000Z
2022-02-14T22:33:13.000Z
trainers/DepthTrainer.py
anglixjtu/MSG_CHN_WACV20
6910894cf3caed2ffde27586f96b132b0c1d1a98
[ "Apache-2.0" ]
13
2020-06-19T02:31:18.000Z
2022-01-11T12:42:21.000Z
trainers/DepthTrainer.py
anglixjtu/MSG_CHN_WACV20
6910894cf3caed2ffde27586f96b132b0c1d1a98
[ "Apache-2.0" ]
10
2020-07-11T04:08:59.000Z
2021-11-15T13:25:31.000Z
""" This script is modified from the work of Abdelrahman Eldesokey. Find more details from https://github.com/abdo-eldesokey/nconv """ ######################################## __author__ = "Abdelrahman Eldesokey" __license__ = "GNU GPLv3" __version__ = "0.1" __maintainer__ = "Abdelrahman Eldesokey" __email__ = "abdo.e...
41.273585
119
0.507352
5dcc63ff27c2064e7afd9208da56ff7c0a63cb86
1,745
py
Python
discouple/broker.py
Gelbpunkt/discouple
d753fe88ca46ba29d8204fab775e662c1156e0bc
[ "MIT" ]
null
null
null
discouple/broker.py
Gelbpunkt/discouple
d753fe88ca46ba29d8204fab775e662c1156e0bc
[ "MIT" ]
null
null
null
discouple/broker.py
Gelbpunkt/discouple
d753fe88ca46ba29d8204fab775e662c1156e0bc
[ "MIT" ]
null
null
null
import asyncio import traceback from abc import ABC import aio_pika import orjson class Broker(ABC): def __init__(self, callback=None): async def _default_callback(*_, **__): pass self.callback = callback or _default_callback async def connect(self, group, *args, **kwargs): ...
27.698413
78
0.590831
de8f2b21183a21c17e9a0152eb080795619c7923
6,763
py
Python
algo.py
hashlib/Prokudin-Gorsky
4d95b36a1913d217d9d2e288667e824c4e59d5df
[ "MIT" ]
1
2019-03-08T19:58:29.000Z
2019-03-08T19:58:29.000Z
algo.py
hashlib/Prokudin-Gorsky
4d95b36a1913d217d9d2e288667e824c4e59d5df
[ "MIT" ]
1
2019-10-23T19:03:48.000Z
2019-10-23T19:03:48.000Z
algo.py
hashlib/Prokudin-Gorsky
4d95b36a1913d217d9d2e288667e824c4e59d5df
[ "MIT" ]
1
2021-02-22T22:16:43.000Z
2021-02-22T22:16:43.000Z
import threading import sys import os import skimage import skimage.io import skimage.color import skimage.transform import numpy import warnings from time import time class ThreadWithReturnValue(threading.Thread): def __init__(self, group=None, target=None, name=None, args=(), kwargs={}, Verbose...
34.860825
79
0.630046
e1ea871e9cc01bace108f0d7f3a662f14fb05155
28,531
py
Python
jsonschema/validators.py
e2forks/jsonschema
055c7f6e70d2a463a8fc9a9bc50e4cb98900a5de
[ "MIT" ]
null
null
null
jsonschema/validators.py
e2forks/jsonschema
055c7f6e70d2a463a8fc9a9bc50e4cb98900a5de
[ "MIT" ]
null
null
null
jsonschema/validators.py
e2forks/jsonschema
055c7f6e70d2a463a8fc9a9bc50e4cb98900a5de
[ "MIT" ]
1
2019-08-29T00:57:45.000Z
2019-08-29T00:57:45.000Z
from __future__ import division from warnings import warn import contextlib import json import numbers from six import add_metaclass from jsonschema import ( _legacy_validators, _types, _utils, _validators, exceptions, ) from jsonschema.compat import ( Sequence, int_types, iteritems, ...
30.416844
79
0.609898
c24ed9aeb948611bc0cf3dca59c1303d9cd6002d
161
py
Python
newsapi/__init__.py
TomFaulkner/newsapi-python
457197d3e2f82bf650345cec5238a9a89f783448
[ "MIT" ]
null
null
null
newsapi/__init__.py
TomFaulkner/newsapi-python
457197d3e2f82bf650345cec5238a9a89f783448
[ "MIT" ]
null
null
null
newsapi/__init__.py
TomFaulkner/newsapi-python
457197d3e2f82bf650345cec5238a9a89f783448
[ "MIT" ]
null
null
null
from newsapi.client import NewsApi from newsapi.constants import COUNTRIES, CATEGORIES, LANGUAGES __all__ = ['NewsApi', 'COUNTRIES', 'CATEGORIES', 'LANGUAGES']
32.2
62
0.782609
0d247c47315a7c20d08d806f30b320394638b2e3
3,719
py
Python
data/datasets/dukemtmcreid.py
NIRVANALAN/magnifiernet_reid
2d2dfa331fe55d4d6e83be0b8f03f06a79adb3d1
[ "MIT" ]
6
2020-05-25T15:36:06.000Z
2021-03-12T07:53:11.000Z
data/datasets/dukemtmcreid.py
NIRVANALAN/magnifiernet_reid
2d2dfa331fe55d4d6e83be0b8f03f06a79adb3d1
[ "MIT" ]
null
null
null
data/datasets/dukemtmcreid.py
NIRVANALAN/magnifiernet_reid
2d2dfa331fe55d4d6e83be0b8f03f06a79adb3d1
[ "MIT" ]
4
2020-10-04T01:00:12.000Z
2021-05-02T06:25:09.000Z
# encoding: utf-8 """ @author: liaoxingyu @contact: liaoxingyu2@jd.com """ import glob import re import urllib import zipfile import os.path as osp from utils.iotools import mkdir_if_missing from .bases import BaseImageDataset class DukeMTMCreID(BaseImageDataset): """ DukeMTMC-reID Reference: 1. Ristani et al...
33.809091
118
0.741597
79455086adf5afe58c64a3d5edb453f8ea09b87b
4,742
py
Python
pygluu/kubernetes/yamlparser.py
scottwedge/cloud-native-edition
75f714210ec564dcef68c7b6a8c936ec615d0540
[ "Apache-2.0" ]
null
null
null
pygluu/kubernetes/yamlparser.py
scottwedge/cloud-native-edition
75f714210ec564dcef68c7b6a8c936ec615d0540
[ "Apache-2.0" ]
null
null
null
pygluu/kubernetes/yamlparser.py
scottwedge/cloud-native-edition
75f714210ec564dcef68c7b6a8c936ec615d0540
[ "Apache-2.0" ]
null
null
null
""" License terms and conditions for Gluu Cloud Native Edition: https://www.apache.org/licenses/LICENSE-2.0 """ from pathlib import Path import contextlib import os import json import logging from ruamel.yaml import YAML from ruamel.yaml.comments import CommentedMap from collections import OrderedDict, Mapping impor...
35.38806
112
0.570434
45cbf655577993b75f756dd74dd6d97358e665ac
9,491
py
Python
vmware_nsx/shell/admin/plugins/nsxv/resources/metadata.py
mail2nsrajesh/vmware-nsx
63154b510b9fd95c10fffae86bfc49073cafeb40
[ "Apache-2.0" ]
null
null
null
vmware_nsx/shell/admin/plugins/nsxv/resources/metadata.py
mail2nsrajesh/vmware-nsx
63154b510b9fd95c10fffae86bfc49073cafeb40
[ "Apache-2.0" ]
null
null
null
vmware_nsx/shell/admin/plugins/nsxv/resources/metadata.py
mail2nsrajesh/vmware-nsx
63154b510b9fd95c10fffae86bfc49073cafeb40
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 VMware, 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 a...
41.445415
79
0.65462
76bad01a2df6ff66d58c6f883e0bf83a5e6b124b
12,456
py
Python
python/common/UtilImage.py
SystemCorps/CNN-2D-X-Ray-Catheter-Detection
6e4d6e3473c4032e7db4cc9f7f7897a80185fee6
[ "BSD-3-Clause" ]
25
2017-10-02T09:42:42.000Z
2022-02-01T08:25:55.000Z
python/common/UtilImage.py
SystemCorps/CNN-2D-X-Ray-Catheter-Detection
6e4d6e3473c4032e7db4cc9f7f7897a80185fee6
[ "BSD-3-Clause" ]
1
2019-09-25T09:01:23.000Z
2019-09-25T09:01:23.000Z
python/common/UtilImage.py
SystemCorps/CNN-2D-X-Ray-Catheter-Detection
6e4d6e3473c4032e7db4cc9f7f7897a80185fee6
[ "BSD-3-Clause" ]
23
2017-09-05T03:13:57.000Z
2021-11-17T08:55:09.000Z
from __future__ import division import os import sys import array import struct import io import math import numpy as np import colorsys import pydicom from pydicom.dataset import Dataset, FileDataset import pydicom.uid import skimage as ski import skimage.io import skimage.transform import skimage.draw import skimage....
35.896254
148
0.711304
50ff9ccf7940dd637725692efefe867d4003ac8e
4,201
py
Python
font.py
IsacSvensson/Ascii-cam
ef81d4f25045e6b4e743458c6f3940fdb6abfa72
[ "MIT" ]
null
null
null
font.py
IsacSvensson/Ascii-cam
ef81d4f25045e6b4e743458c6f3940fdb6abfa72
[ "MIT" ]
null
null
null
font.py
IsacSvensson/Ascii-cam
ef81d4f25045e6b4e743458c6f3940fdb6abfa72
[ "MIT" ]
null
null
null
""" Module for handling weighting chars and drawing the ascii-picture """ import string from PIL import Image, ImageDraw, ImageFont def distributeWeights(chars, minInterval=0, maxInterval=255): """ Distributes the wheighted characters over the given interval Returns a list of tuples countaining the weight...
30.889706
89
0.620567
774d88d7d11a4d83018e19841afd9c142641d30b
5,822
py
Python
test/test_parser/test_tokeniser.py
weakit/Mathics
6f7f836d41b27d3ccf078b5da21a7e70a93da679
[ "Apache-2.0" ]
2
2019-06-01T12:51:00.000Z
2019-06-02T05:17:15.000Z
test/test_parser/test_tokeniser.py
weakit/Mathics
6f7f836d41b27d3ccf078b5da21a7e70a93da679
[ "Apache-2.0" ]
3
2018-09-06T17:50:01.000Z
2018-09-14T14:05:34.000Z
test/test_parser/test_tokeniser.py
suhr/Mathics
dcdf81a70d617ce460f45cbdcddcb16846ef50dc
[ "Apache-2.0" ]
1
2018-09-05T05:09:47.000Z
2018-09-05T05:09:47.000Z
import unittest import random import sys from mathics.core.parser.tokeniser import Tokeniser, Token from mathics.core.parser.errors import ScanError, IncompleteSyntaxError, InvalidSyntaxError from mathics.core.parser.feed import SingleLineFeeder class TokeniserTest(unittest.TestCase): def tokens(self, code): ...
40.430556
204
0.583133
237d46946583e7d498ac3638133cb605d30acb93
4,267
py
Python
escriptcore/py_src/symbolic/pretty.py
markendr/esys-escript.github.io
0023eab09cd71f830ab098cb3a468e6139191e8d
[ "Apache-2.0" ]
null
null
null
escriptcore/py_src/symbolic/pretty.py
markendr/esys-escript.github.io
0023eab09cd71f830ab098cb3a468e6139191e8d
[ "Apache-2.0" ]
1
2019-01-14T03:07:43.000Z
2019-01-14T03:07:43.000Z
escriptcore/py_src/symbolic/pretty.py
markendr/esys-escript.github.io
0023eab09cd71f830ab098cb3a468e6139191e8d
[ "Apache-2.0" ]
null
null
null
############################################################################## # # Copyright (c) 2003-2018 by The University of Queensland # http://www.uq.edu.au # # Primary Business: Queensland, Australia # Licensed under the Apache License, version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # # Development unt...
32.572519
79
0.615421
cf5179a38015388cef2f41097b3f626be7b63784
1,037
py
Python
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/xdata/client/XdataClient.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
14
2018-04-19T09:53:56.000Z
2022-01-27T06:05:48.000Z
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/xdata/client/XdataClient.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
15
2018-09-11T05:39:54.000Z
2021-07-02T12:38:02.000Z
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/xdata/client/XdataClient.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
33
2018-04-20T05:29:16.000Z
2022-02-17T09:10:05.000Z
# coding=utf8 # Copyright 2018 JDCLOUD.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 ...
34.566667
87
0.745419
d3f5e38bdcc1e19f754b5488cd583ad447f059f1
28,909
py
Python
silx/gui/plot3d/items/mesh.py
vincefn/silx
4b239abfc90d2fa7d6ab61425f8bfc7b83c0f444
[ "CC0-1.0", "MIT" ]
null
null
null
silx/gui/plot3d/items/mesh.py
vincefn/silx
4b239abfc90d2fa7d6ab61425f8bfc7b83c0f444
[ "CC0-1.0", "MIT" ]
null
null
null
silx/gui/plot3d/items/mesh.py
vincefn/silx
4b239abfc90d2fa7d6ab61425f8bfc7b83c0f444
[ "CC0-1.0", "MIT" ]
null
null
null
# coding: utf-8 # /*########################################################################## # # Copyright (c) 2017-2019 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to d...
36.455233
90
0.535819
f48b05dd90b6f528524a74c2606421662ed54d95
638
py
Python
tests/helper/__init__.py
fsantini/gtagora-connector-py
e97edf0da8adbdfb6d238caf1add42b70d2482f2
[ "MIT" ]
3
2020-06-30T14:26:46.000Z
2022-01-12T19:44:26.000Z
tests/helper/__init__.py
fsantini/gtagora-connector-py
e97edf0da8adbdfb6d238caf1add42b70d2482f2
[ "MIT" ]
null
null
null
tests/helper/__init__.py
fsantini/gtagora-connector-py
e97edf0da8adbdfb6d238caf1add42b70d2482f2
[ "MIT" ]
2
2019-02-27T13:54:41.000Z
2019-10-07T13:55:27.000Z
from gtagora.http.client import Client class FakeResponse: def __init__(self, status_code=200, data=None): self.status_code = status_code self.data = data self.text = '' def json(self): return self.data class FakeClient(Client): def __init__(self, connection, response=F...
22.785714
60
0.658307
cdf8d6dd82c07f048a779f824ab0b273ea62c1d7
5,624
py
Python
azure-mgmt-network/azure/mgmt/network/v2018_12_01/models/effective_network_security_rule.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
azure-mgmt-network/azure/mgmt/network/v2018_12_01/models/effective_network_security_rule.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-mgmt-network/azure/mgmt/network/v2018_12_01/models/effective_network_security_rule.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "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 ...
55.137255
108
0.689189
c1e7949980d85bac59d8ace6613af6908ca2f5eb
1,068
py
Python
mistral/tests/unit/actions/test_javascript_action.py
soda-research/mistral
550a3de9c2defc7ce26336cb705d9c8d87bbaddd
[ "Apache-2.0" ]
3
2015-08-28T04:57:56.000Z
2017-03-27T10:59:56.000Z
mistral/tests/unit/actions/test_javascript_action.py
soda-research/mistral
550a3de9c2defc7ce26336cb705d9c8d87bbaddd
[ "Apache-2.0" ]
21
2015-04-14T22:41:53.000Z
2019-02-20T09:30:10.000Z
mistral/tests/unit/actions/test_javascript_action.py
soda-research/mistral
550a3de9c2defc7ce26336cb705d9c8d87bbaddd
[ "Apache-2.0" ]
12
2015-08-14T02:27:37.000Z
2020-12-31T10:09:21.000Z
# Copyright 2015 - 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 ag...
33.375
77
0.709738
5760a5c1cec0f0ca07e932da334ae817bf844834
9,567
py
Python
tests/test_integration.py
marten-de-vries/Flask-WebSub
1853582a7f60e79c9ac1bd03b0bf30b36dab77f6
[ "0BSD" ]
19
2017-08-27T09:52:46.000Z
2021-11-06T14:53:06.000Z
tests/test_integration.py
marten-de-vries/Flask-WebSub
1853582a7f60e79c9ac1bd03b0bf30b36dab77f6
[ "0BSD" ]
7
2018-11-11T17:19:49.000Z
2021-04-06T10:54:48.000Z
tests/test_integration.py
marten-de-vries/Flask-WebSub
1853582a7f60e79c9ac1bd03b0bf30b36dab77f6
[ "0BSD" ]
4
2018-01-26T13:18:55.000Z
2021-11-06T14:51:53.000Z
from flask import Flask import pytest import requests from cachelib import SimpleCache import os import base64 from unittest.mock import Mock, call from flask_websub.errors import SubscriberError, NotificationError from flask_websub.subscriber import Subscriber, SQLite3TempSubscriberStorage, \ ...
32.763699
79
0.648793
ce7d3d32cd0c08c085e22e1cdb4f2aa8c7db4cd0
8,781
py
Python
deep_privacy/engine/hooks/log_hooks.py
skoskjei/DP-ATT
eb7380099f5c7e533fd0d247456b4a418529d62b
[ "MIT" ]
1,128
2019-09-11T01:38:09.000Z
2022-03-31T17:06:56.000Z
deep_privacy/engine/hooks/log_hooks.py
skoskjei/DP-ATT
eb7380099f5c7e533fd0d247456b4a418529d62b
[ "MIT" ]
45
2019-09-11T05:39:53.000Z
2021-12-05T17:52:07.000Z
deep_privacy/engine/hooks/log_hooks.py
skoskjei/DP-ATT
eb7380099f5c7e533fd0d247456b4a418529d62b
[ "MIT" ]
185
2019-09-11T02:15:56.000Z
2022-03-23T16:12:41.000Z
import torch import logging import time from deep_privacy import torch_utils, logger from deep_privacy.metrics import metric_api from .base import HookBase, HOOK_REGISTRY from deep_privacy.inference import infer try: from apex import amp except ImportError: pass @HOOK_REGISTRY.register_module class ImageSaveH...
36.435685
100
0.636602
8b465ae186e56ccbeea5de2e6293c729d2cfcd69
918
py
Python
examples/cookie_eater.py
gitter-badger/zproc
b26d39d9c564886c48c84a1e93e616f21f3bece4
[ "MIT" ]
null
null
null
examples/cookie_eater.py
gitter-badger/zproc
b26d39d9c564886c48c84a1e93e616f21f3bece4
[ "MIT" ]
null
null
null
examples/cookie_eater.py
gitter-badger/zproc
b26d39d9c564886c48c84a1e93e616f21f3bece4
[ "MIT" ]
null
null
null
""" Expected output: <Process pid: 2555 target: <function cookie_eater at 0x7f5b4542c9d8> uuid: e74521ae-76ca-11e8-bd1f-7c7a912e12b5> <Process pid: 2556 target: <function cookie_baker at 0x7f5b4542c950> uuid: e74521ae-76ca-11e8-bd1f-7c7a912e12b5> Here's a cookie! Here's a cookie! Here's a cookie! nom nom nom Here's a ...
19.125
112
0.720044
ab7a808e02732afca740c661f84d1e6a4e437435
3,966
py
Python
src/azure-cli/azure/cli/command_modules/acs/_completers.py
YuanyuanNi/azure-cli
63844964374858bfacd209bfe1b69eb456bd64ca
[ "MIT" ]
3,287
2016-07-26T17:34:33.000Z
2022-03-31T09:52:13.000Z
src/azure-cli/azure/cli/command_modules/acs/_completers.py
YuanyuanNi/azure-cli
63844964374858bfacd209bfe1b69eb456bd64ca
[ "MIT" ]
19,206
2016-07-26T07:04:42.000Z
2022-03-31T23:57:09.000Z
src/azure-cli/azure/cli/command_modules/acs/_completers.py
YuanyuanNi/azure-cli
63844964374858bfacd209bfe1b69eb456bd64ca
[ "MIT" ]
2,575
2016-07-26T06:44:40.000Z
2022-03-31T22:56:06.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
43.108696
116
0.724155
1679bec9f858eed342b9d8427df5229c85a70385
7,196
py
Python
tuiuiu/tuiuiucore/rich_text.py
caputomarcos/tuiuiu.io
d8fb57cf95487e7fe1454b2130ef18acc916da46
[ "BSD-3-Clause" ]
3
2019-08-08T09:09:35.000Z
2020-12-15T18:04:17.000Z
tuiuiu/tuiuiucore/rich_text.py
caputomarcos/tuiuiu.io
d8fb57cf95487e7fe1454b2130ef18acc916da46
[ "BSD-3-Clause" ]
null
null
null
tuiuiu/tuiuiucore/rich_text.py
caputomarcos/tuiuiu.io
d8fb57cf95487e7fe1454b2130ef18acc916da46
[ "BSD-3-Clause" ]
1
2017-09-09T20:10:40.000Z
2017-09-09T20:10:40.000Z
from __future__ import absolute_import, unicode_literals import re # parsing HTML with regexes LIKE A BOSS. from django.utils.encoding import python_2_unicode_compatible from django.utils.html import escape from django.utils.safestring import mark_safe from tuiuiu.tuiuiucore import hooks from tuiuiu.tuiuiucore.mode...
35.102439
93
0.672318
d4fe9338bad1561eb46b2348c731e892650acf88
2,074
py
Python
pysnmp/LIVINGSTON-ROOT-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/LIVINGSTON-ROOT-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/LIVINGSTON-ROOT-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module LIVINGSTON-ROOT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/LIVINGSTON-ROOT-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:56:56 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default...
98.761905
505
0.762295
37cbe3187457307c4538aa23d8d17a7d58242e2c
5,947
py
Python
src/python/turicreate/test/test_graph_compute.py
pappasG/turicreate
494e313957a6c01333628b182a7d5bc6efea18f8
[ "BSD-3-Clause" ]
2
2019-02-08T08:45:27.000Z
2020-09-07T05:55:18.000Z
src/python/turicreate/test/test_graph_compute.py
pappasG/turicreate
494e313957a6c01333628b182a7d5bc6efea18f8
[ "BSD-3-Clause" ]
3
2022-02-15T04:42:24.000Z
2022-03-12T01:05:15.000Z
src/python/turicreate/test/test_graph_compute.py
pappasG/turicreate
494e313957a6c01333628b182a7d5bc6efea18f8
[ "BSD-3-Clause" ]
1
2019-11-23T09:47:24.000Z
2019-11-23T09:47:24.000Z
# -*- 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...
49.14876
186
0.666555
d2525117447840d95af45ecad78f35910c0b7622
2,076
py
Python
sms_post.py
kanazux/dev-test
c87084e1ed590a2058bbe5103e993fc7cf875d19
[ "BSD-2-Clause" ]
null
null
null
sms_post.py
kanazux/dev-test
c87084e1ed590a2058bbe5103e993fc7cf875d19
[ "BSD-2-Clause" ]
null
null
null
sms_post.py
kanazux/dev-test
c87084e1ed590a2058bbe5103e993fc7cf875d19
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import json import base64 import binascii from flask import g, abort, Flask, jsonify, request ddd = ['11', '12', '13', '14', '15', '16', '17', '18', '19', '21', '22', '24', '27', '28', '31', '32', '33', '34', '35', '37', '38', '41', '42', '43', '44', '...
30.529412
120
0.542871
4daa59d8264fd1915b960e58a9735f9477df0b17
841
py
Python
neighbours/urls.py
Janice-M/fireNation
dfd37d96bfbb4cc18a5bd68b9fabd592a17a8e20
[ "MIT" ]
null
null
null
neighbours/urls.py
Janice-M/fireNation
dfd37d96bfbb4cc18a5bd68b9fabd592a17a8e20
[ "MIT" ]
9
2021-03-19T01:23:55.000Z
2022-03-11T23:59:05.000Z
neighbours/urls.py
Janice-M/fireNation
dfd37d96bfbb4cc18a5bd68b9fabd592a17a8e20
[ "MIT" ]
null
null
null
from django.conf import settings from django.conf.urls.static import static from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.homepage, name='homepage'), url(r'^add/hood$', views.add_hood, name='add_hood'), url(r'^join_hood/(\d+)', views.join_hood, name='join_hood'), ...
35.041667
77
0.674197
109983852c1ee58fdf1617223678b405cb41ced0
1,896
py
Python
perma_web/perma/settings/utils/environmental_settings.py
leppert/perma
adb0cec29679c3d161d72330e19114f89f8c42ac
[ "MIT", "Unlicense" ]
null
null
null
perma_web/perma/settings/utils/environmental_settings.py
leppert/perma
adb0cec29679c3d161d72330e19114f89f8c42ac
[ "MIT", "Unlicense" ]
null
null
null
perma_web/perma/settings/utils/environmental_settings.py
leppert/perma
adb0cec29679c3d161d72330e19114f89f8c42ac
[ "MIT", "Unlicense" ]
null
null
null
### environment settings overrides ### # this is included by __init__.py import os # this lets us set values from the environment, like # export DJANGO__SECRET_KEY=foo # export DJANGO__INT__SITE_ID=1 # export DJANGO__DATABASES__default__NAME=perma # export DJANGO__MIRRORS__0='http://127.0.0.1:8001' def import_environ...
37.92
94
0.46308
69d6307df69c55193a2684ffbfef28b4acb4d3d1
1,052
py
Python
python_practice/breadth_first_search.py
fourier11/interview
66aba2b91705e3018004915e6da9210a72846cc3
[ "MIT" ]
null
null
null
python_practice/breadth_first_search.py
fourier11/interview
66aba2b91705e3018004915e6da9210a72846cc3
[ "MIT" ]
null
null
null
python_practice/breadth_first_search.py
fourier11/interview
66aba2b91705e3018004915e6da9210a72846cc3
[ "MIT" ]
null
null
null
from collections import deque ''' 广度优先算法,判断你的朋友名字是否以m结尾 广度优先算法可以用于找到最短路径 ''' graph = {} graph["you"] = ["alice", "bob", "claire"] graph["bob"] = ["anuj", "peggy"] graph["alice"] = ["peggy"] graph["claire"] = ["thom", "jonny"] graph["anuj"] = [] graph["peggy"] = [] graph["thom"] = [] graph["jonny"] = [] def search(na...
25.658537
84
0.588403
37bd1d9d0e190d23b4bf8c850195240f5e9847fc
5,595
py
Python
electrum_mona/gui/kivy/uix/dialogs/lightning_open_channel.py
david4neblio/electrum-mona
2d13b066be2d6205aeaa7ca859884c3ec1b92e83
[ "MIT" ]
2
2019-12-27T09:13:48.000Z
2020-09-18T14:10:48.000Z
electrum_mona/gui/kivy/uix/dialogs/lightning_open_channel.py
david4neblio/electrum-mona
2d13b066be2d6205aeaa7ca859884c3ec1b92e83
[ "MIT" ]
2
2020-07-31T20:14:43.000Z
2021-10-17T02:33:41.000Z
electrum_mona/gui/kivy/uix/dialogs/lightning_open_channel.py
david4neblio/electrum-mona
2d13b066be2d6205aeaa7ca859884c3ec1b92e83
[ "MIT" ]
3
2020-03-08T19:40:17.000Z
2021-11-10T21:41:11.000Z
from kivy.lang import Builder from kivy.factory import Factory from electrum_mona.gui.kivy.i18n import _ from electrum_mona.lnaddr import lndecode from electrum_mona.util import bh2u from electrum_mona.bitcoin import COIN import electrum_mona.simple_config as config from .label_dialog import LabelDialog Builder.load_s...
36.809211
105
0.546917
0a667e41152fd8c9ba2383b27f91dd4687ca1ed0
2,876
py
Python
users/migrations/0001_initial.py
boussier/CCPSMV_dashboard
5a0ac667713f7fd9e3e93c2a83e3da6f3657323f
[ "MIT" ]
1
2021-04-21T11:05:15.000Z
2021-04-21T11:05:15.000Z
users/migrations/0001_initial.py
boussier/django_rest_api
fb0b25896370f59d33caf51d5852793e0c94d43c
[ "MIT" ]
null
null
null
users/migrations/0001_initial.py
boussier/django_rest_api
fb0b25896370f59d33caf51d5852793e0c94d43c
[ "MIT" ]
2
2022-03-10T21:14:13.000Z
2022-03-15T14:06:45.000Z
# Generated by Django 3.1.4 on 2020-12-10 11:49 import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0012_alter_user_first_name_m...
63.911111
329
0.664117
00008c8370b8df483a4c73eb81be1fb950b97c32
2,530
py
Python
gdsfactory/tests/test_import_gds_settings.py
simbilod/gdsfactory
4d76db32674c3edb4d16260e3177ee29ef9ce11d
[ "MIT" ]
null
null
null
gdsfactory/tests/test_import_gds_settings.py
simbilod/gdsfactory
4d76db32674c3edb4d16260e3177ee29ef9ce11d
[ "MIT" ]
null
null
null
gdsfactory/tests/test_import_gds_settings.py
simbilod/gdsfactory
4d76db32674c3edb4d16260e3177ee29ef9ce11d
[ "MIT" ]
null
null
null
from typing import Any, Dict, List, Union from gdsfactory.components import cells skip_test = { "version_stamp", "extend_ports_list", "extend_port", "grating_coupler_tree", "compensation_path", "spiral_inner_io_with_gratings", "component_sequence", "straight_heater_metal_90_90", "s...
32.435897
91
0.709881
1082a6dfcf6dc6bcec8340eb74b238999870f989
10,339
py
Python
odk_logger/migrations/0031_auto__add_field_xform_last_submission_time.py
curenamo/ssmreleva
6e50b8819713c81f42a638dfbe9aa37bd943400f
[ "BSD-2-Clause" ]
123
2015-01-08T09:21:05.000Z
2021-11-14T19:45:23.000Z
odk_logger/migrations/0031_auto__add_field_xform_last_submission_time.py
cybernetics/formhub
578fc2c5e9febe8dc68b37f7d2e85a76dc2c4c04
[ "BSD-2-Clause" ]
16
2015-02-13T16:56:42.000Z
2021-02-20T23:58:43.000Z
odk_logger/migrations/0031_auto__add_field_xform_last_submission_time.py
cybernetics/formhub
578fc2c5e9febe8dc68b37f7d2e85a76dc2c4c04
[ "BSD-2-Clause" ]
110
2015-01-19T14:34:06.000Z
2021-02-01T14:55:11.000Z
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'XForm.last_submission_time' db.add_column(u'odk_logger_xform', 'last_submission_time', ...
75.467153
187
0.565238
cf8e9d6c526580bbbd85e6c83b9f9f5196453799
17,818
py
Python
poetry/mixology/version_solver.py
colour-science/poetry
f0855d984d9b0b38657c8b8522d3cfa36280b47c
[ "MIT" ]
2
2019-06-19T15:07:58.000Z
2019-11-24T14:08:55.000Z
poetry/mixology/version_solver.py
djetelina/poetry
1aa1ab2962bb8b6aed33c2308cf8352809d91685
[ "MIT" ]
1
2021-02-15T17:05:58.000Z
2021-02-15T17:05:58.000Z
poetry/mixology/version_solver.py
djetelina/poetry
1aa1ab2962bb8b6aed33c2308cf8352809d91685
[ "MIT" ]
1
2019-06-19T15:08:05.000Z
2019-06-19T15:08:05.000Z
# -*- coding: utf-8 -*- import time from typing import Dict from typing import List from typing import Union from poetry.packages import Dependency from poetry.packages import ProjectPackage from poetry.packages import Package from poetry.puzzle.provider import Provider from poetry.semver import Version from poetry.s...
39.861298
121
0.606521
5aac1cfb2a107202013b2247c44955cb8b765a39
2,986
py
Python
tests/test_config_flow.py
mchwalisz/home-assistant-senec
b15843daaefdef34e9f774956eaa4c01b9169fcb
[ "Apache-2.0" ]
10
2021-02-25T12:26:58.000Z
2022-03-01T07:32:46.000Z
tests/test_config_flow.py
mchwalisz/home-assistant-senec
b15843daaefdef34e9f774956eaa4c01b9169fcb
[ "Apache-2.0" ]
16
2020-09-18T19:29:15.000Z
2022-03-09T11:23:47.000Z
tests/test_config_flow.py
mchwalisz/home-assistant-senec
b15843daaefdef34e9f774956eaa4c01b9169fcb
[ "Apache-2.0" ]
10
2020-10-01T20:59:31.000Z
2022-03-01T07:32:19.000Z
"""Test the senec config flow.""" from homeassistant import config_entries, setup from homeassistant.components.senec.config_flow import CannotConnect, InvalidAuth from homeassistant.components.senec.const import DOMAIN from tests.async_mock import patch async def test_form(hass): """Test we get the form.""" ...
32.456522
81
0.616209
20476db7a51b053fd3d80fc08b74a0f7f6755876
474
py
Python
fixture/creator.py
Lucas1985/kurs_pythona_new
552f1ceec2ff1427dd6ff9d1c69ab5a892271682
[ "Apache-2.0" ]
null
null
null
fixture/creator.py
Lucas1985/kurs_pythona_new
552f1ceec2ff1427dd6ff9d1c69ab5a892271682
[ "Apache-2.0" ]
null
null
null
fixture/creator.py
Lucas1985/kurs_pythona_new
552f1ceec2ff1427dd6ff9d1c69ab5a892271682
[ "Apache-2.0" ]
null
null
null
class CreatorHelper: def __init(self, app): self.app = app def change_field_value(self, field_value, text): wd = self.app.wd if text is not None: wd.find_element_by_name(field_value).click() wd.find_element_by_name(field_value).clear() wd.find_eleme...
29.625
64
0.64557
f980b8dc1de1f91d5b1dd6f67fd1771681224c64
1,164
py
Python
NYRP/migrations/0019_questionbug.py
WalterSchaertl/NYRP
bd9554fba80ed11f9c8efbc6c19b5a5cb987e3b6
[ "MIT" ]
1
2018-09-27T01:44:48.000Z
2018-09-27T01:44:48.000Z
NYRP/migrations/0019_questionbug.py
WalterSchaertl/NYRP
bd9554fba80ed11f9c8efbc6c19b5a5cb987e3b6
[ "MIT" ]
5
2021-04-08T18:23:14.000Z
2021-09-22T17:37:53.000Z
NYRP/migrations/0019_questionbug.py
WalterSchaertl/NYRP
bd9554fba80ed11f9c8efbc6c19b5a5cb987e3b6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-09-24 01:14 from __future__ import unicode_literals import datetime from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('NYRP', '0018_auto_20170919_1313'), ] ...
41.571429
335
0.628007
c63896c89730d94778a16854a79d972b459605d2
1,412
py
Python
cfg/caro_file_prep.py
a1247418/MT18_LH_human-sleep-classification
c4a40571390aaa14b1cc8a458100e21252fe05d2
[ "MIT" ]
null
null
null
cfg/caro_file_prep.py
a1247418/MT18_LH_human-sleep-classification
c4a40571390aaa14b1cc8a458100e21252fe05d2
[ "MIT" ]
null
null
null
cfg/caro_file_prep.py
a1247418/MT18_LH_human-sleep-classification
c4a40571390aaa14b1cc8a458100e21252fe05d2
[ "MIT" ]
null
null
null
# Use the following to get rid of files with the old filter # find -type f -regextype posix-extended ! -iregex '.*_newfilt\.mat$' -delete # # This script is used to unify the naming convention of the sleep recording files import os data_dir = "/cluster/scratch/llorenz/data/caro_new/" files = [f for f in os.listdir(da...
35.3
96
0.616856
2132401b72e9f377e3b3e301afce0dfea030998b
272
py
Python
web/impact/impact/views/api_registration_view.py
masschallenge/impact-api
81075ced8fcc95de9390dd83c15e523e67fc48c0
[ "MIT" ]
5
2017-10-19T15:11:52.000Z
2020-03-08T07:16:21.000Z
web/impact/impact/views/api_registration_view.py
masschallenge/impact-api
81075ced8fcc95de9390dd83c15e523e67fc48c0
[ "MIT" ]
182
2017-06-21T19:32:13.000Z
2021-03-22T13:38:16.000Z
web/impact/impact/views/api_registration_view.py
masschallenge/impact-api
81075ced8fcc95de9390dd83c15e523e67fc48c0
[ "MIT" ]
1
2018-06-23T11:53:18.000Z
2018-06-23T11:53:18.000Z
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from django.urls import reverse from registration.backends.simple.views import RegistrationView class APIRegistrationView(RegistrationView): def get_success_url(self, user): return reverse('api-root')
22.666667
63
0.772059
cf852852484ccf979e059170505d800849d97458
1,807
py
Python
app/doll/models/doll.py
Younlab/GFS-Backend
06bd2d14bc1e3226a458089fb99496516273f296
[ "MIT" ]
2
2019-03-03T10:59:55.000Z
2019-03-03T11:00:07.000Z
app/doll/models/doll.py
Younlab/GFS-Backend
06bd2d14bc1e3226a458089fb99496516273f296
[ "MIT" ]
null
null
null
app/doll/models/doll.py
Younlab/GFS-Backend
06bd2d14bc1e3226a458089fb99496516273f296
[ "MIT" ]
null
null
null
from django.contrib.postgres.fields import ArrayField from django.db import models __all__ = ( 'Doll', 'Status', ) class Doll(models.Model): id = models.PositiveIntegerField(unique=True, primary_key=True) code_name = models.CharField(max_length=50) rank = models.PositiveSmallIntegerField() ty...
28.234375
67
0.667405
c268d77d12b97290f021d9f26570c7008a4777aa
10,236
py
Python
torchani/utils.py
eric-erki/ccurate-Neural-Network-Potential-on-PyTorch-
e1c78efe0e8b471f6f666d5806b0f6ee529d0cc0
[ "MIT" ]
null
null
null
torchani/utils.py
eric-erki/ccurate-Neural-Network-Potential-on-PyTorch-
e1c78efe0e8b471f6f666d5806b0f6ee529d0cc0
[ "MIT" ]
null
null
null
torchani/utils.py
eric-erki/ccurate-Neural-Network-Potential-on-PyTorch-
e1c78efe0e8b471f6f666d5806b0f6ee529d0cc0
[ "MIT" ]
null
null
null
import torch import torch.utils.data import math from collections import defaultdict def pad(species): """Put different species together into single tensor. If the species are from molecules of different number of total atoms, then ghost atoms with atom type -1 will be added to make it fit into the same ...
39.068702
98
0.643318
5a36f92307c079d0b7a4b47be54f9c73e25f9cd6
562
py
Python
photos/tests/test_views.py
phacic/photos_album
1b67798284988322b10bcc29acfba6784d068aca
[ "Apache-2.0" ]
null
null
null
photos/tests/test_views.py
phacic/photos_album
1b67798284988322b10bcc29acfba6784d068aca
[ "Apache-2.0" ]
null
null
null
photos/tests/test_views.py
phacic/photos_album
1b67798284988322b10bcc29acfba6784d068aca
[ "Apache-2.0" ]
null
null
null
from django.urls import reverse from faker import Faker fake = Faker() class TestPhoto: def test_create_photo(self, create_image, auth_api_client, user_someone): client = auth_api_client(user_someone) with open(create_image.name, 'rb') as im: url = reverse('photo-list') ...
24.434783
77
0.576512
2d1c5f82b41cf4b0491433cd0441af4154510624
309
py
Python
py/codechef/challenge2015/input/F_CaseGenerator.py
shhuan/algorithms
2830c7e2ada8dfd3dcdda7c06846116d4f944a27
[ "MIT" ]
null
null
null
py/codechef/challenge2015/input/F_CaseGenerator.py
shhuan/algorithms
2830c7e2ada8dfd3dcdda7c06846116d4f944a27
[ "MIT" ]
null
null
null
py/codechef/challenge2015/input/F_CaseGenerator.py
shhuan/algorithms
2830c7e2ada8dfd3dcdda7c06846116d4f944a27
[ "MIT" ]
1
2022-03-09T04:52:55.000Z
2022-03-09T04:52:55.000Z
# -*- coding: utf-8 -*- """ created by huash at 2015-05-17 11:30 """ __author__ = 'huash' import sys import os import random sys.stdout = open('sampleF-gen.txt', 'w') caseCount = 100 print(caseCount) for ci in range(caseCount): N = random.randint(1, 10) K = random.randint(1, 4) print(N, K)
14.045455
41
0.634304
381e29283d417d73875a65eda0c9016fc5e28b6d
7,625
py
Python
pandas/tools/util.py
sandbox/pandas
fd5471208244ae1cb9cb426d6aa02ab408cfacba
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause" ]
1
2019-04-28T13:48:34.000Z
2019-04-28T13:48:34.000Z
pandas/tools/util.py
sandbox/pandas
fd5471208244ae1cb9cb426d6aa02ab408cfacba
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause" ]
null
null
null
pandas/tools/util.py
sandbox/pandas
fd5471208244ae1cb9cb426d6aa02ab408cfacba
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause" ]
1
2019-04-28T13:48:35.000Z
2019-04-28T13:48:35.000Z
import numpy as np import pandas.lib as lib from pandas.types.common import (is_number, is_numeric_dtype, is_datetime_or_timedelta_dtype, is_list_like, _ensure_object, ...
30.995935
77
0.580066
ac4ed5cb7896345e483c2d63ce7f637a86bd1df9
611
py
Python
data/multiphysics_preliminary/plank_10_slice/create_mgxs.py
gwenchee/2021-chee-prelim
e28fae5f64ab4a4464d73b4cc42cb5c767754e5a
[ "BSD-3-Clause" ]
null
null
null
data/multiphysics_preliminary/plank_10_slice/create_mgxs.py
gwenchee/2021-chee-prelim
e28fae5f64ab4a4464d73b4cc42cb5c767754e5a
[ "BSD-3-Clause" ]
null
null
null
data/multiphysics_preliminary/plank_10_slice/create_mgxs.py
gwenchee/2021-chee-prelim
e28fae5f64ab4a4464d73b4cc42cb5c767754e5a
[ "BSD-3-Clause" ]
null
null
null
import openmc from openmc_file import * sp = openmc.StatePoint("statepoint.80.h5", autolink=False) su = openmc.Summary("summary.h5") sp.link_with_summary(su) mgxs_lib.load_from_statepoint(sp) mgxs_file = mgxs_lib.create_mg_library( xs_type="macro", xsdata_names=[ "bounds", "graphite1", ...
21.821429
58
0.620295
b457b1d851928af344a2878e37e36d9db4aa7e77
10,501
py
Python
src/ethereum/frontier/vm/instructions/system.py
LaudateCorpus1/execution-specs
1f2e9f925ffd7352da74408dfaa823c67cf469ff
[ "CC0-1.0" ]
null
null
null
src/ethereum/frontier/vm/instructions/system.py
LaudateCorpus1/execution-specs
1f2e9f925ffd7352da74408dfaa823c67cf469ff
[ "CC0-1.0" ]
1
2021-09-12T07:33:49.000Z
2021-09-12T07:33:49.000Z
src/ethereum/frontier/vm/instructions/system.py
LaudateCorpus1/execution-specs
1f2e9f925ffd7352da74408dfaa823c67cf469ff
[ "CC0-1.0" ]
null
null
null
""" Ethereum Virtual Machine (EVM) System Instructions ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. contents:: Table of Contents :backlinks: none :local: Introduction ------------ Implementations of the EVM system related instructions. """ from ethereum.base_types import U256, Bytes0, Uint from ethe...
30.262248
79
0.687458
c7949b73e2165d9f065ce877ef70a9d9fb287e5e
4,264
py
Python
Documentation/conf.py
ryandgoulding/ovn
f792b1a00b439a949e3b7aae4951f8513340c1a1
[ "Apache-2.0" ]
null
null
null
Documentation/conf.py
ryandgoulding/ovn
f792b1a00b439a949e3b7aae4951f8513340c1a1
[ "Apache-2.0" ]
null
null
null
Documentation/conf.py
ryandgoulding/ovn
f792b1a00b439a949e3b7aae4951f8513340c1a1
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Open vSwitch documentation build configuration file, created by # sphinx-quickstart on Fri Sep 30 09:57:36 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. ...
32.30303
78
0.682458
79b7506bc94203d85c2726f99afa9b34e2c0320e
2,145
py
Python
automon/helpers/threading/worker_thread.py
TheShellLand/automonisaur
b5f304a44449b8664c93d8a8a3c3cf2d73aa0ce9
[ "MIT" ]
2
2021-09-15T18:35:44.000Z
2022-01-18T05:36:54.000Z
automon/helpers/threading/worker_thread.py
TheShellLand/automonisaur
b5f304a44449b8664c93d8a8a3c3cf2d73aa0ce9
[ "MIT" ]
16
2021-08-29T22:51:53.000Z
2022-03-09T16:08:19.000Z
automon/helpers/threading/worker_thread.py
TheShellLand/automonisaur
b5f304a44449b8664c93d8a8a3c3cf2d73aa0ce9
[ "MIT" ]
null
null
null
import queue import threading import time print_lock = threading.Lock() def init_queue(): """ Initialize the Queue """ return queue.Queue() def job(queue_item): """ What is actually being worked on """ with print_lock: print('+ Job:', threading.current_thread().getName()) args = dict(...
24.101124
114
0.570629
a74d6eabcc929c89cd712b36ec9a6dfaf62781ab
3,457
py
Python
aliyun-python-sdk-hbr/aliyunsdkhbr/request/v20170908/CreatePlanRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
1,001
2015-07-24T01:32:41.000Z
2022-03-25T01:28:18.000Z
aliyun-python-sdk-hbr/aliyunsdkhbr/request/v20170908/CreatePlanRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
363
2015-10-20T03:15:00.000Z
2022-03-08T12:26:19.000Z
aliyun-python-sdk-hbr/aliyunsdkhbr/request/v20170908/CreatePlanRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
682
2015-09-22T07:19:02.000Z
2022-03-22T09:51:46.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...
31.144144
74
0.75499
3d437e4017959469aae249b7c162626dda9f98fe
1,015
py
Python
LeetcodeAlgorithms/367. Valid Perfect Square/valid-perfect-square.py
Fenghuapiao/PyLeetcode
d804a62643fe935eb61808196a2c093ea9583654
[ "MIT" ]
3
2019-08-20T06:54:38.000Z
2022-01-07T12:56:46.000Z
LeetcodeAlgorithms/367. Valid Perfect Square/valid-perfect-square.py
Fenghuapiao/PyLeetcode
d804a62643fe935eb61808196a2c093ea9583654
[ "MIT" ]
null
null
null
LeetcodeAlgorithms/367. Valid Perfect Square/valid-perfect-square.py
Fenghuapiao/PyLeetcode
d804a62643fe935eb61808196a2c093ea9583654
[ "MIT" ]
2
2018-06-07T02:56:39.000Z
2018-08-01T15:27:55.000Z
class Solution(object): def isPerfectSquare(self, num): """ :type num: int :rtype: bool """ r = num r = (r + num / r) / 2 r = (r + num / r) / 2 r = (r + num / r) / 2 r = (r + num / r) / 2 r = (r + num / r) / 2 r = (r...
29
36
0.263054
4c82fee24f893f4b481bcdcbf5d8bcc6f1746923
1,173
py
Python
bin/colors.py
PyreFramework/pyre
345c7449a3416eea1c1affa74fb32faff30a6aaa
[ "BSD-3-Clause" ]
null
null
null
bin/colors.py
PyreFramework/pyre
345c7449a3416eea1c1affa74fb32faff30a6aaa
[ "BSD-3-Clause" ]
null
null
null
bin/colors.py
PyreFramework/pyre
345c7449a3416eea1c1affa74fb32faff30a6aaa
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- Python -*- # -*- coding: utf-8 -*- # # michael a.g. aïvázis # orthologue # (c) 1998-2022 all rights reserved # # support import pyre # the app class Colors(pyre.application): """ A generator of colorized directory listings that is repository aware """ # user configurab...
19.881356
72
0.585678
cf1d674011c98ffa7e444513c0302da93a086098
3,637
py
Python
tests/api/v2/upgrade_api_test.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
5
2016-08-23T17:52:22.000Z
2019-05-16T08:45:30.000Z
tests/api/v2/upgrade_api_test.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
2
2016-11-10T05:30:21.000Z
2019-04-05T15:03:37.000Z
tests/api/v2/upgrade_api_test.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
7
2016-08-25T16:11:44.000Z
2021-02-22T05:31:25.000Z
#!/usr/bin/env python # coding: utf-8 """ upgrade_api_test.py The Clear BSD License Copyright (c) – 2016, NetApp, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the ...
47.855263
844
0.698378
56634d1fbc9d52e88168177edeed0da1e03430f4
14,965
py
Python
scripts/exp-application/fwt_oTree/fwt/pages.py
ffzg-erudito/inter-testing-feedback-2018
368f3fb8960535dd0d99213a360491b1edde8b39
[ "CC0-1.0", "CC-BY-4.0" ]
null
null
null
scripts/exp-application/fwt_oTree/fwt/pages.py
ffzg-erudito/inter-testing-feedback-2018
368f3fb8960535dd0d99213a360491b1edde8b39
[ "CC0-1.0", "CC-BY-4.0" ]
null
null
null
scripts/exp-application/fwt_oTree/fwt/pages.py
ffzg-erudito/inter-testing-feedback-2018
368f3fb8960535dd0d99213a360491b1edde8b39
[ "CC0-1.0", "CC-BY-4.0" ]
null
null
null
from otree.api import Currency as c, currency_range from ._builtin import Page from .models import Constants import time import math # this function outputs an integer in the range from 1 to 4 which # represents a particular experimental situation def switch(x): return { 'a': 1, 'b': 2, ...
25.067002
144
0.609288
3ed1db36c1caea286e3d582531bec037ca4be573
29,057
py
Python
kivymd/theming.py
yaxter/KivyMD
5094cdcab6298c63b1edac33a214601b8f022fa8
[ "MIT" ]
null
null
null
kivymd/theming.py
yaxter/KivyMD
5094cdcab6298c63b1edac33a214601b8f022fa8
[ "MIT" ]
null
null
null
kivymd/theming.py
yaxter/KivyMD
5094cdcab6298c63b1edac33a214601b8f022fa8
[ "MIT" ]
null
null
null
""" Themes/Theming ============== .. seealso:: `Material Design spec, Material theming <https://material.io/design/material-theming>`_ Material App ------------ The main class of your application, which in `Kivy` inherits from the App class, in `KivyMD` must inherit from the `MDApp` class. The `MDApp` class has ...
32.142699
115
0.625219
2162766a8a2dee0bd12ff7b69d20d3a4f58431f2
2,744
py
Python
conferences/list_participants.py
mickstevens/python3-twilio-sdkv6-examples
aac0403533b35fec4e8483de18d8fde2d783cfb2
[ "MIT" ]
1
2018-11-23T20:11:27.000Z
2018-11-23T20:11:27.000Z
conferences/list_participants.py
mickstevens/python3-twilio-sdkv6-examples
aac0403533b35fec4e8483de18d8fde2d783cfb2
[ "MIT" ]
null
null
null
conferences/list_participants.py
mickstevens/python3-twilio-sdkv6-examples
aac0403533b35fec4e8483de18d8fde2d783cfb2
[ "MIT" ]
null
null
null
# *** List Conference Participants *** # Code based on https://www.twilio.com/docs/voice/api/conference-participant # Download Python 3 from https://www.python.org/downloads/ # Download the Twilio helper library from https://www.twilio.com/docs/python/install import os from twilio.rest import Client # from datetime imp...
46.508475
118
0.694971
3533f02307e66834392f24f3041ab6fdb1ae0f99
24,764
py
Python
netbox/dcim/api/views.py
promasu/netbox
14d2a499420aa1fd28508311781c769adfbab4d1
[ "Apache-2.0" ]
null
null
null
netbox/dcim/api/views.py
promasu/netbox
14d2a499420aa1fd28508311781c769adfbab4d1
[ "Apache-2.0" ]
null
null
null
netbox/dcim/api/views.py
promasu/netbox
14d2a499420aa1fd28508311781c769adfbab4d1
[ "Apache-2.0" ]
null
null
null
import socket from collections import OrderedDict from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.db.models import F from django.http import HttpResponseForbidden, HttpResponse from django.shortcuts import get_object_or_404 from drf_yasg import openapi from drf_y...
35.326676
120
0.705177
9fa5beb745f9ea932d9a8651f2fdda11849c49bf
591
py
Python
amp/models/model_garden.py
szczurek-lab/hydramp
be4eb6defe227fe3fef4fe9882a85a0b717301c6
[ "MIT" ]
4
2022-03-04T15:57:24.000Z
2022-03-24T11:13:01.000Z
amp/models/model_garden.py
szczurek-lab/hydramp
be4eb6defe227fe3fef4fe9882a85a0b717301c6
[ "MIT" ]
null
null
null
amp/models/model_garden.py
szczurek-lab/hydramp
be4eb6defe227fe3fef4fe9882a85a0b717301c6
[ "MIT" ]
1
2022-03-07T16:44:11.000Z
2022-03-07T16:44:11.000Z
from amp.models.discriminators import veltri_amp_classifier from amp.models.discriminators import amp_classifier_noCONV from amp.models.decoders import amp_expanded_decoder from amp.models.encoders import amp_expanded_encoder from amp.models.master import master MODEL_GAREDN = { 'VeltriAMPClassifier': veltri_amp_...
39.4
69
0.840948
572f33e8473bc647acef8757ec7244338ad24054
2,323
py
Python
experiments/networks/mnist/dcgan.py
yashkhasbage25/LTH
4a793980247d50846173071740e9036ab7bbe1a4
[ "MIT" ]
null
null
null
experiments/networks/mnist/dcgan.py
yashkhasbage25/LTH
4a793980247d50846173071740e9036ab7bbe1a4
[ "MIT" ]
null
null
null
experiments/networks/mnist/dcgan.py
yashkhasbage25/LTH
4a793980247d50846173071740e9036ab7bbe1a4
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import torch import torch.nn as nn class Generator(nn.Module): def __init__(self, d=4, z_len=100): super(Generator, self).__init__() layers = [ nn.ConvTranspose2d(z_len, d * 8, 4, 1, 0, bias=False), # (8d, 4, 4) nn.BatchNorm2d(d * 8), ...
31.391892
81
0.480844
dea8fe0a992dc364cee290980afdcd9094d16816
1,651
py
Python
ds_info/utils/io_utils.py
camgbus/dataset_statistics
8aa38c2f3c24c0db83fc8c5b57c2d211ab732e35
[ "MIT" ]
null
null
null
ds_info/utils/io_utils.py
camgbus/dataset_statistics
8aa38c2f3c24c0db83fc8c5b57c2d211ab732e35
[ "MIT" ]
null
null
null
ds_info/utils/io_utils.py
camgbus/dataset_statistics
8aa38c2f3c24c0db83fc8c5b57c2d211ab732e35
[ "MIT" ]
null
null
null
import os import SimpleITK as sitk def list_files(dataset_path): """List files in a dataset directory with the format of the Medical Segmentation Decathlon. Parameters: dataset_path (str): path to a dataset Returns: lst(str): full file names """ train_img_path = os.path.join(dataset_p...
33.02
79
0.706844
bb75e8baadc1411acd4d3d210b1b2a804a65b3c0
11,647
py
Python
main.py
RussellPacheco/Discord-Message-Deleter-Bot
f724a08c277ff86c6bc4c9979e5797172a8ef0ba
[ "MIT", "Unlicense" ]
null
null
null
main.py
RussellPacheco/Discord-Message-Deleter-Bot
f724a08c277ff86c6bc4c9979e5797172a8ef0ba
[ "MIT", "Unlicense" ]
null
null
null
main.py
RussellPacheco/Discord-Message-Deleter-Bot
f724a08c277ff86c6bc4c9979e5797172a8ef0ba
[ "MIT", "Unlicense" ]
null
null
null
from dotenv import load_dotenv import discord from discord.ext import commands import logging from datetime import datetime import os load_dotenv() #################### # # Channels # #################### OFF_TOPIC_CHANNEL = 824643646748885022 BB_GENERAL_CHANNEL = 711441407914672162 BB_TEST_CHANNEL = 85818809061...
30.730871
126
0.643857
9cba158ae328844fbf94650cf0eefe57d5e57d71
45,514
py
Python
algorithms/puzzles.py
jcarreiro/jmc-python
979c67ca489d4e80e6be96d23f8bcecacabbee59
[ "MIT" ]
null
null
null
algorithms/puzzles.py
jcarreiro/jmc-python
979c67ca489d4e80e6be96d23f8bcecacabbee59
[ "MIT" ]
null
null
null
algorithms/puzzles.py
jcarreiro/jmc-python
979c67ca489d4e80e6be96d23f8bcecacabbee59
[ "MIT" ]
null
null
null
# ------------------------------------------------------------------------------ # Algorithmic puzzles! # # Copyright (c) 2013, Jason M. Carreiro. # # See LICENSE file for license information. # # todo: It would be nice to be able to view the call graph for the # tree-recursive problems using pylab. # # problem t...
34.823259
104
0.52909
22b06532cdd180bde8460253d9a2c781b4d77746
4,553
py
Python
examples/testapp/testapp/views.py
benthomasson/gevent-socketio
0f9bd2744af033b7cba57bfd5b82106592e9f667
[ "BSD-3-Clause" ]
625
2015-01-05T04:11:59.000Z
2022-03-14T13:29:59.000Z
examples/testapp/testapp/views.py
benthomasson/gevent-socketio
0f9bd2744af033b7cba57bfd5b82106592e9f667
[ "BSD-3-Clause" ]
53
2015-01-30T07:55:45.000Z
2021-02-28T10:50:34.000Z
examples/testapp/testapp/views.py
benthomasson/gevent-socketio
0f9bd2744af033b7cba57bfd5b82106592e9f667
[ "BSD-3-Clause" ]
213
2015-01-05T10:18:51.000Z
2022-01-23T08:57:38.000Z
from pyramid.view import view_config import gevent from socketio import socketio_manage from socketio.namespace import BaseNamespace from socketio.mixins import RoomsMixin, BroadcastMixin from gevent import socket def index(request): """ Base view to load our template """ return {} """ ACK model: The clien...
29
79
0.654514
2ae0b105061b41403efcb0d9dad4680380011011
7,656
py
Python
tests/slack_bolt/context/test_ack.py
hirosassa/bolt-python
befc3a1463f3ac8dbb780d66decc304e2bdf3e7a
[ "MIT" ]
504
2020-08-07T05:02:57.000Z
2022-03-31T14:32:46.000Z
tests/slack_bolt/context/test_ack.py
hirosassa/bolt-python
befc3a1463f3ac8dbb780d66decc304e2bdf3e7a
[ "MIT" ]
560
2020-08-07T01:16:06.000Z
2022-03-30T00:40:56.000Z
tests/slack_bolt/context/test_ack.py
hirosassa/bolt-python
befc3a1463f3ac8dbb780d66decc304e2bdf3e7a
[ "MIT" ]
150
2020-08-07T09:41:14.000Z
2022-03-30T04:54:51.000Z
from slack_sdk.models.blocks import PlainTextObject, DividerBlock from slack_sdk.models.views import View from slack_bolt import Ack, BoltResponse class TestAck: def setup_method(self): pass def teardown_method(self): pass def test_text(self): ack = Ack() response: BoltR...
37.714286
734
0.502874
2f9e1ef7cc33f61994ce9aa5e62ad860a795bc58
1,974
py
Python
src/beaches_test.py
nathaningle/beaches
d2aef7b635657d8c5b9f1551755d38b41c2611a2
[ "0BSD" ]
null
null
null
src/beaches_test.py
nathaningle/beaches
d2aef7b635657d8c5b9f1551755d38b41c2611a2
[ "0BSD" ]
null
null
null
src/beaches_test.py
nathaningle/beaches
d2aef7b635657d8c5b9f1551755d38b41c2611a2
[ "0BSD" ]
null
null
null
#!/usr/bin/env python # # ISC License # # Copyright (c) 2021, Nathan Ingle # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDE...
37.245283
81
0.68997
d92e2f074ecb4b5b3d6acf05e7f95c05fd3ead07
2,297
py
Python
reviewboard/accounts/tests/test_x509_auth_middleware.py
pombredanne/reviewboard
15f1d7236ec7a5cb4778ebfeb8b45d13a46ac71d
[ "MIT" ]
null
null
null
reviewboard/accounts/tests/test_x509_auth_middleware.py
pombredanne/reviewboard
15f1d7236ec7a5cb4778ebfeb8b45d13a46ac71d
[ "MIT" ]
null
null
null
reviewboard/accounts/tests/test_x509_auth_middleware.py
pombredanne/reviewboard
15f1d7236ec7a5cb4778ebfeb8b45d13a46ac71d
[ "MIT" ]
null
null
null
"""Unit tests for reviewboard.accounts.middleware.x509_auth_middleware.""" from django.contrib.auth.models import AnonymousUser from django.contrib.sessions.middleware import SessionMiddleware from django.http import HttpResponse from django.test.client import RequestFactory from djblets.siteconfig.models import SiteC...
35.338462
78
0.729212
f9efda3798f41cbe083aff647662f13dbce6aba6
2,719
py
Python
server/deploy_code.py
opendevops-cn/codo-publish
ff01ddbcaadc503314a3b4f1bb5919864b9c82ab
[ "MIT" ]
13
2019-01-09T14:56:05.000Z
2021-11-16T03:12:56.000Z
server/deploy_code.py
opendevops-cn/codo-publish
ff01ddbcaadc503314a3b4f1bb5919864b9c82ab
[ "MIT" ]
null
null
null
server/deploy_code.py
opendevops-cn/codo-publish
ff01ddbcaadc503314a3b4f1bb5919864b9c82ab
[ "MIT" ]
25
2019-01-24T01:50:49.000Z
2021-12-08T14:30:53.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2018/12/7 13:42 # @Author : Fred Yang # @File : deploy_code.py # @Role : 部署代码,下发代码,此步将代码最终发布到代码目录 import os import sys Base_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.append(Base_DIR) import uuid from publ...
32.759036
127
0.568224
33e6576780706d0357615f441c85472524869708
305
py
Python
2016/07/biomass-energy-20160622/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
14
2015-05-08T13:41:51.000Z
2021-02-24T12:34:55.000Z
2016/07/biomass-energy-20160622/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
null
null
null
2016/07/biomass-energy-20160622/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
7
2015-04-04T04:45:54.000Z
2021-02-18T11:12:48.000Z
#!/usr/bin/env python import base_filters COPY_GOOGLE_DOC_KEY = '1Ckcepy7l-wOkqc_NFHuY3vyCVBccBZnPODrYWfuCm1A' USE_ASSETS = False # Use these variables to override the default cache timeouts for this graphic # DEFAULT_MAX_AGE = 20 # ASSETS_MAX_AGE = 300 JINJA_FILTER_FUNCTIONS = base_filters.FILTERS
21.785714
77
0.816393
c9e93173482d493dc40fcca14e7f8b3c229139fa
2,742
py
Python
2017/get_all.py
badgercl/servel-election-results
68d5f746d0c8bc01f335954ad2cd992064f88908
[ "MIT" ]
null
null
null
2017/get_all.py
badgercl/servel-election-results
68d5f746d0c8bc01f335954ad2cd992064f88908
[ "MIT" ]
null
null
null
2017/get_all.py
badgercl/servel-election-results
68d5f746d0c8bc01f335954ad2cd992064f88908
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf8 -*- import requests import json from time import sleep import os import sys reload(sys) sys.setdefaultencoding('utf8') def getAll(): d = [] j = get_data(0,'all') for r in j: d.append(getCircSenatoriales(r)) return d def getCircSenatoriales(c): j = get_data(c['c'],'senatori...
26.114286
143
0.670314