hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3f228e2a2cc32627b2b7f41aaf38967a78547e66 | 694 | py | Python | setup.py | surajpandey11/Tweetpy | 785ee31b3ed58a7ad5c13cc9fea0080d93eba0b6 | [
"MIT"
] | null | null | null | setup.py | surajpandey11/Tweetpy | 785ee31b3ed58a7ad5c13cc9fea0080d93eba0b6 | [
"MIT"
] | null | null | null | setup.py | surajpandey11/Tweetpy | 785ee31b3ed58a7ad5c13cc9fea0080d93eba0b6 | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="Tweet_Assignment", # Replace with your own username
version="0.0.1",
author="Suraj Pandey",
author_email="soorajhjcms@gmail.com",
description="Assignment On Python packag... | 30.173913 | 61 | 0.665706 |
59e0165f60ff7471921590624d8f25300c2abc70 | 1,023 | py | Python | workers/arch_space/util/SGDR.py | arberzela/EfficientNAS | cf62e0ba4c0e8a509f6701e4989dec72a42b5202 | [
"MIT"
] | 51 | 2018-07-24T03:14:00.000Z | 2021-12-23T10:30:07.000Z | workers/arch_space/util/SGDR.py | automl/EfficientNAS | b5e9c8bf40ea29bb410d272efed1aeb25056c119 | [
"MIT"
] | 1 | 2018-12-22T14:08:18.000Z | 2018-12-27T20:51:13.000Z | workers/arch_space/util/SGDR.py | arberzela/EfficientNAS | cf62e0ba4c0e8a509f6701e4989dec72a42b5202 | [
"MIT"
] | 6 | 2018-08-03T14:30:34.000Z | 2020-02-25T02:53:05.000Z | import math
from torch.optim.lr_scheduler import _LRScheduler
class CosineAnnealingRestartsLR(_LRScheduler):
def __init__(self, optimizer, num_batches, T_max, T_mul=1, eta_min=0, last_epoch=-1):
'''
Here last_epoch actually means last_step since the
learning rate is decayed after each batc... | 36.535714 | 103 | 0.622678 |
c79db67177fffea628502f8a7fc9b31516d96ff1 | 1,856 | py | Python | tests/assignment/test_models.py | DerPate/OpenSlides | 2733a47d315fec9b8f3cb746fd5f3739be225d65 | [
"MIT"
] | 1 | 2015-03-22T02:07:23.000Z | 2015-03-22T02:07:23.000Z | tests/assignment/test_models.py | frauenknecht/OpenSlides | 6521d6b095bca33dc0c5f09f59067551800ea1e3 | [
"MIT"
] | null | null | null | tests/assignment/test_models.py | frauenknecht/OpenSlides | 6521d6b095bca33dc0c5f09f59067551800ea1e3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from django.test.client import Client
from openslides.agenda.models import Item, Speaker
from openslides.assignment.models import Assignment
from openslides.participant.models import User
from openslides.utils.test import TestCase
class AssignmentModelTest(TestCase):
def setUp(self):
... | 44.190476 | 102 | 0.724677 |
0cb7efc39648e641dce040773cdfd4d73d1b5d5b | 3,766 | py | Python | classy_vision/hooks/__init__.py | Sandbox3aster/ClassyVision | b499a892cb62702e2a07a27bd374379d4d83e7d9 | [
"MIT"
] | 1 | 2021-04-09T08:32:22.000Z | 2021-04-09T08:32:22.000Z | classy_vision/hooks/__init__.py | tullie/ClassyVision-1 | b6202d6323431203997039a6768762811cb7215f | [
"MIT"
] | null | null | null | classy_vision/hooks/__init__.py | tullie/ClassyVision-1 | b6202d6323431203997039a6768762811cb7215f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import copy
from pathlib import Path
from typing import Any, Dict, List
from classy_vision.generic.registry_utils impo... | 32.188034 | 82 | 0.709506 |
c6ee83e72881090dc3aa3c16056f368a3f32eba1 | 382 | py | Python | songpay/mainapp/migrations/0003_arrangement_slug.py | malfin/SongPay | 998a0e72410cd5484069edc79e09bf0e50d87aa2 | [
"Apache-2.0"
] | null | null | null | songpay/mainapp/migrations/0003_arrangement_slug.py | malfin/SongPay | 998a0e72410cd5484069edc79e09bf0e50d87aa2 | [
"Apache-2.0"
] | null | null | null | songpay/mainapp/migrations/0003_arrangement_slug.py | malfin/SongPay | 998a0e72410cd5484069edc79e09bf0e50d87aa2 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.2.9 on 2021-12-01 06:58
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('mainapp', '0002_arrangement_text'),
]
operations = [
migrations.AddField(
model_name='arrangement',
name='slug',
... | 20.105263 | 47 | 0.594241 |
f7c8cc1ecf0217ccf65a2bca851feff4821078cf | 3,609 | py | Python | src/losses/loss_functions.py | MehdiZouitine/Learning-Disentangled-Representations-via-Mutual-Information-Estimation | 52952aff647a33b749b709cd7f0c3cd059c66b54 | [
"MIT"
] | 25 | 2021-08-03T11:49:34.000Z | 2022-03-27T13:57:18.000Z | src/losses/loss_functions.py | MehdiZouitine/Learning-Disentangled-Representations-via-Mutual-Information-Estimation | 52952aff647a33b749b709cd7f0c3cd059c66b54 | [
"MIT"
] | null | null | null | src/losses/loss_functions.py | MehdiZouitine/Learning-Disentangled-Representations-via-Mutual-Information-Estimation | 52952aff647a33b749b709cd7f0c3cd059c66b54 | [
"MIT"
] | 3 | 2021-12-14T01:17:21.000Z | 2022-01-30T03:47:46.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
from src.utils.custom_typing import GanLossOutput, Tuple
class ClassifLoss(nn.Module):
"""Classifier loss"""
@staticmethod
def accuracy(y_pred, target):
return torch.sum(y_pred == target).float().mean()
def __init__(self):
... | 31.938053 | 103 | 0.650596 |
57a1d4d99dc867e0964b2e07155cc1ebb729f50a | 7,404 | py | Python | tests/test_add_option_enqueue.py | mamh-mixed/loguru | 22396695b9d8be9a46eca371279df7c427b27f61 | [
"MIT"
] | null | null | null | tests/test_add_option_enqueue.py | mamh-mixed/loguru | 22396695b9d8be9a46eca371279df7c427b27f61 | [
"MIT"
] | null | null | null | tests/test_add_option_enqueue.py | mamh-mixed/loguru | 22396695b9d8be9a46eca371279df7c427b27f61 | [
"MIT"
] | null | null | null | import pickle
import re
import sys
import time
import pytest
from loguru import logger
from .conftest import default_threading_excepthook
class NotPicklable:
def __getstate__(self):
raise pickle.PicklingError("You shall not serialize me!")
def __setstate__(self, state):
pass
class NotUnp... | 27.626866 | 83 | 0.646542 |
edf636d77197bb51ea4c137595f5c16605d5dc8a | 1,423 | py | Python | lib/taurus/qt/qtgui/display/__init__.py | MikeFalowski/taurus | ef041bf35dd847caf08a7efbe072f4020d35522e | [
"CC-BY-3.0"
] | 1 | 2016-10-19T13:54:08.000Z | 2016-10-19T13:54:08.000Z | lib/taurus/qt/qtgui/display/__init__.py | MikeFalowski/taurus | ef041bf35dd847caf08a7efbe072f4020d35522e | [
"CC-BY-3.0"
] | 27 | 2016-05-25T08:56:58.000Z | 2019-01-21T09:18:08.000Z | lib/taurus/qt/qtgui/display/__init__.py | MikeFalowski/taurus | ef041bf35dd847caf08a7efbe072f4020d35522e | [
"CC-BY-3.0"
] | 8 | 2015-07-24T09:16:50.000Z | 2018-06-12T12:33:59.000Z | #!/usr/bin/env python
#############################################################################
##
# This file is part of Taurus
##
# http://taurus-scada.org
##
# Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
# Taurus is free software: you can redistribute it and/or modify
# it under the terms of t... | 35.575 | 82 | 0.675334 |
eee2549a02df9b3bc5626cd6985804a88a0525fb | 4,373 | py | Python | sdks/python/appcenter_sdk/models/JavaScriptSolution.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/appcenter_sdk/models/JavaScriptSolution.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/appcenter_sdk/models/JavaScriptSolution.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
import pprint
import re # noqa: F401
import six
class JavaScriptSolu... | 31.460432 | 103 | 0.618568 |
3d94b6cbef6f76350d8120c7e449ba3b6153adb1 | 3,116 | py | Python | src/scancode/help.py | s4-2/scancode-toolkit | 8931b42e2630b94d0cabc834dfb3c16f01f82321 | [
"Apache-2.0",
"CC-BY-4.0"
] | 1,511 | 2015-07-01T15:29:03.000Z | 2022-03-30T13:40:05.000Z | src/scancode/help.py | s4-2/scancode-toolkit | 8931b42e2630b94d0cabc834dfb3c16f01f82321 | [
"Apache-2.0",
"CC-BY-4.0"
] | 2,695 | 2015-07-01T16:01:35.000Z | 2022-03-31T19:17:44.000Z | src/scancode/help.py | s4-2/scancode-toolkit | 8931b42e2630b94d0cabc834dfb3c16f01f82321 | [
"Apache-2.0",
"CC-BY-4.0"
] | 540 | 2015-07-01T15:08:19.000Z | 2022-03-31T12:13:11.000Z | #
# Copyright (c) nexB Inc. and others. All rights reserved.
# ScanCode is a trademark of nexB Inc.
# SPDX-License-Identifier: Apache-2.0
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
# See https://github.com/nexB/scancode-toolkit for support or download.
# See https://aboutcode.org for more in... | 35.409091 | 82 | 0.745828 |
aa5ab7852c67c7f2ba8858fd3c7be2e5d7fb7da8 | 1,016 | py | Python | 2-do_deploy_web_static.py | ralexrivero/AirBnB_clone_v3 | f6ae9107e8e1ccd53575bb82eb45f07379f480de | [
"MIT"
] | null | null | null | 2-do_deploy_web_static.py | ralexrivero/AirBnB_clone_v3 | f6ae9107e8e1ccd53575bb82eb45f07379f480de | [
"MIT"
] | null | null | null | 2-do_deploy_web_static.py | ralexrivero/AirBnB_clone_v3 | f6ae9107e8e1ccd53575bb82eb45f07379f480de | [
"MIT"
] | 1 | 2021-10-04T19:29:47.000Z | 2021-10-04T19:29:47.000Z | #!/usr/bin/python3
"""
Fabric script based on the file 1-pack_web_static.py that distributes an
archive to the web servers
"""
from fabric.api import put, run, env
from os.path import exists
env.hosts = ['142.44.167.228', '144.217.246.195']
def do_deploy(archive_path):
"""distributes an archive to the web server... | 32.774194 | 72 | 0.599409 |
506c96ca206fd52cd77fbe64ffe85e5c6f24a890 | 3,442 | py | Python | experiments/ashvin/pushervisual/reference_experiment_test.py | Asap7772/rail-rl-franka-eval | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | [
"MIT"
] | null | null | null | experiments/ashvin/pushervisual/reference_experiment_test.py | Asap7772/rail-rl-franka-eval | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | [
"MIT"
] | null | null | null | experiments/ashvin/pushervisual/reference_experiment_test.py | Asap7772/rail-rl-franka-eval | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | [
"MIT"
] | null | null | null | import railrl.misc.hyperparameter as hyp
from multiworld.envs.mujoco.cameras import sawyer_pusher_camera_upright_v0
from railrl.launchers.launcher_util import run_experiment
from railrl.torch.grill.launcher import grill_her_td3_full_experiment
from railrl.launchers.arglauncher import run_variants
# from torch import n... | 31.87037 | 74 | 0.524985 |
94cc81c3084a725e8fb1ef6bfd314473ace63b72 | 13,262 | py | Python | speech_recognition/sample_models.py | gotamist/nlp | 49ae117d2f1ef60c3c523696a4af61d816bf0469 | [
"MIT"
] | null | null | null | speech_recognition/sample_models.py | gotamist/nlp | 49ae117d2f1ef60c3c523696a4af61d816bf0469 | [
"MIT"
] | null | null | null | speech_recognition/sample_models.py | gotamist/nlp | 49ae117d2f1ef60c3c523696a4af61d816bf0469 | [
"MIT"
] | 1 | 2020-04-27T12:44:42.000Z | 2020-04-27T12:44:42.000Z | from keras import backend as K
from keras.models import Model
from keras.layers import (BatchNormalization, Conv1D, Dense, Input,
TimeDistributed, Activation, Bidirectional, SimpleRNN, GRU, Dropout, MaxPooling1D)
def simple_rnn_model(input_dim, output_dim=29):
""" Build a recurrent network for speech
"""... | 43.198697 | 211 | 0.681044 |
7ab737d01af75fbe5a88a063b89a34f1b9121aaa | 2,081 | py | Python | convert_msmarco_doc_to_t5_format.py | justinyeh1995/docTTTTTquery | 3c5c5bb07cd8e235092efbf9db7064c1a6654801 | [
"Apache-2.0"
] | 190 | 2019-11-28T19:36:02.000Z | 2022-03-22T17:21:43.000Z | convert_msmarco_doc_to_t5_format.py | justinyeh1995/docTTTTTquery | 3c5c5bb07cd8e235092efbf9db7064c1a6654801 | [
"Apache-2.0"
] | 45 | 2019-12-06T22:33:24.000Z | 2022-02-10T04:14:51.000Z | convert_msmarco_doc_to_t5_format.py | justinyeh1995/docTTTTTquery | 3c5c5bb07cd8e235092efbf9db7064c1a6654801 | [
"Apache-2.0"
] | 29 | 2019-12-05T21:50:41.000Z | 2022-03-16T12:55:20.000Z | import argparse
import re
import spacy
from tqdm import tqdm
def load_corpus(path):
print('Loading corpus...')
corpus = {}
for line in tqdm(open(path)):
doc_id, doc_url, doc_title, doc_text = line.split('\t')
doc_text = doc_text.strip()
corpus[doc_id] = (doc_title, doc_text)
re... | 33.564516 | 81 | 0.641999 |
6cb446dd71c8b9c55e8a0d648668448e032c1214 | 11,044 | py | Python | tensorflow/python/keras/layers/kernelized.py | abhaikollara/tensorflow | 4f96df3659696990cb34d0ad07dc67843c4225a9 | [
"Apache-2.0"
] | 848 | 2019-12-03T00:16:17.000Z | 2022-03-31T22:53:17.000Z | tensorflow/python/keras/layers/kernelized.py | abhaikollara/tensorflow | 4f96df3659696990cb34d0ad07dc67843c4225a9 | [
"Apache-2.0"
] | 656 | 2019-12-03T00:48:46.000Z | 2022-03-31T18:41:54.000Z | tensorflow/python/keras/layers/kernelized.py | abhaikollara/tensorflow | 4f96df3659696990cb34d0ad07dc67843c4225a9 | [
"Apache-2.0"
] | 506 | 2019-12-03T00:46:26.000Z | 2022-03-30T10:34:56.000Z | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 42.640927 | 90 | 0.70853 |
e7854477c95fb2a26ca8885d8560b5e8a2b23209 | 1,492 | py | Python | frameworks/Scala/lift-stateless/setup.py | idlewan/FrameworkBenchmarks | f187ec69752f369d84ef5a262efaef85c3a6a5ab | [
"BSD-3-Clause"
] | 4 | 2015-01-22T02:13:03.000Z | 2018-06-13T12:02:46.000Z | frameworks/Scala/lift-stateless/setup.py | ratpack/FrameworkBenchmarks | 81604309e46e382fe2ffb7970a87d728f20c8be6 | [
"BSD-3-Clause"
] | null | null | null | frameworks/Scala/lift-stateless/setup.py | ratpack/FrameworkBenchmarks | 81604309e46e382fe2ffb7970a87d728f20c8be6 | [
"BSD-3-Clause"
] | null | null | null |
import subprocess
import sys
import setup_util
import os
import time
def start(args, logfile, errfile):
setup_util.replace_text("lift-stateless/src/main/scala/Main.scala", "> \".*:3306", "> \"" + args.database_host + ":3306")
if os.name == 'nt':
subprocess.check_call('"..\\sbt\\sbt.bat" update assembly', she... | 41.444444 | 143 | 0.688338 |
eca8d198c4b732c3afc3dce76cd1e0c56f913df2 | 55,195 | py | Python | canadapost/canadapost_lib/pickup.py | Purplship/purplship-carriers | dcd044320b86e9af5fe3ef15c36ebf7828b2851b | [
"MIT"
] | 2 | 2021-04-12T22:40:28.000Z | 2021-04-21T18:28:31.000Z | canadapost/canadapost_lib/pickup.py | Purplship/purplship-carriers | dcd044320b86e9af5fe3ef15c36ebf7828b2851b | [
"MIT"
] | 2 | 2021-01-29T07:14:31.000Z | 2021-02-18T18:29:23.000Z | canadapost/canadapost_lib/pickup.py | Purplship/purplship-carriers | dcd044320b86e9af5fe3ef15c36ebf7828b2851b | [
"MIT"
] | 3 | 2020-09-09T17:04:46.000Z | 2021-03-05T00:32:32.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated Wed Jul 14 15:39:45 2021 by generateDS.py version 2.39.2.
# Python 3.8.6 (v3.8.6:db455296be, Sep 23 2020, 13:31:39) [Clang 6.0 (clang-600.0.57)]
#
# Command line options:
# ('--no-namespace-defs', '')
# ('-o', './canadapost_lib/pickup.py')
#
# Command li... | 40.435897 | 271 | 0.586339 |
81484a5559221a2dd739b46964cb294104c3b2de | 5,583 | py | Python | ML/ml_new.py | rohitgs28/Visualizing-Predicting-stocks | 23f263faae9c97451edc760b09d1c8e2df6c650a | [
"MIT"
] | null | null | null | ML/ml_new.py | rohitgs28/Visualizing-Predicting-stocks | 23f263faae9c97451edc760b09d1c8e2df6c650a | [
"MIT"
] | null | null | null | ML/ml_new.py | rohitgs28/Visualizing-Predicting-stocks | 23f263faae9c97451edc760b09d1c8e2df6c650a | [
"MIT"
] | null | null | null | #!C:\Users\Mathew\Anaconda3\python.exe
import quandl
import numpy as np
from datetime import datetime
import datetime,time
from sklearn import linear_model
from sklearn.metrics import accuracy_score
import matplotlib.pyplot as plt
from sklearn import metrics
from sklearn.metrics import mean_squared_error
from math imp... | 33.431138 | 194 | 0.786674 |
dea6c276e0cd4abca2e9c0afa299e5f67a1de930 | 3,036 | py | Python | rgw/v2/lib/exceptions.py | viduship/ceph-qe-scripts | 886619fa6600c24cbf989d65868951b9c3decd72 | [
"MIT"
] | null | null | null | rgw/v2/lib/exceptions.py | viduship/ceph-qe-scripts | 886619fa6600c24cbf989d65868951b9c3decd72 | [
"MIT"
] | null | null | null | rgw/v2/lib/exceptions.py | viduship/ceph-qe-scripts | 886619fa6600c24cbf989d65868951b9c3decd72 | [
"MIT"
] | null | null | null | import os
import sys
sys.path.append(os.path.abspath(os.path.join(__file__, "../../../")))
import logging
log = logging.getLogger()
class RGWBaseException(Exception):
# RGW Base Exception Class
def __init__(
self,
message=None,
):
super().__init__(message)
self.message = ... | 20.937931 | 69 | 0.625823 |
12b509bf455292847cd0add816211b06674b9ba1 | 10,418 | py | Python | sdk/python/pulumi_azure_native/network/v20180701/get_network_interface.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20180701/get_network_interface.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20180701/get_network_interface.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 39.313208 | 329 | 0.665291 |
bea15ff181cc57f23397e51254e2827c8cb4140c | 40,091 | py | Python | Common/loss_utils.py | JiazeWang/SP-GAN | 455003f78b1160ebe0a2056005b069808c0df35b | [
"MIT"
] | 73 | 2021-05-11T12:00:29.000Z | 2022-03-31T09:40:12.000Z | Common/loss_utils.py | JiazeWang/SP-GAN | 455003f78b1160ebe0a2056005b069808c0df35b | [
"MIT"
] | 6 | 2021-08-18T13:03:43.000Z | 2022-03-30T04:48:29.000Z | Common/loss_utils.py | JiazeWang/SP-GAN | 455003f78b1160ebe0a2056005b069808c0df35b | [
"MIT"
] | 13 | 2021-08-28T20:09:13.000Z | 2022-03-20T12:42:51.000Z | import torch
import numpy as np
import warnings
from scipy.stats import entropy
from sklearn.neighbors import NearestNeighbors
import torch.nn as nn
from numpy.linalg import norm
import sys,os
import torch.nn.functional as F
#from Common.Const import GPU
from torch.autograd import Variable, grad
sys.path.append(os.path... | 34.983421 | 113 | 0.59779 |
75b6b824f07d0ea4e76f14f5145f7e2b382b9feb | 137,399 | py | Python | modules/xia2/Modules/Xia2html/smartie.py | jorgediazjr/dials-dev20191018 | 77d66c719b5746f37af51ad593e2941ed6fbba17 | [
"BSD-3-Clause"
] | null | null | null | modules/xia2/Modules/Xia2html/smartie.py | jorgediazjr/dials-dev20191018 | 77d66c719b5746f37af51ad593e2941ed6fbba17 | [
"BSD-3-Clause"
] | null | null | null | modules/xia2/Modules/Xia2html/smartie.py | jorgediazjr/dials-dev20191018 | 77d66c719b5746f37af51ad593e2941ed6fbba17 | [
"BSD-3-Clause"
] | 1 | 2020-02-04T15:39:06.000Z | 2020-02-04T15:39:06.000Z | from __future__ import absolute_import, division, print_function
import copy
import linecache
import os
import re
#######################################################################
# Import modules that this module depends on
#######################################################################
import sys
impo... | 36.678857 | 217 | 0.591132 |
aaad7f5c0ecb48fbd51c78e81b0273101e6ea4e6 | 1,004 | py | Python | src/process/infrastructor/connection/file/connectors/FileConnector.py | jedicontributors/pythondataintegrator | 3e877b367ab9b20185476128ec053db41087879f | [
"MIT"
] | null | null | null | src/process/infrastructor/connection/file/connectors/FileConnector.py | jedicontributors/pythondataintegrator | 3e877b367ab9b20185476128ec053db41087879f | [
"MIT"
] | null | null | null | src/process/infrastructor/connection/file/connectors/FileConnector.py | jedicontributors/pythondataintegrator | 3e877b367ab9b20185476128ec053db41087879f | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
from queue import Queue
from infrastructor.dependency.scopes import IScoped
from pandas import DataFrame
class FileConnector(ABC,IScoped):
@abstractmethod
def connect(self):
pass
@abstractmethod
def disconnect(self):
pass
@abstractmethod
... | 23.904762 | 156 | 0.658367 |
07609ef1d425b874c69711869b686c0e29498fbf | 16,602 | py | Python | helper_functions.py | srdjanko/CarND-Advanced-Lane-Lines | 896e5957f0fb693456e82ff57d806e8bd384869c | [
"MIT"
] | null | null | null | helper_functions.py | srdjanko/CarND-Advanced-Lane-Lines | 896e5957f0fb693456e82ff57d806e8bd384869c | [
"MIT"
] | null | null | null | helper_functions.py | srdjanko/CarND-Advanced-Lane-Lines | 896e5957f0fb693456e82ff57d806e8bd384869c | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import logging
def draw_polyline(img, vertices, color=[255, 0, 0], thickness=2, Closed = False):
"""
Simple method for drawing connected lines or polygons, given the
set of points. Starting and ending point can b... | 39.717703 | 109 | 0.688833 |
dda6f9fba1cfbc1c43aae7a05557c55bc96b9f19 | 1,218 | py | Python | building_deep_learning_apps/Exercise Files/06/model_logging final.py | gilson27/linkedin_learning | ebed1866eeeef598ca678af7ef11d2ad5ef0850d | [
"MIT"
] | null | null | null | building_deep_learning_apps/Exercise Files/06/model_logging final.py | gilson27/linkedin_learning | ebed1866eeeef598ca678af7ef11d2ad5ef0850d | [
"MIT"
] | 2 | 2020-07-16T22:04:26.000Z | 2021-05-08T12:41:13.000Z | building_deep_learning_apps/Exercise Files/06/model_logging final.py | gilson27/linkedin_learning | ebed1866eeeef598ca678af7ef11d2ad5ef0850d | [
"MIT"
] | null | null | null | import pandas as pd
import keras
from keras.models import Sequential
from keras.layers import *
training_data_df = pd.read_csv("sales_data_training_scaled.csv")
X = training_data_df.drop('total_earnings', axis=1).values
Y = training_data_df[['total_earnings']].values
# Define the model
model = Sequential()
model.add... | 28.325581 | 90 | 0.7422 |
e484759d1f00fe05116132c6bf12918f5f2c8829 | 147 | py | Python | exercises/Interactive Widgets/soln/data_explorer.py | kaishuocheng/jupyter | 96ae75723eb62d30cb02768295422898aace79ef | [
"BSD-3-Clause"
] | 748 | 2015-01-05T05:48:49.000Z | 2022-02-27T01:05:42.000Z | exercises/Interactive Widgets/soln/data_explorer.py | kaishuocheng/jupyter | 96ae75723eb62d30cb02768295422898aace79ef | [
"BSD-3-Clause"
] | 32 | 2015-04-02T22:25:41.000Z | 2022-01-18T05:31:46.000Z | exercises/Interactive Widgets/soln/data_explorer.py | kaishuocheng/jupyter | 96ae75723eb62d30cb02768295422898aace79ef | [
"BSD-3-Clause"
] | 816 | 2015-01-04T04:19:15.000Z | 2022-03-17T20:57:19.000Z | def plot_iris(a=None, col1=0, col2=0):
plt.scatter(a[:,col1], a[:,col2])
interact(plot_iris, a=fixed(iris_data.data), col1=(0,3), col2=(0,3)); | 36.75 | 69 | 0.646259 |
9db4ba777ee9fbe75b0add6795bbbccc2de8d1fe | 3,266 | py | Python | tests/unit/states/test_git.py | Bacon-Unlimited/salt | 9b1b791d212a6810c430dd15c63fbce3a4f7e1d6 | [
"Apache-2.0"
] | 9,425 | 2015-01-01T05:59:24.000Z | 2022-03-31T20:44:05.000Z | tests/unit/states/test_git.py | Bacon-Unlimited/salt | 9b1b791d212a6810c430dd15c63fbce3a4f7e1d6 | [
"Apache-2.0"
] | 33,507 | 2015-01-01T00:19:56.000Z | 2022-03-31T23:48:20.000Z | tests/unit/states/test_git.py | Bacon-Unlimited/salt | 9b1b791d212a6810c430dd15c63fbce3a4f7e1d6 | [
"Apache-2.0"
] | 5,810 | 2015-01-01T19:11:45.000Z | 2022-03-31T02:37:20.000Z | """
:codeauthor: Erik Johnson <erik@saltstack.com>
"""
import logging
import os
import salt.states.git as git_state # Don't potentially shadow GitPython
from tests.support.helpers import with_tempdir
from tests.support.mixins import LoaderModuleMockMixin
from tests.support.mock import DEFAULT, MagicMock, Mock, ... | 35.11828 | 87 | 0.615126 |
2135cc8ab7c089debd1eba0fe31b58fbf5861a80 | 1,868 | py | Python | var/spack/repos/builtin/packages/py-fava/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2015-10-04T02:17:46.000Z | 2018-02-07T18:23:00.000Z | var/spack/repos/builtin/packages/py-fava/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 22 | 2017-08-01T22:45:10.000Z | 2022-03-10T07:46:31.000Z | var/spack/repos/builtin/packages/py-fava/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 4 | 2016-06-10T17:57:39.000Z | 2018-09-11T04:59:38.000Z | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyFava(PythonPackage):
"""Fava is a web interface for the double-entry bookkeeping softwar... | 42.454545 | 95 | 0.615632 |
c6380470d975e516f9d2c3603bb1076d2fd39036 | 4,632 | py | Python | mobula/Net.py | wkcn/mobula | 4eec938d6477776f5f2d68bcf41de83fb8da5195 | [
"MIT"
] | 47 | 2017-07-15T02:13:18.000Z | 2022-01-01T09:37:59.000Z | mobula/Net.py | wkcn/mobula | 4eec938d6477776f5f2d68bcf41de83fb8da5195 | [
"MIT"
] | 3 | 2018-06-22T13:55:12.000Z | 2020-01-29T01:41:13.000Z | mobula/Net.py | wkcn/mobula | 4eec938d6477776f5f2d68bcf41de83fb8da5195 | [
"MIT"
] | 8 | 2017-09-03T12:42:54.000Z | 2020-09-27T03:38:59.000Z | #coding=utf-8
from .Defines import *
from .layers.utils.MultiInput import *
from .layers.utils.MultiOutput import *
from .layers.utils.Saver import *
from . import solvers
from . import wrapper
import functools
import signal
import weakref
try:
import queue
except:
import Queue as queue
class Net(object):
... | 30.88 | 168 | 0.530009 |
647716fe60d32877837b9b44ced048b662a0498e | 1,635 | py | Python | src/cli.py | jconradhanson/BEAT | 47a828c486e674323782c11b78be63aae003c45d | [
"MIT"
] | null | null | null | src/cli.py | jconradhanson/BEAT | 47a828c486e674323782c11b78be63aae003c45d | [
"MIT"
] | null | null | null | src/cli.py | jconradhanson/BEAT | 47a828c486e674323782c11b78be63aae003c45d | [
"MIT"
] | null | null | null | import logging
import argparse
from beat import beat
from definitions import path_log
# LOGGING CONFIGURATION
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s %(message)s',
datefmt='%m/%d/%Y %I:%M:%S %p'
)
logging.root.addHandler(logging.FileHandler(path_log, mode='w', encoding='UTF-8'))
loggin... | 35.543478 | 105 | 0.687462 |
653713db78428bc85ee72e51d56aa494f9404d44 | 2,563 | py | Python | experiments/layer-outputs/rnn-mnist.py | sabuj7177/TensorFI2 | 6272a3951793255815506f143748bdd9345c1d2f | [
"MIT"
] | 1 | 2021-05-22T19:34:57.000Z | 2021-05-22T19:34:57.000Z | experiments/layer-outputs/rnn-mnist.py | sabuj7177/TensorFI2 | 6272a3951793255815506f143748bdd9345c1d2f | [
"MIT"
] | 7 | 2021-05-17T01:50:21.000Z | 2022-02-10T13:45:03.000Z | experiments/layer-outputs/rnn-mnist.py | sabuj7177/TensorFI2 | 6272a3951793255815506f143748bdd9345c1d2f | [
"MIT"
] | 1 | 2022-03-01T19:29:28.000Z | 2022-03-01T19:29:28.000Z | import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
import tensorflow as tf
from tensorflow.keras import datasets, layers, models
import numpy as np
import time, sys, math, random
from src import tensorfi2 as tfi
(train_images, train_labels), (test_images, test_labels) = datasets.mnist.load_data()
train_images, tes... | 29.125 | 141 | 0.715568 |
d3e8418d06138c6c7d035a29acbb7346c90cffce | 414 | py | Python | aliexpress/api/rest/CainiaoGlobalSolutionInquiry.py | bayborodin/aliexpress-sdk | 89935adf46412d8d054fa80a19153971279c4106 | [
"MIT"
] | 3 | 2021-03-10T16:46:43.000Z | 2022-03-29T15:28:50.000Z | aliexpress/api/rest/CainiaoGlobalSolutionInquiry.py | bayborodin/aliexpress-sdk | 89935adf46412d8d054fa80a19153971279c4106 | [
"MIT"
] | null | null | null | aliexpress/api/rest/CainiaoGlobalSolutionInquiry.py | bayborodin/aliexpress-sdk | 89935adf46412d8d054fa80a19153971279c4106 | [
"MIT"
] | 2 | 2021-10-30T17:09:34.000Z | 2021-11-25T11:50:52.000Z | from aliexpress.api.base import RestApi
class CainiaoGlobalSolutionInquiryRequest(RestApi):
def __init__(self, domain="gw.api.taobao.com", port=80):
RestApi.__init__(self, domain, port)
self.locale = None
self.package_params = None
self.seller_info_param = None
self.trade_o... | 29.571429 | 60 | 0.695652 |
27f59ff1173252c9e4d069bb2411b98acd62252f | 1,922 | py | Python | aliyun-python-sdk-foas/aliyunsdkfoas/request/v20181111/GetInstanceExceptionsRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-foas/aliyunsdkfoas/request/v20181111/GetInstanceExceptionsRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-foas/aliyunsdkfoas/request/v20181111/GetInstanceExceptionsRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.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... | 36.961538 | 106 | 0.765349 |
0e4e07080b9bdbc59afa51fc2f8121dce22f3ea4 | 8,881 | py | Python | htdfsdk/web3/_utils/rpc_abi.py | youngqqcn/htdfsdk | c22f213a967c8233bb6ccfb01bf148112efd44db | [
"MIT"
] | 2 | 2021-01-21T01:46:29.000Z | 2021-03-12T05:59:19.000Z | htdfsdk/web3/_utils/rpc_abi.py | youngqqcn/htdfsdk | c22f213a967c8233bb6ccfb01bf148112efd44db | [
"MIT"
] | null | null | null | htdfsdk/web3/_utils/rpc_abi.py | youngqqcn/htdfsdk | c22f213a967c8233bb6ccfb01bf148112efd44db | [
"MIT"
] | null | null | null | from typing import (
Any,
Callable,
Dict,
Iterable,
Sequence,
Tuple,
)
from eth_typing import (
TypeStr,
)
from eth_utils import (
to_dict,
)
from eth_utils.curried import (
apply_formatter_at_index,
)
from eth_utils.toolz import (
curry,
)
from htdfsdk.web3._utils.abi import (... | 37.952991 | 100 | 0.734715 |
7ff2b96920d01e8487d316105914b12ef91e2121 | 67 | py | Python | src/drugex/api/designer/__init__.py | martin-sicho/DrugEx | c303cb675e2d4a99b12f1dfa83cd7e5c5e3550df | [
"MIT"
] | 5 | 2020-05-29T13:19:04.000Z | 2022-03-09T12:54:58.000Z | src/drugex/api/designer/__init__.py | martin-sicho/DrugEx | c303cb675e2d4a99b12f1dfa83cd7e5c5e3550df | [
"MIT"
] | null | null | null | src/drugex/api/designer/__init__.py | martin-sicho/DrugEx | c303cb675e2d4a99b12f1dfa83cd7e5c5e3550df | [
"MIT"
] | 1 | 2020-05-20T13:15:42.000Z | 2020-05-20T13:15:42.000Z | """
__init__.py
Created by: Martin Sicho
On: 25-11-19, 15:16
"""
| 8.375 | 24 | 0.626866 |
0ee9f06b94ddb47e72b3105cdacfc4906a2352f1 | 6,399 | py | Python | basewatch_alert_service.py | sskirch/basewatch | 2ccb3466a524966baf269659708121d5fd909c62 | [
"Apache-2.0"
] | null | null | null | basewatch_alert_service.py | sskirch/basewatch | 2ccb3466a524966baf269659708121d5fd909c62 | [
"Apache-2.0"
] | null | null | null | basewatch_alert_service.py | sskirch/basewatch | 2ccb3466a524966baf269659708121d5fd909c62 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import time
import math
import sys
from twilio.rest import Client
from ConfigParser import SafeConfigParser
import smtplib
from smtplib import SMTPException
from datetime import datetime, timedelta
import sensors
import triggers
conn = None
count = 0
msg_time = {}
SMS_from = None
SMS_to = None... | 28.824324 | 169 | 0.66276 |
3f1536413b6b2d2d00a9aa06678a6306e7ac3bd4 | 2,386 | py | Python | rllab/envs/base.py | prosello/rllab | 8677356874d41eb9354785500b554eaf635ece2e | [
"MIT"
] | 10 | 2017-09-05T17:57:26.000Z | 2021-11-10T20:54:09.000Z | rllab/envs/base.py | prosello/rllab | 8677356874d41eb9354785500b554eaf635ece2e | [
"MIT"
] | null | null | null | rllab/envs/base.py | prosello/rllab | 8677356874d41eb9354785500b554eaf635ece2e | [
"MIT"
] | 18 | 2017-04-11T22:29:39.000Z | 2021-01-11T13:45:50.000Z | from .env_spec import EnvSpec
import collections
class Env(object):
def step(self, action):
"""
Run one timestep of the environment's dynamics. When end of episode
is reached, reset() should be called to reset the environment's internal state.
Input
-----
action : a... | 25.934783 | 96 | 0.610645 |
a587e15b92c4d70adcf9d4f9079c6baeb615c8e9 | 7,193 | py | Python | setup.py | huangruizhe/espresso | ee658bcc959bfbe8a7a61d7374d532d082d2aa26 | [
"MIT"
] | null | null | null | setup.py | huangruizhe/espresso | ee658bcc959bfbe8a7a61d7374d532d082d2aa26 | [
"MIT"
] | null | null | null | setup.py | huangruizhe/espresso | ee658bcc959bfbe8a7a61d7374d532d082d2aa26 | [
"MIT"
] | 2 | 2021-01-15T09:55:07.000Z | 2021-01-15T10:02:31.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import os
import subprocess
import sys
from setuptools import setup, find_packages, Extension
from setuptools import E... | 28.207843 | 92 | 0.573057 |
da9cd90b653ccc7771a54c5ec65a7d901c4366fd | 3,384 | py | Python | sdk/opendp/smartnoise/sql/reader/base.py | benlistyg/smartnoise-sdk | 8d6de762700090dbed074336f643f7fabebae10e | [
"MIT"
] | 1 | 2021-12-30T15:21:54.000Z | 2021-12-30T15:21:54.000Z | sdk/opendp/smartnoise/sql/reader/base.py | benlistyg/smartnoise-sdk | 8d6de762700090dbed074336f643f7fabebae10e | [
"MIT"
] | null | null | null | sdk/opendp/smartnoise/sql/reader/base.py | benlistyg/smartnoise-sdk | 8d6de762700090dbed074336f643f7fabebae10e | [
"MIT"
] | null | null | null | from opendp.smartnoise.reader.base import Reader
class SqlReader(Reader):
def __init__(self, name_compare=None, serializer=None):
self.compare = NameCompare() if name_compare is None else name_compare
self.serializer = serializer
def execute(self, query):
raise NotImplementedError("Ex... | 34.886598 | 98 | 0.618203 |
118c58ba8f30364167ed859364c66962e9a938f3 | 2,593 | py | Python | calipso/propertiesdialog.py | NASA-DEVELOP/vocal | 15182377cd9d7de1c03b123e3bbe15b0e959ac80 | [
"NASA-1.3"
] | 18 | 2017-06-26T19:16:40.000Z | 2022-03-05T22:19:20.000Z | calipso/propertiesdialog.py | NASA-DEVELOP/vocal | 15182377cd9d7de1c03b123e3bbe15b0e959ac80 | [
"NASA-1.3"
] | 14 | 2017-05-12T16:43:14.000Z | 2021-10-05T06:08:15.000Z | calipso/propertiesdialog.py | NASA-DEVELOP/vocal | 15182377cd9d7de1c03b123e3bbe15b0e959ac80 | [
"NASA-1.3"
] | 11 | 2017-06-20T19:58:56.000Z | 2021-12-29T02:09:15.000Z | ###################################
# Created on Aug 9, 2015
#
# @author: Grant Mercer
#
###################################
from Tkconstants import FLAT, RIGHT, LEFT
import collections
import tkFileDialog
import tkMessageBox
from Tkinter import Toplevel, Entry, Button, BOTH, Frame, \
Label, BOTTOM, TOP, X, R... | 35.520548 | 74 | 0.606633 |
6735dde96117a97d582c9bb8caa39800c612b9cf | 946 | py | Python | madox_ws/src/jetbot_oled_display/jetbot_oled_display/timer.py | Cap-n-Proud/scrap | 25109e96e4a3c30ca525cb65ffc02e28e6e05b94 | [
"Apache-2.0"
] | null | null | null | madox_ws/src/jetbot_oled_display/jetbot_oled_display/timer.py | Cap-n-Proud/scrap | 25109e96e4a3c30ca525cb65ffc02e28e6e05b94 | [
"Apache-2.0"
] | null | null | null | madox_ws/src/jetbot_oled_display/jetbot_oled_display/timer.py | Cap-n-Proud/scrap | 25109e96e4a3c30ca525cb65ffc02e28e6e05b94 | [
"Apache-2.0"
] | null | null | null | # timer.py
import time
class TimerError(Exception):
"""A custom exception used to report errors in use of Timer class"""
class Timer:
def __init__(self):
self._start_time = None
def start(self):
"""Start a new timer"""
if self._start_time is not None:
raise Timer... | 26.277778 | 79 | 0.607822 |
22dfcb37989b5108c8ffebeb8d658fce5999aadb | 4,947 | py | Python | parsePioneerWomanRecipe.py | zachRudz/dokuWikiRecipeParsing | ad36d4e21e84e897339940c8b9e9e8bbb853606e | [
"MIT"
] | null | null | null | parsePioneerWomanRecipe.py | zachRudz/dokuWikiRecipeParsing | ad36d4e21e84e897339940c8b9e9e8bbb853606e | [
"MIT"
] | null | null | null | parsePioneerWomanRecipe.py | zachRudz/dokuWikiRecipeParsing | ad36d4e21e84e897339940c8b9e9e8bbb853606e | [
"MIT"
] | null | null | null | # This script will parse a recipe from thePioneerWoman.com,
# and output it in dokuwiki format to stdout.
## Reqirements: Beautiful soup, requests
# pip3 install beautifulsoup4
# pip3 install requests
## Usage:
# python3 parsePioneerWomanRecipe.py [url of recipe]
# python3 parsePioneerWomanRecipe.py http://thepionee... | 29.801205 | 114 | 0.690722 |
f753b672926677649d60a11fcfabcae3b859e9d9 | 4,181 | py | Python | pypureclient/pure1/Pure1_1_0/models/metric_get_response.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 14 | 2018-12-07T18:30:27.000Z | 2022-02-22T09:12:33.000Z | pypureclient/pure1/Pure1_1_0/models/metric_get_response.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 28 | 2019-09-17T21:03:52.000Z | 2022-03-29T22:07:35.000Z | pypureclient/pure1/Pure1_1_0/models/metric_get_response.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 15 | 2020-06-11T15:50:08.000Z | 2022-03-21T09:27:25.000Z | # coding: utf-8
"""
Pure1 Public REST API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 1.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re
import six
import typing
from... | 33.717742 | 522 | 0.587898 |
52f274e7a67e17f7dde22850f2f725fd8843cea7 | 3,020 | py | Python | test/test_pml/test_utils/test_collection_utils.py | ashadhaz/pml | 8d9261c8885a82d795c89de23f53ff7d05ef9495 | [
"MIT"
] | 2 | 2018-03-21T16:26:16.000Z | 2020-10-27T02:45:11.000Z | test/test_pml/test_utils/test_collection_utils.py | ashadhaz/pml | 8d9261c8885a82d795c89de23f53ff7d05ef9495 | [
"MIT"
] | null | null | null | test/test_pml/test_utils/test_collection_utils.py | ashadhaz/pml | 8d9261c8885a82d795c89de23f53ff7d05ef9495 | [
"MIT"
] | 4 | 2015-02-25T16:19:05.000Z | 2021-02-06T06:36:46.000Z | # Copyright (C) 2012 David Rusk
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distr... | 38.227848 | 79 | 0.698344 |
fb18dbf1aebde279fd228ae56402fef9c3e8d2a5 | 15,953 | py | Python | sdk/purview/azure-purview-scanning/azure/purview/scanning/rest/scans/_request_builders.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 3 | 2020-06-23T02:25:27.000Z | 2021-09-07T18:48:11.000Z | sdk/purview/azure-purview-scanning/azure/purview/scanning/rest/scans/_request_builders.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 510 | 2019-07-17T16:11:19.000Z | 2021-08-02T08:38:32.000Z | sdk/purview/azure-purview-scanning/azure/purview/scanning/rest/scans/_request_builders.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 5 | 2019-09-04T12:51:37.000Z | 2020-09-16T07:28:40.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 ... | 42.884409 | 1,375 | 0.55651 |
5b6bcc05aeaa92d98bc6ffc63aa9967c28a1b51b | 2,275 | py | Python | tests/integration/modules/test_test.py | byteskeptical/salt | 637fe0b04f38b2274191b005d73b3c6707d7f400 | [
"Apache-2.0"
] | 12 | 2015-01-21T00:18:25.000Z | 2021-07-11T07:35:26.000Z | tests/integration/modules/test_test.py | byteskeptical/salt | 637fe0b04f38b2274191b005d73b3c6707d7f400 | [
"Apache-2.0"
] | 86 | 2017-01-27T11:54:46.000Z | 2020-05-20T06:25:26.000Z | tests/integration/modules/test_test.py | byteskeptical/salt | 637fe0b04f38b2274191b005d73b3c6707d7f400 | [
"Apache-2.0"
] | 12 | 2015-01-05T09:50:42.000Z | 2019-08-19T01:43:40.000Z | # -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import, print_function, unicode_literals
# Import Salt Testing libs
from tests.support.case import ModuleCase
from tests.support.mixins import AdaptedConfigurationTestCaseMixin
# Import salt libs
import salt.version
import salt.config
cla... | 23.697917 | 79 | 0.498022 |
5e45389d213b7fcccca87dfd16fa3e94e6b8e2bf | 7,795 | py | Python | codes/ONNet/python-package/onnet/DiffractiveLayer.py | azopticsinc/optical-neural-network | 28280014a6c1fc717a5077ed5e3c3496a4b103ac | [
"MIT"
] | 1 | 2021-04-27T00:50:12.000Z | 2021-04-27T00:50:12.000Z | codes/ONNet/python-package/onnet/DiffractiveLayer.py | dalerxli/optical-neural-networks-1 | 28280014a6c1fc717a5077ed5e3c3496a4b103ac | [
"MIT"
] | null | null | null | codes/ONNet/python-package/onnet/DiffractiveLayer.py | dalerxli/optical-neural-networks-1 | 28280014a6c1fc717a5077ed5e3c3496a4b103ac | [
"MIT"
] | 1 | 2021-08-14T02:31:06.000Z | 2021-08-14T02:31:06.000Z | import torch
from .Z_utils import COMPLEX_utils as Z
from .some_utils import *
import numpy as np
import random
import torch.nn as nn
import matplotlib
#matplotlib.use('Agg')
import matplotlib.pyplot as plt
#https://pytorch.org/tutorials/beginner/pytorch_with_examples.html#pytorch-custom-nn-modules
class DiffractiveL... | 35.112613 | 118 | 0.563566 |
1d7c013683768d39995a9bf0b10b2b52e3ea2d3f | 1,906 | py | Python | masakari-7.0.0/masakari/api/openstack/ha/versionsV1.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | null | null | null | masakari-7.0.0/masakari/api/openstack/ha/versionsV1.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | masakari-7.0.0/masakari/api/openstack/ha/versionsV1.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 2 | 2020-03-15T01:24:15.000Z | 2020-07-22T20:34:26.000Z | # Copyright (c) 2016 NTT Data
# 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 ... | 32.305085 | 78 | 0.681007 |
780abe59e45e780094b58b5573249a2f20c12ee6 | 495 | py | Python | src/eventbus/logger.py | cyclegen/eventbus-py | 423a2201ca9a084206ed0102903cff7c0e940e16 | [
"MIT"
] | 1 | 2021-06-18T09:58:24.000Z | 2021-06-18T09:58:24.000Z | src/eventbus/logger.py | GhostLee/eventbus-py | f378c5ce28fe8ca4b9b2fc9f3959bfb70cc8d874 | [
"MIT"
] | null | null | null | src/eventbus/logger.py | GhostLee/eventbus-py | f378c5ce28fe8ca4b9b2fc9f3959bfb70cc8d874 | [
"MIT"
] | 1 | 2021-05-24T23:54:13.000Z | 2021-05-24T23:54:13.000Z | import abc
from abc import abstractmethod
class Logger(abc.ABC):
@abstractmethod
def trace(self, msg):
pass
@abstractmethod
def debug(self, msg):
pass
@abstractmethod
def info(self, msg):
pass
@abstractmethod
def warning(self, msg):
pass
@abstra... | 14.558824 | 30 | 0.589899 |
919268f99e3556ef97ca43fa7ec3a2c9d8999388 | 19,946 | py | Python | features/efficientnet.py | SConsul/FLITE | 7e3f462e66845a5c05e909d6a21dc1862a58579b | [
"MIT"
] | null | null | null | features/efficientnet.py | SConsul/FLITE | 7e3f462e66845a5c05e909d6a21dc1862a58579b | [
"MIT"
] | null | null | null | features/efficientnet.py | SConsul/FLITE | 7e3f462e66845a5c05e909d6a21dc1862a58579b | [
"MIT"
] | null | null | null | """model.py - Model and module class for EfficientNet.
They are built to mirror those in the official TensorFlow implementation.
"""
# Author: lukemelas (github username)
# Github repo: https://github.com/lukemelas/EfficientNet-PyTorch
# With adjustments and added comments by workingcoder (github username).
import... | 41.381743 | 122 | 0.646094 |
ac1061716324c8c57307790fab625e9b49e64d01 | 4,810 | py | Python | vkikriging/kriging_v3.py | rdwight/vkikriging | 91c9d274916d77a6729bf0fe426f980cc16c2c48 | [
"MIT"
] | 3 | 2021-05-19T13:12:27.000Z | 2022-03-19T03:18:37.000Z | vkikriging/kriging_v3.py | rdwight/vkikriging | 91c9d274916d77a6729bf0fe426f980cc16c2c48 | [
"MIT"
] | null | null | null | vkikriging/kriging_v3.py | rdwight/vkikriging | 91c9d274916d77a6729bf0fe426f980cc16c2c48 | [
"MIT"
] | 1 | 2019-03-21T18:30:52.000Z | 2019-03-21T18:30:52.000Z | """
Universal Kriging - version 3 (`kriging_v3`)
============================================
Universal Kriging in d-dimensions. This differs from `kriging_v1` and `kriging_v2`
which implement only simple Kriging.
"""
import numpy as np
from .mylib import Timing
from .covariance import covariance_squaredexponential... | 37.286822 | 126 | 0.632432 |
72b344200279c920408a69f965b23a9a13f68004 | 772 | py | Python | test_StraetoGT.py | StFS/StraetoGT | 8e3c88ca9baccd02e03d15ca7095621dddabcbd1 | [
"MIT"
] | 1 | 2015-05-04T03:47:38.000Z | 2015-05-04T03:47:38.000Z | test_StraetoGT.py | StFS/StraetoGT | 8e3c88ca9baccd02e03d15ca7095621dddabcbd1 | [
"MIT"
] | null | null | null | test_StraetoGT.py | StFS/StraetoGT | 8e3c88ca9baccd02e03d15ca7095621dddabcbd1 | [
"MIT"
] | null | null | null | import appengine_config
import os
import unittest
import threading
import requests
import xml.etree.ElementTree as ET
import SimpleHTTPServer
import SocketServer
import StraetoGT
class StraetoGT_TestCase(unittest.TestCase):
def setUp(self):
handler = SimpleHTTPServer.SimpleHTTPRequestHandler
sel... | 24.125 | 93 | 0.717617 |
0aa14dee7c42090d089d0e3561942cb2829f2c39 | 108 | py | Python | multiProcess/ThreadTest2.py | BenoitYU/inventory-hunter | 60901503009490f86f9bf9a9e7bb0c3b73fdf12d | [
"MIT"
] | null | null | null | multiProcess/ThreadTest2.py | BenoitYU/inventory-hunter | 60901503009490f86f9bf9a9e7bb0c3b73fdf12d | [
"MIT"
] | null | null | null | multiProcess/ThreadTest2.py | BenoitYU/inventory-hunter | 60901503009490f86f9bf9a9e7bb0c3b73fdf12d | [
"MIT"
] | null | null | null | import time
for i in range(5):
time.sleep(2)
print(f'this is in thread 2, the cycle number is {i}') | 21.6 | 58 | 0.648148 |
a0ce3fdda4a97442e2c8a69f85387096ea29f929 | 1,290 | py | Python | aiida/backends/sqlalchemy/migrations/versions/3d6190594e19_remove_dbcomputer_enabled.py | azadoks/aiida-core | b806b7fef8fc79090deccfe2019b77cb922e0581 | [
"MIT",
"BSD-3-Clause"
] | 180 | 2019-07-12T07:45:26.000Z | 2022-03-22T13:16:57.000Z | aiida/backends/sqlalchemy/migrations/versions/3d6190594e19_remove_dbcomputer_enabled.py | azadoks/aiida-core | b806b7fef8fc79090deccfe2019b77cb922e0581 | [
"MIT",
"BSD-3-Clause"
] | 2,325 | 2019-07-04T13:41:44.000Z | 2022-03-31T12:17:10.000Z | aiida/backends/sqlalchemy/migrations/versions/3d6190594e19_remove_dbcomputer_enabled.py | azadoks/aiida-core | b806b7fef8fc79090deccfe2019b77cb922e0581 | [
"MIT",
"BSD-3-Clause"
] | 88 | 2019-07-06T01:42:39.000Z | 2022-03-18T14:20:09.000Z | # -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... | 34.864865 | 106 | 0.566667 |
135a8cf6d5b919e7e070836aca5b0befc8370d1a | 22,071 | py | Python | django/utils/translation/trans_real.py | mitar/django | aa757ac22de3e657df49086cf01a26f6c73b8dfb | [
"BSD-3-Clause"
] | 1 | 2016-05-09T02:41:07.000Z | 2016-05-09T02:41:07.000Z | django/utils/translation/trans_real.py | akaihola/django | 169b1a404c8118bb75840523d5fb3543de9c8889 | [
"BSD-3-Clause"
] | null | null | null | django/utils/translation/trans_real.py | akaihola/django | 169b1a404c8118bb75840523d5fb3543de9c8889 | [
"BSD-3-Clause"
] | null | null | null | """Translation helper functions."""
import locale
import os
import re
import sys
import gettext as gettext_module
from io import BytesIO
from threading import local
from django.utils.importlib import import_module
from django.utils.safestring import mark_safe, SafeData
# Translations are cached in a dictionary for ... | 37.345178 | 143 | 0.586063 |
499382cde17c6c4b24b30dfa0346f9b8935a22e8 | 6,097 | py | Python | pulumi/python/kubernetes/nginx/ingress-controller-repo-only/__main__.py | apcurrier/kic-reference-architectures | 50be4282fde08e3142de1aa698e566c4436a5104 | [
"Apache-2.0"
] | null | null | null | pulumi/python/kubernetes/nginx/ingress-controller-repo-only/__main__.py | apcurrier/kic-reference-architectures | 50be4282fde08e3142de1aa698e566c4436a5104 | [
"Apache-2.0"
] | null | null | null | pulumi/python/kubernetes/nginx/ingress-controller-repo-only/__main__.py | apcurrier/kic-reference-architectures | 50be4282fde08e3142de1aa698e566c4436a5104 | [
"Apache-2.0"
] | 1 | 2022-03-24T23:50:45.000Z | 2022-03-24T23:50:45.000Z | import os
import pulumi
from pulumi import Output
import pulumi_kubernetes as k8s
from pulumi_kubernetes.core.v1 import Service
from pulumi_kubernetes.helm.v3 import Release, ReleaseArgs, RepositoryOptsArgs
from pulumi_kubernetes.yaml import ConfigFile
from kic_util import pulumi_config
#
# We default to the OSS IC;... | 32.089474 | 112 | 0.62539 |
00147ef2bc089e5ef551a4fd09bc71d82de01863 | 809 | py | Python | tests/models/test_hooks.py | mistasse/pytorch-lightning | 3a642601e84c3abf1f1b438f9acc932a1f150f7f | [
"Apache-2.0"
] | 1 | 2021-07-29T18:44:58.000Z | 2021-07-29T18:44:58.000Z | tests/models/test_hooks.py | mistasse/pytorch-lightning | 3a642601e84c3abf1f1b438f9acc932a1f150f7f | [
"Apache-2.0"
] | null | null | null | tests/models/test_hooks.py | mistasse/pytorch-lightning | 3a642601e84c3abf1f1b438f9acc932a1f150f7f | [
"Apache-2.0"
] | null | null | null | import pytest
import tests.base.utils as tutils
from pytorch_lightning import Trainer
from tests.base import EvalModelTemplate
@pytest.mark.parametrize('max_steps', [1, 2, 3])
def test_on_before_zero_grad_called(max_steps):
class CurrentTestModel(EvalModelTemplate):
on_before_zero_grad_called = 0
... | 26.966667 | 58 | 0.742892 |
252deee0ba37333758cf792313f7e20e8c4d8bfa | 5,859 | py | Python | bin2c.py | Kepler-Br/bin2c | b1c8903cf482309b1868c322547d4338730c4f50 | [
"MIT"
] | null | null | null | bin2c.py | Kepler-Br/bin2c | b1c8903cf482309b1868c322547d4338730c4f50 | [
"MIT"
] | null | null | null | bin2c.py | Kepler-Br/bin2c | b1c8903cf482309b1868c322547d4338730c4f50 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import binascii
import sys
import argparse
def parse_args():
parser = argparse.ArgumentParser(description='Convert binary file to C-style array initializer.')
parser.add_argument('-i', '--input-file', help='the file to be converted. If not specified, stdin is used.')
parser.add_argu... | 43.4 | 116 | 0.638846 |
9ecb42fa2b5fa20cc1c3a7c3e3672ab38a8091c4 | 4,660 | py | Python | nginx_router/backend/synth_project/settings.py | BennettDixon/sleep_tracker_full_stack | 83b46635762db857f0c291c62c4415a1a550ec3d | [
"MIT"
] | null | null | null | nginx_router/backend/synth_project/settings.py | BennettDixon/sleep_tracker_full_stack | 83b46635762db857f0c291c62c4415a1a550ec3d | [
"MIT"
] | null | null | null | nginx_router/backend/synth_project/settings.py | BennettDixon/sleep_tracker_full_stack | 83b46635762db857f0c291c62c4415a1a550ec3d | [
"MIT"
] | null | null | null | """
Django settings for synth_proj project.
Generated by 'django-admin startproject' using Django 2.2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os... | 25.745856 | 91 | 0.68176 |
4ee0c3a2b35e966385d9b5d4eb7c8d304d092f69 | 7,207 | py | Python | src/game_stats.py | soyuka/botty | cc1670ea1db72c5e0ac91685897bf63c89b18896 | [
"MIT"
] | null | null | null | src/game_stats.py | soyuka/botty | cc1670ea1db72c5e0ac91685897bf63c89b18896 | [
"MIT"
] | null | null | null | src/game_stats.py | soyuka/botty | cc1670ea1db72c5e0ac91685897bf63c89b18896 | [
"MIT"
] | null | null | null | import numpy as np
import time
import threading
import inspect
from beautifultable import BeautifulTable
from logger import Logger
from config import Config
from messages import Messenger
from utils.misc import hms
from version import __version__
class GameStats:
def __init__(self):
self._messenger = Mes... | 38.540107 | 142 | 0.621202 |
be46f177f30580a08efedbb0e3b194ae52852d53 | 5,035 | py | Python | docs/2notebook/1_Introduction_and_Transformations.py | xinzhel/TextAttack | 635a76429743d7bd050aa26cc306e01748e1e4c7 | [
"MIT"
] | null | null | null | docs/2notebook/1_Introduction_and_Transformations.py | xinzhel/TextAttack | 635a76429743d7bd050aa26cc306e01748e1e4c7 | [
"MIT"
] | null | null | null | docs/2notebook/1_Introduction_and_Transformations.py | xinzhel/TextAttack | 635a76429743d7bd050aa26cc306e01748e1e4c7 | [
"MIT"
] | null | null | null |
from textattack.transformations import WordSwap
class BananaWordSwap(WordSwap):
""" Transforms an input by replacing any word with 'banana'.
"""
# We don't need a constructor, since our class doesn't require any parameters.
def _get_replacement_words(self, word):
""" Returns 'banana', no... | 36.751825 | 414 | 0.758491 |
c02a9e8b5fef7007bb2f6d70b53a274c59ebed70 | 2,220 | py | Python | var/spack/repos/builtin/packages/benchmark/package.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 9 | 2018-04-18T07:51:40.000Z | 2021-09-10T03:56:57.000Z | var/spack/repos/builtin/packages/benchmark/package.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 907 | 2018-04-18T11:17:57.000Z | 2022-03-31T13:20:25.000Z | var/spack/repos/builtin/packages/benchmark/package.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 29 | 2018-11-05T16:14:23.000Z | 2022-02-03T16:07:09.000Z | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Benchmark(CMakePackage):
"""A microbenchmark support library"""
homepage = "https://g... | 41.886792 | 95 | 0.686036 |
b5b13d7aa9c6b76f7b28ed8dddea689bf698509f | 2,113 | py | Python | compile_templates.py | jschmer/jMatic | de13a61a3d9c012c02ad98414f4fecd3a524e228 | [
"MIT"
] | null | null | null | compile_templates.py | jschmer/jMatic | de13a61a3d9c012c02ad98414f4fecd3a524e228 | [
"MIT"
] | null | null | null | compile_templates.py | jschmer/jMatic | de13a61a3d9c012c02ad98414f4fecd3a524e228 | [
"MIT"
] | null | null | null | import os, sys, re
def regex_walk(regex, top='.'):
matches = []
matcher = re.compile(regex);
#print(matcher.pattern)
for dirpath, dirnames, filenames in os.walk(top):
full_relative_filepaths = [os.path.join(dirpath, name) for name in filenames]
for filepath in full_relative_filepaths:
if matcher.... | 34.639344 | 104 | 0.702319 |
11a2c25625d7526294d5d95f813d269b26287029 | 12,589 | py | Python | test/functional/ncc_dgp_block_size_sync.py | nccproject/ncc | 068ccc82a73d28136546095261ad8ccef7e541a3 | [
"MIT"
] | null | null | null | test/functional/ncc_dgp_block_size_sync.py | nccproject/ncc | 068ccc82a73d28136546095261ad8ccef7e541a3 | [
"MIT"
] | null | null | null | test/functional/ncc_dgp_block_size_sync.py | nccproject/ncc | 068ccc82a73d28136546095261ad8ccef7e541a3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
from test_framework.script import *
from test_framework.mininode import *
from test_framework.ncc import *
from test_framework.address import *
from test_framework.blocktools import *
import io
"""
... | 83.926667 | 1,358 | 0.83001 |
2e5ee1f346a0c59765a91b796dadbe3c51d68fcf | 1,180 | py | Python | detection_3d/tools/statics.py | Dtananaev/lidar_dynamic_objects_detection | 3b8f3d5fcce0fb914bb83e5d43a3ca652739139e | [
"MIT"
] | 21 | 2020-07-12T04:08:39.000Z | 2022-03-04T09:06:29.000Z | detection_3d/tools/statics.py | Dtananaev/lidar_dynamic_objects_detection | 3b8f3d5fcce0fb914bb83e5d43a3ca652739139e | [
"MIT"
] | 2 | 2020-12-19T01:32:21.000Z | 2021-06-30T14:40:01.000Z | detection_3d/tools/statics.py | Dtananaev/lidar_dynamic_objects_detection | 3b8f3d5fcce0fb914bb83e5d43a3ca652739139e | [
"MIT"
] | 6 | 2020-08-24T08:14:16.000Z | 2022-03-04T09:06:22.000Z | #!/usr/bin/env python
__copyright__ = """
Copyright (c) 2020 Tananaev Denis
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, cop... | 49.166667 | 89 | 0.795763 |
a9c76b02b8207847c2ff2eb20c08bbe8c27d3840 | 2,055 | py | Python | dotaservice/dotautil.py | Andrea-MariaDB-2/LastOrder-Dota2 | d2fb53a7166218eda1e402efd422586f3adaadff | [
"MIT"
] | 332 | 2021-08-02T07:37:41.000Z | 2022-03-26T17:44:53.000Z | dotaservice/dotautil.py | Andrea-MariaDB-2/LastOrder-Dota2 | d2fb53a7166218eda1e402efd422586f3adaadff | [
"MIT"
] | 13 | 2021-08-04T12:04:24.000Z | 2021-09-26T06:57:46.000Z | dotaservice/dotautil.py | Andrea-MariaDB-2/LastOrder-Dota2 | d2fb53a7166218eda1e402efd422586f3adaadff | [
"MIT"
] | 34 | 2021-08-02T09:08:39.000Z | 2022-03-27T18:32:31.000Z | import numpy as np
import math
from dotaservice.protos.dota_gcmessages_common_bot_script_pb2 import CMsgBotWorldState
# 护甲减伤
def armor_filter(armor):
return 1 - ((0.06 * armor) / (1.0 + 0.06 * abs(armor)))
# 普通攻击
def attack_damage(attack, armor):
return attack * armor_filter(armor)
# 普通攻击致死次数
def attack_t... | 24.176471 | 96 | 0.645255 |
3c35f9eeec4e5acd78d2ba6e43c7178b337fc4a6 | 1,147 | py | Python | UI/Wrappers/MapGenerator.py | mjbogusz/TSPGen | 4916cf6276fda41b73ebdf24a7969167c63d0650 | [
"MIT"
] | null | null | null | UI/Wrappers/MapGenerator.py | mjbogusz/TSPGen | 4916cf6276fda41b73ebdf24a7969167c63d0650 | [
"MIT"
] | null | null | null | UI/Wrappers/MapGenerator.py | mjbogusz/TSPGen | 4916cf6276fda41b73ebdf24a7969167c63d0650 | [
"MIT"
] | null | null | null | from PyQt5.QtCore import QThread, pyqtSignal
from Map import Map
class MapGenerator(QThread):
mapGenerated = pyqtSignal(Map)
mapGenerationFailed = pyqtSignal(Exception)
def __init__(self, parent = None):
QThread.__init__(self, parent)
self.fileMode = False
self.fileName = ""
... | 30.184211 | 104 | 0.605929 |
be1f2fde9e62f446c3c085cdcdd00491836ea573 | 1,709 | py | Python | config/wsgi.py | tuvapp/tuvappcom | 5ca2be19f4b0c86a1d4a9553711a4da9d3f32841 | [
"MIT"
] | null | null | null | config/wsgi.py | tuvapp/tuvappcom | 5ca2be19f4b0c86a1d4a9553711a4da9d3f32841 | [
"MIT"
] | null | null | null | config/wsgi.py | tuvapp/tuvappcom | 5ca2be19f4b0c86a1d4a9553711a4da9d3f32841 | [
"MIT"
] | null | null | null | """
WSGI config for tuvappcom 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`... | 46.189189 | 79 | 0.801638 |
c8a43b1b1e905492f6d317b6d34c48d4921f4f38 | 1,055 | py | Python | clic2022/example_video_submission/decode.py | fab-jul/clic-devkit | 4e0ab072b3fe5907c521b10cf3879c585d654c19 | [
"MIT"
] | null | null | null | clic2022/example_video_submission/decode.py | fab-jul/clic-devkit | 4e0ab072b3fe5907c521b10cf3879c585d654c19 | [
"MIT"
] | null | null | null | clic2022/example_video_submission/decode.py | fab-jul/clic-devkit | 4e0ab072b3fe5907c521b10cf3879c585d654c19 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from typing import Sequence
import decode_helper
import os
import glob
from zipfile import ZipFile
FILES_ZIP = 'outputs.zip'
def unpack_encoded() -> Sequence[str]:
assert os.path.isfile(FILES_ZIP), 'Expected {}. {}'.format(
FILES_ZIP, os.listdir("."))
print('Unzipping', FI... | 23.444444 | 67 | 0.62654 |
dceb00c0ca848973c0f1d2c671219e0b15ca7aa8 | 1,019 | py | Python | autumn/projects/tuberculosis/calibration_utils.py | jtrauer/AuTuMN | 2e1defd0104bbecfe667b8ea5ecaf4bc6741905c | [
"BSD-2-Clause-FreeBSD"
] | 14 | 2020-03-11T06:15:30.000Z | 2022-03-09T03:38:35.000Z | autumn/projects/tuberculosis/calibration_utils.py | jtrauer/AuTuMN | 2e1defd0104bbecfe667b8ea5ecaf4bc6741905c | [
"BSD-2-Clause-FreeBSD"
] | 96 | 2020-01-29T05:10:29.000Z | 2022-03-31T01:48:46.000Z | autumn/projects/tuberculosis/calibration_utils.py | monash-emu/AuTuMN | fa3b81ef54cf561e0e7364a48f4ff96585dc3310 | [
"BSD-2-Clause-FreeBSD"
] | 10 | 2020-04-24T00:38:00.000Z | 2021-08-19T16:19:03.000Z | from autumn.tools.calibration.priors import UniformPrior
# Not currently used anywhere.
LOGNORMAL_PARAMS = {
"early_activation_rate": {
"unstratified": [-6.78, 0.15],
"age_0": [-5.00, 0.19],
"age_5": [-5.91, 0.21],
"age_15": [-8.05, 0.28],
},
"stabilisation_rate": {
... | 28.305556 | 95 | 0.554465 |
b24749c69e343abb1a56fc5469dcc9786d6a5ce8 | 334 | py | Python | variable_and_data_type/string_demo/strings_are_arrays.py | pysga1996/python-basic-programming | 5fe817986fbef2649b4b03955f07b59d2a2035d8 | [
"MIT"
] | null | null | null | variable_and_data_type/string_demo/strings_are_arrays.py | pysga1996/python-basic-programming | 5fe817986fbef2649b4b03955f07b59d2a2035d8 | [
"MIT"
] | null | null | null | variable_and_data_type/string_demo/strings_are_arrays.py | pysga1996/python-basic-programming | 5fe817986fbef2649b4b03955f07b59d2a2035d8 | [
"MIT"
] | null | null | null | # Like many other popular programming languages, strings in Python are arrays of bytes representing unicode characters.
#
# However, Python does not have a character data type, a single character is simply a string with a length of 1.
#
# Square brackets can be used to access elements of the string.
a = "Hello, World!... | 37.111111 | 119 | 0.763473 |
949235f0cf0696916b7d33d281bb4fb07fed94df | 9,537 | py | Python | chapter10_Computer_Vision/model/faster_rcnn_trainer.py | iroan/Practicing-Federated-Learning | 5db163e1f07be4b47aac7902102e022da779b86e | [
"Apache-2.0"
] | 227 | 2020-12-28T09:20:42.000Z | 2022-03-31T12:28:45.000Z | chapter10_Computer_Vision/model/faster_rcnn_trainer.py | iroan/Practicing-Federated-Learning | 5db163e1f07be4b47aac7902102e022da779b86e | [
"Apache-2.0"
] | 7 | 2021-03-12T09:06:25.000Z | 2022-02-07T10:31:04.000Z | chapter10_Computer_Vision/model/faster_rcnn_trainer.py | iroan/Practicing-Federated-Learning | 5db163e1f07be4b47aac7902102e022da779b86e | [
"Apache-2.0"
] | 101 | 2021-04-26T02:25:54.000Z | 2022-03-25T14:07:42.000Z | from __future__ import absolute_import
import os
import time
from collections import namedtuple
import torch as t
t.manual_seed(42)
from torch import nn
from torch.nn import functional as F
from model.utils.creator_tool import AnchorTargetCreator, ProposalTargetCreator
from torchnet.meter import AverageValueMeter, C... | 36.54023 | 89 | 0.614554 |
de98258f6cb5f63469ac2ca4ca9eba3f7fce1695 | 765 | py | Python | sorting/test_sorting.py | springmaple/sorting | 10c1efd0af9dbe78834977b75aef504e6a0d96a8 | [
"Apache-2.0"
] | null | null | null | sorting/test_sorting.py | springmaple/sorting | 10c1efd0af9dbe78834977b75aef504e6a0d96a8 | [
"Apache-2.0"
] | null | null | null | sorting/test_sorting.py | springmaple/sorting | 10c1efd0af9dbe78834977b75aef504e6a0d96a8 | [
"Apache-2.0"
] | null | null | null | import sorting
from random import randint
class TestClass:
def setup_method(self, _):
self._ls = []
for ln in range(10, 1000, 100):
self._ls.append([randint(0, x) for x in range(ln)])
def teardown_method(self, _):
del self._ls
def test_builtin_sorted(self):
f... | 25.5 | 65 | 0.602614 |
2bb87645a15025c60c630800f9da37f65fc2b288 | 1,116 | py | Python | tests/autokeras/tuners/greedy_test.py | thwang1231/autokeras | 2b8a1c5506896102ed49a3e82db811ada44a1d6c | [
"MIT"
] | 3 | 2020-10-20T05:32:34.000Z | 2020-12-22T08:37:02.000Z | tests/autokeras/tuners/greedy_test.py | thwang1231/autokeras | 2b8a1c5506896102ed49a3e82db811ada44a1d6c | [
"MIT"
] | null | null | null | tests/autokeras/tuners/greedy_test.py | thwang1231/autokeras | 2b8a1c5506896102ed49a3e82db811ada44a1d6c | [
"MIT"
] | 3 | 2020-03-31T07:53:54.000Z | 2022-01-28T11:29:07.000Z | from unittest import mock
import kerastuner
from autokeras.tuners import greedy
from tests import utils
def test_random_oracle_state():
graph = utils.build_graph()
oracle = greedy.GreedyOracle(
hypermodel=graph,
objective='val_loss',
)
oracle.hypermodel = graph
oracle.set_state(o... | 26.571429 | 68 | 0.709677 |
9862551044283fe522fa8045578ac8b5d482023e | 3,297 | py | Python | licenses/views.py | snehal199/cc-licenses | d64c7293eb7be15ff3cd74cc5ff1536eb16794de | [
"MIT"
] | null | null | null | licenses/views.py | snehal199/cc-licenses | d64c7293eb7be15ff3cd74cc5ff1536eb16794de | [
"MIT"
] | null | null | null | licenses/views.py | snehal199/cc-licenses | d64c7293eb7be15ff3cd74cc5ff1536eb16794de | [
"MIT"
] | null | null | null | import re
from django.shortcuts import get_object_or_404, render
from i18n import DEFAULT_LANGUAGE_CODE
from i18n.utils import active_translation, get_language_for_jurisdiction
from licenses.models import LegalCode, License
DEED_TEMPLATE_MAPPING = { # CURRENTLY UNUSED
# license_code : template name
"samplin... | 34.34375 | 88 | 0.687291 |
d2948441c59ca3b045b7f44d72c97db902c0e7ad | 5,807 | py | Python | mirheo/__init__.py | LMNS3d/Mirheo | e710291502eb3d1b4001e3811f7b7d105af82c86 | [
"MIT"
] | null | null | null | mirheo/__init__.py | LMNS3d/Mirheo | e710291502eb3d1b4001e3811f7b7d105af82c86 | [
"MIT"
] | null | null | null | mirheo/__init__.py | LMNS3d/Mirheo | e710291502eb3d1b4001e3811f7b7d105af82c86 | [
"MIT"
] | 1 | 2021-07-14T13:24:05.000Z | 2021-07-14T13:24:05.000Z | #!/usr/bin/env python
import inspect
import functools
import sys
import weakref
import re
from libmirheo import *
from libmirheo import __file__ as _libmirheo_file # For `make make_and_copy`.
__all__ = ["version", "tools", "_libmirheo_file"]
# Global variable for the mirheo coordination class
# Used in decorators ... | 37.224359 | 119 | 0.58705 |
a44a4ba4fad39204df1a3345c47eddc7bc5f04eb | 1,385 | py | Python | mlp/migrations/0009_auto_20190404_0425.py | paleocore/paleocore110 | 754f3248ab22a2996b43bd224bd4ba15462edf7d | [
"MIT"
] | null | null | null | mlp/migrations/0009_auto_20190404_0425.py | paleocore/paleocore110 | 754f3248ab22a2996b43bd224bd4ba15462edf7d | [
"MIT"
] | 7 | 2020-02-05T20:54:24.000Z | 2021-12-13T20:13:20.000Z | mlp/migrations/0009_auto_20190404_0425.py | paleocore/paleocore110 | 754f3248ab22a2996b43bd224bd4ba15462edf7d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.20 on 2019-04-04 04:25
from __future__ import unicode_literals
import ckeditor.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('mlp', '0008_auto_20190404_0407'),
]
operations = [
migratio... | 37.432432 | 159 | 0.651264 |
803bda5cd24065fe0c24894144faba1c1f747f0c | 21,143 | py | Python | tests/test_feature.py | audeering/audinterface | 2acb81e210efb9d3e5b085064dada5665ed27b6f | [
"MIT"
] | null | null | null | tests/test_feature.py | audeering/audinterface | 2acb81e210efb9d3e5b085064dada5665ed27b6f | [
"MIT"
] | 28 | 2021-04-28T10:02:57.000Z | 2022-02-07T14:05:02.000Z | tests/test_feature.py | audeering/audinterface | 2acb81e210efb9d3e5b085064dada5665ed27b6f | [
"MIT"
] | null | null | null | import os
import numpy as np
import pandas as pd
import pytest
import audformat
import audinterface
import audiofile as af
SAMPLING_RATE = 8000
NUM_CHANNELS = 2
NUM_FEATURES = 3
NUM_FRAMES = 5
SIGNAL_1D = np.ones((1, SAMPLING_RATE))
SIGNAL_2D = np.ones((NUM_CHANNELS, SAMPLING_RATE))
SEGMENT = audinterface.Segment(
... | 26.134734 | 74 | 0.471078 |
a120e9928945797ca6044b948b5281d9b1da6c62 | 768 | py | Python | alipay/aop/api/response/KoubeiMarketingDataBizadviserMemberprofileQueryResponse.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/KoubeiMarketingDataBizadviserMemberprofileQueryResponse.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/KoubeiMarketingDataBizadviserMemberprofileQueryResponse.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class KoubeiMarketingDataBizadviserMemberprofileQueryResponse(AlipayResponse):
def __init__(self):
super(KoubeiMarketingDataBizadviserMemberprofileQueryResponse, self... | 29.538462 | 128 | 0.731771 |
bc26e255c1805c2983f54df474992f5ad7765823 | 8,859 | py | Python | tools/c7n_azure/tests/test_app_service_plan.py | gileshinchcliff/cloud-custodian | 54e548af02f3afe0919dcce21f0796212f5d1a4f | [
"Apache-2.0"
] | null | null | null | tools/c7n_azure/tests/test_app_service_plan.py | gileshinchcliff/cloud-custodian | 54e548af02f3afe0919dcce21f0796212f5d1a4f | [
"Apache-2.0"
] | 79 | 2019-03-20T12:27:06.000Z | 2019-08-14T14:07:04.000Z | tools/c7n_azure/tests/test_app_service_plan.py | gileshinchcliff/cloud-custodian | 54e548af02f3afe0919dcce21f0796212f5d1a4f | [
"Apache-2.0"
] | 2 | 2019-04-22T15:20:23.000Z | 2019-08-27T12:37:51.000Z | # Copyright 2015-2018 Capital One Services, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 37.538136 | 86 | 0.533243 |
8c6f1b75e357096cec3af31b761bd4482fcf25b4 | 431 | py | Python | bioresources/tables.py | ezequieljsosa/sndg-web | 7763c8fbc83dc92abb9c53326e2fe227bcabf607 | [
"MIT"
] | null | null | null | bioresources/tables.py | ezequieljsosa/sndg-web | 7763c8fbc83dc92abb9c53326e2fe227bcabf607 | [
"MIT"
] | null | null | null | bioresources/tables.py | ezequieljsosa/sndg-web | 7763c8fbc83dc92abb9c53326e2fe227bcabf607 | [
"MIT"
] | null | null | null | import django_tables2 as tables
from .models import Publication
class PublicationTable(tables.Table):
# counter = tables.TemplateColumn("{{ row_counter }}")
class Meta:
model = Publication
template_name = 'django_tables2/bootstrap.html'
exclude = ["type", "pubmed_id", "electronic_id"... | 30.785714 | 87 | 0.663573 |
b3c8c2f8ea3fd36a063ed33c7eaa0b32d20f804d | 10,589 | py | Python | tests/test_api.py | tirkarthi/importlib_metadata | 81bccbce14dcddffa128b155260e9bd4e3dcc4c7 | [
"Apache-2.0"
] | null | null | null | tests/test_api.py | tirkarthi/importlib_metadata | 81bccbce14dcddffa128b155260e9bd4e3dcc4c7 | [
"Apache-2.0"
] | null | null | null | tests/test_api.py | tirkarthi/importlib_metadata | 81bccbce14dcddffa128b155260e9bd4e3dcc4c7 | [
"Apache-2.0"
] | 1 | 2021-01-09T20:02:06.000Z | 2021-01-09T20:02:06.000Z | import re
import textwrap
import unittest
import warnings
import importlib
from . import fixtures
from importlib_metadata import (
Distribution,
PackageNotFoundError,
distribution,
entry_points,
files,
metadata,
requires,
version,
)
class APITests(
fixtures.EggInfoPkg,
fixture... | 34.37987 | 83 | 0.607517 |
99a003bd9b9bbbaee9e690765f38c43c1cdd39f1 | 1,643 | py | Python | ietf/nomcom/management/commands/feedback_email.py | ekr/ietfdb | 8d936836b0b9ff31cda415b0a423e3f5b33ab695 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2021-11-20T03:40:56.000Z | 2021-11-20T03:40:59.000Z | ietf/nomcom/management/commands/feedback_email.py | ekr/ietfdb | 8d936836b0b9ff31cda415b0a423e3f5b33ab695 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | ietf/nomcom/management/commands/feedback_email.py | ekr/ietfdb | 8d936836b0b9ff31cda415b0a423e3f5b33ab695 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | import sys
from django.core.management.base import BaseCommand, CommandError
from ietf.utils.log import log
from ietf.nomcom.models import NomCom
from ietf.nomcom.utils import create_feedback_email
from ietf.nomcom.fields import EncryptedException
import debug # pyflakes:ignore
class Comm... | 35.717391 | 105 | 0.62325 |
9de3ce7b99d1a287bcccde2084c4033fa5a9e7c0 | 505 | py | Python | setup.py | sarusso/Timeseria | fdf9990ab68e20f75a64f090a2c43979266dcba9 | [
"Apache-2.0"
] | 8 | 2021-01-02T17:43:13.000Z | 2022-02-22T09:07:22.000Z | setup.py | sarusso/Timeseria | fdf9990ab68e20f75a64f090a2c43979266dcba9 | [
"Apache-2.0"
] | 20 | 2020-07-15T11:29:41.000Z | 2022-03-29T22:51:52.000Z | setup.py | sarusso/Timeseria | fdf9990ab68e20f75a64f090a2c43979266dcba9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(name='timeseria',
version='0.1.0',
description='A time series processing library',
author='Stefano Alberto Russo',
author_email='stefano.russo@gmail.com',
packages=['timeseria','timeseria.tests', 'timeseria.models'],... | 29.705882 | 67 | 0.611881 |
c83e2944c8c7061c8e3c967e3092691093b0ee9d | 1,731 | py | Python | fHDHR/api/hub/pages/index_html.py | crackers8199/fHDHR_Locast | cad9cc0bf64f70bbcd2e702a938794d4eacad6cf | [
"WTFPL"
] | null | null | null | fHDHR/api/hub/pages/index_html.py | crackers8199/fHDHR_Locast | cad9cc0bf64f70bbcd2e702a938794d4eacad6cf | [
"WTFPL"
] | null | null | null | fHDHR/api/hub/pages/index_html.py | crackers8199/fHDHR_Locast | cad9cc0bf64f70bbcd2e702a938794d4eacad6cf | [
"WTFPL"
] | null | null | null | from io import StringIO
class Index_HTML():
def __init__(self, settings, device, page_elements):
self.config = settings
self.device = device
self.page_elements = page_elements
def get_index_html(self, base_url, force_update=False):
fakefile = StringIO()
page_elements... | 33.941176 | 89 | 0.548816 |
0b781cd041d9259d086935e7dca0c59a3dafc18d | 2,218 | py | Python | tests/run_ligpargen_regression_tests.py | mc-robinson/LigParGen | 15eaf88e0aff5136904691cd14f6b04b4820b9f7 | [
"MIT"
] | 4 | 2020-01-07T11:57:35.000Z | 2021-11-04T18:26:44.000Z | tests/run_ligpargen_regression_tests.py | mc-robinson/LigParGen | 15eaf88e0aff5136904691cd14f6b04b4820b9f7 | [
"MIT"
] | null | null | null | tests/run_ligpargen_regression_tests.py | mc-robinson/LigParGen | 15eaf88e0aff5136904691cd14f6b04b4820b9f7 | [
"MIT"
] | 4 | 2017-12-21T05:02:08.000Z | 2020-07-03T05:53:23.000Z | # !/usr/bin/env python
# File name: run_ligpargen_regression_tests.py
# Author: Matt Robinson, Jorgensen Lab @ Yale
# Email: matthew.robinson@yale.edu
# Date created: 07/18/2017
# Python Version: 3.6
# to get the module imports to work, need to add .. to python path
import sys, os
testdir = os.path.dirname(__file__)
s... | 29.573333 | 91 | 0.608656 |
a1e99d58438f875f2552b192338c58abd55a630b | 83 | py | Python | 07_Java_Experiment/PyTest/shell/__init__.py | Robert-Stackflow/HUST-Courses | 300752552e7af035b0e5c7663953850c81871242 | [
"MIT"
] | 4 | 2021-11-01T09:27:32.000Z | 2022-03-07T14:24:10.000Z | 07_Java_Experiment/PyTest/shell/__init__.py | Robert-Stackflow/HUST-Courses | 300752552e7af035b0e5c7663953850c81871242 | [
"MIT"
] | null | null | null | 07_Java_Experiment/PyTest/shell/__init__.py | Robert-Stackflow/HUST-Courses | 300752552e7af035b0e5c7663953850c81871242 | [
"MIT"
] | null | null | null | from shell.executor import ShellExecutionResult
from shell.executor import execute
| 27.666667 | 47 | 0.879518 |
ef71665ba08b8d4fd5a4014b85f8462616c2530a | 17,714 | py | Python | test/python/qobj/test_qobj.py | meamy/qiskit-terra | 353918ba2c92b9d1fdda71d9a1d0262be6389c1f | [
"Apache-2.0"
] | 1 | 2019-06-04T12:23:36.000Z | 2019-06-04T12:23:36.000Z | test/python/qobj/test_qobj.py | meamy/qiskit-terra | 353918ba2c92b9d1fdda71d9a1d0262be6389c1f | [
"Apache-2.0"
] | 35 | 2019-03-07T02:09:22.000Z | 2022-03-22T19:55:15.000Z | test/python/qobj/test_qobj.py | meamy/qiskit-terra | 353918ba2c92b9d1fdda71d9a1d0262be6389c1f | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2018.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | 42.07601 | 99 | 0.46308 |
f4e6af7e60683534984dd926d36a717614fb2598 | 570 | py | Python | Aulas2-31/Aula8/aula8.2.conta.matematica.py | matheusschuetz/TrabalhoPython | 953957898de633f8f2776681a45a1a15b68e80b9 | [
"MIT"
] | 1 | 2020-01-21T11:43:12.000Z | 2020-01-21T11:43:12.000Z | Aulas2-31/Aula8/aula8.2.conta.matematica.py | matheusschuetz/TrabalhoPython | 953957898de633f8f2776681a45a1a15b68e80b9 | [
"MIT"
] | null | null | null | Aulas2-31/Aula8/aula8.2.conta.matematica.py | matheusschuetz/TrabalhoPython | 953957898de633f8f2776681a45a1a15b68e80b9 | [
"MIT"
] | null | null | null | #Contas matematicas
#Quando usado duas barras ele ignora a parte fracionada, portanto 2 // 1 = 0
#Quando usado 10 % 3 ele vai pegar apenas o restante da divisão
#A potenciação é feita através de **(sim, são dois asteriscos)
#Python não tem raiz quadrada, então se usa a fórmula com os dois *
numero1 = 10
numero2 = 3
... | 22.8 | 77 | 0.745614 |
500e88ed14dd871e176109ea25b44da3d33c13ea | 36,738 | py | Python | diofant/integrals/prde.py | rajkk1/diofant | 6b361334569e4ec2e8c7d30dc324387a4ad417c2 | [
"BSD-3-Clause"
] | null | null | null | diofant/integrals/prde.py | rajkk1/diofant | 6b361334569e4ec2e8c7d30dc324387a4ad417c2 | [
"BSD-3-Clause"
] | null | null | null | diofant/integrals/prde.py | rajkk1/diofant | 6b361334569e4ec2e8c7d30dc324387a4ad417c2 | [
"BSD-3-Clause"
] | null | null | null | """
Algorithms for solving Parametric Risch Differential Equations.
The methods used for solving Parametric Risch Differential Equations parallel
those for solving Risch Differential Equations. See the outline in the
docstring of rde.py for more information.
The Parametric Risch Differential Equation problem is, giv... | 42.422633 | 110 | 0.569764 |
4129958a9fb9009cac7822443db500fd1e90a5f2 | 5,238 | py | Python | sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/models/__init__.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/models/__init__.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 2 | 2020-03-03T23:11:13.000Z | 2020-03-30T18:50:55.000Z | sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/models/__init__.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 2 | 2020-05-21T22:51:22.000Z | 2020-05-26T20:53:01.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 ... | 39.681818 | 94 | 0.729668 |
56772a80ef3de5d3d8d6c2dd5b49b8b68ad04275 | 1,379 | py | Python | st2client/st2client/utils/strutil.py | saucetray/st2 | 8f507d6c8d9483c8371e386fe2b7998596856fd7 | [
"Apache-2.0"
] | 2 | 2021-08-04T01:04:06.000Z | 2021-08-04T01:04:08.000Z | st2client/st2client/utils/strutil.py | saucetray/st2 | 8f507d6c8d9483c8371e386fe2b7998596856fd7 | [
"Apache-2.0"
] | 1 | 2022-03-31T03:53:22.000Z | 2022-03-31T03:53:22.000Z | st2client/st2client/utils/strutil.py | saucetray/st2 | 8f507d6c8d9483c8371e386fe2b7998596856fd7 | [
"Apache-2.0"
] | 1 | 2019-10-11T14:42:28.000Z | 2019-10-11T14:42:28.000Z | # Copyright 2019 Extreme Networks, 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 i... | 26.519231 | 80 | 0.660624 |
07127c33c61e87e893c577dec08289698c881527 | 2,575 | py | Python | exasol_data_science_utils_python/preprocessing/sql_to_scikit_learn/normalization/standard_scaler_factory.py | exasol/data-science-utils-python | 44f4019b30f4945e14a8ee19c1a4f6bed68692d9 | [
"MIT"
] | null | null | null | exasol_data_science_utils_python/preprocessing/sql_to_scikit_learn/normalization/standard_scaler_factory.py | exasol/data-science-utils-python | 44f4019b30f4945e14a8ee19c1a4f6bed68692d9 | [
"MIT"
] | 27 | 2021-06-04T15:45:21.000Z | 2022-02-14T12:16:34.000Z | exasol_data_science_utils_python/preprocessing/sql_to_scikit_learn/normalization/standard_scaler_factory.py | exasol/data-science-utils-python | 44f4019b30f4945e14a8ee19c1a4f6bed68692d9 | [
"MIT"
] | null | null | null | from exasol_data_science_utils_python.preprocessing.scikit_learn.sklearn_prefitted_min_max_scaler import \
SKLearnPrefittedMinMaxScaler
from exasol_data_science_utils_python.preprocessing.scikit_learn.sklearn_prefitted_standard_scaler import \
SKLearnPrefittedStandardScaler
from exasol_data_science_utils_python... | 61.309524 | 120 | 0.736699 |
d08768711705b27a6af810c68b5f52c8b1fe5bd1 | 42,714 | py | Python | modules/gui.py | buidl1/zundernet | b313d30fc39d851af499dd37dd5867b0834dc416 | [
"MIT"
] | 1 | 2021-08-07T21:38:57.000Z | 2021-08-07T21:38:57.000Z | modules/gui.py | buidl1/zundernet | b313d30fc39d851af499dd37dd5867b0834dc416 | [
"MIT"
] | 11 | 2020-11-07T17:54:35.000Z | 2022-03-05T17:10:41.000Z | modules/gui.py | buidl1/zundernet | b313d30fc39d851af499dd37dd5867b0834dc416 | [
"MIT"
] | 3 | 2020-12-15T09:13:11.000Z | 2022-03-05T12:35:55.000Z | # small widgets
import os,time
from PySide2.QtCore import (
QAbstractTableModel,
QModelIndex,
QPersistentModelIndex,
QSortFilterProxyModel,
Qt,
Slot,
QLocale,
QThread,
QObject,
Signal,
QTimer,
QDateTime,
QEvent
)
from PySide2.QtGui import (
QColor,
QValidator,
QDoubleValidator,
... | 28.705645 | 207 | 0.655523 |
512455782319e2df896a7bb7e34d11c32e08bb28 | 10,573 | py | Python | raiden/tests/integration/test_send_queued_messages.py | christianbrb/raiden | 64f0715af076747b293671157e2cbbd235cab81b | [
"MIT"
] | null | null | null | raiden/tests/integration/test_send_queued_messages.py | christianbrb/raiden | 64f0715af076747b293671157e2cbbd235cab81b | [
"MIT"
] | null | null | null | raiden/tests/integration/test_send_queued_messages.py | christianbrb/raiden | 64f0715af076747b293671157e2cbbd235cab81b | [
"MIT"
] | null | null | null | import gevent
import pytest
from raiden import waiting
from raiden.app import App
from raiden.constants import RoutingMode
from raiden.message_handler import MessageHandler
from raiden.network.transport import MatrixTransport
from raiden.raiden_event_handler import RaidenEventHandler
from raiden.tests.utils.detect_fai... | 41.140078 | 96 | 0.727513 |
75892d59f1e69d6db79bb48d1fb1c4cff92990ed | 7,803 | py | Python | posthog/api/cohort.py | leirons/posthog | 3d8bcdfae03a1ead9aad44cd4d176ca2180c1ea4 | [
"MIT"
] | 7,409 | 2020-02-09T23:18:10.000Z | 2022-03-31T22:36:25.000Z | posthog/api/cohort.py | leirons/posthog | 3d8bcdfae03a1ead9aad44cd4d176ca2180c1ea4 | [
"MIT"
] | 5,709 | 2020-02-09T23:26:13.000Z | 2022-03-31T20:20:01.000Z | posthog/api/cohort.py | leirons/posthog | 3d8bcdfae03a1ead9aad44cd4d176ca2180c1ea4 | [
"MIT"
] | 647 | 2020-02-13T17:50:55.000Z | 2022-03-31T11:24:19.000Z | import csv
from typing import Any, Dict, List, Optional, cast
from django.db.models import Count, QuerySet
from rest_framework import serializers, viewsets
from rest_framework.permissions import IsAuthenticated
from rest_framework.request import Request
from sentry_sdk.api import capture_exception
from posthog.api.ac... | 42.407609 | 116 | 0.674869 |
d931572630fb28f9f55c08d4b1ae6686e231e5ec | 1,727 | py | Python | pipelines/pyright.nox.py | Victorsitou/hikari | 8a1e017fd10421011f6d03ca4d94d6ec964e7290 | [
"MIT"
] | 520 | 2020-10-12T22:53:55.000Z | 2022-03-30T17:59:53.000Z | pipelines/pyright.nox.py | Victorsitou/hikari | 8a1e017fd10421011f6d03ca4d94d6ec964e7290 | [
"MIT"
] | 319 | 2020-10-11T19:04:03.000Z | 2022-03-31T16:55:28.000Z | pipelines/pyright.nox.py | Victorsitou/hikari | 8a1e017fd10421011f6d03ca4d94d6ec964e7290 | [
"MIT"
] | 85 | 2020-10-17T20:25:47.000Z | 2022-03-31T15:19:40.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2020 Nekokatt
# Copyright (c) 2021 davfsa
#
# 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 right... | 46.675676 | 89 | 0.744065 |
78b11baeaa0b02807f1d363549198da07a41c2e7 | 13,378 | py | Python | tests/st/graph_kernel/model/test_split.py | chncwang/mindspore | 6dac92aedf0aa1541d181e6aedab29aaadc2dafb | [
"Apache-2.0"
] | null | null | null | tests/st/graph_kernel/model/test_split.py | chncwang/mindspore | 6dac92aedf0aa1541d181e6aedab29aaadc2dafb | [
"Apache-2.0"
] | null | null | null | tests/st/graph_kernel/model/test_split.py | chncwang/mindspore | 6dac92aedf0aa1541d181e6aedab29aaadc2dafb | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 30.613272 | 87 | 0.506877 |
44083d660c6e1abd9e35e60d92de157f0debfef2 | 11,183 | py | Python | tools/print_signatures.py | L-Net-1992/Paddle | 4d0ca02ba56760b456f3d4b42a538555b9b6c307 | [
"Apache-2.0"
] | 11 | 2016-08-29T07:43:26.000Z | 2016-08-29T07:51:24.000Z | tools/print_signatures.py | L-Net-1992/Paddle | 4d0ca02ba56760b456f3d4b42a538555b9b6c307 | [
"Apache-2.0"
] | null | null | null | tools/print_signatures.py | L-Net-1992/Paddle | 4d0ca02ba56760b456f3d4b42a538555b9b6c307 | [
"Apache-2.0"
] | 1 | 2021-12-09T08:59:17.000Z | 2021-12-09T08:59:17.000Z | # Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 33.38209 | 126 | 0.589556 |
b13985e23ad5c2785799ec9586ee579a152bb978 | 10,347 | py | Python | dabl/tests/test_search.py | adekunleba/dabl | c4bfc23ba2be11763a2600c7d2a7a0059cb2251c | [
"BSD-3-Clause"
] | 2 | 2020-08-02T06:08:54.000Z | 2021-03-02T19:59:28.000Z | dabl/tests/test_search.py | adekunleba/dabl | c4bfc23ba2be11763a2600c7d2a7a0059cb2251c | [
"BSD-3-Clause"
] | null | null | null | dabl/tests/test_search.py | adekunleba/dabl | c4bfc23ba2be11763a2600c7d2a7a0059cb2251c | [
"BSD-3-Clause"
] | 1 | 2019-10-10T18:01:03.000Z | 2019-10-10T18:01:03.000Z | import pytest
from scipy.stats import norm
from sklearn.datasets import make_classification
from sklearn.dummy import DummyClassifier
from dabl.search import GridSuccessiveHalving, RandomSuccessiveHalving
class FastClassifier(DummyClassifier):
"""Dummy classifier that accepts parameters a, b, ... z.
These ... | 37.353791 | 79 | 0.618247 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.