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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a1953ed8b25ceb332b90b74dd4c85037513668d | 42,654 | py | Python | youtube_dl/options.py | wesson09/youtube-dl | 9463b52a600662fe3b67c90f7fbf68ca709c5705 | [
"Unlicense"
] | null | null | null | youtube_dl/options.py | wesson09/youtube-dl | 9463b52a600662fe3b67c90f7fbf68ca709c5705 | [
"Unlicense"
] | null | null | null | youtube_dl/options.py | wesson09/youtube-dl | 9463b52a600662fe3b67c90f7fbf68ca709c5705 | [
"Unlicense"
] | 1 | 2021-09-23T11:03:21.000Z | 2021-09-23T11:03:21.000Z | from __future__ import unicode_literals
import os.path
import optparse
import re
import sys
from .downloader.external import list_external_downloaders
from .compat import (
compat_expanduser,
compat_get_terminal_size,
compat_getenv,
compat_kwargs,
compat_shlex_split,
)
from .utils import (
pre... | 46.112432 | 391 | 0.640385 |
4a1954cf1a35f006af77d64f46502cd5537b880d | 8,506 | py | Python | utilities/file_scripts.py | imgVOID/autograding-api | 7c2f5491607d5d76880827c73565f9f5be5a33ad | [
"Apache-2.0"
] | 5 | 2021-11-08T18:55:09.000Z | 2022-02-27T19:14:35.000Z | utilities/file_scripts.py | imgVOID/autograde-py | 7c2f5491607d5d76880827c73565f9f5be5a33ad | [
"Apache-2.0"
] | null | null | null | utilities/file_scripts.py | imgVOID/autograde-py | 7c2f5491607d5d76880827c73565f9f5be5a33ad | [
"Apache-2.0"
] | 2 | 2021-12-23T05:11:31.000Z | 2021-12-26T13:42:21.000Z | """
`file_scripts` module stores tasks I/O utilities.
"""
import aiofiles
from aiofiles.os import remove, mkdir
from os.path import abspath, join, normpath, isfile
from json import loads, dumps
from typing import List, Iterable
class FileUtils:
"""
`FileUtils` class stores utilities for saving user input file... | 40.894231 | 95 | 0.588878 |
4a19550275795b3874380f3f348d8cad1699e08c | 12,239 | py | Python | rwe/analysis.py | som-shahlab/ehr-rwe | 9653a6abc837dee7759ed245939716b7d50525cc | [
"Apache-2.0"
] | 25 | 2020-02-12T00:07:03.000Z | 2021-12-01T22:50:24.000Z | rwe/analysis.py | som-shahlab/ehr-rwe | 9653a6abc837dee7759ed245939716b7d50525cc | [
"Apache-2.0"
] | 1 | 2021-01-28T22:49:23.000Z | 2021-01-28T22:49:23.000Z | rwe/analysis.py | som-shahlab/ehr-rwe | 9653a6abc837dee7759ed245939716b7d50525cc | [
"Apache-2.0"
] | 3 | 2021-03-09T02:47:19.000Z | 2021-05-21T14:51:02.000Z | from collections import Counter, defaultdict
import torch
import numpy as np
import scipy.sparse as sparse
from scipy.sparse import issparse
from pandas import DataFrame, Series
#from metal.utils import arraylike_to_numpy
def arraylike_to_numpy(array_like):
"""Convert a 1d array-like (e.g,. list, tensor, etc.) ... | 33.809392 | 88 | 0.605523 |
4a195515e9992755854332385ee261a5282a1fe9 | 7,085 | py | Python | pgopttune/workload/sampled_workload.py | ssl-oyamata/postgres_opttune | d31088c575097ec6d88f2aa22d4acc47593d3566 | [
"Apache-2.0"
] | 28 | 2020-02-01T11:29:38.000Z | 2022-03-11T15:02:27.000Z | pgopttune/workload/sampled_workload.py | ssl-oyamata/postgres_opttune | d31088c575097ec6d88f2aa22d4acc47593d3566 | [
"Apache-2.0"
] | null | null | null | pgopttune/workload/sampled_workload.py | ssl-oyamata/postgres_opttune | d31088c575097ec6d88f2aa22d4acc47593d3566 | [
"Apache-2.0"
] | 2 | 2020-02-03T10:59:41.000Z | 2021-12-17T03:11:08.000Z | import os
from logging import getLogger
import datetime
import pickle
import multiprocessing
from psycopg2.extras import DictCursor
from pgopttune.workload.workload import Workload
from pgopttune.utils.pg_connect import get_pg_connection
from pgopttune.config.postgres_server_config import PostgresServerConfig
from pgop... | 46.611842 | 120 | 0.666902 |
4a19552a40e985fb28da65c7c236f1b33261f67f | 1,366 | py | Python | tests/test_api_public.py | snowdensb/braindump | 815ae0afebcf867f02143f3ab9cf88b1d4dacdec | [
"MIT"
] | 631 | 2015-01-20T17:32:54.000Z | 2022-01-27T04:34:59.000Z | tests/test_api_public.py | iknownothing/braindump | 9640dd03f99851dbd34dd6cac98a747a4a591b01 | [
"MIT"
] | 241 | 2015-01-20T16:37:53.000Z | 2017-01-10T00:28:04.000Z | tests/test_api_public.py | iknownothing/braindump | 9640dd03f99851dbd34dd6cac98a747a4a591b01 | [
"MIT"
] | 92 | 2015-11-27T18:33:18.000Z | 2022-02-19T18:55:44.000Z | import json
from flask import url_for
from api_base import ApiBaseTestCase
class PublicApiTestCase(ApiBaseTestCase):
def test_public_stats_empty(self):
res = self.client.get('/api/v1/public/stats')
json_res = json.loads(res.data.decode('utf-8'))
self.assertEqual(0, json_res['users'])
... | 25.773585 | 55 | 0.622255 |
4a19552d840e37d59b1286e2c48303d68479298c | 4,226 | py | Python | 07_train/privacy/tensorflow_privacy/privacy/membership_inference_attack/keras_evaluation_example.py | dpai/workshop | d4936da77dac759ba2bac95a9584fde8e86c6b2b | [
"Apache-2.0"
] | 2,327 | 2020-03-01T09:47:34.000Z | 2021-11-25T12:38:42.000Z | 07_train/privacy/tensorflow_privacy/privacy/membership_inference_attack/keras_evaluation_example.py | trideau/Data-Science-with-AWS-Workshop | 7dbe7989fa99e88544da8bf262beec907c536093 | [
"Apache-2.0"
] | 209 | 2020-03-01T17:14:12.000Z | 2021-11-08T20:35:42.000Z | 07_train/privacy/tensorflow_privacy/privacy/membership_inference_attack/keras_evaluation_example.py | trideau/Data-Science-with-AWS-Workshop | 7dbe7989fa99e88544da8bf262beec907c536093 | [
"Apache-2.0"
] | 686 | 2020-03-03T17:24:51.000Z | 2021-11-25T23:39:12.000Z | # Copyright 2020, The TensorFlow Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 37.39823 | 111 | 0.738287 |
4a1955aa74dac2fcaea39c399d527ab177084934 | 1,126 | py | Python | lagom/envs/spaces/base.py | lkylych/lagom | 64777be7f09136072a671c444b5b3fbbcb1b2f18 | [
"MIT"
] | null | null | null | lagom/envs/spaces/base.py | lkylych/lagom | 64777be7f09136072a671c444b5b3fbbcb1b2f18 | [
"MIT"
] | null | null | null | lagom/envs/spaces/base.py | lkylych/lagom | 64777be7f09136072a671c444b5b3fbbcb1b2f18 | [
"MIT"
] | null | null | null | import numpy as np
class Space(object):
"""
Base class for observation and action space e.g. applied to Env.
"""
def __init__(self, shape=None, dtype=None):
if shape is None:
self.shape = None
else:
self.shape = tuple(shape)
if dtype is None... | 23.458333 | 68 | 0.530195 |
4a1955f613008c299430b3b79294f9c780e6d4b7 | 354 | py | Python | multiprocessing_test.py | TheSriram/SwiftParallelizer | 85d70b537852a4b7b940ba19ff9e6c6db3daebaf | [
"Apache-2.0"
] | 1 | 2015-05-21T14:32:37.000Z | 2015-05-21T14:32:37.000Z | multiprocessing_test.py | TheSriram/SwiftParallelizer | 85d70b537852a4b7b940ba19ff9e6c6db3daebaf | [
"Apache-2.0"
] | null | null | null | multiprocessing_test.py | TheSriram/SwiftParallelizer | 85d70b537852a4b7b940ba19ff9e6c6db3daebaf | [
"Apache-2.0"
] | null | null | null | import multiprocessing
import multiprocessing_import_worker
# def worker(num):
# """thread worker function"""
# print 'Worker:'
# return
if __name__ == '__main__':
jobs = []
for i in range(3):
p = multiprocessing.Process(target=multiprocessing_import_worker.worker,args=('sriram_1',))
... | 27.230769 | 99 | 0.655367 |
4a19565ca4f6bb2c6b621e92b991e28df0dab1c9 | 5,542 | py | Python | datumaro/datumaro/plugins/datumaro_format/extractor.py | javoweb/cvat | 684544d2a06c192e7155f655897e6360b4a3be37 | [
"MIT"
] | 2 | 2020-07-24T18:12:18.000Z | 2020-08-12T09:14:07.000Z | datumaro/datumaro/plugins/datumaro_format/extractor.py | javoweb/cvat | 684544d2a06c192e7155f655897e6360b4a3be37 | [
"MIT"
] | 24 | 2020-11-13T18:43:15.000Z | 2022-03-12T00:21:52.000Z | datumaro/datumaro/plugins/datumaro_format/extractor.py | javoweb/cvat | 684544d2a06c192e7155f655897e6360b4a3be37 | [
"MIT"
] | 5 | 2020-07-01T18:02:48.000Z | 2021-01-22T02:21:48.000Z |
# Copyright (C) 2019 Intel Corporation
#
# SPDX-License-Identifier: MIT
import json
import os.path as osp
from datumaro.components.extractor import (SourceExtractor, DatasetItem,
AnnotationType, Label, RleMask, Points, Polygon, PolyLine, Bbox, Caption,
LabelCategories, MaskCategories, PointsCategories
)
from... | 35.754839 | 85 | 0.589318 |
4a1956b1e8d7b899f7e57c0c32063ff20e6a9840 | 808 | py | Python | src/explorer.py | floraxue/active-rl | db90c24dd70c3bbaa704e354f63ffaa6c2d7d851 | [
"MIT"
] | null | null | null | src/explorer.py | floraxue/active-rl | db90c24dd70c3bbaa704e354f63ffaa6c2d7d851 | [
"MIT"
] | null | null | null | src/explorer.py | floraxue/active-rl | db90c24dd70c3bbaa704e354f63ffaa6c2d7d851 | [
"MIT"
] | null | null | null |
class Explorer:
"""
Epsilon-greedy with linearyly decayed epsilon
Args:
start_epsilon: max value of epsilon
end_epsilon: min value of epsilon
decay_steps: how many steps it takes for epsilon to decay
"""
def __init__(self, start_eps, end_eps, decay_steps=100000):
assert ... | 28.857143 | 69 | 0.617574 |
4a19571fefb194c476560375bc58f92935b6e59f | 9,349 | py | Python | Help/gen-sphinx/make_rest.py | constellation-app/miscellaneous | 2c80e3472d076afb3bf7a944088b3fa93437b238 | [
"Apache-2.0"
] | 1 | 2019-12-16T02:50:11.000Z | 2019-12-16T02:50:11.000Z | Help/gen-sphinx/make_rest.py | constellation-app/miscellaneous | 2c80e3472d076afb3bf7a944088b3fa93437b238 | [
"Apache-2.0"
] | null | null | null | Help/gen-sphinx/make_rest.py | constellation-app/miscellaneous | 2c80e3472d076afb3bf7a944088b3fa93437b238 | [
"Apache-2.0"
] | 1 | 2019-12-18T09:55:33.000Z | 2019-12-18T09:55:33.000Z | import argparse
from pathlib import Path
import xml.etree.ElementTree as ET
import shutil
import datetime
import pprint
from parsehelp import parse_html
# Convert NetBeans HelpSet files to ReStructuredText suitable for Sphinx.
#
# Find all the package-info.java files that contain '@HelpSetRegistration'.
# Get the na... | 29.773885 | 108 | 0.565087 |
4a1957bb1adde82551f589c10b3525032638db04 | 400 | py | Python | tests/test_cli.py | myeggs/ward | 52fdf1a2768e5de26081e2990f6f3dc44cb9558c | [
"MIT"
] | null | null | null | tests/test_cli.py | myeggs/ward | 52fdf1a2768e5de26081e2990f6f3dc44cb9558c | [
"MIT"
] | null | null | null | tests/test_cli.py | myeggs/ward | 52fdf1a2768e5de26081e2990f6f3dc44cb9558c | [
"MIT"
] | null | null | null | from click.testing import CliRunner
from ward import each, test
from ward._run import run
@test("Cannot use bar progress style with {output_style} output style")
def _(output_style=each("dots-global", "dots-module")):
runner = CliRunner()
result = runner.invoke(
run, ["test", "--progress-style", "bar... | 26.666667 | 85 | 0.6875 |
4a1958d0420fd39f767a987c4e6e8a49a7c0bf37 | 6,748 | py | Python | selecting_OOD_detector/utils/hyperparameter_search.py | the-mama-ai/selecting_OOD_detector | 1708dd2e46826c6c7a641e5a2259c7003fd24584 | [
"MIT"
] | null | null | null | selecting_OOD_detector/utils/hyperparameter_search.py | the-mama-ai/selecting_OOD_detector | 1708dd2e46826c6c7a641e5a2259c7003fd24584 | [
"MIT"
] | null | null | null | selecting_OOD_detector/utils/hyperparameter_search.py | the-mama-ai/selecting_OOD_detector | 1708dd2e46826c6c7a641e5a2259c7003fd24584 | [
"MIT"
] | 1 | 2022-03-07T15:39:30.000Z | 2022-03-07T15:39:30.000Z | """
A module with helper functions for running a hyperparameter search.
Code adapted from https://github.com/Pacmed/ehr_ood_detection/blob/master/src/experiments/hyperparameter_search.py
"""
from typing import Optional
import os
from sklearn.model_selection import ParameterSampler
import numpy as np
import pandas as p... | 37.488889 | 118 | 0.61559 |
4a195937448ee8d6507421cbb34f613baf3f0533 | 2,685 | py | Python | deploy/demo-cli/blox-create-deployment.py | kylbarnes/blox | 53e3b472581568fd8baccd9c5097800cf433bd77 | [
"Apache-2.0"
] | null | null | null | deploy/demo-cli/blox-create-deployment.py | kylbarnes/blox | 53e3b472581568fd8baccd9c5097800cf433bd77 | [
"Apache-2.0"
] | null | null | null | deploy/demo-cli/blox-create-deployment.py | kylbarnes/blox | 53e3b472581568fd8baccd9c5097800cf433bd77 | [
"Apache-2.0"
] | 1 | 2018-08-04T19:10:28.000Z | 2018-08-04T19:10:28.000Z | #!/usr/bin/env python
import json, os, sys
import common
def main(argv):
# Command Line Arguments
args = [{'arg':'--apigateway', 'dest':'apigateway', 'default':None, 'type':'boolean', 'help':'Call API Gateway endpoint'}]
if '--apigateway' in argv:
args.extend([{'arg':'--stack', 'dest':'stack', 'default':None, 'he... | 37.291667 | 285 | 0.699814 |
4a19596c10259847db51928cfabaf22ad7565089 | 3,985 | py | Python | sitefab/Logger.py | ebursztein/SiteFab | 3f8662fe5c91c7f631932cf333e6eae5e146077c | [
"Apache-2.0"
] | 10 | 2017-01-02T02:48:27.000Z | 2019-09-18T22:44:29.000Z | sitefab/Logger.py | ebursztein/SiteFab | 3f8662fe5c91c7f631932cf333e6eae5e146077c | [
"Apache-2.0"
] | 173 | 2016-12-29T05:24:31.000Z | 2017-12-29T10:53:35.000Z | sitefab/Logger.py | ebursztein/SiteFab | 3f8662fe5c91c7f631932cf333e6eae5e146077c | [
"Apache-2.0"
] | 8 | 2017-04-11T14:34:03.000Z | 2019-06-17T09:29:17.000Z | """ Handle SiteFab log output
"""
import time
from collections import defaultdict
from collections import Counter
from jinja2 import Environment, FileSystemLoader
from . import utils
from . import files
class Logger():
""" SiteFab logging system
Note:
while the logging system render log in h... | 32.663934 | 75 | 0.607026 |
4a1959bab287142e9d5a3f7509aafe39dfc32073 | 1,067 | py | Python | functions/sample/python/reviews.py | Bedil09/agfzb-CloudAppDevelopment_Capstone | b1ceddac60c9d5551ce3d87e7371f15cc8be2d52 | [
"Apache-2.0"
] | null | null | null | functions/sample/python/reviews.py | Bedil09/agfzb-CloudAppDevelopment_Capstone | b1ceddac60c9d5551ce3d87e7371f15cc8be2d52 | [
"Apache-2.0"
] | null | null | null | functions/sample/python/reviews.py | Bedil09/agfzb-CloudAppDevelopment_Capstone | b1ceddac60c9d5551ce3d87e7371f15cc8be2d52 | [
"Apache-2.0"
] | null | null | null | from cloudant.client import Cloudant
from cloudant.error import CloudantException
import requests
def main(dict):
secret = {
"COUCH_URL": "https://f12b5d67-d718-4b5a-ab21-b00755ea589e-bluemix.cloudantnosqldb.appdomain.cloud",
"COUCH_USERNAME": "f12b5d67-d718-4b5a-ab21-b00755ea589e-bluemix",
... | 26.675 | 108 | 0.591378 |
4a195aa426ff4bbf1c3dd86f9fda929c22553ea2 | 9,686 | py | Python | src/orion/core/io/convert.py | mgermain/orion | b0932da99cac5c3db9bbf662588c581cb6ca1849 | [
"BSD-3-Clause"
] | null | null | null | src/orion/core/io/convert.py | mgermain/orion | b0932da99cac5c3db9bbf662588c581cb6ca1849 | [
"BSD-3-Clause"
] | null | null | null | src/orion/core/io/convert.py | mgermain/orion | b0932da99cac5c3db9bbf662588c581cb6ca1849 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Parse and generate user script's configuration
==============================================
Defines and instantiates a converter for configuration file types.
Given a file path infer which configuration file parser/emitter it corresponds to.
Define `Converter` classes with a common inter... | 33.4 | 91 | 0.615528 |
4a195b5541adba6ed58510d9f7fe8762fec8b4bb | 309 | py | Python | Contest/ABC147/c/main.py | mpses/AtCoder | 9c101fcc0a1394754fcf2385af54b05c30a5ae2a | [
"CC0-1.0"
] | null | null | null | Contest/ABC147/c/main.py | mpses/AtCoder | 9c101fcc0a1394754fcf2385af54b05c30a5ae2a | [
"CC0-1.0"
] | null | null | null | Contest/ABC147/c/main.py | mpses/AtCoder | 9c101fcc0a1394754fcf2385af54b05c30a5ae2a | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
from itertools import*
I = input
n = int(I())
c = 0;z = []
for i in range(n):
for j in range(int(I())):
z += [[i] + list(map(int, I().split()))]
for j in product([0,1], repeat=n):
if all(j[i] == 0 or j[x-1] - y == 0 for i, x, y in z):
c = max(c, sum(j))
print(c) | 25.75 | 58 | 0.501618 |
4a195d0635407548f65616247cf7b37ee23616c2 | 569 | py | Python | tests/unet_test.py | rutugandhi/Neuron-Finder | 76d771bb37b7c73f884dc4a018fa19090ec904d6 | [
"MIT"
] | null | null | null | tests/unet_test.py | rutugandhi/Neuron-Finder | 76d771bb37b7c73f884dc4a018fa19090ec904d6 | [
"MIT"
] | null | null | null | tests/unet_test.py | rutugandhi/Neuron-Finder | 76d771bb37b7c73f884dc4a018fa19090ec904d6 | [
"MIT"
] | null | null | null | from src.unet import unet
unet = UNet()
def dice_coef_test():
#Creating testing arrays
y_true = np.array([[1,2,3],[1,2,3],[1,2,3]])
y_pred = np.array([[3,2,1],[3,2,1],[3,2,1]])
dc = unet.dice_coef(y_true,y_pred)
#Correct Answer is 2*3/(9+9)=6/18=1/3
assert dc == (1/3)
def dice_coef_loss_tes... | 24.73913 | 50 | 0.567663 |
4a195d5c7091777c85414c923de0a701c67790b5 | 447 | py | Python | basic_accounting/basic_accounting/doctype/payment_entry_for_supplier/payment_entry_for_supplier.py | EPIsumeet/Accounting-App | 82836ee9e5dc21a0292b8590d8ae2c60b9b77b3f | [
"MIT"
] | null | null | null | basic_accounting/basic_accounting/doctype/payment_entry_for_supplier/payment_entry_for_supplier.py | EPIsumeet/Accounting-App | 82836ee9e5dc21a0292b8590d8ae2c60b9b77b3f | [
"MIT"
] | null | null | null | basic_accounting/basic_accounting/doctype/payment_entry_for_supplier/payment_entry_for_supplier.py | EPIsumeet/Accounting-App | 82836ee9e5dc21a0292b8590d8ae2c60b9b77b3f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2021, Sherlock Holmes and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class PaymentEntryForSupplier(Document):
def before_submit(self):
supplier_exists = fra... | 22.35 | 54 | 0.740492 |
4a195da4e4e59bef0f4858c98b8b3b635a85fd57 | 89 | py | Python | home_user/dj_iot/iotdata/apps.py | IoTree/IoTree42 | b7bb31f39add4e719a04e63cdd336983f8017137 | [
"MIT"
] | 4 | 2020-06-04T08:43:54.000Z | 2021-11-15T17:29:23.000Z | home_user/dj_iot/iotdata/apps.py | IoTree/IoTree42 | b7bb31f39add4e719a04e63cdd336983f8017137 | [
"MIT"
] | 3 | 2020-05-02T10:53:03.000Z | 2021-05-20T13:17:08.000Z | home_user/dj_iot/iotdata/apps.py | IoTree/IoTree42 | b7bb31f39add4e719a04e63cdd336983f8017137 | [
"MIT"
] | 3 | 2020-10-27T13:06:51.000Z | 2022-01-08T14:56:36.000Z | from django.apps import AppConfig
class IotdataConfig(AppConfig):
name = 'iotdata'
| 14.833333 | 33 | 0.752809 |
4a195e54e1a7363e21be9b30bc9a2a09d710e8b5 | 530 | py | Python | lab/refactoring/extract_method3.py | LukazDane/SPD-2.31-Testing-and-Architecture | 63905bf4efde55e5c32d7cfe3ac46abdb2173485 | [
"MIT"
] | null | null | null | lab/refactoring/extract_method3.py | LukazDane/SPD-2.31-Testing-and-Architecture | 63905bf4efde55e5c32d7cfe3ac46abdb2173485 | [
"MIT"
] | null | null | null | lab/refactoring/extract_method3.py | LukazDane/SPD-2.31-Testing-and-Architecture | 63905bf4efde55e5c32d7cfe3ac46abdb2173485 | [
"MIT"
] | null | null | null | # Written by Kamran Bigdely
# Example for Compose Methods: Extract Method.
import math
xc1 = 4
yc1 = 4.25
xc2 = 53
yc2 = -5.35
# Calculate the distance between the two circle
distance = math.sqrt((xc1-xc2)**2 + (yc1 - yc2)**2)
print('distance', distance)
# *** somewhere else in your program ***
xa = -36
ya = 97
xb = ... | 24.090909 | 84 | 0.669811 |
4a195fcd115507e36da660549c55c283ba94fb42 | 6,593 | py | Python | ansys/dpf/core/operators/geo/normals.py | TheGoldfish01/pydpf-core | 75ca8a180454f94cedafbc68c1d6f20dcfc4c795 | [
"MIT"
] | 11 | 2021-01-31T15:50:02.000Z | 2021-10-01T23:15:38.000Z | ansys/dpf/core/operators/geo/normals.py | TheGoldfish01/pydpf-core | 75ca8a180454f94cedafbc68c1d6f20dcfc4c795 | [
"MIT"
] | 46 | 2021-01-14T05:00:50.000Z | 2021-10-06T18:30:37.000Z | ansys/dpf/core/operators/geo/normals.py | TheGoldfish01/pydpf-core | 75ca8a180454f94cedafbc68c1d6f20dcfc4c795 | [
"MIT"
] | 3 | 2021-06-30T07:18:30.000Z | 2021-09-15T08:43:11.000Z | """
normals
=======
"""
from ansys.dpf.core.dpf_operator import Operator
from ansys.dpf.core.inputs import Input, _Inputs
from ansys.dpf.core.outputs import Output, _Outputs, _modify_output_spec_with_one_type
from ansys.dpf.core.operators.specification import PinSpecification, Specification
"""Operators from meshOpera... | 30.953052 | 203 | 0.586683 |
4a195ff50a6f5136265516dbb640e9a2f5a483fd | 10,019 | py | Python | Collections-a-installer/community-general-2.4.0/plugins/modules/cloud/xenserver/xenserver_guest_powerstate.py | d-amien-b/simple-getwordpress | da90d515a0aa837b633d50db4d91d22b031c04a2 | [
"MIT"
] | 22 | 2021-07-16T08:11:22.000Z | 2022-03-31T07:15:34.000Z | Collections-a-installer/community-general-2.4.0/plugins/modules/cloud/xenserver/xenserver_guest_powerstate.py | d-amien-b/simple-getwordpress | da90d515a0aa837b633d50db4d91d22b031c04a2 | [
"MIT"
] | 12 | 2020-02-21T07:24:52.000Z | 2020-04-14T09:54:32.000Z | Collections-a-installer/community-general-2.4.0/plugins/modules/cloud/xenserver/xenserver_guest_powerstate.py | d-amien-b/simple-getwordpress | da90d515a0aa837b633d50db4d91d22b031c04a2 | [
"MIT"
] | 39 | 2021-07-05T02:31:42.000Z | 2022-03-31T02:46:03.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2018, Bojan Vitnik <bvitnik@mainstream.rs>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = r'''
---
module: xe... | 36.97048 | 157 | 0.60525 |
4a19605f5c10d236cd1cc64147732c13e115a98a | 11,400 | py | Python | test/functional/tests/cache_ops/test_cleaning_policy_operation.py | andreatomassetti/open-cas-linux | 6a6a0267d76dca86de8695a959991ecefdc0ddf8 | [
"BSD-3-Clause"
] | 1 | 2022-01-23T23:50:23.000Z | 2022-01-23T23:50:23.000Z | test/functional/tests/cache_ops/test_cleaning_policy_operation.py | andreatomassetti/open-cas-linux | 6a6a0267d76dca86de8695a959991ecefdc0ddf8 | [
"BSD-3-Clause"
] | 1 | 2022-03-21T22:05:26.000Z | 2022-03-21T22:05:26.000Z | test/functional/tests/cache_ops/test_cleaning_policy_operation.py | andreatomassetti/open-cas-linux | 6a6a0267d76dca86de8695a959991ecefdc0ddf8 | [
"BSD-3-Clause"
] | null | null | null | #
# Copyright(c) 2019-2021 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause
#
import time
import pytest
from datetime import timedelta
from api.cas import casadm
from api.cas.cache_config import (
CacheMode,
CleaningPolicy,
FlushParametersAcp,
FlushParametersAlru,
Time,
)
from storage_de... | 39.041096 | 94 | 0.659474 |
4a196297c26f6c2ebe3d37c7910eb8267a6546e0 | 1,099 | py | Python | 0x0B-python-input_output/12-student.py | FatChicken277/holbertonschool-higher_level_programming | 520d6310a5e2a874f8c5f5185d0fb769b6412e7c | [
"CNRI-Python"
] | null | null | null | 0x0B-python-input_output/12-student.py | FatChicken277/holbertonschool-higher_level_programming | 520d6310a5e2a874f8c5f5185d0fb769b6412e7c | [
"CNRI-Python"
] | null | null | null | 0x0B-python-input_output/12-student.py | FatChicken277/holbertonschool-higher_level_programming | 520d6310a5e2a874f8c5f5185d0fb769b6412e7c | [
"CNRI-Python"
] | null | null | null | #!/usr/bin/python3
"""This module contains a class that class Student
that defines a student. (based on 11-student.py)
"""
class Student():
"""Class Student that defines a student.
(based on 11-student.py)
"""
def __init__(self, first_name, last_name, age):
"""Instantiation with first... | 28.179487 | 69 | 0.571429 |
4a196317702587c0a13e783e2e1935468649156c | 451 | py | Python | settings/fixed_params.py | wesley1001/trading-momentum-transformer | 7d6251b32b82cb0f6bf7abb5504a989417469b7b | [
"MIT"
] | 27 | 2022-01-24T01:52:13.000Z | 2022-03-30T04:18:29.000Z | settings/fixed_params.py | wesley1001/trading-momentum-transformer | 7d6251b32b82cb0f6bf7abb5504a989417469b7b | [
"MIT"
] | 1 | 2022-03-23T11:27:46.000Z | 2022-03-28T04:37:54.000Z | settings/fixed_params.py | kieranjwood/trading-momentum-transformer | d7df00bba31f5728e1c8bc735da0208892487142 | [
"MIT"
] | 21 | 2022-02-15T09:27:20.000Z | 2022-03-30T07:38:09.000Z | MODLE_PARAMS = {
"architecture": "TFT",
"total_time_steps": 252,
"early_stopping_patience": 25,
"multiprocessing_workers": 32,
"num_epochs": 300,
"early_stopping_patience": 25,
"fill_blank_dates": False,
"split_tickers_individually": True,
"random_search_iterations": 50 ,
"evalua... | 30.066667 | 44 | 0.689579 |
4a1963dba1f2e88add572333dbc706db9555deb5 | 2,614 | py | Python | twitterscraper/main.py | samanthaklee/twitterscraper | c6ec256de26bd24410e30daa56a998958a450c78 | [
"MIT"
] | 1 | 2019-08-12T18:34:58.000Z | 2019-08-12T18:34:58.000Z | twitterscraper/main.py | samanthaklee/twitterscraper | c6ec256de26bd24410e30daa56a998958a450c78 | [
"MIT"
] | null | null | null | twitterscraper/main.py | samanthaklee/twitterscraper | c6ec256de26bd24410e30daa56a998958a450c78 | [
"MIT"
] | 1 | 2019-10-08T02:38:09.000Z | 2019-10-08T02:38:09.000Z | """
This is a command line application that allows you to scrape twitter!
"""
import collections
import json
from argparse import ArgumentParser
from datetime import datetime
from os.path import isfile
from json import dump
import logging
from twitterscraper import query_tweets
from twitterscraper.query import query_a... | 36.816901 | 80 | 0.573068 |
4a1964e55729b62cb6465cd65b0e97710644b5f2 | 386 | py | Python | venv/Scripts/pip3.7-script.py | Galeedondon/-shopee | c4b1205a4ce1cd387ff6f2f2071115b13e4cc8b5 | [
"Unlicense"
] | null | null | null | venv/Scripts/pip3.7-script.py | Galeedondon/-shopee | c4b1205a4ce1cd387ff6f2f2071115b13e4cc8b5 | [
"Unlicense"
] | null | null | null | venv/Scripts/pip3.7-script.py | Galeedondon/-shopee | c4b1205a4ce1cd387ff6f2f2071115b13e4cc8b5 | [
"Unlicense"
] | null | null | null | #!Z:\DEMO\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==19.0.3','console_scripts','pip3.7'
__requires__ = 'pip==19.0.3'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(
loa... | 29.692308 | 70 | 0.650259 |
4a19650ff2e1d7ca307eb09de0bb87a6b0a77dcd | 4,057 | py | Python | tests/kafkatest/services/log_compaction_tester.py | BoYiZhang/kafka-2.4.0-src | 752b76f7f48ca4c5ea20770fd990293b1b28fce4 | [
"Apache-2.0"
] | 126 | 2018-08-31T21:47:30.000Z | 2022-03-11T10:01:31.000Z | tests/kafkatest/services/log_compaction_tester.py | BoYiZhang/kafka-2.4.0-src | 752b76f7f48ca4c5ea20770fd990293b1b28fce4 | [
"Apache-2.0"
] | 75 | 2019-03-07T20:24:18.000Z | 2022-03-31T02:14:37.000Z | tests/kafkatest/services/log_compaction_tester.py | BoYiZhang/kafka-2.4.0-src | 752b76f7f48ca4c5ea20770fd990293b1b28fce4 | [
"Apache-2.0"
] | 46 | 2018-09-13T07:27:19.000Z | 2022-03-23T17:49:13.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 use ... | 45.58427 | 163 | 0.700271 |
4a1965df56509f833a3dff843ef255f091a80ece | 254 | py | Python | conversion.py | cagis2019/conversion_tofix | d27f5df148bec658b872bf767b1aeed798c1720c | [
"Unlicense"
] | 2 | 2019-08-05T21:06:58.000Z | 2020-08-03T17:52:23.000Z | conversion.py | cagis2019/conversion_tofix | d27f5df148bec658b872bf767b1aeed798c1720c | [
"Unlicense"
] | 7 | 2017-08-01T20:41:42.000Z | 2020-08-03T19:01:34.000Z | conversion.py | cagis2019/conversion_tofix | d27f5df148bec658b872bf767b1aeed798c1720c | [
"Unlicense"
] | 92 | 2017-08-01T18:17:35.000Z | 2021-08-02T21:54:00.000Z | """Conversion tools for Python"""
def dollars2cents(dollars):
"""Convert dollars to cents"""
cents = dollars * 100
return cents
def gallons2liters(gallons):
"""Convert gallons to liters"""
liters = gallons * 3.785
return liters
| 21.166667 | 35 | 0.665354 |
4a19660efe911a853cb00269ec81552d0f6b5935 | 749 | py | Python | example_python_client.py | Fifczak/FeedbacksAPI | b35863e3b6cca6c07077571301bcd6d15c7c2c83 | [
"MIT"
] | null | null | null | example_python_client.py | Fifczak/FeedbacksAPI | b35863e3b6cca6c07077571301bcd6d15c7c2c83 | [
"MIT"
] | null | null | null | example_python_client.py | Fifczak/FeedbacksAPI | b35863e3b6cca6c07077571301bcd6d15c7c2c83 | [
"MIT"
] | null | null | null | from requests.auth import HTTPBasicAuth
from datetime import datetime
import requests
import json
url_get = "http://192.168.10.232:444/api/feedbacks"
url_put = "http://192.168.10.232:444/api/feedbacks/put"
headers = {"apikey": "7B5zIqmRGXmrJTFmKa99vcit"}
def get_feedbacks():
req = requests.get(url_get, headers=he... | 34.045455 | 82 | 0.728972 |
4a1966f170e3d8ebd5ed66e0f5730c71c075e448 | 21,075 | py | Python | failed-trials/handwrite.py | hiroki-kyoto/alice | 273e7f3d647c685db65d224baacd21e9f0e361f9 | [
"MIT"
] | null | null | null | failed-trials/handwrite.py | hiroki-kyoto/alice | 273e7f3d647c685db65d224baacd21e9f0e361f9 | [
"MIT"
] | null | null | null | failed-trials/handwrite.py | hiroki-kyoto/alice | 273e7f3d647c685db65d224baacd21e9f0e361f9 | [
"MIT"
] | null | null | null | # handwrite.py
import numpy as np
import tensorflow as tf
from PIL import Image
# canvas setting: canvas height and width, and pen radius
h, w = 256, 256
r = w // 16
color_bound = 0.5
sim_c = 0.5 # the speed of light in simulation: the maximum of speed enabled
sim_d = 1.0/w # the minimum of simulation in space
sim_t =... | 31.931818 | 102 | 0.528114 |
4a196720344766ddc87bbf07add93a6b48fe114f | 5,276 | py | Python | src/raman_fitting/exporting/exporter.py | MyPyDavid/raman_fitting | a827ab578ae801e185384159f145ae4dfad39549 | [
"MIT"
] | 3 | 2021-03-03T21:02:11.000Z | 2021-05-14T09:24:40.000Z | src/raman_fitting/exporting/exporter.py | MyPyDavid/raman_fitting | a827ab578ae801e185384159f145ae4dfad39549 | [
"MIT"
] | 8 | 2021-06-25T22:54:53.000Z | 2021-08-09T10:07:30.000Z | src/raman_fitting/exporting/exporter.py | MyPyDavid/raman_fitting | a827ab578ae801e185384159f145ae4dfad39549 | [
"MIT"
] | 2 | 2021-07-08T09:49:49.000Z | 2022-03-19T14:43:01.000Z | import pandas as pd
from raman_fitting.exporting.plotting import fit_spectrum_plot, raw_data_export
import logging
logger = logging.getLogger(__name__)
class ExporterError(Exception):
"""Error occured during the exporting functions"""
class Exporter:
"""
The Exporter class handles all the exporting o... | 36.895105 | 140 | 0.576194 |
4a19682e2c558afd870406e85f48116351d701bd | 17,280 | py | Python | VENV/lib/python3.6/site-packages/pandas/tests/dtypes/test_cast.py | workingyifei/display-pattern-generator | b27be84c6221fa93833f283109870737b05bfbf6 | [
"MIT"
] | 69 | 2020-03-31T06:40:17.000Z | 2022-02-25T11:48:18.000Z | venv/lib/python3.7/site-packages/pandas/tests/dtypes/test_cast.py | John1001Song/Big-Data-Robo-Adviser | 9444dce96954c546333d5aecc92a06c3bfd19aa5 | [
"MIT"
] | 8 | 2019-12-04T23:44:11.000Z | 2022-02-10T08:31:40.000Z | venv/lib/python3.7/site-packages/pandas/tests/dtypes/test_cast.py | John1001Song/Big-Data-Robo-Adviser | 9444dce96954c546333d5aecc92a06c3bfd19aa5 | [
"MIT"
] | 28 | 2020-04-15T15:24:17.000Z | 2021-12-26T04:05:02.000Z | # -*- coding: utf-8 -*-
"""
These test the private routines in types/cast.py
"""
import pytest
from datetime import datetime, timedelta, date
import numpy as np
import pandas as pd
from pandas import (Timedelta, Timestamp, DatetimeIndex,
DataFrame, NaT, Period, Series)
from pandas.core.dtypes.c... | 37.894737 | 79 | 0.585532 |
4a1968791a65079fb0276f740d9d957058347dd3 | 396 | py | Python | fwl-automation-decisions/domain/src/domain/model/zone/ZoneName.py | aherculano/fwl-project | 6d4c4d40393b76d45cf13b572b5aabc0696e9285 | [
"MIT"
] | null | null | null | fwl-automation-decisions/domain/src/domain/model/zone/ZoneName.py | aherculano/fwl-project | 6d4c4d40393b76d45cf13b572b5aabc0696e9285 | [
"MIT"
] | null | null | null | fwl-automation-decisions/domain/src/domain/model/zone/ZoneName.py | aherculano/fwl-project | 6d4c4d40393b76d45cf13b572b5aabc0696e9285 | [
"MIT"
] | null | null | null | class ZoneName(object):
def __init__(self, value: str):
self.value = value
@property
def value(self):
return self._value
@value.setter
def value(self, value: str):
self._value = value.strip().upper()
def __eq__(self, other) -> bool:
if isinstance(other, ZoneNa... | 22 | 49 | 0.598485 |
4a19698c26c536b09708eb73487d5da431508734 | 3,745 | py | Python | src/third_party/beaengine/tests/0f3865.py | CrackerCat/rp | 5fe693c26d76b514efaedb4084f6e37d820db023 | [
"MIT"
] | 1 | 2022-01-17T17:40:29.000Z | 2022-01-17T17:40:29.000Z | src/third_party/beaengine/tests/0f3865.py | CrackerCat/rp | 5fe693c26d76b514efaedb4084f6e37d820db023 | [
"MIT"
] | null | null | null | src/third_party/beaengine/tests/0f3865.py | CrackerCat/rp | 5fe693c26d76b514efaedb4084f6e37d820db023 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This progra... | 42.078652 | 83 | 0.657143 |
4a196b3e67747aa6e900537d286e290b24c2a492 | 5,959 | py | Python | bb-master/sandbox/lib/python3.5/site-packages/buildbot/reporters/pushover.py | Alecto3-D/testable-greeter | 09e8e488edfb7e46cf5867b2b5a6ebe0b1929f78 | [
"MIT"
] | 2 | 2017-07-11T18:56:27.000Z | 2017-07-28T14:01:12.000Z | bb-master/sandbox/lib/python3.5/site-packages/buildbot/reporters/pushover.py | Alecto3-D/testable-greeter | 09e8e488edfb7e46cf5867b2b5a6ebe0b1929f78 | [
"MIT"
] | 1 | 2017-07-28T13:53:41.000Z | 2017-07-31T15:30:40.000Z | bb-master/sandbox/lib/python3.5/site-packages/buildbot/reporters/pushover.py | Alecto3-D/testable-greeter | 09e8e488edfb7e46cf5867b2b5a6ebe0b1929f78 | [
"MIT"
] | null | null | null | # This file is part of Buildbot. Buildbot is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | 44.804511 | 106 | 0.608827 |
4a196b53ef74994b9d4760dfbbf5ce4641ccbb52 | 1,606 | py | Python | setup.py | CADWRDeltaModeling/pydelmod | 31700b6853467dfb1af418267426e5014369080f | [
"MIT"
] | null | null | null | setup.py | CADWRDeltaModeling/pydelmod | 31700b6853467dfb1af418267426e5014369080f | [
"MIT"
] | 4 | 2020-01-25T00:19:45.000Z | 2021-04-06T22:46:34.000Z | setup.py | CADWRDeltaModeling/pydelmod | 31700b6853467dfb1af418267426e5014369080f | [
"MIT"
] | 2 | 2019-11-06T20:29:35.000Z | 2020-01-03T19:44:55.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
from setuptools import setup, find_packages
##------------------ VERSIONING BEST PRACTICES --------------------------##
import versioneer
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history... | 28.678571 | 75 | 0.631382 |
4a196cdd07669d0c31fcae309dc385ce2f99d451 | 931 | py | Python | setup.py | traviscook21/pylivy | 01bd6bf974323dbe366a7045f5b7cea0aac759dc | [
"MIT"
] | null | null | null | setup.py | traviscook21/pylivy | 01bd6bf974323dbe366a7045f5b7cea0aac759dc | [
"MIT"
] | null | null | null | setup.py | traviscook21/pylivy | 01bd6bf974323dbe366a7045f5b7cea0aac759dc | [
"MIT"
] | null | null | null | from pathlib import Path
from setuptools import setup
README = Path(__file__).parent / "README.rst"
setup(
name="livy",
description="A Python client for Apache Livy",
long_description=README.read_text(),
packages=["livy"],
url="https://github.com/acroz/pylivy",
author="Andrew Crozier",
a... | 28.212121 | 68 | 0.622986 |
4a196dc030f836477d25d47ccb386d892ec65f3d | 6,508 | py | Python | aws_jumpcloud/jumpcloud.py | jtimberlake/aws-jumpcloud | 61b92f451587635e93437307c85ff0775a5a2f83 | [
"MIT"
] | null | null | null | aws_jumpcloud/jumpcloud.py | jtimberlake/aws-jumpcloud | 61b92f451587635e93437307c85ff0775a5a2f83 | [
"MIT"
] | null | null | null | aws_jumpcloud/jumpcloud.py | jtimberlake/aws-jumpcloud | 61b92f451587635e93437307c85ff0775a5a2f83 | [
"MIT"
] | null | null | null | import base64
from datetime import datetime, timezone
from json import JSONDecodeError
import sys
from bs4 import BeautifulSoup # pylint: disable=E0401
from requests import Session as HTTPSession
from aws_jumpcloud.keyring import Keyring
import aws_jumpcloud.onepassword as op
class JumpCloudSession(object):
HT... | 37.402299 | 97 | 0.644438 |
4a196ea4925983aeaca6d26b58181606709b1786 | 8,324 | py | Python | openpnm/algorithms/Porosimetry.py | halotudio/openPNM-copy2 | d400ec65e9421256a531f6d22a38255b002d5dcb | [
"MIT"
] | 1 | 2021-05-01T11:10:43.000Z | 2021-05-01T11:10:43.000Z | openpnm/algorithms/Porosimetry.py | Jimmy-INL/OpenPNM | 1546fa1ac2204443bde916f2037fac383c5069ae | [
"MIT"
] | null | null | null | openpnm/algorithms/Porosimetry.py | Jimmy-INL/OpenPNM | 1546fa1ac2204443bde916f2037fac383c5069ae | [
"MIT"
] | null | null | null | from openpnm.algorithms import OrdinaryPercolation
from openpnm.utils import logging
import numpy as np
logger = logging.getLogger(__name__)
class Porosimetry(OrdinaryPercolation):
r"""
Simulates mercury instrustion porosimetry using ordinary percolation
Parameters
----------
network : OpenPNM Ne... | 40.407767 | 83 | 0.566314 |
4a196f27a908cd166610531f97b8b3ceec6572fb | 32,065 | py | Python | tests/test_client.py | awesome-archive/WeRoBot | 42ac05aa2780fb3681d82c5f8612956d2990c630 | [
"MIT"
] | 1 | 2017-06-30T01:29:33.000Z | 2017-06-30T01:29:33.000Z | tests/test_client.py | awesome-archive/WeRoBot | 42ac05aa2780fb3681d82c5f8612956d2990c630 | [
"MIT"
] | null | null | null | tests/test_client.py | awesome-archive/WeRoBot | 42ac05aa2780fb3681d82c5f8612956d2990c630 | [
"MIT"
] | 1 | 2020-11-01T16:35:32.000Z | 2020-11-01T16:35:32.000Z | # -*- coding: utf-8 -*-
import os
import responses
import json
import pytest
import requests
from werobot import WeRoBot
from werobot.config import Config
from werobot.client import Client, check_error, ClientException
from werobot.utils import cached_property
try:
import urllib.parse as urlparse
except ImportErr... | 36.190745 | 100 | 0.61578 |
4a196f54aa6a64dca205da3f108a7d32d24152e4 | 4,371 | py | Python | config.py | ch-its/DIN-Group-Activity-Recognition-Benchmark | 02d29decc7ed8c6c85bf53436956ef36f76e4872 | [
"MIT"
] | 14 | 2021-11-29T08:11:07.000Z | 2022-02-26T14:23:28.000Z | config.py | ch-its/DIN-Group-Activity-Recognition-Benchmark | 02d29decc7ed8c6c85bf53436956ef36f76e4872 | [
"MIT"
] | 9 | 2021-08-31T11:55:49.000Z | 2021-11-21T03:29:33.000Z | config.py | ch-its/DIN-Group-Activity-Recognition-Benchmark | 02d29decc7ed8c6c85bf53436956ef36f76e4872 | [
"MIT"
] | 6 | 2021-09-16T11:41:54.000Z | 2021-11-10T09:27:19.000Z | import time
import os
class Config(object):
"""
class to save config parameter
"""
def __init__(self, dataset_name):
# Global
self.image_size = 720, 1280 #input image size
self.batch_size = 32 #train batch size
self.test_batch_size = 8 #test batch size
sel... | 37.358974 | 123 | 0.614505 |
4a196f7282c7a05afb85826eb0310c88ccaeae06 | 546 | py | Python | appgen/appgen/admin.py | Ecotrust/madrona-app-generator | 078d124a8aacadf8a151da7a5434f68868564431 | [
"BSD-3-Clause"
] | null | null | null | appgen/appgen/admin.py | Ecotrust/madrona-app-generator | 078d124a8aacadf8a151da7a5434f68868564431 | [
"BSD-3-Clause"
] | null | null | null | appgen/appgen/admin.py | Ecotrust/madrona-app-generator | 078d124a8aacadf8a151da7a5434f68868564431 | [
"BSD-3-Clause"
] | null | null | null | from django.contrib.gis import admin
from appgen.models import *
from appgen.forms import AppConfigForm
admin.site.register(UserFeature)
admin.site.register(BaseKml)
class WorldGeoAdmin(admin.OSMGeoAdmin):
default_lon = 0
default_lat = 0
default_zoom = 1
map_width = 600
map_height = 400
class Ap... | 27.3 | 118 | 0.739927 |
4a19701561dbef42247da0d49d382e3de6e45233 | 672 | py | Python | pygipo/management/commands/is_db_up.py | felixhummel/pygipo | e7323de052e3c7f44ec4912bddcbb58abebcc6bf | [
"MIT"
] | null | null | null | pygipo/management/commands/is_db_up.py | felixhummel/pygipo | e7323de052e3c7f44ec4912bddcbb58abebcc6bf | [
"MIT"
] | null | null | null | pygipo/management/commands/is_db_up.py | felixhummel/pygipo | e7323de052e3c7f44ec4912bddcbb58abebcc6bf | [
"MIT"
] | null | null | null | # vim: set fileencoding=utf-8 filetype=python :
import django
from django.core.management.base import BaseCommand
from django.db import connection
EXPECTED_EXCEPTIONS = [
'Name does not resolve',
'the database system is starting up',
]
class Command(BaseCommand):
def handle(self, *args, **options):
... | 30.545455 | 80 | 0.642857 |
4a1970e0122c600b5ce85319ff6c687a355b5187 | 4,735 | py | Python | oneflow_cambricon-cambricon/oneflow/python/test/ops/test_smooth_l1_loss.py | wanghongsheng01/oneflow_cambricon | 187faaa2cb9ba995080ba22499b6219c2d36f0ac | [
"Apache-2.0"
] | null | null | null | oneflow_cambricon-cambricon/oneflow/python/test/ops/test_smooth_l1_loss.py | wanghongsheng01/oneflow_cambricon | 187faaa2cb9ba995080ba22499b6219c2d36f0ac | [
"Apache-2.0"
] | null | null | null | oneflow_cambricon-cambricon/oneflow/python/test/ops/test_smooth_l1_loss.py | wanghongsheng01/oneflow_cambricon | 187faaa2cb9ba995080ba22499b6219c2d36f0ac | [
"Apache-2.0"
] | null | null | null | """
Copyright 2020 The OneFlow 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 applicable law or agr... | 36.145038 | 79 | 0.601478 |
4a19714332f0e9d061b6396d85de130800577bbf | 3,058 | py | Python | oo/carro_arthur.py | arthurbragav/pythonbirds | f653ac1038e571529f55d0e490b2a8bd193ad523 | [
"MIT"
] | null | null | null | oo/carro_arthur.py | arthurbragav/pythonbirds | f653ac1038e571529f55d0e490b2a8bd193ad523 | [
"MIT"
] | null | null | null | oo/carro_arthur.py | arthurbragav/pythonbirds | f653ac1038e571529f55d0e490b2a8bd193ad523 | [
"MIT"
] | null | null | null | """
>>> # Testando motor
>>> motor = Motor()
>>> motor.velocidade
0
>>> motor.acelerar()
>>> motor.velocidade
1
>>> motor.acelerar()
>>> motor.velocidade
2
>>> motor.acelerar()
>>> motor.velocidade
3
>>> motor.frear()
>>> motor.velocidade
1
>>> motor.f... | 22.15942 | 39 | 0.558535 |
4a1971561ec79f3a7d5ff2cb6f2a8748f9468d5a | 17,365 | py | Python | qcodes/instrument_drivers/AlazarTech/ATS9440.py | mizkulg/Qcodes | 28448e2ce60041d436958a66529317d355ee4a9d | [
"MIT"
] | null | null | null | qcodes/instrument_drivers/AlazarTech/ATS9440.py | mizkulg/Qcodes | 28448e2ce60041d436958a66529317d355ee4a9d | [
"MIT"
] | 73 | 2020-10-08T09:28:41.000Z | 2021-09-16T11:04:28.000Z | qcodes/instrument_drivers/AlazarTech/ATS9440.py | mizkulg/Qcodes | 28448e2ce60041d436958a66529317d355ee4a9d | [
"MIT"
] | null | null | null | from .ATS import AlazarTech_ATS
from .utils import TraceParameter
from qcodes.utils import validators
class AlazarTech_ATS9440(AlazarTech_ATS):
"""
This class is the driver for the ATS9440 board
it inherits from the ATS base class
"""
samples_divisor = 256
channels = 4
def __init__(self, ... | 50.043228 | 89 | 0.364008 |
4a1972100a9b8abc15ee298b37472c14ba649dac | 6,699 | py | Python | bindings/python/ensmallen_graph/datasets/string/nitrobacterwinogradskyi.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | bindings/python/ensmallen_graph/datasets/string/nitrobacterwinogradskyi.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | bindings/python/ensmallen_graph/datasets/string/nitrobacterwinogradskyi.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | """
This file offers the methods to automatically retrieve the graph Nitrobacter winogradskyi.
The graph is automatically retrieved from the STRING repository.
Report
---------------------
At the time of rendering these methods (please see datetime below), the graph
had the following characteristics:
Datetime: 20... | 35.444444 | 223 | 0.704284 |
4a19730e1e79089bb8673e0b22b5c67959bd9435 | 2,974 | py | Python | glance/tests/unit/base.py | cloudbau/glance | 616b097c052f5bf59b05326ed1d2d1ae1c703dc9 | [
"Apache-2.0"
] | 1 | 2018-05-03T03:52:39.000Z | 2018-05-03T03:52:39.000Z | glance/tests/unit/base.py | cloudbau/glance | 616b097c052f5bf59b05326ed1d2d1ae1c703dc9 | [
"Apache-2.0"
] | null | null | null | glance/tests/unit/base.py | cloudbau/glance | 616b097c052f5bf59b05326ed1d2d1ae1c703dc9 | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 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.apac... | 33.795455 | 78 | 0.666779 |
4a1973d34ed2552467fa429d40d5b02d46ba83c5 | 9,017 | py | Python | lib/helpers/theaudiodb.py | cartmandos/script.module.metadatautils | 536d935f91691d3b73861b7f5aa235bc182cdf07 | [
"Apache-2.0"
] | 1 | 2019-03-24T00:43:46.000Z | 2019-03-24T00:43:46.000Z | lib/helpers/theaudiodb.py | cartmandos/script.module.metadatautils | 536d935f91691d3b73861b7f5aa235bc182cdf07 | [
"Apache-2.0"
] | 1 | 2019-09-07T13:47:28.000Z | 2019-09-07T13:47:28.000Z | lib/helpers/theaudiodb.py | cartmandos/script.module.metadatautils | 536d935f91691d3b73861b7f5aa235bc182cdf07 | [
"Apache-2.0"
] | 5 | 2019-04-07T01:40:45.000Z | 2021-01-05T10:17:06.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
script.module.metadatautils
theaudiodb.py
Get metadata from theaudiodb
"""
from utils import get_json, strip_newlines, KODI_LANGUAGE, get_compare_string
from simplecache import use_cache
import xbmcvfs
class TheAudioDb(object):
"""get metadata from the a... | 53.35503 | 107 | 0.594433 |
4a197415b48bec360d540b8b3d1f721ce870b7bf | 4,395 | py | Python | moai/engine/lightning/test/tester.py | ai-in-motion/moai | e38cac046c059d2e2331ef4883bbabc5a500a5cf | [
"Apache-2.0"
] | 10 | 2021-04-02T11:21:33.000Z | 2022-01-18T18:32:32.000Z | moai/engine/lightning/test/tester.py | ai-in-motion/moai | e38cac046c059d2e2331ef4883bbabc5a500a5cf | [
"Apache-2.0"
] | 1 | 2022-03-22T20:10:55.000Z | 2022-03-24T13:11:02.000Z | moai/engine/lightning/test/tester.py | ai-in-motion/moai | e38cac046c059d2e2331ef4883bbabc5a500a5cf | [
"Apache-2.0"
] | 3 | 2021-05-16T20:47:40.000Z | 2021-12-01T21:15:36.000Z | import moai.checkpoint.lightning as mickpt
import moai.log.lightning as milog
import pytorch_lightning
import hydra.utils as hyu
import omegaconf.omegaconf
import typing
__all__ = ["LightningTester"]
class LightningTester(pytorch_lightning.Trainer):
def __init__(self,
logging: omegacon... | 43.514851 | 123 | 0.586348 |
4a1974b8d3c398edbb170c203d02cd75fd9d56b7 | 1,405 | py | Python | src/APIs/SpeechAPI.py | dinispeixoto/Kaydara | 5a22be3f9e931a00f3f3c9bcd1dbda8e1cce0b4d | [
"MIT"
] | null | null | null | src/APIs/SpeechAPI.py | dinispeixoto/Kaydara | 5a22be3f9e931a00f3f3c9bcd1dbda8e1cce0b4d | [
"MIT"
] | 3 | 2021-02-08T20:22:41.000Z | 2022-03-25T14:38:24.000Z | src/APIs/SpeechAPI.py | dinispeixoto/Kaydara | 5a22be3f9e931a00f3f3c9bcd1dbda8e1cce0b4d | [
"MIT"
] | null | null | null | from pydub import AudioSegment
import os, json, requests, urllib
# Environment variables on heroku
USERNAME = os.environ['SPEECH_USERNAME']
PASSWORD = os.environ['SPEECH_PASSWORD']
# send audio file and return the transcript
def send_audio(audio_url):
headers = {'Content-Type': 'audio/flac',}
params = {'m... | 31.931818 | 100 | 0.659786 |
4a1974d3c2258d2ac81762c5df24f08cb6446aa6 | 2,393 | py | Python | pakage/endreader.py | Cubestudio001/cEncrypter | 3514c692616ce02af0002dee36f6432f9d9023d2 | [
"Apache-2.0"
] | null | null | null | pakage/endreader.py | Cubestudio001/cEncrypter | 3514c692616ce02af0002dee36f6432f9d9023d2 | [
"Apache-2.0"
] | null | null | null | pakage/endreader.py | Cubestudio001/cEncrypter | 3514c692616ce02af0002dee36f6432f9d9023d2 | [
"Apache-2.0"
] | null | null | null | import getpass
def decode_string(index,ens="$infile:<red ascii>$.:dt$,:sq$/:lr$\:rl$;:ff$':sg$\":db",createfile=False):
'''
This function still requst you to verfiry the legitimacy of input value
But an illegal input won\'t lead a fatal error
index -> input
ens —> standard using
createfil... | 23.460784 | 106 | 0.475972 |
4a1975a713ac9f120da3d21b1240bd84da2327aa | 8,937 | py | Python | cptest.py | outofmbufs/imagetools | a4d35744f7e67a4b824026762b758257fb2d3994 | [
"MIT"
] | null | null | null | cptest.py | outofmbufs/imagetools | a4d35744f7e67a4b824026762b758257fb2d3994 | [
"MIT"
] | null | null | null | cptest.py | outofmbufs/imagetools | a4d35744f7e67a4b824026762b758257fb2d3994 | [
"MIT"
] | null | null | null | # tests for croppan
import json
import os
import tempfile
import unittest
from croppan import expand_pans, gen_panspecs, PanSpec
from contextlib import contextmanager
class TestMethods(unittest.TestCase):
NDN = 200 # number of dummy names.
DN = None # the actual dummy names
@classmethod
... | 35.324111 | 79 | 0.540897 |
4a1975b2b4071b40477bc9bfebd8b957c0f78fa6 | 18,000 | py | Python | test/functional/rpc_rawtransaction.py | JSKitty/dogecash | 99b07b15c396da2a8fa5852655bf193016ee270a | [
"MIT"
] | 1 | 2021-12-16T01:12:10.000Z | 2021-12-16T01:12:10.000Z | test/functional/rpc_rawtransaction.py | JSKitty/dogecash | 99b07b15c396da2a8fa5852655bf193016ee270a | [
"MIT"
] | null | null | null | test/functional/rpc_rawtransaction.py | JSKitty/dogecash | 99b07b15c396da2a8fa5852655bf193016ee270a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the rawtransaction RPCs.
Test the following RPCs:
- createrawtransaction
- signrawtransacti... | 51.873199 | 174 | 0.653 |
4a197644e6ae91fca7341bd3eb45b12b7ca04c9e | 8,879 | py | Python | retarded.py | velo223/Velo-s-Spam-Scripts | 286943dee2734b0a412602794026b91b210565bc | [
"CC0-1.0"
] | null | null | null | retarded.py | velo223/Velo-s-Spam-Scripts | 286943dee2734b0a412602794026b91b210565bc | [
"CC0-1.0"
] | null | null | null | retarded.py | velo223/Velo-s-Spam-Scripts | 286943dee2734b0a412602794026b91b210565bc | [
"CC0-1.0"
] | null | null | null |
# Copypastas by BACVelocifaptor#6969, he#9999 and u/GerardDG on Reddit. Script written by BACVelocifaptor#6969. If you kang, you big gei.
opt = {
"v":"""
I always knew humanity cannot be the only cognizant species in the galaxy. The fact that we are less than type 1 on the Kardashev scale always bothered... | 355.16 | 5,006 | 0.7636 |
4a1978bf25138ad6f72eab4fa7e482ecabc9c326 | 3,419 | py | Python | toontown/building/DistributedTrophyMgrAI.py | CrankySupertoon01/Toontown-2 | 60893d104528a8e7eb4aced5d0015f22e203466d | [
"MIT"
] | 1 | 2021-02-13T22:40:50.000Z | 2021-02-13T22:40:50.000Z | toontown/building/DistributedTrophyMgrAI.py | TrueBlueDogemon/Toontown | ebed7fc3f2ef06a529cf02eda7ab46361aceef9d | [
"MIT"
] | 1 | 2018-07-28T20:07:04.000Z | 2018-07-30T18:28:34.000Z | toontown/building/DistributedTrophyMgrAI.py | TrueBlueDogemon/Toontown | ebed7fc3f2ef06a529cf02eda7ab46361aceef9d | [
"MIT"
] | 2 | 2020-11-08T03:38:35.000Z | 2021-09-02T07:03:47.000Z | from direct.directnotify.DirectNotifyGlobal import *
from direct.distributed.DistributedObjectAI import DistributedObjectAI
MAX_LISTING = 10
AV_ID_INDEX = 0
NAME_INDEX = 1
SCORE_INDEX = 2
class DistributedTrophyMgrAI(DistributedObjectAI):
notify = directNotify.newCategory('DistributedTrophyMgrAI')
def __i... | 37.163043 | 80 | 0.632641 |
4a1978d263afd7a127c82febc6bff217f6447c5d | 849 | py | Python | naeval/ner/datasets/wikiner.py | sdspieg/naeval | 52c4a508bf212b95d4e610cfe1b5e23b8ca94d2f | [
"MIT"
] | 36 | 2020-03-22T09:37:10.000Z | 2022-01-17T14:49:30.000Z | naeval/ner/datasets/wikiner.py | sdspieg/naeval | 52c4a508bf212b95d4e610cfe1b5e23b8ca94d2f | [
"MIT"
] | 11 | 2020-03-25T09:39:45.000Z | 2020-08-16T05:37:02.000Z | naeval/ner/datasets/wikiner.py | sdspieg/naeval | 52c4a508bf212b95d4e610cfe1b5e23b8ca94d2f | [
"MIT"
] | 6 | 2020-05-16T05:52:04.000Z | 2022-01-16T06:45:29.000Z |
from corus import load_wikiner as load_wikiner_
from naeval.tokenizer import Token
from ..bio import bio_spans
from ..adapt import adapt_wikiner
from ..markup import Markup
class WikinerMarkup(Markup):
@property
def adapted(self):
return adapt_wikiner(self)
def chunk_tokens(chunks, sep=1):
st... | 21.225 | 47 | 0.669022 |
4a19792c39952b5f8ec395436a23056744ad007b | 5,481 | py | Python | spio/models/put_pages_page_id_components.py | bsneade/statuspageio-python | 30526a2984251885381e781b12b5070d46063537 | [
"Apache-2.0"
] | 2 | 2020-03-02T20:32:32.000Z | 2020-05-20T16:54:58.000Z | spio/models/put_pages_page_id_components.py | bsneade/statuspageio-python | 30526a2984251885381e781b12b5070d46063537 | [
"Apache-2.0"
] | null | null | null | spio/models/put_pages_page_id_components.py | bsneade/statuspageio-python | 30526a2984251885381e781b12b5070d46063537 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Statuspage API
# Code of Conduct Please don't abuse the API, and please report all feature requests and issues to https://help.statuspage.io/help/contact-us-30 # Rate Limiting Each API token is limited to 1 request / second as measured on a 60 second rolling window. To get this limit incr... | 45.297521 | 2,064 | 0.647874 |
4a19792fc90160824cb71ad52afbfd0ed876585e | 8,468 | py | Python | google/cloud/pubsub_v1/subscriber/_protocol/leaser.py | tmatsuo/python-pubsub | bfe37ddce4d421344068aa45454ee2176c1c06c8 | [
"Apache-2.0"
] | null | null | null | google/cloud/pubsub_v1/subscriber/_protocol/leaser.py | tmatsuo/python-pubsub | bfe37ddce4d421344068aa45454ee2176c1c06c8 | [
"Apache-2.0"
] | null | null | null | google/cloud/pubsub_v1/subscriber/_protocol/leaser.py | tmatsuo/python-pubsub | bfe37ddce4d421344068aa45454ee2176c1c06c8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017, Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 39.203704 | 88 | 0.602858 |
4a1979f443b7dd8b5614278b43b107112373d18f | 8,234 | py | Python | hypebeast/hypebeast/spiders/hypebeast_sneaker.py | suntian123/sneaker_crawler | accde7b5331abb1b6d5780a30ad74c7018bfbf71 | [
"MIT"
] | 4 | 2019-05-05T06:26:29.000Z | 2019-06-25T03:37:38.000Z | hypebeast/hypebeast/spiders/hypebeast_sneaker.py | suntian123/sneaker_crawler | accde7b5331abb1b6d5780a30ad74c7018bfbf71 | [
"MIT"
] | null | null | null | hypebeast/hypebeast/spiders/hypebeast_sneaker.py | suntian123/sneaker_crawler | accde7b5331abb1b6d5780a30ad74c7018bfbf71 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import scrapy
import os
from items import HypebeastItem
import datetime
import re
from sneakers import sneaker
class HypebeastSneakerSpider(scrapy.Spider):
name = 'hypebeast_sneaker'
page_crawled = 0
# allowed_domains = ['https://hypebeast.com/footwear']
start_urls = ['https://... | 39.397129 | 128 | 0.527083 |
4a197b78d70afc84d61a3ad46a0ee564bbeab103 | 5,227 | py | Python | template_profiler_panel/panels/template.py | Penagwin/django-debug-toolbar-template-profiler | d8a908a5c36c4d40dfeb975ff04e016da6cacc8e | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | template_profiler_panel/panels/template.py | Penagwin/django-debug-toolbar-template-profiler | d8a908a5c36c4d40dfeb975ff04e016da6cacc8e | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | template_profiler_panel/panels/template.py | Penagwin/django-debug-toolbar-template-profiler | d8a908a5c36c4d40dfeb975ff04e016da6cacc8e | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | import inspect
from collections import defaultdict
from time import time
import wrapt
from django.dispatch import Signal
from django.utils.translation import ugettext_lazy as _
from debug_toolbar.panels import Panel
from debug_toolbar.panels.sql.utils import contrasting_color_generator
template_rendered = Signal(pr... | 30.389535 | 148 | 0.598623 |
4a197b906b5597cf233ce958fc7fb56937a6dee3 | 101 | py | Python | examples/cors_per_route.py | izi-global/izir | d1a4bfb5c082c3de1956402ef0280564014a3bd8 | [
"MIT"
] | null | null | null | examples/cors_per_route.py | izi-global/izir | d1a4bfb5c082c3de1956402ef0280564014a3bd8 | [
"MIT"
] | 5 | 2021-03-18T21:01:05.000Z | 2022-03-11T23:29:48.000Z | examples/cors_per_route.py | izi-global/izir | d1a4bfb5c082c3de1956402ef0280564014a3bd8 | [
"MIT"
] | null | null | null | import izi
@izi.get()
def cors_supported(cors: izi.directives.cors="*"):
return "Hello world!"
| 14.428571 | 50 | 0.683168 |
4a197c5d5eb4a31d4a2e698d001a1ac85fb34bed | 7,944 | py | Python | src/practice_problem2.py | bednartc/Exam2Practice | 3856b9a899d8144a7356e225e161e5fb100ddb4a | [
"MIT"
] | null | null | null | src/practice_problem2.py | bednartc/Exam2Practice | 3856b9a899d8144a7356e225e161e5fb100ddb4a | [
"MIT"
] | null | null | null | src/practice_problem2.py | bednartc/Exam2Practice | 3856b9a899d8144a7356e225e161e5fb100ddb4a | [
"MIT"
] | null | null | null | """
PRACTICE Test 2, practice_problem 2.
Authors: David Mutchler, Dave Fisher, Valerie Galluzzi, Amanda Stouder,
their colleagues and Travis Bednarek.
""" # Done: 1. PUT YOUR NAME IN THE ABOVE LINE.
########################################################################
# Students:
#
# These problems have ... | 38.941176 | 72 | 0.482125 |
4a197d3f60d0e0063c636ba18cafb29af21167cd | 3,750 | py | Python | src/gen_data.py | Atharva-Gundawar/Not-So-Deep-Face | b4721078317ae67fa4f18e0a875329f90be2c112 | [
"MIT"
] | null | null | null | src/gen_data.py | Atharva-Gundawar/Not-So-Deep-Face | b4721078317ae67fa4f18e0a875329f90be2c112 | [
"MIT"
] | null | null | null | src/gen_data.py | Atharva-Gundawar/Not-So-Deep-Face | b4721078317ae67fa4f18e0a875329f90be2c112 | [
"MIT"
] | null | null | null | import os
import cv2
import dlib
import time
import argparse
import numpy as np
from imutils import video
DOWNSAMPLE_RATIO = 4
def reshape_for_polyline(array):
return np.array(array, np.int32).reshape((-1, 1, 2))
def main():
os.makedirs('original', exist_ok=True)
os.makedirs('landmarks', exist_ok=True)... | 38.265306 | 120 | 0.617333 |
4a197d50de68ef762da231759d8a463f76c24561 | 68 | py | Python | lightautoml/addons/interpretation/__init__.py | Zhurik/LightAutoML | 506d0602f40eca79ed0e5d58e7d4f71aeb1d8059 | [
"Apache-2.0"
] | null | null | null | lightautoml/addons/interpretation/__init__.py | Zhurik/LightAutoML | 506d0602f40eca79ed0e5d58e7d4f71aeb1d8059 | [
"Apache-2.0"
] | null | null | null | lightautoml/addons/interpretation/__init__.py | Zhurik/LightAutoML | 506d0602f40eca79ed0e5d58e7d4f71aeb1d8059 | [
"Apache-2.0"
] | 1 | 2021-12-08T13:52:45.000Z | 2021-12-08T13:52:45.000Z | from .lime import LimeTextExplainer
__all__ = ['LimeTextExplainer'] | 22.666667 | 35 | 0.808824 |
4a197da24bc1970966bf66e0c43b72ad5bfee80a | 2,032 | py | Python | Course_Material/MyCustomEnv.py | rshnn/Practical-RL | f7688e224a342c7f67478f2c4cd6bb7b1a122205 | [
"MIT"
] | 3 | 2022-02-14T17:59:56.000Z | 2022-02-15T10:08:43.000Z | Course_Material/MyCustomEnv.py | rshnn/Practical-RL | f7688e224a342c7f67478f2c4cd6bb7b1a122205 | [
"MIT"
] | 21 | 2021-11-02T21:35:26.000Z | 2022-01-17T18:50:42.000Z | Course_Material/MyCustomEnv.py | rshnn/Practical-RL | f7688e224a342c7f67478f2c4cd6bb7b1a122205 | [
"MIT"
] | 2 | 2021-11-24T15:25:17.000Z | 2022-02-14T19:04:56.000Z | import gym, gym.spaces, gym.utils, gym.utils.seeding
import numpy as np
class MyCustomEnvClass(gym.Env):
def __init__(self):
self.action_space = gym.spaces.box.Box(
low=np.array([-40.0, -40.0], dtype=np.float32),
high=np.array([40.0, 40.0], dtype=np.float32))
self.obse... | 36.285714 | 147 | 0.587598 |
4a197ec9a91261201d8b87a0986a3a8b0851ad07 | 42 | py | Python | dhlmex/version.py | cuenca-mx/dhlmex-python | 3b09e172e33c56023bf702a8bb2f2d9ccf15b758 | [
"MIT"
] | 1 | 2020-11-02T21:14:43.000Z | 2020-11-02T21:14:43.000Z | dhlmex/version.py | cuenca-mx/dhlmex-python | 3b09e172e33c56023bf702a8bb2f2d9ccf15b758 | [
"MIT"
] | 5 | 2020-01-15T10:54:41.000Z | 2021-02-26T04:11:28.000Z | dhlmex/version.py | cuenca-mx/dhlmex-python | 3b09e172e33c56023bf702a8bb2f2d9ccf15b758 | [
"MIT"
] | 1 | 2020-11-02T21:14:35.000Z | 2020-11-02T21:14:35.000Z | __version__ = '0.0.5' # pragma: no cover
| 21 | 41 | 0.642857 |
4a197f6d318d674dd81f1ad37bfd114d1bddf696 | 5,961 | py | Python | power_outage_notify/settings.py | MakingL/power_outage_notify | a1d18e5a2ca6fab32ef7cac241dac135aef06709 | [
"MIT"
] | 6 | 2019-10-24T09:22:27.000Z | 2020-12-11T02:12:35.000Z | power_outage_notify/settings.py | MakingL/power_outage_notify | a1d18e5a2ca6fab32ef7cac241dac135aef06709 | [
"MIT"
] | null | null | null | power_outage_notify/settings.py | MakingL/power_outage_notify | a1d18e5a2ca6fab32ef7cac241dac135aef06709 | [
"MIT"
] | null | null | null | """
Django settings for power_outage_notify project.
Generated by 'django-admin startproject' using Django 2.2.1.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
... | 27.985915 | 129 | 0.607784 |
4a197fec74450d9eab3e1711db2840fd62021959 | 240 | py | Python | example/simul_sort.py | jackd/numba-neighbors | 613fcc9be3a4050f23eb1fa319ea16b6848dc754 | [
"MIT"
] | 5 | 2020-04-07T08:11:13.000Z | 2022-03-01T21:43:27.000Z | example/simul_sort.py | jackd/numba-neighbors | 613fcc9be3a4050f23eb1fa319ea16b6848dc754 | [
"MIT"
] | 3 | 2020-06-14T22:13:51.000Z | 2021-09-08T01:33:01.000Z | example/simul_sort.py | jackd/numba-neighbors | 613fcc9be3a4050f23eb1fa319ea16b6848dc754 | [
"MIT"
] | 1 | 2020-06-14T19:50:05.000Z | 2020-06-14T19:50:05.000Z | import numpy as np
import sklearn.neighbors
k = 10
dist = np.random.uniform(size=(1, k,), high=100)
idx = np.random.uniform(size=(1, k,), high=1000).astype(np.int64)
sklearn.neighbors._kd_tree.simultaneous_sort(dist, idx)
print(dist[0])
| 21.818182 | 65 | 0.729167 |
4a19801a1f86a588fd8ac13655d3e91bf4f48fda | 4,444 | py | Python | tensorflow/python/keras/layers/preprocessing/benchmarks/index_lookup_adapt_benchmark.py | ashutom/tensorflow-upstream | c16069c19de9e286dd664abb78d0ea421e9f32d4 | [
"Apache-2.0"
] | 190,993 | 2015-11-09T13:17:30.000Z | 2022-03-31T23:05:27.000Z | tensorflow/python/keras/layers/preprocessing/benchmarks/index_lookup_adapt_benchmark.py | CaptainGizzy21/tensorflow | 3457a2b122e50b4d44ceaaed5a663d635e5c22df | [
"Apache-2.0"
] | 48,461 | 2015-11-09T14:21:11.000Z | 2022-03-31T23:17:33.000Z | tensorflow/python/keras/layers/preprocessing/benchmarks/index_lookup_adapt_benchmark.py | CaptainGizzy21/tensorflow | 3457a2b122e50b4d44ceaaed5a663d635e5c22df | [
"Apache-2.0"
] | 104,981 | 2015-11-09T13:40:17.000Z | 2022-03-31T19:51:54.000Z | # Copyright 2020 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... | 34.992126 | 80 | 0.683843 |
4a19802b9ef9bd05bfc1ce6736ee9d37052f9048 | 595 | py | Python | Physics250-ME27/magneticTorqueofCoilBnotIJK.py | illusion173/Physics250 | 69f2ffdb8af013e8b0739779861c1455b579ddaf | [
"MIT"
] | null | null | null | Physics250-ME27/magneticTorqueofCoilBnotIJK.py | illusion173/Physics250 | 69f2ffdb8af013e8b0739779861c1455b579ddaf | [
"MIT"
] | null | null | null | Physics250-ME27/magneticTorqueofCoilBnotIJK.py | illusion173/Physics250 | 69f2ffdb8af013e8b0739779861c1455b579ddaf | [
"MIT"
] | null | null | null | import numpy as np
import math
def initialtorque():
loops = input("Input number of Loops: ")
radius = input("Input Diameter (cm): ")
current = input("Input current (A): ")
magField = input("Input the magnetic field (T): ")
angle = input("Input the given angle: ")
radius = float(radius... | 33.055556 | 98 | 0.628571 |
4a19809a0e67738c7033110ed8c7a03bcddd7ffc | 939 | py | Python | src/204. Count Primes.py | xiaonanln/myleetcode-python | 95d282f21a257f937cd22ef20c3590a69919e307 | [
"Apache-2.0"
] | null | null | null | src/204. Count Primes.py | xiaonanln/myleetcode-python | 95d282f21a257f937cd22ef20c3590a69919e307 | [
"Apache-2.0"
] | null | null | null | src/204. Count Primes.py | xiaonanln/myleetcode-python | 95d282f21a257f937cd22ef20c3590a69919e307 | [
"Apache-2.0"
] | null | null | null | class SolutionMine(object):
def countPrimes(self, n):
"""
:type n: int
:rtype: int
"""
if n <= 2: return 0
A = [1] * n
numPrimes = 0
for p in xrange(2, n):
if not A[p]: continue
# p is prime! clear from p*2 to p*k ... where p*k <= n
numPrimes += 1
pp = p + p
while pp < n:
A[pp] = ... | 22.902439 | 72 | 0.554846 |
4a1981c6b8c4bf7c94469afaeaa354cc9bfe546b | 6,488 | py | Python | Reference/qpc/examples/workstation/dpp/qview/dpp1.py | Harveyhubbell/Paid-RTOS | e56a1346cce026428c2bfef05b6a4e6bb2ee7f4e | [
"MIT"
] | null | null | null | Reference/qpc/examples/workstation/dpp/qview/dpp1.py | Harveyhubbell/Paid-RTOS | e56a1346cce026428c2bfef05b6a4e6bb2ee7f4e | [
"MIT"
] | null | null | null | Reference/qpc/examples/workstation/dpp/qview/dpp1.py | Harveyhubbell/Paid-RTOS | e56a1346cce026428c2bfef05b6a4e6bb2ee7f4e | [
"MIT"
] | null | null | null | # This is an example of QView customization for a specific application
# (DPP in this case). This example animates the Phil images on the
# QView canvas. Additionally, there is a button in the middle of the screen,
# which, when clicked once pauses the DPP ("forks" are not being served).
# A second click on the button,... | 42.405229 | 78 | 0.625617 |
4a19821154f2b2bfbd7d439384a90c7b1a30bc70 | 3,008 | py | Python | snips_nlu/cli/dataset/assistant_dataset.py | ddorian/snips-nlu | 0934d386bb138ebb34764446416856cfac664e65 | [
"Apache-2.0"
] | 1 | 2021-01-03T09:23:55.000Z | 2021-01-03T09:23:55.000Z | snips_nlu/cli/dataset/assistant_dataset.py | ddorian/snips-nlu | 0934d386bb138ebb34764446416856cfac664e65 | [
"Apache-2.0"
] | null | null | null | snips_nlu/cli/dataset/assistant_dataset.py | ddorian/snips-nlu | 0934d386bb138ebb34764446416856cfac664e65 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
from __future__ import unicode_literals, print_function
from pathlib import Path
from snips_nlu.cli.dataset.entities import CustomEntity, create_entity
from snips_nlu.cli.dataset.intent_dataset import IntentDataset
class AssistantDataset(object):
"""Dataset of an assistant
Merges a list of :... | 39.578947 | 79 | 0.631316 |
4a198286d05e3e9e78ec0bbc376a0d05232a778b | 154 | py | Python | mysite/rainbowfood/apps.py | ChiaraDM/RainbowFood | d62bbd002b4aad7450ffde20a2787d424c18d2f7 | [
"Apache-2.0"
] | null | null | null | mysite/rainbowfood/apps.py | ChiaraDM/RainbowFood | d62bbd002b4aad7450ffde20a2787d424c18d2f7 | [
"Apache-2.0"
] | null | null | null | mysite/rainbowfood/apps.py | ChiaraDM/RainbowFood | d62bbd002b4aad7450ffde20a2787d424c18d2f7 | [
"Apache-2.0"
] | null | null | null | from django.apps import AppConfig
class RainbowfoodConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'rainbowfood'
| 22 | 56 | 0.772727 |
4a1982e3f5eb9d2a758adeed5e499a650df907ef | 645 | py | Python | profiles/util.py | Thames1990/BadBatBets | 8dffb69561668b8991bf4103919e4b254d4ca56a | [
"MIT"
] | null | null | null | profiles/util.py | Thames1990/BadBatBets | 8dffb69561668b8991bf4103919e4b254d4ca56a | [
"MIT"
] | null | null | null | profiles/util.py | Thames1990/BadBatBets | 8dffb69561668b8991bf4103919e4b254d4ca56a | [
"MIT"
] | null | null | null | from django.contrib.auth.models import User, AnonymousUser
def user_authenticated(user):
"""
Checks if a user is authenticated.
:param user: User to check
:return: True, if the useris verified and accepted general terms and conditions as well as the privacy policy;
False otherwise.
"""
if ... | 30.714286 | 114 | 0.669767 |
4a1983517eb0310f5573f6239de4fbec9f939069 | 30,275 | py | Python | xarray/core/accessor_str.py | DocOtak/xarray | 01a9baa01b1378cbf3f324ea3c27150a3860d3d1 | [
"Apache-2.0"
] | null | null | null | xarray/core/accessor_str.py | DocOtak/xarray | 01a9baa01b1378cbf3f324ea3c27150a3860d3d1 | [
"Apache-2.0"
] | null | null | null | xarray/core/accessor_str.py | DocOtak/xarray | 01a9baa01b1378cbf3f324ea3c27150a3860d3d1 | [
"Apache-2.0"
] | 2 | 2019-08-22T21:07:03.000Z | 2020-03-30T10:25:00.000Z | # The StringAccessor class defined below is an adaptation of the
# pandas string methods source code (see pd.core.strings)
# For reference, here is a copy of the pandas copyright notice:
# (c) 2011-2012, Lambda Foundry, Inc. and PyData Development Team
# All rights reserved.
# Copyright (c) 2008-2011 AQR Capital Man... | 31.602296 | 79 | 0.563567 |
4a1983a9a8eed5a495aca44167b7c2aeeea23f79 | 1,888 | py | Python | mlresearch/__init__.py | joaopfonseca/ml-research | a2a063e341010397bd13df812109f31ce05ac9f7 | [
"MIT"
] | 1 | 2021-12-13T09:27:06.000Z | 2021-12-13T09:27:06.000Z | mlresearch/__init__.py | joaopfonseca/research | ac4ad6fa05b5985050c63dc9e4e18cd00965e09b | [
"MIT"
] | 20 | 2021-12-10T11:54:59.000Z | 2022-03-18T17:55:33.000Z | mlresearch/__init__.py | joaopfonseca/research | ac4ad6fa05b5985050c63dc9e4e18cd00965e09b | [
"MIT"
] | null | null | null | """Toolbox to develop research in Machine Learning.
``research`` is a library containing the implementation of various algorithms developed
in Machine Learning research, as well as utilities to facilitate the formatting of pandas
dataframes into LaTeX tables.
Subpackages
-----------
active_learning
Module which c... | 33.714286 | 89 | 0.741525 |
4a19847884aa1621c530bdb1d2f39b0cf8ce4ee0 | 2,273 | py | Python | FNETR/src/evaluate.py | rajathpatel23/joint-kge-fnet-lm | 413371c96b2a7ffa734a47c03b631233b089d74b | [
"MIT"
] | 3 | 2021-03-16T22:56:55.000Z | 2022-02-12T20:09:37.000Z | FNETR/src/evaluate.py | rajathpatel23/joint-kge-fnet-lm | 413371c96b2a7ffa734a47c03b631233b089d74b | [
"MIT"
] | null | null | null | FNETR/src/evaluate.py | rajathpatel23/joint-kge-fnet-lm | 413371c96b2a7ffa734a47c03b631233b089d74b | [
"MIT"
] | null | null | null | import sys
def f1(p, r):
if r == 0.:
return 0.
return 2 * p * r / float(p + r)
def strict(true_and_prediction):
num_entities = len(true_and_prediction)
correct_num = 0.
for true_labels, predicted_labels in true_and_prediction:
correct_num += set(true_labels) == set(predicted_labe... | 34.969231 | 105 | 0.672239 |
4a1984917ab0022fa30f645dbf03d1ec43d19cca | 140,175 | py | Python | thwipper.py | spidey711/Thwipper-Bot | 9a847b5b519f5ad0112528ad72d0f1f877e01c58 | [
"MIT"
] | 2 | 2021-09-04T16:28:23.000Z | 2021-10-03T13:07:12.000Z | thwipper.py | spidey711/Thwipper-bot | 9a847b5b519f5ad0112528ad72d0f1f877e01c58 | [
"MIT"
] | null | null | null | thwipper.py | spidey711/Thwipper-bot | 9a847b5b519f5ad0112528ad72d0f1f877e01c58 | [
"MIT"
] | 3 | 2021-07-06T09:04:33.000Z | 2021-10-03T11:38:21.000Z | # IMPORTS
try:
import discord
from discord.utils import get
from discord.ext import commands, tasks
from links import *
from responses import *
from dotenv import load_dotenv
import mysql.connector as ms
import os
import random
import calendar
import pytz
import datetime
... | 39.75468 | 498 | 0.445821 |
4a198597472f76d3c5214d8878ae42793b43f57c | 33 | py | Python | optimus/engines/base/cudf/dataframe.py | ironmussa/Optimus | fbaea6e0957f0bc016280a85ff021904faac20c5 | [
"Apache-2.0"
] | 1,045 | 2017-07-17T17:59:46.000Z | 2021-06-15T07:06:48.000Z | optimus/engines/base/cudf/dataframe.py | ironmussa/Optimus | fbaea6e0957f0bc016280a85ff021904faac20c5 | [
"Apache-2.0"
] | 955 | 2017-07-14T15:47:58.000Z | 2021-05-27T14:16:24.000Z | optimus/engines/base/cudf/dataframe.py | ironmussa/Optimus | fbaea6e0957f0bc016280a85ff021904faac20c5 | [
"Apache-2.0"
] | 226 | 2017-08-04T20:41:33.000Z | 2021-05-21T08:28:33.000Z | class CUDFBaseDataFrame:
pass | 16.5 | 24 | 0.787879 |
4a1986395e0166494f27fce5b7d3e9f9fe3d84ac | 1,614 | py | Python | examples/dogpiling/dogpiling_tornado.py | mwek/memoize | bd35641d676dbaaf161a61dbf1176742cfa187cc | [
"Apache-2.0"
] | null | null | null | examples/dogpiling/dogpiling_tornado.py | mwek/memoize | bd35641d676dbaaf161a61dbf1176742cfa187cc | [
"Apache-2.0"
] | null | null | null | examples/dogpiling/dogpiling_tornado.py | mwek/memoize | bd35641d676dbaaf161a61dbf1176742cfa187cc | [
"Apache-2.0"
] | null | null | null | from datetime import timedelta
from tornado import gen
from tornado.ioloop import IOLoop
from memoize.configuration import MutableCacheConfiguration, DefaultInMemoryCacheConfiguration
from memoize.entrybuilder import ProvidedLifeSpanCacheEntryBuilder
from memoize.wrapper import memoize
# scenario configuration
concu... | 33.625 | 115 | 0.797398 |
4a19876848d73ec59fa1a20029b91ba0479ff606 | 5,548 | py | Python | test_settings.py | what-digital/aldryn-newsblog-blog-teaser-size | c52cb256fe3b608838f2184de9575b6cbbfd5f8e | [
"BSD-3-Clause"
] | null | null | null | test_settings.py | what-digital/aldryn-newsblog-blog-teaser-size | c52cb256fe3b608838f2184de9575b6cbbfd5f8e | [
"BSD-3-Clause"
] | null | null | null | test_settings.py | what-digital/aldryn-newsblog-blog-teaser-size | c52cb256fe3b608838f2184de9575b6cbbfd5f8e | [
"BSD-3-Clause"
] | 2 | 2019-10-22T04:30:28.000Z | 2019-10-22T05:09:16.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from distutils.version import LooseVersion
from django import get_version
from cms import __version__ as cms_string_version
import os
django_version = LooseVersion(get_version())
cms_version = LooseVersion(cms_string_version)
HELP... | 31.885057 | 79 | 0.553533 |
4a19877d272916b1371fc488f7f19a6471da2707 | 2,931 | py | Python | vortexasdk/endpoints/freight_pricing_result.py | V0RT3X4/python-sdk | 4cffae83b90a58a56f1a534057fa1ca1c8671e05 | [
"Apache-2.0"
] | 9 | 2019-11-13T17:14:55.000Z | 2019-11-18T16:06:13.000Z | vortexasdk/endpoints/freight_pricing_result.py | VorTECHsa/python-sdk | d85aabd8d9843e4d04d857360492bea002c2b24b | [
"Apache-2.0"
] | 114 | 2020-01-08T11:08:24.000Z | 2022-03-30T16:42:23.000Z | vortexasdk/endpoints/freight_pricing_result.py | V0RT3X4/python-sdk | 4cffae83b90a58a56f1a534057fa1ca1c8671e05 | [
"Apache-2.0"
] | 6 | 2020-05-28T00:09:02.000Z | 2022-03-14T03:52:44.000Z | import functools
import os
from multiprocessing.pool import Pool
from typing import List
from vortexasdk.api.freight_pricing import FreightPricing
from vortexasdk.api.vessel_availability import VesselAvailability
import pandas as pd
from vortexasdk.api.entity_flattening import convert_to_flat_dict
from vortexasdk.api... | 27.138889 | 111 | 0.604231 |
4a1987855408b3d3916be773268a6f7bba79260d | 543 | py | Python | product/models/saleForm.py | puchopsky/pythonPdv | 3a53212840c83f577be4b6a48774a4399e1bee04 | [
"MIT"
] | null | null | null | product/models/saleForm.py | puchopsky/pythonPdv | 3a53212840c83f577be4b6a48774a4399e1bee04 | [
"MIT"
] | null | null | null | product/models/saleForm.py | puchopsky/pythonPdv | 3a53212840c83f577be4b6a48774a4399e1bee04 | [
"MIT"
] | null | null | null | from django.db import models
import uuid
class SaleForm(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
# This field specifies wether the producto is sold by box, unit, hanlfbox, liters, etc
form = models.CharField(max_length=50, default='Unit')
# This fil... | 36.2 | 117 | 0.745856 |
4a19886be809c305925ec789021a2df520e7edc9 | 4,018 | py | Python | {{cookiecutter.project_slug}}/backend/app/manifest.py | beda-software/cookiecutter-beda-software-stack | f1f0aef4964d43d0720e45866420aa02b25626f8 | [
"MIT"
] | 2 | 2021-04-16T04:50:25.000Z | 2021-04-29T07:49:16.000Z | {{cookiecutter.project_slug}}/backend/app/manifest.py | beda-software/cookiecutter-beda-software-stack | f1f0aef4964d43d0720e45866420aa02b25626f8 | [
"MIT"
] | 5 | 2020-10-08T08:14:16.000Z | 2020-12-06T08:38:32.000Z | {{cookiecutter.project_slug}}/backend/app/manifest.py | beda-software/cookiecutter-beda-software-stack | f1f0aef4964d43d0720e45866420aa02b25626f8 | [
"MIT"
] | 1 | 2020-09-21T09:10:20.000Z | 2020-09-21T09:10:20.000Z | import os
from app import config
from app.access_policy import access_policies
from app.contrib.sdk_ext import (
merge_resources,
load_notification_templates,
load_resources,
load_sql_migrations,
)
meta_resources = merge_resources(
{
"Client": {
"SPA": {"secret": "123456", "gra... | 32.144 | 93 | 0.459681 |
4a1989930e62aada0c524f70a7bcac427a0973d9 | 4,828 | py | Python | ResultsStats/AddInfo2Grid.py | petebunting/DEA_Mangroves_2018 | 791cb5d92c4382a0780c04a3b38c028b35224154 | [
"MIT"
] | null | null | null | ResultsStats/AddInfo2Grid.py | petebunting/DEA_Mangroves_2018 | 791cb5d92c4382a0780c04a3b38c028b35224154 | [
"MIT"
] | null | null | null | ResultsStats/AddInfo2Grid.py | petebunting/DEA_Mangroves_2018 | 791cb5d92c4382a0780c04a3b38c028b35224154 | [
"MIT"
] | null | null | null | import pandas
import numpy
import os.path
import osgeo.gdal as gdal
import osgeo.ogr as ogr
def calcStats(data, gridID):
maxDiff = 0
maxDiffYear = 0
for i in range(data[gridID][['total']].index.shape[0]):
if i == 1:
maxDiff = abs(data[gridID][['total']].values[i][0] - data[gridID][['to... | 43.107143 | 169 | 0.719345 |
4a1989ba8e28e7e0599e645b21a661dbe91e1e2e | 1,104 | py | Python | modules/users/migrations/0001_initial.py | bobjiangps/automation_center | 970262fe30942e6a9fc236f1ca41f060d3eb9f9d | [
"MIT"
] | 8 | 2021-02-05T08:34:49.000Z | 2022-03-12T09:55:11.000Z | modules/users/migrations/0001_initial.py | bobjiangps/automation_center | 970262fe30942e6a9fc236f1ca41f060d3eb9f9d | [
"MIT"
] | null | null | null | modules/users/migrations/0001_initial.py | bobjiangps/automation_center | 970262fe30942e6a9fc236f1ca41f060d3eb9f9d | [
"MIT"
] | null | null | null | # Generated by Django 2.2.9 on 2020-08-14 10:25
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('auth... | 34.5 | 118 | 0.622283 |
4a1989c750d03924231e1abdd598ef113a3e20bc | 3,782 | py | Python | python_pubsub/apps/publish.py | kragen/mod_pubsub | 9abcdb07b02b7979bf4538ac8047783100ecb7bc | [
"BSD-3-Clause-Clear"
] | 1 | 2021-04-05T14:53:29.000Z | 2021-04-05T14:53:29.000Z | python_pubsub/apps/publish.py | kragen/mod_pubsub | 9abcdb07b02b7979bf4538ac8047783100ecb7bc | [
"BSD-3-Clause-Clear"
] | null | null | null | python_pubsub/apps/publish.py | kragen/mod_pubsub | 9abcdb07b02b7979bf4538ac8047783100ecb7bc | [
"BSD-3-Clause-Clear"
] | 1 | 2021-04-05T14:53:41.000Z | 2021-04-05T14:53:41.000Z | #!/usr/bin/python
"""
publish.py -- Command-line publish.
Arguments are server URL, topic, payload size, and expires.
Defaults are http://127.0.0.1:8000/kn , /what/chat , 1024, and +15.
Example of usage:
./publish.py http://127.0.0.1:8000/kn /what/test "1024*1024" +15
$Id: publish.py,... | 36.019048 | 81 | 0.640137 |
4a1989cfc74de2130e7c84df6b9a1a26795dd873 | 2,235 | py | Python | kedro_mlflow/mlflow/kedro_pipeline_model.py | akruszewski/kedro-mlflow | 330cab52642a0993e957740726e7d453282f1588 | [
"Apache-2.0"
] | null | null | null | kedro_mlflow/mlflow/kedro_pipeline_model.py | akruszewski/kedro-mlflow | 330cab52642a0993e957740726e7d453282f1588 | [
"Apache-2.0"
] | null | null | null | kedro_mlflow/mlflow/kedro_pipeline_model.py | akruszewski/kedro-mlflow | 330cab52642a0993e957740726e7d453282f1588 | [
"Apache-2.0"
] | null | null | null | from copy import deepcopy
from pathlib import Path
from kedro.io import DataCatalog, MemoryDataSet
from kedro.runner import SequentialRunner
from mlflow.pyfunc import PythonModel
from kedro_mlflow.pipeline.pipeline_ml import PipelineML
class KedroPipelineModel(PythonModel):
def __init__(self, pipeline_ml: Pipel... | 39.210526 | 215 | 0.6783 |
4a1989cfc8242cd22f370aaa1caf0c4cfa907a59 | 2,670 | py | Python | config/settings/local.py | SantiR38/trello-api | a3bbbf6ab07169511819d0d6c1eee11d5f474542 | [
"MIT"
] | null | null | null | config/settings/local.py | SantiR38/trello-api | a3bbbf6ab07169511819d0d6c1eee11d5f474542 | [
"MIT"
] | null | null | null | config/settings/local.py | SantiR38/trello-api | a3bbbf6ab07169511819d0d6c1eee11d5f474542 | [
"MIT"
] | null | null | null | from .base import * # noqa
from .base import env
# GENERAL
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#debug
DEBUG = True
# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
SECRET_KEY = env(
"DJANGO_SECRET_KEY... | 40.454545 | 97 | 0.583895 |
4a198a7613a0119b6728c22e0519b16f197e48c7 | 30,244 | py | Python | seshat/stock/models.py | XecusM/SESHAT | 34cf989e99e11f645339ce7190d92ff816062243 | [
"MIT"
] | null | null | null | seshat/stock/models.py | XecusM/SESHAT | 34cf989e99e11f645339ce7190d92ff816062243 | [
"MIT"
] | null | null | null | seshat/stock/models.py | XecusM/SESHAT | 34cf989e99e11f645339ce7190d92ff816062243 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth import get_user_model
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from django.dispatch import receiver
from django.db.models import Sum
from django.db.models import Q
from django.http import Http404
from django.core.vali... | 35.085847 | 118 | 0.444716 |
4a198b8fb59210446dac3d6420ce2dcc81b8f503 | 1,041 | py | Python | core/plugins/rabbitmq.py | aserdean/hotsos | a0f17a7ee2f08a4da0a269d478dec7ebb8f12493 | [
"Apache-2.0"
] | 12 | 2020-06-02T14:22:40.000Z | 2021-04-07T15:58:09.000Z | core/plugins/rabbitmq.py | aserdean/hotsos | a0f17a7ee2f08a4da0a269d478dec7ebb8f12493 | [
"Apache-2.0"
] | 72 | 2020-06-09T00:35:19.000Z | 2021-09-29T11:00:41.000Z | core/plugins/rabbitmq.py | aserdean/hotsos | a0f17a7ee2f08a4da0a269d478dec7ebb8f12493 | [
"Apache-2.0"
] | 43 | 2020-06-05T15:09:37.000Z | 2021-09-25T12:28:28.000Z | from core.ycheck.events import YEventCheckerBase
from core import (
checks,
plugintools,
)
RMQ_SERVICES_EXPRS = [
r"beam.smp",
r"epmd",
r"rabbitmq-server",
]
RMQ_PACKAGES = [
r"rabbitmq-server",
]
class RabbitMQBase(object):
pass
class RabbitMQChecksBase(RabbitMQBase, plugintools.Plugin... | 21.6875 | 78 | 0.666667 |
4a199020f2834b9ff173bd0fb96ff46050a1090c | 1,195 | py | Python | src/test/gen_rule_test.py | MerlinXYoung/typhoon-blade | b1605fac6a2f112f98e2fb8eb4df64c0b4bb5500 | [
"BSD-3-Clause"
] | 2 | 2019-11-11T04:03:42.000Z | 2019-11-11T04:03:47.000Z | src/test/gen_rule_test.py | MerlinXYoung/typhoon-blade | b1605fac6a2f112f98e2fb8eb4df64c0b4bb5500 | [
"BSD-3-Clause"
] | null | null | null | src/test/gen_rule_test.py | MerlinXYoung/typhoon-blade | b1605fac6a2f112f98e2fb8eb4df64c0b4bb5500 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2011 Tencent Inc.
# All rights reserved.
#
# Author: Michaelpeng <michaelpeng@tencent.com>
# Date: October 20, 2011
"""
This is the test module for cc_gen_rule target.
"""
import blade_test
class TestGenRule(blade_test.TargetTest):
"""Test gen_rule """
def setUp(self):
"""setup... | 27.159091 | 67 | 0.662762 |
4a19921608f2140d22f7399aa1c5a03921d8e610 | 15,732 | py | Python | influxdb_client/service/default_service.py | Onemind-Services-LLC/influxdb-client-python | c902f07acadc07234ee845256bfc60ebdd296d63 | [
"MIT"
] | null | null | null | influxdb_client/service/default_service.py | Onemind-Services-LLC/influxdb-client-python | c902f07acadc07234ee845256bfc60ebdd296d63 | [
"MIT"
] | null | null | null | influxdb_client/service/default_service.py | Onemind-Services-LLC/influxdb-client-python | c902f07acadc07234ee845256bfc60ebdd296d63 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Influx OSS API Service.
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: 2.0.0
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F401
# python... | 36.757009 | 120 | 0.614989 |
4a1993440effe78e0e557bdc132e949d9e81b842 | 821 | py | Python | helpers/erai/erai2icar.py | scrasmussen/icar | 88c59fed7595b176a81127993785fdeb514f28a3 | [
"MIT"
] | 61 | 2016-03-15T18:57:19.000Z | 2022-03-30T03:00:55.000Z | helpers/erai/erai2icar.py | scrasmussen/icar | 88c59fed7595b176a81127993785fdeb514f28a3 | [
"MIT"
] | 42 | 2016-03-17T16:10:59.000Z | 2022-03-23T19:57:09.000Z | helpers/erai/erai2icar.py | scrasmussen/icar | 88c59fed7595b176a81127993785fdeb514f28a3 | [
"MIT"
] | 50 | 2015-12-09T18:13:47.000Z | 2021-12-09T02:29:35.000Z | #!/usr/bin/env python
import os,traceback,sys
import config
import io_routines
import output
import convert
def main(info):
for i in range(info.ntimes):
raw_data=io_routines.load_data(info.times[i],info)
processed_data=convert.era2icar(raw_data)
output.write_file(info.times[i],info,pro... | 24.147059 | 60 | 0.62363 |
4a199383a246f7ec0b57c97f9f091af7e8870c2b | 2,096 | py | Python | cheritest/trunk/tests/mem/test_raw_ld.py | tupipa/beri | cef1b41d52592cfa7454ddf59f9f2994e447cd66 | [
"Apache-2.0"
] | 36 | 2015-05-29T16:47:19.000Z | 2022-02-08T21:16:26.000Z | cheritest/trunk/tests/mem/test_raw_ld.py | tupipa/beri | cef1b41d52592cfa7454ddf59f9f2994e447cd66 | [
"Apache-2.0"
] | 2 | 2020-06-02T13:44:55.000Z | 2020-06-02T14:06:29.000Z | cheritest/trunk/tests/mem/test_raw_ld.py | tupipa/beri | cef1b41d52592cfa7454ddf59f9f2994e447cd66 | [
"Apache-2.0"
] | 15 | 2015-06-11T07:10:58.000Z | 2021-06-18T05:14:54.000Z | #-
# Copyright (c) 2011 Steven J. Murdoch
# All rights reserved.
#
# This software was developed by SRI International and the University of
# Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237
# ("CTSRD"), as part of the DARPA CRASH research programme.
#
# @BERI_LICENSE_HEADER_START@
#
# Licensed ... | 41.098039 | 102 | 0.739504 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.