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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
797020fb3079e3dc07581e5a927dd9cb2d35c8ae | 845 | py | Python | multiml_htautau/task/keras/tau4vec_zero.py | UTokyo-ICEPP/multiml_htautau | 5f926c2291a55f57419aa0130d07e2a793fc7353 | [
"Apache-2.0"
] | null | null | null | multiml_htautau/task/keras/tau4vec_zero.py | UTokyo-ICEPP/multiml_htautau | 5f926c2291a55f57419aa0130d07e2a793fc7353 | [
"Apache-2.0"
] | null | null | null | multiml_htautau/task/keras/tau4vec_zero.py | UTokyo-ICEPP/multiml_htautau | 5f926c2291a55f57419aa0130d07e2a793fc7353 | [
"Apache-2.0"
] | null | null | null | from . import Tau4vec_BaseTask
class Tau4vec_ZeroTask(Tau4vec_BaseTask):
''' Tau4vec Zero task
'''
def __init__(self, **kwargs):
super().__init__(**kwargs)
self._trainable_model = False
def build_model(self):
from tensorflow.keras.models import Model
from tensorflow.k... | 29.137931 | 84 | 0.635503 |
7970218493ef0a5ce191be12230df26457ac0fe3 | 667 | py | Python | issues/20160928 issue 25 entity management/example1.py | jpsantos-mf/ezdxf | 2b542a551b2cfc3c0920a5dbf302ff58cea90fbd | [
"MIT"
] | 1 | 2021-06-05T09:15:15.000Z | 2021-06-05T09:15:15.000Z | issues/20160928 issue 25 entity management/example1.py | jpsantos-mf/ezdxf | 2b542a551b2cfc3c0920a5dbf302ff58cea90fbd | [
"MIT"
] | null | null | null | issues/20160928 issue 25 entity management/example1.py | jpsantos-mf/ezdxf | 2b542a551b2cfc3c0920a5dbf302ff58cea90fbd | [
"MIT"
] | null | null | null | import ezdxf
drawing = ezdxf.readfile("/home/harrison/0138_F.dxf")
modelspace = drawing.modelspace()
select_handles = set([])
delete_handles = set([])
queries = [
'INSERT[layer=="h-rack"]i',
'INSERT[layer=="h-laydown_area_p"]i',
'CIRCLE[layer=="h-text"]i',
]
for q in queries:
result = modelspace.que... | 22.233333 | 53 | 0.677661 |
79702475cca86ca22107d4b1824fda277dd83157 | 5,387 | py | Python | python/paddle/fluid/tests/unittests/test_parallel_executor_fetch_feed.py | JiayiFeng/Paddle | 19fd07178550ebd589a820d8fd1e9c543a31dc97 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/test_parallel_executor_fetch_feed.py | JiayiFeng/Paddle | 19fd07178550ebd589a820d8fd1e9c543a31dc97 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/test_parallel_executor_fetch_feed.py | JiayiFeng/Paddle | 19fd07178550ebd589a820d8fd1e9c543a31dc97 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2018-06-27T17:36:36.000Z | 2018-06-27T17:36:36.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 appli... | 37.409722 | 82 | 0.609059 |
797025687aab7bb050a6604e431b4a31db7ae3fa | 424 | py | Python | UnleashClient/constants.py | artiom/unleash-client-python | 2252c124f2feedba098220c9649f551b45563fc5 | [
"MIT"
] | null | null | null | UnleashClient/constants.py | artiom/unleash-client-python | 2252c124f2feedba098220c9649f551b45563fc5 | [
"MIT"
] | null | null | null | UnleashClient/constants.py | artiom/unleash-client-python | 2252c124f2feedba098220c9649f551b45563fc5 | [
"MIT"
] | null | null | null | # Library
SDK_NAME = "unleash-client-python"
SDK_VERSION = "4.2.0"
REQUEST_TIMEOUT = 30
METRIC_LAST_SENT_TIME = "mlst"
# =Unleash=
APPLICATION_HEADERS = {"Content-Type": "application/json"}
DISABLED_VARIATION = {
'name': 'disabled',
'enabled': False
}
# Paths
REGISTER_URL = "/client/register"
FEATURES_URL = "... | 20.190476 | 58 | 0.726415 |
79702647380d7f568053a54993085c3a302ca4a2 | 3,755 | py | Python | pyro/ops/integrator.py | ashishfarmer/pyro | 54d48627a7c5c0575c2fe69d5b6c80f3c47b287b | [
"Apache-2.0"
] | 2 | 2020-06-05T20:40:50.000Z | 2020-09-05T15:39:48.000Z | pyro/ops/integrator.py | Ezecc/pyro | 11a96cde05756def826c232d76f9cff66f6e6d4f | [
"Apache-2.0"
] | 1 | 2020-05-12T16:26:21.000Z | 2020-05-12T17:23:13.000Z | pyro/ops/integrator.py | Ezecc/pyro | 11a96cde05756def826c232d76f9cff66f6e6d4f | [
"Apache-2.0"
] | 1 | 2021-04-11T21:37:25.000Z | 2021-04-11T21:37:25.000Z | # Copyright (c) 2017-2019 Uber Technologies, Inc.
# SPDX-License-Identifier: Apache-2.0
from torch.autograd import grad
def velocity_verlet(z, r, potential_fn, kinetic_grad, step_size, num_steps=1, z_grads=None):
r"""
Second order symplectic integrator that uses the velocity verlet algorithm.
:param dic... | 42.670455 | 92 | 0.619174 |
7970269f6f6f95b0878085a0d93ef6e8693f88bc | 1,437 | py | Python | src/shop/migrations/0054_auto_20180415_1159.py | lgandersen/bornhack-website | fbda2b4b53dc2cb266d1d7c13ba0aad59d9079df | [
"BSD-3-Clause"
] | 7 | 2017-04-14T15:28:29.000Z | 2021-09-10T09:45:38.000Z | src/shop/migrations/0054_auto_20180415_1159.py | lgandersen/bornhack-website | fbda2b4b53dc2cb266d1d7c13ba0aad59d9079df | [
"BSD-3-Clause"
] | 799 | 2016-04-28T09:31:50.000Z | 2022-03-29T09:05:02.000Z | src/shop/migrations/0054_auto_20180415_1159.py | lgandersen/bornhack-website | fbda2b4b53dc2cb266d1d7c13ba0aad59d9079df | [
"BSD-3-Clause"
] | 35 | 2016-04-28T09:23:53.000Z | 2021-05-02T12:36:01.000Z | # Generated by Django 2.0.4 on 2018-04-15 16:59
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("shop", "0053_auto_20180318_0906")]
operations = [
migrations.AddField(
model_name="product",
nam... | 29.326531 | 110 | 0.521921 |
797028f978bb06681ed1bcdb6a5c2ebe611e0871 | 81 | py | Python | scraper/scraper/__init__.py | toolen/covid-leningrad-region | d50c8e26269c4876c1ff927b97bd25969d7924c4 | [
"MIT"
] | null | null | null | scraper/scraper/__init__.py | toolen/covid-leningrad-region | d50c8e26269c4876c1ff927b97bd25969d7924c4 | [
"MIT"
] | null | null | null | scraper/scraper/__init__.py | toolen/covid-leningrad-region | d50c8e26269c4876c1ff927b97bd25969d7924c4 | [
"MIT"
] | null | null | null | __version__ = "0.1.0"
__all__ = ["config", "constants", "db", "main", "parsers"]
| 27 | 58 | 0.604938 |
797029f0e8206c4bcbb4cf6d0245f7f669ae6fa1 | 2,288 | py | Python | tests/parquet_test/columnar_write.py | ratschlab/immunopepper | 1c10c10c721273535ac57cd466a18b685641f83b | [
"MIT"
] | null | null | null | tests/parquet_test/columnar_write.py | ratschlab/immunopepper | 1c10c10c721273535ac57cd466a18b685641f83b | [
"MIT"
] | 11 | 2020-01-20T08:37:22.000Z | 2022-03-29T20:27:50.000Z | tests/parquet_test/columnar_write.py | ratschlab/immunopepper | 1c10c10c721273535ac57cd466a18b685641f83b | [
"MIT"
] | null | null | null | import pandas as pd
import pyarrow as pa
from pyarrow import parquet as pq
import numpy as np
import os
outdir = '/Users/laurieprelot/Documents/Projects/tmp_kmer/parquet_test'
df = pd.DataFrame({"Day":{"0":1,"1":2,"2":3,"3":4,"4":5,"5":6,"6":7,"7":8},"Year":{"0":2018,"1":2018,"2":2018,"3":2018,"4":2018,"5":2018,"6":2... | 120.421053 | 803 | 0.67701 |
797029f1092813b81c22608f91a82f3cfa90ace4 | 788 | py | Python | src/buildout/environ/extension.py | collective/buildout.environ | 71af33bb324ab458b797eda77d059bdf4f340663 | [
"ZPL-2.1"
] | null | null | null | src/buildout/environ/extension.py | collective/buildout.environ | 71af33bb324ab458b797eda77d059bdf4f340663 | [
"ZPL-2.1"
] | null | null | null | src/buildout/environ/extension.py | collective/buildout.environ | 71af33bb324ab458b797eda77d059bdf4f340663 | [
"ZPL-2.1"
] | null | null | null | # -*- coding: utf-8 -*-
import logging
import os
logger = logging.getLogger("buildout.environ")
def install(buildout):
buildout["__environ__"] = {}
for key, value in os.environ.items():
value = os.path.expandvars(value)
buildout["__environ__"][key] = value.replace("$", "__dollar__")
missi... | 32.833333 | 87 | 0.602792 |
79702a04a141f1a3c8c0a577886a964eb6dd46c5 | 5,752 | py | Python | pisa/utils/random_numbers.py | torkjellsdatter/pisa | 7b26b0ac40c873a87786286acfd1c96abf724a99 | [
"Apache-2.0"
] | null | null | null | pisa/utils/random_numbers.py | torkjellsdatter/pisa | 7b26b0ac40c873a87786286acfd1c96abf724a99 | [
"Apache-2.0"
] | null | null | null | pisa/utils/random_numbers.py | torkjellsdatter/pisa | 7b26b0ac40c873a87786286acfd1c96abf724a99 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python
"""
Utilities to handle random numbers needed by PISA in a consistent and
reproducible manner.
"""
from __future__ import division
from collections import Sequence
import numpy as np
from pisa.utils.log import set_verbosity
__all__ = ['get_random_state',
'test_get_random_state... | 36.636943 | 80 | 0.623088 |
79702e48f3c61721c9ab3035fdcff49043f7bf73 | 5,568 | py | Python | nrgpy/cloud_api/auth.py | kyarazhan/nrgpy | 6a81af79ee4f666892d99a5f0713495bff89214b | [
"MIT"
] | null | null | null | nrgpy/cloud_api/auth.py | kyarazhan/nrgpy | 6a81af79ee4f666892d99a5f0713495bff89214b | [
"MIT"
] | null | null | null | nrgpy/cloud_api/auth.py | kyarazhan/nrgpy | 6a81af79ee4f666892d99a5f0713495bff89214b | [
"MIT"
] | null | null | null | try:
from nrgpy import logger
except ImportError:
pass
from nrgpy import token_file
import base64
from datetime import datetime, timedelta
import json
import pickle
import requests
url_base = 'https://cloud-api.nrgsystems.com/nrgcloudcustomerapi/'
token_url = url_base + 'token'
convert_url = url_b... | 35.692308 | 171 | 0.626976 |
79702e67c636bd35aedb3e4a0b4c719fc289253a | 158 | py | Python | world_map/bioma_types.py | davincif/Amila-RTS | ecdd63efc1bd595f92635e0ac13175a83287ee9c | [
"MIT"
] | null | null | null | world_map/bioma_types.py | davincif/Amila-RTS | ecdd63efc1bd595f92635e0ac13175a83287ee9c | [
"MIT"
] | null | null | null | world_map/bioma_types.py | davincif/Amila-RTS | ecdd63efc1bd595f92635e0ac13175a83287ee9c | [
"MIT"
] | null | null | null | from enum import Enum
class BiomaType():
HOT_DISERT = 1
COLD_DISERT = 2
HILLY = 3
PLAINS = 4
FLOREST = 5
SWAMPY = 6
ARID = 7
TUNDRA = 8
PRAIRIE = 9
| 12.153846 | 21 | 0.651899 |
79702f7b8d0279d9ad1df386ad2374aee11bd023 | 2,205 | py | Python | master_django/intensity/components/asset_storer__views.py | kripken/intensityengine | 9ae352b4f526ecb180004ae4968db7f64f140762 | [
"MIT"
] | 31 | 2015-01-18T20:27:31.000Z | 2021-07-03T03:58:47.000Z | master_django/intensity/components/asset_storer__views.py | JamesLinus/intensityengine | 9ae352b4f526ecb180004ae4968db7f64f140762 | [
"MIT"
] | 4 | 2015-07-05T21:09:37.000Z | 2019-09-06T14:34:59.000Z | master_django/intensity/components/asset_storer__views.py | JamesLinus/intensityengine | 9ae352b4f526ecb180004ae4968db7f64f140762 | [
"MIT"
] | 11 | 2015-02-03T19:24:10.000Z | 2019-09-20T10:59:50.000Z |
# Copyright 2010 Alon Zakai ('kripken'). All rights reserved.
# This file is part of Syntensity/the Intensity Engine, an open source project. See COPYING.txt for licensing.
from django.http import HttpResponse, HttpResponseRedirect
from django.views.generic.simple import direct_to_template
from django.contrib.auth.de... | 44.1 | 118 | 0.746485 |
797030492e4d916245fa866dbe5e6adc010bb7af | 1,004 | py | Python | src/utils/nav.py | igembitsgoa/wiki-template | 29cbb8ee2170ad7aca7fa001eaf2947d1542a89d | [
"MIT"
] | 4 | 2020-08-27T09:23:41.000Z | 2021-09-03T15:27:14.000Z | src/utils/nav.py | tamithia/igem-wiki-starter | 47f2f0eb74b8d6508a30867e3912fb2e4b270b34 | [
"MIT"
] | 8 | 2020-08-18T01:06:35.000Z | 2020-08-19T07:49:50.000Z | src/utils/nav.py | igembitsgoa/wiki-starter | 29cbb8ee2170ad7aca7fa001eaf2947d1542a89d | [
"MIT"
] | 5 | 2020-08-27T09:13:23.000Z | 2021-09-24T16:37:20.000Z | """
nav.py
"""
import yaml
def main():
with open('./src/nav.yml', 'r') as file:
nav = yaml.safe_load(file)
nav_json = []
for section in nav:
if isinstance(section, str):
nav_json.append(section)
continue
current = {}
current['section'] = li... | 20.916667 | 71 | 0.516932 |
79703134cca22e16e99860dce8d7c55181a0e5f3 | 9,286 | py | Python | qiskit/optimization/converters/integer_to_binary.py | MartenSkogh/qiskit-aqua | 4a997e6328e06e250212ef82c9414ad16834b7c6 | [
"Apache-2.0"
] | 1 | 2020-10-02T15:35:03.000Z | 2020-10-02T15:35:03.000Z | qiskit/optimization/converters/integer_to_binary.py | MartenSkogh/qiskit-aqua | 4a997e6328e06e250212ef82c9414ad16834b7c6 | [
"Apache-2.0"
] | null | null | null | qiskit/optimization/converters/integer_to_binary.py | MartenSkogh/qiskit-aqua | 4a997e6328e06e250212ef82c9414ad16834b7c6 | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | 39.514894 | 99 | 0.606935 |
797033107e08e892bc02c97ca95a831f1a947cd9 | 3,850 | py | Python | deploy/post/neutron.py | hashnfv/hashnfv-daisy | 01f25b9ed0f203eda46f1f49461efae9b17cab5b | [
"Apache-2.0"
] | null | null | null | deploy/post/neutron.py | hashnfv/hashnfv-daisy | 01f25b9ed0f203eda46f1f49461efae9b17cab5b | [
"Apache-2.0"
] | null | null | null | deploy/post/neutron.py | hashnfv/hashnfv-daisy | 01f25b9ed0f203eda46f1f49461efae9b17cab5b | [
"Apache-2.0"
] | null | null | null | ##############################################################################
# Copyright (c) 2017 ZTE Coreporation and others.
# feng.xiaowei@zte.com.cn
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this d... | 39.285714 | 106 | 0.596623 |
7970338b41ad1dba5c1c53db329634ef62f88042 | 405 | py | Python | school_backend/school_backend/asgi.py | zaebumbatt/manatal-django-test | c178de8718c6b58fbb5c6b819bfbe84a0dc3b207 | [
"MIT"
] | null | null | null | school_backend/school_backend/asgi.py | zaebumbatt/manatal-django-test | c178de8718c6b58fbb5c6b819bfbe84a0dc3b207 | [
"MIT"
] | null | null | null | school_backend/school_backend/asgi.py | zaebumbatt/manatal-django-test | c178de8718c6b58fbb5c6b819bfbe84a0dc3b207 | [
"MIT"
] | 1 | 2021-01-25T11:43:10.000Z | 2021-01-25T11:43:10.000Z | """
ASGI config for school_backend project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANG... | 23.823529 | 78 | 0.792593 |
7970348595c68976f4e1f4ef3ed00c4bc8e35e1d | 427 | py | Python | split_json.py | georgebastille/solr-perf-test | 8d77028eff438bf4f7ba34e48b1eb1efd7f7dd06 | [
"Apache-2.0"
] | null | null | null | split_json.py | georgebastille/solr-perf-test | 8d77028eff438bf4f7ba34e48b1eb1efd7f7dd06 | [
"Apache-2.0"
] | null | null | null | split_json.py | georgebastille/solr-perf-test | 8d77028eff438bf4f7ba34e48b1eb1efd7f7dd06 | [
"Apache-2.0"
] | null | null | null | import json
import ijson
from tqdm.auto import tqdm
keys = ["created_at", "title", "author", "objectID", "url"]
with open("./HNStoriesAll.json") as f:
with open("./HNStoriesSplit.jsonl", "w") as o:
objs = ijson.items(f, "item.hits.item")
for obj in tqdm(objs, total=1333789):
filtered ... | 28.466667 | 66 | 0.58548 |
79703594dd4247633d99e48ce50cb07b3325f40f | 1,811 | py | Python | examples/python/io/point_cloud_io.py | jeertmans/Open3D | 4b9f7dcff14ab5f7d662121ff6cdab60c07118de | [
"MIT"
] | 6 | 2019-02-09T13:33:57.000Z | 2019-11-27T07:13:51.000Z | examples/python/io/point_cloud_io.py | jeertmans/Open3D | 4b9f7dcff14ab5f7d662121ff6cdab60c07118de | [
"MIT"
] | null | null | null | examples/python/io/point_cloud_io.py | jeertmans/Open3D | 4b9f7dcff14ab5f7d662121ff6cdab60c07118de | [
"MIT"
] | 3 | 2019-01-21T13:05:06.000Z | 2020-01-05T09:41:55.000Z | # ----------------------------------------------------------------------------
# - Open3D: www.open3d.org -
# ----------------------------------------------------------------------------
# The MIT License (MIT)
#
# Copyright (c) 2018-2021 www.open3d.org
#
# Permission i... | 48.945946 | 80 | 0.637769 |
797036fa296eae4d03f5c7d3547fcb5e972f8ad2 | 332 | py | Python | __getPythonProfile.py | simdevex/01.Basics | cf4f372384e66f4b26e4887d2f5d815a1f8e929c | [
"MIT"
] | null | null | null | __getPythonProfile.py | simdevex/01.Basics | cf4f372384e66f4b26e4887d2f5d815a1f8e929c | [
"MIT"
] | null | null | null | __getPythonProfile.py | simdevex/01.Basics | cf4f372384e66f4b26e4887d2f5d815a1f8e929c | [
"MIT"
] | null | null | null | '''A Python program to determine profiling of Python programs
Note: A profi le is a set of statistics that describes how often
and for howlong various parts of the program executed.
These statistics can beformatted into reports via the pstats module.
'''
import cProfile
def sum():
print("Runnning..")
cProfile.r... | 27.666667 | 68 | 0.756024 |
797039307e8c2bde3342c069dbe9e5b8d5336887 | 365 | py | Python | src/test/tinc/tinctest/lib/test/test_base.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 46 | 2018-10-22T23:34:03.000Z | 2022-03-31T09:31:34.000Z | src/test/tinc/tinctest/lib/test/test_base.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 317 | 2018-10-05T23:51:48.000Z | 2022-03-22T17:38:52.000Z | src/test/tinc/tinctest/lib/test/test_base.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 46 | 2018-10-10T18:55:00.000Z | 2022-03-28T07:27:04.000Z | import os
from tinctest.lib import local_path
import unittest2 as unittest
class PathTestCase(unittest.TestCase):
def test_local_path(self):
filename = local_path('some_file_test_that_lives_in_my_current_working_directory')
assert filename == os.path.join(os.path.dirname(__file__), 'some_file_test_... | 40.555556 | 127 | 0.810959 |
797039abb15c14c97a6458932855c03e8848383f | 987 | py | Python | src/express-route-cross-connection/azext_expressroutecrossconnection/vendored_sdks/v2018_04_01/models/packet_capture_result_paged.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 207 | 2017-11-29T06:59:41.000Z | 2022-03-31T10:00:53.000Z | src/express-route-cross-connection/azext_expressroutecrossconnection/vendored_sdks/v2018_04_01/models/packet_capture_result_paged.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 4,061 | 2017-10-27T23:19:56.000Z | 2022-03-31T23:18:30.000Z | src/express-route-cross-connection/azext_expressroutecrossconnection/vendored_sdks/v2018_04_01/models/packet_capture_result_paged.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 802 | 2017-10-11T17:36:26.000Z | 2022-03-31T22:24:32.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 35.25 | 147 | 0.595745 |
79703a16e4f914f953a662641ac322d26d7388da | 3,171 | py | Python | children_math/gen.py | miwoow/ppt | 28b115445d63c15a04a13d9f80beec573e00af40 | [
"BSD-3-Clause"
] | 2 | 2020-05-13T08:09:57.000Z | 2020-08-27T18:49:35.000Z | children_math/gen.py | miwoow/ppt | 28b115445d63c15a04a13d9f80beec573e00af40 | [
"BSD-3-Clause"
] | null | null | null | children_math/gen.py | miwoow/ppt | 28b115445d63c15a04a13d9f80beec573e00af40 | [
"BSD-3-Clause"
] | null | null | null | #!/bin/env/python
#encoding:utf-8
from numpy import random
MAX_INT = 50
PATERN="%-13s"
def two_arg_problem():
sel = '+'
a = random.randint(1, MAX_INT-1)
if random.randint(0, 1) == 0:
sel = '+'
if a < 10:
b = random.randint(11-a, MAX_INT - a)
else:
b = ran... | 23.664179 | 52 | 0.499212 |
79703a78f2fb1f27050886b4bb7715fdbaffe7d0 | 3,928 | py | Python | examples/AIJ Case D/TKE_API.py | SimScaleGmbH/external-building-aerodynamics | 8ab6ce7bf7e0835d9b200c55461cd6966479f94a | [
"MIT"
] | null | null | null | examples/AIJ Case D/TKE_API.py | SimScaleGmbH/external-building-aerodynamics | 8ab6ce7bf7e0835d9b200c55461cd6966479f94a | [
"MIT"
] | null | null | null | examples/AIJ Case D/TKE_API.py | SimScaleGmbH/external-building-aerodynamics | 8ab6ce7bf7e0835d9b200c55461cd6966479f94a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Aug 2 19:34:28 2021
@author: MohamadKhairiDeiri
"""
import pathlib
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from scipy import stats
import simscale_eba.ResultProcessing as res
result = res.directional_result()
result... | 29.313433 | 111 | 0.695774 |
79703acaab008276b7bbce1e8f7be04c8892e088 | 1,640 | py | Python | DonorsChoose/donorschoose_baseline.py | rupakc/Kaggle-Compendium | 61634ba742f9a0239f2d1e45973c4bb477ac6306 | [
"MIT"
] | 17 | 2018-01-11T05:49:06.000Z | 2021-08-22T16:50:10.000Z | DonorsChoose/donorschoose_baseline.py | rupakc/Kaggle-Compendium | 61634ba742f9a0239f2d1e45973c4bb477ac6306 | [
"MIT"
] | null | null | null | DonorsChoose/donorschoose_baseline.py | rupakc/Kaggle-Compendium | 61634ba742f9a0239f2d1e45973c4bb477ac6306 | [
"MIT"
] | 8 | 2017-11-27T06:58:50.000Z | 2021-08-22T16:50:13.000Z | import pandas as pd
import hashfeatures
import preprocess
from sklearn.ensemble import RandomForestClassifier
from sklearn.svm import LinearSVC
from sklearn import metrics
from sklearn.model_selection import train_test_split
def get_classifiers():
rf = RandomForestClassifier(n_estimators=51, random_state=42)
... | 39.047619 | 107 | 0.803659 |
79703bbba2a8006247ca5f0ec4d63ad28f3b5e6e | 841 | py | Python | frappe/patches/v5_0/rename_table_fieldnames.py | AKedar21/frappe | 4c9ce1701caea07e595f81414af3a9f219cccb65 | [
"MIT"
] | 2 | 2017-08-24T20:25:13.000Z | 2017-10-15T13:14:31.000Z | frappe/patches/v5_0/rename_table_fieldnames.py | AKedar21/frappe | 4c9ce1701caea07e595f81414af3a9f219cccb65 | [
"MIT"
] | 89 | 2017-09-19T15:17:44.000Z | 2022-03-31T00:52:42.000Z | frappe/patches/v5_0/rename_table_fieldnames.py | AKedar21/frappe | 4c9ce1701caea07e595f81414af3a9f219cccb65 | [
"MIT"
] | 3 | 2019-08-09T17:52:18.000Z | 2020-07-29T08:23:46.000Z | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
import frappe
from frappe.model.utils.rename_field import rename_field
from frappe.modules import scrub, get_doctype_module
rename_map = {
"Customize Form": [
["customize_form_fields", "fi... | 28.033333 | 68 | 0.724138 |
79703bcb9dde2b9bad15498b371b93a4587402cf | 3,300 | py | Python | depth/apis/inference.py | zhyever/Monocular-Depth-Estimation-Toolbox | c591b9711321450387ffa7322ec1db9a340347c2 | [
"Apache-2.0"
] | 21 | 2022-03-12T01:42:05.000Z | 2022-03-31T17:01:45.000Z | depth/apis/inference.py | zhyever/Monocular-Depth-Estimation-Toolbox | c591b9711321450387ffa7322ec1db9a340347c2 | [
"Apache-2.0"
] | 2 | 2022-03-29T10:50:33.000Z | 2022-03-30T10:40:53.000Z | depth/apis/inference.py | zhyever/Monocular-Depth-Estimation-Toolbox | c591b9711321450387ffa7322ec1db9a340347c2 | [
"Apache-2.0"
] | 3 | 2022-03-26T11:52:44.000Z | 2022-03-30T21:24:16.000Z | # Copyright (c) OpenMMLab. All rights reserved.
import matplotlib.pyplot as plt
import mmcv
import torch
from mmcv.parallel import collate, scatter
from mmcv.runner import load_checkpoint
from depth.datasets.pipelines import Compose
from depth.models import build_depther
def init_depther(config, checkpoint=None, dev... | 32.673267 | 79 | 0.631515 |
79703c02d9c29c0531f1b53c54bcf696f3409e7a | 339 | py | Python | pytestqt/utils.py | k-dominik/pytest-qt | d15703fbcdfce4e74b79b2dff7f5a7e883ed2961 | [
"MIT"
] | 252 | 2015-03-15T23:18:27.000Z | 2022-03-29T01:41:41.000Z | pytestqt/utils.py | k-dominik/pytest-qt | d15703fbcdfce4e74b79b2dff7f5a7e883ed2961 | [
"MIT"
] | 318 | 2015-03-25T04:05:01.000Z | 2022-03-11T23:01:06.000Z | pytestqt/utils.py | k-dominik/pytest-qt | d15703fbcdfce4e74b79b2dff7f5a7e883ed2961 | [
"MIT"
] | 84 | 2015-03-17T20:10:50.000Z | 2022-03-04T15:25:25.000Z | def get_marker(item, name):
"""Get a marker from a pytest item.
This is here in order to stay compatible with pytest < 3.6 and not produce
any deprecation warnings with >= 3.6.
"""
try:
return item.get_closest_marker(name)
except AttributeError:
# pytest < 3.6
return ite... | 28.25 | 78 | 0.646018 |
79703c61fec877b773b8c3c7b9fa292c78e4a3a6 | 8,285 | py | Python | spark/code/python/cnn/alexnet.py | ADALabUCSD/vista | 3cf4486c3b06c93b7841da180ab46ad6e433cac8 | [
"Apache-2.0"
] | 1 | 2019-12-31T12:53:30.000Z | 2019-12-31T12:53:30.000Z | spark/code/python/cnn/alexnet.py | ADALabUCSD/vista | 3cf4486c3b06c93b7841da180ab46ad6e433cac8 | [
"Apache-2.0"
] | 3 | 2019-10-24T17:20:43.000Z | 2020-04-14T06:23:07.000Z | spark/code/python/cnn/alexnet.py | ADALabUCSD/vista | 3cf4486c3b06c93b7841da180ab46ad6e433cac8 | [
"Apache-2.0"
] | 2 | 2019-10-23T01:26:40.000Z | 2022-03-24T03:07:15.000Z | '''
Copyright 2018 Supun Nakandala and Arun Kumar
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writ... | 46.284916 | 119 | 0.563549 |
79703c6b9850d791102ffaf19995fa6a2fec2e3b | 3,493 | py | Python | test/test_articles_create_sol.py | agolibroda/PyTorWiki | 678a2ae13d0027c61af36e61b72e4e54493a29ac | [
"Apache-2.0"
] | null | null | null | test/test_articles_create_sol.py | agolibroda/PyTorWiki | 678a2ae13d0027c61af36e61b72e4e54493a29ac | [
"Apache-2.0"
] | null | null | null | test/test_articles_create_sol.py | agolibroda/PyTorWiki | 678a2ae13d0027c61af36e61b72e4e54493a29ac | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3.6
# -*- coding: utf-8 -*-
# test_articles_create_sol.py
# сохраним персональную статью.
import logging
logging.basicConfig(filename='test.log', level=logging.INFO)
FORMAT = '%(asctime)-15s %(clientip)s %(user)-8s %(message)s'
logging.basicConfig(format=FORMAT)
from datetime i... | 33.266667 | 288 | 0.661323 |
79703dd8cc1503d746b2abdfd99139520a81853a | 2,777 | py | Python | server/views/authentication.py | charlesjm13/assignment2 | 9443a63ccd4237e499271f1bba6ce4e027c58620 | [
"MIT"
] | null | null | null | server/views/authentication.py | charlesjm13/assignment2 | 9443a63ccd4237e499271f1bba6ce4e027c58620 | [
"MIT"
] | 13 | 2021-05-05T18:20:13.000Z | 2021-05-14T19:40:32.000Z | server/views/authentication.py | charlesjm13/assignment2 | 9443a63ccd4237e499271f1bba6ce4e027c58620 | [
"MIT"
] | 22 | 2021-03-30T15:27:57.000Z | 2021-04-07T17:28:03.000Z | import jwt
from flask import jsonify, request
from models import User
from schema import Schema, Regex
from werkzeug.security import generate_password_hash, check_password_hash
from app import app
MAIL_REGEX = r"(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)"
# GUIDE: requests to api endpoints, such as /api/sig... | 29.860215 | 104 | 0.611811 |
79703e06db3f243a8771615568cfc2f74ec24409 | 3,729 | py | Python | venv/lib/python3.6/site-packages/github/RateLimit.py | jannahuang/blog | e1d8cfa9d79ac06097a0e55531bba9421fcbf283 | [
"MIT"
] | 1 | 2021-10-14T16:13:12.000Z | 2021-10-14T16:13:12.000Z | venv/lib/python3.6/site-packages/github/RateLimit.py | jannahuang/blog | e1d8cfa9d79ac06097a0e55531bba9421fcbf283 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/github/RateLimit.py | jannahuang/blog | e1d8cfa9d79ac06097a0e55531bba9421fcbf283 | [
"MIT"
] | null | null | null | ############################ Copyrights and license ############################
# #
# Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2014 Vincent Jacques <vincent@vincent-jacques.net> ... | 44.927711 | 121 | 0.489676 |
79703e7be3caf8494c70f941a39aabb047290be7 | 242 | py | Python | puzzles/name_score/__init__.py | BrianLusina/PyCharm | 144dd4f6b2d254507237f46c8ee175c407fe053d | [
"Apache-2.0",
"MIT"
] | null | null | null | puzzles/name_score/__init__.py | BrianLusina/PyCharm | 144dd4f6b2d254507237f46c8ee175c407fe053d | [
"Apache-2.0",
"MIT"
] | null | null | null | puzzles/name_score/__init__.py | BrianLusina/PyCharm | 144dd4f6b2d254507237f46c8ee175c407fe053d | [
"Apache-2.0",
"MIT"
] | null | null | null | alpha = {"ABCDE": 1, "FGHIJ": 2, "KLMNO": 3, "PQRST": 4, "UVWXY": 5}
def name_score(name):
sc = 0
for x in alpha.keys():
for y in name:
if y.upper() in x:
sc += alpha.get(x)
return {name: sc}
| 22 | 68 | 0.471074 |
7970401ebae72c498514ab15a38afd298c4d6c3c | 10,048 | py | Python | 02_plotting/EFC processing and plots.py | pnorton-usgs/notebooks | 17a38ecd3f3c052b9bd785c2e53e16a9082d1e71 | [
"MIT"
] | null | null | null | 02_plotting/EFC processing and plots.py | pnorton-usgs/notebooks | 17a38ecd3f3c052b9bd785c2e53e16a9082d1e71 | [
"MIT"
] | null | null | null | 02_plotting/EFC processing and plots.py | pnorton-usgs/notebooks | 17a38ecd3f3c052b9bd785c2e53e16a9082d1e71 | [
"MIT"
] | null | null | null | # ---
# jupyter:
# jupytext:
# formats: ipynb,py:percent
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.13.7
# kernelspec:
# display_name: Python 2
# language: python
# name: python2
# ---
# %%
import prms_lib... | 29.209302 | 125 | 0.669586 |
797040b3e75190b0927e99c0980f904c37b99d11 | 392 | py | Python | tests/run.py | Starainrt/talebook | 0fa65da39b48fd84cfd56524b87b7156807f08b3 | [
"BSD-2-Clause"
] | 1 | 2022-03-23T06:35:13.000Z | 2022-03-23T06:35:13.000Z | tests/run.py | Whichbfj28/talebook | dabaa3f6638eddd10b0f06176ba648911892d7da | [
"BSD-2-Clause"
] | null | null | null | tests/run.py | Whichbfj28/talebook | dabaa3f6638eddd10b0f06176ba648911892d7da | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/python3
# -*- coding: UTF-8 -*-
import sys, os
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from tests.test_baike import *
from tests.test_douban import *
from tests.test_main import *
from tests.test_models import *
from tests.test_upload import *
from tests.test_ssl_crt i... | 23.058824 | 77 | 0.747449 |
797042b21bd012f6b00559da0cb3e5177c885241 | 1,531 | py | Python | ExpressionsArithmetic.py | panherz/MyPyCode | 0bb0dc18859a2f74abc71bcd79f977e15e6bfffe | [
"Apache-2.0"
] | null | null | null | ExpressionsArithmetic.py | panherz/MyPyCode | 0bb0dc18859a2f74abc71bcd79f977e15e6bfffe | [
"Apache-2.0"
] | null | null | null | ExpressionsArithmetic.py | panherz/MyPyCode | 0bb0dc18859a2f74abc71bcd79f977e15e6bfffe | [
"Apache-2.0"
] | null | null | null | # EXPRESSIONS & ARITHMETIC
# Arithmetic Operations
# +++++++++++++++++++++
# Common ones are ok + - / ete etc
# Others include //is used for integer division and the % is the modulus or remainder operator
# Another is += (same as x = x + 1) or -= (same as x = x - 1)
# Another short one would be x +=5 (adds or minus's ... | 37.341463 | 107 | 0.657087 |
7970437b176cdb7056ca83d0c98c6e3890caad1a | 802 | py | Python | tests/test_inutils.py | buteco/inutils | 67686bb244ef840e0f5ab8719256a74b11507d1e | [
"MIT"
] | 6 | 2020-05-19T00:01:11.000Z | 2020-05-20T01:22:24.000Z | tests/test_inutils.py | buteco/inutils | 67686bb244ef840e0f5ab8719256a74b11507d1e | [
"MIT"
] | null | null | null | tests/test_inutils.py | buteco/inutils | 67686bb244ef840e0f5ab8719256a74b11507d1e | [
"MIT"
] | null | null | null | import pytest
from inutils import chunkify
@pytest.mark.parametrize(
"iterable, expected",
(
([1], [[1]]),
([1, 2], [[1, 2]]),
([1, 2, 3], [[1, 2], [3]]),
([1, 2, 3, 4, 5], [[1, 2], [3, 4], [5]]),
(range(1, 7), [[1, 2], [3, 4], [5, 6]]),
),
)
def test_chunkify_size... | 25.0625 | 61 | 0.450125 |
79704476902b700a1dea5d26e17eb088c91e884f | 18,616 | py | Python | code/transformers/examples/language-modeling/run_language_modeling.py | lingo-mit/transformers | 478fb18a9f9680321f0d37dc999ea444e9287cc0 | [
"Apache-2.0"
] | null | null | null | code/transformers/examples/language-modeling/run_language_modeling.py | lingo-mit/transformers | 478fb18a9f9680321f0d37dc999ea444e9287cc0 | [
"Apache-2.0"
] | null | null | null | code/transformers/examples/language-modeling/run_language_modeling.py | lingo-mit/transformers | 478fb18a9f9680321f0d37dc999ea444e9287cc0 | [
"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... | 47.856041 | 153 | 0.70896 |
7970448c18bf066214f0a1ae866a4109e734a3eb | 2,925 | py | Python | tests/providers/oracle/transfers/test_oracle_to_oracle.py | holly-evans/airflow | 865406cbab4defd35c95afbf0a8d5987ff7788b1 | [
"Apache-2.0"
] | 3 | 2017-08-06T23:19:48.000Z | 2018-05-11T05:50:25.000Z | tests/providers/oracle/transfers/test_oracle_to_oracle.py | holly-evans/airflow | 865406cbab4defd35c95afbf0a8d5987ff7788b1 | [
"Apache-2.0"
] | 20 | 2016-11-21T22:54:28.000Z | 2018-10-28T20:03:13.000Z | tests/providers/oracle/transfers/test_oracle_to_oracle.py | holly-evans/airflow | 865406cbab4defd35c95afbf0a8d5987ff7788b1 | [
"Apache-2.0"
] | 3 | 2016-10-13T09:59:18.000Z | 2017-02-22T11:29:09.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 40.625 | 104 | 0.706325 |
797045265e27d4b61218e517f7aeea4e61c9fc80 | 222 | py | Python | setup.py | JeroenSwart/warmstart | 7c7bbb57ad01c53c8846b306098e562286149275 | [
"BSD-3-Clause"
] | null | null | null | setup.py | JeroenSwart/warmstart | 7c7bbb57ad01c53c8846b306098e562286149275 | [
"BSD-3-Clause"
] | 1 | 2019-10-08T09:23:04.000Z | 2019-10-08T09:23:04.000Z | setup.py | JeroenSwart/warmstart | 7c7bbb57ad01c53c8846b306098e562286149275 | [
"BSD-3-Clause"
] | 1 | 2019-10-03T17:10:29.000Z | 2019-10-03T17:10:29.000Z | from setuptools import find_packages, setup
setup(
name='src',
packages=find_packages(),
version='0.1.0',
description='AutoML for tree-based forecasting',
author='Jeroen Swart',
license='BSD-3',
)
| 20.181818 | 52 | 0.671171 |
7970457f930e01c62f0a42f7f0053590216fb85b | 785 | py | Python | src/liscopridge/server.py | liskin/liscopridge | c9d37689bad1b8c87a3b71d3bfc6248334e89191 | [
"MIT"
] | null | null | null | src/liscopridge/server.py | liskin/liscopridge | c9d37689bad1b8c87a3b71d3bfc6248334e89191 | [
"MIT"
] | 1 | 2021-04-13T14:40:28.000Z | 2021-04-13T14:41:10.000Z | src/liscopridge/server.py | liskin/liscopridge | c9d37689bad1b8c87a3b71d3bfc6248334e89191 | [
"MIT"
] | null | null | null | import logging
import click
from .app.root import app
def setup_logging(verbose: int) -> None:
level = (
logging.DEBUG if verbose >= 2 else
logging.INFO if verbose >= 1 else
logging.WARNING
)
logging.basicConfig(level=level)
@click.command()
@click.option('-v', '--verbose', cou... | 30.192308 | 88 | 0.675159 |
79704586f8da16bce661d2cf791ac9eafae758b0 | 5,920 | py | Python | sql/engines/pgsql.py | yetHandsome/Archery | 784b6459478a9adad3dab657ab6a005964975be9 | [
"Apache-2.0"
] | null | null | null | sql/engines/pgsql.py | yetHandsome/Archery | 784b6459478a9adad3dab657ab6a005964975be9 | [
"Apache-2.0"
] | null | null | null | sql/engines/pgsql.py | yetHandsome/Archery | 784b6459478a9adad3dab657ab6a005964975be9 | [
"Apache-2.0"
] | 1 | 2021-05-11T02:10:42.000Z | 2021-05-11T02:10:42.000Z | # -*- coding: UTF-8 -*-
"""
@author: hhyo、yyukai
@license: Apache Licence
@file: pgsql.py
@time: 2019/03/29
"""
import re
import psycopg2
import logging
import traceback
import sqlparse
from . import EngineBase
from .models import ResultSet
__author__ = 'hhyo、yyukai'
logger = logging.getLogger('default')
class ... | 32.173913 | 105 | 0.559628 |
797045937360980ebf42f1ca8fc45ebf6d9e93a1 | 24,538 | py | Python | zabbix_hadoop_nn.py | daququ/zabbix_hadoop_monitoring | 2b6d05d929ee8cdff92d074c733253e5bf87acd7 | [
"Unlicense"
] | 4 | 2017-10-16T06:21:03.000Z | 2020-01-08T03:37:36.000Z | zabbix_hadoop_nn.py | daququ/zabbix_hadoop_monitoring | 2b6d05d929ee8cdff92d074c733253e5bf87acd7 | [
"Unlicense"
] | null | null | null | zabbix_hadoop_nn.py | daququ/zabbix_hadoop_monitoring | 2b6d05d929ee8cdff92d074c733253e5bf87acd7 | [
"Unlicense"
] | 5 | 2018-03-13T02:57:29.000Z | 2022-01-28T06:53:08.000Z | __author__ = 'ahmed'
import json
import ast
import textwrap
import urllib
import logging
import time
import datetime
from xml.dom import minidom
from xml.etree import ElementTree
from xml.etree.ElementTree import Element
from xml.etree.ElementTree import SubElement
import argparse
import re
import zbxsend # This ... | 35.510854 | 124 | 0.614435 |
797045aa109b1b740d560dd994e2c2ca1a82ee02 | 118 | py | Python | .history/config_20210927032522.py | GraceOswal/pitch-perfect | d781c6e0f55c11f2a5e5dceb952f6b2de3c47c3b | [
"MIT"
] | null | null | null | .history/config_20210927032522.py | GraceOswal/pitch-perfect | d781c6e0f55c11f2a5e5dceb952f6b2de3c47c3b | [
"MIT"
] | null | null | null | .history/config_20210927032522.py | GraceOswal/pitch-perfect | d781c6e0f55c11f2a5e5dceb952f6b2de3c47c3b | [
"MIT"
] | null | null | null | import os
from dotenv import load_dotenv as ld
ld()
class Config:
debug = True
SECRET_KEY = os.environ.get
| 11.8 | 36 | 0.70339 |
797047924b6129b24dfc0ed91d83833f12c6f9c1 | 4,291 | py | Python | openspeech/models/joint_ctc_transformer/configurations.py | CanYouImagine/openspeech | 095d78828a9caed0151727897f35534231947846 | [
"Apache-2.0",
"MIT"
] | null | null | null | openspeech/models/joint_ctc_transformer/configurations.py | CanYouImagine/openspeech | 095d78828a9caed0151727897f35534231947846 | [
"Apache-2.0",
"MIT"
] | null | null | null | openspeech/models/joint_ctc_transformer/configurations.py | CanYouImagine/openspeech | 095d78828a9caed0151727897f35534231947846 | [
"Apache-2.0",
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2021 Soohwan Kim and Sangchun Ha and Soyoung Cho
#
# 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... | 44.697917 | 99 | 0.695875 |
797047e01bf60014fd893ca08c2ecaa63789fca7 | 4,618 | py | Python | support/deploy_updates.py | WildGenie/mul-updater-1 | a554a62b56752a25715702e592111f10d83228d1 | [
"CC0-1.0"
] | 1 | 2020-11-23T18:46:15.000Z | 2020-11-23T18:46:15.000Z | support/deploy_updates.py | WildGenie/mul-updater-1 | a554a62b56752a25715702e592111f10d83228d1 | [
"CC0-1.0"
] | null | null | null | support/deploy_updates.py | WildGenie/mul-updater-1 | a554a62b56752a25715702e592111f10d83228d1 | [
"CC0-1.0"
] | 1 | 2020-11-23T22:53:55.000Z | 2020-11-23T22:53:55.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# deploy.py
#
# This script archives and uploads updates to your web server.
# Put all files that you want to be uploaded to the same directory
# with this script
#
# Note: configure FTP settings in deploy.conf prior to running it
#
# by AnDenixa, Fall 2013
# Note... | 31.848276 | 157 | 0.536163 |
797049d1c7089679f1df21e2b01d88dba165f39d | 34,848 | py | Python | qiskit_metal/tests/test_analyses_2_functionality.py | SamarthH/qiskit-metal | 4a5a002b898429500913174c088564a787869b65 | [
"Apache-2.0"
] | null | null | null | qiskit_metal/tests/test_analyses_2_functionality.py | SamarthH/qiskit-metal | 4a5a002b898429500913174c088564a787869b65 | [
"Apache-2.0"
] | null | null | null | qiskit_metal/tests/test_analyses_2_functionality.py | SamarthH/qiskit-metal | 4a5a002b898429500913174c088564a787869b65 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... | 44.279543 | 80 | 0.544852 |
797049d7295bf57a6204a6c1ee4d9bf350654572 | 4,056 | py | Python | device/flash.py | mfkiwl/JMCUProgFast | b51afce9d8d846b2840c4d5f5afa8890016d6f0b | [
"MIT"
] | null | null | null | device/flash.py | mfkiwl/JMCUProgFast | b51afce9d8d846b2840c4d5f5afa8890016d6f0b | [
"MIT"
] | null | null | null | device/flash.py | mfkiwl/JMCUProgFast | b51afce9d8d846b2840c4d5f5afa8890016d6f0b | [
"MIT"
] | null | null | null | """
mbed CMSIS-DAP debugger
Copyright (c) 2006-2015 ARM Limited
"""
import os
import sys
import struct
# 用于计算扇区CRC的程序,可运行于Cortex-M处理器;此代码是可重定位的,只需要4字节便捷对齐
# 下面的可执行代码为200字节,执行还需要1024字节crc表,总共1224字节;内存中需要为crc运算总共保留0x600字节存储空间,每页需要4字节保存crc结果
analyzer = (
0x2180468c, 0x2600b5f0, 0x4f2c2501, 0x447f4c2c, ... | 40.158416 | 112 | 0.643245 |
797049ea107eeb612379ef73c37b7e35dbb666e0 | 1,424 | py | Python | CodesInBooks/ContourDetection/BoundingBox.py | ai-cv/rq | 032c41ed7c263456c1f1beccd2a4d5515400366e | [
"MIT"
] | null | null | null | CodesInBooks/ContourDetection/BoundingBox.py | ai-cv/rq | 032c41ed7c263456c1f1beccd2a4d5515400366e | [
"MIT"
] | null | null | null | CodesInBooks/ContourDetection/BoundingBox.py | ai-cv/rq | 032c41ed7c263456c1f1beccd2a4d5515400366e | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import imutils
img = cv2.pyrDown(cv2.imread("../data/imgs/hg.png", cv2.IMREAD_UNCHANGED))
ret, thresh = cv2.threshold(cv2.cvtColor(img.copy(), cv2.COLOR_BGR2GRAY), 127, 255, cv2.THRESH_BINARY)
# contours = cv2.findContours(thresh, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
image, contou... | 35.6 | 102 | 0.67486 |
79704a51ecf435c35bfa2adfcbeea21fb36d0af0 | 7,240 | py | Python | django_actual/helper.py | sipmann/django-actual | f97fef8b4182ba2fdaa3c5b67cbffd7b38f3d52a | [
"MIT"
] | null | null | null | django_actual/helper.py | sipmann/django-actual | f97fef8b4182ba2fdaa3c5b67cbffd7b38f3d52a | [
"MIT"
] | null | null | null | django_actual/helper.py | sipmann/django-actual | f97fef8b4182ba2fdaa3c5b67cbffd7b38f3d52a | [
"MIT"
] | null | null | null | "Some common routines that can be used throughout the code."
from __future__ import print_function, unicode_literals, with_statement, division
import hashlib
import os
import logging
import datetime
import threading
try:
import json
except ImportError:
from django.utils import simplejson as json
from django.u... | 31.072961 | 97 | 0.627072 |
79704aaf5531886c500336869ecf2adfbb08af51 | 1,836 | py | Python | examples/masterdetail/config.py | robelregassa/Flask-AppBuilder | 1aa6323a421d0477f7683c3b0d683e0664fb7de3 | [
"BSD-3-Clause"
] | null | null | null | examples/masterdetail/config.py | robelregassa/Flask-AppBuilder | 1aa6323a421d0477f7683c3b0d683e0664fb7de3 | [
"BSD-3-Clause"
] | null | null | null | examples/masterdetail/config.py | robelregassa/Flask-AppBuilder | 1aa6323a421d0477f7683c3b0d683e0664fb7de3 | [
"BSD-3-Clause"
] | 1 | 2019-01-13T21:57:57.000Z | 2019-01-13T21:57:57.000Z | import os
basedir = os.path.abspath(os.path.dirname(__file__))
CSRF_ENABLED = True
SECRET_KEY = '\2\1thisismyscretkey\1\2\e\y\y\h'
OPENID_PROVIDERS = [
{ 'name': 'Google', 'url': 'https://www.google.com/accounts/o8/id' },
{ 'name': 'Yahoo', 'url': 'https://me.yahoo.com' },
{ 'name': 'AOL', 'url': 'http://... | 33.381818 | 74 | 0.613834 |
79704abcf620a88cdb0eca87688fe3efd47d3116 | 625 | py | Python | scripts/wiki/check_wiki_corpus.py | staceybellerose/RandomWordGenerator | 8b9b38b50a2e3e4898a919f324e11b0aca19527e | [
"Apache-2.0"
] | 6 | 2018-10-22T18:00:57.000Z | 2021-09-07T09:18:17.000Z | scripts/wiki/check_wiki_corpus.py | staceybellerose/RandomWordGenerator | 8b9b38b50a2e3e4898a919f324e11b0aca19527e | [
"Apache-2.0"
] | 12 | 2018-09-28T19:14:09.000Z | 2020-10-01T16:57:38.000Z | scripts/wiki/check_wiki_corpus.py | staceybellerose/RandomWordGenerator | 8b9b38b50a2e3e4898a919f324e11b0aca19527e | [
"Apache-2.0"
] | null | null | null | """
Checks a corpus created from a Wikipedia dump file.
Inspired by:
https://www.kdnuggets.com/2017/11/building-wikipedia-text-corpus-nlp.html
"""
import time
import argparse
parser = argparse.ArgumentParser(prog='check_wiki_corpus', description='Checks a corpus created from a Wikipedia dump file.')
parser.add_argum... | 29.761905 | 125 | 0.7344 |
79704b87014ffc2fbbdb9ac11cd806975d5de0e9 | 395 | py | Python | django/djangovue/wsgi.py | jourdiw/vuejs-leaflet | 3065e8a48e1e70ad03bd92e978bf4078dfe4501d | [
"MIT"
] | 1 | 2020-12-02T21:58:20.000Z | 2020-12-02T21:58:20.000Z | djangovue/djangovue/wsgi.py | jeantardelli/django-vue | 0d871b47b253c0ec67a6d540dfd8804179c8cd83 | [
"MIT"
] | null | null | null | djangovue/djangovue/wsgi.py | jeantardelli/django-vue | 0d871b47b253c0ec67a6d540dfd8804179c8cd83 | [
"MIT"
] | null | null | null | """
WSGI config for djangovue project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SET... | 23.235294 | 78 | 0.787342 |
79704d93521a05326371c56e4e05fe3a2be2c6e5 | 23,723 | py | Python | stix_shifter_modules/splunk/tests/stix_translation/test_splunk_json_to_stix.py | pyromaneact/stix-shifter | 431c6f66513cd0db8e338a4e2952a40666bc294b | [
"Apache-2.0"
] | null | null | null | stix_shifter_modules/splunk/tests/stix_translation/test_splunk_json_to_stix.py | pyromaneact/stix-shifter | 431c6f66513cd0db8e338a4e2952a40666bc294b | [
"Apache-2.0"
] | 2 | 2021-02-01T13:43:54.000Z | 2021-02-02T20:51:06.000Z | stix_shifter_modules/splunk/tests/stix_translation/test_splunk_json_to_stix.py | pyromaneact/stix-shifter | 431c6f66513cd0db8e338a4e2952a40666bc294b | [
"Apache-2.0"
] | 4 | 2020-02-25T10:25:14.000Z | 2020-03-16T05:11:32.000Z | import logging
from stix_shifter_utils.stix_translation.src.json_to_stix import json_to_stix_translator
from stix_shifter.stix_translation import stix_translation
from stix_shifter_modules.splunk.entry_point import EntryPoint
from stix2validator import validate_instance
from stix_shifter_modules.splunk.stix_translation... | 48.315682 | 162 | 0.623656 |
79704e3441ccebc12c6b3b7eccc6b35233875e89 | 2,032 | py | Python | cave/analyzer/compare_default_incumbent.py | JuAbels/CAVE | 344cf9bf6d205cfe892780cd13c94e67a5e8549c | [
"BSD-3-Clause"
] | null | null | null | cave/analyzer/compare_default_incumbent.py | JuAbels/CAVE | 344cf9bf6d205cfe892780cd13c94e67a5e8549c | [
"BSD-3-Clause"
] | null | null | null | cave/analyzer/compare_default_incumbent.py | JuAbels/CAVE | 344cf9bf6d205cfe892780cd13c94e67a5e8549c | [
"BSD-3-Clause"
] | null | null | null | import os
import logging
from collections import OrderedDict
from pandas import DataFrame
import numpy as np
from cave.analyzer.base_analyzer import BaseAnalyzer
from cave.html.html_helpers import figure_to_html
class CompareDefaultIncumbent(BaseAnalyzer):
def __init__(self, default, incumbent):
""" Crea... | 36.945455 | 112 | 0.605807 |
79704f1e1cbf21569b963fa6b4b27e27f86a0cfd | 317 | py | Python | Demos/Module 1 - MVATrivia/runserver.py | GeekTrainer/PythonSqlFlask | 63a77d7b5fb8ac3ca3a9c9b5132e74f6d87af201 | [
"MIT"
] | 40 | 2015-03-04T17:10:54.000Z | 2021-11-20T17:47:16.000Z | Demos/Module 1 - MVATrivia/runserver.py | GeekTrainer/PythonSqlFlask | 63a77d7b5fb8ac3ca3a9c9b5132e74f6d87af201 | [
"MIT"
] | null | null | null | Demos/Module 1 - MVATrivia/runserver.py | GeekTrainer/PythonSqlFlask | 63a77d7b5fb8ac3ca3a9c9b5132e74f6d87af201 | [
"MIT"
] | 52 | 2015-03-05T14:33:11.000Z | 2021-06-10T15:28:05.000Z | #Load up the app from the package
from TriviaMVAApp import app;
# Launching our server
if __name__ == '__main__':
import os
HOST = os.environ.get('SERVER_HOST', 'localhost')
try:
PORT = int(os.environ.get('SERVER_PORT', '5555'))
except ValueError:
PORT = 5555
app.run(HOST, PORT)
| 24.384615 | 57 | 0.649842 |
79704f9888675e4722eeb4e416b2ea747dc448af | 10,564 | py | Python | updating.py | Megha-Bose/Plasma-Bank-MySQL-CLI | 9df6e189256ad3468cb87f3f564352e064452a56 | [
"MIT"
] | 1 | 2020-10-09T14:09:21.000Z | 2020-10-09T14:09:21.000Z | updating.py | Megha-Bose/Plasma-Bank-MySQL-CLI | 9df6e189256ad3468cb87f3f564352e064452a56 | [
"MIT"
] | null | null | null | updating.py | Megha-Bose/Plasma-Bank-MySQL-CLI | 9df6e189256ad3468cb87f3f564352e064452a56 | [
"MIT"
] | 1 | 2021-01-27T16:42:42.000Z | 2021-01-27T16:42:42.000Z | import placeOrder
from placeOrder import calcAge
def updateStaff(cur,con):
try:
value=0
row = {}
while(value==0):
row["sid"] = input("Enter Staff_id of staff whose details you wish to update: ")
que = "SELECT * FROM STAFF WHERE Staff_id LIKE '%s'" % (row["sid"])
value = cur.execute(que)
if valu... | 29.926346 | 184 | 0.591253 |
79704faf4411461f6eab631adf3baa08b4fb3aab | 1,096 | py | Python | pynd/guind.py | SkirOwen/pynd | 58a34e8040d4a61a6c42d1f66185f88d93f4a59f | [
"MIT"
] | null | null | null | pynd/guind.py | SkirOwen/pynd | 58a34e8040d4a61a6c42d1f66185f88d93f4a59f | [
"MIT"
] | null | null | null | pynd/guind.py | SkirOwen/pynd | 58a34e8040d4a61a6c42d1f66185f88d93f4a59f | [
"MIT"
] | null | null | null | from pynd.imports import *
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import (QWidget, QHBoxLayout, QFrame,
QSplitter, QApplication)
class Example(QWidget):
def __init__(self):
super().__init__()
self.initUI()
def initUI(self):
hbox = QHBoxLayou... | 21.076923 | 58 | 0.620438 |
79704fc10a7c667ccac2841b94b48f8e6b6a6d75 | 9,720 | py | Python | build/lib/annotation_utils/old/dataset/config/path.py | HienDT27/annotation_utils | 1f4e95f4cfa08de5bbab20f90a6a75fba66a69b9 | [
"MIT"
] | 13 | 2020-01-28T04:45:22.000Z | 2022-03-10T03:35:49.000Z | build/lib/annotation_utils/old/dataset/config/path.py | HienDT27/annotation_utils | 1f4e95f4cfa08de5bbab20f90a6a75fba66a69b9 | [
"MIT"
] | 4 | 2020-02-14T08:56:03.000Z | 2021-05-21T10:38:30.000Z | build/lib/annotation_utils/old/dataset/config/path.py | HienDT27/annotation_utils | 1f4e95f4cfa08de5bbab20f90a6a75fba66a69b9 | [
"MIT"
] | 7 | 2020-04-10T07:56:25.000Z | 2021-12-17T11:19:23.000Z | import yaml
import json
from logger import logger
from common_utils.check_utils import check_type_from_list, check_type, check_value_from_list, \
check_file_exists, check_value
from common_utils.path_utils import get_extension_from_path
class DatasetPathConfig:
def __init__(self):
self.data = None
... | 52.540541 | 144 | 0.642901 |
79704fc4d804b9b0ceee3adc66b782a1638627ab | 8,779 | py | Python | pytype/tests/test_flow.py | JelleZijlstra/pytype | 962a0ebc05bd24dea172381b2bedcc547ba53dd5 | [
"Apache-2.0"
] | 11 | 2017-02-12T12:19:50.000Z | 2022-03-06T08:56:48.000Z | pytype/tests/test_flow.py | JelleZijlstra/pytype | 962a0ebc05bd24dea172381b2bedcc547ba53dd5 | [
"Apache-2.0"
] | null | null | null | pytype/tests/test_flow.py | JelleZijlstra/pytype | 962a0ebc05bd24dea172381b2bedcc547ba53dd5 | [
"Apache-2.0"
] | 2 | 2017-06-27T14:41:57.000Z | 2021-12-05T11:27:33.000Z | """Tests for control flow (with statements, loops, exceptions, etc.)."""
from pytype.tests import test_inference
class FlowTest(test_inference.InferenceTest):
"""Tests for control flow.
These tests primarily test instruction ordering and CFG traversal of the
bytecode interpreter, i.e., their primary focus isn... | 26.847095 | 106 | 0.537874 |
79704fc755803dd4b52c19f9a5de2bc05306d651 | 2,634 | py | Python | sympy/solvers/tests/test_pde.py | pernici/sympy | 5e6e3b71da777f5b85b8ca2d16f33ed020cf8a41 | [
"BSD-3-Clause"
] | null | null | null | sympy/solvers/tests/test_pde.py | pernici/sympy | 5e6e3b71da777f5b85b8ca2d16f33ed020cf8a41 | [
"BSD-3-Clause"
] | null | null | null | sympy/solvers/tests/test_pde.py | pernici/sympy | 5e6e3b71da777f5b85b8ca2d16f33ed020cf8a41 | [
"BSD-3-Clause"
] | null | null | null | from sympy.solvers.pde import pde_separate_add, pde_separate_mul, _separate
from sympy import Eq, exp, Function, Symbol, symbols
from sympy import Derivative as D
from sympy.utilities.pytest import raises
def test_pde_separate_add():
x, y, z, t = symbols("x,y,z,t")
c = Symbol("C", Real=True)
F, T, X, Y, Z,... | 43.180328 | 79 | 0.504556 |
7970514a6d99bb9c7a3aac78b07ca719474d2cad | 419 | py | Python | data/scripts/templates/object/intangible/pet/shared_ev_9d9.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/intangible/pet/shared_ev_9d9.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/intangible/pet/shared_ev_9d9.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Intangible()
result.template = "object/intangible/pet/shared_ev_9d9.iff"
result.attribute_template_id = -1
resul... | 24.647059 | 60 | 0.708831 |
797051cfff713206797629b1cd92c0b9263c69a8 | 5,993 | py | Python | main/views.py | deekshant-w/e2e | 1459f19b859fa5f4253c82defe6b8d88d7bbcec4 | [
"MIT"
] | null | null | null | main/views.py | deekshant-w/e2e | 1459f19b859fa5f4253c82defe6b8d88d7bbcec4 | [
"MIT"
] | 3 | 2021-03-30T13:23:03.000Z | 2021-06-10T19:14:09.000Z | main/views.py | deekshant-w/e2e | 1459f19b859fa5f4253c82defe6b8d88d7bbcec4 | [
"MIT"
] | null | null | null | from django.shortcuts import render,HttpResponse
from django.views.decorators.csrf import csrf_exempt
from Crypto.Cipher import AES
from Crypto.Random import get_random_bytes
from json import loads,dumps
import requests
from .models import Message
from django.core.serializers.json import DjangoJSONEncoder
from datetime... | 28.004673 | 108 | 0.669281 |
7970533030a474dd48b8f0761e467a7a91c2aa3f | 7,220 | py | Python | cirq/__init__.py | davemc84/Cirq | 713e016d32be99efb0fd4d3e6dbe6d9ca8421271 | [
"Apache-2.0"
] | 2 | 2019-04-02T09:16:28.000Z | 2019-05-25T18:35:19.000Z | cirq/__init__.py | babbush/Cirq | 447b2c762cc2820dd28abb3bd2bc785d36bae39a | [
"Apache-2.0"
] | null | null | null | cirq/__init__.py | babbush/Cirq | 447b2c762cc2820dd28abb3bd2bc785d36bae39a | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The Cirq Developers
#
# 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 ... | 21.049563 | 74 | 0.728116 |
79705413d664e128eb25c19f1763023d6609d5fc | 5,357 | py | Python | examples/protocols/mqtt/ssl/mqtt_ssl_example_test.py | HubertXie/esp-idf | a7032feeaa2f5a600b8e0b37f80fd52538d22145 | [
"Apache-2.0"
] | 4 | 2022-03-15T22:43:28.000Z | 2022-03-28T01:25:08.000Z | examples/protocols/mqtt/ssl/mqtt_ssl_example_test.py | HubertXie/esp-idf | a7032feeaa2f5a600b8e0b37f80fd52538d22145 | [
"Apache-2.0"
] | null | null | null | examples/protocols/mqtt/ssl/mqtt_ssl_example_test.py | HubertXie/esp-idf | a7032feeaa2f5a600b8e0b37f80fd52538d22145 | [
"Apache-2.0"
] | 2 | 2022-02-04T21:36:58.000Z | 2022-02-09T12:22:48.000Z | from __future__ import print_function, unicode_literals
import os
import re
import ssl
import sys
from builtins import str
from threading import Event, Thread
import paho.mqtt.client as mqtt
import ttfw_idf
from tiny_test_fw import DUT
event_client_connected = Event()
event_stop_client = Event()
event_client_receive... | 40.278195 | 127 | 0.661378 |
797054202b50f2dea2c5e73a43c932e8be4a09a9 | 3,871 | py | Python | zwuenf/pysrec/SRecordFile.py | ngara/pysrec | f853cae4109db5d6a91c07e0de9e0b77320e6cd4 | [
"MIT"
] | 1 | 2021-07-03T01:26:26.000Z | 2021-07-03T01:26:26.000Z | zwuenf/pysrec/SRecordFile.py | ngara/pysrec | f853cae4109db5d6a91c07e0de9e0b77320e6cd4 | [
"MIT"
] | null | null | null | zwuenf/pysrec/SRecordFile.py | ngara/pysrec | f853cae4109db5d6a91c07e0de9e0b77320e6cd4 | [
"MIT"
] | null | null | null | import os
import binascii
__all__ = ('MOTType', 'SRecordFile')
from enum import Enum
from zwuenf.pysrec.SRecord import SRecordType, SRecord
from zwuenf.pysrec import *
class MOTType(Enum):
S19 = 0
S28 = 1
S37 = 2
UNKNOWN = 3
class SRecordFile:
"""Data structure for holding a S-Record file."""
... | 26.333333 | 107 | 0.542754 |
7970547100a22b6fee85a2947cecfa7ea1f1a0ea | 13,783 | py | Python | test/functional/p2p_unrequested_blocks.py | xcoincoder/qtep | ffa1ea157d41b1aa4faf01d0d5d54af326774003 | [
"MIT"
] | null | null | null | test/functional/p2p_unrequested_blocks.py | xcoincoder/qtep | ffa1ea157d41b1aa4faf01d0d5d54af326774003 | [
"MIT"
] | null | null | null | test/functional/p2p_unrequested_blocks.py | xcoincoder/qtep | ffa1ea157d41b1aa4faf01d0d5d54af326774003 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2019 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 processing of unrequested blocks.
Setup: two nodes, node0+node1, not connected to each other. Nod... | 45.042484 | 113 | 0.683306 |
7970559ca8f7d1474cad529f193238ec501e1446 | 1,712 | py | Python | azure-batch/azure/batch/models/task_add_collection_options.py | azuresdkci1x/azure-sdk-for-python-1722 | e08fa6606543ce0f35b93133dbb78490f8e6bcc9 | [
"MIT"
] | 2 | 2020-07-29T14:22:17.000Z | 2020-11-06T18:47:40.000Z | azure/batch/models/task_add_collection_options.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 1 | 2016-08-01T07:37:04.000Z | 2016-08-01T07:37:04.000Z | azure/batch/models/task_add_collection_options.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 1 | 2018-11-09T06:17:41.000Z | 2018-11-09T06:17:41.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 43.897436 | 106 | 0.683995 |
797056ce43fa5d9667f0b450386af8c01c208e04 | 1,572 | py | Python | Gaussian_NAive_bayes2.py | VIROBO-15/ML-algo-from-scratch | 58d08dce1499b2d2084102be0be7e2403611b1e6 | [
"MIT"
] | 1 | 2020-10-05T08:23:41.000Z | 2020-10-05T08:23:41.000Z | Gaussian_NAive_bayes2.py | VIROBO-15/ML-algo-from-scratch | 58d08dce1499b2d2084102be0be7e2403611b1e6 | [
"MIT"
] | null | null | null | Gaussian_NAive_bayes2.py | VIROBO-15/ML-algo-from-scratch | 58d08dce1499b2d2084102be0be7e2403611b1e6 | [
"MIT"
] | null | null | null | import numpy as np
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from math import pi
iris = load_iris()
x_train,x_test,y_train,y_test=train_test_split(iris.data,iris.target,train_size=120,random_state=1000)
#print(x_train)
clc= np.zeros((3,1))
lst1,lst2,lst3=[],[],[]
for... | 23.117647 | 115 | 0.576972 |
797056d5833356e6ec793a78cbf69dc068f41b77 | 10,612 | py | Python | cxplain/backend/model_builders/base_model_builder.py | sourcery-ai-bot/cxplain | ff3310c3042d70d4f857f824d9c2a096d1a03898 | [
"MIT"
] | null | null | null | cxplain/backend/model_builders/base_model_builder.py | sourcery-ai-bot/cxplain | ff3310c3042d70d4f857f824d9c2a096d1a03898 | [
"MIT"
] | null | null | null | cxplain/backend/model_builders/base_model_builder.py | sourcery-ai-bot/cxplain | ff3310c3042d70d4f857f824d9c2a096d1a03898 | [
"MIT"
] | null | null | null | """
Copyright (C) 2019 Patrick Schwab, ETH Zurich
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, merge, publish... | 53.59596 | 120 | 0.622126 |
79705859b61a3d9c46d2bf9e8d02305e4a7feb34 | 8,063 | py | Python | ovos_utils/intents/converse.py | NeonJarbas/ovos_utils | 6908517cbedb77ff9e1820035f8789c623378278 | [
"Apache-2.0"
] | 5 | 2020-10-12T07:54:27.000Z | 2021-11-08T07:19:25.000Z | ovos_utils/intents/converse.py | NeonJarbas/ovos_utils | 6908517cbedb77ff9e1820035f8789c623378278 | [
"Apache-2.0"
] | 44 | 2020-12-04T15:16:39.000Z | 2022-03-23T20:09:04.000Z | ovos_utils/intents/converse.py | NeonJarbas/ovos_utils | 6908517cbedb77ff9e1820035f8789c623378278 | [
"Apache-2.0"
] | 5 | 2020-12-20T23:23:45.000Z | 2022-02-08T03:13:19.000Z | import time
from ovos_utils.intents.intent_service_interface import IntentQueryApi
from ovos_utils.log import LOG
from ovos_utils.messagebus import Message
class ConverseTracker:
""" Using the messagebus this class recreates/keeps track of the state
of the converse system, it uses both passive listening and ... | 39.915842 | 77 | 0.621853 |
797058b4da9b4347c44d2d33c1d4c538eaaf5da8 | 10,484 | py | Python | tests/pubsub_commands_test.py | blueyed/aioredis | 4bc9463d120da5e0163df35dd3e6a083d2b2d09a | [
"MIT"
] | null | null | null | tests/pubsub_commands_test.py | blueyed/aioredis | 4bc9463d120da5e0163df35dd3e6a083d2b2d09a | [
"MIT"
] | null | null | null | tests/pubsub_commands_test.py | blueyed/aioredis | 4bc9463d120da5e0163df35dd3e6a083d2b2d09a | [
"MIT"
] | null | null | null | import asyncio
import pytest
import aioredis
async def _reader(channel, output, waiter, conn):
await conn.execute('subscribe', channel)
ch = conn.pubsub_channels[channel]
waiter.set_result(conn)
while await ch.wait_message():
msg = await ch.get()
await output.put(msg)
@pytest.mark.ru... | 28.723288 | 77 | 0.641263 |
79705967599935909d6cfc30887e04b24a5f53e7 | 6,290 | py | Python | snmp_query.py | equill/datadog-snmp | 101963a33cf96d6ec32c7ff3e0a274ed4c4942d5 | [
"Apache-2.0"
] | null | null | null | snmp_query.py | equill/datadog-snmp | 101963a33cf96d6ec32c7ff3e0a274ed4c4942d5 | [
"Apache-2.0"
] | 3 | 2017-06-11T15:52:05.000Z | 2017-08-17T14:59:20.000Z | snmp_query.py | equill/datadog-snmp | 101963a33cf96d6ec32c7ff3e0a274ed4c4942d5 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Query remote devices via SNMP
# and update the shared storage dict.
#
# Note that we're not on python3.6 yet,
# so shared substructures don't work.
# This is why the indices are crappy-looking composite strings.
# Copyright [2017] [James Fleming <james@electronic-quill.net]
#
# Licensed u... | 38.588957 | 92 | 0.606677 |
79705980270fe7878e97e41410a599531c4f7f47 | 24,907 | py | Python | packages/python/plotly/plotly/graph_objs/bar/marker/_line.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/graph_objs/bar/marker/_line.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/graph_objs/bar/marker/_line.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Line(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "bar.marker"
_path_str = "bar.marker.line"
_valid_props = {
"autocolorscale",
"... | 37.680787 | 87 | 0.570161 |
79705b76492b77f18e727d673bbdb1ec8509ce91 | 4,886 | py | Python | tests/fts_test.py | rtmigo/skifts_py | 6cb51c413ca327beb58136cfee79355051e94923 | [
"MIT"
] | null | null | null | tests/fts_test.py | rtmigo/skifts_py | 6cb51c413ca327beb58136cfee79355051e94923 | [
"MIT"
] | null | null | null | tests/fts_test.py | rtmigo/skifts_py | 6cb51c413ca327beb58136cfee79355051e94923 | [
"MIT"
] | null | null | null | # SPDX-FileCopyrightText: (c) 2022 Artёm IG <github.com/rtmigo>
# SPDX-License-Identifier: MIT
import re
import unittest
from typing import List
from skifts._fts import SkiFts
_mr_postman = """
"Please Mr. Postman" is a song written
by Georgia Dobbins, William Garrett,
Freddie Gorman, Brian Holland and ... | 27.144444 | 73 | 0.534384 |
79705c6bffcc0b53ae9ce275555be2c8519f6c28 | 1,067 | py | Python | data/projects/MyProject/Job_000002/analyze_mdout.py | paulsaxe/seamm_dashboard | 66049c8c58fd34af3bd143157d0138e8fb737f9b | [
"BSD-3-Clause"
] | 5 | 2020-04-17T16:34:13.000Z | 2021-12-09T17:24:01.000Z | data/projects/MyProject/Job_000002/analyze_mdout.py | paulsaxe/seamm_dashboard | 66049c8c58fd34af3bd143157d0138e8fb737f9b | [
"BSD-3-Clause"
] | 55 | 2020-02-26T20:47:52.000Z | 2022-03-12T14:22:10.000Z | data/projects/MyProject/Job_000002/analyze_mdout.py | paulsaxe/seamm_dashboard | 66049c8c58fd34af3bd143157d0138e8fb737f9b | [
"BSD-3-Clause"
] | 4 | 2019-10-15T18:34:14.000Z | 2022-01-04T20:50:43.000Z | import os
import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser("This script parses amber mdout files to extract the total energy. You can also use it to create plots.")
parser.add_argument("path", help="The filepath to the file(s) to be analyzed. To analyze multiple files, you can use t... | 30.485714 | 149 | 0.645736 |
79705cf3a745bb010a974df978e11ac8394c10f8 | 424 | py | Python | teamProject/serviceRepairBackEnd/migrations/0007_alter_cliente_image.py | EliFBaque/RepairService | 037779446fadb0e65cc0eae8e914e989d43641fe | [
"MIT"
] | 1 | 2022-03-10T07:46:17.000Z | 2022-03-10T07:46:17.000Z | teamProject/serviceRepairBackEnd/migrations/0007_alter_cliente_image.py | EliFBaque/RepairService | 037779446fadb0e65cc0eae8e914e989d43641fe | [
"MIT"
] | null | null | null | teamProject/serviceRepairBackEnd/migrations/0007_alter_cliente_image.py | EliFBaque/RepairService | 037779446fadb0e65cc0eae8e914e989d43641fe | [
"MIT"
] | null | null | null | # Generated by Django 3.2.9 on 2022-01-19 08:17
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('serviceRepairBackEnd', '0006_auto_20220119_0515'),
]
operations = [
migrations.AlterField(
model_name='cliente',
nam... | 22.315789 | 75 | 0.622642 |
79705d4fc8cb4cfb03bc299d722c8723fd7c417b | 791 | py | Python | test/terra/__init__.py | awcross1/qiskit-aer | 72863e804ec3d07c0da2ebeb665a31db7a7e3010 | [
"Apache-2.0"
] | null | null | null | test/terra/__init__.py | awcross1/qiskit-aer | 72863e804ec3d07c0da2ebeb665a31db7a7e3010 | [
"Apache-2.0"
] | null | null | null | test/terra/__init__.py | awcross1/qiskit-aer | 72863e804ec3d07c0da2ebeb665a31db7a7e3010 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
'''
Terra tests
'''
import os
def load_tests(loader, standard_tests, pattern):
"""
test suite for unittest discove... | 28.25 | 79 | 0.687737 |
79705daa91bf89e529347724ceb85f0198174d5f | 4,434 | py | Python | mlt/commands/config.py | tonyreina/mlt | ee490ebdeb5aa6924dbfc0a067a0653754c470f4 | [
"Apache-2.0"
] | 1 | 2021-11-29T10:35:20.000Z | 2021-11-29T10:35:20.000Z | mlt/commands/config.py | tonyreina/mlt | ee490ebdeb5aa6924dbfc0a067a0653754c470f4 | [
"Apache-2.0"
] | null | null | null | mlt/commands/config.py | tonyreina/mlt | ee490ebdeb5aa6924dbfc0a067a0653754c470f4 | [
"Apache-2.0"
] | 1 | 2020-02-22T01:04:15.000Z | 2020-02-22T01:04:15.000Z | #
# -*- coding: utf-8 -*-
#
# Copyright (c) 2018 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 37.576271 | 79 | 0.619305 |
79705ef1345a27ec3bc824397f4ea46c529fa1d7 | 132 | py | Python | backend/microservices/audio-generator/config/routes/headers.py | MuhamedAbdalla/Automatic-Audio-Book-Based-On-Emotion-Detection | 72130ad037b900461af5be6d80b27ab29c81de5e | [
"MIT"
] | 3 | 2021-04-26T00:17:14.000Z | 2021-07-04T15:30:09.000Z | backend/microservices/audio-generator/config/routes/headers.py | MuhamedAbdalla/Automatic-Audio-Book-Based-On-Emotion-Detection | 72130ad037b900461af5be6d80b27ab29c81de5e | [
"MIT"
] | null | null | null | backend/microservices/audio-generator/config/routes/headers.py | MuhamedAbdalla/Automatic-Audio-Book-Based-On-Emotion-Detection | 72130ad037b900461af5be6d80b27ab29c81de5e | [
"MIT"
] | null | null | null | RES_MESSAGE_KEY_NAME = 'message'
REQ_GOOGLE_TOKEN_KEY_NAME = 'googleTokens'
REQ_JSON_WEB_TOKEN_HEADER_NAME = 'Authorization'
| 22 | 49 | 0.810606 |
79705fb6d17c1968a1a0bdcd18f4280a80e740b7 | 3,956 | py | Python | jetavator/schema_registry/sqlalchemy_tables/ObjectDefinition.py | jetavator/jetavator | 6edc7b57532809f9903735c333544658631252b5 | [
"Apache-2.0"
] | null | null | null | jetavator/schema_registry/sqlalchemy_tables/ObjectDefinition.py | jetavator/jetavator | 6edc7b57532809f9903735c333544658631252b5 | [
"Apache-2.0"
] | 86 | 2020-04-11T18:03:32.000Z | 2021-06-15T14:48:45.000Z | jetavator/schema_registry/sqlalchemy_tables/ObjectDefinition.py | jetavator/jetavator | 6edc7b57532809f9903735c333544658631252b5 | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
from typing import Dict, Any
import json
import binascii
from datetime import datetime
from hashlib import sha1
from sqlalchemy import Column, ForeignKey
from sqlalchemy.orm import relationship
from sqlalchemy.types import *
from .Base import Base
from .Deployment import Deployme... | 27.859155 | 71 | 0.585187 |
79705ff8e3210f653ffd4e496779a887555e96b3 | 3,987 | py | Python | configs/top_down/resnext/coco/resnext152_coco_384x288.py | RuisongZhou/mmpose | a79c649ba07e8a9db24f1467826b9432c09134c6 | [
"Apache-2.0"
] | null | null | null | configs/top_down/resnext/coco/resnext152_coco_384x288.py | RuisongZhou/mmpose | a79c649ba07e8a9db24f1467826b9432c09134c6 | [
"Apache-2.0"
] | null | null | null | configs/top_down/resnext/coco/resnext152_coco_384x288.py | RuisongZhou/mmpose | a79c649ba07e8a9db24f1467826b9432c09134c6 | [
"Apache-2.0"
] | 1 | 2021-12-29T08:21:50.000Z | 2021-12-29T08:21:50.000Z | log_level = 'INFO'
load_from = None
resume_from = None
dist_params = dict(backend='nccl')
workflow = [('train', 1)]
checkpoint_config = dict(interval=10)
evaluation = dict(interval=5, metric='mAP')
optimizer = dict(
type='Adam',
lr=5e-4,
)
optimizer_config = dict(grad_clip=None)
# learning policy
lr_config = d... | 27.308219 | 79 | 0.625784 |
7970607a715b9c09a1069ed0471dbba26324db79 | 727 | py | Python | maddpg/OUNoise.py | hogansung/deep-reinforcement-learning | 5170ca42bdfdb16cc5c2b86c61bee304015a6254 | [
"MIT"
] | null | null | null | maddpg/OUNoise.py | hogansung/deep-reinforcement-learning | 5170ca42bdfdb16cc5c2b86c61bee304015a6254 | [
"MIT"
] | null | null | null | maddpg/OUNoise.py | hogansung/deep-reinforcement-learning | 5170ca42bdfdb16cc5c2b86c61bee304015a6254 | [
"MIT"
] | null | null | null | import numpy as np
import torch
# from https://github.com/songrotek/DDPG/blob/master/ou_noise.py
class OUNoise:
def __init__(self, action_dimension, scale=0.1, mu=0, theta=0.15, sigma=0.2):
self.action_dimension = action_dimension
self.scale = scale
self.mu = mu
self.theta = theta
... | 30.291667 | 81 | 0.621733 |
79706292ec2ad40c4973fb900b29c22b281b7833 | 3,521 | py | Python | GPy/inference/latent_function_inference/pep.py | ekalosak/GPy | ff82f12c3d321bfc3ce6615447fad25aea9de6bd | [
"BSD-3-Clause"
] | 1,685 | 2015-01-03T14:46:25.000Z | 2022-03-30T02:41:35.000Z | GPy/inference/latent_function_inference/pep.py | ekalosak/GPy | ff82f12c3d321bfc3ce6615447fad25aea9de6bd | [
"BSD-3-Clause"
] | 778 | 2015-01-15T18:21:25.000Z | 2022-03-30T14:52:32.000Z | GPy/inference/latent_function_inference/pep.py | ekalosak/GPy | ff82f12c3d321bfc3ce6615447fad25aea9de6bd | [
"BSD-3-Clause"
] | 584 | 2015-01-06T06:30:43.000Z | 2022-03-29T13:05:33.000Z | from .posterior import Posterior
from ...util.linalg import jitchol, tdot, dtrtrs, dtrtri, pdinv
from ...util import diag
import numpy as np
from . import LatentFunctionInference
log_2_pi = np.log(2*np.pi)
class PEP(LatentFunctionInference):
'''
Sparse Gaussian processes using Power-Expectation Propagation
... | 37.457447 | 129 | 0.600114 |
7970676333f9fe2e8a4f391afa9cc2a7cdffdea1 | 346 | py | Python | snakey_monitoring/alert_actions/discord_alert_action.py | samuel-flynn/snakey-monitoring | 838d2db831bce006f378ffbbb177954044f28f22 | [
"MIT"
] | null | null | null | snakey_monitoring/alert_actions/discord_alert_action.py | samuel-flynn/snakey-monitoring | 838d2db831bce006f378ffbbb177954044f28f22 | [
"MIT"
] | null | null | null | snakey_monitoring/alert_actions/discord_alert_action.py | samuel-flynn/snakey-monitoring | 838d2db831bce006f378ffbbb177954044f28f22 | [
"MIT"
] | null | null | null | import logging
class discord_alert_action:
def __init__(self, client, guild_name, channel_name):
self.client = client
self.guild_name = guild_name
self.channel_name = channel_name
async def execute(self, alert_message):
await self.client.send(self.guild_name, self.ch... | 28.833333 | 81 | 0.702312 |
797068a68f6b5b59d9433e16eb060eee31028607 | 2,944 | py | Python | Python/Standard/example.py | BlueFire25ita/domenico | 3a79e506ccd4b8d404887cb89bf01807411aa730 | [
"Unlicense"
] | null | null | null | Python/Standard/example.py | BlueFire25ita/domenico | 3a79e506ccd4b8d404887cb89bf01807411aa730 | [
"Unlicense"
] | null | null | null | Python/Standard/example.py | BlueFire25ita/domenico | 3a79e506ccd4b8d404887cb89bf01807411aa730 | [
"Unlicense"
] | null | null | null | import EzTG
def callback(bot, update):
# here's your bot
if 'message' in update:
# messages "handler"
message_id = update['message']['message_id'] # https://core.telegram.org/bots/api#message
user_id = update['message']['from']['id']
chat_id = update['message']['chat']['id']
... | 46.730159 | 171 | 0.590693 |
797068e49def61d30b803bb1a0c5c5aee4e3dfef | 25,830 | py | Python | silx/gui/plot/MaskToolsWidget.py | payno/silx | 13301e61627f98fa837008250ac74a0627a7a560 | [
"CC0-1.0",
"MIT"
] | 1 | 2016-10-26T11:05:46.000Z | 2016-10-26T11:05:46.000Z | silx/gui/plot/MaskToolsWidget.py | vallsv/silx | 834bfe9272af99096faa360e1ad96291bf46a2ac | [
"CC0-1.0",
"MIT"
] | 7 | 2016-10-19T09:27:26.000Z | 2020-01-24T13:26:56.000Z | silx/gui/plot/MaskToolsWidget.py | payno/silx | 13301e61627f98fa837008250ac74a0627a7a560 | [
"CC0-1.0",
"MIT"
] | null | null | null | # coding: utf-8
# /*##########################################################################
#
# Copyright (c) 2017-2018 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to d... | 38.783784 | 101 | 0.581069 |
79706a75885262750a300064cbfe29570785497a | 1,495 | py | Python | 2020/days/day23.py | terezaif/adventofcode | 67601f79a3b01d71434ef0236387ffd5ab7dca0f | [
"MIT"
] | 4 | 2020-12-06T13:11:59.000Z | 2021-12-15T11:34:34.000Z | 2020/days/day23.py | terezaif/adventofcode | 67601f79a3b01d71434ef0236387ffd5ab7dca0f | [
"MIT"
] | null | null | null | 2020/days/day23.py | terezaif/adventofcode | 67601f79a3b01d71434ef0236387ffd5ab7dca0f | [
"MIT"
] | 1 | 2021-12-02T16:32:50.000Z | 2021-12-02T16:32:50.000Z | from tqdm import tqdm
def parse_input(input):
circle = [int(c) - 1 for c in input[0]]
sc = sorted(circle, reverse=True)
return circle, sc
def parse_input_2(input, max: int = 1000000):
circle = [int(c) - 1 for c in input[0]]
rest = [i for i in range(9, max)]
circle = circle + rest
sc = so... | 25.775862 | 87 | 0.565886 |
79706ad3b6b1802eb66cdd1518e9d9d96ca932a6 | 1,678 | py | Python | main.py | Icasso/streamlit-fyp | 77e345f59f88da91c6b5a39a8a2c4b5395b977b6 | [
"MIT"
] | null | null | null | main.py | Icasso/streamlit-fyp | 77e345f59f88da91c6b5a39a8a2c4b5395b977b6 | [
"MIT"
] | null | null | null | main.py | Icasso/streamlit-fyp | 77e345f59f88da91c6b5a39a8a2c4b5395b977b6 | [
"MIT"
] | null | null | null | import streamlit as st
import evaluation_measure
import exploratory_data_analysis
import reddit_community_distribution
import reddit_corpus
import sentiment_analysis
import sentiment_analysis_2
import trending_stocks_of_the_day
PAGES = {
"Reddit Community Distribution": reddit_community_distribution,
"Reddit ... | 31.660377 | 122 | 0.693683 |
79706b6df1b4f89c461780b3d735f2c0d9f43c12 | 646 | py | Python | Assignment1/direct_pub.py | roblee357/CS6381_DistributedSystems | 76ff2a5965083092a564e153fb0454c5f12b3120 | [
"MIT"
] | null | null | null | Assignment1/direct_pub.py | roblee357/CS6381_DistributedSystems | 76ff2a5965083092a564e153fb0454c5f12b3120 | [
"MIT"
] | null | null | null | Assignment1/direct_pub.py | roblee357/CS6381_DistributedSystems | 76ff2a5965083092a564e153fb0454c5f12b3120 | [
"MIT"
] | null | null | null | import zmq
from random import randrange
print("Current libzmq version is %s" % zmq.zmq_version())
print("Current pyzmq version is %s" % zmq.__version__)
context = zmq.Context()
# The difference here is that this is a publisher and its aim in life is
# to just publish some value. The binding is as before.
socket = c... | 29.363636 | 72 | 0.712074 |
79706bbf16756048ed41d711ea5a6dc2428890ed | 913 | py | Python | src/procedures/migrations/0008_auto_20191206_0633.py | EpicKiwi/nuit-info-2019 | 80b8c9e33653bf703362dfc60e7a252610a5d6f1 | [
"MIT"
] | null | null | null | src/procedures/migrations/0008_auto_20191206_0633.py | EpicKiwi/nuit-info-2019 | 80b8c9e33653bf703362dfc60e7a252610a5d6f1 | [
"MIT"
] | null | null | null | src/procedures/migrations/0008_auto_20191206_0633.py | EpicKiwi/nuit-info-2019 | 80b8c9e33653bf703362dfc60e7a252610a5d6f1 | [
"MIT"
] | null | null | null | # Generated by Django 3.0 on 2019-12-06 05:33
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('procedures', '0007_article_slug'),
]
operations = [
migrations.AlterField(
model_name='article',
... | 30.433333 | 135 | 0.622125 |
79706bcd0d1bed41d8b5187a443fa7185728cf19 | 5,080 | py | Python | courses/data-engineering/demos/composer_gcf_trigger/dataflow/process_delimited.py | Glairly/introduction_to_tensorflow | aa0a44d9c428a6eb86d1f79d73f54c0861b6358d | [
"Apache-2.0"
] | 2 | 2022-01-06T11:52:57.000Z | 2022-01-09T01:53:56.000Z | courses/machine_learning/deepdive/10_recommend/composer_gcf_trigger/dataflow/process_delimited.py | Glairly/introduction_to_tensorflow | aa0a44d9c428a6eb86d1f79d73f54c0861b6358d | [
"Apache-2.0"
] | null | null | null | courses/machine_learning/deepdive/10_recommend/composer_gcf_trigger/dataflow/process_delimited.py | Glairly/introduction_to_tensorflow | aa0a44d9c428a6eb86d1f79d73f54c0861b6358d | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 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 w... | 41.983471 | 94 | 0.652953 |
79706c26762fba60134b52dcb53f59c8b58bcdb2 | 3,896 | py | Python | catalyst/contrib/models/segmentation/encoder/resnet.py | andrey-avdeev/catalyst | fd17aaba7775c99b7e2b1ce86e60aa8f2379acc3 | [
"Apache-2.0"
] | 1 | 2019-12-15T18:29:15.000Z | 2019-12-15T18:29:15.000Z | catalyst/contrib/models/segmentation/encoder/resnet.py | andrey-avdeev/catalyst | fd17aaba7775c99b7e2b1ce86e60aa8f2379acc3 | [
"Apache-2.0"
] | null | null | null | catalyst/contrib/models/segmentation/encoder/resnet.py | andrey-avdeev/catalyst | fd17aaba7775c99b7e2b1ce86e60aa8f2379acc3 | [
"Apache-2.0"
] | 1 | 2021-12-20T07:32:25.000Z | 2021-12-20T07:32:25.000Z | from typing import List, Union # isort:skip
from collections import OrderedDict
from pathlib import Path
import torch
import torch.nn as nn
import torchvision
from catalyst import utils
from .core import _take, EncoderSpec
RESNET_PARAMS = {
"resnet18": {
"channels": [64, 64, 128, 256, 512],
"str... | 32.198347 | 79 | 0.554928 |
79706c602491d54667b1527bde36539711865641 | 2,491 | py | Python | test/functional/rpc_getblockfilter.py | c-sports/CSPN | 44522f7ed5f9844adae2cdbd3d3b9688395f9f10 | [
"MIT"
] | 3 | 2020-06-23T17:15:04.000Z | 2021-05-03T03:37:42.000Z | test/functional/rpc_getblockfilter.py | c-sports/CSPN | 44522f7ed5f9844adae2cdbd3d3b9688395f9f10 | [
"MIT"
] | 2 | 2020-06-17T13:02:11.000Z | 2021-01-13T13:14:15.000Z | test/functional/rpc_getblockfilter.py | c-sports/CSPN | 44522f7ed5f9844adae2cdbd3d3b9688395f9f10 | [
"MIT"
] | 3 | 2020-06-18T17:01:10.000Z | 2022-02-02T00:07:56.000Z | #!/usr/bin/env python3
# Copyright (c) 2018 The Bitcoin Core developers
# Copyright (c) 2018-2021 The CSPN Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the getblockfilter RPC."""
from test_framework.test... | 40.836066 | 112 | 0.695303 |
79706e2017f720b580b6e4cb9b94f7329814a4d0 | 38,461 | py | Python | src/azure-cli/azure/cli/command_modules/container/custom.py | GalGrinblat/azure-cli | b30b9cf9f90d01b9b6708cc56b82e32cd7182dae | [
"MIT"
] | 1 | 2021-09-11T17:43:04.000Z | 2021-09-11T17:43:04.000Z | src/azure-cli/azure/cli/command_modules/container/custom.py | GalGrinblat/azure-cli | b30b9cf9f90d01b9b6708cc56b82e32cd7182dae | [
"MIT"
] | 2 | 2020-05-04T22:45:39.000Z | 2021-12-02T22:45:10.000Z | src/azure-cli/azure/cli/command_modules/container/custom.py | GalGrinblat/azure-cli | b30b9cf9f90d01b9b6708cc56b82e32cd7182dae | [
"MIT"
] | 2 | 2021-07-07T12:43:11.000Z | 2021-07-09T19:30:53.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 44.15729 | 201 | 0.660929 |
79706e8a550d33ca70950624af11dbf29f81877a | 5,607 | py | Python | python/rapidstream/BE/SlotSynthesis.py | Licheng-Guo/RapidStream | 19d0d8c0f7766fdfb612252483f59660e21fddc0 | [
"MIT"
] | 69 | 2021-12-16T12:58:10.000Z | 2022-03-22T00:45:13.000Z | python/rapidstream/BE/SlotSynthesis.py | Licheng-Guo/RapidStream | 19d0d8c0f7766fdfb612252483f59660e21fddc0 | [
"MIT"
] | 1 | 2021-12-16T16:43:34.000Z | 2021-12-16T16:43:34.000Z | python/rapidstream/BE/SlotSynthesis.py | Licheng-Guo/RapidStream | 19d0d8c0f7766fdfb612252483f59660e21fddc0 | [
"MIT"
] | 10 | 2021-12-17T18:18:19.000Z | 2022-03-17T15:56:15.000Z | import argparse
import json
import logging
import math
import os
from rapidstream.BE.UniversalWrapperCreater import addAnchorToNonTopIOs
from rapidstream.BE.Utilities import loggingSetup
loggingSetup()
def getAnchorWrapperOfSlot(hub, slot_name):
"""
Top-level ports will be directly connected
All other IOs wil... | 33.375 | 133 | 0.717139 |
79706f825e2b00c47d14a5ae7b080b378e05fe1c | 2,121 | py | Python | dia_wt/build_dia.py | xiaoleihuang/Neural_Temporality_Adaptation | f14212b5e4aac7baabfb32b3625f3e1102b15b46 | [
"Apache-2.0"
] | 9 | 2019-05-31T14:14:14.000Z | 2021-02-09T23:16:07.000Z | dia_wt/build_dia.py | xiaoleihuang/Neural_Temporality_Adaptation | f14212b5e4aac7baabfb32b3625f3e1102b15b46 | [
"Apache-2.0"
] | 1 | 2020-07-25T02:44:01.000Z | 2020-07-25T02:44:25.000Z | dia_wt/build_dia.py | xiaoleihuang/Neural_Temporality_Adaptation | f14212b5e4aac7baabfb32b3625f3e1102b15b46 | [
"Apache-2.0"
] | 4 | 2019-09-30T18:30:46.000Z | 2020-04-30T07:09:14.000Z | '''
This script is to build diachronic word embeddings from other sources
'''
import pickle
import os
import numpy as np
from scipy import sparse
def load_ft_vec(dpath):
'''load fasttext with vec file'''
wv = dict()
with open(dpath) as dfile:
dfile.readline()
for line in dfile:
... | 31.656716 | 84 | 0.577558 |
79707000f785a2b3efe89a8cddd39204622b9e73 | 4,883 | py | Python | rameniaapp/migrations/0004_badge_noodlereport_profile_profilereport_report_review_reviewimages_reviewreport.py | awlane/ramenia | 6bf8e75a1f279ac584daa4ee19927ffccaa67551 | [
"MIT"
] | null | null | null | rameniaapp/migrations/0004_badge_noodlereport_profile_profilereport_report_review_reviewimages_reviewreport.py | awlane/ramenia | 6bf8e75a1f279ac584daa4ee19927ffccaa67551 | [
"MIT"
] | null | null | null | rameniaapp/migrations/0004_badge_noodlereport_profile_profilereport_report_review_reviewimages_reviewreport.py | awlane/ramenia | 6bf8e75a1f279ac584daa4ee19927ffccaa67551 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.1 on 2020-09-28 00:13
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('rameniaapp', '0003_auto_... | 53.076087 | 200 | 0.590825 |
79707042288cb6994e729c116dc751bc7effef12 | 12,299 | py | Python | tests/test_observable/test_doaction.py | samiur/RxPY | ea6b3554ab06cfc70e28b532c0a54b910b6ee470 | [
"MIT"
] | null | null | null | tests/test_observable/test_doaction.py | samiur/RxPY | ea6b3554ab06cfc70e28b532c0a54b910b6ee470 | [
"MIT"
] | null | null | null | tests/test_observable/test_doaction.py | samiur/RxPY | ea6b3554ab06cfc70e28b532c0a54b910b6ee470 | [
"MIT"
] | null | null | null | import unittest
import rx3
from rx3 import operators as _
from rx3.testing import TestScheduler, ReactiveTest
on_next = ReactiveTest.on_next
on_completed = ReactiveTest.on_completed
on_error = ReactiveTest.on_error
subscribe = ReactiveTest.subscribe
subscribed = ReactiveTest.subscribed
disposed = ReactiveTest.dispose... | 32.112272 | 146 | 0.581999 |
79707093f067c95d5bb7d05bc66aee87d9b43926 | 2,090 | py | Python | plot.py | gronlund/kmeans1d | 585386d4678000691706acdb954911be8fea1c5c | [
"MIT"
] | 5 | 2019-12-11T18:11:28.000Z | 2021-05-17T22:31:46.000Z | plot.py | gronlund/kmeans1d | 585386d4678000691706acdb954911be8fea1c5c | [
"MIT"
] | 2 | 2020-01-13T15:40:43.000Z | 2021-01-27T21:31:43.000Z | plot.py | gronlund/kmeans1d | 585386d4678000691706acdb954911be8fea1c5c | [
"MIT"
] | 2 | 2020-01-14T08:14:09.000Z | 2020-03-26T17:12:18.000Z | import argparse
import csv
import matplotlib.pyplot as plt
import numpy as np
CLOCKS_PER_SEC = 1000000
def main(k_plot, constant=False, csvfilename='timing.csv'):
with open(csvfilename) as time_file:
csv_reader = csv.reader(time_file)
fasts = []
medis = []
ns = []
headers... | 33.174603 | 90 | 0.542584 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.