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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3b0389c30395704a42567d70448221259c24af11 | 7,181 | py | Python | tests/unittests/algo/pbt/test_explore.py | satyaog/orion | 671dbb3fb51bf8f49f0146101b749f70166896a6 | [
"BSD-3-Clause"
] | null | null | null | tests/unittests/algo/pbt/test_explore.py | satyaog/orion | 671dbb3fb51bf8f49f0146101b749f70166896a6 | [
"BSD-3-Clause"
] | 1 | 2020-02-23T18:02:34.000Z | 2020-02-24T03:37:13.000Z | tests/unittests/algo/pbt/test_explore.py | satyaog/orion | 671dbb3fb51bf8f49f0146101b749f70166896a6 | [
"BSD-3-Clause"
] | null | null | null | import numpy
import pytest
from base import ExploreStub, RNGStub, TrialStub, hspace, space
from orion.algo.pbt.explore import PerturbExplore, PipelineExplore, ResampleExplore
from orion.algo.space import Categorical, Dimension
from orion.core.utils.flatten import flatten
class TestPipelineExplore:
def test_no_ex... | 31.774336 | 88 | 0.610778 |
fabbd510828a95e0f7ec67bff8e4ccb2f730ecd7 | 1,790 | py | Python | dmx.py | zed-ee/human_vision | f49e6f608e8f90b848785341412531b54b6e5d39 | [
"MIT"
] | null | null | null | dmx.py | zed-ee/human_vision | f49e6f608e8f90b848785341412531b54b6e5d39 | [
"MIT"
] | null | null | null | dmx.py | zed-ee/human_vision | f49e6f608e8f90b848785341412531b54b6e5d39 | [
"MIT"
] | null | null | null | try:
from pyudmx import pyudmx
except Exception as e:
pyudmx = None
print(e)
CHANNEL_ROTATION = 1
CHANNEL_TILT = 2
CHANNEL_MASTER = 5
COLOR_WHITE = 0
COLOR_RED = 11
COLOR_GREEN = 44
COLOR_BLUE = 55
COLOR_WHEEL = [COLOR_RED, COLOR_GREEN, COLOR_BLUE]
class uDMX(object):
channels = [0... | 24.861111 | 61 | 0.59162 |
256b45cc797a8bc0c29d7f73339e1276ef4978c2 | 17,142 | py | Python | ostap/math/param.py | Pro100Tema/ostap | 1765304fce43714e1f51dfe03be0daa5aa5d490f | [
"BSD-3-Clause"
] | null | null | null | ostap/math/param.py | Pro100Tema/ostap | 1765304fce43714e1f51dfe03be0daa5aa5d490f | [
"BSD-3-Clause"
] | null | null | null | ostap/math/param.py | Pro100Tema/ostap | 1765304fce43714e1f51dfe03be0daa5aa5d490f | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# =============================================================================
## @file ostap/math/param.py
# Module with utilities for parameterization of functions/historgams
#
## (1) using histogram data only:
#
# - as Legendre sum
# - as Chebyshe... | 33.415205 | 94 | 0.493758 |
05a697faa05a9285fa0cbaf0b6eebee4915bb8a2 | 221 | py | Python | data_salmon/input_file_loader/__init__.py | htryppcook/data_salmon | 8fecbba5db4433fa8472cd156bebde854b5eb692 | [
"MIT"
] | null | null | null | data_salmon/input_file_loader/__init__.py | htryppcook/data_salmon | 8fecbba5db4433fa8472cd156bebde854b5eb692 | [
"MIT"
] | null | null | null | data_salmon/input_file_loader/__init__.py | htryppcook/data_salmon | 8fecbba5db4433fa8472cd156bebde854b5eb692 | [
"MIT"
] | null | null | null | from .input_file_loader import InputFileLoader
from .json_input_file_loader import JsonInputFileLoader
from .dsl_input_file_loader import DSLInputFileLoader
__all__ = [
'InputFileLoader',
'JsonInputFileLoader'
]
| 24.555556 | 55 | 0.828054 |
284f50438ba399bddfce027a91beb2eb6991dd50 | 5,200 | py | Python | day-13/part-2/jrmyy.py | TPXP/adventofcode-2019 | ee653d6bfb510d14f2c2b3efc730d328c16b3f71 | [
"MIT"
] | 8 | 2019-12-01T08:56:46.000Z | 2019-12-05T21:21:12.000Z | day-13/part-2/jrmyy.py | TPXP/adventofcode-2019 | ee653d6bfb510d14f2c2b3efc730d328c16b3f71 | [
"MIT"
] | 10 | 2019-11-25T09:56:20.000Z | 2021-05-10T19:57:48.000Z | day-13/part-2/jrmyy.py | TPXP/adventofcode-2019 | ee653d6bfb510d14f2c2b3efc730d328c16b3f71 | [
"MIT"
] | 5 | 2019-12-01T08:19:57.000Z | 2020-11-23T09:50:19.000Z | from typing import List, Tuple
from tool.runners.python import SubmissionPy
class JrmyySubmission(SubmissionPy):
def run(self, s: str) -> int:
# :param s: input in string format
# :return: solution flag
ints = [int(x) for x in s.split(",")]
ints[0] = 2
c, relative_base, j... | 36.619718 | 113 | 0.510769 |
bf27939699b4b1272a23c24dd79f408eea56e224 | 1,964 | py | Python | apps/shop/serializers.py | kharann/onlineweb4 | 1130128c6233b623780779a25934ea73ef62c264 | [
"MIT"
] | null | null | null | apps/shop/serializers.py | kharann/onlineweb4 | 1130128c6233b623780779a25934ea73ef62c264 | [
"MIT"
] | null | null | null | apps/shop/serializers.py | kharann/onlineweb4 | 1130128c6233b623780779a25934ea73ef62c264 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from rest_framework import serializers
from apps.authentication.models import OnlineUser as User
from apps.gallery.serializers import ResponsiveImageSerializer
from apps.inventory.models import Item, ItemCategory
from apps.payment.models import PaymentTransaction
from apps.shop.models import O... | 24.860759 | 69 | 0.626273 |
da0039569b48923f62cc3d497c2bb029e2367d4f | 2,048 | py | Python | test/test_layer_tap_action.py | ivanjermakov/kbmap | e6c165a6e2d8b458a972db5e628ecfaceaf0b766 | [
"MIT"
] | 9 | 2019-11-28T12:45:26.000Z | 2021-11-23T09:41:13.000Z | test/test_layer_tap_action.py | ivanjermakov/kbmap | e6c165a6e2d8b458a972db5e628ecfaceaf0b766 | [
"MIT"
] | 41 | 2019-11-18T05:14:02.000Z | 2020-09-16T23:24:11.000Z | test/test_layer_tap_action.py | ivanjermakov/kbmap | e6c165a6e2d8b458a972db5e628ecfaceaf0b766 | [
"MIT"
] | null | null | null | from kbmap.key import *
from test.test_action import ActionTest
from test.util import *
class LayerTapActionTest(ActionTest):
def test_layer_tap(self):
self.assert_mapping(
create_config(
[KC_A, KC_B, KC_C],
[
[LT(1, KC_A), KC_B, KC_C],
... | 28.444444 | 71 | 0.40918 |
585606a8025a03157b4b52f906f8e543b0269f40 | 5,162 | py | Python | freedom/llh_service/eval_llh.py | gmwendel/freeDOM | cf65d7b556f64b4fe85d016e92ae429b78043dc3 | [
"Apache-2.0"
] | null | null | null | freedom/llh_service/eval_llh.py | gmwendel/freeDOM | cf65d7b556f64b4fe85d016e92ae429b78043dc3 | [
"Apache-2.0"
] | null | null | null | freedom/llh_service/eval_llh.py | gmwendel/freeDOM | cf65d7b556f64b4fe85d016e92ae429b78043dc3 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import, division, print_function
__author__ = "Aaron Fienberg"
import tensorflow as tf
@tf.function
def freedom_nllh(hit_data, evt_data, theta, stop_inds, models, charge_ind=4):
"""
hitnet/chargenet llh calculation
Parameters
----------
hit_data: tf.constant
... | 32.465409 | 102 | 0.679775 |
60165c67558b0b396e22f5ec63fd90b7b7608162 | 1,544 | py | Python | docs/examples/metrics/example.py | bgranetzke/opentelemetry-python | f81381cf8aca64a707d934f20c6c27d40b949dce | [
"Apache-2.0"
] | null | null | null | docs/examples/metrics/example.py | bgranetzke/opentelemetry-python | f81381cf8aca64a707d934f20c6c27d40b949dce | [
"Apache-2.0"
] | null | null | null | docs/examples/metrics/example.py | bgranetzke/opentelemetry-python | f81381cf8aca64a707d934f20c6c27d40b949dce | [
"Apache-2.0"
] | null | null | null | from typing import Iterable
from opentelemetry._metrics import get_meter_provider, set_meter_provider
from opentelemetry._metrics.measurement import Measurement
from opentelemetry.exporter.otlp.proto.grpc._metric_exporter import (
OTLPMetricExporter,
)
from opentelemetry.sdk._metrics import MeterProvider
from open... | 27.571429 | 75 | 0.813472 |
14673f7f3f3581dfa9973e3acd266e3cfea86dc5 | 378 | py | Python | Neural Networks/Lesson 1 - Intro to neural networks/Coding the Softmax function/solution_instructor.py | dilayercelik/AIPND-learning | 93a11b42f92eef4ca31147ffd79b3c2f2fe1815c | [
"MIT"
] | null | null | null | Neural Networks/Lesson 1 - Intro to neural networks/Coding the Softmax function/solution_instructor.py | dilayercelik/AIPND-learning | 93a11b42f92eef4ca31147ffd79b3c2f2fe1815c | [
"MIT"
] | null | null | null | Neural Networks/Lesson 1 - Intro to neural networks/Coding the Softmax function/solution_instructor.py | dilayercelik/AIPND-learning | 93a11b42f92eef4ca31147ffd79b3c2f2fe1815c | [
"MIT"
] | null | null | null | # solution of the instructor at Udacity
import numpy as np
def softmax(L):
expL = np.exp(L)
sumExpL = sum(expL)
result = []
for i in expL:
result.append(i*1.0/sumExpL)
return result
# Note: The function np.divide can also be used here, as follows:
# def softmax(L):
# expL ... | 22.235294 | 69 | 0.600529 |
7ecbad43d734be3b10b388d0fbdf2255203433cf | 658 | py | Python | tests/toys/test_encode_string.py | dtjv/py-csc | 8cd30100dea797cffa8f944cef42507513e81e3d | [
"MIT"
] | null | null | null | tests/toys/test_encode_string.py | dtjv/py-csc | 8cd30100dea797cffa8f944cef42507513e81e3d | [
"MIT"
] | null | null | null | tests/toys/test_encode_string.py | dtjv/py-csc | 8cd30100dea797cffa8f944cef42507513e81e3d | [
"MIT"
] | null | null | null | import unittest
from src.toys.encode_string import encode_string
class TestEncodeString(unittest.TestCase):
def test_should_return_empty_string(self):
self.assertEqual(encode_string(), '')
self.assertEqual(encode_string(''), '')
self.assertEqual(encode_string('aeiou'), '')
def test_sh... | 32.9 | 62 | 0.706687 |
454e7afd331cf72d826b1e81de673f21df13e3a5 | 1,029 | py | Python | spoklient/sharepoint/web_collection.py | franciscomcdias/SpoKlient | b2f6954cc3e35c84b8686588d4fd4636f13153d4 | [
"MIT"
] | null | null | null | spoklient/sharepoint/web_collection.py | franciscomcdias/SpoKlient | b2f6954cc3e35c84b8686588d4fd4636f13153d4 | [
"MIT"
] | null | null | null | spoklient/sharepoint/web_collection.py | franciscomcdias/SpoKlient | b2f6954cc3e35c84b8686588d4fd4636f13153d4 | [
"MIT"
] | null | null | null | from spoklient.runtime.action_type import ActionType
from spoklient.runtime.client_object_collection import ClientObjectCollection
from spoklient.runtime.client_query import ClientQuery
from spoklient.sharepoint.web import Web
class WebCollection(ClientObjectCollection):
"""Web collection"""
def __init__(self... | 38.111111 | 102 | 0.731778 |
ea2e701b95705b296ac95628bc6e9e921a8287ea | 3,539 | py | Python | tensorflow_datasets/testing/fake_data_utils.py | jvishnuvardhan/datasets | b8e38187058f1221e67c6291b3f29385ebb35fa2 | [
"Apache-2.0"
] | 3,380 | 2018-09-11T05:03:31.000Z | 2022-03-31T20:04:57.000Z | tensorflow_datasets/testing/fake_data_utils.py | jvishnuvardhan/datasets | b8e38187058f1221e67c6291b3f29385ebb35fa2 | [
"Apache-2.0"
] | 3,142 | 2018-09-14T10:09:00.000Z | 2022-03-31T18:25:44.000Z | tensorflow_datasets/testing/fake_data_utils.py | jvishnuvardhan/datasets | b8e38187058f1221e67c6291b3f29385ebb35fa2 | [
"Apache-2.0"
] | 1,438 | 2018-09-16T13:58:22.000Z | 2022-03-31T11:19:54.000Z | # coding=utf-8
# Copyright 2021 The TensorFlow Datasets 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 appl... | 34.359223 | 80 | 0.719412 |
2d92cb8a5d4d51290878c7a8d1458da4e5f71003 | 2,961 | py | Python | algo/data/movielens/divide.py | RunanWang/somewhere | 0ba93a3f5f91042b4910171dda981f6c863ee581 | [
"MIT"
] | null | null | null | algo/data/movielens/divide.py | RunanWang/somewhere | 0ba93a3f5f91042b4910171dda981f6c863ee581 | [
"MIT"
] | 20 | 2019-11-20T06:47:28.000Z | 2020-01-14T02:23:22.000Z | algo/data/movielens/divide.py | RunanWang/somewhere | 0ba93a3f5f91042b4910171dda981f6c863ee581 | [
"MIT"
] | null | null | null | import csv
# 按照uesrID进行分类,按照时间顺序取前90%作为训练集,后10%作为测试集。
#(9万条训练,1万条测试)
# 结果存在process_train.csv和process_test.csv中。
def write_list(fp, write_list):
headers = [
"UserNum", "UserScore", "MovieNum", "MovieScore", "Action", "Adventure",
"Animation", "Children's", "Comedy", "Crime", "Documentary", "Drama",... | 34.430233 | 113 | 0.590679 |
0d866c59b92ec440a0d88491314a37713a45ed85 | 29,294 | py | Python | modules.py | ccnguyen/meta-siren | 9afcd30ad20551e22267f6db436910fe97a50785 | [
"MIT"
] | null | null | null | modules.py | ccnguyen/meta-siren | 9afcd30ad20551e22267f6db436910fe97a50785 | [
"MIT"
] | null | null | null | modules.py | ccnguyen/meta-siren | 9afcd30ad20551e22267f6db436910fe97a50785 | [
"MIT"
] | null | null | null | import torch
from torch import nn
from torchmeta.modules import (MetaModule, MetaSequential)
from torchmeta.modules.utils import get_subdict
import numpy as np
from collections import OrderedDict
import math
import torch.nn.functional as F
import sys
class BatchLinear(nn.Linear, MetaModule):
'''A linear meta-layer... | 37.175127 | 161 | 0.602205 |
4a74baed6fccda8be663cb58f5e1ff5218032ffa | 1,685 | py | Python | NewsRecommendation/src/model/NRMS/news_encoder.py | ustcsky/recommenders | 64f0dd4653cf7f1d687c45c61807841415e111c7 | [
"MIT"
] | null | null | null | NewsRecommendation/src/model/NRMS/news_encoder.py | ustcsky/recommenders | 64f0dd4653cf7f1d687c45c61807841415e111c7 | [
"MIT"
] | null | null | null | NewsRecommendation/src/model/NRMS/news_encoder.py | ustcsky/recommenders | 64f0dd4653cf7f1d687c45c61807841415e111c7 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
from model.NRMS.multi_head import MultiHeadSelfAttention
from model.NRMS.additive import AdditiveAttention
class NewsEncoder(torch.nn.Module):
def __init__(self, args, word_embedding):
super(NewsEncoder, self).__init__()
self.args = args
# title
if... | 39.186047 | 102 | 0.638576 |
ffd64fa191eed35a0eb24721185d182ed991a44e | 3,756 | py | Python | a02_generate_random_non_number.py | aaronferrucci/Verilog-Generator-of-Neural-Net-Digit-Detector-for-FPGA | 162ae9594e8c6d674928077a94804d1149be7d73 | [
"Apache-2.0"
] | 218 | 2018-03-21T10:37:20.000Z | 2022-03-17T12:47:52.000Z | a02_generate_random_non_number.py | aaronferrucci/Verilog-Generator-of-Neural-Net-Digit-Detector-for-FPGA | 162ae9594e8c6d674928077a94804d1149be7d73 | [
"Apache-2.0"
] | 22 | 2018-07-26T14:32:26.000Z | 2022-03-10T14:21:54.000Z | a02_generate_random_non_number.py | aaronferrucci/Verilog-Generator-of-Neural-Net-Digit-Detector-for-FPGA | 162ae9594e8c6d674928077a94804d1149be7d73 | [
"Apache-2.0"
] | 76 | 2018-03-21T10:32:50.000Z | 2022-03-01T02:04:12.000Z | # coding: utf-8
__author__ = 'Roman Solovyev (ZFTurbo), IPPM RAS'
from a00_common_functions import *
from PIL import Image, ImageDraw
import numpy as np
import os
import cv2
import random
import math
import time
gradient_image = np.zeros((256, 256), dtype=np.uint8)
for i in range(256):
gradient_image[i, :] = i
... | 30.290323 | 83 | 0.55804 |
97045af5944e65ed6f419c3d9ac6b55f6da81341 | 4,007 | py | Python | datasets/Part 4 - Clustering/Section 24 - K-Means Clustering/my_kmeans.py | nylvam/machinelearning-az | 2ff139082b61ace5a94ef86517c84febee3b7ecb | [
"MIT"
] | null | null | null | datasets/Part 4 - Clustering/Section 24 - K-Means Clustering/my_kmeans.py | nylvam/machinelearning-az | 2ff139082b61ace5a94ef86517c84febee3b7ecb | [
"MIT"
] | null | null | null | datasets/Part 4 - Clustering/Section 24 - K-Means Clustering/my_kmeans.py | nylvam/machinelearning-az | 2ff139082b61ace5a94ef86517c84febee3b7ecb | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 3 20:22:12 2020
@author: ramonpuga
"""
# K-Means
# Importar librerías de trabajao
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# Cargamos los datos con pandas
dataset = pd.read_csv('Mall_Customers.csv')
X = dataset.iloc... | 48.277108 | 127 | 0.693037 |
8b89474f1e434a00688a206549067d8f470047f0 | 7,500 | py | Python | ref_utils/VimeoDataset.py | IndigoPurple/EFENet | e88234486f19534274a0a20badc251788ac67e31 | [
"MIT"
] | 11 | 2021-10-18T02:14:37.000Z | 2022-02-10T13:17:07.000Z | ref_utils/VimeoDataset.py | IndigoPurple/EFENet | e88234486f19534274a0a20badc251788ac67e31 | [
"MIT"
] | null | null | null | ref_utils/VimeoDataset.py | IndigoPurple/EFENet | e88234486f19534274a0a20badc251788ac67e31 | [
"MIT"
] | null | null | null | import numpy as np
import csv
from PIL import Image
import matplotlib.pyplot as plt
import torch
from torch.utils.data import Dataset, DataLoader
from torchvision import transforms, utils
import random
import cv2
class VimeoDataset(Dataset):
''' Vimeo Dataset '''
def __init__(self, data_path_corrupted, data_p... | 38.071066 | 117 | 0.594133 |
7bcfb9ab7a19cdf6ef7b907d9e043f6ead0d586b | 83 | py | Python | core/networks/__init__.py | rdbch/COVID-19-Forecast | 3aa9730ce07e935a87565d00052868dffdb430d9 | [
"Apache-2.0"
] | 7 | 2020-05-20T00:51:43.000Z | 2021-12-19T01:34:49.000Z | core/networks/__init__.py | rdbch/COVID-19-Forecast | 3aa9730ce07e935a87565d00052868dffdb430d9 | [
"Apache-2.0"
] | null | null | null | core/networks/__init__.py | rdbch/COVID-19-Forecast | 3aa9730ce07e935a87565d00052868dffdb430d9 | [
"Apache-2.0"
] | 1 | 2021-04-14T16:26:50.000Z | 2021-04-14T16:26:50.000Z | from .basic_recurrent_predictor import BasicRecurrentPredictor
from .mlp import MLP | 41.5 | 62 | 0.891566 |
c861296ae317899d09d7471284313a8610362fe4 | 130,378 | py | Python | tests/presubmit_unittest.py | khanhdd26/deport_tool | bdd548a2a36f5d6e22a9efdf11699c4a3faf8080 | [
"BSD-3-Clause"
] | null | null | null | tests/presubmit_unittest.py | khanhdd26/deport_tool | bdd548a2a36f5d6e22a9efdf11699c4a3faf8080 | [
"BSD-3-Clause"
] | null | null | null | tests/presubmit_unittest.py | khanhdd26/deport_tool | bdd548a2a36f5d6e22a9efdf11699c4a3faf8080 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env vpython3
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Unit tests for presubmit_support.py and presubmit_canned_checks.py."""
# pylint: disable=no-member,E1103
from __future__ imp... | 37.155315 | 80 | 0.645431 |
dfff63c79e6078cc283ec4b1983b196f82b5dbf7 | 388 | py | Python | Section 1 - Getting Started/Breakouts/Breakout 1.2 - Turtle Graphics/Turtle Shapes v2 - block1.py | gitjot/python-for-lccs | a8a4ae8847abbc33361f80183c06d57b20523382 | [
"CC0-1.0"
] | 10 | 2020-02-14T14:28:15.000Z | 2022-02-02T18:44:11.000Z | Section 1 - Getting Started/Breakouts/Breakout 1.2 - Turtle Graphics/Turtle Shapes v2 - block1.py | gitjot/python-for-lccs | a8a4ae8847abbc33361f80183c06d57b20523382 | [
"CC0-1.0"
] | null | null | null | Section 1 - Getting Started/Breakouts/Breakout 1.2 - Turtle Graphics/Turtle Shapes v2 - block1.py | gitjot/python-for-lccs | a8a4ae8847abbc33361f80183c06d57b20523382 | [
"CC0-1.0"
] | 8 | 2020-03-25T09:27:42.000Z | 2021-11-03T15:24:38.000Z | # Event: LCCS Python Fundamental Skills Workshop
# Date: May 2018
# Author: Joe English, PDST
# eMail: computerscience@pdst.ie
# Purpose: Turtle Graphics - Further Activities
# Match the code blocks below to the corresponding shape
from turtle import * # import the turtle graphics library
forward(100)
right... | 22.823529 | 58 | 0.737113 |
e96c9efa570b5abcba0505d022660c1c158c827a | 435 | py | Python | web/endpoint/utils.py | ShmatkovD/MLBD_look | 7f234c1d7a2af56ad074353dee7da55c3a58cf3f | [
"MIT"
] | 1 | 2019-04-21T16:37:55.000Z | 2019-04-21T16:37:55.000Z | web/endpoint/utils.py | ShmatkovD/MLBD_look | 7f234c1d7a2af56ad074353dee7da55c3a58cf3f | [
"MIT"
] | 1 | 2019-04-28T22:48:10.000Z | 2019-04-28T22:48:10.000Z | web/endpoint/utils.py | ShmatkovD/MLBD_look | 7f234c1d7a2af56ad074353dee7da55c3a58cf3f | [
"MIT"
] | 1 | 2019-04-21T17:29:23.000Z | 2019-04-21T17:29:23.000Z | import json
from pyindex import PySmallWorldIndex
from django.conf import settings
def load_index(cache_path=settings.INDEX_CACHE):
with open(cache_path, 'r') as f:
content = json.loads(f.read())
index = PySmallWorldIndex(
len(content[0]['feature_vector']),
settings.GRAPH_CONNECTIVITY... | 24.166667 | 64 | 0.689655 |
306e13c1354fcf31d92cd1434a42ec9da27bb2ca | 1,753 | py | Python | venv/lib/python2.7/site-packages/ansible/module_utils/facts/hardware/hurd.py | haind27/test01 | 7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852 | [
"MIT"
] | 37 | 2017-08-15T15:02:43.000Z | 2021-07-23T03:44:31.000Z | ansible/module_utils/facts/hardware/hurd.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 12 | 2018-01-10T05:25:25.000Z | 2021-11-28T06:55:48.000Z | ansible/module_utils/facts/hardware/hurd.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 49 | 2017-08-15T09:52:13.000Z | 2022-03-21T17:11:54.000Z | # This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that ... | 32.462963 | 73 | 0.735881 |
63524ae1ad36bbec0d27764193cb19fc4bb7c925 | 895 | py | Python | src/compose_flow/shell.py | rca/compose-flow | 9e007d7c4f6da6d3c834bf3d74bf37079c96be98 | [
"Apache-2.0"
] | null | null | null | src/compose_flow/shell.py | rca/compose-flow | 9e007d7c4f6da6d3c834bf3d74bf37079c96be98 | [
"Apache-2.0"
] | null | null | null | src/compose_flow/shell.py | rca/compose-flow | 9e007d7c4f6da6d3c834bf3d74bf37079c96be98 | [
"Apache-2.0"
] | null | null | null | import os
import sh
import shlex
from sh import ErrorReturnCode_1 # noqa: F401 pylint: disable=E1101
# these runtime environment variables should be injected into
# the compose flow environment prior to executing a command
OS_ENV_INCLUDES = (
'DOCKER_HOST',
'HOME',
'PATH',
'USER',
'DISPLAY',
... | 21.829268 | 68 | 0.663687 |
c54db0c7e4345f605c290d194f562726c7551e5a | 1,379 | py | Python | p501_find_mode_in_binary_search_tree.py | feigaochn/leetcode | abf0877fae02aa9c2549051f0b68df0ace952512 | [
"MIT"
] | null | null | null | p501_find_mode_in_binary_search_tree.py | feigaochn/leetcode | abf0877fae02aa9c2549051f0b68df0ace952512 | [
"MIT"
] | null | null | null | p501_find_mode_in_binary_search_tree.py | feigaochn/leetcode | abf0877fae02aa9c2549051f0b68df0ace952512 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
from utils.binary_tree import build_binary_tree
null = None
# Definition for a binary tree node.
class TreeNode(object):
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution(object):
def findMode(self, root):
... | 25.072727 | 83 | 0.545323 |
9e72a359d369ef24f6f347eaa879c2dea1dc3028 | 886 | py | Python | Python/Algorithms/SortingAlgorithms/CountingSort.py | ZahraShahid/AlgorithmsAndDataStructure | 4ec16d73ad530de3e6061e6e9d019c72ea6718ff | [
"MIT"
] | null | null | null | Python/Algorithms/SortingAlgorithms/CountingSort.py | ZahraShahid/AlgorithmsAndDataStructure | 4ec16d73ad530de3e6061e6e9d019c72ea6718ff | [
"MIT"
] | null | null | null | Python/Algorithms/SortingAlgorithms/CountingSort.py | ZahraShahid/AlgorithmsAndDataStructure | 4ec16d73ad530de3e6061e6e9d019c72ea6718ff | [
"MIT"
] | null | null | null | # counting sort in python by Zahra Shahid
def counting_sort(A,k):
length = len(A)
Output = [0] * length # the sorted output array
Count = [0] * k # the array of count of each number in the given range
for i in range(0,length):
Count[A[i]... | 23.315789 | 94 | 0.496614 |
a464192ef72cf0caf9eb47cddca8f5e9581d3b17 | 2,174 | py | Python | src/status/misdirection.py | the5thEmperor/lykos | 62cc7694ec24eb0c177dfd25db79725a092a57fa | [
"BSD-2-Clause"
] | null | null | null | src/status/misdirection.py | the5thEmperor/lykos | 62cc7694ec24eb0c177dfd25db79725a092a57fa | [
"BSD-2-Clause"
] | null | null | null | src/status/misdirection.py | the5thEmperor/lykos | 62cc7694ec24eb0c177dfd25db79725a092a57fa | [
"BSD-2-Clause"
] | null | null | null | import random
from src.decorators import event_listener
from src.containers import UserSet
from src.functions import get_players
from src.messages import messages
__all__ = ["add_misdirection", "try_misdirection"]
AS_ACTOR = UserSet() # type: Set[users.User]
AS_TARGET = UserSet() # type: Set[users.User]
def _get_ta... | 32.447761 | 99 | 0.678013 |
9fa7a5a5f7cee58ef8c5caefd8891b92774f14b7 | 424 | py | Python | quadratic.py | eksam1993/python_training | 59fcdbcba52ca3daef52e59ce52223921a24daa4 | [
"Apache-2.0"
] | null | null | null | quadratic.py | eksam1993/python_training | 59fcdbcba52ca3daef52e59ce52223921a24daa4 | [
"Apache-2.0"
] | null | null | null | quadratic.py | eksam1993/python_training | 59fcdbcba52ca3daef52e59ce52223921a24daa4 | [
"Apache-2.0"
] | null | null | null | from math import sqrt
def solve(a,b,c):
d = b*b - 4*a*c
if d < 0:
print("No solutions")
elif d == 0:
x = -b / (2*a)
print("One solution " + str(x))
elif d > 0:
x1 = (-b + sqrt(d)) / (2*a)
x2 = (-b - sqrt(d)) / (2*a)
print("Two solutions " + str(x1) + " a... | 20.190476 | 61 | 0.424528 |
4581a3f427dbc3900421262a84fa0af00d459d15 | 3,566 | py | Python | imot_tools/io/plot.py | imagingofthings/ImoT_tools | f5981171482cbfbc667f6ff77c35ff0cfc9b0eec | [
"BSD-3-Clause"
] | 1 | 2019-06-16T08:29:46.000Z | 2019-06-16T08:29:46.000Z | imot_tools/io/plot.py | imagingofthings/ImoT_tools | f5981171482cbfbc667f6ff77c35ff0cfc9b0eec | [
"BSD-3-Clause"
] | null | null | null | imot_tools/io/plot.py | imagingofthings/ImoT_tools | f5981171482cbfbc667f6ff77c35ff0cfc9b0eec | [
"BSD-3-Clause"
] | null | null | null | # ############################################################################
# plot.py
# =======
# Author : Sepand KASHANI [kashani.sepand@gmail.com]
# ############################################################################
"""
`Matplotlib <https://matplotlib.org/>`_ helpers.
"""
import pathlib
import matplot... | 26.81203 | 96 | 0.582165 |
e5a728383fde18831962adb1e9694709e1d0b8ae | 10,646 | py | Python | pyleecan/GUI/Dialog/DMachineSetup/SWPole/PWSlot61/PWSlot61.py | mxgnsr/pyleecan | 2b0a04e4ae67c073a91362ab42332908fef53bdd | [
"Apache-2.0"
] | null | null | null | pyleecan/GUI/Dialog/DMachineSetup/SWPole/PWSlot61/PWSlot61.py | mxgnsr/pyleecan | 2b0a04e4ae67c073a91362ab42332908fef53bdd | [
"Apache-2.0"
] | null | null | null | pyleecan/GUI/Dialog/DMachineSetup/SWPole/PWSlot61/PWSlot61.py | mxgnsr/pyleecan | 2b0a04e4ae67c073a91362ab42332908fef53bdd | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import PyQt5.QtCore
from PyQt5.QtCore import pyqtSignal
from PyQt5.QtWidgets import QWidget
from ......Classes.SlotW61 import SlotW61
from ......GUI import gui_option
from ......GUI.Dialog.DMachineSetup.SWPole.PWSlot61.Gen_PWSlot61 import Gen_PWSlot61
from ......Methods.Slot.Slot.check import ... | 32.656442 | 89 | 0.565846 |
c2761315271ea65f32645b0803310171c25a1c0a | 4,441 | py | Python | src/detector_player_trainer.py | luyu-fan/fsoccermot | 90fa879a5c573f8bc87314f2df34f1a20afb4534 | [
"MIT"
] | null | null | null | src/detector_player_trainer.py | luyu-fan/fsoccermot | 90fa879a5c573f8bc87314f2df34f1a20afb4534 | [
"MIT"
] | null | null | null | src/detector_player_trainer.py | luyu-fan/fsoccermot | 90fa879a5c573f8bc87314f2df34f1a20afb4534 | [
"MIT"
] | null | null | null | """
训练主入口位置
"""
import torch, json, os
from torch.utils.data.dataloader import DataLoader
from torchvision.transforms import transforms as cvtransform
import lib.models.model_factory as model_factory
import lib.datasets.dataset_factory as dataset_factory
import lib.trainer.train_factory as train_factory
import lib.log... | 36.105691 | 139 | 0.60707 |
eb3416c6d3074ffcb0035981b1e8d1c0e9a2ff0e | 1,874 | py | Python | ddtrace/contrib/tornado/application.py | tophatmonocle/dd-trace-py | 7db12f1c398c07cd5baf91c571aed672dbb6496d | [
"BSD-3-Clause"
] | null | null | null | ddtrace/contrib/tornado/application.py | tophatmonocle/dd-trace-py | 7db12f1c398c07cd5baf91c571aed672dbb6496d | [
"BSD-3-Clause"
] | null | null | null | ddtrace/contrib/tornado/application.py | tophatmonocle/dd-trace-py | 7db12f1c398c07cd5baf91c571aed672dbb6496d | [
"BSD-3-Clause"
] | null | null | null | import ddtrace
from tornado import template
from . import decorators, context_provider
from .constants import CONFIG_KEY
from ...ext import AppTypes
def tracer_config(__init__, app, args, kwargs):
"""
Wrap Tornado web application so that we can configure services info and
tracing settings after the ini... | 28.830769 | 93 | 0.681964 |
3e64bfbdaeaff9847c26a40a53525b707c5fde4d | 2,982 | py | Python | conanfile.py | worldemar/conan-openal | 15fb8d88236a6c8e129185590216af0afa8a43ef | [
"MIT"
] | null | null | null | conanfile.py | worldemar/conan-openal | 15fb8d88236a6c8e129185590216af0afa8a43ef | [
"MIT"
] | null | null | null | conanfile.py | worldemar/conan-openal | 15fb8d88236a6c8e129185590216af0afa8a43ef | [
"MIT"
] | null | null | null | from conans import CMake, ConanFile, tools
import os
class OpenALConan(ConanFile):
name = "openal"
description = "OpenAL Soft is a software implementation of the OpenAL 3D audio API."
topics = ("conan", "openal", "audio", "api")
url = "http://github.com/bincrafters/conan-openal"
homepage = "https:... | 40.297297 | 105 | 0.644199 |
efe11b0823207c1249f25b0d6d151c88408a0a6c | 35,156 | py | Python | tests/test_identity_pool.py | ijrsvt/google-auth-library-python | 20ab7d9417a6fa1d8aeee944e2abca09287ed855 | [
"Apache-2.0"
] | 1 | 2021-11-07T18:56:03.000Z | 2021-11-07T18:56:03.000Z | tests/test_identity_pool.py | menendezjaume/google-auth-library-python | b79b55407b31933c9a8fe6de01478fa00a33fa2b | [
"Apache-2.0"
] | null | null | null | tests/test_identity_pool.py | menendezjaume/google-auth-library-python | b79b55407b31933c9a8fe6de01478fa00a33fa2b | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 39.062222 | 118 | 0.662902 |
ba0608aa7ea85ed4aff3c63a9d0608785cce1f63 | 1,908 | py | Python | src/engine/SCons/Options/PackageOption.py | bdbaddog/scons-gh-migrate | c76589c83ec00650a2d07dce79fc6dc5ca6465fb | [
"MIT"
] | 1 | 2015-11-04T22:22:10.000Z | 2015-11-04T22:22:10.000Z | src/engine/SCons/Options/PackageOption.py | bdbaddog/scons-gh-migrate | c76589c83ec00650a2d07dce79fc6dc5ca6465fb | [
"MIT"
] | 1 | 2020-05-19T02:59:19.000Z | 2020-05-21T09:05:19.000Z | src/engine/SCons/Options/PackageOption.py | bdbaddog/scons-gh-migrate | c76589c83ec00650a2d07dce79fc6dc5ca6465fb | [
"MIT"
] | 2 | 2018-01-16T11:29:16.000Z | 2020-05-13T16:48:26.000Z | #
# __COPYRIGHT__
#
# 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,
# distribute, sublicen... | 37.411765 | 103 | 0.762579 |
6e9e44d0af055000af6b2e0faf7dc0557a14fbcb | 96,717 | py | Python | QUANTAXIS/QAFetch/QATdx.py | erhagoose/QUANTAXIS | e11b481e984613b66039381d887da9f5ae2eed77 | [
"MIT"
] | null | null | null | QUANTAXIS/QAFetch/QATdx.py | erhagoose/QUANTAXIS | e11b481e984613b66039381d887da9f5ae2eed77 | [
"MIT"
] | null | null | null | QUANTAXIS/QAFetch/QATdx.py | erhagoose/QUANTAXIS | e11b481e984613b66039381d887da9f5ae2eed77 | [
"MIT"
] | null | null | null | # coding:utf-8
#
# The MIT License (MIT)
#
# Copyright (c) 2016-2019 yutiansut/QUANTAXIS
#
# 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 th... | 36.928981 | 133 | 0.52787 |
9d0848b6b1081e0e279db039dba29b81b395c533 | 36,183 | py | Python | lib-python/2.7/cgi.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 333 | 2015-08-08T18:03:38.000Z | 2022-03-22T18:13:12.000Z | lib-python/2.7/cgi.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 7 | 2020-02-16T16:49:05.000Z | 2021-11-26T09:00:56.000Z | lib-python/2.7/cgi.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 55 | 2015-08-16T02:41:30.000Z | 2022-03-20T20:33:35.000Z | #! /usr/local/bin/python
# NOTE: the above "/usr/local/bin/python" is NOT a mistake. It is
# intentionally NOT "/usr/bin/env python". On many systems
# (e.g. Solaris), /usr/local/bin is not in $PATH as passed to CGI
# scripts, and /usr/local/bin is the default directory where Python is
# installed, so /usr/bin/env w... | 33.134615 | 82 | 0.577205 |
97ee608ecbc15f2c5c676da3bd51c9a0314092bc | 3,733 | py | Python | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/models/_paged_models.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2021-06-02T08:01:35.000Z | 2021-06-02T08:01:35.000Z | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/models/_paged_models.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2020-03-06T05:57:16.000Z | 2020-03-06T05:57:16.000Z | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/models/_paged_models.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 35.216981 | 158 | 0.627645 |
bb92ac6a160ae2f335c25b3c3d8e0bd153801cee | 15,886 | py | Python | test/unit/common/test_request_helpers.py | hashsos/hashcloudos-swift | 25db6f317de58a9da226f97f0e2eedac658a0042 | [
"Apache-2.0"
] | 1 | 2019-05-25T10:55:58.000Z | 2019-05-25T10:55:58.000Z | test/unit/common/test_request_helpers.py | hashsos/hashcloudos-swift | 25db6f317de58a9da226f97f0e2eedac658a0042 | [
"Apache-2.0"
] | 12 | 2015-06-23T23:20:17.000Z | 2016-01-27T00:37:12.000Z | test/unit/common/test_request_helpers.py | hashsos/hashcloudos-swift | 25db6f317de58a9da226f97f0e2eedac658a0042 | [
"Apache-2.0"
] | 5 | 2015-06-04T19:00:11.000Z | 2015-12-16T21:04:33.000Z | # Copyright (c) 2010-2012 OpenStack Foundation
#
# 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 agree... | 42.475936 | 79 | 0.607768 |
d7941def6b707a4075043effd465956f1b71a6ee | 11,493 | py | Python | vault/datadog_checks/vault/vault.py | fujigon/integrations-core | 256b1c138fd1bf1c71db63698737e813cfda00f8 | [
"BSD-3-Clause"
] | null | null | null | vault/datadog_checks/vault/vault.py | fujigon/integrations-core | 256b1c138fd1bf1c71db63698737e813cfda00f8 | [
"BSD-3-Clause"
] | null | null | null | vault/datadog_checks/vault/vault.py | fujigon/integrations-core | 256b1c138fd1bf1c71db63698737e813cfda00f8 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2018-2019
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import time
from collections import namedtuple
import requests
from datadog_checks.base import ConfigurationError, OpenMetricsBaseCheck, is_affirmative
from .errors import ApiUnreachable
from .metrics impo... | 42.566667 | 120 | 0.634038 |
c8d0ca8b476b0ff86284622554655c0314d53225 | 1,480 | py | Python | arjuna/interact/gui/auto/automator/webalert_handler.py | ChandraMouliDisturbs/arjuna | 4965622fbb01a5e5b6459110c413accc5c483424 | [
"Apache-2.0"
] | null | null | null | arjuna/interact/gui/auto/automator/webalert_handler.py | ChandraMouliDisturbs/arjuna | 4965622fbb01a5e5b6459110c413accc5c483424 | [
"Apache-2.0"
] | null | null | null | arjuna/interact/gui/auto/automator/webalert_handler.py | ChandraMouliDisturbs/arjuna | 4965622fbb01a5e5b6459110c413accc5c483424 | [
"Apache-2.0"
] | null | null | null | # This file is a part of Arjuna
# Copyright 2015-2020 Rahul Verma
# Website: www.RahulVerma.net
# 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... | 30.833333 | 117 | 0.692568 |
801de375933275eb43bd6791f14317f4ff12b2bf | 837 | py | Python | web_crawl/qiushibaike.py | fossabot/experiment_code | de0fdfc4f6cc61cd1941af8df6e39491fada0e6b | [
"MIT"
] | null | null | null | web_crawl/qiushibaike.py | fossabot/experiment_code | de0fdfc4f6cc61cd1941af8df6e39491fada0e6b | [
"MIT"
] | null | null | null | web_crawl/qiushibaike.py | fossabot/experiment_code | de0fdfc4f6cc61cd1941af8df6e39491fada0e6b | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
@Author: yzw
@CreateTime: 2017-06-22, 20:49:28 CST+0800
@File: zhihu_spider.py
"""
from bs4 import BeautifulSoup
import requests
URL = 'https://www.qiushibaike.com/8hr/page/'
def get_url(url):
for num in xrange(1,5):
headers = {'User-Agent':'Mozilla/5.0 (Mac... | 22.621622 | 156 | 0.614098 |
5df9b659a7009ffb9be2f88d38fb9fa3951c59ce | 2,580 | py | Python | Polynomial_dict.py | chapman-phys227-2016s/hw-7-ChinmaiRaman | ed985215003006e2fd011c3f83f453ad63f7c61b | [
"MIT"
] | null | null | null | Polynomial_dict.py | chapman-phys227-2016s/hw-7-ChinmaiRaman | ed985215003006e2fd011c3f83f453ad63f7c61b | [
"MIT"
] | null | null | null | Polynomial_dict.py | chapman-phys227-2016s/hw-7-ChinmaiRaman | ed985215003006e2fd011c3f83f453ad63f7c61b | [
"MIT"
] | null | null | null | #! /usr/bin/env python
"""
File: Polynomial_vec
Copyright (c) 2016 Chinmai Raman
License: MIT
Course: PHYS227
Assignment: 7.27
Date: April 9th, 2016
Email: raman105@mail.chapman.edu
Name: Chinmai Raman
Description: Vectorizes the Polynomial class
"""
from __future__ import division
import matplotlib.pyplot as plt
imp... | 31.084337 | 81 | 0.575194 |
23f9f4edd2727b1c78f1ddfcf380c5379510f5de | 3,281 | py | Python | sktime/regression/interval_based/_tsf.py | ishannangia001/sktime | b61f44aad75c6ea16e272a5bdd3111b40fc1621f | [
"BSD-3-Clause"
] | 2 | 2021-12-28T10:48:11.000Z | 2022-03-06T18:08:01.000Z | sktime/regression/interval_based/_tsf.py | ishannangia001/sktime | b61f44aad75c6ea16e272a5bdd3111b40fc1621f | [
"BSD-3-Clause"
] | null | null | null | sktime/regression/interval_based/_tsf.py | ishannangia001/sktime | b61f44aad75c6ea16e272a5bdd3111b40fc1621f | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Time Series Forest Regressor (TSF)."""
__author__ = ["Tony Bagnall", "kkoziara", "luiszugasti", "kanand77", "Markus Löning"]
__all__ = ["TimeSeriesForestRegressor"]
import numpy as np
from joblib import Parallel, delayed
from sklearn.ensemble._forest import ForestRegressor
from sklearn.tree... | 31.247619 | 86 | 0.658641 |
71723f7518dc2d350bcb2a11055e4e3f7ee13379 | 4,140 | py | Python | annotation/clingen/gene_validity.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | 5 | 2021-01-14T03:34:42.000Z | 2022-03-07T15:34:18.000Z | annotation/clingen/gene_validity.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | 551 | 2020-10-19T00:02:38.000Z | 2022-03-30T02:18:22.000Z | annotation/clingen/gene_validity.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | null | null | null | import logging
from io import StringIO
import pandas as pd
import requests
from dateutil import parser
from annotation.models import DiseaseValidity
from annotation.models.models import GeneDiseaseValidity, GeneDiseaseCurator
from annotation.models.models_enums import ClinGenClassification
from library.utils import i... | 43.125 | 118 | 0.619082 |
7175ab35062e9b61b25b327410143977b68ef278 | 1,850 | py | Python | python/flexflow/torch/nn/modules/conv.py | NodLabs/FlexFlow | f28f9a3e5454aa075cf8339417d4b7add6b14ed9 | [
"Apache-2.0"
] | 1 | 2020-09-10T08:06:36.000Z | 2020-09-10T08:06:36.000Z | python/flexflow/torch/nn/modules/conv.py | NodLabs/FlexFlow | f28f9a3e5454aa075cf8339417d4b7add6b14ed9 | [
"Apache-2.0"
] | null | null | null | python/flexflow/torch/nn/modules/conv.py | NodLabs/FlexFlow | f28f9a3e5454aa075cf8339417d4b7add6b14ed9 | [
"Apache-2.0"
] | null | null | null | from flexflow.core import *
from .utils import _single, _pair
from .op import Op
class _ConvNd(Op):
def __init__(self, in_channels, out_channels, kernel_size, stride,
padding, dilation, transposed, output_padding,
groups, bias, padding_mode):
super(_ConvNd, self).__init__()
if ... | 36.27451 | 90 | 0.679459 |
ea1130be76ab416ebcf47ead25d04bdf0ad5d774 | 1,365 | py | Python | tests/test_matches.py | zmagajna/pubg-python | 616723a13cfb044bb7207b95f5224fe91d0d0bf0 | [
"MIT"
] | 138 | 2018-03-12T23:04:56.000Z | 2022-03-20T02:39:40.000Z | tests/test_matches.py | ZackTack/pubg-python | 1da74cd0919cc14e2a98e674ce5cbd3f2313017c | [
"MIT"
] | 64 | 2018-03-13T07:25:43.000Z | 2021-12-22T14:47:37.000Z | tests/test_matches.py | ZackTack/pubg-python | 1da74cd0919cc14e2a98e674ce5cbd3f2313017c | [
"MIT"
] | 68 | 2018-03-14T03:59:54.000Z | 2022-03-07T23:17:44.000Z | import json
import pytest
import requests_mock
from pubg_python.base import PUBG, Shard, APIClient
from pubg_python.domain.base import Match, Roster, Participant, Asset
from pubg_python.domain.telemetry.resources import GAME_MODE, SEASON_STATE
api = PUBG('apikey', Shard.STEAM)
BASE_URL = APIClient.BASE_URL
@pytest.f... | 31.022727 | 74 | 0.74359 |
ad6aeab41b786c55a09c75936291fdd0cf4a5b88 | 5,418 | py | Python | app/authentication/authenticator.py | uk-gov-mirror/ONSdigital.eq-questionnaire-runner | 4684bc560bfc7a169e279846fb341a188decb374 | [
"MIT"
] | null | null | null | app/authentication/authenticator.py | uk-gov-mirror/ONSdigital.eq-questionnaire-runner | 4684bc560bfc7a169e279846fb341a188decb374 | [
"MIT"
] | null | null | null | app/authentication/authenticator.py | uk-gov-mirror/ONSdigital.eq-questionnaire-runner | 4684bc560bfc7a169e279846fb341a188decb374 | [
"MIT"
] | null | null | null | from datetime import datetime, timedelta
from uuid import uuid4
from blinker import ANY
from dateutil.tz import tzutc
from flask import current_app
from flask import session as cookie_session
from flask_login import LoginManager, user_logged_out
from sdc.crypto.decrypter import decrypt
from structlog import get_logger... | 30.438202 | 92 | 0.720192 |
ee8ceea00d94fcef73be59a03570299699c6cc49 | 2,613 | py | Python | side_input.py | Katniss394/Dataflow-Samples | ecc55a3609e1330f2dc31ce9cb1acf9b2fefe348 | [
"Apache-2.0"
] | null | null | null | side_input.py | Katniss394/Dataflow-Samples | ecc55a3609e1330f2dc31ce9cb1acf9b2fefe348 | [
"Apache-2.0"
] | null | null | null | side_input.py | Katniss394/Dataflow-Samples | ecc55a3609e1330f2dc31ce9cb1acf9b2fefe348 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
import argparse
import logging
import re
import apache_beam as beam
from apache_beam import pvalue
from apache_beam.io import ReadFromText
from apache_beam.io import WriteToText
from apache_beam.pvalue import AsList
from apache_beam.options.pipeline_options import PipelineOptio... | 33.935065 | 148 | 0.590126 |
31fe6f0f259c6058322673ec2630cbc22f601e22 | 4,901 | py | Python | vyper/ast/natspec.py | kn1g/vyper | bd35acfacd0518d344d2575dc9e37e2278d4964e | [
"Apache-2.0"
] | 1 | 2021-10-01T13:50:11.000Z | 2021-10-01T13:50:11.000Z | vyper/ast/natspec.py | kn1g/vyper | bd35acfacd0518d344d2575dc9e37e2278d4964e | [
"Apache-2.0"
] | 4 | 2021-05-09T02:14:33.000Z | 2022-02-27T08:08:30.000Z | vyper/ast/natspec.py | kn1g/vyper | bd35acfacd0518d344d2575dc9e37e2278d4964e | [
"Apache-2.0"
] | 1 | 2020-10-09T15:44:31.000Z | 2020-10-09T15:44:31.000Z | import re
from typing import Optional, Tuple
from asttokens import LineNumbers
from vyper.ast import nodes as vy_ast
from vyper.exceptions import NatSpecSyntaxException
from vyper.parser.global_context import GlobalContext
from vyper.signatures import sig_utils
SINGLE_FIELDS = ("title", "author", "license", "notice"... | 33.114865 | 100 | 0.595593 |
d8536c288f36fe39af6a7f0b6ba386c0e5f8f874 | 848 | py | Python | Liquid_Pool_Fires/NIST_Pool_Fires/Computational_Results/2021/FMGlobal2/FM_Methanol_100cm_Predicted_plot_results.py | fbraennstroem-UoW/macfp-db | 3212d5249dd67179d458a1b29638e7b8144fb654 | [
"MIT"
] | 20 | 2015-11-12T21:16:48.000Z | 2021-04-22T15:40:58.000Z | Liquid_Pool_Fires/NIST_Pool_Fires/Computational_Results/2021/FMGlobal2/FM_Methanol_100cm_Predicted_plot_results.py | fbraennstroem-UoW/macfp-db | 3212d5249dd67179d458a1b29638e7b8144fb654 | [
"MIT"
] | 31 | 2016-01-06T19:54:29.000Z | 2021-05-13T07:48:53.000Z | Liquid_Pool_Fires/NIST_Pool_Fires/Computational_Results/2021/FMGlobal2/FM_Methanol_100cm_Predicted_plot_results.py | fbraennstroem-UoW/macfp-db | 3212d5249dd67179d458a1b29638e7b8144fb654 | [
"MIT"
] | 29 | 2015-09-14T21:39:39.000Z | 2021-05-27T03:19:35.000Z | #!/usr/bin/env python3
# McDermott
# Feb 2021
# first, make sure the macfp module directory is in your path
# if not, uncomment the lines below and replace <path to macfp-db>
# with the path (absolute or relative) to your macfp-db repository
import sys
# sys.path.append('<path to macfp-db>/macfp-db/Utilities/')
sys.p... | 32.615385 | 81 | 0.65684 |
fa0be98ff96f325a77812d56e0ac42f24eb6a4cb | 3,120 | py | Python | satip/intermediate.py | Future-Energy-Associates/Satip | 91771e5e8530db6c49c100dbb610e2ed1f9e57c7 | [
"MIT"
] | 3 | 2020-12-17T11:38:48.000Z | 2021-01-22T11:46:53.000Z | satip/intermediate.py | Future-Energy-Associates/Satip | 91771e5e8530db6c49c100dbb610e2ed1f9e57c7 | [
"MIT"
] | 2 | 2021-01-07T22:00:41.000Z | 2021-01-08T14:22:39.000Z | satip/intermediate.py | Future-Energy-Associates/Satip | 91771e5e8530db6c49c100dbb610e2ed1f9e57c7 | [
"MIT"
] | null | null | null | from satip.utils import (
load_native_to_dataset,
save_dataset_to_zarr,
check_if_timestep_exists,
)
from satip.eumetsat import eumetsat_filename_to_datetime, eumetsat_cloud_name_to_datetime
import os
import pandas as pd
from pathlib import Path
import multiprocessing
from itertools import repeat
import xarr... | 35.454545 | 94 | 0.670833 |
0f9becc84138aa4eea58b1724fa57644c432ddf8 | 2,906 | py | Python | tigercontrol/controllers/bpc.py | MinRegret/TigerControl | b1ca0617cbb2198f9d5cb37f725f3d7accbab08f | [
"Apache-2.0"
] | 31 | 2019-11-08T06:01:54.000Z | 2021-11-20T04:50:43.000Z | tigercontrol/controllers/bpc.py | johnhallman/ctsb | b1ca0617cbb2198f9d5cb37f725f3d7accbab08f | [
"Apache-2.0"
] | 32 | 2019-06-27T15:05:04.000Z | 2019-08-07T04:23:47.000Z | tigercontrol/controllers/bpc.py | MinRegret/tigercontrol | b1ca0617cbb2198f9d5cb37f725f3d7accbab08f | [
"Apache-2.0"
] | 3 | 2020-09-30T17:06:50.000Z | 2021-04-12T22:39:34.000Z | import jax.numpy as np
import numpy as onp
import tigercontrol
from tigercontrol.controllers import Controller
from jax import grad,jit
import jax.random as random
from tigercontrol.utils import generate_key
import jax
import scipy
from tigercontrol.controllers import LQR
# BPC definition
class BPC(Controller):
de... | 36.325 | 107 | 0.57605 |
7a6ff97a8f76c36d4f7dc5915f48aa98427268f7 | 3,981 | py | Python | sfa/util/specdict.py | planetlab/sfa | d0f743e245e0bb24d7ed1016bcc6e61d1e558a95 | [
"MIT"
] | 1 | 2015-11-19T13:34:45.000Z | 2015-11-19T13:34:45.000Z | sfa/util/specdict.py | planetlab/sfa | d0f743e245e0bb24d7ed1016bcc6e61d1e558a95 | [
"MIT"
] | null | null | null | sfa/util/specdict.py | planetlab/sfa | d0f743e245e0bb24d7ed1016bcc6e61d1e558a95 | [
"MIT"
] | null | null | null | ##
# SpecDict
#
# SpecDict defines a means for converting a dictionary with plc specific keys
# to a dict with rspec specific keys.
#
# SpecDict.fields dict defines all the rspec specific attribute and their
# expected type.
#
# SpecDict.plc_fields defines a one to one mapping of plc attribute to rspec
# attribute... | 29.488889 | 99 | 0.482542 |
346a684f070a816cc0608520093f789bc4fb617e | 5,159 | py | Python | mmprismaaccess/node.py | PaloAltoNetworks/minemeld-prisma-access | bd37efd7322d964aa650e396104e9ccb32e50b50 | [
"Apache-2.0"
] | 1 | 2019-10-09T16:39:57.000Z | 2019-10-09T16:39:57.000Z | mmprismaaccess/node.py | PaloAltoNetworks/minemeld-prisma-access | bd37efd7322d964aa650e396104e9ccb32e50b50 | [
"Apache-2.0"
] | 1 | 2022-02-22T07:38:58.000Z | 2022-02-22T07:38:58.000Z | mmprismaaccess/node.py | PaloAltoNetworks/minemeld-prisma-access | bd37efd7322d964aa650e396104e9ccb32e50b50 | [
"Apache-2.0"
] | 4 | 2019-10-09T13:40:34.000Z | 2022-02-22T07:38:55.000Z | import logging
import os
import yaml
import requests
from netaddr import IPAddress
from minemeld.ft.basepoller import BasePollerFT
from minemeld.ft.utils import interval_in_sec
LOG = logging.getLogger(__name__)
PRISMA_ACCESS_API_QUERY = 'https://api.gpcloudservice.com/getAddrList/latest'
class Miner(BasePollerFT... | 31.266667 | 104 | 0.563481 |
7c5fcccc8affae4799c6ab8f53cbc697e9ccd02e | 7,119 | py | Python | backend/any_28416/settings.py | crowdbotics-apps/any-28416 | 0f1c9b23df0b315a01b9f1e761bebf26441bf59d | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/any_28416/settings.py | crowdbotics-apps/any-28416 | 0f1c9b23df0b315a01b9f1e761bebf26441bf59d | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/any_28416/settings.py | crowdbotics-apps/any-28416 | 0f1c9b23df0b315a01b9f1e761bebf26441bf59d | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """
Django settings for any_28416 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
... | 29.057143 | 99 | 0.726366 |
da376a23405c69d52969ad71f0cce2d18d4ee595 | 8,539 | py | Python | slm_lab/agent/net/conv_recurrent.py | wilson1yan/SLM-Lab | 1f110288d2d3dde1fb00d415aeb95ce554170813 | [
"MIT"
] | null | null | null | slm_lab/agent/net/conv_recurrent.py | wilson1yan/SLM-Lab | 1f110288d2d3dde1fb00d415aeb95ce554170813 | [
"MIT"
] | null | null | null | slm_lab/agent/net/conv_recurrent.py | wilson1yan/SLM-Lab | 1f110288d2d3dde1fb00d415aeb95ce554170813 | [
"MIT"
] | null | null | null | from slm_lab.agent.net import net_util
from slm_lab.agent.net.base import Net
from slm_lab.lib import logger, util
import numpy as np
import pydash as ps
import torch
import torch.nn as nn
logger = logger.get_logger(__name__)
class ConvRecurrentNet(Net, nn.Module):
'''
Class for generating arbitrary sized re... | 37.28821 | 129 | 0.601124 |
54d5da22660031743c812d9b8fb99b4c2034825a | 1,312 | py | Python | blueprints/dev-utils/_unix/libtool/libtool.py | C-EO/craft | a52ead76ce400cc745876bd679eba6f62da70ee5 | [
"BSD-2-Clause"
] | 55 | 2016-11-20T17:08:19.000Z | 2022-03-11T22:19:43.000Z | blueprints/dev-utils/_unix/libtool/libtool.py | C-EO/craft | a52ead76ce400cc745876bd679eba6f62da70ee5 | [
"BSD-2-Clause"
] | 17 | 2017-09-20T07:52:17.000Z | 2021-12-03T10:03:00.000Z | blueprints/dev-utils/_unix/libtool/libtool.py | C-EO/craft | a52ead76ce400cc745876bd679eba6f62da70ee5 | [
"BSD-2-Clause"
] | 29 | 2016-12-10T15:00:11.000Z | 2021-12-02T12:54:05.000Z | import info
class subinfo( info.infoclass ):
def setTargets( self ):
for ver in ["2.4.6"]:
self.targets[ ver ] = f"https://ftp.gnu.org/gnu/libtool/libtool-{ver}.tar.xz"
self.targetInstSrc[ ver ] = f"libtool-{ver}"
self.targetDigests["2.4.6"] = (['7c87a8c2c8c0fc9cd5019e402b... | 41 | 140 | 0.597561 |
6bfc83c9929957be04f65d74f59f12b4adb84570 | 5,171 | py | Python | Analysis.py | Ravindrasaragadam/Tweeter-Sentiment-Analysis | dc576f7f51ca10e644a7a27d4ab7a858dd1164b6 | [
"MIT"
] | null | null | null | Analysis.py | Ravindrasaragadam/Tweeter-Sentiment-Analysis | dc576f7f51ca10e644a7a27d4ab7a858dd1164b6 | [
"MIT"
] | null | null | null | Analysis.py | Ravindrasaragadam/Tweeter-Sentiment-Analysis | dc576f7f51ca10e644a7a27d4ab7a858dd1164b6 | [
"MIT"
] | null | null | null |
import re
import tweepy
from tweepy import OAuthHandler
from textblob import TextBlob
from tkinter import *
import matplotlib.pyplot as plt
results=""
#slices=[3,3,3]
class TwitterClient(object):
'''
Generic Twitter Class for sentiment analysis.
'''
def __init__(self):
'''
Class constructor or init... | 29.050562 | 133 | 0.680139 |
d78e952739e5060e0d58a9d183218f19b662f8c8 | 10,247 | py | Python | tests/python/pants_test/engine/examples/parsers.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/engine/examples/parsers.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/engine/examples/parsers.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import functools
import importlib
import inspect
import threading
from json.decoder impor... | 35.954386 | 105 | 0.673661 |
0811b72efbe4508b99852f51d56669a63188744e | 6,403 | py | Python | mars/dataframe/datasource/from_records.py | yuyiming/mars | 5e6990d1ea022444dd646c56697e596ef5d7e747 | [
"Apache-2.0"
] | 1 | 2022-02-24T08:39:26.000Z | 2022-02-24T08:39:26.000Z | mars/dataframe/datasource/from_records.py | yuyiming/mars | 5e6990d1ea022444dd646c56697e596ef5d7e747 | [
"Apache-2.0"
] | null | null | null | mars/dataframe/datasource/from_records.py | yuyiming/mars | 5e6990d1ea022444dd646c56697e596ef5d7e747 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 1999-2021 Alibaba Group Holding 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-... | 32.338384 | 112 | 0.593003 |
93e43cf11f5120612ffb82aa0fe373c1eff13e8a | 7,535 | py | Python | venv/lib/python3.7/site-packages/allauth/socialaccount/providers/oauth/client.py | vikram0207/django-rest | eafec575999dce6859dc7b99177cff339b2bcbdd | [
"MIT"
] | 12 | 2019-08-02T07:58:16.000Z | 2022-01-31T23:45:08.000Z | venv/lib/python3.7/site-packages/allauth/socialaccount/providers/oauth/client.py | vikram0207/django-rest | eafec575999dce6859dc7b99177cff339b2bcbdd | [
"MIT"
] | 23 | 2019-01-19T08:54:48.000Z | 2022-03-11T23:39:37.000Z | venv/lib/python3.7/site-packages/allauth/socialaccount/providers/oauth/client.py | vikram0207/django-rest | eafec575999dce6859dc7b99177cff339b2bcbdd | [
"MIT"
] | 11 | 2019-07-31T16:23:36.000Z | 2022-01-29T08:30:07.000Z | """
Parts derived from socialregistration and authorized by: alen, pinda
Inspired by:
http://github.com/leah/python-oauth/blob/master/oauth/example/client.py
http://github.com/facebook/tornado/blob/master/tornado/auth.py
"""
import requests
from django.http import HttpResponseRedirect
from django.utils.http i... | 37.487562 | 105 | 0.599735 |
3fd4beed7101d8c9e35ec73ed43a6d4de6bf9c8a | 98,296 | py | Python | trunk/src/agnkey/util.py | svalenti/agnkey | d44831a8ae72de0b2692da047994f67545185503 | [
"MIT"
] | null | null | null | trunk/src/agnkey/util.py | svalenti/agnkey | d44831a8ae72de0b2692da047994f67545185503 | [
"MIT"
] | null | null | null | trunk/src/agnkey/util.py | svalenti/agnkey | d44831a8ae72de0b2692da047994f67545185503 | [
"MIT"
] | null | null | null | ##################################################################
# change this directory accordingly to your system
#
import socket
import sys
host = socket.gethostname()
import time
import datetime
import requests
try:
from astropy.io import fits as pyfits
except:
import pyfits
if host in ['deneb']:
... | 40.85453 | 165 | 0.486439 |
60ac1d82d504241e2f45cacedfab0da5ac8fb6c3 | 5,216 | py | Python | EM-GMM/emgmm.py | cor14095/proyecto-2-ia | 483fd8cfeec2383fa1c8f9950f3c7e0e8fb7ee4c | [
"MIT"
] | null | null | null | EM-GMM/emgmm.py | cor14095/proyecto-2-ia | 483fd8cfeec2383fa1c8f9950f3c7e0e8fb7ee4c | [
"MIT"
] | null | null | null | EM-GMM/emgmm.py | cor14095/proyecto-2-ia | 483fd8cfeec2383fa1c8f9950f3c7e0e8fb7ee4c | [
"MIT"
] | null | null | null | ##
## emgmm.py
##
## By: Alejandro 'Perry' Cortes
##
## This script categorize data based on gassians
##
## Imports
import re
import copy
import random
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.patches import Ellipse
from scipy.stats import multivariate_normal as mn
# Globals
sigma = []
mu =... | 29.636364 | 120 | 0.589724 |
b6aa89e54ed461a679d5099ee2c6a52b95d21aec | 2,787 | py | Python | huaweicloud-sdk-iec/huaweicloudsdkiec/v1/model/batch_stop_instance_request_body.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | 1 | 2021-11-03T07:54:50.000Z | 2021-11-03T07:54:50.000Z | huaweicloud-sdk-iec/huaweicloudsdkiec/v1/model/batch_stop_instance_request_body.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-iec/huaweicloudsdkiec/v1/model/batch_stop_instance_request_body.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
import pprint
import re
import six
class BatchStopInstanceRequestBody:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and... | 25.568807 | 79 | 0.544672 |
b648bb9301c39b5614e90358aafcd40be7ba1dee | 5,772 | py | Python | dash/html/Tr.py | bkzhn/dash | 2975e001cf017919929b0ebad1f1d1e14fa32f93 | [
"MIT"
] | 1 | 2018-01-21T15:49:49.000Z | 2018-01-21T15:49:49.000Z | dash/html/Tr.py | sthagen/dash | b3918ff798a51462687ff36e9e56c079c9f463cb | [
"MIT"
] | null | null | null | dash/html/Tr.py | sthagen/dash | b3918ff798a51462687ff36e9e56c079c9f463cb | [
"MIT"
] | 1 | 2017-08-18T05:01:03.000Z | 2017-08-18T05:01:03.000Z | # AUTO GENERATED FILE - DO NOT EDIT
from dash.development.base_component import Component, _explicitize_args
class Tr(Component):
"""A Tr component.
Tr is a wrapper for the <tr> HTML5 element.
For detailed attribute info see:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr
Keyword a... | 31.714286 | 84 | 0.592516 |
0427f62492b96f0aaabda2a81e5c8b8bb624bc52 | 1,292 | py | Python | pyterprise/organizations.py | flaviotorres/terraform-enterprise-api-python-client | 7f3752dd6dfc51243a7102895d6d286000b543b4 | [
"MIT"
] | null | null | null | pyterprise/organizations.py | flaviotorres/terraform-enterprise-api-python-client | 7f3752dd6dfc51243a7102895d6d286000b543b4 | [
"MIT"
] | null | null | null | pyterprise/organizations.py | flaviotorres/terraform-enterprise-api-python-client | 7f3752dd6dfc51243a7102895d6d286000b543b4 | [
"MIT"
] | null | null | null | import requests
class Organziations():
def list_organizations(self):
url = self.url + 'organizations'
return self._get_handler(url)
def show_organization(self, organization):
url = self.url + 'organizations/{}'.format(organization)
return self._get_handler(url)
def update... | 29.363636 | 69 | 0.539474 |
5dba22649934a02c855dc2d12b276b3c487a262d | 73 | py | Python | src/lk_textbooks/_constants.py | nuuuwan/lk_textbooks | 5d16f02dda83f278cf49548dbc378cec89fbef18 | [
"MIT"
] | null | null | null | src/lk_textbooks/_constants.py | nuuuwan/lk_textbooks | 5d16f02dda83f278cf49548dbc378cec89fbef18 | [
"MIT"
] | null | null | null | src/lk_textbooks/_constants.py | nuuuwan/lk_textbooks | 5d16f02dda83f278cf49548dbc378cec89fbef18 | [
"MIT"
] | null | null | null | """Constants."""
CACHE_NAME = 'lk_textbooks.v0001'
CACHE_TIMEOUT = 3600
| 14.6 | 33 | 0.726027 |
98cb57a42acd02d98f13693f214b29793b4b0a0e | 952 | py | Python | tests/matvec.py | ghbrown/taylor | 3953b3e06d75292bf811bac41bdedc3b705df4ee | [
"MIT"
] | null | null | null | tests/matvec.py | ghbrown/taylor | 3953b3e06d75292bf811bac41bdedc3b705df4ee | [
"MIT"
] | null | null | null | tests/matvec.py | ghbrown/taylor | 3953b3e06d75292bf811bac41bdedc3b705df4ee | [
"MIT"
] | null | null | null |
import numpy as np
import taylor as ta
def matvec_vec(x,A):
# computes the matrix vector product
# A x
return A @ x
def matvec_mat(A,x):
# computes the matrix vector product
# A x
return A @ x
if (__name__ == "__main__"):
print()
print(f'--------------------- MATVEC TEST --... | 23.219512 | 69 | 0.548319 |
f4bb53ba4f2188e12982c2ab5b2a7186835830ce | 43,448 | py | Python | pandas/io/formats/style.py | mattboggess/pandas | 5551bcf9d297ea8a0aeffb70b17ae6730e8abf89 | [
"BSD-3-Clause"
] | 2 | 2018-09-06T13:36:11.000Z | 2018-09-09T12:38:22.000Z | pandas/io/formats/style.py | mattboggess/pandas | 5551bcf9d297ea8a0aeffb70b17ae6730e8abf89 | [
"BSD-3-Clause"
] | 3 | 2018-09-24T22:09:28.000Z | 2018-10-01T21:10:00.000Z | pandas/io/formats/style.py | mattboggess/pandas | 5551bcf9d297ea8a0aeffb70b17ae6730e8abf89 | [
"BSD-3-Clause"
] | 1 | 2018-10-14T18:27:49.000Z | 2018-10-14T18:27:49.000Z | """
Module for applying conditional formatting to
DataFrames and Series.
"""
from functools import partial
from itertools import product
from contextlib import contextmanager
from uuid import uuid1
import copy
from collections import defaultdict, MutableMapping
try:
from jinja2 import (
PackageLoader, Envi... | 33.970289 | 79 | 0.530289 |
1363435ba55b7173073cdf5b0fad52cc3e15d7e2 | 6,461 | py | Python | specter/agent.py | praekelt/specter | 6f00396fcec2b4f816bf410e9b7f6a74ad2a6a17 | [
"MIT"
] | null | null | null | specter/agent.py | praekelt/specter | 6f00396fcec2b4f816bf410e9b7f6a74ad2a6a17 | [
"MIT"
] | null | null | null | specter/agent.py | praekelt/specter | 6f00396fcec2b4f816bf410e9b7f6a74ad2a6a17 | [
"MIT"
] | null | null | null | import os
from twisted.internet import defer, utils, task, reactor
from twisted.python import log
import fcntl
from specter import version
class Agent(object):
def __init__(self, config):
self.config = config
self.methods = [m for m in dir(self) if m.startswith('post_') or m.startswith('get_')]
... | 31.21256 | 109 | 0.544188 |
39c049cc55ee3de0455c192aa3119f4dccb17166 | 23,373 | py | Python | Course1/0_basic_numpy.py | JJack27/DeepLearningMOOC | f366ee3393d289516e7b36067e18fbbec325696f | [
"MIT"
] | null | null | null | Course1/0_basic_numpy.py | JJack27/DeepLearningMOOC | f366ee3393d289516e7b36067e18fbbec325696f | [
"MIT"
] | null | null | null | Course1/0_basic_numpy.py | JJack27/DeepLearningMOOC | f366ee3393d289516e7b36067e18fbbec325696f | [
"MIT"
] | null | null | null |
# coding: utf-8
# # Python Basics with Numpy (optional assignment)
#
# Welcome to your first assignment. This exercise gives you a brief introduction to Python. Even if you've used Python before, this will help familiarize you with functions we'll need.
#
# **Instructions:**
# - You will be using Python 3.
# - Av... | 34.678042 | 401 | 0.624567 |
98888d103eb19b7f93c53982816e8cbee15511db | 3,286 | py | Python | pahelix/datasets/tox21_dataset.py | agave233/PaddleHelix | e5578f72c2a203a27d9df7da111f1ced826c1429 | [
"Apache-2.0"
] | 454 | 2020-11-21T01:02:45.000Z | 2022-03-29T12:53:40.000Z | pahelix/datasets/tox21_dataset.py | chupvl/PaddleHelix | 6e082f89b8090c3c360593d40a08bffc884165dd | [
"Apache-2.0"
] | 161 | 2020-12-12T06:35:54.000Z | 2022-03-27T11:31:13.000Z | pahelix/datasets/tox21_dataset.py | chupvl/PaddleHelix | 6e082f89b8090c3c360593d40a08bffc884165dd | [
"Apache-2.0"
] | 108 | 2020-12-07T09:01:10.000Z | 2022-03-31T14:42:29.000Z | #!/usr/bin/python
#-*-coding:utf-8-*-
# Copyright (c) 2020 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/... | 32.534653 | 324 | 0.681376 |
2bd606dc12c9defe17cb5c23f217d084793f3d60 | 10,963 | py | Python | dist/Basilisk/fswAlgorithms/cssComm/cssComm.py | ian-cooke/basilisk_mag | a8b1e37c31c1287549d6fd4d71fcaa35b6fc3f14 | [
"0BSD"
] | null | null | null | dist/Basilisk/fswAlgorithms/cssComm/cssComm.py | ian-cooke/basilisk_mag | a8b1e37c31c1287549d6fd4d71fcaa35b6fc3f14 | [
"0BSD"
] | 1 | 2019-03-13T20:52:22.000Z | 2019-03-13T20:52:22.000Z | dist/Basilisk/fswAlgorithms/cssComm/cssComm.py | ian-cooke/basilisk_mag | a8b1e37c31c1287549d6fd4d71fcaa35b6fc3f14 | [
"0BSD"
] | null | null | null | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.12
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info as _swig_python_version_info
if _swig_python_version_info >= (2, 7, 0):
def swig_im... | 38.875887 | 125 | 0.743957 |
c5845f3091cd46436e1a99cacab7ccc6a73be94a | 251 | py | Python | mpxapi/storefront/ledger_entry.py | colde/mpxapi | cda7d06c5c709ba7d652c59156ab7bb213bc2de1 | [
"MIT"
] | 3 | 2018-01-23T10:27:41.000Z | 2019-03-29T21:12:25.000Z | mpxapi/storefront/ledger_entry.py | colde/mpxapi | cda7d06c5c709ba7d652c59156ab7bb213bc2de1 | [
"MIT"
] | null | null | null | mpxapi/storefront/ledger_entry.py | colde/mpxapi | cda7d06c5c709ba7d652c59156ab7bb213bc2de1 | [
"MIT"
] | 3 | 2018-06-27T14:05:49.000Z | 2019-09-16T11:28:37.000Z | from mpxapi.api_base import ApiBase
class LedgerEntry(ApiBase):
def __init__(self, api):
ApiBase.__init__(self, api)
self.schema = "3.4.0"
self.service = "Admin Storefront Service"
self.path = "/data/LedgerEntry" | 25.1 | 49 | 0.649402 |
7601eb1db88010cb40b3d6651d6dd420d5b36ad5 | 1,128 | py | Python | b00_clean/a00_clean_01_tumor.py | Hoa-Lab/audiogram | 91fe29ebb1d460ef97bbb8014bf529ff443a134c | [
"MIT"
] | null | null | null | b00_clean/a00_clean_01_tumor.py | Hoa-Lab/audiogram | 91fe29ebb1d460ef97bbb8014bf529ff443a134c | [
"MIT"
] | null | null | null | b00_clean/a00_clean_01_tumor.py | Hoa-Lab/audiogram | 91fe29ebb1d460ef97bbb8014bf529ff443a134c | [
"MIT"
] | null | null | null | from pathlib import Path
import pandas as pd
#------------------------------------------------------
fd_out='./out/a00_clean_01_tumor'
f_in='./out/a00_clean_00_load/tumor.csv'
l_cat=['None', 'IC', 'Small', 'Medium', 'Large']
#------------------------------------------------------
Path(fd_out).mkdir(exist_ok=True, par... | 35.25 | 78 | 0.524823 |
d7661c487f68a9ebb95d933b0398fecad7082253 | 23,836 | py | Python | candejar/candeobj/candeobj.py | Ricyteach/candejar | a83a83a377f7d757568e373f2ff6dcb4e1661e70 | [
"MIT"
] | null | null | null | candejar/candeobj/candeobj.py | Ricyteach/candejar | a83a83a377f7d757568e373f2ff6dcb4e1661e70 | [
"MIT"
] | null | null | null | candejar/candeobj/candeobj.py | Ricyteach/candejar | a83a83a377f7d757568e373f2ff6dcb4e1661e70 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""The cande type objects expected by the module."""
from __future__ import annotations
import operator
from dataclasses import dataclass, InitVar, field
from pathlib import Path
from typing import Union, Type, Optional, Iterable, ClassVar, MutableMapping, Sequence, TypeVar, NamedTuple, Dict,... | 47.013807 | 143 | 0.638949 |
effc7af117cdf1cad32548a7f1c9a06dc2bc00c5 | 17,180 | py | Python | pytorch_lightning/trainer/properties.py | jbuckman/pytorch-lightning | cc74fb717a7127fecd4dbb9c743ba28b40de7f64 | [
"Apache-2.0"
] | null | null | null | pytorch_lightning/trainer/properties.py | jbuckman/pytorch-lightning | cc74fb717a7127fecd4dbb9c743ba28b40de7f64 | [
"Apache-2.0"
] | 1 | 2021-03-26T02:16:20.000Z | 2021-03-26T02:16:20.000Z | pytorch_lightning/trainer/properties.py | jbuckman/pytorch-lightning | cc74fb717a7127fecd4dbb9c743ba28b40de7f64 | [
"Apache-2.0"
] | null | null | null | # Copyright The PyTorch Lightning team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 34.989817 | 115 | 0.692782 |
1498e54973754c079715934823304028dc5dac2a | 1,357 | py | Python | openstack_dashboard/dashboards/project/firewalls/panel.py | Tehsmash/horizon | 8ffade099a3a437509dcdcf25d5b054e5c188b61 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/project/firewalls/panel.py | Tehsmash/horizon | 8ffade099a3a437509dcdcf25d5b054e5c188b61 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/project/firewalls/panel.py | Tehsmash/horizon | 8ffade099a3a437509dcdcf25d5b054e5c188b61 | [
"Apache-2.0"
] | null | null | null | # 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 writing, software
# distributed under t... | 33.925 | 75 | 0.683125 |
179d5bc4f8f117bae33b0573e93f11866f8da476 | 86 | py | Python | apps/auth/tests.py | devdiv/django-admin-lte | fe90d6cbb78039dd51d28ad76ea58c396cfa89a8 | [
"MIT"
] | null | null | null | apps/auth/tests.py | devdiv/django-admin-lte | fe90d6cbb78039dd51d28ad76ea58c396cfa89a8 | [
"MIT"
] | 6 | 2021-04-08T21:53:32.000Z | 2022-02-10T09:42:06.000Z | apps/auth/tests.py | devdiv/django-admin-lte | fe90d6cbb78039dd51d28ad76ea58c396cfa89a8 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
from django.test import TestCase
# Create your tests here.
| 17.2 | 32 | 0.686047 |
334ec00f3aa05899419696b9785ff5b47be99cb1 | 1,064 | py | Python | tests/test_utils_spider.py | h4ck3rm1k3/scrapy | 59dcdbe84769c9d204f552a2b545b1e096a2d42c | [
"BSD-3-Clause"
] | 26 | 2015-02-07T17:35:26.000Z | 2020-04-27T21:11:00.000Z | tests/test_utils_spider.py | h4ck3rm1k3/scrapy | 59dcdbe84769c9d204f552a2b545b1e096a2d42c | [
"BSD-3-Clause"
] | 2 | 2021-09-20T19:54:29.000Z | 2022-03-22T21:47:39.000Z | tests/test_utils_spider.py | h4ck3rm1k3/scrapy | 59dcdbe84769c9d204f552a2b545b1e096a2d42c | [
"BSD-3-Clause"
] | 9 | 2015-09-21T08:17:20.000Z | 2021-02-07T02:31:36.000Z | import unittest
from scrapy.http import Request
from scrapy.item import BaseItem
from scrapy.utils.spider import iterate_spider_output, iter_spider_classes
from scrapy.contrib.spiders import CrawlSpider
class MyBaseSpider(CrawlSpider):
pass # abstract spider
class MySpider1(MyBaseSpider):
name = 'myspider1'... | 28 | 75 | 0.712406 |
dd8d151f3f23f3fcec84efd950fa22ac35cbc210 | 5,303 | py | Python | tests/test_widget.py | mkouhia/dearpygui_map | 8db86e6917b88c118aff94a22e383ef517c40620 | [
"MIT"
] | null | null | null | tests/test_widget.py | mkouhia/dearpygui_map | 8db86e6917b88c118aff94a22e383ef517c40620 | [
"MIT"
] | 21 | 2022-02-21T08:31:03.000Z | 2022-03-08T19:27:33.000Z | tests/test_widget.py | mkouhia/dearpygui_map | 8db86e6917b88c118aff94a22e383ef517c40620 | [
"MIT"
] | null | null | null | """Map widget tests"""
import itertools
import pytest
from pytest_mock import MockerFixture
from dearpygui_map.geo import Coordinate
from dearpygui_map.tile_source import OpenStreetMap, TileServer, TileSpec
from dearpygui_map.widget import MapWidget, TileManager
@pytest.fixture(name="map_widget")
def fx_map_widget... | 32.139394 | 82 | 0.734867 |
34761e254f2cd259d2e56d742bfbf5bd6555b33d | 33 | py | Python | twads/__init__.py | jdgillespie91/twitter-ads | 9485fd2a196e47b012bb1209634a76b89732dfca | [
"MIT"
] | null | null | null | twads/__init__.py | jdgillespie91/twitter-ads | 9485fd2a196e47b012bb1209634a76b89732dfca | [
"MIT"
] | null | null | null | twads/__init__.py | jdgillespie91/twitter-ads | 9485fd2a196e47b012bb1209634a76b89732dfca | [
"MIT"
] | null | null | null | from .main import Client # noqa
| 16.5 | 32 | 0.727273 |
00b3b5a659cbcb0db79374be6e462c05bc51feb3 | 8,210 | py | Python | benchmarks/f3_wrong_hints/scaling_nonlinear_software/10-19_2.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 3 | 2021-04-23T23:29:26.000Z | 2022-03-23T10:00:30.000Z | benchmarks/f3_wrong_hints/scaling_nonlinear_software/10-19_2.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | null | null | null | benchmarks/f3_wrong_hints/scaling_nonlinear_software/10-19_2.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 1 | 2021-11-17T22:02:56.000Z | 2021-11-17T22:02:56.000Z | from typing import FrozenSet, Tuple
import pysmt.typing as types
from pysmt.environment import Environment as PysmtEnv
from pysmt.fnode import FNode
from utils import symb_to_next
from hint import Hint, Location
def transition_system(env: PysmtEnv) -> Tuple[FrozenSet[FNode], FNode, FNode,
... | 34.64135 | 81 | 0.535932 |
7c03c556d028937e68decab3f6e1aaadbb56fea7 | 11,587 | py | Python | pybind/slxos/v16r_1_00b/telnet_sa/telnet/server/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v16r_1_00b/telnet_sa/telnet/server/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v16r_1_00b/telnet_sa/telnet/server/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | 1 | 2021-11-05T22:15:42.000Z | 2021-11-05T22:15:42.000Z |
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from d... | 59.420513 | 482 | 0.730474 |
68ed45199378cf1dc7992ca686256c886feb45ec | 2,135 | py | Python | byol.py | HealthML/ContIG | 641d76e0e9a5878e456f9729f2b0a81e51764b16 | [
"Apache-2.0"
] | 10 | 2021-12-02T20:08:04.000Z | 2022-03-30T15:06:54.000Z | byol.py | HealthML/ContIG | 641d76e0e9a5878e456f9729f2b0a81e51764b16 | [
"Apache-2.0"
] | null | null | null | byol.py | HealthML/ContIG | 641d76e0e9a5878e456f9729f2b0a81e51764b16 | [
"Apache-2.0"
] | null | null | null | import os
import lightly.loss as loss
import lightly.models as models
import pytorch_lightning as pl
import torch
import torchvision
from PIL import ImageFile
from data.data_ukb import get_imaging_pretraining_data
torch.multiprocessing.set_sharing_strategy("file_system")
os.environ["CUDA_VISIBLE_DEVICES"] = "2"
Imag... | 24.825581 | 69 | 0.677752 |
20f082f9ae7264910b0fd6f980b1829f1d90190d | 2,669 | py | Python | django_q/queues.py | Balletie/django-q | 03abbc960f8c35d0c4206c60ad01f08085539609 | [
"MIT"
] | null | null | null | django_q/queues.py | Balletie/django-q | 03abbc960f8c35d0c4206c60ad01f08085539609 | [
"MIT"
] | null | null | null | django_q/queues.py | Balletie/django-q | 03abbc960f8c35d0c4206c60ad01f08085539609 | [
"MIT"
] | 2 | 2020-11-10T01:14:24.000Z | 2021-06-11T12:50:19.000Z | """
The code is derived from https://github.com/althonos/pronto/commit/3384010dfb4fc7c66a219f59276adef3288a886b
"""
import sys
import multiprocessing
import multiprocessing.queues
class SharedCounter(object):
""" A synchronized shared counter.
The locking done by multiprocessing.Value ensures that only a si... | 35.586667 | 107 | 0.680405 |
21fbd8781e0b6a7f9b1d1d97a00d92a32e2c81b8 | 3,774 | py | Python | run_tests.py | johanneswilm/rapidsms | d10f872496da7a5516aa6bcdf0552fc2ca0aca57 | [
"BSD-3-Clause"
] | 2 | 2019-04-04T20:48:52.000Z | 2019-11-13T09:09:07.000Z | run_tests.py | johanneswilm/rapidsms | d10f872496da7a5516aa6bcdf0552fc2ca0aca57 | [
"BSD-3-Clause"
] | null | null | null | run_tests.py | johanneswilm/rapidsms | d10f872496da7a5516aa6bcdf0552fc2ca0aca57 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
import os
import sys
from coverage import coverage
from django import VERSION
from django.conf import settings
from django.test.utils import get_runner
def run_tests(options, args, ci=False):
TestRunner = get_runner(settings)
test_runner = TestRunner(verbo... | 40.148936 | 100 | 0.597509 |
1021dd411926064eccef44c86364b869a66cfb73 | 372 | py | Python | integration/test_skipped/test_reporter.py | avilcheslopez/geopm | 35ad0af3f17f42baa009c97ed45eca24333daf33 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | integration/test_skipped/test_reporter.py | avilcheslopez/geopm | 35ad0af3f17f42baa009c97ed45eca24333daf33 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | integration/test_skipped/test_reporter.py | avilcheslopez/geopm | 35ad0af3f17f42baa009c97ed45eca24333daf33 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2015 - 2022, Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause
#
import geopmpy.reporter
import geopmdpy.pio
import time
geopmpy.reporter.init()
geopmdpy.pio.read_batch()
geopmpy.reporter.update()
time.sleep(1)
geopmdpy.pio.read_batch()
geopmpy.reporter.update()
report = geopmpy.reporter.gen... | 21.882353 | 66 | 0.77957 |
dc3c2e0189e9a83d466d1a2956c2f8857d7c72b4 | 460 | py | Python | projetos/login/venv/Scripts/easy_install-3.7-script.py | Kaioguilherme1/PythonCodigos | 76d078c09f825d5fc81d21ba9cc14793a546847c | [
"MIT"
] | 2 | 2020-05-21T16:02:43.000Z | 2020-05-23T17:51:55.000Z | projetos/login/venv/Scripts/easy_install-3.7-script.py | Kaioguilherme1/EstudoDeLinguagens | f2acc5fc74178bd33d503de19f817c69959c1690 | [
"MIT"
] | null | null | null | projetos/login/venv/Scripts/easy_install-3.7-script.py | Kaioguilherme1/EstudoDeLinguagens | f2acc5fc74178bd33d503de19f817c69959c1690 | [
"MIT"
] | null | null | null | #!E:\desenvolvimento\python\projetos\login\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==39.1.0','console_scripts','easy_install-3.7'
__requires__ = 'setuptools==39.1.0'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.p... | 35.384615 | 87 | 0.695652 |
d53186211a403db0a998f33e79f8f864dc9c4d60 | 2,852 | py | Python | src/streamlink/plugins/pandatv.py | nxkbd/streamlink | 0ba7767c024a6d6086d570e342680dc40c05a57b | [
"BSD-2-Clause"
] | null | null | null | src/streamlink/plugins/pandatv.py | nxkbd/streamlink | 0ba7767c024a6d6086d570e342680dc40c05a57b | [
"BSD-2-Clause"
] | null | null | null | src/streamlink/plugins/pandatv.py | nxkbd/streamlink | 0ba7767c024a6d6086d570e342680dc40c05a57b | [
"BSD-2-Clause"
] | null | null | null | """Plugin for panda.tv by Fat Deer"""
import re
import types
from streamlink.plugin import Plugin
from streamlink.plugin.api import http, validate
from streamlink.stream import HTTPStream
ROOM_API = "http://www.panda.tv/api_room?roomid="
SD_URL_PATTERN = "http://pl{0}.live.panda.tv/live_panda/{1}.flv"
HD_URL_PATTERN ... | 31.688889 | 94 | 0.557854 |
673f309f18c32866bd17ed4d92cc6c72b6301b81 | 1,066 | py | Python | venv/Lib/site-packages/numpy/core/tests/test_machar.py | EkremBayar/bayar | aad1a32044da671d0b4f11908416044753360b39 | [
"MIT"
] | 20,453 | 2015-01-02T09:00:47.000Z | 2022-03-31T23:35:56.000Z | venv/Lib/site-packages/numpy/core/tests/test_machar.py | EkremBayar/bayar | aad1a32044da671d0b4f11908416044753360b39 | [
"MIT"
] | 14,862 | 2015-01-01T01:28:34.000Z | 2022-03-31T23:48:52.000Z | bot/lib/python3.7/site-packages/numpy/core/tests/test_machar.py | carlosrh18/DavinciBot | d73a6b7f68d7bab25d134d3f85c6b63a86c206c5 | [
"MIT"
] | 9,362 | 2015-01-01T15:49:43.000Z | 2022-03-31T21:26:51.000Z | """
Test machar. Given recent changes to hardcode type data, we might want to get
rid of both MachAr and this test at some point.
"""
from numpy.core.machar import MachAr
import numpy.core.numerictypes as ntypes
from numpy import errstate, array
class TestMachAr:
def _run_machar_highprec(self):
# Instant... | 34.387097 | 78 | 0.644465 |
8ba4dc98bfa22dac098053e7060c797cff54b7cb | 3,474 | py | Python | app/api/user/user_utilities/userfunctions.py | duckbytes/bloodbike-api | c6867160dd899a90aa7315125ac04e4cb71e7b79 | [
"Apache-2.0"
] | 2 | 2021-06-27T09:01:26.000Z | 2021-07-04T22:07:42.000Z | app/api/user/user_utilities/userfunctions.py | duckbytes/bloodbike-api | c6867160dd899a90aa7315125ac04e4cb71e7b79 | [
"Apache-2.0"
] | 1 | 2021-07-20T21:10:19.000Z | 2021-07-20T21:10:19.000Z | app/api/user/user_utilities/userfunctions.py | duckbytes/bloodbike-api | c6867160dd899a90aa7315125ac04e4cb71e7b79 | [
"Apache-2.0"
] | null | null | null | import functools
import logging
import os
import random
import string
from PIL import Image
from flask_praetorian import utilities
from app import models
from app.api.functions.errors import forbidden_error
from app import cloud_stores
from app.exceptions import ObjectNotFoundError, InvalidFileUploadError
from app imp... | 34.74 | 119 | 0.739781 |
b9a6a040d763072f74396129a0ece4a432d67402 | 3,463 | py | Python | setup.py | HeadspaceMeditation/pre-commit-hooks | 8971d2fa75dbeea40b714987a499e24082242b92 | [
"MIT"
] | null | null | null | setup.py | HeadspaceMeditation/pre-commit-hooks | 8971d2fa75dbeea40b714987a499e24082242b92 | [
"MIT"
] | null | null | null | setup.py | HeadspaceMeditation/pre-commit-hooks | 8971d2fa75dbeea40b714987a499e24082242b92 | [
"MIT"
] | null | null | null | from setuptools import find_packages
from setuptools import setup
setup(
name='pre_commit_hooks',
description='Some out-of-the-box hooks for pre-commit.',
url='https://github.com/pre-commit/pre-commit-hooks',
version='1.2.3',
author='Anthony Sottile',
author_email='asottile@umich.edu',
c... | 51.686567 | 102 | 0.682934 |
08c7627a94aa06e0d214f345e01df37506b3f857 | 8,908 | py | Python | src/config/device-manager/test/test_dm_bgp.py | Dmitry-Eremeev/contrail-controller | 1238bcff697981662225ec5a15bc4d3d2237ae93 | [
"Apache-2.0"
] | null | null | null | src/config/device-manager/test/test_dm_bgp.py | Dmitry-Eremeev/contrail-controller | 1238bcff697981662225ec5a15bc4d3d2237ae93 | [
"Apache-2.0"
] | null | null | null | src/config/device-manager/test/test_dm_bgp.py | Dmitry-Eremeev/contrail-controller | 1238bcff697981662225ec5a15bc4d3d2237ae93 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
import sys
import gevent
import itertools
from time import sleep
from cfgm_common.tests.test_common import retries
from cfgm_common.tests.test_common import retry_exc_handler
from vnc_api.vnc_api import *
from device_api.juniper_common_xsd import *
fr... | 42.419048 | 121 | 0.660081 |
93124c0b32fc7b9b7dd9194d2b1f666efdd93b0d | 1,900 | py | Python | Lib/site-packages/skimage/filters/__init__.py | caiyongji/py36-tf2.0rc | c5b4b364ba14214534228570e58ef96b1a8bb6dc | [
"CNRI-Python-GPL-Compatible"
] | 1 | 2021-11-05T09:55:14.000Z | 2021-11-05T09:55:14.000Z | Lib/site-packages/skimage/filters/__init__.py | caiyongji/Anaconda-py36.5-tensorflow-built-env | f4eb40b5ca3f49dfc929ff3ad2b4bb877e9663e2 | [
"PSF-2.0"
] | 26 | 2020-03-24T18:07:06.000Z | 2022-03-12T00:12:27.000Z | Lib/site-packages/skimage/filters/__init__.py | caiyongji/Anaconda-py36.5-tensorflow-built-env | f4eb40b5ca3f49dfc929ff3ad2b4bb877e9663e2 | [
"PSF-2.0"
] | null | null | null | from .lpi_filter import inverse, wiener, LPIFilter2D
from ._gaussian import gaussian
from .edges import (sobel, sobel_h, sobel_v,
scharr, scharr_h, scharr_v,
prewitt, prewitt_h, prewitt_v,
roberts, roberts_pos_diag, roberts_neg_diag,
laplac... | 31.666667 | 78 | 0.535789 |
99efab4b3b67cd77cc620b934b743f8696cf481e | 2,548 | py | Python | syntropy_sdk/models/any_of_agent_message_payload.py | SyntropyNet/syntropy-python-sdk | 27b7756b136f83886fd2a6e342fa4d4073779ff7 | [
"MIT"
] | 1 | 2020-12-17T17:30:12.000Z | 2020-12-17T17:30:12.000Z | syntropy_sdk/models/any_of_agent_message_payload.py | SyntropyNet/syntropy-python-sdk | 27b7756b136f83886fd2a6e342fa4d4073779ff7 | [
"MIT"
] | null | null | null | syntropy_sdk/models/any_of_agent_message_payload.py | SyntropyNet/syntropy-python-sdk | 27b7756b136f83886fd2a6e342fa4d4073779ff7 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
syntropy-controller
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 0.1.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
imp... | 29.287356 | 119 | 0.551413 |
3f90a9f5923de2e4a9af6344131c0e9775a55d95 | 22,997 | py | Python | tests/test_version.py | bfloch/distlib | cb6c41b927ea4f3072c4a43b0544b7f6b051728b | [
"PSF-2.0"
] | null | null | null | tests/test_version.py | bfloch/distlib | cb6c41b927ea4f3072c4a43b0544b7f6b051728b | [
"PSF-2.0"
] | null | null | null | tests/test_version.py | bfloch/distlib | cb6c41b927ea4f3072c4a43b0544b7f6b051728b | [
"PSF-2.0"
] | null | null | null | #
# Copyright (C) 2012-2013 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""Tests for distlib.version."""
import doctest
from compat import unittest
from support import DistlibTestCase
from distlib.version import (NormalizedVersion as NV, NormalizedMatcher as NM,
... | 35.217458 | 88 | 0.478976 |
34cbf005512197b4f487d1bcdd8d67c4517d0904 | 6,504 | py | Python | CNNReg_MedPhy/register2D.py | junyuchen245/Fully_Unsupervised_CNN_Registration | 5bb2f4ff8cee70c5be414e9c9abef040a930c94e | [
"MIT"
] | 21 | 2019-12-22T08:24:15.000Z | 2021-11-06T07:19:06.000Z | CNNReg_MedPhy/register2D.py | junyuchen245/Fully_Unsupervised_CNN_Registration | 5bb2f4ff8cee70c5be414e9c9abef040a930c94e | [
"MIT"
] | 1 | 2021-03-14T01:43:55.000Z | 2021-04-13T15:20:49.000Z | CNNReg_MedPhy/register2D.py | junyuchen245/Fully_Unsupervised_CNN_Registration | 5bb2f4ff8cee70c5be414e9c9abef040a930c94e | [
"MIT"
] | 9 | 2020-04-22T02:38:34.000Z | 2021-09-17T11:43:14.000Z | from keras import backend as K
import losses, nets
import sys, os, nrrd, utils
from keras.optimizers import Adam
import matplotlib.pyplot as plt
import tensorflow as tf
from keras.models import Model, load_model
import numpy as np
from skimage.transform import rescale, resize
import imageio
from scipy.ndimage import ga... | 34.231579 | 173 | 0.650369 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.