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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
aaf6592ffedd87c0e45e8d377ab1d151693ac9a1 | 5,907 | py | Python | 01_scikit-learn-intelex_Intro/lab/sklearn_sycl.py | IntelSoftware/scikit-learn_essentials | 93bbedb8e44cef27061440b49449bc49fc99f0f0 | [
"MIT"
] | 1 | 2021-12-09T21:31:38.000Z | 2021-12-09T21:31:38.000Z | 01_scikit-learn-intelex_Intro/lab/sklearn_sycl.py | IntelSoftware/scikit-learn_essentials | 93bbedb8e44cef27061440b49449bc49fc99f0f0 | [
"MIT"
] | null | null | null | 01_scikit-learn-intelex_Intro/lab/sklearn_sycl.py | IntelSoftware/scikit-learn_essentials | 93bbedb8e44cef27061440b49449bc49fc99f0f0 | [
"MIT"
] | null | null | null |
#===============================================================================
# Copyright 2014-2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.ap... | 30.606218 | 80 | 0.603183 |
41dd4b2117a196880837e1475942c79033a752f5 | 3,439 | py | Python | v0.7/language/bert/pytorch_SUT.py | nvpohanh/inference | 268be50a46ca8f789d89445fbe08882a417460dc | [
"Apache-2.0"
] | 1 | 2020-12-13T08:49:49.000Z | 2020-12-13T08:49:49.000Z | v0.7/language/bert/pytorch_SUT.py | egallen/inference | 6ccedff382be9270df8a4f4d525d46ca2044d69a | [
"Apache-2.0"
] | null | null | null | v0.7/language/bert/pytorch_SUT.py | egallen/inference | 6ccedff382be9270df8a4f4d525d46ca2044d69a | [
"Apache-2.0"
] | 1 | 2020-07-02T03:45:35.000Z | 2020-07-02T03:45:35.000Z | # coding=utf-8
# Copyright (c) 2020 NVIDIA CORPORATION. All rights reserved.
# Copyright 2018 The Google AI Language Team Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http... | 40.458824 | 134 | 0.689735 |
e65150eb0f958d279a67c9f06359545dcb052024 | 1,752 | py | Python | openpype/hosts/maya/plugins/publish/validate_renderlayer_aovs.py | Tilix4/OpenPype | 8909bd890170880aa7ec8b673abaa25a9bdf40f2 | [
"MIT"
] | 1 | 2022-02-08T15:40:41.000Z | 2022-02-08T15:40:41.000Z | openpype/hosts/maya/plugins/publish/validate_renderlayer_aovs.py | zafrs/OpenPype | 4b8e7e1ed002fc55b31307efdea70b0feaed474f | [
"MIT"
] | 2 | 2022-03-18T01:46:03.000Z | 2022-03-18T01:46:16.000Z | openpype/hosts/maya/plugins/publish/validate_renderlayer_aovs.py | zafrs/OpenPype | 4b8e7e1ed002fc55b31307efdea70b0feaed474f | [
"MIT"
] | null | null | null | import pyblish.api
import openpype.hosts.maya.api.action
from openpype.pipeline import legacy_io
import openpype.api
class ValidateRenderLayerAOVs(pyblish.api.InstancePlugin):
"""Validate created AOVs / RenderElement is registered in the database
Each render element is registered as a subset which is format... | 29.694915 | 80 | 0.662671 |
76d050be9b626c3147949602b2313d8960b0f788 | 18,146 | py | Python | experiments/train.py | f0k/birdclef2018 | 745ee8b2b8994ad745edf0fd4e81fd727bd710fb | [
"MIT"
] | 18 | 2018-07-11T07:53:45.000Z | 2021-05-19T15:37:32.000Z | experiments/train.py | f0k/birdclef2018 | 745ee8b2b8994ad745edf0fd4e81fd727bd710fb | [
"MIT"
] | null | null | null | experiments/train.py | f0k/birdclef2018 | 745ee8b2b8994ad745edf0fd4e81fd727bd710fb | [
"MIT"
] | 4 | 2020-06-24T07:52:38.000Z | 2021-05-19T15:38:18.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Trains a neural network for bird classification.
For usage information, call with --help.
Author: Jan Schlüter
"""
from __future__ import print_function
import sys
import os
import io
from argparse import ArgumentParser
try:
import cPickle as pickle
except Impo... | 42.397196 | 99 | 0.585473 |
064ae722275392c3e11c7325511cfebfcc839a48 | 994 | py | Python | *Web_Development/*Django/*tutorial/official_intro/polls/models.py | jasjung/Python | dfe8f490aff610cc295fac54c117b7afe891bb8e | [
"MIT"
] | 1 | 2020-06-08T10:58:36.000Z | 2020-06-08T10:58:36.000Z | *Web_Development/*Django/*tutorial/official_intro/polls/models.py | jasjung/Python | dfe8f490aff610cc295fac54c117b7afe891bb8e | [
"MIT"
] | null | null | null | *Web_Development/*Django/*tutorial/official_intro/polls/models.py | jasjung/Python | dfe8f490aff610cc295fac54c117b7afe891bb8e | [
"MIT"
] | null | null | null | import datetime
from django.db import models
from django.utils import timezone
class Question(models.Model):
question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')
def __str__(self):
return self.question_text
# v1
# def was_published_recently(sel... | 34.275862 | 77 | 0.717304 |
707e75900bee304a892b2aec64330e1d1f3c8ca8 | 3,331 | py | Python | test/unittests/test_AvErosion.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | null | null | null | test/unittests/test_AvErosion.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | 6 | 2018-07-24T22:46:28.000Z | 2018-07-29T19:13:09.000Z | test/unittests/test_AvErosion.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | 1 | 2018-07-24T18:22:01.000Z | 2018-07-24T18:22:01.000Z | import numpy as np
from VariableUnittest import VariableUnitTest
from gwlfe.MultiUse_Fxns.Erosion import AvErosion
class TestAvErosion(VariableUnitTest):
def test_elementwise_AvErosion(self):
z = self.z
np.testing.assert_array_almost_equal(
np.load(self.basepath + "/AvErosion.npy"),
... | 66.62 | 120 | 0.509457 |
7ee57072ae51b74380692cf62f115b378290341f | 758 | py | Python | src/pytorch_adapt/containers/models.py | KevinMusgrave/pytorch-adapt | ff1491e1bfcc586afb8ee619712c8816ddf10358 | [
"MIT"
] | 131 | 2021-11-19T14:29:59.000Z | 2022-03-26T16:33:30.000Z | src/pytorch_adapt/containers/models.py | KevinMusgrave/pytorch-adapt | ff1491e1bfcc586afb8ee619712c8816ddf10358 | [
"MIT"
] | 28 | 2021-11-19T17:31:56.000Z | 2022-03-02T18:42:51.000Z | src/pytorch_adapt/containers/models.py | KevinMusgrave/pytorch-adapt | ff1491e1bfcc586afb8ee619712c8816ddf10358 | [
"MIT"
] | 8 | 2021-11-22T17:22:45.000Z | 2022-03-08T15:49:28.000Z | from .base_container import BaseContainer
class Models(BaseContainer):
"""
A container with some functions specific to models
that have optimizable parameters.
"""
def train(self):
"""
Sets all models to train mode.
"""
for v in self.values():
v.train()... | 20.486486 | 54 | 0.498681 |
66fce686c3a59f71fe79066905a50fae749bdd5f | 3,435 | py | Python | Config.py | Raibows/bilibiliRankSpider | 074c7c03181c7360800ccaa394d0238b9d114fe7 | [
"MIT"
] | 5 | 2019-08-21T03:36:33.000Z | 2019-08-29T07:14:47.000Z | Config.py | Raibows/bilibiliRankML | 074c7c03181c7360800ccaa394d0238b9d114fe7 | [
"MIT"
] | 1 | 2019-07-18T06:57:38.000Z | 2019-07-18T06:57:38.000Z | Config.py | Raibows/bilibiliSpider | 074c7c03181c7360800ccaa394d0238b9d114fe7 | [
"MIT"
] | 1 | 2019-08-10T06:58:51.000Z | 2019-08-10T06:58:51.000Z | '''
Configuration file
'''
def print_all_config_info():
print(spider_config())
print(toolbox_config())
print(proxypool_config())
print(flaskserver_config())
def get_all_config_json():
'''
return all the config classes in Config.py with json
:return:
'''
import json
info = []
... | 25.257353 | 94 | 0.618341 |
9656570c9509fcfe267d63b99cde0e163b957914 | 10,232 | py | Python | mirdata/datasets/dali.py | AngeloMendes/mirdata | 6cd0fd740dc619ad3f583ece366bf8a31a48fe86 | [
"BSD-3-Clause"
] | null | null | null | mirdata/datasets/dali.py | AngeloMendes/mirdata | 6cd0fd740dc619ad3f583ece366bf8a31a48fe86 | [
"BSD-3-Clause"
] | null | null | null | mirdata/datasets/dali.py | AngeloMendes/mirdata | 6cd0fd740dc619ad3f583ece366bf8a31a48fe86 | [
"BSD-3-Clause"
] | null | null | null | """DALI Dataset Loader
.. admonition:: Dataset Info
:class: dropdown
DALI contains 5358 audio files with their time-aligned vocal melody.
It also contains time-aligned lyrics at four levels of granularity: notes,
words, lines, and paragraphs.
For each song, DALI also provides additional metadata:... | 29.744186 | 119 | 0.649629 |
08189cfffa2756185ccc4db357500a5c15026bb1 | 1,155 | py | Python | python2.7libs/hammer_tools/action.py | anvdev/Hammer-Tools | 0211ec837da6754e537c98624ecd07c23abab28e | [
"Apache-2.0"
] | 19 | 2019-10-09T13:48:11.000Z | 2021-06-14T01:25:23.000Z | python2.7libs/hammer_tools/action.py | anvdev/Hammer-Tools | 0211ec837da6754e537c98624ecd07c23abab28e | [
"Apache-2.0"
] | 219 | 2019-10-08T14:44:48.000Z | 2021-06-19T06:27:46.000Z | python2.7libs/hammer_tools/action.py | anvdev/Hammer-Tools | 0211ec837da6754e537c98624ecd07c23abab28e | [
"Apache-2.0"
] | 3 | 2020-02-14T06:18:06.000Z | 2020-11-25T20:47:06.000Z | import os
import hou
try:
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import *
Signal = pyqtSignal
except ImportError:
from PySide2.QtWidgets import *
from PySide2.QtGui import *
from PySide2.QtCore import *
class ActionPanel(QWidget):
def __init__(self... | 22.211538 | 69 | 0.6329 |
0af2addb19f654d6e3e9fa1a25b58061ed1258c2 | 3,935 | py | Python | dev/merge_ug_hc.py | anjalijain22/mity | 9ecf1a5c6e84d64b54dee9010ee79c46aff5ee59 | [
"MIT"
] | 19 | 2019-11-23T10:02:21.000Z | 2022-03-08T09:41:12.000Z | dev/merge_ug_hc.py | anjalijain22/mity | 9ecf1a5c6e84d64b54dee9010ee79c46aff5ee59 | [
"MIT"
] | 14 | 2019-11-18T01:58:39.000Z | 2022-03-31T05:00:03.000Z | dev/merge_ug_hc.py | anjalijain22/mity | 9ecf1a5c6e84d64b54dee9010ee79c46aff5ee59 | [
"MIT"
] | 2 | 2019-11-22T21:37:40.000Z | 2022-03-22T21:49:23.000Z | #!/usr/bin/env python3
"""
Based on https://git.lumc.nl/rig-framework/magpie/blob/90dd6c851959f66db944ae9915b12cc15a00de9c/scripts/merge_mity_hc.py
Merge VCF files called by GATK's HaplotypeCaller & UnifiedGenotyper
Requirements:
* Python == 2.7.x
* PyVCF >= 0.6.4
Copyright (c) 2013 Wibowo Arindrarto <w.ar... | 33.632479 | 120 | 0.675985 |
ccb1d3dfea89098e58f883cd923c6fdbed344cb2 | 1,864 | py | Python | post_process.py | Awesomex005/CarND-Vehicle-Detection | e12068887946605d148284aeea0262695d54743f | [
"MIT"
] | null | null | null | post_process.py | Awesomex005/CarND-Vehicle-Detection | e12068887946605d148284aeea0262695d54743f | [
"MIT"
] | null | null | null | post_process.py | Awesomex005/CarND-Vehicle-Detection | e12068887946605d148284aeea0262695d54743f | [
"MIT"
] | null | null | null | import matplotlib.image as mpimg
import matplotlib.pyplot as plt
import numpy as np
import cv2
from scipy.ndimage.measurements import label
def filter_bbox_by_size(bbox_list):
# the vehicle should have a relatively larger appearance if it is close to us
valid_bboxes = []
threshold_size = 96*96
minimum... | 33.285714 | 93 | 0.622318 |
4ef8dc1c8203309ba54fed4a07cc1b5eef869e24 | 14,268 | py | Python | tests/utils/repo_test.py | gavinfowler/rally | 4eb64adba80ae25e8a7d4d16bbe54b624bef4331 | [
"Apache-2.0"
] | null | null | null | tests/utils/repo_test.py | gavinfowler/rally | 4eb64adba80ae25e8a7d4d16bbe54b624bef4331 | [
"Apache-2.0"
] | 1 | 2021-02-23T15:53:47.000Z | 2021-02-23T15:53:47.000Z | tests/utils/repo_test.py | gavinfowler/rally | 4eb64adba80ae25e8a7d4d16bbe54b624bef4331 | [
"Apache-2.0"
] | null | null | null | # Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this f... | 42.591045 | 122 | 0.663933 |
8769d717ce4bc4c51447047deb7bba249245adb0 | 170 | py | Python | clash/reverse/rev-clash9.py | a93-git/codingame-solutions | 25df0f7824844646ceb0b6128274ff92f1084c8c | [
"MIT"
] | null | null | null | clash/reverse/rev-clash9.py | a93-git/codingame-solutions | 25df0f7824844646ceb0b6128274ff92f1084c8c | [
"MIT"
] | null | null | null | clash/reverse/rev-clash9.py | a93-git/codingame-solutions | 25df0f7824844646ceb0b6128274ff92f1084c8c | [
"MIT"
] | null | null | null | """ Print the square of the sum of the digits of a number"""
number = int(input())
n = 0
while number > 0:
n = n + number % 10
number = number // 10
print(n**2) | 18.888889 | 60 | 0.594118 |
6c8204e187078e00d009762de2239ce0b647df05 | 6,150 | py | Python | TensorflowFL/tff_util.py | syl18via/FL_intensive | bfc12da88f8f9ae04f1a1bb6da2a8835d70c66de | [
"MIT"
] | 2 | 2021-11-02T12:54:40.000Z | 2021-11-21T14:54:02.000Z | TensorflowFL/tff_util.py | syl18via/FL_intensive | bfc12da88f8f9ae04f1a1bb6da2a8835d70c66de | [
"MIT"
] | null | null | null | TensorflowFL/tff_util.py | syl18via/FL_intensive | bfc12da88f8f9ae04f1a1bb6da2a8835d70c66de | [
"MIT"
] | null | null | null | import tensorflow_federated as tff
import tensorflow.compat.v1 as tf
import numpy as np
import os
### FL config
BATCH_TYPE = tff.NamedTupleType([
('x', tff.TensorType(tf.float32, [None, 784])),
('y', tff.TensorType(tf.int32, [None]))])
MODEL_TYPE = tff.NamedTupleType([
('weights', tff.TensorType(tf.float3... | 39.423077 | 112 | 0.709756 |
ef4b4bc27daf017952d95f9cd26decd01d1b64fc | 11,549 | py | Python | gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_relationships.py | jaceksan/gooddata-python-sdk | 640bd8b679e00a5f0eb627bdf6143de078f8b59b | [
"MIT"
] | null | null | null | gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_relationships.py | jaceksan/gooddata-python-sdk | 640bd8b679e00a5f0eb627bdf6143de078f8b59b | [
"MIT"
] | null | null | null | gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_relationships.py | jaceksan/gooddata-python-sdk | 640bd8b679e00a5f0eb627bdf6143de078f8b59b | [
"MIT"
] | null | null | null | """
OpenAPI definition
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v0
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from gooddata_met... | 44.080153 | 129 | 0.58386 |
97fb1564f362c97bc08af07961b573811dc9d462 | 9,977 | py | Python | lib/issuance.py | ClearingHouse/clearinghoused | e0fffc112a7da9358460eee9f1a4ad0012bb3d23 | [
"MIT"
] | 2 | 2015-10-21T08:11:12.000Z | 2016-09-09T12:20:45.000Z | lib/issuance.py | ClearingHouse/clearinghoused | e0fffc112a7da9358460eee9f1a4ad0012bb3d23 | [
"MIT"
] | null | null | null | lib/issuance.py | ClearingHouse/clearinghoused | e0fffc112a7da9358460eee9f1a4ad0012bb3d23 | [
"MIT"
] | 5 | 2015-05-05T23:03:52.000Z | 2017-10-25T01:33:44.000Z | #! /usr/bin/python3
"""
Allow simultaneous lock and transfer.
"""
import struct
import decimal
D = decimal.Decimal
from . import (config, util, exceptions, bitcoin, util)
FORMAT_1 = '>QQ?'
LENGTH_1 = 8 + 8 + 1
FORMAT_2 = '>QQ??If'
LENGTH_2 = 8 + 8 + 1 + 1 + 4 + 4
ID = 20
# NOTE: Pascal strings are used for storing ... | 42.097046 | 212 | 0.619525 |
54521508cef31cca64bc369a82a5bfa973ddf452 | 734 | py | Python | settings.py | wmaxb1992/wrapper-backtrader | a69cc6c6b2b1de7891227da436e0caad6684cf36 | [
"MIT"
] | 22 | 2019-03-22T17:58:22.000Z | 2021-08-14T11:46:41.000Z | settings.py | wmaxb1992/wrapper-backtrader | a69cc6c6b2b1de7891227da436e0caad6684cf36 | [
"MIT"
] | null | null | null | settings.py | wmaxb1992/wrapper-backtrader | a69cc6c6b2b1de7891227da436e0caad6684cf36 | [
"MIT"
] | 12 | 2019-03-26T08:42:17.000Z | 2022-01-09T01:44:27.000Z | from datetime import datetime
from strategies import *
CONFIG = {
'mode': 'backtest', # 'backtest', 'optimization', 'walk_forward', 'paper', 'live'
'plot': True,
'init_date': datetime(2017, 1, 1),
'end_date': datetime(2019, 2, 28),
'asset': 'BTC-USD',
# TODO: 'data_freq': 'daily',
'capita... | 21.588235 | 85 | 0.538147 |
5c52b59df65f70bd06a235c3fdeae37b6a8e43d8 | 601 | py | Python | lists/migrations/0006_auto_20170127_0729.py | yatindrarao/Super-Lists | 6bee2c6f9fbafabf120d9c0fcea6d96aa861d610 | [
"MIT"
] | null | null | null | lists/migrations/0006_auto_20170127_0729.py | yatindrarao/Super-Lists | 6bee2c6f9fbafabf120d9c0fcea6d96aa861d610 | [
"MIT"
] | null | null | null | lists/migrations/0006_auto_20170127_0729.py | yatindrarao/Super-Lists | 6bee2c6f9fbafabf120d9c0fcea6d96aa861d610 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-27 07:29
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lists', '0005_auto_20170117_0442'),
]
operations = [
migrations.AlterField(... | 24.04 | 77 | 0.589018 |
673605f5e479c8a7c90c6ccfbad46e836d20c172 | 968 | py | Python | fms/urls.py | chamow97/Food-Army | 193681b5aad0ef128cf93a405c592fdd45a8f46c | [
"MIT"
] | null | null | null | fms/urls.py | chamow97/Food-Army | 193681b5aad0ef128cf93a405c592fdd45a8f46c | [
"MIT"
] | 5 | 2020-02-11T23:30:42.000Z | 2021-12-13T19:44:12.000Z | fms/urls.py | chamow97/Food-Army | 193681b5aad0ef128cf93a405c592fdd45a8f46c | [
"MIT"
] | null | null | null | from django.conf.urls import url
from fms import views
app_name='fms'
urlpatterns = [
url(r'^$', views.index, name='base'),
url(r'^register$', views.UserFormView.as_view(), name='register'),
url(r'^login_user$', views.login_user, name='login_user'),
url(r'^logout_user$', views.logout_user, name='logou... | 46.095238 | 75 | 0.68595 |
eada6e3a2dc5a9b8d416d636c848bdcee5b162c8 | 381 | py | Python | setup.py | August-Ghost/pretty-bencode3 | eeff9cdcfdb9a7fc4f5bdda0f9cf73eaa302702a | [
"MIT"
] | null | null | null | setup.py | August-Ghost/pretty-bencode3 | eeff9cdcfdb9a7fc4f5bdda0f9cf73eaa302702a | [
"MIT"
] | null | null | null | setup.py | August-Ghost/pretty-bencode3 | eeff9cdcfdb9a7fc4f5bdda0f9cf73eaa302702a | [
"MIT"
] | null | null | null | from distutils.core import setup
setup(
name='pretty-bencode3',
version='1.0.0',
packages=["pretty_bencode3"],
keywords=["BitTorrent", "Bencode"],
url='https://github.com/August-Ghost/pretty-bencode3',
license='MIT',
author='Ghost',
author_email='august_wang_dev@outlook.com',
descri... | 27.214286 | 68 | 0.685039 |
99306b3038728f20b95e6a75ad1a04ff05e3c246 | 2,760 | py | Python | bin/validate_submission.py | apriltuesday/eva-submission | 3063273a7e5a05c5c812910e66b7fd2aa6843d1c | [
"Apache-2.0"
] | null | null | null | bin/validate_submission.py | apriltuesday/eva-submission | 3063273a7e5a05c5c812910e66b7fd2aa6843d1c | [
"Apache-2.0"
] | 14 | 2021-01-21T17:35:19.000Z | 2022-03-02T16:22:08.000Z | bin/validate_submission.py | apriltuesday/eva-submission | 3063273a7e5a05c5c812910e66b7fd2aa6843d1c | [
"Apache-2.0"
] | 8 | 2021-01-03T10:57:32.000Z | 2021-12-13T10:21:06.000Z | #!/usr/bin/env python
# Copyright 2020 EMBL - European Bioinformatics Institute
#
# 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... | 43.809524 | 118 | 0.707609 |
e72e02e376b2f6373ec20c3d3a980bc6522df0d6 | 827 | py | Python | python/ql/test/experimental/library-tests/CallGraph-xfail/call_edge_xfail.py | vadi2/codeql | a806a4f08696d241ab295a286999251b56a6860c | [
"MIT"
] | 4,036 | 2020-04-29T00:09:57.000Z | 2022-03-31T14:16:38.000Z | python/ql/test/experimental/library-tests/CallGraph-xfail/call_edge_xfail.py | vadi2/codeql | a806a4f08696d241ab295a286999251b56a6860c | [
"MIT"
] | 2,970 | 2020-04-28T17:24:18.000Z | 2022-03-31T22:40:46.000Z | python/ql/test/experimental/library-tests/CallGraph-xfail/call_edge_xfail.py | ScriptBox99/github-codeql | 2ecf0d3264db8fb4904b2056964da469372a235c | [
"MIT"
] | 794 | 2020-04-29T00:28:25.000Z | 2022-03-30T08:21:46.000Z | import sys
# name:xfail_foo
def xfail_foo():
print('xfail_foo')
# name:xfail_bar
def xfail_bar():
print('xfail_bar')
def xfail_baz():
print('xfail_baz')
# name:xfail_lambda
xfail_lambda = lambda: print('xfail_lambda')
if len(sys.argv) >= 2 and not sys.argv[1] in ['0', 'False', 'false']:
func = xfai... | 18.795455 | 76 | 0.732769 |
37c2d863d56720b94865687dc6791bd6aa15bbe2 | 1,031 | py | Python | t2.py | arushi019/Python_files | c663e78aedf7906916972af0226443c145f630e5 | [
"bzip2-1.0.6"
] | null | null | null | t2.py | arushi019/Python_files | c663e78aedf7906916972af0226443c145f630e5 | [
"bzip2-1.0.6"
] | null | null | null | t2.py | arushi019/Python_files | c663e78aedf7906916972af0226443c145f630e5 | [
"bzip2-1.0.6"
] | null | null | null | def hanoi(frm,to,via,n):
if n==1:
print(frm,to)
else:
hanoi(frm,via,to,n-1)
hanoi(frm,to,via,1)
hanoi(via,to,frm,n-1)
#def ls_curse(l,n):
# if n==1:
#ls_curse([1,2,3,4,5],2)
class movie(object):
def __init__(self,title,dir_name,genre,rating):
... | 25.146341 | 52 | 0.551891 |
e481e916a2bd330d88ffdafe7da19ee1793686a3 | 718 | py | Python | countdown_employee_class_in_Python.py | agancsos/python | 00f7ca4372ae18f35474a9b899457057511ab71b | [
"MIT"
] | null | null | null | countdown_employee_class_in_Python.py | agancsos/python | 00f7ca4372ae18f35474a9b899457057511ab71b | [
"MIT"
] | null | null | null | countdown_employee_class_in_Python.py | agancsos/python | 00f7ca4372ae18f35474a9b899457057511ab71b | [
"MIT"
] | null | null | null | #!/bin/python
import datetime
class employee:
first=\"\";
last=\"\";
department=\"\";
start_date=\"\";
end_date=\"\";
def set_all(self,first,last,depart,start,end):
self.first=first;
self.last=last;
self.department=depart;
self.start_date=start;
self.end_date=end;
def date_diff(self... | 25.642857 | 87 | 0.683844 |
d244ae8dfb070f30ac20a811389b19dbfbe799b3 | 5,347 | py | Python | netkan/netkan/repos.py | DasSkelett/NetKAN-Infra | 0e5f8ce21d1710dcaad9f035b73237ed61432791 | [
"MIT"
] | null | null | null | netkan/netkan/repos.py | DasSkelett/NetKAN-Infra | 0e5f8ce21d1710dcaad9f035b73237ed61432791 | [
"MIT"
] | 1 | 2019-11-16T15:50:41.000Z | 2019-11-16T15:50:41.000Z | netkan/netkan/repos.py | DasSkelett/NetKAN-Infra | 0e5f8ce21d1710dcaad9f035b73237ed61432791 | [
"MIT"
] | null | null | null | from contextlib import contextmanager
from pathlib import Path
from typing import Iterable, List, Optional, Generator, Union
from git import Repo, Commit, GitCommandError
from .metadata import Netkan, Ckan
class XkanRepo:
"""
Concantenates all common repo operations in one place
"""
def __init__(se... | 33.41875 | 112 | 0.623901 |
3c834208f6b6f03de098b63b09b4cf6de8433df0 | 4,356 | py | Python | python/AppHardware/AmcMrLlrfDownConvert/_amcMrLlrfDownConvert.py | slaclab/amc-carrier-core | 1ecbd2d2c9215863c200b4404456616dd4ed2e2f | [
"BSD-3-Clause-LBNL"
] | 1 | 2019-01-31T17:12:03.000Z | 2019-01-31T17:12:03.000Z | python/AppHardware/AmcMrLlrfDownConvert/_amcMrLlrfDownConvert.py | slaclab/amc-carrier-core | 1ecbd2d2c9215863c200b4404456616dd4ed2e2f | [
"BSD-3-Clause-LBNL"
] | 33 | 2018-03-25T21:06:15.000Z | 2022-01-27T17:07:01.000Z | python/AppHardware/AmcMrLlrfDownConvert/_amcMrLlrfDownConvert.py | slaclab/amc-carrier-core | 1ecbd2d2c9215863c200b4404456616dd4ed2e2f | [
"BSD-3-Clause-LBNL"
] | 3 | 2020-04-16T12:37:58.000Z | 2022-03-31T09:14:13.000Z | #!/usr/bin/env python
#-----------------------------------------------------------------------------
# Title : PyRogue AmcMrLlrfDownConvert
#-----------------------------------------------------------------------------
# File : AmcMrLlrfDownConvert.py
# Created : 2019-07-16
#------------------------------... | 38.548673 | 106 | 0.507805 |
fae719e66b59924b281fc6b980afb952c5c6d029 | 1,842 | py | Python | 2020/12/week1/parkinhyo/algorithm/중복 문자 제거-stack.py | Road-of-CODEr/stupid-week | 1c603bc40359aeb674da9956129887e6f7c8c30a | [
"MIT"
] | 45 | 2020-06-07T05:23:58.000Z | 2020-12-13T12:09:58.000Z | 2020/12/week1/parkinhyo/algorithm/중복 문자 제거-stack.py | Road-of-CODEr/stupid-week | 1c603bc40359aeb674da9956129887e6f7c8c30a | [
"MIT"
] | 69 | 2020-09-15T09:55:40.000Z | 2020-12-30T06:00:58.000Z | 2020/12/week1/parkinhyo/algorithm/중복 문자 제거-stack.py | Road-of-CODEr/stupid-week | 1c603bc40359aeb674da9956129887e6f7c8c30a | [
"MIT"
] | 17 | 2020-06-06T14:59:48.000Z | 2020-12-27T14:08:14.000Z |
# class Solution:
# def __init__(self):
# self.count = 1
# def removeDuplicateLetters(self, s: str) -> str:
# counter, stack = collections.Counter(s), []
# print(f'counter : {counter}')
# for char in s:
# print()
# print(f'{self.count}번째 for문')
# ... | 27.909091 | 74 | 0.490228 |
e60ed1198d4948070857b2d7f5966e8151bd96e1 | 249 | py | Python | inference-engine/main.py | luzhcs/mc-wowza | 43f2287503f157a9d6e2e1726aec266103618dd1 | [
"Apache-2.0"
] | null | null | null | inference-engine/main.py | luzhcs/mc-wowza | 43f2287503f157a9d6e2e1726aec266103618dd1 | [
"Apache-2.0"
] | null | null | null | inference-engine/main.py | luzhcs/mc-wowza | 43f2287503f157a9d6e2e1726aec266103618dd1 | [
"Apache-2.0"
] | null | null | null |
from handler import image_handler
from aiohttp import web
app = web.Application()
ih = image_handler.ImageHandler()
app.router.add_post('/predict', ih.image_handle )
if __name__ == '__main__':
web.run_app(app, host="0.0.0.0", port=5001) | 16.6 | 49 | 0.718876 |
4f93a93d3ed5d8846880799f10183542f8fb095e | 1,139 | py | Python | problems/g4_world/Vrp.py | cprudhom/pycsp3 | 980927188f4262c9ea48a6534795712f09d731d6 | [
"MIT"
] | null | null | null | problems/g4_world/Vrp.py | cprudhom/pycsp3 | 980927188f4262c9ea48a6534795712f09d731d6 | [
"MIT"
] | null | null | null | problems/g4_world/Vrp.py | cprudhom/pycsp3 | 980927188f4262c9ea48a6534795712f09d731d6 | [
"MIT"
] | null | null | null | """
See https://en.wikipedia.org/wiki/Vehicle_routing_problem
This model is similar to the one proposed by Jakob Puchinger for the 2009 MiniZinc competition
Example of Execution:
python3 vrp.py -data=Vrp_P-n16-k8.json
"""
from pycsp3 import *
n, capacity, demand, distances = data
# x[i][j] is 1 iff the arc (i,j) ... | 31.638889 | 124 | 0.646181 |
95397242c8d37f27ff17780830cfe2d8b5a87fbf | 5,994 | py | Python | jupyterhub_config.py | sk-arm/jupyterhub-deploy-docker | f1220c10745afe2624e5e56afc0845bc5267fed7 | [
"BSD-3-Clause"
] | null | null | null | jupyterhub_config.py | sk-arm/jupyterhub-deploy-docker | f1220c10745afe2624e5e56afc0845bc5267fed7 | [
"BSD-3-Clause"
] | null | null | null | jupyterhub_config.py | sk-arm/jupyterhub-deploy-docker | f1220c10745afe2624e5e56afc0845bc5267fed7 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
# Configuration file for JupyterHub
import os
c = get_config()
# We rely on environment variables to configure JupyterHub so that we
# avoid having to rebuild the JupyterHub container every time we change a
# configu... | 43.751825 | 119 | 0.669002 |
84981cce0036299d05e2665c2c1a66204016f346 | 819 | py | Python | src/text_utils_tests/adjustments/test_abbreviations.py | stefantaubert/text-utils | 8fc52df37b6cbc5409695f16b7295be61107052c | [
"MIT"
] | null | null | null | src/text_utils_tests/adjustments/test_abbreviations.py | stefantaubert/text-utils | 8fc52df37b6cbc5409695f16b7295be61107052c | [
"MIT"
] | 22 | 2020-12-19T18:54:03.000Z | 2021-11-08T15:24:39.000Z | src/text_utils_tests/adjustments/test_abbreviations.py | stefantaubert/text-utils | 8fc52df37b6cbc5409695f16b7295be61107052c | [
"MIT"
] | null | null | null | from text_utils.adjustments.abbreviations import (
expand_abbreviations, expand_units_of_measure,
replace_big_letter_abbreviations)
def test_replace_big_letter_abbreviations():
res = replace_big_letter_abbreviations("BC BC BCab abBC BC")
assert res == "B C B C B Cab abB C B C"
def test_expand_abbreviati... | 40.95 | 172 | 0.757021 |
c87576147e9bc914016cc90f66ceaa8de050f8fd | 5,251 | py | Python | pbutils/strings.py | phonybone/phonybone_utils | d95f226ddfc62a1d69b5ff6f53de86188fe0c8f9 | [
"MIT"
] | null | null | null | pbutils/strings.py | phonybone/phonybone_utils | d95f226ddfc62a1d69b5ff6f53de86188fe0c8f9 | [
"MIT"
] | null | null | null | pbutils/strings.py | phonybone/phonybone_utils | d95f226ddfc62a1d69b5ff6f53de86188fe0c8f9 | [
"MIT"
] | null | null | null | '''
Random string utils.
'''
import re
import json
def qw(s, rx=None):
'''
Perl-style quoting: qw("this that these those") returns ["this", "that" ,"these", "those"]
Splits input string on regular exp rx, or ' ' if not provided.
'''
if s == '':
return []
if rx is not None:
rx ... | 30.005714 | 117 | 0.577414 |
e2f52eddb326446a5d412b0690cb273fa45c873f | 7,828 | py | Python | web/public/69/bip-0069/bip-0069_examples.py | ngmiller/bips-dev | 610d19fe9a45cdaa68e9b9afc629df646feb2627 | [
"MIT"
] | 5 | 2021-03-07T15:47:07.000Z | 2022-01-18T23:47:20.000Z | web/public/69/bip-0069/bip-0069_examples.py | ngmiller/bips-dev | 610d19fe9a45cdaa68e9b9afc629df646feb2627 | [
"MIT"
] | 1 | 2021-03-17T19:05:25.000Z | 2021-03-17T19:05:49.000Z | web/public/69/bip-0069/bip-0069_examples.py | nickmonad/bips-dev | 024176768b395c64833529a5ce543d6bdcd0000b | [
"MIT"
] | null | null | null | import binascii
#returns -1 if barr1 is less, 1 if barr1 is greater, and 0 if equal
def bytearr_cmp(barr1, barr2):
pos = 0
while (pos < len(barr1) and pos < len(barr2)):
if (barr1[pos] < barr2[pos]):
return -1;
elif (barr1[pos] > barr2[pos]):
return 1;
pos = pos + 1
#the shorter array will be ordered fi... | 69.274336 | 419 | 0.706822 |
2147eb0613d8d72530e3e8c6acfcab75cddd3c06 | 5,348 | py | Python | backend/src/rest/updateuser.py | KittyMcMitty/spiritumDuoDocker | b546a30c5a116123c9955b3f0cdea53ec705cd01 | [
"MIT"
] | 1 | 2021-11-11T17:55:54.000Z | 2021-11-11T17:55:54.000Z | backend/src/rest/updateuser.py | KittyMcMitty/spiritumDuoDocker | b546a30c5a116123c9955b3f0cdea53ec705cd01 | [
"MIT"
] | null | null | null | backend/src/rest/updateuser.py | KittyMcMitty/spiritumDuoDocker | b546a30c5a116123c9955b3f0cdea53ec705cd01 | [
"MIT"
] | null | null | null | from typing import List, Union
from pyisemail import is_email
from pyisemail.diagnosis import InvalidDiagnosis
from SdTypes import Permissions
from models import User, db, UserRole, Role, Pathway, UserPathway
from .api import _FastAPI
from fastapi import Request
from pydantic import BaseModel
from authentication.auth... | 37.661972 | 78 | 0.537958 |
ebf12821deca60cf8c9ebf23e0d9fd4672e87c06 | 176 | py | Python | python/drop_cache/drop_cache.py | colin-zhou/mrfs | 12b8ed1f06bb1a8ed0637a3ee78231c5f8eec6d1 | [
"MIT"
] | 8 | 2017-12-23T10:40:57.000Z | 2021-05-04T06:56:03.000Z | python/drop_cache/drop_cache.py | colin-zhou/mrfs | 12b8ed1f06bb1a8ed0637a3ee78231c5f8eec6d1 | [
"MIT"
] | null | null | null | python/drop_cache/drop_cache.py | colin-zhou/mrfs | 12b8ed1f06bb1a8ed0637a3ee78231c5f8eec6d1 | [
"MIT"
] | 1 | 2019-01-29T06:39:04.000Z | 2019-01-29T06:39:04.000Z | #!/usr/bin/env python
def clear_cache():
with open('/proc/sys/vm/drop_caches', 'w') as stream:
stream.write('1\n')
if __name__ == "__main__":
clear_cache()
| 16 | 57 | 0.613636 |
0a64ee59864bb5a7c1658cec794d4d90203460a6 | 119 | py | Python | witpy/util/__init__.py | parodyBit/witnet_wallet_client_py | cd0b53867acc1b80c2abfc8cf1a12a2f924d1cc4 | [
"MIT"
] | 2 | 2020-06-04T05:15:33.000Z | 2020-07-02T12:45:11.000Z | witpy/util/__init__.py | parodyBit/witpy | cd0b53867acc1b80c2abfc8cf1a12a2f924d1cc4 | [
"MIT"
] | null | null | null | witpy/util/__init__.py | parodyBit/witpy | cd0b53867acc1b80c2abfc8cf1a12a2f924d1cc4 | [
"MIT"
] | null | null | null | from .string import camel_to_snake, snake_to_camel, valid_url, parse_op
from .cbor import cbor_to_radon, radon_to_cbor
| 39.666667 | 71 | 0.848739 |
0503a2014ef304615f01d7384a8d14293524a65a | 6,133 | py | Python | polaris/examples/chainer_mn_cifar10/optimizer.py | rioyokotalab/polaris | ce205d6b9bb89f3b4825e0badb6e73ba2e1c7219 | [
"MIT"
] | 6 | 2018-07-19T15:09:16.000Z | 2018-08-03T06:16:50.000Z | polaris/examples/chainer_mn_cifar10/optimizer.py | rioyokotalab/polaris | ce205d6b9bb89f3b4825e0badb6e73ba2e1c7219 | [
"MIT"
] | null | null | null | polaris/examples/chainer_mn_cifar10/optimizer.py | rioyokotalab/polaris | ce205d6b9bb89f3b4825e0badb6e73ba2e1c7219 | [
"MIT"
] | null | null | null | from functools import partial
import random
import chainer
import chainer.links as L
from chainer import training
from chainer.training import extensions
from chainer.datasets import TransformDataset, get_cifar10
from chainercv import transforms
import chainermn
import cv2 as cv
from mpi4py import MPI
import numpy as... | 33.151351 | 79 | 0.639328 |
da3c069424fb4e843a336a5d475c829c1e33f437 | 5,269 | py | Python | transform_datasets.py | veintiocho/my-pytorch-i-revnet | 8276986898efb5eca8fe8a7a69ba504290e3683b | [
"MIT"
] | null | null | null | transform_datasets.py | veintiocho/my-pytorch-i-revnet | 8276986898efb5eca8fe8a7a69ba504290e3683b | [
"MIT"
] | null | null | null | transform_datasets.py | veintiocho/my-pytorch-i-revnet | 8276986898efb5eca8fe8a7a69ba504290e3683b | [
"MIT"
] | null | null | null | import torch
import torch.backends.cudnn as cudnn
from torch.autograd import Variable
import torchvision
import torchvision.transforms as transforms
import os
import sys
import time
import argparse
from models.utils_cifar import train, test, std, mean, get_hms, extract_feat
from models.iRevEncryptor import iRevEncry... | 34.89404 | 142 | 0.633327 |
041d77511512c4773afa5659e6ba447fba8021bf | 4,707 | py | Python | controllers/quiz.py | PP-HashInclude/cfc-quiz | beabe81e073919d59b543c7d4b5078cb3b950e5d | [
"Apache-2.0"
] | null | null | null | controllers/quiz.py | PP-HashInclude/cfc-quiz | beabe81e073919d59b543c7d4b5078cb3b950e5d | [
"Apache-2.0"
] | 1 | 2020-05-02T13:44:27.000Z | 2020-05-02T13:44:27.000Z | controllers/quiz.py | PP-HashInclude/cfc-quiz | beabe81e073919d59b543c7d4b5078cb3b950e5d | [
"Apache-2.0"
] | null | null | null | from flask import render_template, request, session
import datetime
from repositories import db
import flask
def question():
player_id = session.get("mobileno")
if player_id is None:
quizmessage = "Please Login to play."
return render_template("quiz.html", playername="", questionmessage=quizmes... | 35.931298 | 163 | 0.712981 |
32633658b17ef445ae906f2cc81782c26ec7e758 | 1,792 | py | Python | librosa/util/decorators.py | chymaera96/librosa | 71cee5d6d18901ff8b2ce2b8baa89616c2fe6587 | [
"ISC"
] | null | null | null | librosa/util/decorators.py | chymaera96/librosa | 71cee5d6d18901ff8b2ce2b8baa89616c2fe6587 | [
"ISC"
] | null | null | null | librosa/util/decorators.py | chymaera96/librosa | 71cee5d6d18901ff8b2ce2b8baa89616c2fe6587 | [
"ISC"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# CREATED:2015-02-15 10:06:03 by Brian McFee <brian.mcfee@nyu.edu>
"""Helpful tools for deprecation"""
import warnings
from decorator import decorator
__all__ = ["moved", "deprecated"]
def moved(*, moved_from, version, version_removed):
"""This is a decorator whic... | 32.581818 | 84 | 0.608817 |
3958f962ca1b3290bb68878d570647ffe7accdd2 | 15,265 | py | Python | eggs/mercurial-2.2.3-py2.7-linux-x86_64-ucs4.egg/mercurial/simplemerge.py | bopopescu/phyG | 023f505b705ab953f502cbc55e90612047867583 | [
"CC-BY-3.0"
] | null | null | null | eggs/mercurial-2.2.3-py2.7-linux-x86_64-ucs4.egg/mercurial/simplemerge.py | bopopescu/phyG | 023f505b705ab953f502cbc55e90612047867583 | [
"CC-BY-3.0"
] | null | null | null | eggs/mercurial-2.2.3-py2.7-linux-x86_64-ucs4.egg/mercurial/simplemerge.py | bopopescu/phyG | 023f505b705ab953f502cbc55e90612047867583 | [
"CC-BY-3.0"
] | 1 | 2020-07-25T21:03:18.000Z | 2020-07-25T21:03:18.000Z | # Copyright (C) 2004, 2005 Canonical Ltd
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distribut... | 33.697572 | 81 | 0.504749 |
d2983f0a2b93e48621a2495549fcf9e92b637908 | 5,665 | py | Python | Network Lab/Switching Network Simulation/part2.py | Ayush-IITP/Network-OS-Lab-Assignment | 94d437624c58476e51925bad71e5e79266aadf71 | [
"MIT"
] | 4 | 2019-02-05T22:59:14.000Z | 2021-02-21T19:37:07.000Z | Network Lab/Switching Network Simulation/part2.py | Ayush-IITP/Network-OS-Lab-Assignment | 94d437624c58476e51925bad71e5e79266aadf71 | [
"MIT"
] | null | null | null | Network Lab/Switching Network Simulation/part2.py | Ayush-IITP/Network-OS-Lab-Assignment | 94d437624c58476e51925bad71e5e79266aadf71 | [
"MIT"
] | 3 | 2019-02-05T13:06:40.000Z | 2019-05-11T04:03:42.000Z | import matplotlib.pyplot as plt
import queue as Q
utilNum = 0
pktDrop = 0
# class for pcket
class DATAPACKET:
def __init__(self,pid=0,gtime=0.0,sourceid=0):
self.packetId = pid
self.sourceId = sourceid
self.gentime = gtime
self.qInTIme = -1
self.qOutTime = -1
# class for ... | 31.825843 | 136 | 0.590644 |
2ee8c86a2e85c0e40c809d5949e6218b579844f4 | 719 | py | Python | models/CNN.py | cloudworkflow/workflow-performance-prediction-jii | 7c31db139427528bf6e6d59dcb8ca4a4252cff6b | [
"CC0-1.0"
] | 2 | 2022-02-11T01:31:33.000Z | 2022-02-16T17:26:44.000Z | models/CNN.py | cloudworkflow/workflow-performance-prediction-jii | 7c31db139427528bf6e6d59dcb8ca4a4252cff6b | [
"CC0-1.0"
] | null | null | null | models/CNN.py | cloudworkflow/workflow-performance-prediction-jii | 7c31db139427528bf6e6d59dcb8ca4a4252cff6b | [
"CC0-1.0"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
class CNNModel(nn.Module):
def __init__(self, config):
super(CNNModel, self).__init__()
self.conv=nn.Conv1d(in_channels=config.n_feat,out_channels=config.outdim,kernel_size=1)
self.maxpool=nn.MaxPool1d(config.pooldim)
... | 37.842105 | 95 | 0.66064 |
835faeb209612b0c48ba89a1d4ae79340fc24cd0 | 4,737 | py | Python | widowx_arm_controller/src/widowx_gripper.py | bluetronics-India/widowx_arm | 77f5ac9a8ca14115af18a12ebc8ecfc8f4cec96f | [
"Apache-2.0"
] | 1 | 2020-11-19T03:44:35.000Z | 2020-11-19T03:44:35.000Z | widowx_arm_controller/src/widowx_gripper.py | bluetronics-India/widowx_arm | 77f5ac9a8ca14115af18a12ebc8ecfc8f4cec96f | [
"Apache-2.0"
] | 4 | 2019-02-18T14:58:49.000Z | 2020-04-17T18:01:35.000Z | widowx_arm_controller/src/widowx_gripper.py | bluetronics-India/widowx_arm | 77f5ac9a8ca14115af18a12ebc8ecfc8f4cec96f | [
"Apache-2.0"
] | 4 | 2019-02-18T08:54:02.000Z | 2021-05-08T11:17:38.000Z | #!/usr/bin/env python
"""
@file widowx_gripper.py
Subscribes:
-
Publishes:
-
Actions:
@author: Robotnik Automation
Software License Agreement (BSD License)
Copyright (c) 2015 Robotnik Automation SLL. All Rights Reserved.
Redistribution and use in source and binary forms, with or withou... | 33.359155 | 174 | 0.752164 |
d8fb13ea82babb7a4a5c011306080fe3064ef59f | 39,691 | py | Python | proglearn/progressive_learner.py | KevinWang905/ProgLearn | 38f8976c3d44c34e6756c1aeb205c18ca774c6f0 | [
"MIT"
] | null | null | null | proglearn/progressive_learner.py | KevinWang905/ProgLearn | 38f8976c3d44c34e6756c1aeb205c18ca774c6f0 | [
"MIT"
] | null | null | null | proglearn/progressive_learner.py | KevinWang905/ProgLearn | 38f8976c3d44c34e6756c1aeb205c18ca774c6f0 | [
"MIT"
] | null | null | null | """
Main Author: Will LeVine
Corresponding Email: levinewill@icloud.com
"""
import numpy as np
from sklearn.exceptions import NotFittedError
from .base import BaseClassificationProgressiveLearner, BaseProgressiveLearner
class ProgressiveLearner(BaseProgressiveLearner):
"""
A (mostly) internal class for progr... | 38.950932 | 97 | 0.632965 |
0b9df70c0cb2bd40de927c4fdcc0cbabd1b21e23 | 3,557 | py | Python | iam/iam/settings.py | scpaes/authentication-project | 3f94fe0129cf78ec219d96b24a6bb27540bae47e | [
"MIT"
] | null | null | null | iam/iam/settings.py | scpaes/authentication-project | 3f94fe0129cf78ec219d96b24a6bb27540bae47e | [
"MIT"
] | null | null | null | iam/iam/settings.py | scpaes/authentication-project | 3f94fe0129cf78ec219d96b24a6bb27540bae47e | [
"MIT"
] | null | null | null | import os
from pathlib import Path
BASE_DIR = Path(__file__).resolve().parent.parent
SECRET_KEY = 'django-insecure-njjc$92+%fce=4=oc8&5iz0nk4rujp@sb44ms=ka%$4x8q^ef0'
DEBUG = True
ALLOWED_HOSTS = []
AUTH_USER_MODEL='users.User'
LOGIN_URL='/admin/login/'
CORS_ORIGIN_ALLOW_ALL = True
AUTHENTICATION_BACKENDS = [
... | 25.407143 | 91 | 0.685128 |
b9b26fd5cf8f745ce4fed339d5ce024bc67927e4 | 8,146 | py | Python | test/functional/wallet_hd.py | pocketnetapp/pocketnet.core | 2bdcd58bd8a4210d1117c06d52295c0b62c4061d | [
"Apache-2.0"
] | 1 | 2022-02-07T14:19:54.000Z | 2022-02-07T14:19:54.000Z | test/functional/wallet_hd.py | pocketnetapp/pocketnet.core | 2bdcd58bd8a4210d1117c06d52295c0b62c4061d | [
"Apache-2.0"
] | null | null | null | test/functional/wallet_hd.py | pocketnetapp/pocketnet.core | 2bdcd58bd8a4210d1117c06d52295c0b62c4061d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2016-2022 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 Hierarchical Deterministic wallet function."""
import os
import shutil
from test_framework.test_... | 49.072289 | 150 | 0.660938 |
0cb41b12a4c6a3df7787142aa9a3706bb872b9d8 | 3,289 | py | Python | Dark_Scripts/calc_CESMLargeEnsemblesTogether.py | zmlabe/predictGMSTrate | 2bde4a106de1988d772f15a52d283d23bb7128f4 | [
"MIT"
] | 2 | 2022-01-20T20:20:04.000Z | 2022-02-21T12:33:37.000Z | Scripts/calc_CESMLargeEnsemblesTogether.py | zmlabe/predictGMSTrate | 2bde4a106de1988d772f15a52d283d23bb7128f4 | [
"MIT"
] | null | null | null | Scripts/calc_CESMLargeEnsemblesTogether.py | zmlabe/predictGMSTrate | 2bde4a106de1988d772f15a52d283d23bb7128f4 | [
"MIT"
] | 3 | 2022-01-19T16:25:37.000Z | 2022-03-22T13:25:00.000Z | """
Function reads in both CESM1-LE and CESM2-LE
Notes
-----
Author : Zachary Labe
Date : 28 June 2021
Usage
-----
[1] read_ALLCESM_le(directory,vari,sliceperiod,slicebase,sliceshape,addclimo,slicenan,takeEnsMean,numOfEns,timeper)
"""
def read_ALLCESM_le(directory,vari,monthlychoice,slicebase,sliceshap... | 31.028302 | 119 | 0.602007 |
ff787cb411a26599b418d27d3b57441e6987fc09 | 3,098 | py | Python | app/utils/text.py | fizista/Mturk-Tracker | 9016528a36054112d2dbc63035eff5d4cd82001f | [
"MIT"
] | null | null | null | app/utils/text.py | fizista/Mturk-Tracker | 9016528a36054112d2dbc63035eff5d4cd82001f | [
"MIT"
] | null | null | null | app/utils/text.py | fizista/Mturk-Tracker | 9016528a36054112d2dbc63035eff5d4cd82001f | [
"MIT"
] | null | null | null | import re
from datetime import datetime
def calculate_similarity(text1, text2):
t1 = re.sub(r"[^a-z0-9 ]", '', text1.lower()).split()
t2 = re.sub(r"[^a-z0-9 ]", '', text2.lower()).split()
intersection = []
for l in t1:
if l in t2:
intersection.append(l)
sum = t1
for l ... | 25.603306 | 150 | 0.485474 |
1fc0cf173be0a75392f9580e719da482ee4aca37 | 13,969 | py | Python | tests/test_config.py | azibit/mmdetection | 342430c203f36724f817540de6d9aaf6ebd9acc4 | [
"Apache-2.0"
] | 104 | 2020-09-26T06:18:18.000Z | 2022-03-31T21:17:47.000Z | tests/test_config.py | azibit/mmdetection | 342430c203f36724f817540de6d9aaf6ebd9acc4 | [
"Apache-2.0"
] | 23 | 2020-09-21T03:47:08.000Z | 2021-12-28T07:25:19.000Z | tests/test_config.py | azibit/mmdetection | 342430c203f36724f817540de6d9aaf6ebd9acc4 | [
"Apache-2.0"
] | 28 | 2020-08-31T07:33:22.000Z | 2021-12-16T09:22:26.000Z | from os.path import dirname, exists, join, relpath
import torch
from mmdet.core import BitmapMasks, PolygonMasks
from mmdet.core.optimizer import build_optimizer
def _get_config_directory():
""" Find the predefined detector config directory """
try:
# Assume we are running in the source mmdetection ... | 39.460452 | 79 | 0.647505 |
5a8c0dc14d1d6f1f8d892cb928294122bc6ac17b | 36,573 | py | Python | virtual/lib/python3.6/site-packages/pip/_internal/req/req_install.py | Ruterana/clone_instagram | a068587ef1d1a93ec8d1c08086bf11c0fb274b83 | [
"MIT"
] | 102 | 2016-10-09T01:33:00.000Z | 2022-01-28T01:03:23.000Z | virtual/lib/python3.6/site-packages/pip/_internal/req/req_install.py | Ruterana/clone_instagram | a068587ef1d1a93ec8d1c08086bf11c0fb274b83 | [
"MIT"
] | 88 | 2020-03-09T01:20:59.000Z | 2021-11-15T17:49:34.000Z | virtual/lib/python3.6/site-packages/pip/_internal/req/req_install.py | Krasivaya/Tracks | c18d1c9222dff39e4678d44495a8a7d9434339ff | [
"MIT"
] | 50 | 2017-05-10T06:25:36.000Z | 2021-08-02T20:28:54.000Z | # The following comment should be removed at some point in the future.
# mypy: strict-optional=False
# mypy: disallow-untyped-defs=False
from __future__ import absolute_import
import atexit
import logging
import os
import shutil
import sys
import sysconfig
import zipfile
from distutils.util import change_root
from p... | 37.821096 | 79 | 0.596068 |
e086a30af8f54ed11ce71a03390d5721858eb96f | 443 | py | Python | module_build_service/migrations/versions/f5b1c5203cce_.py | zhongtianxie/fm-orchestrator | 5ab39bf1981cf4abdf7ca4c2a7d4a6120f1bea2f | [
"MIT"
] | null | null | null | module_build_service/migrations/versions/f5b1c5203cce_.py | zhongtianxie/fm-orchestrator | 5ab39bf1981cf4abdf7ca4c2a7d4a6120f1bea2f | [
"MIT"
] | null | null | null | module_build_service/migrations/versions/f5b1c5203cce_.py | zhongtianxie/fm-orchestrator | 5ab39bf1981cf4abdf7ca4c2a7d4a6120f1bea2f | [
"MIT"
] | null | null | null | """Add component_builds.weight
Revision ID: f5b1c5203cce
Revises: 524c3b1c683c
Create Date: 2017-11-08 17:18:27.401546
"""
# revision identifiers, used by Alembic.
revision = 'f5b1c5203cce'
down_revision = '524c3b1c683c'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('component_bu... | 19.26087 | 85 | 0.744921 |
01a5ceea67f815ec07f474397ca517bf845fce75 | 412 | py | Python | src/experiments/bell_state.py | FilipeChagasDev/quantum-circuit-sim | c9f25302db47f75957f81fec667669afb866132c | [
"MIT"
] | null | null | null | src/experiments/bell_state.py | FilipeChagasDev/quantum-circuit-sim | c9f25302db47f75957f81fec667669afb866132c | [
"MIT"
] | null | null | null | src/experiments/bell_state.py | FilipeChagasDev/quantum-circuit-sim | c9f25302db47f75957f81fec667669afb866132c | [
"MIT"
] | null | null | null | import sys
sys.path.append('../')
import circuit as qc
import gates as qg
my_circuit = qc.QuantumCircuit(2) # 2 qubits circuit
my_circuit.add_gate( qg.Hadamard(0) ) #Hadamard gate at qubit 0
my_circuit.add_gate( qg.CNot(0,1) ) #CNot gate with control at qubit 0 and target at qubit 1
my_circuit.get_result().print_m... | 17.913043 | 92 | 0.648058 |
54917e52701b54e2d48086520a1a1cc2763dcd23 | 49 | py | Python | language_features/standard_library/os_module.py | PrasadHonrao/python-samples | faa48aa3eaf2d67b8cef0114e1f6ef08e2c1300a | [
"MIT"
] | 3 | 2018-08-20T13:00:01.000Z | 2021-09-18T04:19:46.000Z | language_features/standard_library/os_module.py | PrasadHonrao/python-samples | faa48aa3eaf2d67b8cef0114e1f6ef08e2c1300a | [
"MIT"
] | 1 | 2021-06-25T20:25:02.000Z | 2021-08-19T22:44:31.000Z | language_features/standard_library/os_module.py | PrasadHonrao/python-samples | faa48aa3eaf2d67b8cef0114e1f6ef08e2c1300a | [
"MIT"
] | 1 | 2021-09-18T23:51:20.000Z | 2021-09-18T23:51:20.000Z | import os
print(os.getcwd())
print(os.__file__)
| 9.8 | 18 | 0.734694 |
0bd5bd92561cde9ee5c05b8fd26927bd84f01250 | 27,101 | py | Python | test/functional/bip68-112-113-p2p.py | justplainc/lood | 8400aa1a0278948d648c7d8e040bffe78dd88ac7 | [
"MIT"
] | null | null | null | test/functional/bip68-112-113-p2p.py | justplainc/lood | 8400aa1a0278948d648c7d8e040bffe78dd88ac7 | [
"MIT"
] | null | null | null | test/functional/bip68-112-113-p2p.py | justplainc/lood | 8400aa1a0278948d648c7d8e040bffe78dd88ac7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2016 The Lood Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test activation of the first version bits soft fork.
This soft fork will activate the following BIPS:
BIP... | 50.656075 | 177 | 0.650677 |
1a4c4c490fdec6236d86464e16fcd997320fa047 | 8,535 | py | Python | libraries/abstractions/common_io/test/test_scripts/i2c_master/test_iot_i2c_master_test.py | nateglims/amazon-freertos | 5cc32eb29d935f124101a3584c6d29aa1f5d687d | [
"MIT"
] | 2,637 | 2017-11-29T18:41:48.000Z | 2022-03-29T01:03:36.000Z | libraries/abstractions/common_io/test/test_scripts/i2c_master/test_iot_i2c_master_test.py | nateglims/amazon-freertos | 5cc32eb29d935f124101a3584c6d29aa1f5d687d | [
"MIT"
] | 1,926 | 2017-11-29T21:42:02.000Z | 2022-03-31T22:12:50.000Z | libraries/abstractions/common_io/test/test_scripts/i2c_master/test_iot_i2c_master_test.py | nateglims/amazon-freertos | 5cc32eb29d935f124101a3584c6d29aa1f5d687d | [
"MIT"
] | 1,384 | 2017-11-29T19:04:27.000Z | 2022-03-29T14:40:27.000Z | #!/usr/bin/env python3
# FreeRTOS Common IO V0.1.2
# Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# 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 re... | 35.123457 | 119 | 0.604218 |
8d29405d18460a36aee9ce5f22eeab97a26e5a34 | 7,220 | py | Python | custom_components/anniversaries/sensor.py | BeardedTinker/Home-Assistant_Conf | 39ced6670a355fdbc541fd0c9eb1fb12035f6791 | [
"MIT"
] | 163 | 2020-08-01T12:19:46.000Z | 2022-03-28T09:04:57.000Z | custom_components/anniversaries/sensor.py | BeardedTinker/Home-Assistant_Conf | 39ced6670a355fdbc541fd0c9eb1fb12035f6791 | [
"MIT"
] | 81 | 2020-08-04T00:28:46.000Z | 2022-03-29T15:48:51.000Z | custom_components/anniversaries/sensor.py | BeardedTinker/Home-Assistant_Conf | 39ced6670a355fdbc541fd0c9eb1fb12035f6791 | [
"MIT"
] | 28 | 2020-08-02T12:02:24.000Z | 2022-03-22T00:07:34.000Z | """ Sensor """
from dateutil.relativedelta import relativedelta
from datetime import datetime, date
from homeassistant.helpers.entity import Entity, generate_entity_id
from homeassistant.components.sensor import ENTITY_ID_FORMAT
from homeassistant.helpers import template as templater
from homeassistant.const ... | 36.281407 | 98 | 0.622438 |
3941b14ce4b563ec7a5f8c23956b0dcca4fc9b76 | 8,689 | py | Python | jsonclasses_pymongo/decoder.py | WiosoftCrafts/jsonclasses-pymongo | c76fdfc072705484b47b09e23c5498aea757dad7 | [
"MIT"
] | 2 | 2021-11-02T02:54:01.000Z | 2021-12-02T10:38:18.000Z | jsonclasses_pymongo/decoder.py | WiosoftCrafts/jsonclasses-pymongo | c76fdfc072705484b47b09e23c5498aea757dad7 | [
"MIT"
] | 1 | 2021-12-15T13:50:48.000Z | 2021-12-15T13:50:48.000Z | jsonclasses_pymongo/decoder.py | zhichao-github/jsonclasses-pymongo | eaf08e4342a08f484bf99d06a3bceae447925189 | [
"MIT"
] | 5 | 2021-07-22T06:30:05.000Z | 2021-12-09T02:02:30.000Z | from __future__ import annotations
from typing import Any, Optional, TypeVar, cast, TYPE_CHECKING
from datetime import date, timezone
from jsonclasses.types import Types
from jsonclasses.fdef import FStore, FType
from jsonclasses.mgraph import MGraph
from .utils import (ref_db_field_key, ref_db_field_keys)
if TYPE_CHEC... | 43.663317 | 111 | 0.496835 |
9acab70be19f86bafb3cc7926c65886e81bf3a51 | 3,293 | py | Python | tests/components/fritzbox/__init__.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | 1 | 2021-07-08T20:09:55.000Z | 2021-07-08T20:09:55.000Z | tests/components/fritzbox/__init__.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | 47 | 2021-02-21T23:43:07.000Z | 2022-03-31T06:07:10.000Z | tests/components/fritzbox/__init__.py | OpenPeerPower/core | f673dfac9f2d0c48fa30af37b0a99df9dd6640ee | [
"Apache-2.0"
] | null | null | null | """Tests for the AVM Fritz!Box integration."""
from __future__ import annotations
from typing import Any
from unittest.mock import Mock
from openpeerpower.components.fritzbox.const import DOMAIN
from openpeerpower.const import CONF_DEVICES, CONF_HOST, CONF_PASSWORD, CONF_USERNAME
from openpeerpower.core import OpenPe... | 25.527132 | 85 | 0.665351 |
b87549b4ed648cb883df0593fbb2b730bf5e03ad | 385 | py | Python | Model_Retrieval_System/backend/csys/asgi.py | CorleoneJW/3D-Retrieval-System | 6b60059ee80ae2b03d4b7d792522cb95efc17e37 | [
"MIT"
] | null | null | null | Model_Retrieval_System/backend/csys/asgi.py | CorleoneJW/3D-Retrieval-System | 6b60059ee80ae2b03d4b7d792522cb95efc17e37 | [
"MIT"
] | null | null | null | Model_Retrieval_System/backend/csys/asgi.py | CorleoneJW/3D-Retrieval-System | 6b60059ee80ae2b03d4b7d792522cb95efc17e37 | [
"MIT"
] | null | null | null | """
ASGI config for csys 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('DJANGO_SETTINGS... | 22.647059 | 78 | 0.781818 |
c9da6d1ebf1d7c91da632f0a1308a220d9b47c1f | 2,464 | py | Python | bigmler/tests/common_steps.py | shantanusharma/bigmler | 3f9d76e8567de1aa7976a84b3e6130a2c83d4515 | [
"Apache-2.0"
] | null | null | null | bigmler/tests/common_steps.py | shantanusharma/bigmler | 3f9d76e8567de1aa7976a84b3e6130a2c83d4515 | [
"Apache-2.0"
] | null | null | null | bigmler/tests/common_steps.py | shantanusharma/bigmler | 3f9d76e8567de1aa7976a84b3e6130a2c83d4515 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2014-2020 BigML
#
# 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 ... | 29.686747 | 76 | 0.648539 |
1301272b384d775e7518abe3154438fce7a80cb2 | 3,122 | py | Python | aio_sf_streaming/connectors.py | papernest/aio_sf_streaming | d1655f72d1e486284f3e3bfd17ad15fb6ba04ee3 | [
"MIT"
] | 3 | 2021-08-20T03:00:36.000Z | 2022-02-16T20:49:41.000Z | aio_sf_streaming/connectors.py | papernest/aio_sf_streaming | d1655f72d1e486284f3e3bfd17ad15fb6ba04ee3 | [
"MIT"
] | 2 | 2018-03-28T20:58:55.000Z | 2018-06-13T17:23:12.000Z | aio_sf_streaming/connectors.py | papernest/aio_sf_streaming | d1655f72d1e486284f3e3bfd17ad15fb6ba04ee3 | [
"MIT"
] | 2 | 2019-03-26T16:23:03.000Z | 2019-04-22T22:49:37.000Z | """
Connectors module: Provide authentication implementation
"""
from typing import Tuple
import aiohttp
from .core import BaseSalesforceStreaming
class BaseConnector(BaseSalesforceStreaming):
"""
Base class for all sf connectors.
:param client_id: OAuth2 client Id (mandatory)
:param client_secret... | 31.535354 | 84 | 0.668161 |
3c4c1b6244a0f6108c462e19a29ca3e9a611498d | 1,886 | py | Python | docs/source/conf.py | RogerHaase/flatland | d08c8cd29cc17919f131f1affd88f0fd881e3259 | [
"MIT"
] | 7 | 2018-10-29T21:17:26.000Z | 2020-03-12T21:32:26.000Z | docs/source/conf.py | RogerHaase/flatland | d08c8cd29cc17919f131f1affd88f0fd881e3259 | [
"MIT"
] | 35 | 2018-10-29T21:37:30.000Z | 2021-05-13T07:57:52.000Z | docs/source/conf.py | RogerHaase/flatland | d08c8cd29cc17919f131f1affd88f0fd881e3259 | [
"MIT"
] | 6 | 2018-10-29T21:38:40.000Z | 2020-05-25T08:51:13.000Z | project = u'flatland'
copyright = u'2008-2018, the flatland authors and contributors'
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown h... | 23.575 | 101 | 0.69141 |
f536d4b9ad70c84b9040f196a03b996c63ec11a2 | 45 | py | Python | pypi_packages/ranger_adabelief_0.0.9/ranger_adabelief/__init__.py | wes-chen/Adabelief-Optimizer | 2e4e57cb75e79fe3f72051041b6aec09549b2d85 | [
"BSD-2-Clause"
] | 1,005 | 2020-10-16T02:40:57.000Z | 2022-03-21T19:51:27.000Z | pypi_packages/ranger_adabelief_0.0.9/ranger_adabelief/__init__.py | wes-chen/Adabelief-Optimizer | 2e4e57cb75e79fe3f72051041b6aec09549b2d85 | [
"BSD-2-Clause"
] | 56 | 2020-10-16T16:27:18.000Z | 2022-03-31T18:35:56.000Z | pypi_packages/ranger_adabelief_0.0.9/ranger_adabelief/__init__.py | wes-chen/Adabelief-Optimizer | 2e4e57cb75e79fe3f72051041b6aec09549b2d85 | [
"BSD-2-Clause"
] | 118 | 2020-10-16T06:40:24.000Z | 2022-03-25T05:29:48.000Z | from .ranger_adabelief import RangerAdaBelief | 45 | 45 | 0.911111 |
421a8364a806eeff02b64190145138548ec4f920 | 363 | py | Python | user-manual-de/conf.py | ecs-org/ecs-docs | 0d685db17731a35c90852d7f75fbdf3791bd696c | [
"Apache-2.0"
] | 1 | 2020-01-04T05:51:39.000Z | 2020-01-04T05:51:39.000Z | user-manual-de/conf.py | ecs-org/ecs-docs | 0d685db17731a35c90852d7f75fbdf3791bd696c | [
"Apache-2.0"
] | null | null | null | user-manual-de/conf.py | ecs-org/ecs-docs | 0d685db17731a35c90852d7f75fbdf3791bd696c | [
"Apache-2.0"
] | 1 | 2021-11-23T15:41:01.000Z | 2021-11-23T15:41:01.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import sys
sys.path.append(os.path.join(os.getcwd(),".."))
from include.baseconf import *
project = 'ecs-user-manual-de'
html_short_title = "ECS BenutzerInnen-Handbuch"
language = 'de'
latex_documents = [
(master_doc, '{}.tex'.format(project), 'Ecs Benutzer... | 21.352941 | 72 | 0.680441 |
16e76447054cf21bff21bc8b622542a1ee083ef2 | 12,807 | py | Python | graspy/match/gmp.py | spencer-loggia/graspologic | cf7ae59289faa8f5538e335e2859cc2a843f2839 | [
"MIT"
] | null | null | null | graspy/match/gmp.py | spencer-loggia/graspologic | cf7ae59289faa8f5538e335e2859cc2a843f2839 | [
"MIT"
] | null | null | null | graspy/match/gmp.py | spencer-loggia/graspologic | cf7ae59289faa8f5538e335e2859cc2a843f2839 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation and contributors.
# Licensed under the MIT License.
import numpy as np
import math
from scipy.optimize import linear_sum_assignment
from scipy.optimize import minimize_scalar
from sklearn.base import BaseEstimator
from sklearn.utils import check_array
from sklearn.utils import col... | 38.459459 | 94 | 0.572577 |
e8c57ceb0cfa8dec62e7a085db8dc46cbc099c60 | 1,432 | py | Python | coloursite/wsgi.py | richbs/colourlens | 1f5600ad6feb08ffc5b405826ebf21642fdd0475 | [
"MIT"
] | 2 | 2016-01-05T16:31:16.000Z | 2020-06-26T12:12:59.000Z | coloursite/wsgi.py | richbs/colourlens | 1f5600ad6feb08ffc5b405826ebf21642fdd0475 | [
"MIT"
] | null | null | null | coloursite/wsgi.py | richbs/colourlens | 1f5600ad6feb08ffc5b405826ebf21642fdd0475 | [
"MIT"
] | 1 | 2021-04-30T10:01:07.000Z | 2021-04-30T10:01:07.000Z | """
WSGI config for coloursite project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION... | 42.117647 | 79 | 0.803771 |
8e281bf13090e06d1832467c461bac4b6f421548 | 1,704 | py | Python | data_loader.py | chxy95/SRCNN | b2d43e3d605b751cd6cd0290047f24932d159185 | [
"MIT"
] | 14 | 2019-06-28T09:34:06.000Z | 2022-03-10T14:35:09.000Z | data_loader.py | chxy95/SRCNN | b2d43e3d605b751cd6cd0290047f24932d159185 | [
"MIT"
] | 3 | 2019-08-31T04:15:04.000Z | 2020-01-02T08:31:39.000Z | data_loader.py | chxy95/SRCNN | b2d43e3d605b751cd6cd0290047f24932d159185 | [
"MIT"
] | 1 | 2021-08-31T09:53:43.000Z | 2021-08-31T09:53:43.000Z | # -*- coding: utf-8 -*-
"""
Created on Tue Jun 25 15:14:42 2019
@author: chxy
"""
import h5py
import torch.utils.data as data
def generate_train():
pass
def generate_test():
pass
class H5Dataset(data.Dataset):
"""Dataset wrapping data and target tensors.
Each sample will be retrieved by indexing b... | 24.695652 | 74 | 0.616784 |
e2e5f675a6b550664f0f0bcf0764c5350abd9794 | 8,450 | py | Python | wsgidav/lock_storage_redis.py | sinshutu/wsgidav | ee199dc62659b6dfa62fcf7e2c51bd57acb5fb8a | [
"MIT"
] | 547 | 2015-01-17T20:08:53.000Z | 2022-03-22T12:45:27.000Z | wsgidav/lock_storage_redis.py | sinshutu/wsgidav | ee199dc62659b6dfa62fcf7e2c51bd57acb5fb8a | [
"MIT"
] | 212 | 2015-03-10T09:41:08.000Z | 2022-03-24T01:22:16.000Z | wsgidav/lock_storage_redis.py | mikespub-org/mar10-wsgidav | 2d467eaa50edd084df2de8470b5203887b79fe3e | [
"MIT"
] | 130 | 2015-03-18T12:56:46.000Z | 2022-03-17T10:28:22.000Z | # -*- coding: utf-8 -*-
# (c) 2009-2021 Martin Wendt and contributors; see WsgiDAV https://github.com/mar10/wsgidav
# Original PyFileServer (c) 2005 Ho Chun Wei.
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license.php
import pickle
import time
import redis
from wsgidav import compat, ut... | 34.917355 | 91 | 0.597041 |
35bf19d4b4ebb80254a6c16f19ca181105de40ef | 1,952 | py | Python | source/DataSinkStateMachine/DataSinkTerminationFunction/app.py | horsfieldsa/ec2-spot-interruption-dashboard | 27d25c3243beac82627d46aca0b6c9c06ca0feb0 | [
"MIT-0"
] | 27 | 2020-05-15T20:15:42.000Z | 2022-03-16T04:13:46.000Z | source/DataSinkStateMachine/DataSinkTerminationFunction/app.py | horsfieldsa/ec2-spot-interruption-dashboard | 27d25c3243beac82627d46aca0b6c9c06ca0feb0 | [
"MIT-0"
] | 5 | 2020-05-15T22:29:30.000Z | 2021-04-14T19:55:48.000Z | source/DataSinkStateMachine/DataSinkTerminationFunction/app.py | horsfieldsa/ec2-spot-interruption-dashboard | 27d25c3243beac82627d46aca0b6c9c06ca0feb0 | [
"MIT-0"
] | 10 | 2020-05-15T20:21:42.000Z | 2022-01-25T10:27:55.000Z | # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# 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 t... | 33.084746 | 88 | 0.720799 |
029aabbb712ebea8fadec0462b9e394ad260389d | 7,204 | py | Python | AudioClassDemo_2.5.0/data_utils.py | EnriqueNueve/TF_Toolbox | fbbb7e479242337dcbcd9d173c073dbb6a1bf0f3 | [
"MIT"
] | null | null | null | AudioClassDemo_2.5.0/data_utils.py | EnriqueNueve/TF_Toolbox | fbbb7e479242337dcbcd9d173c073dbb6a1bf0f3 | [
"MIT"
] | null | null | null | AudioClassDemo_2.5.0/data_utils.py | EnriqueNueve/TF_Toolbox | fbbb7e479242337dcbcd9d173c073dbb6a1bf0f3 | [
"MIT"
] | null | null | null | """
data_utils.py
Description: utilty functions used for audio data processing.
"""
##############################
import os
import tensorflow as tf
import numpy as np
from math import floor
from random import randint
from PIL import Image
import librosa
##############################
def downloadUrbanSound8k():
... | 32.304933 | 96 | 0.590505 |
f9efdfc2219cade286d0974f51f15db19411303f | 15,494 | py | Python | scripts/build.py | square-1111/oppia | 8f391e7ecd019a2299dd734b655ba93df8047c5b | [
"Apache-2.0"
] | 1 | 2021-12-09T10:37:09.000Z | 2021-12-09T10:37:09.000Z | scripts/build.py | Satyam-Bhalla/oppia | 8f391e7ecd019a2299dd734b655ba93df8047c5b | [
"Apache-2.0"
] | null | null | null | scripts/build.py | Satyam-Bhalla/oppia | 8f391e7ecd019a2299dd734b655ba93df8047c5b | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 35.618391 | 80 | 0.680844 |
2625ef8e11723416aeb57dd3df918d7460320994 | 608 | py | Python | diffpy/Structure/applications/__init__.py | mmckerns/diffpy.Structure | 62551146e29ce4a8988d92779b34d0748f8c74f9 | [
"Artistic-2.0"
] | null | null | null | diffpy/Structure/applications/__init__.py | mmckerns/diffpy.Structure | 62551146e29ce4a8988d92779b34d0748f8c74f9 | [
"Artistic-2.0"
] | null | null | null | diffpy/Structure/applications/__init__.py | mmckerns/diffpy.Structure | 62551146e29ce4a8988d92779b34d0748f8c74f9 | [
"Artistic-2.0"
] | null | null | null | #!/usr/bin/env python
##############################################################################
#
# diffpy.Structure by DANSE Diffraction group
# Simon J. L. Billinge
# (c) 2006 trustees of the Michigan State University.
# All rights reserved.
#
# File coded b... | 30.4 | 78 | 0.475329 |
fba59c99bc62c543d012d9b6324b4b473fa53752 | 551 | py | Python | scrape_khana_academy/scraper.py | JingerTea/scrape-khan_academy-selenium- | 4a7f121aa4e1280889a385df1cd5d32cbd52431e | [
"MIT"
] | null | null | null | scrape_khana_academy/scraper.py | JingerTea/scrape-khan_academy-selenium- | 4a7f121aa4e1280889a385df1cd5d32cbd52431e | [
"MIT"
] | null | null | null | scrape_khana_academy/scraper.py | JingerTea/scrape-khan_academy-selenium- | 4a7f121aa4e1280889a385df1cd5d32cbd52431e | [
"MIT"
] | null | null | null | from scrape_khana_academy.helpers import *
def scraper(link):
while True:
try:
chrome_options = Options()
chrome_options.add_argument("--headless")
chrome_options.add_argument("--mute-audio")
chrome_options.add_argument("--window-size=%s" % "1024,768"... | 36.733333 | 95 | 0.589837 |
4eaa7b995918f989325fa34f1f930b56e7a0c081 | 1,135 | py | Python | superset/migrations/versions/ff6fefb0d358_.py | Loren110/incubator-superset-own | 33d90fee9dce91be1dcc837b015d248d5aeb2049 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | null | null | null | superset/migrations/versions/ff6fefb0d358_.py | Loren110/incubator-superset-own | 33d90fee9dce91be1dcc837b015d248d5aeb2049 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 6 | 2020-03-24T17:04:12.000Z | 2022-02-01T00:54:14.000Z | superset/migrations/versions/ff6fefb0d358_.py | MSD110/incubator-superset-own | 33d90fee9dce91be1dcc837b015d248d5aeb2049 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 1 | 2019-06-08T19:28:07.000Z | 2019-06-08T19:28:07.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 29.102564 | 62 | 0.757709 |
04407b27ff113ee3822df427cce06a665a9d9326 | 1,197 | py | Python | lib/sedna/common/constant.py | lidongen/sedna | fe54975c435e7c5a211f7d5960489d1d7f5a19ff | [
"Apache-2.0"
] | 1 | 2021-06-19T10:19:28.000Z | 2021-06-19T10:19:28.000Z | lib/sedna/common/constant.py | TymonXie/sedna | ee71aedec864146dd245af740a8496c3d57ef758 | [
"Apache-2.0"
] | null | null | null | lib/sedna/common/constant.py | TymonXie/sedna | ee71aedec864146dd245af740a8496c3d57ef758 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The KubeEdge Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 26.6 | 74 | 0.746032 |
3ac60b92e3fe9284dcb76b957a6796eb7b8661b5 | 7,855 | py | Python | setup.py | dezeraecox/LEXY_Toolbox | 4c69dbc60ece0b2042b1c75b05076589b942025c | [
"MIT"
] | null | null | null | setup.py | dezeraecox/LEXY_Toolbox | 4c69dbc60ece0b2042b1c75b05076589b942025c | [
"MIT"
] | null | null | null | setup.py | dezeraecox/LEXY_Toolbox | 4c69dbc60ece0b2042b1c75b05076589b942025c | [
"MIT"
] | 1 | 2019-10-08T23:43:18.000Z | 2019-10-08T23:43:18.000Z | """A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspa... | 41.781915 | 129 | 0.690261 |
a45535956173abb5dbadfabdc9551d3f736a506f | 6,153 | py | Python | kubernetes_asyncio/client/models/v1_config_map_projection.py | opsani/kubernetes_asyncio | 55283bf6f3690e5c0a0c589cd752221511e2be51 | [
"Apache-2.0"
] | 196 | 2018-05-23T16:55:41.000Z | 2022-03-31T10:09:40.000Z | kubernetes_asyncio/client/models/v1_config_map_projection.py | tomplus/kubernetes_asyncio | e8c8686ec11be3a5295ae9d5d8728299492a61f8 | [
"Apache-2.0"
] | 164 | 2018-05-20T20:39:03.000Z | 2022-03-29T22:57:04.000Z | kubernetes_asyncio/client/models/v1_config_map_projection.py | opsani/kubernetes_asyncio | 55283bf6f3690e5c0a0c589cd752221511e2be51 | [
"Apache-2.0"
] | 41 | 2018-06-08T00:39:53.000Z | 2022-01-12T18:19:06.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1.18.20
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
f... | 34.374302 | 504 | 0.62051 |
2dce0b0fc0439f6ef90f95065433133500da4ea0 | 6,687 | py | Python | experimentor/drivers/ni/ni6251.py | aquilesC/experimentor | 1a70760912ef40f0e2aaee44ed1a1e5594fd5b45 | [
"MIT"
] | 4 | 2020-05-15T04:07:25.000Z | 2020-09-30T22:20:46.000Z | experimentor/drivers/ni/ni6251.py | aquilesC/experimentor | 1a70760912ef40f0e2aaee44ed1a1e5594fd5b45 | [
"MIT"
] | null | null | null | experimentor/drivers/ni/ni6251.py | aquilesC/experimentor | 1a70760912ef40f0e2aaee44ed1a1e5594fd5b45 | [
"MIT"
] | null | null | null | """
ni6251.pi
---------
Class for comunicating with the NI-6251 DAQ. It requires to have installed the DAQmx (provided by NI) and the pyDAQmx package (from pypy).
"""
import PyDAQmx as nidaq
import numpy as np
class niDAQ():
"""Class for controlling a National Instruments NI-6251 DAQ.
If using an ... | 45.80137 | 144 | 0.648721 |
507c93ce1562b436ab58aa6b5a1aca4e07691140 | 1,479 | py | Python | offset_property.py | decasteljau/waapi-offset-property | a0fd71ee66d64d012a44fddb574dc8b764f870b1 | [
"Apache-2.0"
] | 9 | 2018-09-26T19:55:02.000Z | 2020-10-14T03:36:06.000Z | offset_property.py | decasteljau/waapi-offset-property | a0fd71ee66d64d012a44fddb574dc8b764f870b1 | [
"Apache-2.0"
] | null | null | null | offset_property.py | decasteljau/waapi-offset-property | a0fd71ee66d64d012a44fddb574dc8b764f870b1 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
import argparse
from waapi import WaapiClient
parser = argparse.ArgumentParser(
description='Offset a property value for a list of objects. '
'By default, it increases the volume of the specified objects.')
parser.add_argument('id', nargs='+', help='An object ID (GUID)')
parser.add_argument(... | 36.975 | 80 | 0.639621 |
bc0ece727fb29d2801788ee59479e7f27f6184ed | 10,174 | py | Python | test/functional/test_framework/test_node.py | ioss1055/infcoin | 9038bfd32ad7876e3e903cebad698cc7622fe729 | [
"MIT"
] | 2 | 2018-05-22T07:08:56.000Z | 2019-02-22T08:55:43.000Z | test/functional/test_framework/test_node.py | ioss1055/infcoin | 9038bfd32ad7876e3e903cebad698cc7622fe729 | [
"MIT"
] | null | null | null | test/functional/test_framework/test_node.py | ioss1055/infcoin | 9038bfd32ad7876e3e903cebad698cc7622fe729 | [
"MIT"
] | 3 | 2018-05-22T09:09:57.000Z | 2020-08-12T21:30:28.000Z | #!/usr/bin/env python3
# Copyright (c) 2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Class for bitcoind node under test"""
import decimal
import errno
import http.client
import json
import log... | 37.962687 | 248 | 0.62699 |
79f9000f6bf119bb46172090f50e34c95aee7214 | 2,095 | py | Python | server/utils.py | NSpencer4/ridge-portal | e7249faa559ef18e5b008cc6440b85dafb8e8020 | [
"MIT"
] | null | null | null | server/utils.py | NSpencer4/ridge-portal | e7249faa559ef18e5b008cc6440b85dafb8e8020 | [
"MIT"
] | 1 | 2021-06-01T22:47:34.000Z | 2021-06-01T22:47:34.000Z | server/utils.py | NSpencer4/ridge-portal | e7249faa559ef18e5b008cc6440b85dafb8e8020 | [
"MIT"
] | null | null | null | import webapp2
import json
from google.appengine.ext import ndb
from datetime import datetime
import logging
DEFAULT_TIME_FORMAT = '%Y-%m-%dT%H:%M:%S.%fZ'
class APIRequest(webapp2.RequestHandler):
def __init__(self, request, response):
# super(APIRequest, self).__init__() # pycharm really wants me to ad... | 34.344262 | 107 | 0.563246 |
67b876f67f4b3f15419fc94050b8e3dbe67f3392 | 1,390 | py | Python | lib/build/tools/rails2grunt.py | ozaytsev86/cartodb | fc43fd448b424dc4524b5d857546c13a9a53cfd0 | [
"BSD-3-Clause"
] | 1 | 2018-05-30T22:49:11.000Z | 2018-05-30T22:49:11.000Z | lib/build/tools/rails2grunt.py | ozaytsev86/cartodb | fc43fd448b424dc4524b5d857546c13a9a53cfd0 | [
"BSD-3-Clause"
] | 1 | 2019-11-25T16:45:39.000Z | 2019-11-25T16:45:39.000Z | lib/build/tools/rails2grunt.py | techonomics69/cartodb | d9f16023ecc8956810b3afe86cc1203817076ab3 | [
"BSD-3-Clause"
] | 16 | 2017-01-12T09:59:33.000Z | 2019-04-18T21:04:39.000Z |
import sys
import os.path
if (len(sys.argv) != 4):
print "rails2grunt type rails_file grunt.json"
sys.exit()
file_type = sys.argv[1]
rails_file = sys.argv[2];
rails_path = os.path.abspath(rails_file)
name = os.path.basename(rails_file).split('.')[0]
def normalize(f):
return f \
.replace('../../.... | 31.590909 | 78 | 0.469065 |
f3c1b0a5261275662dde7c63ecab9cb7be180a87 | 1,007 | py | Python | PythonScripts/utils.py | DelbertWang2/TemporalGraphSR | 5ff7bdef523ae17be85e30211568492de5e2bb29 | [
"MIT"
] | null | null | null | PythonScripts/utils.py | DelbertWang2/TemporalGraphSR | 5ff7bdef523ae17be85e30211568492de5e2bb29 | [
"MIT"
] | null | null | null | PythonScripts/utils.py | DelbertWang2/TemporalGraphSR | 5ff7bdef523ae17be85e30211568492de5e2bb29 | [
"MIT"
] | null | null | null | import numpy as np
import torch
def cal_DAD(modi_adj):
# calculate D*A*D matrix with modified adjacent matrix (adj+eye)
madj = np.array(modi_adj)
Dsqrt = np.sqrt(np.diag(madj.sum(axis=1)))
DAD = np.matmul(np.matmul(Dsqrt, madj),Dsqrt)
return torch.Tensor(DAD)
def gen_batches(features, la... | 32.483871 | 72 | 0.668322 |
60860a2db7eec5c4a3390634b352a25a7428bdc1 | 134,379 | py | Python | codenerix_invoicing/views_sales.py | centrologic/codenerix_invoicing | eb249c3a38d0e2e2fa9accf9a93f40418b906eda | [
"Apache-2.0"
] | null | null | null | codenerix_invoicing/views_sales.py | centrologic/codenerix_invoicing | eb249c3a38d0e2e2fa9accf9a93f40418b906eda | [
"Apache-2.0"
] | null | null | null | codenerix_invoicing/views_sales.py | centrologic/codenerix_invoicing | eb249c3a38d0e2e2fa9accf9a93f40418b906eda | [
"Apache-2.0"
] | 1 | 2018-05-22T10:00:23.000Z | 2018-05-22T10:00:23.000Z | # -*- coding: utf-8 -*-
#
# django-codenerix-invoicing
#
# Codenerix GNU
#
# Project URL : http://www.codenerix.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/l... | 37.949449 | 268 | 0.614798 |
674d6b8e9ece01f2080ff495d03627ded1c585ad | 3,154 | py | Python | athenet/utils/run_algorithm.py | heurezjusz/Athena | 0bdda97b0e06dbb3c1699d4ed7875e4adc96d580 | [
"BSD-2-Clause"
] | 2 | 2016-02-02T12:59:39.000Z | 2018-03-29T17:17:11.000Z | athenet/utils/run_algorithm.py | heurezjusz/Athenet | 0bdda97b0e06dbb3c1699d4ed7875e4adc96d580 | [
"BSD-2-Clause"
] | 5 | 2016-01-10T23:23:57.000Z | 2016-03-26T16:29:42.000Z | athenet/utils/run_algorithm.py | heurezjusz/Athena | 0bdda97b0e06dbb3c1699d4ed7875e4adc96d580 | [
"BSD-2-Clause"
] | 1 | 2020-02-26T20:19:17.000Z | 2020-02-26T20:19:17.000Z | """Function for running algorithm on network for multiple cases. """
import datetime
from athenet.utils import count_zeros
from athenet.utils.results import Results
def get_error_rate(network):
"""
Returns error rate in given network
:param Network network:network to check
:return float: error rate... | 36.252874 | 78 | 0.676284 |
8cc91bd87d720521f2f5a0a95297af4e59b33b0b | 27,401 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_05_01/operations/_public_ip_prefixes_operations.py | praveenkuttappan/azure-sdk-for-python | 4b79413667b7539750a6c7dde15737013a3d4bd5 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_05_01/operations/_public_ip_prefixes_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_05_01/operations/_public_ip_prefixes_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"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 ... | 49.105735 | 200 | 0.663005 |
4773befdc70454b921d3cdf5e23578bdcd93537f | 1,109 | py | Python | plugins/opsgenie/icon_opsgenie/connection/schema.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | null | null | null | plugins/opsgenie/icon_opsgenie/connection/schema.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | null | null | null | plugins/opsgenie/icon_opsgenie/connection/schema.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | null | null | null | # GENERATED BY KOMAND SDK - DO NOT EDIT
import insightconnect_plugin_runtime
import json
class Input:
API_KEY = "api_key"
class ConnectionSchema(insightconnect_plugin_runtime.Input):
schema = json.loads("""
{
"type": "object",
"title": "Variables",
"properties": {
"api_key": {
"$ref":... | 21.745098 | 60 | 0.559062 |
598dbc7e835906fd312525a64934dcf9a316588a | 2,524 | py | Python | smars_library/test_suite.py | szekai/smars_library | caf891e276541e2d00d0ad9b07ebe79177ea3cae | [
"MIT"
] | null | null | null | smars_library/test_suite.py | szekai/smars_library | caf891e276541e2d00d0ad9b07ebe79177ea3cae | [
"MIT"
] | null | null | null | smars_library/test_suite.py | szekai/smars_library | caf891e276541e2d00d0ad9b07ebe79177ea3cae | [
"MIT"
] | null | null | null | '''
Unit tests for SMARS Library
'''
import unittest
from constants import Channel
# from SMARS_Library import leg
# from SMARS_Library import Leg
from smars_library import Leg
# from SMARS_Library import set_servo_pulse
from smars_library import set_servo_pulse
class SetServoPulseTestCase(unittest.TestCase):
"... | 28.359551 | 92 | 0.631933 |
fe251050af2bc8db60b7b897c3eef8c717524190 | 3,083 | py | Python | tinyauth/models.py | Jc2k/microauth | ff7c9a1aa493fe50f7f59f618f3317910551b99d | [
"Apache-2.0"
] | 2 | 2018-06-07T18:39:37.000Z | 2020-05-16T11:08:29.000Z | tinyauth/models.py | Jc2k/microauth | ff7c9a1aa493fe50f7f59f618f3317910551b99d | [
"Apache-2.0"
] | 2 | 2017-11-19T16:52:01.000Z | 2018-08-11T10:49:08.000Z | tinyauth/models.py | Jc2k/microauth | ff7c9a1aa493fe50f7f59f618f3317910551b99d | [
"Apache-2.0"
] | 1 | 2018-05-26T06:03:04.000Z | 2018-05-26T06:03:04.000Z | import binascii
import hashlib
import json
import secrets
import sqlalchemy.types as types
from tinyauth.app import db
class StringyJSON(types.TypeDecorator):
"""Stores and retrieves JSON as TEXT."""
impl = types.TEXT
def process_bind_param(self, value, dialect):
if value is not None:
... | 26.808696 | 87 | 0.671424 |
692fd9b4245febfd51ed875e13921ad98700eeb9 | 441 | py | Python | stock_register/management/commands/delete_data.py | gitCincta/StockTool | 2ae604774cd8c271ffc49a4a39fcc412bcaf4577 | [
"Apache-2.0"
] | null | null | null | stock_register/management/commands/delete_data.py | gitCincta/StockTool | 2ae604774cd8c271ffc49a4a39fcc412bcaf4577 | [
"Apache-2.0"
] | null | null | null | stock_register/management/commands/delete_data.py | gitCincta/StockTool | 2ae604774cd8c271ffc49a4a39fcc412bcaf4577 | [
"Apache-2.0"
] | null | null | null | from django.core.management.base import BaseCommand, CommandError
from stock_register.models import Stock
class Command(BaseCommand):
"""
For extra documentation see: https://docs.djangoproject.com/en/1.8/howto/custom-management-commands/
Execute this command: python manage.py delete_data
"""
hel... | 29.4 | 104 | 0.725624 |
44421b779c6a8903817bcb8c80e3eed1fb314217 | 1,604 | py | Python | src/programy/storage/stores/sql/dao/oob.py | cdoebler1/AIML2 | ee692ec5ea3794cd1bc4cc8ec2a6b5e5c20a0d6a | [
"MIT"
] | 345 | 2016-11-23T22:37:04.000Z | 2022-03-30T20:44:44.000Z | src/programy/storage/stores/sql/dao/oob.py | MikeyBeez/program-y | 00d7a0c7d50062f18f0ab6f4a041068e119ef7f0 | [
"MIT"
] | 275 | 2016-12-07T10:30:28.000Z | 2022-02-08T21:28:33.000Z | src/programy/storage/stores/sql/dao/oob.py | VProgramMist/modified-program-y | f32efcafafd773683b3fe30054d5485fe9002b7d | [
"MIT"
] | 159 | 2016-11-28T18:59:30.000Z | 2022-03-20T18:02:44.000Z | """
Copyright (c) 2016-2020 Keith Sterling http://www.keithsterling.com
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, m... | 45.828571 | 120 | 0.767456 |
a22dc67fb48d56ad96b494e46fdbdea2481b3c6b | 2,061 | py | Python | tests/test_strength_evaluation_2D.py | KIKI007/gkr_timber | 29f3283411e45c66d9060ecdf799cd2fc23fe148 | [
"MIT"
] | null | null | null | tests/test_strength_evaluation_2D.py | KIKI007/gkr_timber | 29f3283411e45c66d9060ecdf799cd2fc23fe148 | [
"MIT"
] | null | null | null | tests/test_strength_evaluation_2D.py | KIKI007/gkr_timber | 29f3283411e45c66d9060ecdf799cd2fc23fe148 | [
"MIT"
] | null | null | null | import gkr_timber.plasticity.strength_evaluation_2D as strength_evaluation_2D
import pytest
class TestStrengthEvaluation2D:
def test_evaluate_joint_strength_2D(self):
polygons_positive = [[[-1, 0], [1, 0], [1, 1], [-1, 1]]]
strength_positive = [1]
polygons_negative = [[[-1, 0], [1, 0], [1,... | 51.525 | 166 | 0.685104 |
e073e9662cbc28ec1060968600c0351d30184f7b | 637 | py | Python | HW13/3.py | oghahroodi/IUST-Computer-Vision | 54f50324d5a385d412334e1d985d12270e4b5770 | [
"MIT"
] | null | null | null | HW13/3.py | oghahroodi/IUST-Computer-Vision | 54f50324d5a385d412334e1d985d12270e4b5770 | [
"MIT"
] | null | null | null | HW13/3.py | oghahroodi/IUST-Computer-Vision | 54f50324d5a385d412334e1d985d12270e4b5770 | [
"MIT"
] | null | null | null | def face_cat_detector(image):
img = image.copy()
# img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
detector = cv2.CascadeClassifier('haarcascade_frontalcatface_extended.xml')
rects = detector.detectMultiScale(gray, minNeighbors=5, minSize=(60, 60))
# loop ... | 45.5 | 110 | 0.642072 |
c855a2f4cefebba98a1b6af5364d08f99288a868 | 1,147 | py | Python | setup.py | matteoferla/DnD-encounter-simulator-site | 43aa166f29cf9baf7bc2ab66fb83ab3ee01eac05 | [
"MIT"
] | 2 | 2019-06-12T15:39:40.000Z | 2021-12-28T10:57:23.000Z | setup.py | matteoferla/DnD-encounter-simulator-site | 43aa166f29cf9baf7bc2ab66fb83ab3ee01eac05 | [
"MIT"
] | 1 | 2021-12-28T11:28:40.000Z | 2021-12-28T11:28:40.000Z | setup.py | matteoferla/DnD-encounter-simulator-site | 43aa166f29cf9baf7bc2ab66fb83ab3ee01eac05 | [
"MIT"
] | 5 | 2017-11-25T07:33:51.000Z | 2021-12-28T10:56:35.000Z | import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.txt')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()
requires = [
'plaster_pastedeploy',
'pyramid',
'pyramid... | 21.641509 | 63 | 0.594595 |
a5bda03213096a172da80e63c9bd4f6d201d9d42 | 546 | py | Python | config/i3/install.py | liu2z2/linux-files | bb81a5e0f1279b29474c5ef61b01be428c1935f1 | [
"MIT"
] | null | null | null | config/i3/install.py | liu2z2/linux-files | bb81a5e0f1279b29474c5ef61b01be428c1935f1 | [
"MIT"
] | null | null | null | config/i3/install.py | liu2z2/linux-files | bb81a5e0f1279b29474c5ef61b01be428c1935f1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import json
from pathlib import Path
import shutil
file_path = Path(__file__).resolve()
with open(str(file_path.parents[2] / "meta.json")) as f:
config_dict = json.load(f)
linked_config_path = Path.home() / config_dict["config_path"] / "i3"
real_config_path = file_path.parents[0]
try:
... | 27.3 | 72 | 0.760073 |
92a9ebb5f5f38aa927cc1a7d8eb810fe7182518c | 4,411 | py | Python | TileStache/S3.py | komoot/TileStache | 0cc0f3cff0496e0f6afd58e5b9aabb847e214751 | [
"BSD-3-Clause"
] | 1 | 2017-11-23T02:23:39.000Z | 2017-11-23T02:23:39.000Z | TileStache/S3.py | komoot/TileStache | 0cc0f3cff0496e0f6afd58e5b9aabb847e214751 | [
"BSD-3-Clause"
] | null | null | null | TileStache/S3.py | komoot/TileStache | 0cc0f3cff0496e0f6afd58e5b9aabb847e214751 | [
"BSD-3-Clause"
] | null | null | null | """ Caches tiles to Amazon S3.
Requires boto (2.0+):
http://pypi.python.org/pypi/boto
Example configuration:
"cache": {
"name": "S3",
"bucket": "<bucket name>",
"access": "<access key>",
"secret": "<secret key>"
}
S3 cache parameters:
bucket
Required bucket name for S3. If it doesn't ex... | 32.19708 | 123 | 0.631603 |
480cdc96583b8dbd7dc40f8d43e3cfa35c0b9d2f | 854 | py | Python | tests/unit.py | irr/python-labs | 43bb3a528c151653b2be832c7ff13240a10e18a4 | [
"Apache-2.0"
] | 4 | 2015-11-25T09:06:44.000Z | 2019-12-11T21:35:21.000Z | tests/unit.py | irr/python-labs | 43bb3a528c151653b2be832c7ff13240a10e18a4 | [
"Apache-2.0"
] | null | null | null | tests/unit.py | irr/python-labs | 43bb3a528c151653b2be832c7ff13240a10e18a4 | [
"Apache-2.0"
] | 2 | 2015-11-25T09:19:38.000Z | 2016-02-26T03:54:06.000Z | # python -B unit.py -v
import random
import unittest
class TestSequenceFunctions(unittest.TestCase):
def setUp(self):
self.seq = range(10)
def test_shuffle(self):
# make sure the shuffled sequence does not lose any elements
random.shuffle(self.seq)
self.seq.sort()
sel... | 27.548387 | 68 | 0.651054 |
b7db6bb114142c4a51a70bf0b9048a42a5acda30 | 15,157 | py | Python | src/prefect/tasks/great_expectations/checkpoints.py | nicolasiltis/prefect | 4298105651c2fe02b21013ae8a0468e9e101154d | [
"Apache-2.0"
] | 2 | 2021-10-07T20:02:33.000Z | 2021-11-09T10:46:57.000Z | src/prefect/tasks/great_expectations/checkpoints.py | nicolasiltis/prefect | 4298105651c2fe02b21013ae8a0468e9e101154d | [
"Apache-2.0"
] | 8 | 2021-10-11T16:42:59.000Z | 2022-03-31T08:42:24.000Z | src/prefect/tasks/great_expectations/checkpoints.py | nicolasiltis/prefect | 4298105651c2fe02b21013ae8a0468e9e101154d | [
"Apache-2.0"
] | null | null | null | """
Great Expectations checkpoints are combinations of data source, expectation suite, and
validation operators configuration that can be used to run Great Expectations actions.
Checkpoints are the preferred deployment of validation configuration; you can read more about
setting up checkpoints [at the Great Expectation... | 48.736334 | 140 | 0.668668 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.