hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f1300ee544f746d72bcb4f99dab11a92a54f94ce | 5,599 | py | Python | samples/smith_waterman/smith_waterman_main.py | mk864mk864/heterocl | 112031948af3653e30fd414e210a8f5a938579e9 | [
"Apache-2.0"
] | 236 | 2019-05-19T01:48:11.000Z | 2022-03-31T09:03:54.000Z | samples/smith_waterman/smith_waterman_main.py | mk864mk864/heterocl | 112031948af3653e30fd414e210a8f5a938579e9 | [
"Apache-2.0"
] | 248 | 2019-05-17T19:18:36.000Z | 2022-03-30T21:25:47.000Z | samples/smith_waterman/smith_waterman_main.py | AlgaPeng/heterocl-2 | b5197907d1fe07485466a63671a2a906a861c939 | [
"Apache-2.0"
] | 85 | 2019-05-17T20:09:27.000Z | 2022-02-28T20:19:00.000Z | """
HeteroCL Tutorial : Smith-Waterman Genomic Sequencing
=====================================================
**Author**: Yi-Hsiang Lai (seanlatias@github)
In this example, we demonstrate how to use a While loop in HeteroCL.
"""
import heterocl as hcl
import numpy as np
import time
lenA = 128
lenB = 128
num = 1024... | 34.99375 | 81 | 0.512234 |
9ab249b0d6d10dbc978f7faaf063269fa8d0c506 | 33,476 | py | Python | python/ccxt/hitbtc.py | ZacharyATanenbaum/ccxt | 539a9e83dd2ca6a547103fd5910e0e776af5a48a | [
"MIT"
] | 2 | 2020-02-25T22:50:00.000Z | 2020-09-11T00:24:45.000Z | python/ccxt/hitbtc.py | rerefreshing/ccxt | 7c50f338dcb282c0aee4d69a1ac4ca47255fdf15 | [
"MIT"
] | 8 | 2018-09-04T05:28:15.000Z | 2018-12-21T08:10:35.000Z | python/ccxt/hitbtc.py | rerefreshing/ccxt | 7c50f338dcb282c0aee4d69a1ac4ca47255fdf15 | [
"MIT"
] | 2 | 2019-03-14T15:17:46.000Z | 2019-09-08T19:26:04.000Z | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
import hashlib
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import Insufficient... | 36.386957 | 127 | 0.348727 |
d165f501c735abd70a8ec09dc2c9f6d36238d18b | 3,788 | py | Python | tests/dropna_test.py | adrienpacifico/vaex | 19f8055b7b963b72f6e15b3b2e106d1142ec7655 | [
"MIT"
] | null | null | null | tests/dropna_test.py | adrienpacifico/vaex | 19f8055b7b963b72f6e15b3b2e106d1142ec7655 | [
"MIT"
] | null | null | null | tests/dropna_test.py | adrienpacifico/vaex | 19f8055b7b963b72f6e15b3b2e106d1142ec7655 | [
"MIT"
] | null | null | null | from common import *
def test_dropna_objects(df_local_non_arrow):
ds = df_local_non_arrow
ds_dropped = ds.dropna(column_names=['obj'])
assert ds_dropped['obj'].values.mask.any() == False
float_elements = np.array([element for element in ds_dropped['obj'].values.data if isinstance(element, float)])
... | 35.735849 | 115 | 0.603221 |
fa5b13d01a6641883e52f3d641f65d1794f5827e | 78,472 | py | Python | localstack/services/awslambda/lambda_api.py | mwarthon/localstack | b748838113131b576e2be0b80a8f31e9bad81f3a | [
"Apache-2.0"
] | null | null | null | localstack/services/awslambda/lambda_api.py | mwarthon/localstack | b748838113131b576e2be0b80a8f31e9bad81f3a | [
"Apache-2.0"
] | null | null | null | localstack/services/awslambda/lambda_api.py | mwarthon/localstack | b748838113131b576e2be0b80a8f31e9bad81f3a | [
"Apache-2.0"
] | null | null | null | import re
import os
import importlib.machinery
import sys
import json
import uuid
import time
import base64
import hashlib
import logging
import functools
import threading
import traceback
from io import BytesIO
from datetime import datetime
from flask import Flask, Response, jsonify, request
from six.moves import cStr... | 38.982613 | 120 | 0.655826 |
9077cc286634a7de9c3133d078cc5c6a5aa4cbaf | 404 | py | Python | oryxerp/utils/cron.py | oryxsolutions/oryx | 4a0a83e62d676cb24a102896b0e49ec4877b3712 | [
"MIT"
] | null | null | null | oryxerp/utils/cron.py | oryxsolutions/oryx | 4a0a83e62d676cb24a102896b0e49ec4877b3712 | [
"MIT"
] | null | null | null | oryxerp/utils/cron.py | oryxsolutions/oryx | 4a0a83e62d676cb24a102896b0e49ec4877b3712 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from datetime import datetime
from erpnext.accounts.doctype.pricing_rule.pricing_rule import get_pricing_rule_for_item
import frappe
from frappe.utils.data import add_to_date, cint, flt, fmt_money, now, now_datetime
from frappe.utils.logger import set_log_level
set_log_leve... | 40.4 | 89 | 0.821782 |
cad69b8c64846bddf05c885fb3d0640b8202d126 | 5,059 | py | Python | kibble/api/pages/mail/top-authors.py | jbampton/kibble | 55fb362d684e24e4e2d737ca0507965d23904623 | [
"Apache-2.0"
] | 3 | 2020-10-07T10:36:20.000Z | 2020-10-24T20:43:02.000Z | kibble/api/pages/mail/top-authors.py | jbampton/kibble | 55fb362d684e24e4e2d737ca0507965d23904623 | [
"Apache-2.0"
] | null | null | null | kibble/api/pages/mail/top-authors.py | jbampton/kibble | 55fb362d684e24e4e2d737ca0507965d23904623 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 32.63871 | 88 | 0.546155 |
bce8991500f09e8c759f84c00643566e0a2857d5 | 3,574 | py | Python | ntp/setup.py | michael-go/integrations-core | b094befc63a479e6496ad0d0c7bb340be63699fc | [
"BSD-3-Clause"
] | null | null | null | ntp/setup.py | michael-go/integrations-core | b094befc63a479e6496ad0d0c7bb340be63699fc | [
"BSD-3-Clause"
] | null | null | null | ntp/setup.py | michael-go/integrations-core | b094befc63a479e6496ad0d0c7bb340be63699fc | [
"BSD-3-Clause"
] | null | null | null | # Always prefer setuptools over distutils
from setuptools import setup
# To use a consistent encoding
from codecs import open
from os import path
import json
import re
here = path.abspath(path.dirname(__file__))
def parse_req_line(line):
line = line.strip()
if not line or line.startswith('--hash') or line[0]... | 27.921875 | 92 | 0.625909 |
a6bfb1d22545d84dbe8f1b04d9e50a1d2e2cefd1 | 401 | py | Python | build/crazyflie_controller/catkin_generated/pkg.develspace.context.pc.py | josephyaconelli/crazyflie_ros-pwm-control | 40a7370843557abc60f8d4c32163d9512d8277d2 | [
"MIT"
] | 1 | 2018-07-02T23:35:32.000Z | 2018-07-02T23:35:32.000Z | build/crazyflie_controller/catkin_generated/pkg.develspace.context.pc.py | josephyaconelli/crazyflie_ros-pwm-control | 40a7370843557abc60f8d4c32163d9512d8277d2 | [
"MIT"
] | null | null | null | build/crazyflie_controller/catkin_generated/pkg.develspace.context.pc.py | josephyaconelli/crazyflie_ros-pwm-control | 40a7370843557abc60f8d4c32163d9512d8277d2 | [
"MIT"
] | null | null | null | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else []
PROJECT_CATKIN_DEPENDS = "".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else []
PROJECT_NAME = "crazyflie_controller"
PROJECT_SPACE_D... | 44.555556 | 69 | 0.723192 |
9ce5de08cb409fed6432eb1b9929b63e63da8ce2 | 12,534 | py | Python | src/dynamic/models/turbine_governor.py | yanzhaochang/PSATools-Python | 7524d7eeed26db9fba93c0ea03a7c8c0bfee7410 | [
"Apache-2.0"
] | 2 | 2021-03-29T10:36:57.000Z | 2021-04-01T06:54:10.000Z | src/dynamic/models/turbine_governor.py | yanzhaochang/PSATools-Python | 7524d7eeed26db9fba93c0ea03a7c8c0bfee7410 | [
"Apache-2.0"
] | null | null | null | src/dynamic/models/turbine_governor.py | yanzhaochang/PSATools-Python | 7524d7eeed26db9fba93c0ea03a7c8c0bfee7410 | [
"Apache-2.0"
] | 1 | 2021-04-01T06:54:24.000Z | 2021-04-01T06:54:24.000Z | import sys
sys.path.append('../..')
import apis
from apis import apis_dynamic
def solve_turbine_governor_model_state_variable(generator, par_type):
'''
Solve turbine governor model state variables.
Args:
(1) generator, int, generator connected bus number.
(2) par_type, bool, sta... | 38.330275 | 103 | 0.62853 |
b35677b16d007df6bebe5600659ee22af25381d6 | 4,457 | py | Python | fsleyes/plugins/profiles/samplelineprofile.py | pauldmccarthy/fsleyes | 453a6b91ec7763c39195814d635257e3766acf83 | [
"Apache-2.0"
] | 12 | 2018-05-05T01:36:25.000Z | 2021-09-23T20:44:08.000Z | fsleyes/plugins/profiles/samplelineprofile.py | pauldmccarthy/fsleyes | 453a6b91ec7763c39195814d635257e3766acf83 | [
"Apache-2.0"
] | 97 | 2018-05-05T02:17:23.000Z | 2022-03-29T14:58:42.000Z | fsleyes/plugins/profiles/samplelineprofile.py | pauldmccarthy/fsleyes | 453a6b91ec7763c39195814d635257e3766acf83 | [
"Apache-2.0"
] | 6 | 2017-12-09T09:02:00.000Z | 2021-03-05T18:55:13.000Z | #!/usr/bin/env python
#
# samplelineprofile.py - The SampleLineProfile class.
#
# Author: Paul McCarthy <pauldmccarthy@gmail.com>
#
"""This module provides the :class:`SampleLineProfile` class, an interaction
:class:`.Profile` for :class:`.OrthoPanel` views, which is used by the
:class:`.SampleLinePanel`.
"""
import ... | 33.014815 | 77 | 0.592551 |
a73c72402acd699adc2e5608d4575ca4d8840e9c | 652 | py | Python | sources/openembedded-core/meta/lib/oeqa/runtime/ping.py | wwright2/dcim3-angstrom1 | d358c7b2d446c0f330ed76b20f41e42f6f4f045c | [
"MIT"
] | null | null | null | sources/openembedded-core/meta/lib/oeqa/runtime/ping.py | wwright2/dcim3-angstrom1 | d358c7b2d446c0f330ed76b20f41e42f6f4f045c | [
"MIT"
] | null | null | null | sources/openembedded-core/meta/lib/oeqa/runtime/ping.py | wwright2/dcim3-angstrom1 | d358c7b2d446c0f330ed76b20f41e42f6f4f045c | [
"MIT"
] | null | null | null | import subprocess
import unittest
import sys
import time
from oeqa.oetest import oeRuntimeTest
class PingTest(oeRuntimeTest):
def test_ping(self):
output = ''
count = 0
endtime = time.time() + 60
while count < 5 and time.time() < endtime:
proc = subprocess.Popen("ping -... | 31.047619 | 121 | 0.581288 |
92c95a41d793d591a0fcb00c9e68e0cf27a2d8e9 | 16,015 | py | Python | synapse/storage/databases/main/appservice.py | dsonck92/synapse | 2560b1b6b2f74b5724253396c0e3665fa1f7968c | [
"Apache-2.0"
] | 9,945 | 2015-01-02T07:41:06.000Z | 2022-03-31T23:22:42.000Z | synapse/storage/databases/main/appservice.py | dsonck92/synapse | 2560b1b6b2f74b5724253396c0e3665fa1f7968c | [
"Apache-2.0"
] | 9,320 | 2015-01-08T14:09:03.000Z | 2022-03-31T21:11:24.000Z | synapse/storage/databases/main/appservice.py | dsonck92/synapse | 2560b1b6b2f74b5724253396c0e3665fa1f7968c | [
"Apache-2.0"
] | 2,299 | 2015-01-31T22:16:29.000Z | 2022-03-31T06:08:26.000Z | # Copyright 2015, 2016 OpenMarket Ltd
# Copyright 2018 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 35.908072 | 87 | 0.618295 |
428d2b25acdebb10d9467776a8ba77982b6c0f8c | 1,300 | py | Python | locations/models.py | vishnusayanth/django-app | 6f95f3140188d5cdeb260b66b2b8fdfffc8cf52b | [
"MIT"
] | null | null | null | locations/models.py | vishnusayanth/django-app | 6f95f3140188d5cdeb260b66b2b8fdfffc8cf52b | [
"MIT"
] | null | null | null | locations/models.py | vishnusayanth/django-app | 6f95f3140188d5cdeb260b66b2b8fdfffc8cf52b | [
"MIT"
] | null | null | null | from django.core.exceptions import ValidationError
from django.db import models
from django.db.models import Q
class Continent(models.Model):
name = models.CharField(max_length=50)
def __str__(self):
return self.name
class Country(models.Model):
name = models.CharField(max_length=50)
offici... | 31.707317 | 103 | 0.696154 |
32faefad947a53ef9777603c16318b24c7c5d818 | 353 | py | Python | github_status_embed/__init__.py | 893091483/Discord-embed | 92f6ecb120ca27f556bc105cde4be3bfcf8808be | [
"MIT"
] | 10 | 2020-12-05T09:53:36.000Z | 2022-03-15T20:53:11.000Z | github_status_embed/__init__.py | 893091483/Discord-embed | 92f6ecb120ca27f556bc105cde4be3bfcf8808be | [
"MIT"
] | 2 | 2022-03-01T03:09:15.000Z | 2022-03-10T17:40:20.000Z | github_status_embed/__init__.py | 893091483/Discord-embed | 92f6ecb120ca27f556bc105cde4be3bfcf8808be | [
"MIT"
] | 6 | 2021-04-20T09:38:21.000Z | 2022-03-20T03:15:16.000Z | """
Github Status Embed for Discord.
This applications sends an enhanced GitHub Actions Status Embed to a
Discord webhook. The default embeds sent by GitHub don't contain a lot
of information and are send for every workflow run. This application,
part of a Docker-based action, allows you to send more meaningful embeds... | 35.3 | 72 | 0.790368 |
eea1fab11898866732ede15b1b5429f81332bded | 190 | py | Python | latihan1.py | MelindaIndriani17/praktikum3 | 25bdbf3c738f0bdb4f40bc2123d4d2f65adc2e3a | [
"Xnet",
"X11"
] | null | null | null | latihan1.py | MelindaIndriani17/praktikum3 | 25bdbf3c738f0bdb4f40bc2123d4d2f65adc2e3a | [
"Xnet",
"X11"
] | null | null | null | latihan1.py | MelindaIndriani17/praktikum3 | 25bdbf3c738f0bdb4f40bc2123d4d2f65adc2e3a | [
"Xnet",
"X11"
] | null | null | null | import random
a = 0
jumlah = int(input("Masukkan jumlah N : "))
for x in range(0, jumlah):
i = random.uniform(0.0, 0.5)
a+=1
print(" data ke-",a,"=>",i)
print("Selesai")
| 21.111111 | 44 | 0.557895 |
be02d310a52cd7ebfc9cb52a9d77231014b934a6 | 1,504 | py | Python | python-sandbox/entrypoint.py | leoniefrijters/onebot | e4bd43b0d18225f06b5281ce5c2665dd8a0dc188 | [
"BSD-3-Clause"
] | 13 | 2015-09-06T21:20:54.000Z | 2021-11-21T20:31:57.000Z | python-sandbox/entrypoint.py | leoniefrijters/onebot | e4bd43b0d18225f06b5281ce5c2665dd8a0dc188 | [
"BSD-3-Clause"
] | 47 | 2015-08-14T08:59:24.000Z | 2021-08-25T05:08:56.000Z | python-sandbox/entrypoint.py | leoniefrijters/onebot | e4bd43b0d18225f06b5281ce5c2665dd8a0dc188 | [
"BSD-3-Clause"
] | 7 | 2016-03-29T12:05:24.000Z | 2019-06-18T15:03:50.000Z | #!/usr/bin/env python
import io
import multiprocessing
from contextlib import redirect_stdout, redirect_stderr
TIMEOUT = 5
class UserProcess(multiprocessing.Process):
"""The user-provided process"""
def __init__(self, cmd, *args, **kwargs):
super().__init__(*args, **kwargs)
self.cmd = cmd... | 26.385965 | 65 | 0.545878 |
b47abfc0151e75c15df8e97c28434388d746ba18 | 9,923 | py | Python | Configs/Old_configs/Medical.py | yochaiedlitz/T2DM_UKB_predictions | 1e6b22e3d51d515eb065d7d5f46408f86f33d0b8 | [
"MIT"
] | 1 | 2022-01-17T13:13:02.000Z | 2022-01-17T13:13:02.000Z | Configs/Old_configs/Medical.py | yochaiedlitz/T2DM_UKB_predictions | 1e6b22e3d51d515eb065d7d5f46408f86f33d0b8 | [
"MIT"
] | null | null | null | Configs/Old_configs/Medical.py | yochaiedlitz/T2DM_UKB_predictions | 1e6b22e3d51d515eb065d7d5f46408f86f33d0b8 | [
"MIT"
] | null | null | null | import collections # Used for ordered dictionary
from PRS import PRS_sumstats
from UKBB_Func import PROBA_FOLDER
import sys
Top_Gen_Dict = PRS_sumstats.Get_Top_Gen_Dict()
Hyp_Param_Dict_A = collections.OrderedDict()
Hyp_Param_Dict_R = collections.OrderedDict()
TRAIN_PATH = '/net/mraid08/export/jafar/UKBioBank/Data/uk... | 59.065476 | 315 | 0.730223 |
2c8fefcc1cd7b12e6c4a468980052f0c5a0a2783 | 1,469 | py | Python | evaluation.py | rdedo099/HonoursProject2021 | 94c61218371587fd4dd9dacaa5e8f0ce7f44875d | [
"MIT"
] | null | null | null | evaluation.py | rdedo099/HonoursProject2021 | 94c61218371587fd4dd9dacaa5e8f0ce7f44875d | [
"MIT"
] | null | null | null | evaluation.py | rdedo099/HonoursProject2021 | 94c61218371587fd4dd9dacaa5e8f0ce7f44875d | [
"MIT"
] | null | null | null | from sklearn import metrics
from prettytable import PrettyTable
def evaluate_clustering(name, X, true_labels, pred_labels):
homogeneity = metrics.homogeneity_score(true_labels, pred_labels)
completeness = metrics.completeness_score(true_labels, pred_labels)
v_measure = metrics.v_measure_score(true_labels,... | 39.702703 | 203 | 0.733833 |
af4d240c6bd62e60d4aadd5036d10e043b50db0d | 867 | py | Python | tests.py | mosquito/cyleb128 | 84d0caed9fa9bd2f7801ef409f8679ea28cd5f4c | [
"Apache-2.0"
] | 1 | 2021-08-09T18:59:46.000Z | 2021-08-09T18:59:46.000Z | tests.py | mosquito/cyleb128 | 84d0caed9fa9bd2f7801ef409f8679ea28cd5f4c | [
"Apache-2.0"
] | null | null | null | tests.py | mosquito/cyleb128 | 84d0caed9fa9bd2f7801ef409f8679ea28cd5f4c | [
"Apache-2.0"
] | null | null | null | import pytest
from leb128 import LEB128S, LEB128U
ENCODE_CASES = [
(LEB128U.encode, 624485, b'\xe5\x8e&'),
(LEB128S.encode, -123456, b'\xc0\xbbx'),
]
@pytest.mark.parametrize("func, value, expected", ENCODE_CASES)
def test_encode(func, value, expected):
assert func(value) == expected
DECODE_CASES = [
... | 22.230769 | 63 | 0.681661 |
a3d4eae545bd770014f7a2896921613fc07a0be7 | 6,636 | py | Python | pahelix/utils/metrics/molecular_generation/SA_Score/sascorer.py | agave233/PaddleHelix | e5578f72c2a203a27d9df7da111f1ced826c1429 | [
"Apache-2.0"
] | 454 | 2020-11-21T01:02:45.000Z | 2022-03-29T12:53:40.000Z | pahelix/utils/metrics/molecular_generation/SA_Score/sascorer.py | chupvl/PaddleHelix | 6e082f89b8090c3c360593d40a08bffc884165dd | [
"Apache-2.0"
] | 161 | 2020-12-12T06:35:54.000Z | 2022-03-27T11:31:13.000Z | pahelix/utils/metrics/molecular_generation/SA_Score/sascorer.py | chupvl/PaddleHelix | 6e082f89b8090c3c360593d40a08bffc884165dd | [
"Apache-2.0"
] | 108 | 2020-12-07T09:01:10.000Z | 2022-03-31T14:42:29.000Z | #!/usr/bin/python3
#-*-coding:utf-8-*-
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance w... | 32.529412 | 114 | 0.673297 |
625933305c35003ef9ab90cfbca7b62852b671ff | 4,163 | py | Python | plugins/Craw_wanfang/Craw_wanfang.py | ljh2057/Craw | b9524c3e795ef4addc6177e414a73dd8231ac788 | [
"Apache-2.0"
] | null | null | null | plugins/Craw_wanfang/Craw_wanfang.py | ljh2057/Craw | b9524c3e795ef4addc6177e414a73dd8231ac788 | [
"Apache-2.0"
] | 4 | 2021-03-31T20:01:11.000Z | 2022-03-12T00:47:49.000Z | plugins/Craw_wanfang/Craw_wanfang.py | ljh2057/Craw | b9524c3e795ef4addc6177e414a73dd8231ac788 | [
"Apache-2.0"
] | 1 | 2020-09-28T07:19:00.000Z | 2020-09-28T07:19:00.000Z | from plugins.BasePlugin.BasePlugin import BasePlugin
from plugins.Craw_wanfang import Getxml
from plugins.Craw_wanfang import main
import os
from PyQt5.QtCore import pyqtSignal
import shutil
class Craw_wanfang(BasePlugin):
trigger = pyqtSignal()
CrawProcess=pyqtSignal(str)
def __init__(self, state=None, t... | 38.906542 | 134 | 0.600048 |
cdd64600c8715567baad21459dfd8aa4f34cf4b7 | 1,662 | py | Python | setup.py | aescwork/waxtablet | 60165d42fcd3192ec1cf26bff14f99e8920c96ba | [
"BSD-2-Clause"
] | null | null | null | setup.py | aescwork/waxtablet | 60165d42fcd3192ec1cf26bff14f99e8920c96ba | [
"BSD-2-Clause"
] | null | null | null | setup.py | aescwork/waxtablet | 60165d42fcd3192ec1cf26bff14f99e8920c96ba | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Always prefer setuptools over distutils
import os
import sys
import errno
from setuptools import setup, find_packages
from setuptools.command.develop import develop
from setuptools.command.install import install
# To use a consistent encoding
from codecs import open
from os import path
... | 27.7 | 123 | 0.648014 |
cf7e800c7c1a59352899d5b0f4d9c283b3e91edb | 1,010 | py | Python | launches.py | zweed4u/launchesEND | fd016478c6f757e323009611d6b83ea42fbf8116 | [
"MIT"
] | 5 | 2017-12-05T04:00:22.000Z | 2020-12-16T20:44:46.000Z | launches.py | zweed4u/launchesEND | fd016478c6f757e323009611d6b83ea42fbf8116 | [
"MIT"
] | null | null | null | launches.py | zweed4u/launchesEND | fd016478c6f757e323009611d6b83ea42fbf8116 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#Hmmm... http://www.endclothing.com/media/us_sitemap.xml
import urllib2, zlib, json
url='https://launches.endclothing.com/api/products'
req = urllib2.Request(url)
req.add_header(':host','launches.endclothing.com');req.add_header(':method','GET');req.add_header(':path','/api/products');req.add_hea... | 67.333333 | 598 | 0.723762 |
01db284db81075adc6de17bebd68fd06f77b7177 | 2,927 | py | Python | setup.py | LLAW3301/docassemble-LLAW33012021S1WWC1 | e7bf8de7daebbe498cd2256cd9ae1c56bff1cec1 | [
"MIT"
] | 2 | 2021-04-09T02:35:37.000Z | 2021-04-22T06:16:04.000Z | setup.py | LLAW3301/docassemble-LLAW33012021S1WWC1 | e7bf8de7daebbe498cd2256cd9ae1c56bff1cec1 | [
"MIT"
] | null | null | null | setup.py | LLAW3301/docassemble-LLAW33012021S1WWC1 | e7bf8de7daebbe498cd2256cd9ae1c56bff1cec1 | [
"MIT"
] | null | null | null | import os
import sys
from setuptools import setup, find_packages
from fnmatch import fnmatchcase
from distutils.util import convert_path
standard_exclude = ('*.pyc', '*~', '.*', '*.bak', '*.swp*')
standard_exclude_directories = ('.*', 'CVS', '_darcs', './build', './dist', 'EGG-INFO', '*.egg-info')
def find_package_dat... | 47.983607 | 565 | 0.584899 |
9c0d558df4ede05d5e17c528e4583565d938b1e1 | 2,225 | py | Python | cerebralcortex/data_migrator/schema_builder.py | MD2Korg/CerebralCortex-2.0-legacy | 5a07d39d51f843d8f19d058dfbb8eb83609f1f90 | [
"BSD-2-Clause"
] | null | null | null | cerebralcortex/data_migrator/schema_builder.py | MD2Korg/CerebralCortex-2.0-legacy | 5a07d39d51f843d8f19d058dfbb8eb83609f1f90 | [
"BSD-2-Clause"
] | null | null | null | cerebralcortex/data_migrator/schema_builder.py | MD2Korg/CerebralCortex-2.0-legacy | 5a07d39d51f843d8f19d058dfbb8eb83609f1f90 | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2017, MD2K Center of Excellence
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditio... | 35.887097 | 109 | 0.751461 |
f9cc8eef2497793ef67bed02d4962f00de56e598 | 30,217 | py | Python | rasa/utils/train_utils.py | deepmipt/rasa | f0cc0ff6e515df2249998ff4e788009cccaecc02 | [
"Apache-2.0"
] | null | null | null | rasa/utils/train_utils.py | deepmipt/rasa | f0cc0ff6e515df2249998ff4e788009cccaecc02 | [
"Apache-2.0"
] | null | null | null | rasa/utils/train_utils.py | deepmipt/rasa | f0cc0ff6e515df2249998ff4e788009cccaecc02 | [
"Apache-2.0"
] | null | null | null | from collections import namedtuple
import logging
import numpy as np
from tqdm import tqdm
from sklearn.model_selection import train_test_split
import tensorflow as tf
from tensor2tensor.models.transformer import (
transformer_base,
transformer_prepare_encoder,
transformer_encoder,
)
from tensor2tensor.laye... | 30.522222 | 121 | 0.636463 |
9f3448cb92c07aef15f432e404d6786fe54e9f29 | 127 | py | Python | Components/courses/urls.py | iamTanTan/E-Learning_Lab_Spring_2021 | e426ba982cc5044510eb1d8b80b377cb0bd5407a | [
"MIT"
] | 2 | 2021-01-29T22:35:28.000Z | 2021-05-13T23:35:54.000Z | Components/courses/urls.py | iamTanTan/E-Learning_Lab_Spring_2021 | e426ba982cc5044510eb1d8b80b377cb0bd5407a | [
"MIT"
] | 8 | 2021-03-19T11:24:23.000Z | 2022-03-12T00:57:13.000Z | Components/courses/urls.py | iamTanTan/E-Learning_Lab_Spring_2021 | e426ba982cc5044510eb1d8b80b377cb0bd5407a | [
"MIT"
] | 1 | 2021-09-11T15:00:09.000Z | 2021-09-11T15:00:09.000Z | from django.urls import path
from Components.courses import views
urlpatterns = [
path('', views.course, name='course'),
] | 21.166667 | 42 | 0.724409 |
a37c60def7c76b06f4b0e0bde125ab4c7171bce0 | 13,197 | py | Python | model-optimizer/extensions/ops/einsum.py | uikilin100/openvino | afc5191b8c75b1de4adc8cb07c6269b52882ddfe | [
"Apache-2.0"
] | 1 | 2021-03-16T17:40:26.000Z | 2021-03-16T17:40:26.000Z | model-optimizer/extensions/ops/einsum.py | uikilin100/openvino | afc5191b8c75b1de4adc8cb07c6269b52882ddfe | [
"Apache-2.0"
] | 42 | 2020-11-23T08:09:57.000Z | 2022-02-21T13:03:34.000Z | model-optimizer/extensions/ops/einsum.py | v-Golubev/openvino | 26936d1fbb025c503ee43fe74593ee9d7862ab15 | [
"Apache-2.0"
] | 4 | 2021-04-02T08:48:38.000Z | 2021-07-01T06:59:02.000Z | # Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import re
import numpy as np
from mo.front.common.partial_infer.utils import int64_array
from mo.graph.graph import Node, Graph
from mo.ops.op import Op
from mo.utils.broadcasting import bi_directional_shape_broadcasting
class Einsum... | 50.563218 | 126 | 0.628249 |
c2ec43a010039adbdb8e298d074f7969c324c1ee | 655 | py | Python | tests/test_api_root.py | jacebrowning/memegen-flask | e4e67e76f061fa4e418901031b6086966376b8f3 | [
"MIT"
] | 3 | 2020-09-02T13:11:11.000Z | 2020-12-24T00:41:56.000Z | tests/test_api_root.py | jacebrowning/memegen-flask | e4e67e76f061fa4e418901031b6086966376b8f3 | [
"MIT"
] | 13 | 2020-08-30T21:38:53.000Z | 2020-09-05T03:19:17.000Z | tests/test_api_root.py | jacebrowning/memegen-flask | e4e67e76f061fa4e418901031b6086966376b8f3 | [
"MIT"
] | null | null | null | # pylint: disable=unused-variable,expression-not-assigned
from expecter import expect
from .utils import load
def describe_root():
def it_returns_links_and_metadata(client):
status, data = load(client.get("/api/"))
expect(status) == 200
expect(data) == {
'templates': "http:... | 29.772727 | 103 | 0.606107 |
2250647ad63d5e249358df55258111b76ac254a8 | 23,466 | py | Python | ginga/AutoCuts.py | chyan26/ginga | e00c887d8660e0a4178f9681ca7ea7784b7ca129 | [
"BSD-3-Clause"
] | 1 | 2019-04-11T02:22:48.000Z | 2019-04-11T02:22:48.000Z | ginga/AutoCuts.py | chyan26/ginga | e00c887d8660e0a4178f9681ca7ea7784b7ca129 | [
"BSD-3-Clause"
] | null | null | null | ginga/AutoCuts.py | chyan26/ginga | e00c887d8660e0a4178f9681ca7ea7784b7ca129 | [
"BSD-3-Clause"
] | null | null | null | #
# AutoCuts.py -- class for calculating auto cut levels
#
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
import numpy as np
import threading
from ginga.misc import Bunch
#from ginga.misc.ParamSet import Param
from ginga.util import zscale
have_scipy = Tr... | 34.45815 | 101 | 0.568056 |
b5e87948037fbea0a8865066bfa553c42161c791 | 493 | py | Python | archive/online/2016/160315_increase_proofread_clavierbuch.py | the-it/WS_THEbotIT | 5630382e697a8b7432e0cf63a05a45fe43064caa | [
"MIT"
] | 5 | 2019-01-21T19:59:27.000Z | 2021-02-06T12:56:28.000Z | archive/online/2016/160315_increase_proofread_clavierbuch.py | the-it/WS_THEbotIT | 5630382e697a8b7432e0cf63a05a45fe43064caa | [
"MIT"
] | 697 | 2017-11-19T12:41:11.000Z | 2022-03-31T07:35:04.000Z | archive/online/2016/160315_increase_proofread_clavierbuch.py | the-it/WS_THEbotIT | 5630382e697a8b7432e0cf63a05a45fe43064caa | [
"MIT"
] | 1 | 2018-02-18T23:01:13.000Z | 2018-02-18T23:01:13.000Z | # -*- coding: utf-8 -*-
__author__ = 'eso'
import sys
sys.path.append('../../')
import re
import requests
import pywikibot
from pywikibot import proofreadpage
site = pywikibot.Site()
for i in range(1, 128):
page = pywikibot.proofreadpage.ProofreadPage(site, 'Seite:Versuch über die wahre Art das Clavier zu spielen... | 23.47619 | 142 | 0.669371 |
112b1a0383fff431925d7c2de1201a9c3e502e39 | 4,935 | py | Python | intmcp/model/history.py | RDLLab/i-ntmcp | 63deec3d956d41a0ad4b66a707536893859e4e9f | [
"MIT"
] | null | null | null | intmcp/model/history.py | RDLLab/i-ntmcp | 63deec3d956d41a0ad4b66a707536893859e4e9f | [
"MIT"
] | null | null | null | intmcp/model/history.py | RDLLab/i-ntmcp | 63deec3d956d41a0ad4b66a707536893859e4e9f | [
"MIT"
] | null | null | null | """A history in the environment """
from typing import Tuple, Optional
from intmcp.model import Action, Observation, JointAction, JointObservation
class AgentHistory:
"""An Action-Observation history for a single agent in a POSG environment.
A History is an ordered Tuple of (Action, Observation) tuples with... | 32.682119 | 78 | 0.605471 |
48de38a63212f5aac92c1619c905090e1eeb735d | 2,959 | py | Python | test/test_optim.py | 6Ulm/POT | 28dd2fe2c461ac2287ae51e464f0b002d61f5f31 | [
"MIT"
] | 1 | 2021-04-14T20:16:47.000Z | 2021-04-14T20:16:47.000Z | test/test_optim.py | 6Ulm/POT | 28dd2fe2c461ac2287ae51e464f0b002d61f5f31 | [
"MIT"
] | null | null | null | test/test_optim.py | 6Ulm/POT | 28dd2fe2c461ac2287ae51e464f0b002d61f5f31 | [
"MIT"
] | 1 | 2020-12-07T08:47:55.000Z | 2020-12-07T08:47:55.000Z | """Tests for module optim fro OT optimization """
# Author: Remi Flamary <remi.flamary@unice.fr>
#
# License: MIT License
import numpy as np
import ot
def test_conditional_gradient():
n_bins = 100 # nb bins
np.random.seed(0)
# bin positions
x = np.arange(n_bins, dtype=np.float64)
# Gaussian d... | 25.290598 | 81 | 0.60223 |
5c8005bfbc417d308aaac96e2aaf9ca7ab861d0d | 1,578 | py | Python | examples/connectfour/_shared.py | SSS-Says-Snek/hisock | 16818f27b018027496ac316c479db225e825e1ea | [
"MIT"
] | 23 | 2021-09-11T22:29:54.000Z | 2022-03-29T03:34:56.000Z | examples/connectfour/_shared.py | SSS-Says-Snek/hisock | 16818f27b018027496ac316c479db225e825e1ea | [
"MIT"
] | 32 | 2021-09-12T03:54:58.000Z | 2022-03-31T07:30:57.000Z | examples/connectfour/_shared.py | SSS-Says-Snek/hisock | 16818f27b018027496ac316c479db225e825e1ea | [
"MIT"
] | 9 | 2021-11-16T04:43:23.000Z | 2022-01-31T12:05:38.000Z | from __future__ import annotations
PIECE_COLORS = {
-1: (50, 50, 50), # NO_PIECE
0: (255, 0, 0), # RED
1: (255, 255, 0), # YELLOW
2: (120, 0, 0), # HOVER RED
3: (120, 120, 0), # HOVER YELLOW
}
class BoardEnum:
NO_PIECE = -1
RED = 0
YELLOW = 1
HOVER_RED = 2
HOVER_YELLOW =... | 25.868852 | 80 | 0.470849 |
86546fc8f29fb59cb234d07468969d074df3f007 | 1,610 | py | Python | nuageneutronsync/utils/log.py | axxyhtrx/nuage-neutron-sync | a839a4530c2f9d9c96bfaf16824c2d5d3c135209 | [
"BSD-3-Clause"
] | 2 | 2017-06-23T16:24:48.000Z | 2022-03-06T04:48:18.000Z | nuageneutronsync/utils/log.py | axxyhtrx/nuage-neutron-sync | a839a4530c2f9d9c96bfaf16824c2d5d3c135209 | [
"BSD-3-Clause"
] | 4 | 2018-02-21T13:30:31.000Z | 2021-05-31T14:38:01.000Z | nuageneutronsync/utils/log.py | axxyhtrx/nuage-neutron-sync | a839a4530c2f9d9c96bfaf16824c2d5d3c135209 | [
"BSD-3-Clause"
] | 5 | 2017-06-06T14:21:57.000Z | 2019-01-25T03:15:52.000Z | #!/usr/bin/env python
import logging
import logging.handlers
import sys
import os
LEVELS = {'debug': logging.DEBUG,
'info': logging.INFO,
'warning': logging.WARNING,
'error': logging.ERROR,
'critical': logging.CRITICAL}
def setlogpath(path, config):
logger = logging.getLo... | 29.814815 | 112 | 0.692547 |
4489e3d8995005e279c17a43dd395bc9338535c9 | 11,026 | py | Python | PeterMaar-NetLrnChatBot/Client/PeterMaarNetworkedChatClientGUI.app/Contents/Resources/__boot__.py | alset333/NetworkedLearningChatbot | 35c62d70bdbf3fcbff478da5346ec9eeea18ec50 | [
"BSD-3-Clause"
] | 3 | 2016-01-14T02:19:43.000Z | 2017-10-17T15:52:33.000Z | PeterMaar-NetLrnChatBot/Client/PeterMaarNetworkedChatClientGUI.app/Contents/Resources/__boot__.py | alset333/NetworkedLearningChatbot | 35c62d70bdbf3fcbff478da5346ec9eeea18ec50 | [
"BSD-3-Clause"
] | null | null | null | PeterMaar-NetLrnChatBot/Client/PeterMaarNetworkedChatClientGUI.app/Contents/Resources/__boot__.py | alset333/NetworkedLearningChatbot | 35c62d70bdbf3fcbff478da5346ec9eeea18ec50 | [
"BSD-3-Clause"
] | null | null | null | def _reset_sys_path():
# Clear generic sys.path[0]
import sys, os
resources = os.environ['RESOURCEPATH']
while sys.path[0] == resources:
del sys.path[0]
_reset_sys_path()
"""
sys.argv emulation
This module starts a basic event loop to collect file- and url-open AppleEvents. Those get
converte... | 31.323864 | 100 | 0.626882 |
74f558d2d92e28cfa1f93f13372ce3528e8c04be | 4,829 | py | Python | tensorflow_tts/processor/ljspeech.py | Defrisoft/TensorFlowTTS | d18f1c71b03285a37792121901c5ac1e14c07c20 | [
"Apache-2.0"
] | 1 | 2021-12-22T07:24:58.000Z | 2021-12-22T07:24:58.000Z | tensorflow_tts/processor/ljspeech.py | Defrisoft/TensorFlowTTS | d18f1c71b03285a37792121901c5ac1e14c07c20 | [
"Apache-2.0"
] | null | null | null | tensorflow_tts/processor/ljspeech.py | Defrisoft/TensorFlowTTS | d18f1c71b03285a37792121901c5ac1e14c07c20 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 TensorFlowTTS Team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 32.85034 | 95 | 0.614827 |
a07021e1bc8fecfa46307dc74d60a5922ea468ea | 1,190 | py | Python | tests/test_default.py | Cologler/dataclasses_fromdict-python | b84d628c1f69c6e19b35e5ef9eecfa88d5e57ca0 | [
"MIT"
] | null | null | null | tests/test_default.py | Cologler/dataclasses_fromdict-python | b84d628c1f69c6e19b35e5ef9eecfa88d5e57ca0 | [
"MIT"
] | null | null | null | tests/test_default.py | Cologler/dataclasses_fromdict-python | b84d628c1f69c6e19b35e5ef9eecfa88d5e57ca0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (c) 2019~2999 - Cologler <skyoflw@gmail.com>
# ----------
#
# ----------
from typing import List, Tuple
from dataclasses import dataclass, asdict
from dataclasses_fromdict import from_dict
@dataclass
class Point:
x: int
y: int
@dataclass
class PointList:
items: Li... | 20.877193 | 82 | 0.557143 |
a4989780b83a2e0446ec922fb67728a761d51bcf | 11,629 | py | Python | src/m5_more_sequences.py | smileyle/12-MoreSequences | e80814b5275ad7fcea934b5f86ab0f938bf10742 | [
"MIT"
] | null | null | null | src/m5_more_sequences.py | smileyle/12-MoreSequences | e80814b5275ad7fcea934b5f86ab0f938bf10742 | [
"MIT"
] | null | null | null | src/m5_more_sequences.py | smileyle/12-MoreSequences | e80814b5275ad7fcea934b5f86ab0f938bf10742 | [
"MIT"
] | null | null | null | """
This module lets you practice various patterns
for ITERATING through SEQUENCES, including:
-- Beginning to end
-- Other ranges (e.g., backwards and every-3rd-item)
-- The COUNT/SUM/etc pattern
-- The FIND pattern (via LINEAR SEARCH)
Authors: David Mutchler, Valerie Galluzzi, Mark Hays, Amanda Stouder,
... | 36.227414 | 72 | 0.524895 |
89d2a44563c4aef42933c44e98f1a0572e29cf58 | 329 | py | Python | django_learning/dim_sum/migrations/0006_remove_dimsumitem_tasty.py | angelptli/django-learning | f0d25e4b85526c2c092c4e4d2f108e7602db7f0d | [
"MIT"
] | null | null | null | django_learning/dim_sum/migrations/0006_remove_dimsumitem_tasty.py | angelptli/django-learning | f0d25e4b85526c2c092c4e4d2f108e7602db7f0d | [
"MIT"
] | null | null | null | django_learning/dim_sum/migrations/0006_remove_dimsumitem_tasty.py | angelptli/django-learning | f0d25e4b85526c2c092c4e4d2f108e7602db7f0d | [
"MIT"
] | null | null | null | # Generated by Django 3.2.8 on 2021-10-24 04:26
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('dim_sum', '0005_dimsumitem_tasty'),
]
operations = [
migrations.RemoveField(
model_name='dimsumitem',
name='tasty',
... | 18.277778 | 47 | 0.592705 |
09d7e262e7a785b0aca86edb3a50b85d807f3ca5 | 2,429 | py | Python | references/encase/code/OptF.py | wenh06/cinc2020 | b3757f54df86c8470e8f22f3399b4aecd64dd5d1 | [
"BSD-2-Clause"
] | 4 | 2020-10-31T07:02:37.000Z | 2021-05-24T08:11:35.000Z | references/encase/code/OptF.py | DeepPSP/cinc2020 | 38105ed9dac6554e2dd51b94e5553fb8ba22dbe6 | [
"BSD-2-Clause"
] | null | null | null | references/encase/code/OptF.py | DeepPSP/cinc2020 | 38105ed9dac6554e2dd51b94e5553fb8ba22dbe6 | [
"BSD-2-Clause"
] | 1 | 2021-05-25T14:54:31.000Z | 2021-05-25T14:54:31.000Z | # -*- coding: utf-8 -*-
"""
Created on Fri Feb 17 15:06:35 2017
@author: v-shon
"""
import numpy as np
import sklearn
from collections import Counter
class OptF(object):
def __init__(self, alpha=0.5, epochs=100):
self.alpha = alpha
self.epochs = epochs
self.theta = None
def grad... | 25.041237 | 77 | 0.533141 |
7c8d770d3a59c777f99af1fdd6a052a54f99049f | 1,537 | py | Python | run_thingview.py | sourceperl/iot.things.srv | e11a57522254c32ceb8d76fcd61947609238b88f | [
"MIT"
] | null | null | null | run_thingview.py | sourceperl/iot.things.srv | e11a57522254c32ceb8d76fcd61947609238b88f | [
"MIT"
] | null | null | null | run_thingview.py | sourceperl/iot.things.srv | e11a57522254c32ceb8d76fcd61947609238b88f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from thingview import app
import argparse
import os
if __name__ == '__main__':
# parse argument
parser = argparse.ArgumentParser(description='ThingView server')
parser.add_argument('-b', '--bind', type=str, default='0.0.0.0',
help='bi... | 38.425 | 107 | 0.593364 |
ce292420cbea8d9eae47ec1c9b212216c3975a21 | 275 | py | Python | notification/context_processors.py | alexhayes/lehins-notification | ec61fd10c708fe740639be0134ef94f012caf842 | [
"MIT"
] | null | null | null | notification/context_processors.py | alexhayes/lehins-notification | ec61fd10c708fe740639be0134ef94f012caf842 | [
"MIT"
] | null | null | null | notification/context_processors.py | alexhayes/lehins-notification | ec61fd10c708fe740639be0134ef94f012caf842 | [
"MIT"
] | null | null | null | from notification.models import Notice
def notification(request):
if request.user.is_authenticated():
return {
'notice_unseen_count': Notice.objects.unseen_count_for(
request.user, on_site=True),
}
else:
return {}
| 25 | 67 | 0.621818 |
3bbf74ea908da770960c8b4e1418d1e9f61749fc | 28,340 | py | Python | kd_splicing/kd_splicing/features.py | konovalovdmitry/catsnap | d5f1d7c37dcee1ad3fee2cdc12a3b44b56f4c63f | [
"MIT"
] | null | null | null | kd_splicing/kd_splicing/features.py | konovalovdmitry/catsnap | d5f1d7c37dcee1ad3fee2cdc12a3b44b56f4c63f | [
"MIT"
] | null | null | null | kd_splicing/kd_splicing/features.py | konovalovdmitry/catsnap | d5f1d7c37dcee1ad3fee2cdc12a3b44b56f4c63f | [
"MIT"
] | 1 | 2021-09-30T08:06:20.000Z | 2021-09-30T08:06:20.000Z | from __future__ import annotations
import itertools
import multiprocessing
import os
import pickle
import string
import uuid
from collections import defaultdict
from dataclasses import dataclass, field
from functools import partial
from itertools import chain
from multiprocessing import get_context
from typing import ... | 38.663029 | 155 | 0.669584 |
0871b143c0ff1017ee382c4bc7dad0e84be1b480 | 16,220 | py | Python | DSN/Malargue/__init__.py | SDRAST/Data_Reduction | f007d716b5c28c086910a81206cffaf37ff6368c | [
"Apache-2.0"
] | null | null | null | DSN/Malargue/__init__.py | SDRAST/Data_Reduction | f007d716b5c28c086910a81206cffaf37ff6368c | [
"Apache-2.0"
] | null | null | null | DSN/Malargue/__init__.py | SDRAST/Data_Reduction | f007d716b5c28c086910a81206cffaf37ff6368c | [
"Apache-2.0"
] | null | null | null | """
Data_Reduction.Malargue
=======================
Subclasses for reducing data taken with DSN-like open loop recorders.
Open-loop recorders are raw IF voltage recorders that are not synchronized with
the communications between the spacecraft and the ground station. As such, they
are the most basic kind of recorder... | 42.349869 | 116 | 0.571455 |
a926087fe2800b2290846285115bc83729a08026 | 132,991 | py | Python | src/genie/libs/parser/junos/show_chassis.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 204 | 2018-06-27T00:55:27.000Z | 2022-03-06T21:12:18.000Z | src/genie/libs/parser/junos/show_chassis.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 468 | 2018-06-19T00:33:18.000Z | 2022-03-31T23:23:35.000Z | src/genie/libs/parser/junos/show_chassis.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 309 | 2019-01-16T20:21:07.000Z | 2022-03-30T12:56:41.000Z |
''' show_chassis.py
Parser for the following show commands:
* show chassis alarms
* show chassis fpc detail
* show chassis fpc pic-status
* show chassis environment routing-engine
* show chassis environment
* show chassis environment fpc
* show chassis environment component
* show cha... | 37.38853 | 141 | 0.421998 |
192ff82d87053cfd201bbbc317211620064a38ca | 1,803 | py | Python | nautobot_device_lifecycle_mgmt/choices.py | networktocode-llc/nautobot-plugin-device-lifecycle-mgmt | b960a61f8169bcc6667b4e648db4616686e188a0 | [
"Apache-2.0"
] | null | null | null | nautobot_device_lifecycle_mgmt/choices.py | networktocode-llc/nautobot-plugin-device-lifecycle-mgmt | b960a61f8169bcc6667b4e648db4616686e188a0 | [
"Apache-2.0"
] | null | null | null | nautobot_device_lifecycle_mgmt/choices.py | networktocode-llc/nautobot-plugin-device-lifecycle-mgmt | b960a61f8169bcc6667b4e648db4616686e188a0 | [
"Apache-2.0"
] | null | null | null | """Static choices uses for the Device Lifecycle plugin."""
from pycountry import countries
from nautobot.utilities.choices import ChoiceSet
class ContractTypeChoices(ChoiceSet):
"""Choices for the types of supported contracts."""
HARDWARE = "Hardware"
SOFTWARE = "Software"
CHOICES = (
(HARD... | 21.722892 | 78 | 0.552967 |
f6d3c3ec9de6504cbc9743a27a65a78bbf5d9931 | 1,259 | py | Python | arakneed/crawler.py | somarlyonks/crawler | 466e64b2e743d98e4dbe7dafdc4a4e0af2b21e42 | [
"MIT"
] | null | null | null | arakneed/crawler.py | somarlyonks/crawler | 466e64b2e743d98e4dbe7dafdc4a4e0af2b21e42 | [
"MIT"
] | null | null | null | arakneed/crawler.py | somarlyonks/crawler | 466e64b2e743d98e4dbe7dafdc4a4e0af2b21e42 | [
"MIT"
] | 1 | 2021-06-02T03:52:49.000Z | 2021-06-02T03:52:49.000Z | import asyncio
from .shared import Config
from .logger import Logger
from .cacher import Cacher
from .visitor import Visitor
from .spider import Spider
from .scheduler import Scheduler
class Crawler:
Logger = Logger
Cacher = Cacher
Scheduler = Scheduler
Visitor = Visitor
Spider = Spider
def... | 29.27907 | 87 | 0.675933 |
d27783f71dc1fe5a1b53d2ff6174c181d61ccae4 | 5,586 | py | Python | sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2019_07_01/operations/_nodes_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2019_07_01/operations/_nodes_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2019_07_01/operations/_nodes_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.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 may ... | 45.786885 | 207 | 0.656284 |
97f630b84473f2f853d0b3a4b69cde2e5f002fef | 15,874 | py | Python | mmdet/models/detectors/cascade_rcnn.py | daniel616/DL | b62087bb86bcfa4cdaa692bb0ae724d416761de3 | [
"Apache-2.0"
] | 2 | 2020-03-22T14:27:38.000Z | 2020-06-20T02:35:14.000Z | mmdet/models/detectors/cascade_rcnn.py | daniel616/DL | b62087bb86bcfa4cdaa692bb0ae724d416761de3 | [
"Apache-2.0"
] | null | null | null | mmdet/models/detectors/cascade_rcnn.py | daniel616/DL | b62087bb86bcfa4cdaa692bb0ae724d416761de3 | [
"Apache-2.0"
] | null | null | null | from __future__ import division
import torch
import torch.nn as nn
from .base import BaseDetector
from .test_mixins import RPNTestMixin
from .. import builder
from ..registry import DETECTORS
from mmdet.core import (build_assigner, bbox2roi, bbox2result, build_sampler,
merge_aug_masks)
@DETE... | 41.773684 | 82 | 0.524253 |
5d4d826c217720973de23234b1ca0a75b88ac031 | 4,021 | py | Python | alipay/aop/api/request/MybankCreditCreditriskGuarschemeQueryRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/MybankCreditCreditriskGuarschemeQueryRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/MybankCreditCreditriskGuarschemeQueryRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.MybankCreditCreditriskGuarschemeQueryModel import MybankCreditCreditriskGuarschemeQueryModel
class MybankCreditCreditriskGuarschemeQ... | 27.731034 | 148 | 0.649092 |
9c7512b4ffa7fcb9caac0620a2f67894d8d8db40 | 2,605 | py | Python | examples/data_augmentation/falsifier.py | shromonag/VerifAI | ace214d1c3282ed5ea63ee3f52457e35f54ebb62 | [
"BSD-3-Clause"
] | 1 | 2020-07-27T13:32:01.000Z | 2020-07-27T13:32:01.000Z | examples/data_augmentation/falsifier.py | shromonag/VerifAI | ace214d1c3282ed5ea63ee3f52457e35f54ebb62 | [
"BSD-3-Clause"
] | null | null | null | examples/data_augmentation/falsifier.py | shromonag/VerifAI | ace214d1c3282ed5ea63ee3f52457e35f54ebb62 | [
"BSD-3-Clause"
] | null | null | null | from verifai.features.features import *
from verifai.samplers.feature_sampler import *
from verifai.falsifier import generic_falsifier
from verifai.monitor import specification_monitor
from dotmap import DotMap
from renderer.generator import genImage
from renderer.kittiLib import getLib
import pickle
# Sampling domain... | 30.647059 | 90 | 0.732054 |
5ebdad5e696666fd63dc6e24cbfb218898f3c84e | 1,604 | py | Python | sample/python/TankJoystick.py | orikuma/choreonoid-org | d63dff5fa2249a586ffb2dbdbfa0aef0081bad66 | [
"MIT"
] | null | null | null | sample/python/TankJoystick.py | orikuma/choreonoid-org | d63dff5fa2249a586ffb2dbdbfa0aef0081bad66 | [
"MIT"
] | null | null | null | sample/python/TankJoystick.py | orikuma/choreonoid-org | d63dff5fa2249a586ffb2dbdbfa0aef0081bad66 | [
"MIT"
] | null | null | null | from cnoid.Util import *
from cnoid.Base import *
from cnoid.Body import *
from cnoid.BodyPlugin import *
import math;
sceneWidget = SceneView.instance.sceneWidget
sceneWidget.setHeadLightEnabled(False)
sceneWidget.setFloorGrid(False)
sceneWidget.setWorldLightIntensity(0.1)
sceneWidget.setWorldLightAmbient(0.0)
sceneW... | 30.846154 | 73 | 0.801746 |
de291565e6ecffc7990597d8ca48ae36d1315b94 | 2,675 | py | Python | dynamics/DubinsCapture.py | SFU-MARS/optimized_dp | 4a3b33f7da29479a3bfdc61905b61c05c76e6795 | [
"MIT"
] | 41 | 2020-06-23T01:58:03.000Z | 2022-03-28T01:45:12.000Z | dynamics/DubinsCapture.py | molumitu/optimized_dp | ad1135e98cd5fb5ba4365bee37cd88808b3d4039 | [
"MIT"
] | 1 | 2021-08-01T06:58:57.000Z | 2021-08-01T06:58:57.000Z | dynamics/DubinsCapture.py | molumitu/optimized_dp | ad1135e98cd5fb5ba4365bee37cd88808b3d4039 | [
"MIT"
] | 20 | 2020-06-05T20:52:02.000Z | 2022-03-01T03:17:39.000Z | import heterocl as hcl
class DubinsCapture:
def __init__(self, x=[0,0,0], wMax=1.0, speed=1.0, dMax=1.0, uMode="max", dMode="min"):
self.x = x
self.wMax = wMax
self.speed = speed
self.dMax = dMax
self.uMode = uMode
self.dMode = dMode
def opt_ctrl(self, t, state,... | 34.74026 | 91 | 0.520748 |
3475e768dda266ee0b855e2f87c2e5fbe8d9d38e | 1,307 | py | Python | notebooks/reloader.py | LeonardoGentile/modular-notebooks-starter | b1769c2973e28a0bff41a46abe1768e791753808 | [
"CC0-1.0"
] | null | null | null | notebooks/reloader.py | LeonardoGentile/modular-notebooks-starter | b1769c2973e28a0bff41a46abe1768e791753808 | [
"CC0-1.0"
] | null | null | null | notebooks/reloader.py | LeonardoGentile/modular-notebooks-starter | b1769c2973e28a0bff41a46abe1768e791753808 | [
"CC0-1.0"
] | null | null | null | import sys
# https://stackoverflow.com/questions/49299033/how-to-force-ipython-deep-reload
def _is_module_deletable(modname, modpath):
if modname.startswith('_cython_inline'):
# Don't return cached inline compiled .PYX files
return False
for path in [sys.prefix]:
if modpath.startswith(... | 30.395349 | 79 | 0.625861 |
c1e407299ef48e7dfcc78984ff3337fecc3b88cf | 926 | py | Python | scripts/who.py | georgthegreat/psutil | f716afc81d4c9ded08b23d376612e1491d3ea5da | [
"BSD-3-Clause"
] | 8,285 | 2015-01-03T15:47:51.000Z | 2022-03-31T19:55:30.000Z | scripts/who.py | georgthegreat/psutil | f716afc81d4c9ded08b23d376612e1491d3ea5da | [
"BSD-3-Clause"
] | 1,360 | 2015-01-01T12:52:25.000Z | 2022-03-29T06:06:30.000Z | scripts/who.py | georgthegreat/psutil | f716afc81d4c9ded08b23d376612e1491d3ea5da | [
"BSD-3-Clause"
] | 1,496 | 2015-01-01T12:24:40.000Z | 2022-03-31T13:54:35.000Z | #!/usr/bin/env python3
# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
A clone of 'who' command; print information about users who are
currently logged in.
$ python3 scripts/who.py
giampaolo con... | 25.722222 | 76 | 0.605832 |
a3e7c317d993fffc752dbe3fec4651f6bf37e0b2 | 4,949 | py | Python | venv/lib/python3.6/site-packages/celery/backends/cache.py | kuldeep24680/recurring_payments | 79e589c3d3f4fb1a0791725065e2c068750ef6b2 | [
"MIT"
] | 13 | 2018-03-28T23:07:01.000Z | 2022-03-12T06:01:21.000Z | newenv/lib/python3.8/site-packages/celery/backends/cache.py | palakshivlani-11/cryptorium | eebb78c061007519e527b3d18b8df6bc13679c46 | [
"Apache-2.0"
] | 11 | 2018-06-18T15:49:07.000Z | 2021-11-25T01:45:33.000Z | newenv/lib/python3.8/site-packages/celery/backends/cache.py | palakshivlani-11/cryptorium | eebb78c061007519e527b3d18b8df6bc13679c46 | [
"Apache-2.0"
] | 5 | 2018-03-28T23:07:05.000Z | 2021-12-09T19:02:00.000Z | # -*- coding: utf-8 -*-
"""Memcached and in-memory cache result backend."""
from __future__ import absolute_import, unicode_literals
from kombu.utils.encoding import bytes_to_str, ensure_bytes
from kombu.utils.objects import cached_property
from celery.exceptions import ImproperlyConfigured
from celery.five import PY... | 29.813253 | 71 | 0.632047 |
6f1e68e8d4fe6f5f07936b0a03a69fe0f88021a6 | 2,588 | py | Python | igcollect/linux_disklatency.py | brainexe/igcollect | 12a2fa81331f305f8852b5a30c8d90d2a8895738 | [
"MIT"
] | 15 | 2016-04-13T11:13:41.000Z | 2020-12-04T17:25:43.000Z | igcollect/linux_disklatency.py | brainexe/igcollect | 12a2fa81331f305f8852b5a30c8d90d2a8895738 | [
"MIT"
] | 10 | 2016-12-01T15:15:31.000Z | 2020-05-07T13:54:57.000Z | igcollect/linux_disklatency.py | brainexe/igcollect | 12a2fa81331f305f8852b5a30c8d90d2a8895738 | [
"MIT"
] | 18 | 2016-03-16T11:06:10.000Z | 2022-03-14T14:56:05.000Z | #!/usr/bin/env python3
"""igcollect - Linux Disk I/O latency
Copyright (c) 2019 InnoGames GmbH
"""
from argparse import ArgumentParser
from subprocess import check_output
from time import time
import sys
from libvirt import (
open as libvirt_open,
libvirtError,
)
def parse_args():
parser = ArgumentParse... | 23.107143 | 77 | 0.551777 |
5bd5d81bc6a3449840f6692adccd4f32c4c7500d | 9,056 | py | Python | eFELunit/tests/test_MultipleCurrentStepTest.py | appukuttan-shailesh/eFELunit | 055385254875249293da72c1daf2d489033cb9da | [
"BSD-3-Clause"
] | null | null | null | eFELunit/tests/test_MultipleCurrentStepTest.py | appukuttan-shailesh/eFELunit | 055385254875249293da72c1daf2d489033cb9da | [
"BSD-3-Clause"
] | null | null | null | eFELunit/tests/test_MultipleCurrentStepTest.py | appukuttan-shailesh/eFELunit | 055385254875249293da72c1daf2d489033cb9da | [
"BSD-3-Clause"
] | null | null | null | """
Tests of the neuron responses to current steps of different amplitudes match experimental data.
The responses are quantified by extracting features from the voltage traces using eFEL.
Reference data (features extracted from experimental recordings) and experimental protocol configurations
are extracted from .zip... | 43.330144 | 111 | 0.622019 |
0ea2a2ed0f3a07b0fe172561d53b1f8aec157587 | 580 | py | Python | djauth/users/migrations/0002_auto_20190516_0755.py | amateur-dev/Django_CustomUser | 6bb7a8676c48d80c0817a164ca801a1008e874dc | [
"BSD-3-Clause"
] | null | null | null | djauth/users/migrations/0002_auto_20190516_0755.py | amateur-dev/Django_CustomUser | 6bb7a8676c48d80c0817a164ca801a1008e874dc | [
"BSD-3-Clause"
] | null | null | null | djauth/users/migrations/0002_auto_20190516_0755.py | amateur-dev/Django_CustomUser | 6bb7a8676c48d80c0817a164ca801a1008e874dc | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 2.2.1 on 2019-05-16 07:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='customuser',
name='condo_name',
... | 24.166667 | 74 | 0.582759 |
00d6f13e59b9965a3039d0c87470b6fe8a4945f9 | 726 | py | Python | airbyte-integrations/bases/source-acceptance-test/setup.py | onaio/airbyte | 38302e82a25f1b66742c3febfbff0668556920f2 | [
"MIT"
] | 22 | 2020-08-27T00:47:20.000Z | 2020-09-17T15:39:39.000Z | airbyte-integrations/bases/source-acceptance-test/setup.py | onaio/airbyte | 38302e82a25f1b66742c3febfbff0668556920f2 | [
"MIT"
] | 116 | 2020-08-27T01:11:27.000Z | 2020-09-19T02:47:52.000Z | airbyte-integrations/bases/source-acceptance-test/setup.py | onaio/airbyte | 38302e82a25f1b66742c3febfbff0668556920f2 | [
"MIT"
] | 1 | 2020-09-15T06:10:01.000Z | 2020-09-15T06:10:01.000Z | #
# Copyright (c) 2022 Airbyte, Inc., all rights reserved.
#
import setuptools
MAIN_REQUIREMENTS = [
"airbyte-cdk~=0.1.56",
"docker~=5.0.3",
"PyYAML~=5.4",
"icdiff~=1.9",
"inflection~=0.5",
"pdbpp~=0.10",
"pydantic~=1.6",
"pytest~=6.1",
"pytest-sugar~=0.9",
"pytest-timeout~=1.... | 21.352941 | 67 | 0.618457 |
1a060d6d04b2234d5cb26fdacf919ba7ca21edd5 | 609 | py | Python | apps/__manifest__.py | trojikman/access-addons | 5b056b4d0928e83f687ea7978de6f96f826c28a6 | [
"MIT"
] | null | null | null | apps/__manifest__.py | trojikman/access-addons | 5b056b4d0928e83f687ea7978de6f96f826c28a6 | [
"MIT"
] | null | null | null | apps/__manifest__.py | trojikman/access-addons | 5b056b4d0928e83f687ea7978de6f96f826c28a6 | [
"MIT"
] | 1 | 2020-11-24T01:29:44.000Z | 2020-11-24T01:29:44.000Z | {
"name": "Custom Apps",
"summary": """Simplify Apps Interface""",
"images": [],
"vesion": "13.0.1.0.0",
"application": False,
"author": "IT-Projects LLC, Dinar Gabbasov",
"support": "apps@itpp.dev",
"website": "https://twitter.com/gabbasov_dinar",
"category": "Access",
"license"... | 30.45 | 84 | 0.600985 |
5765a44e19e0eb1c59a99a42de28124c363e9907 | 484 | py | Python | tests/test_stats_test_correl_diff.py | ikanago/statistics.py | 3bbe3fcdd4169a56547227d5e31a61de1be68446 | [
"MIT"
] | null | null | null | tests/test_stats_test_correl_diff.py | ikanago/statistics.py | 3bbe3fcdd4169a56547227d5e31a61de1be68446 | [
"MIT"
] | null | null | null | tests/test_stats_test_correl_diff.py | ikanago/statistics.py | 3bbe3fcdd4169a56547227d5e31a61de1be68446 | [
"MIT"
] | null | null | null | from unittest import TestCase
import math
import stats_test
import stats_test_correl_diff
class TestStatsTestCorrelDiff(TestCase):
def test_stats_test_correl_diff(self):
n1 = 80
n2 = 65
r1 = 0.538
r2 = 0.743
sigificance = 0.05
(is_reject, test_stat) = stats_test_co... | 25.473684 | 73 | 0.667355 |
762ec81374cabea707cc1ddea7501dc7cc76677e | 409 | py | Python | answers/leetcode/Remove Duplicates from Sorted Array II/Remove Duplicates from Sorted Array II.py | FeiZhan/Algo-Collection | 708c4a38112e0b381864809788b9e44ac5ae4d05 | [
"MIT"
] | 3 | 2015-09-04T21:32:31.000Z | 2020-12-06T00:37:32.000Z | answers/leetcode/Remove Duplicates from Sorted Array II/Remove Duplicates from Sorted Array II.py | FeiZhan/Algo-Collection | 708c4a38112e0b381864809788b9e44ac5ae4d05 | [
"MIT"
] | null | null | null | answers/leetcode/Remove Duplicates from Sorted Array II/Remove Duplicates from Sorted Array II.py | FeiZhan/Algo-Collection | 708c4a38112e0b381864809788b9e44ac5ae4d05 | [
"MIT"
] | null | null | null | class Solution(object):
def removeDuplicates(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
prev0 = 0
prev1 = 1
for i in range(2, len(nums)):
if nums[i] != nums[prev0] or nums[i] != nums[prev1]:
prev0 += 1
p... | 25.5625 | 64 | 0.440098 |
e2f12606ffbef2c60f1eeff3fadb853d68c9bdc5 | 527 | py | Python | test/nni_test/setup.py | dutxubo/nni | c16f4e1c89b54b8b80661ef0072433d255ad2d24 | [
"MIT"
] | 9,680 | 2019-05-07T01:42:30.000Z | 2022-03-31T16:48:33.000Z | test/nni_test/setup.py | dutxubo/nni | c16f4e1c89b54b8b80661ef0072433d255ad2d24 | [
"MIT"
] | 1,957 | 2019-05-06T21:44:21.000Z | 2022-03-31T09:21:53.000Z | test/nni_test/setup.py | dutxubo/nni | c16f4e1c89b54b8b80661ef0072433d255ad2d24 | [
"MIT"
] | 1,571 | 2019-05-07T06:42:55.000Z | 2022-03-31T03:19:24.000Z | from setuptools import setup, find_packages
setup(
name="nnitest",
version="0.0.1",
author = 'Microsoft NNI team',
author_email = 'nni@microsoft.com',
description = 'Neural Network Intelligence package',
license = 'MIT',
url = 'https://github.com/Microsoft/nni',
packages=find_packages('... | 27.736842 | 56 | 0.629981 |
d4abf18a62136110b3c0b661139f7908d1cb9ac3 | 1,073 | py | Python | trivial data analysis/txt_file_recombine.py | Nemo-Cartman/trivial_data_analysis | d3494d1dd301dc11b6c752011e4661d01c43ff14 | [
"MIT"
] | 1 | 2018-07-31T15:18:37.000Z | 2018-07-31T15:18:37.000Z | trivial data analysis/txt_file_recombine.py | Nemo-Cartman/trivial_data_analysis | d3494d1dd301dc11b6c752011e4661d01c43ff14 | [
"MIT"
] | null | null | null | trivial data analysis/txt_file_recombine.py | Nemo-Cartman/trivial_data_analysis | d3494d1dd301dc11b6c752011e4661d01c43ff14 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Jul 23 20:21:18 2018
@author: GX
.txt file recombined
"""
import os
import re
def process(path):
for participant in participants:
for trial_number in trials:
trial=str(participant)+'_'+str(trial_number)
pattern=trial+r'_\... | 26.825 | 83 | 0.61137 |
ce34f8ae3ad5378b0df860d78a33473c550ea0a1 | 7,021 | py | Python | hops/distribute/parameter_server.py | tabularaza27/hops-util-py | 3e2733ebe4783f88ecf22cbeb4d8f1f8d56c65cd | [
"Apache-2.0"
] | null | null | null | hops/distribute/parameter_server.py | tabularaza27/hops-util-py | 3e2733ebe4783f88ecf22cbeb4d8f1f8d56c65cd | [
"Apache-2.0"
] | null | null | null | hops/distribute/parameter_server.py | tabularaza27/hops-util-py | 3e2733ebe4783f88ecf22cbeb4d8f1f8d56c65cd | [
"Apache-2.0"
] | null | null | null | """
Utility functions to retrieve information about available services and setting up security for the Hops platform.
These utils facilitates development by hiding complexity for programs interacting with Hops services.
"""
import os
from hops import hdfs as hopshdfs
from hops import tensorboard
from hops import devi... | 26.100372 | 138 | 0.574704 |
94e406f19327fa19084faf51f6523c3abe068772 | 1,914 | py | Python | flask/lib/python3.6/site-packages/stem/response/authchallenge.py | JOFLIX/grapevines | 34576e01184570d79cc140b42ffb71d322132da6 | [
"MIT",
"Unlicense"
] | null | null | null | flask/lib/python3.6/site-packages/stem/response/authchallenge.py | JOFLIX/grapevines | 34576e01184570d79cc140b42ffb71d322132da6 | [
"MIT",
"Unlicense"
] | 3 | 2019-07-29T09:47:34.000Z | 2019-07-29T09:47:35.000Z | flask/lib/python3.6/site-packages/stem/response/authchallenge.py | JOFLIX/grapevines | 34576e01184570d79cc140b42ffb71d322132da6 | [
"MIT",
"Unlicense"
] | null | null | null | # Copyright 2012-2017, Damian Johnson and The Tor Project
# See LICENSE for licensing information
import binascii
import stem.response
import stem.socket
import stem.util.str_tools
import stem.util.tor_tools
class AuthChallengeResponse(stem.response.ControlMessage):
"""
AUTHCHALLENGE query response.
:var str... | 33.578947 | 178 | 0.731452 |
538dee041aa7ae6257fb237b79dc3801c3c6b73a | 2,562 | py | Python | game.py | pedropaulo91/shmup-game | ebf51ffbc36c7ebc0088fcca18ab0bd9da57ee5c | [
"MIT"
] | null | null | null | game.py | pedropaulo91/shmup-game | ebf51ffbc36c7ebc0088fcca18ab0bd9da57ee5c | [
"MIT"
] | null | null | null | game.py | pedropaulo91/shmup-game | ebf51ffbc36c7ebc0088fcca18ab0bd9da57ee5c | [
"MIT"
] | null | null | null | import pygame
import game_objects
SCREEN_WIDTH = 800
SCREEN_HEIGHT = 600
FPS = 60
pygame.init()
pygame.mixer.init()
screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))
clock = pygame.time.Clock()
pygame.display.set_caption("Shmup Game")
game_objects.init()
background_image = game_objects.all_images["ba... | 24.873786 | 95 | 0.676425 |
b18180cd19a73d9e087a4a75ef084673190c4f94 | 6,288 | py | Python | S1/SI/S4/main.py | HerbeMalveillante/ecole | bebbc73cd678c58c9cd40389ea1cf229a0200308 | [
"MIT"
] | null | null | null | S1/SI/S4/main.py | HerbeMalveillante/ecole | bebbc73cd678c58c9cd40389ea1cf229a0200308 | [
"MIT"
] | null | null | null | S1/SI/S4/main.py | HerbeMalveillante/ecole | bebbc73cd678c58c9cd40389ea1cf229a0200308 | [
"MIT"
] | null | null | null | # Fichier main de gestion des ressources du robot
from micropython import const
from machine import *
from DRV8833 import *
from BME280 import *
from VL6180X import *
import pycom
import time
import os
# Variables globales pour moteurs et pont en H
DRV8833_Sleep_pin = "P20" # Pin SLEEP
DRV8833_AIN1 = ... | 32.921466 | 102 | 0.637087 |
85af36c007794fa4a407a3bcbcf23dffc16f7217 | 1,685 | py | Python | scripts/papyrus_compile.py | clayne/ConsoleUtilF4 | 0939e09bbb7ff6b06f2e076d1cf12f97f24dcb44 | [
"MIT"
] | 3 | 2021-05-09T00:44:46.000Z | 2021-11-12T14:35:48.000Z | scripts/papyrus_compile.py | clayne/ConsoleUtilF4 | 0939e09bbb7ff6b06f2e076d1cf12f97f24dcb44 | [
"MIT"
] | null | null | null | scripts/papyrus_compile.py | clayne/ConsoleUtilF4 | 0939e09bbb7ff6b06f2e076d1cf12f97f24dcb44 | [
"MIT"
] | 1 | 2021-11-10T17:16:25.000Z | 2021-11-10T17:16:25.000Z | import argparse
import os
import shutil
import subprocess
def compile(a_args):
compiler = os.path.join(a_args.f4dir, "Papyrus Compiler", "PapyrusCompiler.exe")
vanilla = os.path.join(a_args.f4dir, "Data", "Scripts", "Source", "Base")
output = os.getcwd()
flags = "Institute_Papyrus_Flags.flg"
for root, dirs, file... | 30.636364 | 126 | 0.689614 |
1a60ddd8d9b55d3215efed4a22a0981f656db1ec | 1,482 | py | Python | ioc/extra/locator/di.py | rande/python-simple-ioc | 36ddf667c1213a07a53cd4cdd708d02494e5190b | [
"Apache-2.0"
] | 13 | 2015-04-11T13:35:07.000Z | 2020-10-30T18:36:19.000Z | ioc/extra/locator/di.py | pytheons/ioc | 21aa08dfbe4596f50b5e24032426310e7904db07 | [
"Apache-2.0"
] | null | null | null | ioc/extra/locator/di.py | pytheons/ioc | 21aa08dfbe4596f50b5e24032426310e7904db07 | [
"Apache-2.0"
] | 3 | 2015-06-02T09:20:12.000Z | 2020-09-06T14:50:02.000Z | #
# Copyright 2014 Thomas Rabaix <thomas.rabaix@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 43.588235 | 166 | 0.703779 |
11533bfcb275f59a9304bb31ddcf0aa9254673b3 | 5,023 | py | Python | finrl_meta/data_processors/processor_ricequant.py | Laezerus/FinRL-Meta | 33781fee191836ecc2d5f5bb0ade968002b8de30 | [
"MIT"
] | null | null | null | finrl_meta/data_processors/processor_ricequant.py | Laezerus/FinRL-Meta | 33781fee191836ecc2d5f5bb0ade968002b8de30 | [
"MIT"
] | null | null | null | finrl_meta/data_processors/processor_ricequant.py | Laezerus/FinRL-Meta | 33781fee191836ecc2d5f5bb0ade968002b8de30 | [
"MIT"
] | 1 | 2022-01-07T15:11:43.000Z | 2022-01-07T15:11:43.000Z | from typing import List
import rqdatac as ricequant
from finrl_meta.data_processors.basic_processor import BaseProcessor
class RicequantProcessor(BaseProcessor):
def __init__(self, data_source: str, start_date: str, end_date: str, time_interval: str, **kwargs):
super().__init__(data_source, start_date, ... | 45.252252 | 115 | 0.588692 |
426bf9c18ee54247f3a7f3f460324a1cd3a549bd | 5,043 | py | Python | test/orm/test_defaults.py | gujun4990/sqlalchemy | 057bae2295feb86529a04f09cd2f3d4c2c6d88a8 | [
"MIT"
] | 1 | 2018-04-02T18:41:52.000Z | 2018-04-02T18:41:52.000Z | test/orm/test_defaults.py | gujun4990/sqlalchemy | 057bae2295feb86529a04f09cd2f3d4c2c6d88a8 | [
"MIT"
] | null | null | null | test/orm/test_defaults.py | gujun4990/sqlalchemy | 057bae2295feb86529a04f09cd2f3d4c2c6d88a8 | [
"MIT"
] | 3 | 2017-09-26T13:59:24.000Z | 2020-12-04T17:51:54.000Z | import sqlalchemy as sa
from sqlalchemy import Integer, String, ForeignKey, event
from sqlalchemy import testing
from sqlalchemy.testing.schema import Table, Column
from sqlalchemy.orm import mapper, relationship, create_session
from sqlalchemy.testing import fixtures
from sqlalchemy.testing import eq_
class TriggerD... | 34.541096 | 72 | 0.508031 |
7162b0eacd5f2976082da93ae7ec87ab5d6ea112 | 6,802 | py | Python | segmentation_rt/dl/dataloader/dataloader.py | BrouBoni/segmentation_RT | e44f4fafe23652f3122a5e65bd8515283dcfdbe0 | [
"MIT"
] | 6 | 2021-02-11T15:59:56.000Z | 2021-12-17T20:15:35.000Z | segmentation_rt/dl/dataloader/dataloader.py | liuhd073/segmentation_RT | e44f4fafe23652f3122a5e65bd8515283dcfdbe0 | [
"MIT"
] | null | null | null | segmentation_rt/dl/dataloader/dataloader.py | liuhd073/segmentation_RT | e44f4fafe23652f3122a5e65bd8515283dcfdbe0 | [
"MIT"
] | 3 | 2021-04-09T17:08:02.000Z | 2021-08-03T07:20:20.000Z | """
Implementation of two dataloader, one for the training and the other one for inference.
Both are based on 3D patch samplers allowing a less greedy memory consumption.
"""
import torch
import torch.utils.data
import torchio as tio
from segmentation_rt.util.util import get_subjects
class DatasetSingle:
"""
... | 34.704082 | 114 | 0.639812 |
5370c8cfadc7e9fe8ae9d663db8d2859d2340b2e | 246 | py | Python | generate.py | lawreka/montagarticlernn | f3b7829f36fcf711891601a879d66136db8ada74 | [
"MIT"
] | 1 | 2020-05-25T16:25:17.000Z | 2020-05-25T16:25:17.000Z | generate.py | lawreka/montagarticlernn | f3b7829f36fcf711891601a879d66136db8ada74 | [
"MIT"
] | null | null | null | generate.py | lawreka/montagarticlernn | f3b7829f36fcf711891601a879d66136db8ada74 | [
"MIT"
] | null | null | null | import gpt_2_simple as gpt2
sess = gpt2.start_tf_sess()
gpt2.load_gpt2(sess, run_name="montagmodel")
gpt2.generate_to_file(sess, destination_path='montagarticlernn-temp0-5-100samples.txt', nsamples=100, temperature=0.5, run_name="montagmodel")
| 35.142857 | 142 | 0.808943 |
02787fc720519795820a304a33a699951eaf6640 | 32,742 | py | Python | libs/Theano/theano/sandbox/cuda/tests/test_opt.py | dendisuhubdy/attention-lvcsr | 598d487c118e66875fdd625baa84ed29d283b800 | [
"MIT"
] | 295 | 2015-09-25T21:15:04.000Z | 2022-01-13T01:16:18.000Z | libs/Theano/theano/sandbox/cuda/tests/test_opt.py | shenshenzhanzhan/attention-lvcsr | 598d487c118e66875fdd625baa84ed29d283b800 | [
"MIT"
] | 21 | 2015-10-28T19:06:32.000Z | 2022-03-11T23:13:05.000Z | libs/Theano/theano/sandbox/cuda/tests/test_opt.py | shenshenzhanzhan/attention-lvcsr | 598d487c118e66875fdd625baa84ed29d283b800 | [
"MIT"
] | 114 | 2015-09-26T21:23:02.000Z | 2021-11-19T02:36:41.000Z | from __future__ import print_function
import operator
import sys
import unittest
import numpy
# Skip test if cuda_ndarray is not available.
from nose.plugins.skip import SkipTest
from nose.tools import assert_raises
import theano
from six.moves import reduce
from theano.compile.pfunc import pfunc
from theano import c... | 37.164586 | 225 | 0.636033 |
1bd78e46affdd1b3871e371ba147694a446cd797 | 8,587 | py | Python | third_party/oauth2client/tools.py | asysc2020/contentbox | 5c155976e0ce7ea308d62293ab89624d97b21d09 | [
"Apache-2.0"
] | 39 | 2015-06-10T23:18:07.000Z | 2021-10-21T04:29:06.000Z | third_party/oauth2client/tools.py | asysc2020/contentbox | 5c155976e0ce7ea308d62293ab89624d97b21d09 | [
"Apache-2.0"
] | 2 | 2016-08-22T12:38:10.000Z | 2017-01-26T18:37:33.000Z | third_party/oauth2client/tools.py | asysc2020/contentbox | 5c155976e0ce7ea308d62293ab89624d97b21d09 | [
"Apache-2.0"
] | 26 | 2015-06-10T22:09:15.000Z | 2021-06-27T15:45:15.000Z | # Copyright (C) 2013 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 35.192623 | 81 | 0.691278 |
92abea78f3dbfae0bf6417d051884922b349c432 | 3,503 | py | Python | keras_retinanet/backend/tensorflow_backend.py | pauldes/keras-retinanet | 097600af1d4720f491582cfa1ed12d9a2d2d8096 | [
"Apache-2.0"
] | null | null | null | keras_retinanet/backend/tensorflow_backend.py | pauldes/keras-retinanet | 097600af1d4720f491582cfa1ed12d9a2d2d8096 | [
"Apache-2.0"
] | null | null | null | keras_retinanet/backend/tensorflow_backend.py | pauldes/keras-retinanet | 097600af1d4720f491582cfa1ed12d9a2d2d8096 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2017-2018 Fizyr (https://fizyr.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in w... | 31.558559 | 101 | 0.693977 |
5592f9552a6485110da7f9759464210699a1ff2c | 978 | py | Python | rules/php/CVI_1014.py | kingsec666/Cobra-W | 322e7f04a929f48bd67242eb557ca23b176ffdbb | [
"MIT"
] | 17 | 2018-12-09T01:57:53.000Z | 2021-07-14T07:25:17.000Z | rules/php/CVI_1014.py | zer0yu/Cobra-W | 7e8b5b99eac3bbfb6a8f8a6c822689498c7381ea | [
"MIT"
] | 1 | 2021-11-15T17:52:13.000Z | 2021-11-15T17:52:13.000Z | rules/php/CVI_1014.py | devsecops-SRC/Cobra-W | 322e7f04a929f48bd67242eb557ca23b176ffdbb | [
"MIT"
] | 3 | 2018-11-07T14:39:16.000Z | 2021-03-18T01:39:26.000Z | # -*- coding: utf-8 -*-
"""
CVI-1014
~~~~
variable shadowing
:author: LoRexxar <LoRexxar@gmail.com>
:homepage: https://github.com/LoRexxar/cobra
:license: MIT, see LICENSE for more details.
:copyright: Copyright (c) 2017 LoRexxar. All rights reserved
"""
from cobra.file import file... | 21.26087 | 78 | 0.592025 |
dcaff7c7758dba88235974a62bfe01268572e3e0 | 3,753 | py | Python | avm_client/exceptions.py | ENBISYS/avmPython | daa3686ea431e752687c915e2f5b6f65b6c77130 | [
"Unlicense"
] | null | null | null | avm_client/exceptions.py | ENBISYS/avmPython | daa3686ea431e752687c915e2f5b6f65b6c77130 | [
"Unlicense"
] | null | null | null | avm_client/exceptions.py | ENBISYS/avmPython | daa3686ea431e752687c915e2f5b6f65b6c77130 | [
"Unlicense"
] | null | null | null | # coding: utf-8
"""
AVM
This is api for AVM (automated valuation machine) # noqa: E501
The version of the OpenAPI document: 1.0.0
Contact: info@enbisys.com
Generated by: https://openapi-generator.tech
"""
import six
class OpenApiException(Exception):
"""The base exception class for all O... | 30.762295 | 74 | 0.568878 |
9f73291db98b0f088dde14e0040f83879e60fc89 | 3,655 | py | Python | LocalDataStore/main_logic.py | VamsiMudaliar/File-Based-Key-Valued-DataStore- | 36f39476e521c1a75970a32465ff829c7e218920 | [
"MIT"
] | 1 | 2020-12-31T17:14:56.000Z | 2020-12-31T17:14:56.000Z | LocalDataStore/main_logic.py | VamsiMudaliar/File-Based-Key-Valued-DataStore- | 36f39476e521c1a75970a32465ff829c7e218920 | [
"MIT"
] | null | null | null | LocalDataStore/main_logic.py | VamsiMudaliar/File-Based-Key-Valued-DataStore- | 36f39476e521c1a75970a32465ff829c7e218920 | [
"MIT"
] | 1 | 2021-01-21T08:33:47.000Z | 2021-01-21T08:33:47.000Z | import time
from threading import Thread
import json
from json.decoder import JSONDecodeError
FILE_LIMIT = 1024*1024*1024 # 1GB
KEY_LIMIT = 32 # max 32 characters
VALUE_LIMIT = 16*1024*1024 #16KB
MAX_CONNECTIONS = 1 # no of connections
DEFAULT_LOCATION = "./"
cache={} # our local DB
PATH_FORMED = DEFAULT_LOCAT... | 21.755952 | 128 | 0.617237 |
eb96981c5ab5df6f3a806738df818f322c9df94f | 15,441 | py | Python | live/RpycHost/rpyc/core/stream.py | faroit/midihack | 5ce927576c4967499e164d95262a8391173c23ab | [
"CC0-1.0"
] | 4 | 2016-03-13T14:14:21.000Z | 2016-09-11T11:54:36.000Z | live/RpycHost/rpyc/core/stream.py | faroit/midihack | 5ce927576c4967499e164d95262a8391173c23ab | [
"CC0-1.0"
] | null | null | null | live/RpycHost/rpyc/core/stream.py | faroit/midihack | 5ce927576c4967499e164d95262a8391173c23ab | [
"CC0-1.0"
] | 1 | 2018-09-09T08:37:44.000Z | 2018-09-09T08:37:44.000Z | """
An abstraction layer over OS-dependent file-like objects, that provides a
consistent view of a *duplex byte stream*.
"""
import sys
import os
import socket
import time
import errno
from rpyc.lib import safe_import
from rpyc.lib.compat import select, select_error, BYTES_LITERAL, get_exc_errno, maxint
win32file = saf... | 32.783439 | 100 | 0.568746 |
6b17f6957b8352a6bc63c504c285cdc81eeae51c | 583 | py | Python | utils/logger.py | denn-s/SimCLR | e2239ac52464b1271c3b8ad1ec4eb26f3b73c7d4 | [
"MIT"
] | 5 | 2020-08-24T17:57:51.000Z | 2021-06-06T18:18:19.000Z | utils/logger.py | denn-s/SimCLR | e2239ac52464b1271c3b8ad1ec4eb26f3b73c7d4 | [
"MIT"
] | null | null | null | utils/logger.py | denn-s/SimCLR | e2239ac52464b1271c3b8ad1ec4eb26f3b73c7d4 | [
"MIT"
] | 1 | 2020-08-29T00:35:36.000Z | 2020-08-29T00:35:36.000Z | import logging
def setup_logger(logger_name, log_file_path):
logger = logging.getLogger(logger_name)
logger.setLevel(logging.DEBUG)
# create console handler
ch = logging.StreamHandler()
ch.setLevel(logging.INFO)
# create formatter
formatter = logging.Formatter('%(asctime)s - %(name)s - %... | 24.291667 | 89 | 0.703259 |
42d890ba20060b9b5e70ae72d8b1f482b27b2343 | 972 | py | Python | buildroot-2017.08/support/testing/tests/core/test_rootfs_overlay.py | xregist/v3s-linux-sdk | a2b013e3959662d65650a13fc23ec1cd503865eb | [
"Apache-2.0"
] | 4 | 2020-04-28T02:12:34.000Z | 2021-02-23T01:57:39.000Z | buildroot-2017.08/support/testing/tests/core/test_rootfs_overlay.py | xregist/v3s-linux-sdk | a2b013e3959662d65650a13fc23ec1cd503865eb | [
"Apache-2.0"
] | null | null | null | buildroot-2017.08/support/testing/tests/core/test_rootfs_overlay.py | xregist/v3s-linux-sdk | a2b013e3959662d65650a13fc23ec1cd503865eb | [
"Apache-2.0"
] | 5 | 2018-05-16T16:36:08.000Z | 2020-11-04T05:51:11.000Z | import os
import subprocess
import infra.basetest
def compare_file(file1, file2):
return subprocess.call(["cmp", file1, file2])
class TestRootfsOverlay(infra.basetest.BRTest):
rootfs_overlay_path = infra.filepath("tests/core/rootfs-overlay")
rootfs_overlay = "BR2_ROOTFS_OVERLAY=\"{0}1 {0}2\"".format(roo... | 34.714286 | 83 | 0.691358 |
24e9209d50eeb5ca86fcebac9c8bfd73e193fe36 | 40,950 | py | Python | stdplugins/anime.py | aashiq075/PepeBot | 5f40f4316c84ec3875bcbcd476e10448f9214f31 | [
"Apache-2.0"
] | 1 | 2020-08-09T11:43:20.000Z | 2020-08-09T11:43:20.000Z | stdplugins/anime.py | aashiq075/PepeBot | 5f40f4316c84ec3875bcbcd476e10448f9214f31 | [
"Apache-2.0"
] | null | null | null | stdplugins/anime.py | aashiq075/PepeBot | 5f40f4316c84ec3875bcbcd476e10448f9214f31 | [
"Apache-2.0"
] | null | null | null | """
Random Anime Chooser Plugin for Userbot
usage = .{anime_genre} number of times(integer)
By : - @Zero_cool7870
"""
from telethon import events
import random
action_list = [
'6 Angels ',
'12 Beast ',
'Accel World ',
'Accel World: Infinite Burst ',
'Adventures of Kotetsu ',
'Afro Samurai ',
... | 27.876106 | 82 | 0.575849 |
e09cd7cbd52a3b4f93c2b3cdffc8d9fea4e79e2d | 1,693 | py | Python | azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_criteria.py | NMijat1024/azure-sdk-for-python | c49e1d6d797dceaca81813cafb1a486d67185182 | [
"MIT"
] | 1 | 2018-07-23T08:59:24.000Z | 2018-07-23T08:59:24.000Z | azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_criteria.py | NMijat1024/azure-sdk-for-python | c49e1d6d797dceaca81813cafb1a486d67185182 | [
"MIT"
] | 1 | 2018-11-29T14:46:42.000Z | 2018-11-29T14:46:42.000Z | azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_criteria.py | NMijat1024/azure-sdk-for-python | c49e1d6d797dceaca81813cafb1a486d67185182 | [
"MIT"
] | 1 | 2018-08-28T14:36:47.000Z | 2018-08-28T14:36:47.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 ... | 36.021277 | 136 | 0.647962 |
1a9aa533f74db700240b7d73ce67288e918ae570 | 5,020 | py | Python | cvat/apps/engine/tests/test_sequences.py | daedaleanai/cvat | d0df08c3f66a39324bd0b82683ee4cef05ed9c53 | [
"MIT"
] | 1 | 2021-07-12T20:34:31.000Z | 2021-07-12T20:34:31.000Z | cvat/apps/engine/tests/test_sequences.py | daedaleanai/cvat | d0df08c3f66a39324bd0b82683ee4cef05ed9c53 | [
"MIT"
] | 8 | 2020-05-04T09:44:13.000Z | 2021-10-14T12:54:40.000Z | cvat/apps/engine/tests/test_sequences.py | daedaleanai/cvat | d0df08c3f66a39324bd0b82683ee4cef05ed9c53 | [
"MIT"
] | 1 | 2020-07-15T09:30:13.000Z | 2020-07-15T09:30:13.000Z | import pathlib
import random
import re
from unittest import TestCase
from cvat.apps.engine.ddln.sequences import group, distribute, extend_assignees
from cvat.apps.engine.utils import group_on_delimiter, natural_order
sequences_dir = pathlib.Path(__file__).parent / "data" / "sequences"
alice, bob, chris, david, eva ... | 28.685714 | 91 | 0.540637 |
c0453b11dfdb40dfe5d62a102770dec552a0cb70 | 4,148 | py | Python | script.py | othyn/url-shortcut-organiser | 5b5b32269b93e86db8e5eaa42890190345596f98 | [
"MIT"
] | null | null | null | script.py | othyn/url-shortcut-organiser | 5b5b32269b93e86db8e5eaa42890190345596f98 | [
"MIT"
] | null | null | null | script.py | othyn/url-shortcut-organiser | 5b5b32269b93e86db8e5eaa42890190345596f98 | [
"MIT"
] | null | null | null | # As this is my first excursion into Python, this script is heavily (OTT) documented
"""Simple script to sort out my internet shortcut archive.
This will eventually lead to *smrt* sorting of url's into categories/types for easy reference.
Stores data into a JSON format."""
# Docstring, required for C0111
# Provi... | 33.451613 | 100 | 0.72107 |
6fd7dcd0093203c85f6e82a35169ca4d8fc18d96 | 49,953 | py | Python | src/third_party/wiredtiger/dist/api_data.py | stevelyall/mongol-db | d8046147bfe806f7acc0ec4aa70c132507b761fb | [
"Apache-2.0"
] | 1 | 2018-03-16T09:49:05.000Z | 2018-03-16T09:49:05.000Z | src/third_party/wiredtiger/dist/api_data.py | stevelyall/mongol-db | d8046147bfe806f7acc0ec4aa70c132507b761fb | [
"Apache-2.0"
] | null | null | null | src/third_party/wiredtiger/dist/api_data.py | stevelyall/mongol-db | d8046147bfe806f7acc0ec4aa70c132507b761fb | [
"Apache-2.0"
] | null | null | null | # This file is a python script that describes the WiredTiger API.
class Method:
def __init__(self, config):
self.config = config
class Config:
def __init__(self, name, default, desc, subconfig=None, **flags):
self.name = name
self.default = default
self.desc = desc
self... | 46.992474 | 80 | 0.628811 |
1d4dc85ab34da5efbe605f09594be33c61787e12 | 191 | py | Python | tests/test___init__.py | zyxue/ncbitax2lin | 95dc13f6a8ef9a18b5569b877f7f2c2cce068412 | [
"MIT"
] | 103 | 2016-11-05T19:47:03.000Z | 2022-01-13T00:47:16.000Z | tests/test___init__.py | zyxue/ncbitax2lin | 95dc13f6a8ef9a18b5569b877f7f2c2cce068412 | [
"MIT"
] | 14 | 2017-02-28T20:56:41.000Z | 2022-03-20T18:58:05.000Z | tests/test___init__.py | zyxue/ncbitax2lin | 95dc13f6a8ef9a18b5569b877f7f2c2cce068412 | [
"MIT"
] | 21 | 2017-05-16T08:44:47.000Z | 2021-11-12T03:31:19.000Z | """tests for __init__.py"""
# pylint: disable=protected-access, missing-function-docstring
from ncbitax2lin import __version__
def test_version() -> None:
assert __version__ == "2.0.2"
| 23.875 | 62 | 0.73822 |
aa452e2afe481acddb6986a9fad72e52e6b0cbc5 | 34,420 | py | Python | poem/core/keypoint_utils_test.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 2 | 2021-02-06T12:31:50.000Z | 2021-02-06T12:37:11.000Z | poem/core/keypoint_utils_test.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 1 | 2022-02-10T06:34:18.000Z | 2022-02-10T06:34:18.000Z | poem/core/keypoint_utils_test.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 1 | 2021-07-30T22:42:46.000Z | 2021-07-30T22:42:46.000Z | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 43.459596 | 80 | 0.463364 |
57b4bf84a62ff147e6056bb69765498a2a71c31a | 4,662 | py | Python | database/models.py | joshbarrass/SkyrimCrafting | cdadbbb09b0eed01e4ed6be631c1ee3cb8cb4d2f | [
"MIT"
] | null | null | null | database/models.py | joshbarrass/SkyrimCrafting | cdadbbb09b0eed01e4ed6be631c1ee3cb8cb4d2f | [
"MIT"
] | 4 | 2020-10-01T14:39:46.000Z | 2020-10-01T18:33:27.000Z | database/models.py | joshbarrass/SkyrimCrafting | cdadbbb09b0eed01e4ed6be631c1ee3cb8cb4d2f | [
"MIT"
] | null | null | null | from sqlalchemy import Column, Integer, Float, String, Boolean, ForeignKey
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship
Base = declarative_base()
class Item(Base):
__tablename__ = "items"
id = Column(Integer, primary_key=True)
name = Column(String)
v... | 29.884615 | 172 | 0.614114 |
772c66d44a2b9ddc9d871461748b7dde7ca886fc | 1,311 | py | Python | NEST-14.0-FPGA/examples/nest/music/minimalmusicsetup_receivenest.py | OpenHEC/SNN-simulator-on-PYNQcluster | 14f86a76edf4e8763b58f84960876e95d4efc43a | [
"MIT"
] | 45 | 2019-12-09T06:45:53.000Z | 2022-01-29T12:16:41.000Z | NEST-14.0-FPGA/examples/nest/music/minimalmusicsetup_receivenest.py | zlchai/SNN-simulator-on-PYNQcluster | 14f86a76edf4e8763b58f84960876e95d4efc43a | [
"MIT"
] | 2 | 2020-05-23T05:34:21.000Z | 2021-09-08T02:33:46.000Z | NEST-14.0-FPGA/examples/nest/music/minimalmusicsetup_receivenest.py | OpenHEC/SNN-simulator-on-PYNQcluster | 14f86a76edf4e8763b58f84960876e95d4efc43a | [
"MIT"
] | 10 | 2019-12-09T06:45:59.000Z | 2021-03-25T09:32:56.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# minimalmusicsetup_receivenest.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST 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 Foundat... | 27.893617 | 71 | 0.7254 |
283ad86c9732fcf50dbc3629eb6e6878bbbd0e2c | 14,334 | py | Python | paxes_nova/virt/ibmpowervm/vif/ivm/utils.py | windskyer/k_nova | 63579dbfcfcda5def5b588a6728bfff85ad4564e | [
"Apache-2.0"
] | null | null | null | paxes_nova/virt/ibmpowervm/vif/ivm/utils.py | windskyer/k_nova | 63579dbfcfcda5def5b588a6728bfff85ad4564e | [
"Apache-2.0"
] | null | null | null | paxes_nova/virt/ibmpowervm/vif/ivm/utils.py | windskyer/k_nova | 63579dbfcfcda5def5b588a6728bfff85ad4564e | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# =================================================================
# =================================================================
"""
IBMPowerVM VIF driver utilities
"""
import logging
from paxes_nova.virt.ibmpowervm.vif.common import ras
from paxes_nova import _
... | 32.283784 | 79 | 0.626552 |
fd9790e026556bc31e62da5c507cbb2b34e9f5c9 | 8,468 | py | Python | skyportal/tests/api/test_annotations.py | rossbar/skyportal | 1f3cbd3700e25286a69b2d183776dfd3a064559d | [
"BSD-3-Clause"
] | null | null | null | skyportal/tests/api/test_annotations.py | rossbar/skyportal | 1f3cbd3700e25286a69b2d183776dfd3a064559d | [
"BSD-3-Clause"
] | null | null | null | skyportal/tests/api/test_annotations.py | rossbar/skyportal | 1f3cbd3700e25286a69b2d183776dfd3a064559d | [
"BSD-3-Clause"
] | null | null | null | import uuid
from skyportal.tests import api
def test_post_without_origin_fails(annotation_token, public_source, public_group):
# this should not work, since no "origin" is given
status, data = api(
'POST',
'annotation',
data={
'obj_id': public_source.id,
'data'... | 30.242857 | 87 | 0.607818 |
fe76062ab01d453d064c1ba906cf1181f6a47190 | 5,410 | py | Python | autorest/codegen/models/operation_group.py | Azure/autorest.python | c36f5c1a2d614a1eeba6fec6a2c02517f2d1cce7 | [
"MIT"
] | 35 | 2018-04-03T12:15:53.000Z | 2022-03-11T14:03:34.000Z | autorest/codegen/models/operation_group.py | Azure/autorest.python | c36f5c1a2d614a1eeba6fec6a2c02517f2d1cce7 | [
"MIT"
] | 652 | 2017-08-28T22:44:41.000Z | 2022-03-31T21:20:31.000Z | autorest/codegen/models/operation_group.py | Azure/autorest.python | c36f5c1a2d614a1eeba6fec6a2c02517f2d1cce7 | [
"MIT"
] | 29 | 2017-08-28T20:57:01.000Z | 2022-03-11T14:03:38.000Z | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
import log... | 39.779412 | 111 | 0.637338 |
262e4f9b5a8764196ddae8178ea26ef0756230ab | 1,920 | py | Python | configs/mask_rcnn/mask_rcnn_r50_caffe_fpn_poly_1x_coco_v1.py | fengyouliang/wheat_detection | d056123426a1260c29b486cbb8e44a88a0a3c5bc | [
"Apache-2.0"
] | null | null | null | configs/mask_rcnn/mask_rcnn_r50_caffe_fpn_poly_1x_coco_v1.py | fengyouliang/wheat_detection | d056123426a1260c29b486cbb8e44a88a0a3c5bc | [
"Apache-2.0"
] | null | null | null | configs/mask_rcnn/mask_rcnn_r50_caffe_fpn_poly_1x_coco_v1.py | fengyouliang/wheat_detection | d056123426a1260c29b486cbb8e44a88a0a3c5bc | [
"Apache-2.0"
] | null | null | null | _base_ = './mask_rcnn_r50_fpn_1x_coco.py'
model = dict(
pretrained='open-mmlab://resnet50_caffe_bgr',
backbone=dict(norm_cfg=dict(requires_grad=False), style='caffe'),
rpn_head=dict(
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0)),
roi_head=dict(
bbox_roi_ext... | 36.923077 | 79 | 0.597917 |
7d969dd8980f8d04cd690d1f230c3a3e026d75bb | 278 | py | Python | test_compat.py | yong422/vistir | 94301fa5fe4d9c51e50834688866940af455e927 | [
"ISC"
] | null | null | null | test_compat.py | yong422/vistir | 94301fa5fe4d9c51e50834688866940af455e927 | [
"ISC"
] | null | null | null | test_compat.py | yong422/vistir | 94301fa5fe4d9c51e50834688866940af455e927 | [
"ISC"
] | null | null | null | # -*- coding: utf-8 -*-
from vistir.compat import fs_decode, fs_encode
def test_fs_encode():
# This fails in the normal backports library:
# see https://github.com/PiDelport/backports.os/issues/13
assert fs_decode(fs_encode(u"unicode\u0141")) == u"unicode\u0141"
| 27.8 | 69 | 0.71223 |
71b385113c13ee3ca4d0e92f32e64ffcce2cf84c | 1,680 | py | Python | chineselm/ch_demo.py | xrick/Chinese-Character-Level_Langugae-Model | 46d958fb44d333424c6a2a9a04bee6582653efa6 | [
"MIT"
] | 1 | 2018-11-04T04:49:37.000Z | 2018-11-04T04:49:37.000Z | chineselm/ch_demo.py | xrick/Chinese-Character-Level_Langugae-Model | 46d958fb44d333424c6a2a9a04bee6582653efa6 | [
"MIT"
] | 1 | 2021-09-29T17:31:51.000Z | 2021-09-29T17:31:51.000Z | chineselm/ch_demo.py | xrick/Chinese-Character-Level_Langugae-Model | 46d958fb44d333424c6a2a9a04bee6582653efa6 | [
"MIT"
] | null | null | null | from pickle import load
from keras.models import load_model
from keras.utils import to_categorical
from keras.preprocessing.sequence import pad_sequences
# generate a sequence of characters with a language model
# load the model
model = load_model('ch_model.h5')
# load the mapping
mapping = load(open('mapping.pkl', '... | 30 | 73 | 0.725595 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.