hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7945466c457ae96d90093395a98cc1f5725a3073 | 488 | py | Python | preprocess_data/preprocess.py | ImranRiazChohan/ml_pipeline_using_kubeflow | 0c40355832b797734ae7cfac95000f35a722c1ff | [
"MIT"
] | null | null | null | preprocess_data/preprocess.py | ImranRiazChohan/ml_pipeline_using_kubeflow | 0c40355832b797734ae7cfac95000f35a722c1ff | [
"MIT"
] | null | null | null | preprocess_data/preprocess.py | ImranRiazChohan/ml_pipeline_using_kubeflow | 0c40355832b797734ae7cfac95000f35a722c1ff | [
"MIT"
] | null | null | null | from sklearn import datasets
from sklearn.model_selection import train_test_split
import numpy as np
def _preprocess_data():
x,y=datasets.load_boston(return_X_y=True)
x_train,x_test,y_train,y_test=train_test_split(x,y,test_size=0.33)
np.save('x_train.npy', x_train)
np.save('x_test.npy', x_te... | 28.705882 | 71 | 0.70082 |
794546cc238e1a83528d033f3e4070d781d67bf9 | 1,876 | py | Python | clipl/analysis_modules/binerrorsofemptybins.py | thomas-mueller/clipl | 4c8c61dd4a09fee6ad2ec65f3baa6854cf9cce69 | [
"MIT"
] | null | null | null | clipl/analysis_modules/binerrorsofemptybins.py | thomas-mueller/clipl | 4c8c61dd4a09fee6ad2ec65f3baa6854cf9cce69 | [
"MIT"
] | null | null | null | clipl/analysis_modules/binerrorsofemptybins.py | thomas-mueller/clipl | 4c8c61dd4a09fee6ad2ec65f3baa6854cf9cce69 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
"""
import logging
import clipl.utility.logger as logger
log = logging.getLogger(__name__)
import ROOT
import clipl.analysis_modules.histogrammanipulationbase as histogrammanipulationbase
class BinErrorsOfEmptyBins(histogrammanipulationbase.HistogramManipulationBase):
"""Set bin error... | 35.396226 | 143 | 0.757996 |
7945472ae6f4641ddc7d38b81cb289f7897531df | 2,090 | py | Python | {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/migrations/0001_initial.py | jimfmunro/cookiecutter-django | 41e4470c613488c5b6ae707130053d908216729f | [
"BSD-3-Clause"
] | null | null | null | {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/migrations/0001_initial.py | jimfmunro/cookiecutter-django | 41e4470c613488c5b6ae707130053d908216729f | [
"BSD-3-Clause"
] | null | null | null | {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/migrations/0001_initial.py | jimfmunro/cookiecutter-django | 41e4470c613488c5b6ae707130053d908216729f | [
"BSD-3-Clause"
] | null | null | null | # encoding: utf8
from django.db import models, migrations
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('auth', '__first__'),
]
operations = [
migrations.CreateModel(
name='User',
fields=[
(u'id', models.Auto... | 56.486486 | 205 | 0.641148 |
794548506b30bf5cb6d9dfcdab98f32025ee7c8f | 2,442 | py | Python | sacn/messages/root_layer.py | BlakeGarner/sacn | 7eba57dc7177b3820c9d2f132512a91f70a76dcd | [
"MIT"
] | null | null | null | sacn/messages/root_layer.py | BlakeGarner/sacn | 7eba57dc7177b3820c9d2f132512a91f70a76dcd | [
"MIT"
] | null | null | null | sacn/messages/root_layer.py | BlakeGarner/sacn | 7eba57dc7177b3820c9d2f132512a91f70a76dcd | [
"MIT"
] | null | null | null | # This file is under MIT license. The license file can be obtained in the root directory of this module.
"""
This represents a root layer of an ACN Message.
Information about sACN: http://tsp.esta.org/tsp/documents/docs/E1-31-2016.pdf
"""
_FIRST_INDEX = \
(0, 0x10, 0, 0, 0x41, 0x53, 0x43, 0x2d, 0x45,
0x31, 0... | 33.452055 | 104 | 0.646601 |
7945490f22d0ebbd308ded9587e3248c14f3190b | 116 | py | Python | basi_python/list _concept/insert_list.py | KMONISH/learning-challenge-season-2 | be8271f3cbe958849e394807197d6179bbff5751 | [
"MIT"
] | null | null | null | basi_python/list _concept/insert_list.py | KMONISH/learning-challenge-season-2 | be8271f3cbe958849e394807197d6179bbff5751 | [
"MIT"
] | null | null | null | basi_python/list _concept/insert_list.py | KMONISH/learning-challenge-season-2 | be8271f3cbe958849e394807197d6179bbff5751 | [
"MIT"
] | null | null | null | List = ['hulk', 'ultron',"thor", 2011, 2015]
# Insert at index 2 value 10087
List.insert(5,2018)
print(List)
| 23.2 | 45 | 0.637931 |
7945494c0d8bd2c6ea53e40eaef2e9548110a66e | 20,138 | py | Python | c7n/resources/securityhub.py | LeonovecSergey/cloud-custodian | f1e7e2dd3679a275e2df49a86f9dee39f7845684 | [
"Apache-2.0"
] | null | null | null | c7n/resources/securityhub.py | LeonovecSergey/cloud-custodian | f1e7e2dd3679a275e2df49a86f9dee39f7845684 | [
"Apache-2.0"
] | 79 | 2019-03-20T12:27:06.000Z | 2019-08-14T14:07:04.000Z | c7n/resources/securityhub.py | LeonovecSergey/cloud-custodian | f1e7e2dd3679a275e2df49a86f9dee39f7845684 | [
"Apache-2.0"
] | 2 | 2019-04-22T15:20:23.000Z | 2019-08-27T12:37:51.000Z | # Copyright 2018-2019 Amazon.com, Inc. or its affiliates.
# 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 requ... | 36.481884 | 110 | 0.580197 |
794549b4a79e9127df75490c8d9227dcdfbfb8c8 | 1,971 | py | Python | simclr/simclr.py | janselE/SimCLR-2 | 8bec90bf718206cae4e894120f5b3a773b8049ef | [
"MIT"
] | null | null | null | simclr/simclr.py | janselE/SimCLR-2 | 8bec90bf718206cae4e894120f5b3a773b8049ef | [
"MIT"
] | null | null | null | simclr/simclr.py | janselE/SimCLR-2 | 8bec90bf718206cae4e894120f5b3a773b8049ef | [
"MIT"
] | null | null | null | import torch.nn as nn
import torch
from simclr.modules.identity import Identity
class SimCLR(nn.Module):
"""
We opt for simplicity and adopt the commonly used ResNet (He et al., 2016) to obtain hi = f(x ̃i) = ResNet(x ̃i) where hi ∈ Rd is the output after the average pooling layer.
"""
def __init__(... | 29.863636 | 177 | 0.561644 |
79454b80bf804be50a3169cfb956255cebc09f82 | 7,732 | py | Python | top_block.py | kangnaclub9/gps-sdr-sim-realtime | 54e14ad331bcd24d1709e6c0e808ffcf2ec0b506 | [
"MIT"
] | 1 | 2020-04-18T18:52:16.000Z | 2020-04-18T18:52:16.000Z | top_block.py | kangnaclub9/gps-sdr-sim-realtime | 54e14ad331bcd24d1709e6c0e808ffcf2ec0b506 | [
"MIT"
] | null | null | null | top_block.py | kangnaclub9/gps-sdr-sim-realtime | 54e14ad331bcd24d1709e6c0e808ffcf2ec0b506 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
##################################################
# GNU Radio Python Flow Graph
# Title: Top Block
# Generated: Sun Apr 30 23:18:08 2017
##################################################
if __name__ == '__main__':
import ctypes
import sys
if sys.platform.startswith('linux'):
... | 38.854271 | 116 | 0.588334 |
79454c5d835f772002153b105b183b21dcf6d477 | 24,423 | py | Python | examples/contrib/run_swag.py | nabihach/pytorch-transformers | 4c99a4eda5459e36ebb45355fa789bb6cc0bce71 | [
"Apache-2.0"
] | null | null | null | examples/contrib/run_swag.py | nabihach/pytorch-transformers | 4c99a4eda5459e36ebb45355fa789bb6cc0bce71 | [
"Apache-2.0"
] | 1 | 2021-06-02T04:00:03.000Z | 2021-06-02T04:00:03.000Z | examples/contrib/run_swag.py | nabihach/pytorch-transformers | 4c99a4eda5459e36ebb45355fa789bb6cc0bce71 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 43.926259 | 134 | 0.601646 |
79454c74cc5d7595cf07f6ff32e72a3f886a8797 | 1,956 | py | Python | saccader/visual_attention/saccader_config.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 23,901 | 2018-10-04T19:48:53.000Z | 2022-03-31T21:27:42.000Z | saccader/visual_attention/saccader_config.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 891 | 2018-11-10T06:16:13.000Z | 2022-03-31T10:42:34.000Z | saccader/visual_attention/saccader_config.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 6,047 | 2018-10-12T06:31:02.000Z | 2022-03-31T13:59:28.000Z | # coding=utf-8
# Copyright 2021 The Google Research 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 applicab... | 31.548387 | 75 | 0.764826 |
79454c7ca961c5f1608dc7328b034412ba76054d | 1,081 | py | Python | api/src/helper/image.py | carlotacb/compra-local | 146289a67a0c943cd12ef9dfb16d0524af8e616e | [
"Apache-2.0"
] | 18 | 2020-04-12T19:43:24.000Z | 2021-11-14T17:35:34.000Z | api/src/helper/image.py | carlotacb/compra-local | 146289a67a0c943cd12ef9dfb16d0524af8e616e | [
"Apache-2.0"
] | 6 | 2020-04-12T22:56:15.000Z | 2020-04-17T19:06:41.000Z | api/src/helper/image.py | carlotacb/compra-local | 146289a67a0c943cd12ef9dfb16d0524af8e616e | [
"Apache-2.0"
] | null | null | null | import base64
import os
import uuid
from PIL import Image
from src.config import IMAGE_RESIZE_SIZE, IMAGE_OUTPUT_FOLDER_PATH
from src.helper import log
def decode_image_file(image_file_path):
with open(image_file_path, 'rb') as img_file:
decoded_image = base64.b64encode(img_file.read()).decode('utf-8')
... | 30.027778 | 79 | 0.705828 |
79454c9086f25899d81abfc6b23e4e3c98398863 | 307 | py | Python | jd/api/rest/KplOpenAftermarketRefundRequest.py | fengjinqi/linjuanbang | 8cdc4e81df73ccd737ac547da7f2c7dca545862a | [
"MIT"
] | 5 | 2019-10-30T01:16:30.000Z | 2020-06-14T03:32:19.000Z | jd/api/rest/KplOpenAftermarketRefundRequest.py | fengjinqi/linjuanbang | 8cdc4e81df73ccd737ac547da7f2c7dca545862a | [
"MIT"
] | 2 | 2020-10-12T07:12:48.000Z | 2021-06-02T03:15:47.000Z | jd/api/rest/KplOpenAftermarketRefundRequest.py | fengjinqi/linjuanbang | 8cdc4e81df73ccd737ac547da7f2c7dca545862a | [
"MIT"
] | 3 | 2019-12-06T17:33:49.000Z | 2021-03-01T13:24:22.000Z | from jd.api.base import RestApi
class KplOpenAftermarketRefundRequest(RestApi):
def __init__(self,domain='gw.api.360buy.com',port=80):
RestApi.__init__(self,domain, port)
self.afsRefundDetailDto = None
self.client = None
def getapiname(self):
return 'jd.kpl.open.aftermarket.refund'
| 18.058824 | 56 | 0.742671 |
79454ccedc5b600b89813e7a231ce5cdd4cc9268 | 6,946 | py | Python | utils/makesets.py | broadinstitute/ebola-predictor | 5c0ea769156f315f0a1c2ef7f947b7fb5fde47fb | [
"BSD-2-Clause"
] | 12 | 2015-06-13T22:13:51.000Z | 2022-02-12T16:18:14.000Z | utils/makesets.py | broadinstitute/ebola-predictor | 5c0ea769156f315f0a1c2ef7f947b7fb5fde47fb | [
"BSD-2-Clause"
] | null | null | null | utils/makesets.py | broadinstitute/ebola-predictor | 5c0ea769156f315f0a1c2ef7f947b7fb5fde47fb | [
"BSD-2-Clause"
] | 10 | 2015-05-31T21:29:39.000Z | 2022-02-12T12:35:41.000Z | """
This script creates the training and test sets.
@copyright: The Broad Institute of MIT and Harvard 2015
"""
import argparse
import sys, csv, os, random
import numpy as np
src_file = "./data/sources.txt"
var_file = "./data/variables.txt"
range_file = "./data/ranges.txt"
ignore_file = "./data/ignore.txt"
"""Retur... | 38.804469 | 103 | 0.603513 |
79454d592416859887ba6c68eca277cbc723ffc0 | 809 | bzl | Python | recipes/crc32c/config.bzl | curoky/rules_cc | 943408c05e2204e1e603b70db05037217a53868d | [
"Apache-2.0"
] | 3 | 2022-02-06T10:10:44.000Z | 2022-02-07T11:53:25.000Z | recipes/crc32c/config.bzl | curoky/rules_cc | 943408c05e2204e1e603b70db05037217a53868d | [
"Apache-2.0"
] | null | null | null | recipes/crc32c/config.bzl | curoky/rules_cc | 943408c05e2204e1e603b70db05037217a53868d | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 curoky(cccuroky@gmail.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... | 33.708333 | 74 | 0.70581 |
79454f48dfac8576d555b38483f8fc476bc02e37 | 1,292 | py | Python | shared/script/test.py | magneticflux-/skija | 90712df54e0d93e48678746fc2e6b1741c3d26a0 | [
"Apache-2.0"
] | null | null | null | shared/script/test.py | magneticflux-/skija | 90712df54e0d93e48678746fc2e6b1741c3d26a0 | [
"Apache-2.0"
] | null | null | null | shared/script/test.py | magneticflux-/skija | 90712df54e0d93e48678746fc2e6b1741c3d26a0 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python3
import argparse, glob, os, subprocess, sys
sys.path.append(os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '..')))
import script.common as common
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--skija-shared')
parser.add_argument('--skija-native')
(a... | 27.489362 | 89 | 0.679567 |
79454f95086a146468fae07d42ce3c0bd6b00ee2 | 1,025 | py | Python | upf/solvers/__init__.py | aiplan4eu/upf | 334df5f86fb3704d98e048b8bc8e0ba19073c06e | [
"Apache-2.0"
] | 14 | 2021-03-24T06:37:34.000Z | 2022-01-28T12:36:45.000Z | upf/solvers/__init__.py | aiplan4eu/upf | 334df5f86fb3704d98e048b8bc8e0ba19073c06e | [
"Apache-2.0"
] | 58 | 2021-06-08T10:00:58.000Z | 2022-01-31T16:31:07.000Z | upf/solvers/__init__.py | aiplan4eu/upf | 334df5f86fb3704d98e048b8bc8e0ba19073c06e | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 AIPlan4EU project
#
# 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 wri... | 33.064516 | 74 | 0.731707 |
79455052a159fb45dc10b7bcb9d9d797de04ed03 | 1,058 | py | Python | plot_candle.py | fredryce/stocker | 041fbe8348f7a035a607a214477cf423c4259171 | [
"MIT"
] | null | null | null | plot_candle.py | fredryce/stocker | 041fbe8348f7a035a607a214477cf423c4259171 | [
"MIT"
] | null | null | null | plot_candle.py | fredryce/stocker | 041fbe8348f7a035a607a214477cf423c4259171 | [
"MIT"
] | null | null | null |
import pandas as pd
from finta import TA
import mplfinance as mpf
from pandas_datareader import data as web
from matplotlib import pyplot as plt
import time
from matplotlib.animation import FuncAnimation
import yfinance as yf
# Finta likes lowercase
#data.columns = ["open", "high", "low", "close", "volume"]
# calc ... | 14.694444 | 67 | 0.662571 |
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 |
794550b3e089a03ac52fc5325d7e48e5473b9e71 | 3,897 | py | Python | libs/parser.py | micobg/revolut-stocks | dd421eaa4fbd3d07418851744a8b8700a05c20c6 | [
"MIT"
] | null | null | null | libs/parser.py | micobg/revolut-stocks | dd421eaa4fbd3d07418851744a8b8700a05c20c6 | [
"MIT"
] | null | null | null | libs/parser.py | micobg/revolut-stocks | dd421eaa4fbd3d07418851744a8b8700a05c20c6 | [
"MIT"
] | null | null | null | import pdfreader
from pdfreader import PDFDocument, SimplePDFViewer
from pdfreader.viewer import PageDoesNotExist
from datetime import datetime, timedelta
import decimal
decimal.getcontext().rounding = decimal.ROUND_HALF_UP
from libs import (
REVOLUT_DATE_FORMAT,
REVOLUT_ACTIVITY_TYPES,
REVOLUT_CASH_ACTIV... | 30.445313 | 101 | 0.663587 |
794550d2ff775d2555115fde81c1ba8ab6c2b272 | 38,121 | py | Python | pyscf/ci/ucisd.py | nmardirossian/pyscf | 57c8912dcfcc1157a822feede63df54ed1067115 | [
"BSD-2-Clause"
] | 1 | 2018-05-02T19:55:30.000Z | 2018-05-02T19:55:30.000Z | pyscf/ci/ucisd.py | nmardirossian/pyscf | 57c8912dcfcc1157a822feede63df54ed1067115 | [
"BSD-2-Clause"
] | null | null | null | pyscf/ci/ucisd.py | nmardirossian/pyscf | 57c8912dcfcc1157a822feede63df54ed1067115 | [
"BSD-2-Clause"
] | 1 | 2018-12-06T03:10:50.000Z | 2018-12-06T03:10:50.000Z | #!/usr/bin/env python
#
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
'''
Unrestricted CISD
'''
import time
from functools import reduce
import tempfile
import numpy
import h5py
from pyscf import lib
from pyscf.lib import logger
from pyscf import ao2mo
from pyscf.cc import uccsd
from pyscf.ci import cisd
from pyscf.c... | 42.309656 | 94 | 0.600824 |
7945521ce5072c11815bdb096868d7c7a220a095 | 4,485 | py | Python | db/import-reports.py | brainwane/active-geolocator | 725fdc26ee1b22f82a77516232e5b12b54d6d862 | [
"MIT"
] | null | null | null | db/import-reports.py | brainwane/active-geolocator | 725fdc26ee1b22f82a77516232e5b12b54d6d862 | [
"MIT"
] | null | null | null | db/import-reports.py | brainwane/active-geolocator | 725fdc26ee1b22f82a77516232e5b12b54d6d862 | [
"MIT"
] | null | null | null | #! /usr/bin/python3
import collections
import glob
import json
import os
import psycopg2
import subprocess
import sys
# Usage: import-reports <directory> <database>
def read_one_report(fname, bname):
with subprocess.Popen(
["gpg2", "--decrypt", "--quiet", "--batch", "--no-tty", fname],
st... | 32.5 | 78 | 0.540245 |
7945546ca564cfbeb0d039736c5080a85ae08be6 | 2,378 | py | Python | docs/conf.py | vanheeringen-lab/snakemake-workflows | 5c13d49417ccd76cde90aace2279effdf4928726 | [
"MIT"
] | 29 | 2019-08-21T11:47:19.000Z | 2020-05-29T09:27:58.000Z | docs/conf.py | vanheeringen-lab/snakemake-workflows | 5c13d49417ccd76cde90aace2279effdf4928726 | [
"MIT"
] | 192 | 2019-07-30T12:02:32.000Z | 2020-06-01T14:25:01.000Z | docs/conf.py | vanheeringen-lab/snakemake-workflows | 5c13d49417ccd76cde90aace2279effdf4928726 | [
"MIT"
] | 4 | 2019-09-02T13:41:18.000Z | 2020-05-04T15:11:18.000Z | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 36.584615 | 102 | 0.659798 |
794554ae036938ab80e69428576ae14751b2d48d | 9,652 | py | Python | src/ch4/searchengine.py | amolnayak311/Programming-Collective-Intelligence | eaa55c3989a8d36e7b766fbaba267b4cbaedf5be | [
"Apache-2.0"
] | null | null | null | src/ch4/searchengine.py | amolnayak311/Programming-Collective-Intelligence | eaa55c3989a8d36e7b766fbaba267b4cbaedf5be | [
"Apache-2.0"
] | null | null | null | src/ch4/searchengine.py | amolnayak311/Programming-Collective-Intelligence | eaa55c3989a8d36e7b766fbaba267b4cbaedf5be | [
"Apache-2.0"
] | null | null | null | #
#
#
from urllib2 import urlopen
from BeautifulSoup import BeautifulSoup
from urlparse import urljoin
from pysqlite2 import dbapi2 as sqlite
import re
from itertools import groupby
ignorewords=frozenset(['the','of','to','and','a','in','is','it'])
class crawler:
def __init__(self, dbname):
self.con = sql... | 34.22695 | 126 | 0.533465 |
7945559bc52819429ee5f7362205cece2fc48279 | 2,550 | py | Python | zun/tests/unit/common/test_profiler.py | wanghuiict/zun | 2f4a3a2ba06d7ca83002418d4003ee5dece70952 | [
"Apache-2.0"
] | 83 | 2016-09-14T22:06:26.000Z | 2022-01-27T03:49:52.000Z | zun/tests/unit/common/test_profiler.py | wanghuiict/zun | 2f4a3a2ba06d7ca83002418d4003ee5dece70952 | [
"Apache-2.0"
] | 2 | 2017-06-22T21:58:47.000Z | 2019-04-10T03:17:44.000Z | zun/tests/unit/common/test_profiler.py | wanghuiict/zun | 2f4a3a2ba06d7ca83002418d4003ee5dece70952 | [
"Apache-2.0"
] | 54 | 2016-09-29T10:16:02.000Z | 2022-01-28T19:12:49.000Z | # Copyright 2017 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | 35.915493 | 78 | 0.603922 |
794555fb4ed39e36cfe93277f3adaba6169b9570 | 13,575 | py | Python | ctapipe/core/tool.py | capaths/ctapipe | be45ff531425a538240c984243df4f8ebc82d2f6 | [
"BSD-3-Clause"
] | null | null | null | ctapipe/core/tool.py | capaths/ctapipe | be45ff531425a538240c984243df4f8ebc82d2f6 | [
"BSD-3-Clause"
] | null | null | null | ctapipe/core/tool.py | capaths/ctapipe | be45ff531425a538240c984243df4f8ebc82d2f6 | [
"BSD-3-Clause"
] | null | null | null | """ Classes to handle configurable command-line user interfaces """
import logging
import textwrap
from abc import abstractmethod
from traitlets import Unicode
from traitlets.config import Application, Configurable
from .. import __version__ as version
from .traits import Path
from . import Provenance
from .logging i... | 35.443864 | 87 | 0.602284 |
79455691ec7239ee3af7412e8cb7a00b6d2af777 | 2,661 | py | Python | setup.py | lpawluczuk/foodwebviz | 11dc6d49e33634ca074f597b9eef0f146c350bcf | [
"BSD-3-Clause"
] | 1 | 2022-03-08T13:53:26.000Z | 2022-03-08T13:53:26.000Z | setup.py | lpawluczuk/foodwebviz | 11dc6d49e33634ca074f597b9eef0f146c350bcf | [
"BSD-3-Clause"
] | 2 | 2021-11-15T14:05:09.000Z | 2022-02-19T10:27:57.000Z | setup.py | lpawluczuk/foodwebviz | 11dc6d49e33634ca074f597b9eef0f146c350bcf | [
"BSD-3-Clause"
] | null | null | null | import sys
from setuptools import setup
if sys.version_info[:2] < (3, 7):
sys.stderr.write(f'foodwebviz requires Python 3.7 or later ({sys.version_info[:2]} detected).\n')
sys.exit(1)
name = "foodwebviz"
description = "Python package for creating and visualizing foodwebs"
authors = {
"Pawluczuk": ("Łukas... | 29.898876 | 101 | 0.645998 |
79455697737ebe489a36415bafa2e41eac76d05e | 6,426 | py | Python | examples/pwr_run/checkpointing/debug/ovhd_profile/job28.py | boringlee24/keras_old | 1e1176c45c4952ba1b9b9e58e9cc4df027ab111d | [
"MIT"
] | null | null | null | examples/pwr_run/checkpointing/debug/ovhd_profile/job28.py | boringlee24/keras_old | 1e1176c45c4952ba1b9b9e58e9cc4df027ab111d | [
"MIT"
] | null | null | null | examples/pwr_run/checkpointing/debug/ovhd_profile/job28.py | boringlee24/keras_old | 1e1176c45c4952ba1b9b9e58e9cc4df027ab111d | [
"MIT"
] | null | null | null | """
#Trains a ResNet on the CIFAR10 dataset.
"""
from __future__ import print_function
import keras
from keras.layers import Dense, Conv2D, BatchNormalization, Activation
from keras.layers import AveragePooling2D, Input, Flatten
from keras.optimizers import Adam
from keras.callbacks import ModelCheckpoint, LearningRa... | 31.5 | 118 | 0.698724 |
794556a69624c19347e17e808a86077f4e9911e8 | 3,626 | py | Python | bin/user/weatherlink_live/davis_broadcast.py | nickbp/weewx-weatherlink-live | 2c18b5da578e175cec3c893bf73450e53da71fd4 | [
"MIT"
] | 12 | 2021-01-10T12:00:25.000Z | 2022-01-22T09:20:05.000Z | bin/user/weatherlink_live/davis_broadcast.py | nickbp/weewx-weatherlink-live | 2c18b5da578e175cec3c893bf73450e53da71fd4 | [
"MIT"
] | 19 | 2020-10-21T12:38:27.000Z | 2022-03-02T13:33:19.000Z | bin/user/weatherlink_live/davis_broadcast.py | nickbp/weewx-weatherlink-live | 2c18b5da578e175cec3c893bf73450e53da71fd4 | [
"MIT"
] | 2 | 2021-02-19T13:09:04.000Z | 2022-03-01T20:16:55.000Z | # Copyright © 2020-2021 Michael Schantl and contributors
#
# 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,... | 38.989247 | 94 | 0.683673 |
7945584c8d1a5a1e7719d9fc20aa9488973ce3a2 | 1,192 | py | Python | src/model/model_creator.py | gauthamp10/mldeploy | 556fe3ff5d19891f73bd9fb1295c4acc4ea6af8e | [
"MIT"
] | null | null | null | src/model/model_creator.py | gauthamp10/mldeploy | 556fe3ff5d19891f73bd9fb1295c4acc4ea6af8e | [
"MIT"
] | null | null | null | src/model/model_creator.py | gauthamp10/mldeploy | 556fe3ff5d19891f73bd9fb1295c4acc4ea6af8e | [
"MIT"
] | 1 | 2020-10-08T23:07:40.000Z | 2020-10-08T23:07:40.000Z | #!/usr/bin/env python
"""Linear Regression model"""
# Importing libraries
import pandas as pd
import pickle
from sklearn.linear_model import LinearRegression
from sklearn.model_selection import train_test_split
# Loding the dataset
data = pd.read_csv('./dataset/weight-height.csv')
# Preview of the data
data.head()
# Se... | 34.057143 | 72 | 0.741611 |
794558df38966a24976969d67b03ba34f8c9a61d | 3,859 | py | Python | vkapi/groups.py | effordsbeard/vk-sdk | 719ef5a1ffa2a0c067dbea5014f40da54f86646b | [
"MIT"
] | null | null | null | vkapi/groups.py | effordsbeard/vk-sdk | 719ef5a1ffa2a0c067dbea5014f40da54f86646b | [
"MIT"
] | null | null | null | vkapi/groups.py | effordsbeard/vk-sdk | 719ef5a1ffa2a0c067dbea5014f40da54f86646b | [
"MIT"
] | null | null | null | from vk import VKAPI
class Groups(VKAPI):
method_class = 'groups'
def __init__(self, access_token=''):
super(Groups, self).__init__(access_token=access_token)
def add_link(self, **params):
self.set_method('addLink')
return self.send(params)
def approve_request(self, **pa... | 27.176056 | 63 | 0.634361 |
7945596caa790b97d7a243a15e9bbc8c42f6b623 | 991 | py | Python | Automated_Testing/Selenium/Raymour Flannigan/ray-flan-txt.py | bnonni/Python | 9ebd18caa4e2d805028b557e8b77ea65a9ee1a3d | [
"Apache-2.0"
] | 4 | 2019-10-05T03:41:20.000Z | 2020-11-04T00:39:13.000Z | Automated_Testing/Selenium/Raymour Flannigan/ray-flan-txt.py | bnonni/Python | 9ebd18caa4e2d805028b557e8b77ea65a9ee1a3d | [
"Apache-2.0"
] | null | null | null | Automated_Testing/Selenium/Raymour Flannigan/ray-flan-txt.py | bnonni/Python | 9ebd18caa4e2d805028b557e8b77ea65a9ee1a3d | [
"Apache-2.0"
] | 2 | 2019-10-02T14:08:51.000Z | 2019-10-03T20:49:09.000Z | # -*- coding: utf-8 -*-
"""
Created on Fri Feb 2 16:20:59 2018
@author: bryan.nonni
"""
import os
#import time
from datetime import datetime
from selenium import webdriver
#
# Chrome Location, combines webshots folder to the chrome driver
firefox_path = os.path.join('.', 'geckodriver.exe')
#print(firefox_path)
d... | 19.057692 | 110 | 0.677094 |
79455a3ef6d0ddf5b06f7c1e571a1dfc26ea8bfa | 196 | py | Python | stilio/crawler/main.py | fakegit/stilio | cf198b8ccadc7dcadc462ce83b801af00ef4e2f2 | [
"Apache-2.0"
] | 71 | 2019-10-09T17:18:12.000Z | 2022-02-26T12:15:53.000Z | stilio/crawler/main.py | fakegit/stilio | cf198b8ccadc7dcadc462ce83b801af00ef4e2f2 | [
"Apache-2.0"
] | 3 | 2019-10-16T17:52:48.000Z | 2021-12-01T16:50:18.000Z | stilio/crawler/main.py | fakegit/stilio | cf198b8ccadc7dcadc462ce83b801af00ef4e2f2 | [
"Apache-2.0"
] | 11 | 2020-01-21T09:09:14.000Z | 2022-03-27T12:05:36.000Z | from stilio.crawler.dht.crawling import CrawlingService
from stilio.persistence import database
if __name__ == "__main__":
# database.init()
crawler = CrawlingService()
crawler.run()
| 24.5 | 55 | 0.744898 |
79455ba8d7027cf84131d0e0e9714af51335d990 | 16,511 | py | Python | courses/modsim2018/tasks/Tasks_DuringLecture18/BMC-master/functions/io_cortexmac.py | raissabthibes/bmc | 840800fb94ea3bf188847d0771ca7197dfec68e3 | [
"MIT"
] | null | null | null | courses/modsim2018/tasks/Tasks_DuringLecture18/BMC-master/functions/io_cortexmac.py | raissabthibes/bmc | 840800fb94ea3bf188847d0771ca7197dfec68e3 | [
"MIT"
] | null | null | null | courses/modsim2018/tasks/Tasks_DuringLecture18/BMC-master/functions/io_cortexmac.py | raissabthibes/bmc | 840800fb94ea3bf188847d0771ca7197dfec68e3 | [
"MIT"
] | null | null | null | """Read and write Cortex Motion Analysis Corporation ASCII related files.
read_trc(fname, fname2='_2', units='', df_multi=True): Read .trc file.
read_anc(fname): Read .anc file.
read_cal(fname): Read .cal file.
read_forces(fname): Read .forces file.
write_trc(fname, header, df): Write .trc file.
... | 38.13164 | 98 | 0.586034 |
79455c69cabbb2a6f70f4346f4c496791e5bb580 | 23,353 | py | Python | Code/BNF.py | USTCEarthDefense/BNF_code | 4735085fce900f1230a623a0d3db16e8eff4d185 | [
"MIT"
] | null | null | null | Code/BNF.py | USTCEarthDefense/BNF_code | 4735085fce900f1230a623a0d3db16e8eff4d185 | [
"MIT"
] | null | null | null | Code/BNF.py | USTCEarthDefense/BNF_code | 4735085fce900f1230a623a0d3db16e8eff4d185 | [
"MIT"
] | null | null | null | import utils_funcs
import tensorflow as tf
import numpy as np
from sklearn.cluster import KMeans
import joblib as jb
from utils_funcs import FLOAT_TYPE, MATRIX_JITTER, DELTA_JITTER
import sys
import os
from tensorflow import keras
#np.random.seed(47)
#tf.set_random_seed(47)
# run as
print("usage : python *.py gpu=0 r... | 48.550936 | 164 | 0.653621 |
79455d585eb82cbd72e5098eef6afcd346f9c154 | 39 | py | Python | testdata/py.py | Jalitha/mimetype | 99f0225530f10a1730df54f740212a0a6f1d67e5 | [
"MIT"
] | 702 | 2018-07-03T09:47:05.000Z | 2022-03-31T05:55:10.000Z | testdata/py.py | Jalitha/mimetype | 99f0225530f10a1730df54f740212a0a6f1d67e5 | [
"MIT"
] | 248 | 2018-08-09T20:55:05.000Z | 2022-03-31T10:52:23.000Z | testdata/py.py | Jalitha/mimetype | 99f0225530f10a1730df54f740212a0a6f1d67e5 | [
"MIT"
] | 129 | 2018-08-11T13:03:19.000Z | 2022-03-31T10:38:08.000Z | #!/usr/bin/python
print("Olá, Mundo!")
| 13 | 20 | 0.641026 |
79455e134f3d1ca1c435852d2d4f4baca5f68e2c | 13,314 | py | Python | strax/storage/mongo.py | ahiguera-mx/strax | c2bcd5e34abe702666cd8bcb2bd6bba542ffb852 | [
"BSD-3-Clause"
] | 17 | 2018-05-06T17:46:42.000Z | 2021-11-16T18:20:27.000Z | strax/storage/mongo.py | AxFoundation/strax | 621e3027cd25d705dd473ec378164f4b4c1a5c50 | [
"BSD-3-Clause"
] | 420 | 2018-05-04T13:56:34.000Z | 2022-03-09T16:50:19.000Z | strax/storage/mongo.py | ahiguera-mx/strax | c2bcd5e34abe702666cd8bcb2bd6bba542ffb852 | [
"BSD-3-Clause"
] | 38 | 2018-05-04T13:55:22.000Z | 2022-01-13T17:42:13.000Z | """I/O format for MongoDB
This plugin is designed with data monitoring in mind, to put smaller
amounts of extracted data into a database for quick access. However
it should work with any plugin.
Note that there is no check to make sure the 16MB document size
limit is respected!
"""
import strax
import numpy as np
fr... | 39.862275 | 80 | 0.626333 |
79455f3431b74d5f29d3f57cadc4338ec8577dc4 | 32,769 | py | Python | scvi/models/modules.py | lgyzngc/scvi | b4472e7d02a3889c405078cdd7ab4d4378309c2c | [
"MIT"
] | null | null | null | scvi/models/modules.py | lgyzngc/scvi | b4472e7d02a3889c405078cdd7ab4d4378309c2c | [
"MIT"
] | null | null | null | scvi/models/modules.py | lgyzngc/scvi | b4472e7d02a3889c405078cdd7ab4d4378309c2c | [
"MIT"
] | null | null | null | import collections
from typing import Iterable, List
import torch
from torch import nn as nn
from torch.distributions import Normal
from torch.nn import ModuleList
from scvi.models.utils import one_hot
def reparameterize_gaussian(mu, var):
return Normal(mu, var.sqrt()).rsample()
class FCLayers(nn.Module):
... | 37.708861 | 129 | 0.597516 |
794561206470cc19d601a547e1d46948926a5900 | 4,353 | py | Python | tests/test_global_linkspam.py | AntiCompositeNumber/linkspam | 12dd89e156abdb3811d863fa47e840086810897d | [
"Apache-2.0"
] | 1 | 2019-12-10T16:37:22.000Z | 2019-12-10T16:37:22.000Z | tests/test_global_linkspam.py | AntiCompositeNumber/linkspam | 12dd89e156abdb3811d863fa47e840086810897d | [
"Apache-2.0"
] | 18 | 2019-11-15T21:44:52.000Z | 2020-01-03T05:54:56.000Z | tests/test_global_linkspam.py | AntiCompositeNumber/linkspam | 12dd89e156abdb3811d863fa47e840086810897d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# coding: utf-8
# SPDX-License-Identifier: Apache-2.0
# Copyright 2019 AntiCompositeNumber
# 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/l... | 29.02 | 75 | 0.643694 |
7945632d2ba7e7a49ada01d7671f239ba0ff6710 | 809 | py | Python | register/widgets.py | Xowap/Maiznet | bd564d4c93eb28dc87135e9d31dad9a921ea8cf6 | [
"WTFPL"
] | 1 | 2015-05-04T09:28:14.000Z | 2015-05-04T09:28:14.000Z | register/widgets.py | Xowap/Maiznet | bd564d4c93eb28dc87135e9d31dad9a921ea8cf6 | [
"WTFPL"
] | null | null | null | register/widgets.py | Xowap/Maiznet | bd564d4c93eb28dc87135e9d31dad9a921ea8cf6 | [
"WTFPL"
] | null | null | null | ########################################################################
# vim: fileencoding=utf-8 ts=8 noexpandtab :
#
# ~~~~ Maiznet.fr ~~~~
#
# -> register/widgets.py
#
#
# Copyright 2011 Rémy Sanchez <remy.sanchez@hyperthese.net>
#
# This file is distributed under the terms of the WTFPL. For more
# informations, s... | 23.794118 | 72 | 0.555006 |
794563607fcee9f54634e77b06ab4f3c6f5e0e76 | 1,213 | py | Python | python/convert.py | jhidalgocarrio/e2calib | 50bb1edc656a8af2c369094805a8eb5f77369834 | [
"MIT"
] | null | null | null | python/convert.py | jhidalgocarrio/e2calib | 50bb1edc656a8af2c369094805a8eb5f77369834 | [
"MIT"
] | null | null | null | python/convert.py | jhidalgocarrio/e2calib | 50bb1edc656a8af2c369094805a8eb5f77369834 | [
"MIT"
] | null | null | null | import argparse
from pathlib import Path
import conversion.format
import conversion.h5writer
if __name__ == '__main__':
parser = argparse.ArgumentParser('Convert events to h5 format to prepare for calibration.')
parser.add_argument('input_file', help='Path to file which will be converted to hdf5 format.')
... | 37.90625 | 142 | 0.713108 |
7945648688ff4525cef3da59e18a3b80a4232227 | 1,261 | py | Python | jacdac/sound_level/client.py | microsoft/jacdac-python | 712ad5559e29065f5eccb5dbfe029c039132df5a | [
"MIT"
] | 1 | 2022-02-15T21:30:36.000Z | 2022-02-15T21:30:36.000Z | jacdac/sound_level/client.py | microsoft/jacdac-python | 712ad5559e29065f5eccb5dbfe029c039132df5a | [
"MIT"
] | null | null | null | jacdac/sound_level/client.py | microsoft/jacdac-python | 712ad5559e29065f5eccb5dbfe029c039132df5a | [
"MIT"
] | 1 | 2022-02-08T19:32:45.000Z | 2022-02-08T19:32:45.000Z | # Autogenerated file. Do not edit.
from jacdac.bus import Bus, SensorClient
from .constants import *
from typing import Optional
class SoundLevelClient(SensorClient):
"""
A sound level detector sensor, gives a relative indication of the sound level.
Implements a client for the `Sound level <https://micros... | 32.333333 | 117 | 0.69548 |
79456489c9193c254158a63c4be18a6eed3b0c0a | 3,446 | py | Python | yggdrasil/metaschema/datatypes/tests/test_JSONArrayMetaschemaType.py | astro-friedel/yggdrasil | 5ecbfd083240965c20c502b4795b6dc93d94b020 | [
"BSD-3-Clause"
] | null | null | null | yggdrasil/metaschema/datatypes/tests/test_JSONArrayMetaschemaType.py | astro-friedel/yggdrasil | 5ecbfd083240965c20c502b4795b6dc93d94b020 | [
"BSD-3-Clause"
] | null | null | null | yggdrasil/metaschema/datatypes/tests/test_JSONArrayMetaschemaType.py | astro-friedel/yggdrasil | 5ecbfd083240965c20c502b4795b6dc93d94b020 | [
"BSD-3-Clause"
] | null | null | null | import copy
import numpy as np
from yggdrasil import serialize
from yggdrasil.tests import assert_equal
from yggdrasil.metaschema.datatypes.JSONArrayMetaschemaType import (
JSONArrayMetaschemaType)
from yggdrasil.metaschema.datatypes.tests import test_MetaschemaType as parent
from yggdrasil.metaschema.datatypes.tes... | 43.075 | 79 | 0.625943 |
794564a7c1a1eaa79f5ecfe81c295793c0a54847 | 17,725 | py | Python | Lib/test/test_syntax.py | whtsky/python | 715a6e5035bb21ac49382772076ec4c630d6e960 | [
"PSF-2.0"
] | 2 | 2018-12-22T08:20:13.000Z | 2020-06-24T02:48:52.000Z | Lib/test/test_syntax.py | whtsky/python | 715a6e5035bb21ac49382772076ec4c630d6e960 | [
"PSF-2.0"
] | null | null | null | Lib/test/test_syntax.py | whtsky/python | 715a6e5035bb21ac49382772076ec4c630d6e960 | [
"PSF-2.0"
] | 3 | 2018-03-06T05:12:17.000Z | 2021-04-22T10:01:01.000Z | """This module tests SyntaxErrors.
Here's an example of the sort of thing that is tested.
>>> def f(x):
... global x
Traceback (most recent call last):
SyntaxError: name 'x' is local and global (<doctest test.test_syntax[0]>, line 1)
The tests are all raise SyntaxErrors. They were created by checking
each C cal... | 34.960552 | 117 | 0.59165 |
7945652ac8933277a29bd83ef86443ee21101515 | 3,094 | py | Python | test/unit/test_embeddings.py | B-Czarnetzki/speechjoey | 97b0b98137bfaf0ffe15db9de6b38e37c7fb5572 | [
"MIT"
] | null | null | null | test/unit/test_embeddings.py | B-Czarnetzki/speechjoey | 97b0b98137bfaf0ffe15db9de6b38e37c7fb5572 | [
"MIT"
] | null | null | null | test/unit/test_embeddings.py | B-Czarnetzki/speechjoey | 97b0b98137bfaf0ffe15db9de6b38e37c7fb5572 | [
"MIT"
] | null | null | null | import torch
from speechjoey.embeddings import Embeddings
from .test_helpers import TensorTestCase
class TestEmbeddings(TensorTestCase):
def setUp(self):
self.emb_size = 10
self.vocab_size = 11
self.pad_idx = 1
seed = 42
torch.manual_seed(seed)
def test_size(self):
... | 39.164557 | 78 | 0.598901 |
7945654d1ec735ac9a46276a3be2606919e78003 | 3,296 | py | Python | wallet/server/Client.py | GauthierEmilien/4PJT-SupBank-API | a30add7f9187fe35ad539f4403021b5e8631a67a | [
"MIT"
] | null | null | null | wallet/server/Client.py | GauthierEmilien/4PJT-SupBank-API | a30add7f9187fe35ad539f4403021b5e8631a67a | [
"MIT"
] | null | null | null | wallet/server/Client.py | GauthierEmilien/4PJT-SupBank-API | a30add7f9187fe35ad539f4403021b5e8631a67a | [
"MIT"
] | null | null | null | from queue import Queue
from threading import RLock
from threading import Thread
from typing import List
import socketio
from blockchain.Blockchain import Blockchain
from gui import GUI
lock = RLock()
queue = Queue()
class Client(Thread):
nodes_info: List[dict] = []
connected_nodes: List[dict] = []
blo... | 31.390476 | 108 | 0.604369 |
794565994fadd21c00691f17243b621fbe5990e8 | 2,861 | py | Python | netboot/settings.py | tfmt/netboot | abd690d463dfd14488b0d295512d61ce5c5bc97d | [
"Apache-2.0"
] | null | null | null | netboot/settings.py | tfmt/netboot | abd690d463dfd14488b0d295512d61ce5c5bc97d | [
"Apache-2.0"
] | null | null | null | netboot/settings.py | tfmt/netboot | abd690d463dfd14488b0d295512d61ce5c5bc97d | [
"Apache-2.0"
] | null | null | null | """
Django settings for netboot project.
Generated by 'django-admin startproject' using Django 1.8.5.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build path... | 24.663793 | 71 | 0.694512 |
794567015bbbf6a8fe8438be68b19430a479750f | 2,229 | py | Python | hashTable/containsDuplicateII.py | Jiganesh/High-On-DSA | 044a3941cec443a87e79d97962551d75a9639a57 | [
"MIT"
] | 76 | 2021-12-12T08:42:20.000Z | 2022-03-31T19:48:46.000Z | hashTable/containsDuplicateII.py | Jiganesh/High-On-DSA | 044a3941cec443a87e79d97962551d75a9639a57 | [
"MIT"
] | 4 | 2022-01-04T09:58:39.000Z | 2022-03-30T17:00:39.000Z | hashTable/containsDuplicateII.py | Jiganesh/High-On-DSA | 044a3941cec443a87e79d97962551d75a9639a57 | [
"MIT"
] | 13 | 2021-12-12T14:44:41.000Z | 2022-03-10T14:08:20.000Z | # https://leetcode.com/problems/contains-duplicate-ii/
class Solution:
# Runtime: 720 ms, faster than 65.63% of Python3 online submissions for Contains Duplicate II.
# Memory Usage: 32.1 MB, less than 9.33% of Python3 online submissions for Contains Duplicate II.
def containsNearbyDuplicate(self,... | 33.268657 | 102 | 0.536563 |
7945677dbb3035e2cbfa4eec17962ac52896e77e | 31,205 | py | Python | jumeg/decompose/group_ica.py | fboers/jumeg | e04896989faf72f4dbe7adf136e4d158d212f24a | [
"BSD-3-Clause"
] | 6 | 2015-04-10T07:13:07.000Z | 2021-12-12T04:04:37.000Z | jumeg/decompose/group_ica.py | fboers/jumeg | e04896989faf72f4dbe7adf136e4d158d212f24a | [
"BSD-3-Clause"
] | 112 | 2015-01-07T10:19:24.000Z | 2022-02-01T15:48:16.000Z | jumeg/decompose/group_ica.py | fboers/jumeg | e04896989faf72f4dbe7adf136e4d158d212f24a | [
"BSD-3-Clause"
] | 22 | 2015-03-11T12:19:50.000Z | 2021-11-20T04:24:42.000Z | # Authors: Lukas Breuer <l.breuer@fz-juelich.de>
"""
----------------------------------------------------------------------
--- jumeg.decompose.group_ica.py -------------------------------------
----------------------------------------------------------------------
author : Lukas Breuer
email : l.breuer@fz-... | 41.662216 | 107 | 0.505913 |
794568dda21b0258b434302c486a07f25d2ccd3b | 4,123 | py | Python | viper/core/ui/cmd/open.py | acd62081/viper | 35d5a0ed3879340aa8d4ba3fc7c8927174e850e4 | [
"BSD-3-Clause"
] | 1,131 | 2015-06-25T00:52:07.000Z | 2022-03-25T11:31:08.000Z | viper/core/ui/cmd/open.py | acd62081/viper | 35d5a0ed3879340aa8d4ba3fc7c8927174e850e4 | [
"BSD-3-Clause"
] | 444 | 2015-06-26T12:01:03.000Z | 2022-02-09T14:23:26.000Z | viper/core/ui/cmd/open.py | acd62081/viper | 35d5a0ed3879340aa8d4ba3fc7c8927174e850e4 | [
"BSD-3-Clause"
] | 354 | 2015-06-25T09:33:52.000Z | 2022-03-19T07:30:09.000Z | # -*- coding: utf-8 -*-
# This file is part of Viper - https://github.com/viper-framework/viper
# See the file 'LICENSE' for copying permission.
import os
import tempfile
import argparse
from viper.common.abstracts import Command
from viper.common.network import download
from viper.core.database import Database
from ... | 37.825688 | 171 | 0.580645 |
794569ddef6f97d7dd392b7b0b6057db9d36c5c5 | 5,233 | py | Python | overlay/window.py | Neulus/overlay | 14f2bc0af9175d1bee7603bc3afea04cfa725727 | [
"MIT"
] | null | null | null | overlay/window.py | Neulus/overlay | 14f2bc0af9175d1bee7603bc3afea04cfa725727 | [
"MIT"
] | null | null | null | overlay/window.py | Neulus/overlay | 14f2bc0af9175d1bee7603bc3afea04cfa725727 | [
"MIT"
] | null | null | null | '''The main class for creating overlays.'''
__author__ = 'David Ma'
__all__ = [
'Window',
'overlays',
]
import tkinter as tk
overlays = []
master = tk.Tk()
master.withdraw()
class Window:
def __init__(self, **kwargs):
'''Initiate an overlay window.
All parameters of this method are cofiguration parameter... | 25.280193 | 71 | 0.692146 |
79456a17c12baa8bb90b64eaf7283b5c8e5469cf | 4,430 | py | Python | models/senet.py | phil-hawkins/multiplayer-alphazero | 87732e18ec0f23469f6246de54388ef9cb324575 | [
"MIT"
] | 23 | 2019-11-29T03:46:10.000Z | 2022-03-09T19:59:01.000Z | models/senet.py | phil-hawkins/multiplayer-alphazero | 87732e18ec0f23469f6246de54388ef9cb324575 | [
"MIT"
] | 3 | 2021-03-21T19:11:17.000Z | 2021-04-20T17:40:46.000Z | models/senet.py | phil-hawkins/multiplayer-alphazero | 87732e18ec0f23469f6246de54388ef9cb324575 | [
"MIT"
] | 9 | 2019-11-26T05:05:34.000Z | 2022-03-22T22:08:53.000Z | import sys
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
sys.path.append("..")
from model import Model
class BasicBlock(nn.Module):
def __init__(self, in_planes, planes, stride=1):
super(BasicBlock, self).__init__()
self.conv1 = nn.Conv2d(in_planes, planes, ... | 35.44 | 102 | 0.605643 |
79456b7de43894340dd09a1a5a09547601d61926 | 1,894 | py | Python | python/paddle/fluid/tests/unittests/test_selu_op.py | Sand3r-/Paddle | 1217a521554d63caa1381b8716910d0268dfc22d | [
"Apache-2.0"
] | 2 | 2017-05-15T06:52:18.000Z | 2017-06-13T11:55:11.000Z | python/paddle/fluid/tests/unittests/test_selu_op.py | Sand3r-/Paddle | 1217a521554d63caa1381b8716910d0268dfc22d | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/test_selu_op.py | Sand3r-/Paddle | 1217a521554d63caa1381b8716910d0268dfc22d | [
"Apache-2.0"
] | 1 | 2020-09-12T21:35:19.000Z | 2020-09-12T21:35:19.000Z | # Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 26.305556 | 74 | 0.633052 |
79456bec3e2e3d6d89a04f83153816fbe8a434ac | 3,519 | py | Python | ironic/conf/opts.py | markbeierl/ironic | bcf5b37c736bc36abe94489c366fe26f198a7e7a | [
"Apache-2.0"
] | null | null | null | ironic/conf/opts.py | markbeierl/ironic | bcf5b37c736bc36abe94489c366fe26f198a7e7a | [
"Apache-2.0"
] | null | null | null | ironic/conf/opts.py | markbeierl/ironic | bcf5b37c736bc36abe94489c366fe26f198a7e7a | [
"Apache-2.0"
] | null | null | null | # 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 writing, software
# distributed under the Li... | 33.836538 | 77 | 0.672634 |
79456c07cd8900ea15f1787b3d3de3116b6f6e16 | 3,398 | py | Python | xautodl/trade_models/naive_v2_model.py | Joey61Liuyi/AutoDL-Projects | 2092e144920e82d74753a7ac31e1890a150d41cf | [
"MIT"
] | 817 | 2020-01-15T00:23:41.000Z | 2022-03-31T14:52:03.000Z | xautodl/trade_models/naive_v2_model.py | Joey61Liuyi/AutoDL-Projects | 2092e144920e82d74753a7ac31e1890a150d41cf | [
"MIT"
] | 77 | 2020-01-14T14:02:45.000Z | 2022-03-25T07:06:02.000Z | xautodl/trade_models/naive_v2_model.py | Joey61Liuyi/AutoDL-Projects | 2092e144920e82d74753a7ac31e1890a150d41cf | [
"MIT"
] | 176 | 2020-01-15T10:39:41.000Z | 2022-03-31T04:24:53.000Z | ##################################################
# Copyright (c) Xuanyi Dong [GitHub D-X-Y], 2021 #
##################################################
# A Simple Model that reused the prices of last day
##################################################
from __future__ import division
from __future__ import print_fun... | 32.673077 | 75 | 0.569747 |
79456c41f8fc227a814f823026c9dd88ead89f84 | 3,489 | py | Python | apps/users/tests/tests.py | michal-siedlecki/my_business | ceba1c03af6378563671dad0bd5933f53f442d24 | [
"MIT"
] | null | null | null | apps/users/tests/tests.py | michal-siedlecki/my_business | ceba1c03af6378563671dad0bd5933f53f442d24 | [
"MIT"
] | 7 | 2021-03-05T23:08:02.000Z | 2022-03-12T00:47:19.000Z | apps/users/tests/tests.py | michal-siedlecki/my_business | ceba1c03af6378563671dad0bd5933f53f442d24 | [
"MIT"
] | null | null | null | from django.http import QueryDict
from django.test import TestCase, Client
from django.urls import reverse
from django.db.models import fields
from apps.users.models import Profile, Address
from mybusiness.factories import model_factory, data_factory
def get_to_list_fields(model):
return list(
field
... | 33.873786 | 88 | 0.690456 |
79456d4b360ab52cd62ba5cdc046a66bb1db73a9 | 2,130 | py | Python | hw8_release/.env/bin/player.py | YuanSun-au/CS131 | 2f0e4896beb80926636bdf2fb57a119ae77ff45a | [
"MIT"
] | null | null | null | hw8_release/.env/bin/player.py | YuanSun-au/CS131 | 2f0e4896beb80926636bdf2fb57a119ae77ff45a | [
"MIT"
] | null | null | null | hw8_release/.env/bin/player.py | YuanSun-au/CS131 | 2f0e4896beb80926636bdf2fb57a119ae77ff45a | [
"MIT"
] | 1 | 2020-08-05T00:08:23.000Z | 2020-08-05T00:08:23.000Z | #!/home/shawn/Documents/CS131/CS131/hw8_release/.env/bin/python3
#
# The Python Imaging Library
# $Id$
#
from __future__ import print_function
import sys
if sys.version_info[0] > 2:
import tkinter
else:
import Tkinter as tkinter
from PIL import Image, ImageTk
# --------------------------------------------... | 21.734694 | 80 | 0.497653 |
79456ddcb882760ba2c3e53a5731300caf3ceb38 | 974 | py | Python | hring/src/Script/DeC/sim_MBNoC_8x8.py | anderson1008/Noculator | 411964ce333c3bd587840554efef6e61c0b9b4d5 | [
"MIT"
] | null | null | null | hring/src/Script/DeC/sim_MBNoC_8x8.py | anderson1008/Noculator | 411964ce333c3bd587840554efef6e61c0b9b4d5 | [
"MIT"
] | null | null | null | hring/src/Script/DeC/sim_MBNoC_8x8.py | anderson1008/Noculator | 411964ce333c3bd587840554efef6e61c0b9b4d5 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import sys
import os
workload_dir = "../bin/workload_list/"
SIM_NUM = 100
# 64-node MBNoC
out_dir = "../results/MBNoC/8x8/"
workload = "hetero_workload_8x8"
network_nrX = "8"
network_nrY = "8"
router_addrPacketSize = "2"
router_dataPacketSize = "8"
router_maxPacketSize = "8"
topolog... | 37.461538 | 453 | 0.689938 |
79456e6003a66ce2ecd0be24972a3e7d94d40bae | 11,991 | py | Python | test/mitmproxy/tools/web/test_app.py | stvvan/mitmproxy | 27883e7b05032961cbee2b0f6a6867e4cc5d11d6 | [
"MIT"
] | 9 | 2021-12-19T13:47:10.000Z | 2022-03-26T06:34:02.000Z | test/mitmproxy/tools/web/test_app.py | ycrao/mitmproxy | ab6f1ebb4415620ce02d61d0ff1c72e6b84b5198 | [
"MIT"
] | 13 | 2021-06-25T20:56:39.000Z | 2022-02-13T22:59:39.000Z | test/mitmproxy/tools/web/test_app.py | ycrao/mitmproxy | ab6f1ebb4415620ce02d61d0ff1c72e6b84b5198 | [
"MIT"
] | 3 | 2021-12-20T08:21:47.000Z | 2022-03-29T17:55:12.000Z | import asyncio
import json as _json
import logging
import os
import sys
from unittest import mock
import pytest
if sys.platform == 'win32':
# workaround for
# https://github.com/tornadoweb/tornado/issues/2751
# https://www.tornadoweb.org/en/stable/index.html#installation
# (copied multiple times in th... | 34.358166 | 90 | 0.577516 |
79456f70830f685ef4fb6ea60bc1d0d525315dee | 16,823 | py | Python | resnet_.py | SeunghwanByun/LBMNet | 90d05d5147d3b118ed869ba5781632173a8b528b | [
"MIT"
] | null | null | null | resnet_.py | SeunghwanByun/LBMNet | 90d05d5147d3b118ed869ba5781632173a8b528b | [
"MIT"
] | null | null | null | resnet_.py | SeunghwanByun/LBMNet | 90d05d5147d3b118ed869ba5781632173a8b528b | [
"MIT"
] | 2 | 2021-01-25T06:23:57.000Z | 2022-01-19T05:47:00.000Z | import torch
import torch.nn as nn
from torch.utils.model_zoo import load_url as load_state_dict_from_url
# from .utils import load_state_dict_from_url
__all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet50_888', 'resnet50_8816', 'resnet50_81616', 'resnet101',
'resnet152', 'resnext50_32x4d', 'r... | 42.375315 | 120 | 0.640968 |
79456fa484d9d2cbcd40781d6f84a561303604d4 | 116 | py | Python | weather/weather_app/admin.py | nijatmursali/WeatherAppUsingDjango | adf179726d9cd78d80e206e19ddec4250d76cd3f | [
"Apache-2.0"
] | null | null | null | weather/weather_app/admin.py | nijatmursali/WeatherAppUsingDjango | adf179726d9cd78d80e206e19ddec4250d76cd3f | [
"Apache-2.0"
] | null | null | null | weather/weather_app/admin.py | nijatmursali/WeatherAppUsingDjango | adf179726d9cd78d80e206e19ddec4250d76cd3f | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from .models import City
# Register your models here.
admin.site.register(City)
| 14.5 | 32 | 0.784483 |
79456fc94c66883b61364521d90933d834742722 | 962 | py | Python | functions/v2/pubsub/main.py | InstantDomain/python-docs-samples | f8e293c722998b269da38b7fe11b98aae8932b8f | [
"Apache-2.0"
] | null | null | null | functions/v2/pubsub/main.py | InstantDomain/python-docs-samples | f8e293c722998b269da38b7fe11b98aae8932b8f | [
"Apache-2.0"
] | null | null | null | functions/v2/pubsub/main.py | InstantDomain/python-docs-samples | f8e293c722998b269da38b7fe11b98aae8932b8f | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 35.62963 | 91 | 0.759875 |
7945707455ff1da4b04f06abc70029cbec5ae4ea | 719 | py | Python | tests/nfs_module_test.py | web-sys1/NFSyndication | 96d84444cf5d217713e162f9699d38b495a4e3ec | [
"BSD-2-Clause"
] | null | null | null | tests/nfs_module_test.py | web-sys1/NFSyndication | 96d84444cf5d217713e162f9699d38b495a4e3ec | [
"BSD-2-Clause"
] | null | null | null | tests/nfs_module_test.py | web-sys1/NFSyndication | 96d84444cf5d217713e162f9699d38b495a4e3ec | [
"BSD-2-Clause"
] | null | null | null | import os, glob
import pytest
import subprocess
import pytest
from NFSyndication import init as NFS_init
from NFSyndication.core import args
# test@
# Change the action associated with your option to action='store'
def test_conf():
#We use these conditions to check the statement
args.outputJSON = "feed-output... | 26.62963 | 65 | 0.681502 |
79457167db6809a3ffcec29e1fc85d4b9dafe5ca | 1,753 | py | Python | tests/mockserver.py | peter-bertuglia/python-sdk | c5930a9833005df2e8b669099c70e0a1644cdf0e | [
"ISC"
] | null | null | null | tests/mockserver.py | peter-bertuglia/python-sdk | c5930a9833005df2e8b669099c70e0a1644cdf0e | [
"ISC"
] | 2 | 2021-12-04T02:41:33.000Z | 2022-01-12T00:41:07.000Z | tests/mockserver.py | peter-bertuglia/python-sdk | c5930a9833005df2e8b669099c70e0a1644cdf0e | [
"ISC"
] | 2 | 2021-12-04T02:25:10.000Z | 2022-01-11T19:32:39.000Z | import requests
import uuid
from flask import Flask, jsonify
from threading import Thread
# From https://gist.github.com/eruvanos/f6f62edb368a20aaa880e12976620db8
class MockServer(Thread):
def __init__(self, port=5000):
super().__init__()
print("server running on port %s" % port)
self.port... | 35.06 | 99 | 0.669709 |
794571e1087d8bd361abc9104517ffcf29734148 | 11,903 | py | Python | muak/vector2d.py | ok65/muak | 885d2bca83b90a37c17df88c1aeb66b49958ae2d | [
"WTFPL"
] | null | null | null | muak/vector2d.py | ok65/muak | 885d2bca83b90a37c17df88c1aeb66b49958ae2d | [
"WTFPL"
] | null | null | null | muak/vector2d.py | ok65/muak | 885d2bca83b90a37c17df88c1aeb66b49958ae2d | [
"WTFPL"
] | null | null | null |
# Library import
import operator
import math
class Vector2D:
__slots__ = ['_x', '_y']
def __init__(self, x_or_pair=None, y = None, bearing = None, magnitude = None):
"""
2D Integer vector class, 'inspired' by pygame/cocos2d etc
:param x_or_pair:
:param y:
:param bear... | 29.907035 | 117 | 0.56784 |
7945737596cc8c402f6a0d0f1ee4f5a1160d8bc3 | 118 | py | Python | setup.py | BBsjj/BBpose | 4be635ead0f99b1788160ca0b1c7b3947ba05526 | [
"MIT"
] | 23 | 2021-07-08T22:38:13.000Z | 2022-03-30T12:45:01.000Z | setup.py | BBsjj/BBpose | 4be635ead0f99b1788160ca0b1c7b3947ba05526 | [
"MIT"
] | 3 | 2021-09-12T13:20:30.000Z | 2022-02-15T06:33:02.000Z | setup.py | BBsjj/BBpose | 4be635ead0f99b1788160ca0b1c7b3947ba05526 | [
"MIT"
] | 13 | 2021-07-27T02:55:54.000Z | 2022-02-28T05:55:42.000Z | import setuptools
setuptools.setup(
name='bbpose',
version='0.1.0',
packages=setuptools.find_packages()
) | 16.857143 | 39 | 0.694915 |
794573d554875c480207754ad5ec6fd670b73219 | 3,361 | py | Python | tools/profiling/microbenchmarks/bm_diff/bm_build.py | eaglesunshine/grpc_learn | ecf33b83c9d49892539a3ffed9dc1553d91f59ae | [
"BSD-3-Clause"
] | 1 | 2017-12-12T20:55:14.000Z | 2017-12-12T20:55:14.000Z | tools/profiling/microbenchmarks/bm_diff/bm_build.py | eaglesunshine/grpc_learn | ecf33b83c9d49892539a3ffed9dc1553d91f59ae | [
"BSD-3-Clause"
] | null | null | null | tools/profiling/microbenchmarks/bm_diff/bm_build.py | eaglesunshine/grpc_learn | ecf33b83c9d49892539a3ffed9dc1553d91f59ae | [
"BSD-3-Clause"
] | 1 | 2020-11-04T04:12:37.000Z | 2020-11-04T04:12:37.000Z | # Copyright 2017, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | 35.755319 | 93 | 0.734305 |
794575b5551d146bd9859f9ba8fb2cf963ba13ef | 17,705 | py | Python | pubsub/google/cloud/pubsub_v1/gapic/transports/subscriber_grpc_transport.py | TheNeuralBit/google-cloud-python | 226cdf12f5dd69afb0ef665bb9e897d32d56f4b6 | [
"Apache-2.0"
] | null | null | null | pubsub/google/cloud/pubsub_v1/gapic/transports/subscriber_grpc_transport.py | TheNeuralBit/google-cloud-python | 226cdf12f5dd69afb0ef665bb9e897d32d56f4b6 | [
"Apache-2.0"
] | null | null | null | pubsub/google/cloud/pubsub_v1/gapic/transports/subscriber_grpc_transport.py | TheNeuralBit/google-cloud-python | 226cdf12f5dd69afb0ef665bb9e897d32d56f4b6 | [
"Apache-2.0"
] | 1 | 2021-07-21T17:59:33.000Z | 2021-07-21T17:59:33.000Z | # -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 41.366822 | 86 | 0.666365 |
794575e0de65ff6fd4e3dacadc4519912e96c19f | 4,471 | py | Python | sdk/keyvault/azure-keyvault-keys/tests/test_examples_crypto_async.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 1 | 2021-12-07T13:43:54.000Z | 2021-12-07T13:43:54.000Z | sdk/keyvault/azure-keyvault-keys/tests/test_examples_crypto_async.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 4 | 2019-04-17T17:57:49.000Z | 2020-04-24T21:11:22.000Z | sdk/keyvault/azure-keyvault-keys/tests/test_examples_crypto_async.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 1 | 2019-04-05T18:17:43.000Z | 2019-04-05T18:17:43.000Z | # ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
from azure.keyvault.keys.crypto.aio import CryptographyClient
from _shared.test_case_async import KeyVaultTestCase
from _test_case import client_setup, get_decorator, K... | 39.566372 | 223 | 0.700067 |
794576ec78d3665ee10177db061775cdfbb4e7fd | 880 | py | Python | setup.py | makreft/ldf_parser | 7887a02d310cc5856828f9de4da008aaaa4800c1 | [
"MIT"
] | 2 | 2021-06-01T13:35:42.000Z | 2021-06-06T14:03:29.000Z | setup.py | makreft/ldf_parser | 7887a02d310cc5856828f9de4da008aaaa4800c1 | [
"MIT"
] | 1 | 2021-09-23T20:56:00.000Z | 2021-09-25T20:52:13.000Z | setup.py | makreft/lin_ldf_parser | 7887a02d310cc5856828f9de4da008aaaa4800c1 | [
"MIT"
] | null | null | null | from setuptools import setup
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name="lin_ldf_parser",
version="0.01",
description="Simple regex based parser for the lin description file.",
py_modules="lin_ldf_parser",
package_dir={"": "lin_ldf_parser"},
classifiers=[
... | 26.666667 | 74 | 0.5875 |
79457704b3331e4efac83f2ffa134f5111387767 | 405 | py | Python | solutions/make-some-noise/solver.py | HackerDom/qctf-starter-2018 | f4eef0fd41d777661b9fbcc61dcee9709d9f6268 | [
"MIT"
] | 8 | 2018-03-15T12:07:11.000Z | 2020-12-01T15:02:46.000Z | solutions/make-some-noise/solver.py | HackerDom/qctf-starter-2018 | f4eef0fd41d777661b9fbcc61dcee9709d9f6268 | [
"MIT"
] | 17 | 2020-01-28T22:17:42.000Z | 2022-03-11T23:18:09.000Z | solutions/make-some-noise/solver.py | HackerDom/qctf-starter-2018 | f4eef0fd41d777661b9fbcc61dcee9709d9f6268 | [
"MIT"
] | 2 | 2018-11-26T18:54:27.000Z | 2018-12-05T17:37:32.000Z | import requests
import numpy as np
def main():
results=[]
for i in range(100):
r=requests.get('https://make-some-noise.contest.qctf.ru/2TjUAurc7P60IBLM2qCe')
results.append([ord(x) for x in r.text])
flag = (chr(int(round(np.mean(list(map(lambda arr:arr[i], results)))))) for i in range(l... | 28.928571 | 112 | 0.624691 |
794577489358e845905c1748449a65562d341a83 | 63,944 | py | Python | apps/challenges/aws_utils.py | Happytocode24/EvalAI | 39bd56239d2eef5a1b4f16ab0eb44be7b5fbdc07 | [
"BSD-3-Clause"
] | null | null | null | apps/challenges/aws_utils.py | Happytocode24/EvalAI | 39bd56239d2eef5a1b4f16ab0eb44be7b5fbdc07 | [
"BSD-3-Clause"
] | null | null | null | apps/challenges/aws_utils.py | Happytocode24/EvalAI | 39bd56239d2eef5a1b4f16ab0eb44be7b5fbdc07 | [
"BSD-3-Clause"
] | null | null | null | import json
import logging
import os
import random
import string
import uuid
import yaml
from botocore.exceptions import ClientError
from django.conf import settings
from django.core import serializers
from django.core.files.temp import NamedTemporaryFile
from http import HTTPStatus
from .challenge_notification_util ... | 35.623398 | 150 | 0.547526 |
7945777d846c913eb484ec5d026f713651af8cfc | 1,438 | py | Python | onnx_chainer/functions/connection/linear.py | Hakuyume/onnx-chainer | 3c46bd692ef38a7c0f45a2a09795d2023364e12b | [
"MIT"
] | null | null | null | onnx_chainer/functions/connection/linear.py | Hakuyume/onnx-chainer | 3c46bd692ef38a7c0f45a2a09795d2023364e12b | [
"MIT"
] | null | null | null | onnx_chainer/functions/connection/linear.py | Hakuyume/onnx-chainer | 3c46bd692ef38a7c0f45a2a09795d2023364e12b | [
"MIT"
] | null | null | null | import os
import numpy as np
from onnx import helper
from onnx import numpy_helper
from onnx_chainer import mapping
def convert_LinearFunction(
func, input_names, param_names, parameters, input_tensors):
input_names[input_names.index(id(func.W))] = param_names[id(func.W)]
if hasattr(func, 'b'):
... | 31.26087 | 76 | 0.613352 |
79457825b83dd47bf10de3ce3a044006a91e4a2c | 21,474 | py | Python | pybind/slxos/v17r_2_00/routing_system/router/router_bgp/address_family/l2vpn/evpn/__init__.py | extremenetworks/pybind | 44c467e71b2b425be63867aba6e6fa28b2cfe7fb | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v17r_2_00/routing_system/router/router_bgp/address_family/l2vpn/evpn/__init__.py | extremenetworks/pybind | 44c467e71b2b425be63867aba6e6fa28b2cfe7fb | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v17r_2_00/routing_system/router/router_bgp/address_family/l2vpn/evpn/__init__.py | extremenetworks/pybind | 44c467e71b2b425be63867aba6e6fa28b2cfe7fb | [
"Apache-2.0"
] | 1 | 2021-11-05T22:15:42.000Z | 2021-11-05T22:15:42.000Z |
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from d... | 71.10596 | 550 | 0.741827 |
7945796714426197783e5ff2121fad057e27b0bd | 8,826 | py | Python | poetry/utils/_compat.py | noamraph/poetry | 0d48fb669e42d2b662b8e0abef6af8c8bb9ab68a | [
"MIT"
] | 1 | 2020-08-19T19:51:22.000Z | 2020-08-19T19:51:22.000Z | poetry/utils/_compat.py | noamraph/poetry | 0d48fb669e42d2b662b8e0abef6af8c8bb9ab68a | [
"MIT"
] | null | null | null | poetry/utils/_compat.py | noamraph/poetry | 0d48fb669e42d2b662b8e0abef6af8c8bb9ab68a | [
"MIT"
] | null | null | null | import sys
try:
from functools32 import lru_cache
except ImportError:
from functools import lru_cache
try:
from glob2 import glob
except ImportError:
from glob import glob
try:
from importlib import metadata
import zipfile as zipp
except ImportError:
import importlib_metadata as metadata... | 29.918644 | 84 | 0.603218 |
79457a8e75299df14355290a8aaa7819abc6fb91 | 36,120 | py | Python | mars/tensor/statistics/histogram.py | acezen/mars | c6b4f6e5f9ab4caf9d8e82108e2dd49d312e39fd | [
"Apache-2.0"
] | 2 | 2019-03-29T04:11:10.000Z | 2020-07-08T10:19:54.000Z | mars/tensor/statistics/histogram.py | acezen/mars | c6b4f6e5f9ab4caf9d8e82108e2dd49d312e39fd | [
"Apache-2.0"
] | null | null | null | mars/tensor/statistics/histogram.py | acezen/mars | c6b4f6e5f9ab4caf9d8e82108e2dd49d312e39fd | [
"Apache-2.0"
] | null | null | null | # Copyright 1999-2020 Alibaba Group Holding 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 a... | 36.595745 | 104 | 0.619961 |
79457b8d82a7b8f78f7406bf2d7fd6ed3506074e | 760 | py | Python | makalu/views/user.py | duckpage/makalu | 357ec5b18560f601a33d68bb3a8e7eace2fde7d7 | [
"MIT"
] | null | null | null | makalu/views/user.py | duckpage/makalu | 357ec5b18560f601a33d68bb3a8e7eace2fde7d7 | [
"MIT"
] | null | null | null | makalu/views/user.py | duckpage/makalu | 357ec5b18560f601a33d68bb3a8e7eace2fde7d7 | [
"MIT"
] | null | null | null | from django.shortcuts import render, HttpResponseRedirect, HttpResponse, Http404
from django.http import JsonResponse
from django.contrib.auth.decorators import login_required
from django.contrib.auth import authenticate, login, logout
from django.utils.translation import ugettext as _
from django.contrib import messag... | 30.4 | 80 | 0.764474 |
79457c546a8776ef7035c0c268905cd39c1f0954 | 1,895 | py | Python | tests/tool_provider_tests.py | bsulcer/ims_lti_py | 979244d83c2e6420d2c1941f58e52f641c56ad12 | [
"MIT"
] | 18 | 2015-02-04T06:56:02.000Z | 2021-01-14T08:48:05.000Z | tests/tool_provider_tests.py | mitodl/ims_lti_py | d96a6201cf3b63b9e1b33780ef5e29bc65242ceb | [
"MIT"
] | 6 | 2015-01-26T19:00:56.000Z | 2018-03-23T05:52:29.000Z | tests/tool_provider_tests.py | mitodl/ims_lti_py | d96a6201cf3b63b9e1b33780ef5e29bc65242ceb | [
"MIT"
] | 27 | 2015-04-16T12:05:42.000Z | 2020-12-24T00:32:53.000Z | from test_helper import create_test_tp, create_params_tp
import unittest
class TestToolProvider(unittest.TestCase):
def setUp(self):
self.params = create_params_tp()
self.tp = create_test_tp()
def test_outcome_service(self):
'''
Should recognize an outcome service.
'''
... | 37.156863 | 119 | 0.641161 |
79457cb730acd938fffa9ba06dc7ad61786726bd | 3,239 | py | Python | checkkey.py | calllivecn/keyboardmouse | 9a6cd7f0057f2c09293f82de5b2ef3a2879d1c43 | [
"MIT"
] | null | null | null | checkkey.py | calllivecn/keyboardmouse | 9a6cd7f0057f2c09293f82de5b2ef3a2879d1c43 | [
"MIT"
] | null | null | null | checkkey.py | calllivecn/keyboardmouse | 9a6cd7f0057f2c09293f82de5b2ef3a2879d1c43 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
import libevdev
def print_capabilities(l):
v = l.driver_version
print("Input driver version is {}.{}.{}".format(v >> 16, (v >> 8) & 0xff, v & 0xff))
id = l.id
print("Input device ID: bus {:#x} vendor {:#x} product {:#x} version {:#x}".format(
id["bustype"],
... | 35.206522 | 136 | 0.462488 |
79457ce15d18467244a1f23d9ea56022145bc397 | 604 | py | Python | Leetcode/438.find-all-anagrams-in-a-string.py | EdwaRen/Competitve-Programming | e8bffeb457936d28c75ecfefb5a1f316c15a9b6c | [
"MIT"
] | 1 | 2021-05-03T21:48:25.000Z | 2021-05-03T21:48:25.000Z | Leetcode/438.find-all-anagrams-in-a-string.py | EdwaRen/Competitve_Programming | e8bffeb457936d28c75ecfefb5a1f316c15a9b6c | [
"MIT"
] | null | null | null | Leetcode/438.find-all-anagrams-in-a-string.py | EdwaRen/Competitve_Programming | e8bffeb457936d28c75ecfefb5a1f316c15a9b6c | [
"MIT"
] | null | null | null | class Solution(object):
def findAnagrams(self, s, p):
palin_dict = [0] * 26
for i in p:
palin_dict[ord(i) %26] +=1
# print("palin_dict", palin_dict)
res = []
for i in range(len(s)):
palin_dict[ord(s[i])%26] -=1
if i >= len(p):
... | 26.26087 | 66 | 0.490066 |
79457d2019fe5e90b923e4a0edcf717cb720a118 | 36,703 | py | Python | hexonet/ispapicli/gui/mainframe.py | hexonet/ispapicli | 4ed54a8500e9ae31d4aee33e8b657acf640a42ff | [
"MIT"
] | null | null | null | hexonet/ispapicli/gui/mainframe.py | hexonet/ispapicli | 4ed54a8500e9ae31d4aee33e8b657acf640a42ff | [
"MIT"
] | 84 | 2020-04-02T10:53:46.000Z | 2022-02-21T03:05:03.000Z | hexonet/ispapicli/gui/mainframe.py | hexonet/ispapicli | 4ed54a8500e9ae31d4aee33e8b657acf640a42ff | [
"MIT"
] | 5 | 2020-06-19T11:24:02.000Z | 2021-04-06T10:25:36.000Z | from typing import Text
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from modules.core import Core
from modules.scrap import Scrap
from gui.login import LoginWindow
import textwrap
import sys
from io import StringIO
import re
import os
import requests
from packaging import version
... | 36.81344 | 202 | 0.55802 |
79457d8f4ca32fa2ce2498098b0cfa7a0810a942 | 971 | py | Python | upvote/gae/lib/analysis/monitoring_test.py | iwikmai/upvote | 77bb200d0e35a28cc5aed98ceee8e234998814b6 | [
"Apache-2.0"
] | 453 | 2017-10-24T15:29:44.000Z | 2021-09-27T23:21:20.000Z | upvote/gae/lib/analysis/monitoring_test.py | iwikmai/upvote | 77bb200d0e35a28cc5aed98ceee8e234998814b6 | [
"Apache-2.0"
] | 58 | 2018-03-23T21:19:16.000Z | 2021-05-23T20:06:05.000Z | upvote/gae/lib/analysis/monitoring_test.py | iwikmai/upvote | 77bb200d0e35a28cc5aed98ceee8e234998814b6 | [
"Apache-2.0"
] | 36 | 2018-03-23T21:25:54.000Z | 2021-09-27T23:21:24.000Z | # Copyright 2017 Google 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 applicable law or a... | 32.366667 | 78 | 0.757981 |
79457db7283df577c47b7a48ae2d910bb28d2f5a | 9,035 | py | Python | contrib/testgen/gen_key_io_test_vectors.py | Darrenshome40/shitecoin | a2535c8fc5a43ee21ec818d5367439f6302cd084 | [
"MIT"
] | null | null | null | contrib/testgen/gen_key_io_test_vectors.py | Darrenshome40/shitecoin | a2535c8fc5a43ee21ec818d5367439f6302cd084 | [
"MIT"
] | null | null | null | contrib/testgen/gen_key_io_test_vectors.py | Darrenshome40/shitecoin | a2535c8fc5a43ee21ec818d5367439f6302cd084 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2012-2020 The shitecoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Generate valid and invalid base58 address and private key test vectors.
Usage:
PYTHONPATH=../..... | 36.578947 | 133 | 0.617488 |
79457e7a5ed0cbccf19e07c50494cc6b06aa0a1f | 59,161 | py | Python | tensorflow/python/client/session_test.py | jdehotin/TensorFlow | a6c5f8e4e013e54fed8dfcf49fb6de365f018022 | [
"Apache-2.0"
] | 6 | 2016-09-07T18:38:41.000Z | 2020-01-12T23:01:03.000Z | tensorflow/python/client/session_test.py | jdehotin/TensorFlow | a6c5f8e4e013e54fed8dfcf49fb6de365f018022 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/client/session_test.py | jdehotin/TensorFlow | a6c5f8e4e013e54fed8dfcf49fb6de365f018022 | [
"Apache-2.0"
] | 8 | 2017-06-08T09:46:06.000Z | 2021-06-20T14:03:19.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 40.000676 | 80 | 0.634557 |
79457eaf585414e2b86f2778ecb75c9f439c725c | 863 | py | Python | Medium/0015. 3Sum/0015. 3Sum_version1.py | FlyProbe/LeetCode-Solutions | 4489722573ecc2d4358ba5120e2af3d7407bb3b1 | [
"Apache-2.0"
] | 1 | 2019-07-25T06:43:35.000Z | 2019-07-25T06:43:35.000Z | Medium/0015. 3Sum/0015. 3Sum_version1.py | FlyProbe/LeetCode-Solutions | 4489722573ecc2d4358ba5120e2af3d7407bb3b1 | [
"Apache-2.0"
] | null | null | null | Medium/0015. 3Sum/0015. 3Sum_version1.py | FlyProbe/LeetCode-Solutions | 4489722573ecc2d4358ba5120e2af3d7407bb3b1 | [
"Apache-2.0"
] | null | null | null | # 固定数字+双指针。由于预先排序,1、固定数字最小,大于0即可停止循环;2、重复的固定数字没有意义,可以跳过
class Solution:
def threeSum(self, nums: List[int]) -> List[List[int]]:
l = len(nums)
res = {}
nums.sort()
pre = None
for i in range(l-2):
if nums[i] > 0: # 最小数字大于0,停止
break
... | 26.96875 | 59 | 0.36153 |
79457f9c77305813d13739661b25cdf89350c686 | 694 | py | Python | autoApply.py | pyl/autoApply | 5aa41529ae4630af8717dd653b300a9486e21199 | [
"MIT"
] | null | null | null | autoApply.py | pyl/autoApply | 5aa41529ae4630af8717dd653b300a9486e21199 | [
"MIT"
] | null | null | null | autoApply.py | pyl/autoApply | 5aa41529ae4630af8717dd653b300a9486e21199 | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
import requests
import pprint
from collections import OrderedDict
url = "https://github.com/pittcsc/Summer2021-Internships"
source = requests.get(url).text
soup = BeautifulSoup(source, 'lxml')
table = soup.table
#print(soup.prettify) contains no tables but print(soup.table)
# works so... | 22.387097 | 63 | 0.680115 |
79457fd27f3ab83b35976da22be8c7fc24e4069c | 12,219 | py | Python | tests/test_atc_tasks.py | kpressouyre/nornir_f5 | 9e36ae3e19ac6d45d3858579856fbcc196fe512f | [
"Apache-2.0"
] | 1 | 2021-03-23T04:21:08.000Z | 2021-03-23T04:21:08.000Z | tests/test_atc_tasks.py | kpressouyre/nornir_f5 | 9e36ae3e19ac6d45d3858579856fbcc196fe512f | [
"Apache-2.0"
] | 1 | 2021-12-01T19:42:14.000Z | 2021-12-01T19:42:14.000Z | tests/test_atc_tasks.py | kpressouyre/nornir_f5 | 9e36ae3e19ac6d45d3858579856fbcc196fe512f | [
"Apache-2.0"
] | 1 | 2021-11-25T18:12:47.000Z | 2021-11-25T18:12:47.000Z | import json
import re
import pytest
import responses
from nornir_f5.plugins.tasks import atc
from .conftest import assert_result, base_decl_dir, base_resp_dir, load_json
@pytest.mark.parametrize(
("kwargs", "resp", "task_statuses", "expected"),
[
# GET AS3 declaration with show and show_hash
... | 31.820313 | 120 | 0.513299 |
794580af9835eca63a78ba64195d2bddae497d2e | 12,457 | py | Python | trusd/cli.py | mathiasbockwoldt/TruSD | 7d0ec42e46e706eb9cf4de1b92a29f18a85159d9 | [
"MIT"
] | null | null | null | trusd/cli.py | mathiasbockwoldt/TruSD | 7d0ec42e46e706eb9cf4de1b92a29f18a85159d9 | [
"MIT"
] | 3 | 2021-03-10T12:36:37.000Z | 2021-03-11T09:51:49.000Z | trusd/cli.py | mathiasbockwoldt/TruSD | 7d0ec42e46e706eb9cf4de1b92a29f18a85159d9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
'''
This is the command line interface for TruSD and auxilliary scripts. As such,
this module is only meant for use from the command line. For information about
TruSD, please refer to help(trusd) or https://github.com/mathiasbockwoldt/TruSD .
'''
import argparse
import json
import sys
import n... | 34.506925 | 86 | 0.675363 |
794581858e66b8b7bd414205e1bfaf754c403967 | 3,087 | py | Python | verdin/query.py | localstack/verdin | c830d2a0cabb0ef040eb7c513553682844d9051e | [
"Apache-2.0"
] | 5 | 2021-09-25T14:14:20.000Z | 2021-10-30T06:06:51.000Z | verdin/query.py | localstack/verdin | c830d2a0cabb0ef040eb7c513553682844d9051e | [
"Apache-2.0"
] | 1 | 2022-01-26T11:40:07.000Z | 2022-01-26T11:40:08.000Z | verdin/query.py | localstack/verdin | c830d2a0cabb0ef040eb7c513553682844d9051e | [
"Apache-2.0"
] | null | null | null | import enum
import logging
from typing import Any, Dict, List, Optional, TypedDict
import requests
from . import config
LOG = logging.getLogger(__name__)
class OutputFormat(enum.Enum):
# https://docs.tinybird.co/api-reference/query-api.html#id6
CSV = "CSV"
CSVWithNames = "CSVWithNames"
JSON = "JSON... | 24.895161 | 97 | 0.630062 |
794581bca7ad5cd4eafa91f1b67ee74c7f98af85 | 4,292 | py | Python | pkgs/development/tools/analysis/radare2/update.py | peanutbutter144/nixpkgs | 2c117aec376244aa3daf3020b0691dcad1de7492 | [
"MIT"
] | 5 | 2021-07-31T15:06:36.000Z | 2022-03-19T10:27:06.000Z | pkgs/development/tools/analysis/radare2/update.py | peanutbutter144/nixpkgs | 2c117aec376244aa3daf3020b0691dcad1de7492 | [
"MIT"
] | 627 | 2019-10-06T15:19:30.000Z | 2020-03-11T05:16:56.000Z | pkgs/development/tools/analysis/radare2/update.py | peanutbutter144/nixpkgs | 2c117aec376244aa3daf3020b0691dcad1de7492 | [
"MIT"
] | 6 | 2020-01-27T13:30:39.000Z | 2020-11-06T04:49:38.000Z | #!/usr/bin/env nix-shell
#!nix-shell -p nix -p python3 -p git -i python
# USAGE - just run the script: ./update.py
# When editing this file, make also sure it passes the mypy typecheck
# and is formatted with black.
import fileinput
import json
import re
import subprocess
import tempfile
import urllib.request
from date... | 30.225352 | 106 | 0.599254 |
79458204cddbf340f05c7c18b253717914e06992 | 901 | py | Python | setup.py | yangll0620/importnb | 67a68f7efb0808a536bd6d25d46ddfc217bd5f1e | [
"MIT"
] | null | null | null | setup.py | yangll0620/importnb | 67a68f7efb0808a536bd6d25d46ddfc217bd5f1e | [
"MIT"
] | null | null | null | setup.py | yangll0620/importnb | 67a68f7efb0808a536bd6d25d46ddfc217bd5f1e | [
"MIT"
] | null | null | null | # Always prefer setuptools over distutils
from setuptools import setup, find_packages
with open("README.md", "r") as fh:
long_description = fh.read()
setup(name = 'import_nbmodule',
version = '0.0.1',
description = 'import jupyter notebook .ipynb modul... | 39.173913 | 82 | 0.567148 |
7945823367840e2e7993dd7b2e094093ef7285e1 | 14,064 | py | Python | cryptoapis/model/list_transactions_by_block_height_ribsd_vin.py | Crypto-APIs/Crypto_APIs_2.0_SDK_Python | c59ebd914850622b2c6500c4c30af31fb9cecf0e | [
"MIT"
] | 5 | 2021-05-17T04:45:03.000Z | 2022-03-23T12:51:46.000Z | cryptoapis/model/list_transactions_by_block_height_ribsd_vin.py | Crypto-APIs/Crypto_APIs_2.0_SDK_Python | c59ebd914850622b2c6500c4c30af31fb9cecf0e | [
"MIT"
] | null | null | null | cryptoapis/model/list_transactions_by_block_height_ribsd_vin.py | Crypto-APIs/Crypto_APIs_2.0_SDK_Python | c59ebd914850622b2c6500c4c30af31fb9cecf0e | [
"MIT"
] | 2 | 2021-06-02T07:32:26.000Z | 2022-02-12T02:36:23.000Z | """
CryptoAPIs
Crypto APIs 2.0 is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs 2.0 can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of thei... | 45.811075 | 484 | 0.589377 |
7945828abc92d6e0f6d91a49fc339316a9d05c30 | 49,367 | py | Python | tensorflow/python/kernel_tests/summary_ops_test.py | A-Pot/tensorflow | 2d1cf8523b06ff29f53ddb8b6506e53660b51aed | [
"Apache-2.0"
] | null | null | null | tensorflow/python/kernel_tests/summary_ops_test.py | A-Pot/tensorflow | 2d1cf8523b06ff29f53ddb8b6506e53660b51aed | [
"Apache-2.0"
] | null | null | null | tensorflow/python/kernel_tests/summary_ops_test.py | A-Pot/tensorflow | 2d1cf8523b06ff29f53ddb8b6506e53660b51aed | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 36.460118 | 85 | 0.680049 |
794582d895aa5c63c8440ae990741f4df39e427d | 7,839 | py | Python | installer/menu.py | username-is-already-taken2/photon | 5be3d8c956156f494a2479274ca8eb9723fa2057 | [
"Apache-2.0"
] | 1 | 2020-09-17T00:43:26.000Z | 2020-09-17T00:43:26.000Z | installer/menu.py | username-is-already-taken2/photon | 5be3d8c956156f494a2479274ca8eb9723fa2057 | [
"Apache-2.0"
] | null | null | null | installer/menu.py | username-is-already-taken2/photon | 5be3d8c956156f494a2479274ca8eb9723fa2057 | [
"Apache-2.0"
] | 1 | 2020-09-17T00:43:35.000Z | 2020-09-17T00:43:35.000Z | #
#
# Author: Mahmoud Bassiouny <mbassiouny@vmware.com>
import curses
from actionresult import ActionResult
from action import Action
class Menu(Action):
def __init__(self, starty, maxx, items, height=0, selector_menu=False,
can_navigate_outside=True, horizontal=False, default_selected=0,
... | 35.470588 | 96 | 0.533742 |
794583e24bd88b799837c9805110510ad5b0fcb3 | 4,476 | py | Python | keras_frcnn/RoiPoolingConv.py | touchylk/part_classification | 25d25377addf6b459240748b61b7458233814b68 | [
"Apache-2.0"
] | 1 | 2019-03-14T01:26:20.000Z | 2019-03-14T01:26:20.000Z | keras_frcnn/RoiPoolingConv.py | touchylk/part_classification | 25d25377addf6b459240748b61b7458233814b68 | [
"Apache-2.0"
] | null | null | null | keras_frcnn/RoiPoolingConv.py | touchylk/part_classification | 25d25377addf6b459240748b61b7458233814b68 | [
"Apache-2.0"
] | null | null | null | from keras.engine.topology import Layer
import keras.backend as K
import tensorflow as tf
class RoiPoolingConv(Layer):
'''ROI pooling layer for 2D inputs.
See Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition,
K. He, X. Zhang, S. Ren, J. Sun
# Arguments
pool_size: ... | 36.096774 | 117 | 0.535523 |
79458437858a6bf0d9ee729a3fd35a7db87a33b4 | 169 | py | Python | NudeNet/nudenet/__init__.py | sparkzsolutions/The-Dark-Onion-Crawler | 56f52127acc7ff4151d455dd1f007638ad0e795d | [
"MIT"
] | null | null | null | NudeNet/nudenet/__init__.py | sparkzsolutions/The-Dark-Onion-Crawler | 56f52127acc7ff4151d455dd1f007638ad0e795d | [
"MIT"
] | null | null | null | NudeNet/nudenet/__init__.py | sparkzsolutions/The-Dark-Onion-Crawler | 56f52127acc7ff4151d455dd1f007638ad0e795d | [
"MIT"
] | 1 | 2022-02-14T13:46:48.000Z | 2022-02-14T13:46:48.000Z | from .classifier import Classifier as NudeClassifier
from .lite_classifier import LiteClassifier as NudeClassifierLite
from .detector import Detector as NudeDetector
| 42.25 | 66 | 0.857988 |
794584a29216191fc9486510234958cb0ac1b5fa | 7,846 | py | Python | pytrademonster/testing/testOrderService.py | femtotrader/pytrademonster | 0bce61a3ed90e3bd438de2bc56b90bbb409490c4 | [
"MIT"
] | null | null | null | pytrademonster/testing/testOrderService.py | femtotrader/pytrademonster | 0bce61a3ed90e3bd438de2bc56b90bbb409490c4 | [
"MIT"
] | null | null | null | pytrademonster/testing/testOrderService.py | femtotrader/pytrademonster | 0bce61a3ed90e3bd438de2bc56b90bbb409490c4 | [
"MIT"
] | 1 | 2018-02-23T09:33:58.000Z | 2018-02-23T09:33:58.000Z | # -*- coding: utf-8 -*-
__author__ = 'adam'
import unittest
import time
from pytrademonster import PyTradeMonster
from pytrademonster.constants import TradeMonsterConstants
from pytrademonster.services import AccountServices, OrderServices
from pytrademonster.objects import LimitOrder, OrderLeg, OrderStatus
"""
####... | 43.10989 | 128 | 0.71119 |
79458500c61a027bef230d4e8be5cf59b0d7eb75 | 3,158 | py | Python | utils/mesh_util.py | yyu1/SurfaceNet | e59cf56d55d1be7295322d5a0f4a2aa244316d86 | [
"MIT"
] | 117 | 2017-08-08T07:25:16.000Z | 2022-01-30T02:41:11.000Z | utils/mesh_util.py | yyu1/SurfaceNet | e59cf56d55d1be7295322d5a0f4a2aa244316d86 | [
"MIT"
] | 8 | 2017-10-24T11:48:30.000Z | 2020-10-31T10:45:39.000Z | utils/mesh_util.py | yyu1/SurfaceNet | e59cf56d55d1be7295322d5a0f4a2aa244316d86 | [
"MIT"
] | 35 | 2017-08-08T10:44:21.000Z | 2022-02-13T13:18:35.000Z | '''
mesh utils
Tianye Li
'''
import numpy as np
# -----------------------------------------------------------------------------
class Mesh():
def __init__( self, v=None, f=None, vc=None, vn=None ):
self.v = v
self.f = f
self.vc = vc # currently need manually specify
self.vn = vn... | 30.07619 | 147 | 0.447118 |
79458614f8c197ca698c61b0a03aa651996c46b3 | 596 | py | Python | recognize_camera.py | tomasrasymas/face-recognition-python | 52da6697fb775cfcd0a7e1511b356f6fd9908678 | [
"MIT"
] | null | null | null | recognize_camera.py | tomasrasymas/face-recognition-python | 52da6697fb775cfcd0a7e1511b356f6fd9908678 | [
"MIT"
] | null | null | null | recognize_camera.py | tomasrasymas/face-recognition-python | 52da6697fb775cfcd0a7e1511b356f6fd9908678 | [
"MIT"
] | null | null | null | import face_detector
import cv2
if __name__ == '__main__':
camera = face_detector.Camera()
model = face_detector.load_model()
frame = camera.get_frame()
detected_faces = face_detector.detect_faces_dlib(frame)
if detected_faces:
for face in detected_faces:
f = face_detector.pi... | 25.913043 | 67 | 0.649329 |
7945863308190473132d36629b8a7399586f7e01 | 2,068 | py | Python | tests/integration/test_always_fetch_merged/test.py | bluebirddm/ClickHouse | f53da4d36b8c3a214567c935caed478edce08363 | [
"Apache-2.0"
] | 2 | 2020-02-12T12:34:14.000Z | 2021-06-05T18:40:33.000Z | tests/integration/test_always_fetch_merged/test.py | bluebirddm/ClickHouse | f53da4d36b8c3a214567c935caed478edce08363 | [
"Apache-2.0"
] | 1 | 2020-06-29T04:54:52.000Z | 2020-06-29T04:54:52.000Z | tests/integration/test_always_fetch_merged/test.py | bluebirddm/ClickHouse | f53da4d36b8c3a214567c935caed478edce08363 | [
"Apache-2.0"
] | 1 | 2020-06-15T13:51:03.000Z | 2020-06-15T13:51:03.000Z | import pytest
import time
from helpers.cluster import ClickHouseCluster
from helpers.test_tools import assert_eq_with_retry
cluster = ClickHouseCluster(__file__)
node1 = cluster.add_instance('node1', with_zookeeper=True)
node2 = cluster.add_instance('node2', with_zookeeper=True)
@pytest.fixture(scope="module")
def ... | 30.411765 | 117 | 0.64942 |
79458673b408fbcf89f904f558c1eb3a5d0594f7 | 24,483 | py | Python | cctbx/adp_restraints/tst_ext.py | jbeilstenedmands/cctbx_project | c228fb15ab10377f664c39553d866281358195aa | [
"BSD-3-Clause-LBNL"
] | null | null | null | cctbx/adp_restraints/tst_ext.py | jbeilstenedmands/cctbx_project | c228fb15ab10377f664c39553d866281358195aa | [
"BSD-3-Clause-LBNL"
] | null | null | null | cctbx/adp_restraints/tst_ext.py | jbeilstenedmands/cctbx_project | c228fb15ab10377f664c39553d866281358195aa | [
"BSD-3-Clause-LBNL"
] | null | null | null | from __future__ import division
from libtbx.test_utils import approx_equal, show_diff
from cctbx.array_family import flex
from cctbx import adptbx
from cctbx import uctbx
from cctbx import adp_restraints
from cctbx.adp_restraints import adp_restraint_params
from scitbx import matrix
import libtbx.load_env
import math, ... | 37.840804 | 96 | 0.631418 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.