hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
915c778bc9b507d19314639cf1b04665b9c4a856 | 33 | py | Python | utils/multilevel_label.py | gujingxiao/AliProducts_Recognition_Competition_Pytorch | f601aefc5ed5e35ff92111cc8fffdc71606eb82f | [
"Apache-2.0"
] | 2 | 2021-04-23T09:26:09.000Z | 2021-05-15T06:47:51.000Z | utils/multilevel_label.py | gujingxiao/AliProducts_Recognition_Competition_Pytorch | f601aefc5ed5e35ff92111cc8fffdc71606eb82f | [
"Apache-2.0"
] | 1 | 2020-08-25T01:29:51.000Z | 2020-08-25T01:29:51.000Z | utils/multilevel_label.py | gujingxiao/AliProducts_Recognition_Competition_Pytorch | f601aefc5ed5e35ff92111cc8fffdc71606eb82f | [
"Apache-2.0"
] | 2 | 2020-09-24T09:51:00.000Z | 2021-05-03T14:39:47.000Z | # Level 1
# Level 2
# Level 3 | 4.714286 | 9 | 0.545455 |
915cb73b22098fc03f3dba35b54387c92a35351a | 4,365 | py | Python | openapi_client/models/prediction_resource_relationships_route.py | hypostulate/mbta-api-client | f18903b6269c523c733a31574ff4579349fed3f8 | [
"MIT"
] | null | null | null | openapi_client/models/prediction_resource_relationships_route.py | hypostulate/mbta-api-client | f18903b6269c523c733a31574ff4579349fed3f8 | [
"MIT"
] | null | null | null | openapi_client/models/prediction_resource_relationships_route.py | hypostulate/mbta-api-client | f18903b6269c523c733a31574ff4579349fed3f8 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
MBTA
MBTA service API. https://www.mbta.com Source code: https://github.com/mbta/api # noqa: E501
The version of the OpenAPI document: 3.0
Contact: developer@mbta.com
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from op... | 29.493243 | 97 | 0.610309 |
915cbbef652f1336900053ffd04a3d56bd6c18bc | 4,732 | py | Python | tests/app/test_schemas.py | cds-snc/notifier-api | 90b385ec49efbaee7e607516fc7d9f08991af813 | [
"MIT"
] | 41 | 2019-11-28T16:58:41.000Z | 2022-01-28T21:11:16.000Z | tests/app/test_schemas.py | cds-snc/notification-api | b1c1064f291eb860b494c3fa65ac256ad70bf47c | [
"MIT"
] | 1,083 | 2019-07-08T12:57:24.000Z | 2022-03-08T18:53:40.000Z | tests/app/test_schemas.py | cds-snc/notifier-api | 90b385ec49efbaee7e607516fc7d9f08991af813 | [
"MIT"
] | 9 | 2020-01-24T19:56:43.000Z | 2022-01-27T21:36:53.000Z | import pytest
from marshmallow import ValidationError
from sqlalchemy import desc
from app.dao.provider_details_dao import dao_update_provider_details
from app.models import ProviderDetailsHistory
from tests.app.db import create_api_key
def test_job_schema_doesnt_return_notifications(sample_notification_with_job):
... | 32.410959 | 98 | 0.749577 |
915cd2a111621acf9b36542405f169d6bd7dac16 | 4,503 | py | Python | volcasample/cli.py | actionless/volcasample | 17f5a87592d5b68b55512bf473df3d9ce48be3b4 | [
"BSD-3-Clause"
] | 7 | 2017-08-02T09:46:59.000Z | 2021-12-18T20:09:56.000Z | volcasample/cli.py | actionless/volcasample | 17f5a87592d5b68b55512bf473df3d9ce48be3b4 | [
"BSD-3-Clause"
] | null | null | null | volcasample/cli.py | actionless/volcasample | 17f5a87592d5b68b55512bf473df3d9ce48be3b4 | [
"BSD-3-Clause"
] | 1 | 2021-12-18T21:32:03.000Z | 2021-12-18T21:32:03.000Z | #!/usr/bin/env python
# encoding: UTF-8
# This file is part of volcasample.
#
# volcasample 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 v... | 29.821192 | 72 | 0.638463 |
915ce4b4a959b7e7f5d85bf6e690433b76d46a8f | 4,039 | py | Python | src/main/python/query_builder/create.py | meowpunch/bobsim-research | 4411ac6eaf5b760611f689b0a9e290546e2f5435 | [
"MIT"
] | 2 | 2020-03-01T17:42:44.000Z | 2020-03-09T06:13:34.000Z | src/main/python/query_builder/create.py | meowpunch/bobsim-research | 4411ac6eaf5b760611f689b0a9e290546e2f5435 | [
"MIT"
] | 2 | 2020-04-01T16:48:06.000Z | 2020-04-04T11:04:10.000Z | src/main/python/query_builder/create.py | meowpunch/bobsim-research | 4411ac6eaf5b760611f689b0a9e290546e2f5435 | [
"MIT"
] | null | null | null | # create.py
# Create table using UI for non-programmer
import sys
import logging
#from src.config.rds_config import *
import pymysql
# rds settings
rds_host = "production-bobsim-aurora-instance-1.cm9kakdihdlv.ap-northeast-2.rds.amazonaws.com"
name = db_username
password = db_password
database_name = db_name
logg... | 26.227273 | 118 | 0.622679 |
915d14bfb836f77d8a9672527b3362c420e4b859 | 6,072 | py | Python | filterdesigner/FIRDesign/_fir1.py | Yuki-F-HCU/filterdesigner | bb735d507da0338b2925f84e54df091ce1c32f95 | [
"BSD-3-Clause"
] | 2 | 2020-09-15T07:22:35.000Z | 2021-10-17T08:50:17.000Z | filterdesigner/FIRDesign/_fir1.py | Yuki-F-HCU/filterdesigner | bb735d507da0338b2925f84e54df091ce1c32f95 | [
"BSD-3-Clause"
] | null | null | null | filterdesigner/FIRDesign/_fir1.py | Yuki-F-HCU/filterdesigner | bb735d507da0338b2925f84e54df091ce1c32f95 | [
"BSD-3-Clause"
] | 2 | 2020-09-15T07:23:24.000Z | 2021-05-03T10:03:32.000Z | import numpy as np
import scipy.signal as signal
import scipy.interpolate as ip
from typing import List, Tuple
def fir1(n : int, Wn, ftype : str ='default', window='hamming', scaleopt : bool =True) -> Tuple:
"""
FIR filter design using the window method.
This function computes the coefficient... | 46.351145 | 116 | 0.559783 |
915dad8bed2f243ca1e40fb75e1d248a05121fdf | 321 | py | Python | dfs/SumofSubsequenceWidth.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | dfs/SumofSubsequenceWidth.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | dfs/SumofSubsequenceWidth.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | class Solution(object):
def sumSubseqWidths(self, A):
s = diff = 0
k = 1 << max(len(A)-2,0)
A.sort()
for i in range(len(A)):
diff += A[~i] - A[i]
s += k * diff
k >>= 1
return s % (10 ** 9 + 7)
a =Solution()
a.sumSubseqWidths([2,1,3]... | 21.4 | 33 | 0.417445 |
915db6b10acc8e1c3fd6d857f5a503f9052db9f3 | 210 | py | Python | services/src/common_utils_svc/__init__.py | pjw960408/binance-trader-c1 | dae91cc721591257334ab1ddcf3a4f6d86644435 | [
"MIT"
] | null | null | null | services/src/common_utils_svc/__init__.py | pjw960408/binance-trader-c1 | dae91cc721591257334ab1ddcf3a4f6d86644435 | [
"MIT"
] | null | null | null | services/src/common_utils_svc/__init__.py | pjw960408/binance-trader-c1 | dae91cc721591257334ab1ddcf3a4f6d86644435 | [
"MIT"
] | 1 | 2021-05-06T14:14:56.000Z | 2021-05-06T14:14:56.000Z | from .common_utils_svc import (
Position,
make_dirs,
load_text,
load_json,
to_parquet,
get_filename_by_path,
to_abs_path,
initialize_main_logger,
initialize_trader_logger,
)
| 17.5 | 31 | 0.704762 |
915de0a17fac6e6fddf1ed23afb9723b575fbe37 | 1,981 | py | Python | src/ggrc/migrations/versions/20160113152055_1abb0a2e8ca0_rename_control_assessments.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2018-03-30T11:28:48.000Z | 2018-03-30T11:28:48.000Z | src/ggrc/migrations/versions/20160113152055_1abb0a2e8ca0_rename_control_assessments.py | trevordonnelly/ggrc-core | 499cf0d3cce70737b080991b12c203ec22015cea | [
"ECL-2.0",
"Apache-2.0"
] | 10 | 2018-07-06T00:04:23.000Z | 2021-02-26T21:13:20.000Z | src/ggrc/migrations/versions/20160113152055_1abb0a2e8ca0_rename_control_assessments.py | zidarsk8/ggrc-core | 2509c989eddf434249d3bef50c21e08dbf56c1a4 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2017-11-11T22:16:56.000Z | 2017-11-11T22:16:56.000Z | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Rename control_assessments to assessments
Revision ID: 1abb0a2e8ca0
Revises: 4003827b3d48
Create Date: 2016-01-13 15:20:55.866368
"""
from alembic import op
import sqlalchemy as sa
# revision identifi... | 33.576271 | 78 | 0.688036 |
915de669cc97711f8d8d796021e102cea61e4f90 | 7,327 | py | Python | sktime/classification/distance_based/tests/test_shape_dtw.py | brettkoonce/sktime | 6336247bad0dac8692aa4b911c267f401dea4163 | [
"BSD-3-Clause"
] | 2 | 2020-10-05T12:17:41.000Z | 2020-10-19T08:57:50.000Z | sktime/classification/distance_based/tests/test_shape_dtw.py | brettkoonce/sktime | 6336247bad0dac8692aa4b911c267f401dea4163 | [
"BSD-3-Clause"
] | 2 | 2020-04-20T12:26:42.000Z | 2020-04-22T17:09:14.000Z | sktime/classification/distance_based/tests/test_shape_dtw.py | brettkoonce/sktime | 6336247bad0dac8692aa4b911c267f401dea4163 | [
"BSD-3-Clause"
] | 1 | 2022-02-14T18:19:01.000Z | 2022-02-14T18:19:01.000Z | import numpy as np
import pytest
from sktime.classification.distance_based._shape_dtw import ShapeDTW
from sktime.utils._testing import generate_df_from_array
from sktime.transformers.series_as_features.dictionary_based._paa \
import PAA
from sktime.transformers.series_as_features.dwt import DWTTransformer
from s... | 42.109195 | 78 | 0.684455 |
915e19e63818d7eed9e238f594f09570a6888486 | 5,482 | py | Python | exp4/exp4d.py | Haunter17/MIR_SU17 | 0eaefb8cab78ca896c1ed0074892c296110eb161 | [
"MIT"
] | null | null | null | exp4/exp4d.py | Haunter17/MIR_SU17 | 0eaefb8cab78ca896c1ed0074892c296110eb161 | [
"MIT"
] | 5 | 2017-05-22T20:32:07.000Z | 2017-06-02T21:06:23.000Z | exp4/exp4d.py | Haunter17/MIR_SU17 | 0eaefb8cab78ca896c1ed0074892c296110eb161 | [
"MIT"
] | null | null | null | import numpy as np
import tensorflow as tf
import h5py
import time
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import sys
# Functions for initializing neural nets parameters
def init_weight_variable(shape):
initial = tf.truncated_normal(shape, stddev=0.1, dtype=tf.float32)
return tf.Varia... | 35.141026 | 102 | 0.664538 |
915e60e02cb4c935c02f6743059c9f10c8a9cefa | 3,575 | py | Python | website_tool.py | xorpd/static_weber | 203e8a8b41ebaebd856405fa66a09f825bfb8c40 | [
"MIT"
] | 1 | 2015-04-01T03:33:00.000Z | 2015-04-01T03:33:00.000Z | website_tool.py | xorpd/static_weber | 203e8a8b41ebaebd856405fa66a09f825bfb8c40 | [
"MIT"
] | null | null | null | website_tool.py | xorpd/static_weber | 203e8a8b41ebaebd856405fa66a09f825bfb8c40 | [
"MIT"
] | 1 | 2020-07-09T14:11:11.000Z | 2020-07-09T14:11:11.000Z | """
Thu Oct 23 11:38:56 IDT 2014
Automation script for building and deploying the website,
by xorpd.
Should be later ported to fabric, when fabric supports python3.
"""
import os
import shutil
import sys
import inspect
OUTPUT_DIR = "./output"
class ExceptDeploy(Exception):
pass
class ExceptBuild(Exception):
... | 24.155405 | 75 | 0.616503 |
915e62648104c6262a136ee27eb372c6a130cf97 | 19,788 | py | Python | model_utils/model.py | yeyupiaoling/PaddlePaddle-DeepSpeech | 813ca16470896f65959d34cb379c4c99f5911158 | [
"Apache-2.0"
] | 314 | 2020-05-28T09:44:45.000Z | 2022-03-31T08:48:59.000Z | model_utils/model.py | yeyupiaoling/PaddlePaddle-DeepSpeech | 813ca16470896f65959d34cb379c4c99f5911158 | [
"Apache-2.0"
] | 135 | 2020-05-24T05:56:20.000Z | 2022-03-24T05:54:10.000Z | model_utils/model.py | yeyupiaoling/PaddlePaddle-DeepSpeech | 813ca16470896f65959d34cb379c4c99f5911158 | [
"Apache-2.0"
] | 79 | 2020-06-27T05:58:53.000Z | 2022-03-30T14:24:37.000Z | import logging
import os
import shutil
import time
import paddle
from datetime import datetime, timedelta
from distutils.dir_util import mkpath
import numpy as np
import paddle.fluid as fluid
from visualdl import LogWriter
from utils.error_rate import char_errors, word_errors
from decoders.ctc_greedy_decoder import gre... | 44.268456 | 119 | 0.535527 |
915e63168fc11ba0cda3f3af19c64616039a7c92 | 6,489 | py | Python | pymmbot/bitmex/bm_socket.py | coinpit/pymmbot | 88efc8b06b2e5f7d871e22e505998e8e44c73de6 | [
"MIT"
] | 7 | 2018-02-25T08:49:02.000Z | 2019-11-18T00:43:04.000Z | pymmbot/bitmex/bm_socket.py | coinpit/pymmbot | 88efc8b06b2e5f7d871e22e505998e8e44c73de6 | [
"MIT"
] | 2 | 2017-08-15T18:05:38.000Z | 2017-08-17T00:26:36.000Z | pymmbot/bitmex/bm_socket.py | coinpit/pymmbot | 88efc8b06b2e5f7d871e22e505998e8e44c73de6 | [
"MIT"
] | 3 | 2017-11-15T23:34:01.000Z | 2020-11-26T16:47:20.000Z | import json
import logging
import threading
import traceback
from urllib.parse import urlparse
import websocket
from pymmbot.bitmex.auth import APIKeyAuth
from pymmbot.settings import settings
class BM_Socket(object):
def __init__(self):
self.callbacks = {}
self.data = {}
self.keys = {}
... | 41.864516 | 200 | 0.522268 |
915e6504e1e59ff247a2715820bc31a4d4cc1944 | 14,685 | py | Python | tensorflow/contrib/opt/python/training/adamax_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/contrib/opt/python/training/adamax_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/opt/python/training/adamax_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # Copyright 2018 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... | 41.837607 | 80 | 0.623561 |
915e6ca34b97c62ba2ce0b18e4129bc7c9af22f1 | 10,558 | py | Python | test/api/math_object/test_math_object.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 14 | 2018-07-15T17:01:52.000Z | 2018-11-29T06:15:33.000Z | test/api/math_object/test_math_object.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 1 | 2018-09-28T12:59:34.000Z | 2019-10-08T08:42:59.000Z | test/api/math_object/test_math_object.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 2 | 2020-12-21T07:59:17.000Z | 2022-02-16T21:41:25.000Z | # -----------------------------------------------------------------------------------
# <copyright company="Aspose" file="test_math_object.py">
# Copyright (c) 2021 Aspose.Words for Cloud
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software an... | 47.990909 | 161 | 0.738776 |
915e7c59d7c91a9ac3a60eb46b5b56642986a225 | 18,486 | py | Python | tests/components/homekit/test_type_fans.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 1 | 2020-04-07T15:44:54.000Z | 2020-04-07T15:44:54.000Z | tests/components/homekit/test_type_fans.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 3 | 2021-09-08T03:31:36.000Z | 2022-03-12T01:00:03.000Z | tests/components/homekit/test_type_fans.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 1 | 2020-05-24T07:37:49.000Z | 2020-05-24T07:37:49.000Z | """Test different accessory types: Fans."""
from collections import namedtuple
from unittest.mock import Mock
from pyhap.const import HAP_REPR_AID, HAP_REPR_CHARS, HAP_REPR_IID, HAP_REPR_VALUE
import pytest
from homeassistant.components.fan import (
ATTR_DIRECTION,
ATTR_OSCILLATING,
ATTR_SPEED,
ATTR_S... | 32.318182 | 88 | 0.628692 |
915e91469fa2c0a94438843c38f12475ed37e72d | 32 | py | Python | influxdb_client/client/abstract_client.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | 1 | 2021-06-06T10:39:47.000Z | 2021-06-06T10:39:47.000Z | influxdb_client/client/abstract_client.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | null | null | null | influxdb_client/client/abstract_client.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | null | null | null |
class AbstractClient:
pass | 8 | 21 | 0.71875 |
915e949e6b44ec550c47371290bf2b33c4ca64b1 | 897 | py | Python | atom/nucleus/python/test/test_page_card_program.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/test/test_page_card_program.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/test/test_page_card_program.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Hydrogen Nucleus API
The Hydrogen Nucleus API # noqa: E501
OpenAPI spec version: 1.9.5
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import nucleus_api
from nu... | 21.878049 | 86 | 0.7068 |
915e9b168628d28104bc9845ad780fbad91e91fb | 11,364 | py | Python | python/tests/shortnumberinfotest.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | 2 | 2019-03-30T02:12:54.000Z | 2021-03-08T18:59:40.000Z | python/tests/shortnumberinfotest.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | null | null | null | python/tests/shortnumberinfotest.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | 1 | 2018-11-10T03:47:34.000Z | 2018-11-10T03:47:34.000Z | #!/usr/bin/env python
"""Unit tests for shortnumberinfo.py"""
# Based on original Java code:
# java/test/com/google/i18n/phonenumbers/ShortNumberInfoTest.java
# Copyright (C) 2013 The Libphonenumber Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in co... | 53.102804 | 146 | 0.722897 |
915eb544d70d7453243d172cfff9ae4e51a3e4f8 | 791 | py | Python | services/showcase/api/db/migrations/versions/c552235f6967_.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | null | null | null | services/showcase/api/db/migrations/versions/c552235f6967_.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | null | null | null | services/showcase/api/db/migrations/versions/c552235f6967_.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | null | null | null | """empty message
Revision ID: c552235f6967
Revises: ef3c58af741e
Create Date: 2022-03-21 14:53:58.715602
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "c552235f6967"
down_revision = "ef3c58af741e"
branch_labels = None
depends_on = None
def upgrade():
# ... | 25.516129 | 83 | 0.695322 |
915ee6cbbf2d0155d0771c07214f63d79a779093 | 4,385 | py | Python | setup.py | visshaljagtap/incubator-superset | c9c18011f3cbee144ef8f76568449a4b83325773 | [
"Apache-2.0"
] | 11 | 2018-01-16T16:52:12.000Z | 2020-06-12T12:17:03.000Z | setup.py | visshaljagtap/incubator-superset | c9c18011f3cbee144ef8f76568449a4b83325773 | [
"Apache-2.0"
] | 67 | 2017-11-06T21:31:14.000Z | 2020-11-19T03:52:18.000Z | setup.py | visshaljagtap/incubator-superset | c9c18011f3cbee144ef8f76568449a4b83325773 | [
"Apache-2.0"
] | 4 | 2018-01-31T00:11:50.000Z | 2019-12-26T04:11:52.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... | 32.969925 | 85 | 0.613683 |
915ef73c7826e3a0f4dd224b8c0b23be440f9efd | 4,497 | py | Python | train_scripts/train_lip_mnist.py | chawins/entangle-rep | 3e9e0d6e7536b0de0e35d7f8717f2ccc8e887759 | [
"MIT"
] | 15 | 2019-06-30T12:30:17.000Z | 2021-12-07T20:20:36.000Z | train_scripts/train_lip_mnist.py | chawins/entangle-rep | 3e9e0d6e7536b0de0e35d7f8717f2ccc8e887759 | [
"MIT"
] | 2 | 2020-06-11T10:10:52.000Z | 2021-12-21T08:50:33.000Z | train_scripts/train_lip_mnist.py | chawins/entangle-rep | 3e9e0d6e7536b0de0e35d7f8717f2ccc8e887759 | [
"MIT"
] | 9 | 2019-07-09T14:52:30.000Z | 2020-10-27T19:18:34.000Z | '''Train MNIST model'''
from __future__ import print_function
import logging
import os
import numpy as np
import torch
import torch.backends.cudnn as cudnn
import torch.nn as nn
import torch.optim as optim
from lib.dataset_utils import *
from lib.lip_model import *
def evaluate(net, margin, dataloader, device):
... | 30.80137 | 76 | 0.63131 |
915ef90acf452ffd8aaeaa3d99066251645cba88 | 3,519 | py | Python | demo/main.py | AnotherKamila/sdn-loadbalancer | 34fa80d05d9751aaec42490a7e3883267ea6ebfc | [
"MIT"
] | 6 | 2019-04-28T15:27:09.000Z | 2021-05-24T10:43:44.000Z | demo/main.py | AnotherKamila/sdn-loadbalancer | 34fa80d05d9751aaec42490a7e3883267ea6ebfc | [
"MIT"
] | null | null | null | demo/main.py | AnotherKamila/sdn-loadbalancer | 34fa80d05d9751aaec42490a7e3883267ea6ebfc | [
"MIT"
] | 1 | 2019-11-12T07:34:50.000Z | 2019-11-12T07:34:50.000Z | #!/usr/bin/env python
from __future__ import print_function
from p4utils.utils.topology import Topology
from twisted.internet import defer, task, stdio
from twisted.python import failure
from myutils import all_results
from myutils.twisted_utils import sleep, WaitForLines
from myutils.remote_utils import remote_modul... | 31.419643 | 85 | 0.628303 |
915f09706bd6b6ac76ca62c0e02084b13ed6e367 | 3,663 | py | Python | posts/serializers.py | bllli/Django-China-API | 79a5d85fe88ba7784d08d370b8e7519f7274f208 | [
"MIT"
] | 187 | 2018-03-08T11:18:11.000Z | 2021-12-26T13:29:02.000Z | posts/serializers.py | bllli/Django-China-API | 79a5d85fe88ba7784d08d370b8e7519f7274f208 | [
"MIT"
] | 67 | 2018-03-09T14:56:47.000Z | 2021-06-24T08:52:40.000Z | posts/serializers.py | bllli/Django-China-API | 79a5d85fe88ba7784d08d370b8e7519f7274f208 | [
"MIT"
] | 52 | 2018-03-08T11:18:12.000Z | 2021-08-02T16:07:04.000Z | from django.contrib.contenttypes.models import ContentType
from django.db.models import Prefetch
from rest_framework import serializers
from tags.serializers import TagSerializer
from utils.mixins import EagerLoaderMixin
from .models import Post, Reply
class IndexPostListSerializer(serializers.HyperlinkedModelSerial... | 26.543478 | 89 | 0.57958 |
915f0a401cf4c9a7747ab9424b518aa08d2ef9ac | 39,320 | py | Python | src/kanapy/api.py | AHartmaier/Kanapy | 876644f4c03a233da14101e26db9760299667342 | [
"BSD-2-Clause"
] | 5 | 2021-06-17T07:12:02.000Z | 2022-03-06T05:49:36.000Z | src/kanapy/api.py | AHartmaier/Kanapy | 876644f4c03a233da14101e26db9760299667342 | [
"BSD-2-Clause"
] | 6 | 2021-06-10T14:42:03.000Z | 2022-03-28T00:19:37.000Z | src/kanapy/api.py | AHartmaier/Kanapy | 876644f4c03a233da14101e26db9760299667342 | [
"BSD-2-Clause"
] | 4 | 2021-06-10T14:35:35.000Z | 2022-03-25T07:34:16.000Z | """ Module defining class Microstructure that contains the necessary
methods and attributes to analyze experimental microstructures in form
of EBSD maps to generate statistical descriptors for 3D microstructures, and
to create synthetic RVE that fulfill the requires statistical microstructure
descriptors.
The methods... | 45.827506 | 117 | 0.501704 |
915f2c616afb487309d170413e8730d25919af84 | 1,476 | py | Python | appengine/findit/handlers/flake/detection/process_flakes.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | appengine/findit/handlers/flake/detection/process_flakes.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 7 | 2022-02-15T01:11:37.000Z | 2022-03-02T12:46:13.000Z | appengine/findit/handlers/flake/detection/process_flakes.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2019 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.
from google.appengine.api import taskqueue
from common import constants
from gae_libs.handlers.base_handler import BaseHandler
from gae_libs.handlers.base_h... | 36.9 | 80 | 0.76897 |
915f31abcb65a6c23333e738e5dc4cb59426f2fe | 640 | py | Python | Experiments/RunTrainStackedClassification.py | christymarc/raycasting-simulation | ed9b92143d3eb1c5a25900419ead517f93f8c315 | [
"MIT"
] | null | null | null | Experiments/RunTrainStackedClassification.py | christymarc/raycasting-simulation | ed9b92143d3eb1c5a25900419ead517f93f8c315 | [
"MIT"
] | null | null | null | Experiments/RunTrainStackedClassification.py | christymarc/raycasting-simulation | ed9b92143d3eb1c5a25900419ead517f93f8c315 | [
"MIT"
] | null | null | null | # ---
# jupyter:
# jupytext:
# formats: py:light
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.11.4
# kernelspec:
# display_name: Python 3 (ipykernel)
# language: python
# name: python3
# ---
from subprocess im... | 17.777778 | 44 | 0.540625 |
915f61c91d0ff15436f33e4bd6b77f9fff79f598 | 999 | py | Python | setup.py | nimeshgit/nyoka | 43bf049825922213eeb3e6a8f39864f9b75d01d5 | [
"Apache-2.0"
] | null | null | null | setup.py | nimeshgit/nyoka | 43bf049825922213eeb3e6a8f39864f9b75d01d5 | [
"Apache-2.0"
] | 2 | 2021-08-25T16:16:45.000Z | 2022-02-10T05:28:52.000Z | setup.py | nimeshgit/nyoka | 43bf049825922213eeb3e6a8f39864f9b75d01d5 | [
"Apache-2.0"
] | null | null | null | from setuptools import setup, find_packages
exec(open("nyoka/metadata.py").read())
from os import path
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, "README.md"), encoding="utf-8") as f:
long_description = f.read()
setup(
name = "nyoka",
version = __version__,
descri... | 28.542857 | 93 | 0.726727 |
915f71f30f7302f5219ebe6502ce285534b8f078 | 1,258 | py | Python | syncmanagerapi/tests/setup.py | Frie-man/syncmanager | f76e36f85ea68ab177a9ffd50dfff033ae0fc8f6 | [
"MIT"
] | null | null | null | syncmanagerapi/tests/setup.py | Frie-man/syncmanager | f76e36f85ea68ab177a9ffd50dfff033ae0fc8f6 | [
"MIT"
] | null | null | null | syncmanagerapi/tests/setup.py | Frie-man/syncmanager | f76e36f85ea68ab177a9ffd50dfff033ae0fc8f6 | [
"MIT"
] | null | null | null | from requests.auth import _basic_auth_str
SYNC_ADMIN = "syncman"
SYNC_ADMIN_PASSWORD = "pw1234"
USER = "eggs"
USER_PASSWORD = "secret"
USER_CLIENT_ENV = "intregationtest"
def create_admin(runner):
runner.invoke(args=['admin-create', '--name', SYNC_ADMIN, '--password', SYNC_ADMIN_PASSWORD])
def get_admin_basic... | 26.765957 | 107 | 0.72814 |
915f7a716f426e576c0446b5e3db4cf79438450e | 65,136 | py | Python | tests/test_models.py | sparrowme/djangocms-blog | 6bbb32a3304d284fb699cf713e45ccd48ee876ae | [
"BSD-3-Clause"
] | 1 | 2022-01-09T20:23:10.000Z | 2022-01-09T20:23:10.000Z | tests/test_models.py | sparrowme/djangocms-blog | 6bbb32a3304d284fb699cf713e45ccd48ee876ae | [
"BSD-3-Clause"
] | null | null | null | tests/test_models.py | sparrowme/djangocms-blog | 6bbb32a3304d284fb699cf713e45ccd48ee876ae | [
"BSD-3-Clause"
] | 1 | 2021-05-26T15:17:13.000Z | 2021-05-26T15:17:13.000Z | import re
from contextlib import contextmanager
from copy import deepcopy
from datetime import timedelta
from unittest import SkipTest
import parler
from cms.api import add_plugin
from cms.utils.copy_plugins import copy_plugins_to
from cms.utils.plugins import downcast_plugins
from django.contrib import admin
from dja... | 45.581526 | 119 | 0.63699 |
915f92c0d02ae2d313a9537d60e517660845e7fa | 2,389 | py | Python | scripts/python/backend_server/wsgi/district_alerts.py | OSADP/Pikalert-Vehicle-Data-Translator- | 295da604408f6f13af0301b55476a81311459386 | [
"Apache-2.0"
] | 2 | 2020-06-03T15:59:50.000Z | 2020-12-21T11:11:57.000Z | scripts/python/backend_server/wsgi/district_alerts.py | OSADP/Pikalert-Vehicle-Data-Translator- | 295da604408f6f13af0301b55476a81311459386 | [
"Apache-2.0"
] | null | null | null | scripts/python/backend_server/wsgi/district_alerts.py | OSADP/Pikalert-Vehicle-Data-Translator- | 295da604408f6f13af0301b55476a81311459386 | [
"Apache-2.0"
] | 2 | 2019-10-02T06:47:23.000Z | 2020-02-02T18:32:23.000Z | #!/usr/bin/env python
"""Get district alerts"""
# *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
# ** Copyright UCAR (c) 1992 - 2015
# ** University Corporation for Atmospheric Research(UCAR)
# ** National Center for Atmospheric Research(NCAR)
# ** Research Applications Laboratory(RAL) ... | 31.025974 | 101 | 0.638761 |
915fea631d0b759a3c6cdb1169989e449fd8b430 | 4,675 | py | Python | leetcode_python/Backtracking/flip-game-ii.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | 18 | 2019-08-01T07:45:02.000Z | 2022-03-31T18:05:44.000Z | leetcode_python/Backtracking/flip-game-ii.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Backtracking/flip-game-ii.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | 15 | 2019-12-29T08:46:20.000Z | 2022-03-08T14:14:05.000Z | # V0
# V1
# http://www.voidcn.com/article/p-mzcklgpa-qp.html
class Solution(object):
def canWin(self, s):
"""
:type s: str
:rtype: bool
"""
for i in range(len(s) - 1): # find all of the possible cases
if s[i:i+2] == "++":
current = s[0:i] + "-... | 38.00813 | 172 | 0.473797 |
915ff345e6a370509aba82e764fe20cc185f32cf | 5,105 | py | Python | asposewordscloud/models/requests/classify_document_request.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 14 | 2018-07-15T17:01:52.000Z | 2018-11-29T06:15:33.000Z | asposewordscloud/models/requests/classify_document_request.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 1 | 2018-09-28T12:59:34.000Z | 2019-10-08T08:42:59.000Z | asposewordscloud/models/requests/classify_document_request.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 2 | 2020-12-21T07:59:17.000Z | 2022-02-16T21:41:25.000Z | # coding: utf-8
# -----------------------------------------------------------------------------------
# <copyright company="Aspose" file="classify_document_request.py">
# Copyright (c) 2021 Aspose.Words for Cloud
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining a co... | 43.262712 | 131 | 0.646621 |
916039a7bea27e8c1a5fb76f27c07a558c5a18c1 | 3,075 | py | Python | company/management/commands/tests/test_retrieve_companies_house_company_status.py | konradko/directory-api | e9cd05b1deaf575e94352c46ddbd1857d8119fda | [
"MIT"
] | 1 | 2021-11-06T12:08:26.000Z | 2021-11-06T12:08:26.000Z | company/management/commands/tests/test_retrieve_companies_house_company_status.py | konradko/directory-api | e9cd05b1deaf575e94352c46ddbd1857d8119fda | [
"MIT"
] | null | null | null | company/management/commands/tests/test_retrieve_companies_house_company_status.py | konradko/directory-api | e9cd05b1deaf575e94352c46ddbd1857d8119fda | [
"MIT"
] | null | null | null | from unittest.mock import patch
from directory_constants import company_types
import pytest
from django.core.management import call_command
from company import helpers
from company.tests.factories import CompanyFactory
@pytest.mark.django_db
@patch.object(helpers, 'get_companies_house_profile')
def test_companies_... | 35.755814 | 104 | 0.812033 |
91604e1f81c4584e9443102d4f4ae1fa17254ca1 | 1,051 | py | Python | core/cli/args_parser.py | DobroAlex/laolab-nmap-test | d4421fea4b1e3de580b9ad6b1c5952675ca8d68f | [
"Unlicense"
] | null | null | null | core/cli/args_parser.py | DobroAlex/laolab-nmap-test | d4421fea4b1e3de580b9ad6b1c5952675ca8d68f | [
"Unlicense"
] | null | null | null | core/cli/args_parser.py | DobroAlex/laolab-nmap-test | d4421fea4b1e3de580b9ad6b1c5952675ca8d68f | [
"Unlicense"
] | null | null | null | import argparse
from pathlib import Path
from core.cli.program_args import ProgramArgs
class ArgsParser:
def __init__(self):
self.__parser = self.__get_parser
@property
def __get_parser(self) -> 'argparse.ArgumentParser':
parser_ = argparse.ArgumentParser()
parser_.add_argument(
... | 26.948718 | 79 | 0.564225 |
9160538d19fdd1075b84859e372461a14039f467 | 11,712 | py | Python | database/gputil.py | cozy9/Metascape | 261901657bef5e1060f1ae86a2a3913d1e4c87c4 | [
"Apache-2.0"
] | 2 | 2021-08-01T19:33:44.000Z | 2022-02-14T16:37:34.000Z | database/gputil.py | data2code/Metascape | 261901657bef5e1060f1ae86a2a3913d1e4c87c4 | [
"Apache-2.0"
] | null | null | null | database/gputil.py | data2code/Metascape | 261901657bef5e1060f1ae86a2a3913d1e4c87c4 | [
"Apache-2.0"
] | 1 | 2019-05-22T12:44:34.000Z | 2019-05-22T12:44:34.000Z | #!/usr/bin/env python
import shlex, subprocess
import numpy as np
import pandas as pd
import math
import os
import shutil
import re
import sys
import util
import urllib
from os import sys, path
sys.path.insert(0, path.join(path.dirname(path.abspath(__file__)),'../'))
from core import SyncDB
from IPython.core.debu... | 41.239437 | 364 | 0.593408 |
91606e9aa2710136bfb9ad798a59a9a4902f0545 | 3,211 | py | Python | Parser-hybrid/nparser/neural/models/nlp/taggers/xtagger.py | sb-b/BOUN-PARSE | 2b529924897d8e2613c4d2193a67796a895da40b | [
"Apache-2.0"
] | 12 | 2020-03-04T17:36:12.000Z | 2021-09-26T14:02:49.000Z | Parser-hybrid/nparser/neural/models/nlp/taggers/xtagger.py | sb-b/BOUN-PARSE | 2b529924897d8e2613c4d2193a67796a895da40b | [
"Apache-2.0"
] | 1 | 2020-12-09T08:21:11.000Z | 2020-12-09T08:21:11.000Z | Parser-hybrid/nparser/neural/models/nlp/taggers/xtagger.py | sb-b/BOUN-PARSE | 2b529924897d8e2613c4d2193a67796a895da40b | [
"Apache-2.0"
] | 3 | 2020-11-18T09:53:42.000Z | 2020-12-17T23:04:59.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2016 Timothy Dozat
#
# 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 ... | 35.677778 | 114 | 0.672376 |
916074e4aa7ca05c3b745808c38fa1571617f54f | 877 | py | Python | dj_hetmech_app/management/commands/query_paths.py | dhimmel/hetmech-backend | 28d9626d75c5fa78b03ae0cb18b32f90bcf1fe8f | [
"BSD-3-Clause"
] | 4 | 2020-01-24T16:11:10.000Z | 2020-11-19T20:40:53.000Z | dj_hetmech_app/management/commands/query_paths.py | dhimmel/hetmech-backend | 28d9626d75c5fa78b03ae0cb18b32f90bcf1fe8f | [
"BSD-3-Clause"
] | 57 | 2018-10-30T18:29:14.000Z | 2019-11-04T15:19:51.000Z | dj_hetmech_app/management/commands/query_paths.py | dhimmel/hetmech-backend | 28d9626d75c5fa78b03ae0cb18b32f90bcf1fe8f | [
"BSD-3-Clause"
] | 3 | 2018-10-30T18:07:19.000Z | 2019-06-04T14:50:44.000Z | import json
import hetnetpy.readwrite
from django.core.management.base import BaseCommand
from dj_hetmech_app.utils.paths import (
get_neo4j_node_info,
get_neo4j_rel_info,
get_paths,
)
from dj_hetmech_app.models import Node
class Command(BaseCommand):
help = 'Call dj_hetmech_app.utils.paths.get_path... | 30.241379 | 108 | 0.677309 |
916095c482ae1c87487254921b2c408404633873 | 6,972 | py | Python | Main Task_MSI-H classification/train_utils.py | ChangHeeHAN/PAIP2020 | e42731ed2824f9f4a2e4a30f029dfea0f9efd25c | [
"MIT"
] | 1 | 2021-11-08T03:36:50.000Z | 2021-11-08T03:36:50.000Z | Main Task_MSI-H classification/train_utils.py | chhan95/PAIP2020 | e42731ed2824f9f4a2e4a30f029dfea0f9efd25c | [
"MIT"
] | 1 | 2021-01-26T18:37:11.000Z | 2021-01-27T07:35:11.000Z | Main Task_MSI-H classification/train_utils.py | chhan95/PAIP2020 | e42731ed2824f9f4a2e4a30f029dfea0f9efd25c | [
"MIT"
] | null | null | null |
import io
import itertools
import json
import os
import random
import re
import shutil
import textwrap
import cv2
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import torch
from sklearn.metrics import confusion_matrix
from termcolor import colored
####
def check_manual_see... | 31.981651 | 112 | 0.618761 |
9160a518df26f159643d359025aebc10ce7fbb10 | 3,319 | py | Python | models/mean_predictor/container/predictor.py | AlexandreRozier/BigDataAnalytics | 50ac5fe0d87d29a1938b9f19c3785baa59e0b83e | [
"Apache-2.0"
] | null | null | null | models/mean_predictor/container/predictor.py | AlexandreRozier/BigDataAnalytics | 50ac5fe0d87d29a1938b9f19c3785baa59e0b83e | [
"Apache-2.0"
] | null | null | null | models/mean_predictor/container/predictor.py | AlexandreRozier/BigDataAnalytics | 50ac5fe0d87d29a1938b9f19c3785baa59e0b83e | [
"Apache-2.0"
] | null | null | null | # This is the file that implements a flask server to do inferences. It's the file that you will modify to
# implement the scoring for your own algorithm.
from __future__ import print_function
import os
import json
import pickle
import StringIO
import sys
import signal
import traceback
import flask
import pandas as p... | 33.525253 | 105 | 0.661645 |
9160d23993693600ef4110319ba1dad7376ad0cf | 18,561 | py | Python | tests/unit_tests/repobee/plugin_tests/test_gitlab.py | tohanss/repobee | cf5eb1e83e62c20bbca00c8ad9f798a612e1664f | [
"MIT"
] | null | null | null | tests/unit_tests/repobee/plugin_tests/test_gitlab.py | tohanss/repobee | cf5eb1e83e62c20bbca00c8ad9f798a612e1664f | [
"MIT"
] | null | null | null | tests/unit_tests/repobee/plugin_tests/test_gitlab.py | tohanss/repobee | cf5eb1e83e62c20bbca00c8ad9f798a612e1664f | [
"MIT"
] | null | null | null | from collections import namedtuple
import itertools
import requests.exceptions
import pytest
import gitlab
import repobee_plug as plug
import _repobee
import constants
PAGE_SIZE = 10
class Group:
"""Class mimicking a gitlab.Group"""
_Members = namedtuple("_Members", ("create", "list"))
_Member = name... | 32.223958 | 79 | 0.608265 |
9160d2e1578ecb76921e48ed3c0a950ecdc823ef | 6,498 | py | Python | vyper/ast_utils.py | daejunpark/viper | a9281385661e95610ec0b1e163fc60ebba4d7f01 | [
"MIT"
] | 1 | 2021-04-23T21:48:20.000Z | 2021-04-23T21:48:20.000Z | vyper/ast_utils.py | iamonuwa/vyper | 4908ae7a671301dd487f9a087e2e7c8e1813879b | [
"MIT"
] | null | null | null | vyper/ast_utils.py | iamonuwa/vyper | 4908ae7a671301dd487f9a087e2e7c8e1813879b | [
"MIT"
] | null | null | null | import ast as python_ast
from typing import (
Generator,
)
import asttokens
import vyper.ast as vyper_ast
from vyper.exceptions import (
CompilerPanic,
ParserException,
PythonSyntaxException,
SyntaxException,
)
from vyper.parser.parser_utils import (
annotate_ast,
)
from vyper.parser.pre_parse... | 32.168317 | 100 | 0.640966 |
91611318903b0360ee5154ec78b04cd1c792ed81 | 981 | py | Python | tests/basic_stages/test_drop_duplicates.py | DavidKatz-il/pdpipe | 5ddd066425d99886bfc51cf19ab78b2bf8c7791a | [
"MIT"
] | 438 | 2017-03-02T16:55:34.000Z | 2019-12-20T03:29:36.000Z | tests/basic_stages/test_drop_duplicates.py | DavidKatz-il/pdpipe | 5ddd066425d99886bfc51cf19ab78b2bf8c7791a | [
"MIT"
] | 68 | 2019-12-21T12:51:51.000Z | 2022-03-13T13:06:14.000Z | tests/basic_stages/test_drop_duplicates.py | DavidKatz-il/pdpipe | 5ddd066425d99886bfc51cf19ab78b2bf8c7791a | [
"MIT"
] | 30 | 2019-12-21T12:18:18.000Z | 2022-03-17T05:53:19.000Z | """Testing basic pipeline stages."""
import pandas as pd
import pytest
from pdpipe import DropDuplicates
from pdpipe.exceptions import FailedPreconditionError
def _test_df():
return pd.DataFrame([[8, 1], [8, 2], [9, 2]], [1, 2, 3], ['a', 'b'])
def test_drop_duplicates():
df = _test_df()
stage = DropDu... | 22.813953 | 72 | 0.649337 |
91615a786bae9722c4215768d2db499acf2bf295 | 58 | py | Python | validations/__init__.py | coolmacmaniac/pyutils | f5e4089d05159407d21de6d589c535e581dc94cc | [
"MIT"
] | null | null | null | validations/__init__.py | coolmacmaniac/pyutils | f5e4089d05159407d21de6d589c535e581dc94cc | [
"MIT"
] | null | null | null | validations/__init__.py | coolmacmaniac/pyutils | f5e4089d05159407d21de6d589c535e581dc94cc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from .Validator import Validator
| 14.5 | 32 | 0.655172 |
91617a90e9b46ffd08027dabc3d00f4aaa186c14 | 3,949 | py | Python | alipay/aop/api/request/AlipaySecurityProdFacePayRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AlipaySecurityProdFacePayRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AlipaySecurityProdFacePayRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipaySecurityProdFacePayModel import AlipaySecurityProdFacePayModel
class AlipaySecurityProdFacePayRequest(object):
def __init... | 27.234483 | 148 | 0.642694 |
91617e6f51551df0e2f0ef0c3737b02c370a6d09 | 8,865 | py | Python | rep/report/_base.py | HolyBayes/rep | 8a8d70f87e148e6fd73ff0c3a8606e6074a5c47b | [
"Apache-2.0"
] | 726 | 2015-04-16T08:16:30.000Z | 2022-03-25T19:19:42.000Z | rep/report/_base.py | HolyBayes/rep | 8a8d70f87e148e6fd73ff0c3a8606e6074a5c47b | [
"Apache-2.0"
] | 86 | 2015-04-16T23:57:01.000Z | 2021-09-26T01:03:47.000Z | rep/report/_base.py | HolyBayes/rep | 8a8d70f87e148e6fd73ff0c3a8606e6074a5c47b | [
"Apache-2.0"
] | 167 | 2015-04-16T11:42:18.000Z | 2022-01-11T15:10:19.000Z | from __future__ import division, print_function, absolute_import
from abc import ABCMeta, abstractmethod
import numpy
import pandas
import copy
from collections import OrderedDict
from .. import plotting
from .. import utils
__author__ = 'Alex Rogozhnikov, Tatiana Likhomanenko'
class AbstractReport:
"""
Prov... | 42.620192 | 116 | 0.643655 |
9161822d173c95cb7eec6ff99c299998a93ea008 | 6,715 | py | Python | python/tvm/autotvm/task/nnvm_integration.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | python/tvm/autotvm/task/nnvm_integration.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | python/tvm/autotvm/task/nnvm_integration.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 42 | 2020-08-01T06:41:24.000Z | 2022-01-20T10:33:08.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... | 33.40796 | 99 | 0.602978 |
91618ac9f12340c2820d0d23cf801aa96c1687f3 | 2,957 | py | Python | tests/test_parser.py | npelikan/clarify | 2760b416209aa20c879e7ac4861a94cb3df55e30 | [
"MIT"
] | null | null | null | tests/test_parser.py | npelikan/clarify | 2760b416209aa20c879e7ac4861a94cb3df55e30 | [
"MIT"
] | null | null | null | tests/test_parser.py | npelikan/clarify | 2760b416209aa20c879e7ac4861a94cb3df55e30 | [
"MIT"
] | null | null | null | from clarify import *
import datetime
import os
v1_url = "http://results.enr.clarityelections.com/NJ/Cape_May/71890/190686/Web01/en/summary.html"
v2_url = "http://results.enr.clarityelections.com/NJ/Mercer/71882/Web02/#/"
# fighting pycharm :/
if 'tests' in os.getcwd().split('/'):
test_data_dir = 'data/'
else:
... | 30.484536 | 111 | 0.688874 |
9161a6f0417a766ad3305a41ce4fe3c5bec860e3 | 500 | py | Python | terrascript/provider/akamai/akamai.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/provider/akamai/akamai.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/provider/akamai/akamai.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/provider/akamai/akamai.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:11:11 UTC)
import terrascript
class akamai(terrascript.Provider):
"""Terraform Akamai provider"""
__description__ = "Terraform Akamai provider"
__namespace__ = "akamai"
__name__ = "akamai"
__so... | 25 | 73 | 0.71 |
9161aa5ba475886b129abc5eaf087311eba8123d | 886 | py | Python | language-modeling/fast_transformers/utils.py | minhtannguyen/transformer-mgk | 304ebf3781b1eb4aeef93f2757319775d2fcdbc4 | [
"CC0-1.0"
] | 5 | 2021-11-06T16:10:31.000Z | 2021-12-25T19:47:42.000Z | language-modeling/fast_transformers/utils.py | minhtannguyen/transformer-mgk | 304ebf3781b1eb4aeef93f2757319775d2fcdbc4 | [
"CC0-1.0"
] | null | null | null | language-modeling/fast_transformers/utils.py | minhtannguyen/transformer-mgk | 304ebf3781b1eb4aeef93f2757319775d2fcdbc4 | [
"CC0-1.0"
] | 2 | 2021-11-30T03:36:54.000Z | 2021-12-25T19:49:58.000Z | """Boilerplate code for dealing with fast_transformers modules."""
def make_mirror(src_module, dst_module):
"""Sets the parameters of src_module to dst_module so that they share the
same parameters.
Most noteable usecase is to make a recurrent transformer mirror of a batch
transformer for fast infere... | 30.551724 | 78 | 0.659142 |
9161c22284f27076e86afa5754e9361b6b568418 | 365 | py | Python | tolqc-api/app/main/resource/user.py | sanger-tol/tolqc | 6ef535a0eb0028c5d9270ff18d95d38c6656cbdd | [
"MIT"
] | null | null | null | tolqc-api/app/main/resource/user.py | sanger-tol/tolqc | 6ef535a0eb0028c5d9270ff18d95d38c6656cbdd | [
"MIT"
] | null | null | null | tolqc-api/app/main/resource/user.py | sanger-tol/tolqc | 6ef535a0eb0028c5d9270ff18d95d38c6656cbdd | [
"MIT"
] | null | null | null | # SPDX-FileCopyrightText: 2021 Genome Research Ltd.
#
# SPDX-License-Identifier: MIT
from main.service import UserService
from main.swagger import UserSwagger
from .base import BaseResource, setup_resource
api_user = UserSwagger.api
@setup_resource
class UserResource(BaseResource):
class Meta:
service... | 19.210526 | 51 | 0.767123 |
9161ca95065ed67f8d129ddb70b40dd04566585b | 5,870 | py | Python | ote_cli/ote_cli/tools/train.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | null | null | null | ote_cli/ote_cli/tools/train.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | null | null | null | ote_cli/ote_cli/tools/train.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | 1 | 2020-12-13T22:13:51.000Z | 2020-12-13T22:13:51.000Z | """
Model training tool.
"""
# Copyright (C) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | 32.977528 | 103 | 0.720102 |
9161dfca3df5fd4920fe55dd1b43abf06d48bff3 | 1,337 | py | Python | backend/base/management/commands/_seed_example_user_data.py | uncle-yura/simple_booking | 91a9609ae4521e4b2d52953112607c69db54d0ee | [
"MIT"
] | null | null | null | backend/base/management/commands/_seed_example_user_data.py | uncle-yura/simple_booking | 91a9609ae4521e4b2d52953112607c69db54d0ee | [
"MIT"
] | null | null | null | backend/base/management/commands/_seed_example_user_data.py | uncle-yura/simple_booking | 91a9609ae4521e4b2d52953112607c69db54d0ee | [
"MIT"
] | null | null | null | import os
from django.conf import settings
from django.contrib.auth.models import User, Group
from base.services import save_random_avatar_image
class ExampleUserData:
@staticmethod
def _create_user(id, name, is_staff, is_superuser):
user, created = User.objects.get_or_create(
id=id,
... | 31.093023 | 93 | 0.634256 |
9162450a207663651a25fc02a1d1ecc26a05c875 | 5,324 | py | Python | old1/zoner.py | strickyak/aphid | 12469858facdc9d7f110bf6c895e58eae9fb728f | [
"MIT"
] | 2 | 2015-05-25T10:47:30.000Z | 2017-12-12T18:15:00.000Z | old1/zoner.py | strickyak/aphid | 12469858facdc9d7f110bf6c895e58eae9fb728f | [
"MIT"
] | null | null | null | old1/zoner.py | strickyak/aphid | 12469858facdc9d7f110bf6c895e58eae9fb728f | [
"MIT"
] | null | null | null | # TODO: NXDOMAIN vs No Answer
# NOT SUPPORTED: BOTH "quotes" and (parens) on same line.
# We handle quotes first, then get continuation lines.
# So if quotes are on a continuation line, we will not see it.
# This simplfies the case of parens and semicolons in the quotes,
# which we do handle.
# Demo:
# cat ~/yak/bind... | 24.310502 | 91 | 0.579827 |
916250407bbb43cd276204958c41aff6a839f1da | 2,518 | py | Python | alphastarmini/core/rl/state.py | liuruoze/mini-AlphaStar | cf9de2507d526a5fb8ef67676aab2ffb92738640 | [
"Apache-2.0"
] | 108 | 2021-02-10T13:24:56.000Z | 2022-03-21T09:58:28.000Z | alphastarmini/core/rl/state.py | liuruoze/mini-AlphaStar | cf9de2507d526a5fb8ef67676aab2ffb92738640 | [
"Apache-2.0"
] | 21 | 2021-04-09T18:46:05.000Z | 2022-03-29T02:44:15.000Z | alphastarmini/core/rl/state.py | liuruoze/mini-AlphaStar | cf9de2507d526a5fb8ef67676aab2ffb92738640 | [
"Apache-2.0"
] | 19 | 2021-08-03T01:49:02.000Z | 2022-03-30T10:21:13.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
" For the multi-source state, including the entity state (Partial), \
the statistical state (Global) and the map state (Image)."
import time
__author__ = "Ruo-Ze Liu"
debug = False
class MsState(object):
'''
For the state with multi-source state... | 31.873418 | 108 | 0.625099 |
916279f91dbe334629aeabfc7d17977ac0e11916 | 3,811 | py | Python | src/cpu/testers/traffic_gen/TrafficGen.py | pnkfb9/gem5_priority | fbf766277df78a470758cf7d798d12fb1e7c51c4 | [
"BSD-3-Clause"
] | null | null | null | src/cpu/testers/traffic_gen/TrafficGen.py | pnkfb9/gem5_priority | fbf766277df78a470758cf7d798d12fb1e7c51c4 | [
"BSD-3-Clause"
] | null | null | null | src/cpu/testers/traffic_gen/TrafficGen.py | pnkfb9/gem5_priority | fbf766277df78a470758cf7d798d12fb1e7c51c4 | [
"BSD-3-Clause"
] | 2 | 2018-11-06T18:41:38.000Z | 2019-01-30T00:51:40.000Z | # Copyright (c) 2012 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementation of the functionality ... | 51.5 | 77 | 0.785096 |
9162947f0a9848cc98728c86e03600e1a7712c2c | 13,741 | py | Python | nova/api/ec2/ec2utils.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | nova/api/ec2/ec2utils.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | nova/api/ec2/ec2utils.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# 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 ... | 31.018059 | 78 | 0.634888 |
9162ef21a979b28b12528280d748f6a387522989 | 725 | py | Python | src/rubrix/_constants.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | 5 | 2021-11-11T23:37:53.000Z | 2021-12-19T03:09:43.000Z | src/rubrix/_constants.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | src/rubrix/_constants.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | 1 | 2022-02-11T08:28:02.000Z | 2022-02-11T08:28:02.000Z | # coding=utf-8
# Copyright 2021-present, the Recognai S.L. 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 ... | 34.52381 | 75 | 0.748966 |
9163239ce0dad3a411275e8b9f8dc3eaa7e26837 | 1,129 | py | Python | test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/setup.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/setup.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/setup.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"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 may ... | 29.710526 | 94 | 0.625332 |
9163304061ab8cd04b2b12eb8443377dc901e97f | 1,065 | py | Python | script/show_authors.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | null | null | null | script/show_authors.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | null | null | null | script/show_authors.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
from __future__ import print_function
from __future__ import absolute_import
import shlex
import subprocess
def main():
args = shlex.split('git log --pretty=format:"%an <%ae>"')
p = subprocess.Popen(args, stdout=subprocess.PIPE)
out = p.communicate()[0].decode().split('\n')
done ... | 25.357143 | 71 | 0.57277 |
9163346da93183cb19dbdaecbb8408bb4b0dd209 | 2,235 | py | Python | appengine/findit/pipelines/flake_failure/update_flake_analysis_data_points_pipeline.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/findit/pipelines/flake_failure/update_flake_analysis_data_points_pipeline.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/findit/pipelines/flake_failure/update_flake_analysis_data_points_pipeline.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2018 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.
"""Updates a flake analysis' data points with incoming pass rate information."""
from google.appengine.ext import ndb
from common.findit_http_client import ... | 40.636364 | 80 | 0.792841 |
9163378f3bbf0b546bb1849dd72f326f1182adab | 37 | py | Python | aim/storage/treeutils.py | admariner/aim | 4c143ea40acf3531abfa69f66503428d73d9fedc | [
"Apache-2.0"
] | null | null | null | aim/storage/treeutils.py | admariner/aim | 4c143ea40acf3531abfa69f66503428d73d9fedc | [
"Apache-2.0"
] | null | null | null | aim/storage/treeutils.py | admariner/aim | 4c143ea40acf3531abfa69f66503428d73d9fedc | [
"Apache-2.0"
] | null | null | null | from aim.storage.treeutils_ import *
| 18.5 | 36 | 0.810811 |
91634866e336c5357a65c7bf6b709813b86bac32 | 518 | py | Python | luminos/core/Widget.py | linuxaddict89/luminos | cd525173bd6766eb109c4409581f6c6273d1c1bd | [
"MIT"
] | null | null | null | luminos/core/Widget.py | linuxaddict89/luminos | cd525173bd6766eb109c4409581f6c6273d1c1bd | [
"MIT"
] | 2 | 2021-10-03T08:44:45.000Z | 2021-10-03T08:49:49.000Z | luminos/core/Widget.py | linuxaddict89/luminos | cd525173bd6766eb109c4409581f6c6273d1c1bd | [
"MIT"
] | null | null | null | from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QWidget
from luminos.core.Signal import Signal
class LWidget(QWidget):
onClose = Signal()
onDestroyed = Signal()
def __init__(self, parent=None):
super().__init__(parent)
self.setAttribute(Qt.WA_DeleteOnClose, True)
self.des... | 22.521739 | 52 | 0.675676 |
916382f614ed36fd88a17ec6755d8440aac78a94 | 50,563 | py | Python | extra_data/reader.py | kirienko/EXtra-data | 05de22b55fdc424473127335d2ca6b3a7026ab6d | [
"BSD-3-Clause"
] | null | null | null | extra_data/reader.py | kirienko/EXtra-data | 05de22b55fdc424473127335d2ca6b3a7026ab6d | [
"BSD-3-Clause"
] | 28 | 2021-01-08T12:03:16.000Z | 2022-03-03T11:04:36.000Z | extra_data/reader.py | kirienko/EXtra-data | 05de22b55fdc424473127335d2ca6b3a7026ab6d | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
"""
Collection of classes and functions to help reading HDF5 file generated at
The European XFEL.
Copyright (c) 2017, European X-Ray Free-Electron Laser Facility GmbH
All rights reserved.
You should have received a copy of the 3-Clause BSD License along with this
program. If not, see <https://opensour... | 36.853499 | 153 | 0.5808 |
91638dc93b2f48276dd3bc3858512deb16ea42e1 | 940 | py | Python | 01-Lesson-Plans/03-Python-Pandas/1/Activities/15-algo-challenge-01/Unsolved/algo-challenge-01.py | tatianegercina/FinTech | b40687aa362d78674e223eb15ecf14bc59f90b62 | [
"ADSL"
] | 1 | 2021-04-13T07:14:34.000Z | 2021-04-13T07:14:34.000Z | 01-Lesson-Plans/03-Python-Pandas/1/Activities/15-algo-challenge-01/Unsolved/algo-challenge-01.py | tatianegercina/FinTech | b40687aa362d78674e223eb15ecf14bc59f90b62 | [
"ADSL"
] | 2 | 2021-06-02T03:14:19.000Z | 2022-02-11T23:21:24.000Z | 01-Lesson-Plans/03-Python-Pandas/1/Activities/15-algo-challenge-01/Unsolved/algo-challenge-01.py | tatianegercina/FinTech | b40687aa362d78674e223eb15ecf14bc59f90b62 | [
"ADSL"
] | 1 | 2021-05-07T13:26:50.000Z | 2021-05-07T13:26:50.000Z | # Import the `random` library.
# Answer each question with the correct coding solution.
# QUESTION 1: Create a function called `number_guess` that takes in an integer as an argument.
# If the number is 42, print(true). If it isn't 42, print(false)
# This code is to help you test your function
# QUESTION 2: Write ... | 31.333333 | 128 | 0.756383 |
916394f50d8302027c4db0fc63f09a05b1787fed | 9,645 | py | Python | common/audio.py | MadhuAtBerkeley/w266_Project | e1d44b216e83b6327c1062a56108ff9d386703c0 | [
"Apache-2.0"
] | null | null | null | common/audio.py | MadhuAtBerkeley/w266_Project | e1d44b216e83b6327c1062a56108ff9d386703c0 | [
"Apache-2.0"
] | null | null | null | common/audio.py | MadhuAtBerkeley/w266_Project | e1d44b216e83b6327c1062a56108ff9d386703c0 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 38.891129 | 87 | 0.623847 |
91639d00f51a46af5207fd6c54fb829ecfd6617a | 4,646 | py | Python | test/lmp/tknzr/_char/test_batch_enc_and_batch_dec.py | ProFatXuanAll/char-RNN | 531f101b3d1ba20bafd28ca060aafe6f583d1efb | [
"Beerware"
] | null | null | null | test/lmp/tknzr/_char/test_batch_enc_and_batch_dec.py | ProFatXuanAll/char-RNN | 531f101b3d1ba20bafd28ca060aafe6f583d1efb | [
"Beerware"
] | null | null | null | test/lmp/tknzr/_char/test_batch_enc_and_batch_dec.py | ProFatXuanAll/char-RNN | 531f101b3d1ba20bafd28ca060aafe6f583d1efb | [
"Beerware"
] | null | null | null | """Test token encoding and decoding.
Test target:
- :py:meth:`lmp.tknzr._char.CharTknzr.batch_dec`.
- :py:meth:`lmp.tknzr._char.CharTknzr.batch_enc`.
"""
from lmp.tknzr._base import BOS_TK, BOS_TKID, EOS_TK, EOS_TKID, PAD_TK, PAD_TKID, UNK_TK, UNK_TKID
from lmp.tknzr._char import CharTknzr
def test_cased_batch_enc(... | 20.377193 | 98 | 0.540034 |
9163a2d4c678e10422f00d5cb58625b10a85478b | 1,145 | py | Python | k0emu/debugger/testprogs/fixtures/test_decw.py | mnaberez/k0emu | 1ba4ea0c4ca0dbab3a7b9f4169a81dcdaecc71d5 | [
"BSD-3-Clause"
] | 6 | 2020-02-14T19:05:45.000Z | 2021-06-27T02:22:27.000Z | k0emu/debugger/testprogs/fixtures/test_decw.py | mnaberez/k0emu | 1ba4ea0c4ca0dbab3a7b9f4169a81dcdaecc71d5 | [
"BSD-3-Clause"
] | null | null | null | k0emu/debugger/testprogs/fixtures/test_decw.py | mnaberez/k0emu | 1ba4ea0c4ca0dbab3a7b9f4169a81dcdaecc71d5 | [
"BSD-3-Clause"
] | null | null | null | import itertools
import sys
from k0emu.debug import make_debugger_from_argv
def test(debug, outfile):
low = lambda word: word & 0xff
high = lambda word: word >> 8
psw_iterator = itertools.cycle((0x00, 0x01, 0x10, 0x40, 0x51))
for ax in range(0xFFFF, -1, -1):
psw = next(psw_iterator)
c... | 31.805556 | 74 | 0.50917 |
9163b12a008a6333b35ddf70222bace8fdccd55e | 5,643 | py | Python | model/seq2seq_modified/infer.py | carl-robinson/voice-emotion-seq2seq | 8d32329685fcc61475c6e2dc4063fff181622f83 | [
"MIT"
] | 17 | 2018-10-24T21:05:00.000Z | 2022-01-24T13:14:46.000Z | model/seq2seq_modified/infer.py | carl-robinson/voice-emotion-seq2seq | 8d32329685fcc61475c6e2dc4063fff181622f83 | [
"MIT"
] | 1 | 2019-04-11T03:44:02.000Z | 2019-04-11T20:50:19.000Z | model/seq2seq_modified/infer.py | carl-robinson/voice-emotion-seq2seq | 8d32329685fcc61475c6e2dc4063fff181622f83 | [
"MIT"
] | 3 | 2019-05-28T02:20:02.000Z | 2022-02-19T14:58:04.000Z | #! /usr/bin/env python
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 33.993976 | 134 | 0.704413 |
9163c2a8bc05d884ab5a958ace835face9d8a0e0 | 1,978 | py | Python | methods/covweighting_method.py | rickgroen/cov-weighting | 64c296679cd37e724a03c6dc107606f7048aec96 | [
"MIT"
] | 26 | 2021-01-05T07:10:31.000Z | 2022-03-23T06:31:00.000Z | methods/covweighting_method.py | rickgroen/cov-weighting | 64c296679cd37e724a03c6dc107606f7048aec96 | [
"MIT"
] | 6 | 2021-04-12T16:27:11.000Z | 2022-02-09T07:00:15.000Z | methods/covweighting_method.py | rickgroen/cov-weighting | 64c296679cd37e724a03c6dc107606f7048aec96 | [
"MIT"
] | 7 | 2021-03-08T09:28:05.000Z | 2022-02-23T07:39:29.000Z | import copy
from methods import BaseMethod, get_optimizer
from networks import to_device
import losses
class CoVWeightingMethod(BaseMethod):
def __init__(self, args, loader):
super(CoVWeightingMethod, self).__init__(args, loader)
if args.mode == 'train':
self.criterion = losses.CoVW... | 33.525424 | 103 | 0.646107 |
9163e5568dadc66bff505a0201d67cbfc8b5fcae | 2,478 | py | Python | oscar/lib/python2.7/site-packages/django/template/loader.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/template/loader.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/template/loader.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | from django.utils import six
from django.utils.deprecation import (
DeprecationInstanceCheck, RemovedInDjango20Warning,
)
from . import engines
from .base import Origin
from .exceptions import TemplateDoesNotExist
def get_template(template_name, using=None):
"""
Loads and returns a template f... | 31.769231 | 79 | 0.674334 |
9163f950636007384c2b3890b281495f7571c4f9 | 1,838 | py | Python | setup.py | getdyspatch/dyspatch-python | 23ffb05eff820944acf235fa3b225bf8caec903d | [
"Apache-2.0"
] | null | null | null | setup.py | getdyspatch/dyspatch-python | 23ffb05eff820944acf235fa3b225bf8caec903d | [
"Apache-2.0"
] | null | null | null | setup.py | getdyspatch/dyspatch-python | 23ffb05eff820944acf235fa3b225bf8caec903d | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Dyspatch API
# Introduction The Dyspatch API is based on the REST paradigm, and features resource based URLs with standard HTTP response codes to indicate errors. We use standard HTTP authentication and request verbs, and all responses are JSON formatted. See our [Implementation Guide](ht... | 41.772727 | 845 | 0.73395 |
91640495323aecb2558b215cb1022f9af1a928e3 | 667 | py | Python | custom_components/hacs/utils/decorator.py | Lucstricke/integration | 1543686f3d99c8f16ec4fc37b2edd70b2a3e29a5 | [
"MIT"
] | 1 | 2021-12-12T18:19:48.000Z | 2021-12-12T18:19:48.000Z | custom_components/hacs/utils/decorator.py | Lucstricke/integration | 1543686f3d99c8f16ec4fc37b2edd70b2a3e29a5 | [
"MIT"
] | null | null | null | custom_components/hacs/utils/decorator.py | Lucstricke/integration | 1543686f3d99c8f16ec4fc37b2edd70b2a3e29a5 | [
"MIT"
] | null | null | null | """HACS Decorators."""
import asyncio
from functools import wraps
from typing import Any, Coroutine
def concurrent(concurrenttasks=15, sleepafter=0) -> Coroutine[Any, Any, None]:
"""Return a modified function."""
max_concurrent = asyncio.Semaphore(concurrenttasks)
def inner_function(function) -> Corouti... | 25.653846 | 78 | 0.65967 |
91641e126064c1a1372356c07acbab6fedd6cb39 | 103 | py | Python | rv/tests/setup_package.py | weaverba137/rv | 3c7b467c4964bd3ccaa949ab17c7df4c4ba2ac2a | [
"BSD-3-Clause"
] | 1 | 2016-02-09T16:02:26.000Z | 2016-02-09T16:02:26.000Z | rv/tests/setup_package.py | weaverba137/rv | 3c7b467c4964bd3ccaa949ab17c7df4c4ba2ac2a | [
"BSD-3-Clause"
] | null | null | null | rv/tests/setup_package.py | weaverba137/rv | 3c7b467c4964bd3ccaa949ab17c7df4c4ba2ac2a | [
"BSD-3-Clause"
] | null | null | null | def get_package_data():
return {
_ASTROPY_PACKAGE_NAME_ + '.tests': ['coveragerc', 't/*']}
| 25.75 | 65 | 0.61165 |
91643c7c309fc69a92f92c9d812870e72130ebb4 | 213 | py | Python | binarysearch.io/package_versioning.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 2 | 2020-06-25T21:10:32.000Z | 2020-12-10T06:53:45.000Z | binarysearch.io/package_versioning.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | null | null | null | binarysearch.io/package_versioning.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 3 | 2020-05-15T14:17:09.000Z | 2021-07-25T13:18:20.000Z | class Solution:
def solve(self, older, newer):
# Write your code here
older = list(map(int, older.split(".")))
newer = list(map(int, newer.split(".")))
return newer > older
| 30.428571 | 48 | 0.553991 |
91648a0d04b0146ed57cce21b04323005b920493 | 844 | py | Python | OnshoreReferenceBot/IStructure.py | roy-love/BattleCode2018-ReferenceBot | c017cf804728dd1555ab6a60acdd2a6f7a929281 | [
"MIT"
] | null | null | null | OnshoreReferenceBot/IStructure.py | roy-love/BattleCode2018-ReferenceBot | c017cf804728dd1555ab6a60acdd2a6f7a929281 | [
"MIT"
] | null | null | null | OnshoreReferenceBot/IStructure.py | roy-love/BattleCode2018-ReferenceBot | c017cf804728dd1555ab6a60acdd2a6f7a929281 | [
"MIT"
] | null | null | null | import battlecode as bc
import random
import sys
import traceback
class IStructure:
"""This is the IStructure"""
def __init__(self, gameController, unitController, unit, missionController):
self.game_controller = gameController
self.unit_controller = unitController
self.mission_controll... | 36.695652 | 83 | 0.67891 |
9164ad4b12a4e68464b5c7f2d5b2f7414d70a7f1 | 2,443 | py | Python | alipay/aop/api/domain/AlipaySocialBaseQuestInstanceAddModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipaySocialBaseQuestInstanceAddModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipaySocialBaseQuestInstanceAddModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipaySocialBaseQuestInstanceAddModel(object):
def __init__(self):
self._quest_id = None
self._remind_time_range = None
self._source_id = None
self._user_id = None... | 28.406977 | 85 | 0.596398 |
9164d9982842c08f96c408b94e10d158dcc3025e | 14,832 | py | Python | omf_to_plotly.py | plotly/open-mining-format-omf | f5760017ae8d9c0cb99642c2be02ac26397dc4ab | [
"MIT"
] | 1 | 2019-12-06T19:54:05.000Z | 2019-12-06T19:54:05.000Z | omf_to_plotly.py | plotly/open-mining-format-omf | f5760017ae8d9c0cb99642c2be02ac26397dc4ab | [
"MIT"
] | null | null | null | omf_to_plotly.py | plotly/open-mining-format-omf | f5760017ae8d9c0cb99642c2be02ac26397dc4ab | [
"MIT"
] | null | null | null | import omf
import vectormath
import numpy as np
import plotly.graph_objects as go
class TypeError(Exception):
pass
class DataError(Exception):
pass
def pointset_to_scatter3d(projO, pointset, usercolor=None, markersize=8, dataindex=0):
"""
projO: vectormath.vector.Vector3; Project... | 47.235669 | 128 | 0.597896 |
9164d9b054c039252f48458739e9165b6d29ab95 | 5,034 | py | Python | integrations/tensorflow/e2e/keras/keras_vision_model_test.py | EmperorYP7/iree | fffa1f3e33bc1031c790583166ce82c91dd8b3e7 | [
"Apache-2.0"
] | 1 | 2020-08-13T09:25:59.000Z | 2020-08-13T09:25:59.000Z | integrations/tensorflow/e2e/keras/keras_vision_model_test.py | EmperorYP7/iree | fffa1f3e33bc1031c790583166ce82c91dd8b3e7 | [
"Apache-2.0"
] | null | null | null | integrations/tensorflow/e2e/keras/keras_vision_model_test.py | EmperorYP7/iree | fffa1f3e33bc1031c790583166ce82c91dd8b3e7 | [
"Apache-2.0"
] | null | null | null | # Lint as: python3
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 34.479452 | 80 | 0.68971 |
916503e5b495525c4d81ddd3d3448255a587e5c9 | 2,989 | py | Python | configurations/featharalick_pl_blend5_convroll4_fastpool_1024_weightdecay_no_dropout_33_66.py | YingK001/- | 11a66cdbddee16c69514b9530a727df0ac6e136f | [
"MIT"
] | 628 | 2015-03-25T17:32:30.000Z | 2021-07-30T18:24:33.000Z | configurations/featharalick_pl_blend5_convroll4_fastpool_1024_weightdecay_no_dropout_33_66.py | YingK001/- | 11a66cdbddee16c69514b9530a727df0ac6e136f | [
"MIT"
] | 4 | 2015-04-06T10:23:19.000Z | 2017-01-10T18:47:49.000Z | configurations/featharalick_pl_blend5_convroll4_fastpool_1024_weightdecay_no_dropout_33_66.py | YingK001/- | 11a66cdbddee16c69514b9530a727df0ac6e136f | [
"MIT"
] | 253 | 2015-03-25T18:08:43.000Z | 2022-01-26T22:35:05.000Z | import numpy as np
import theano
import theano.tensor as T
import lasagne as nn
import data
import load
import nn_plankton
import dihedral
import tmp_dnn
import tta
features = [
# "hu",
# "tutorial",
"haralick",
# "aaronmoments",
# "lbp",
# "pftas",
# "zernike_moments",
# "image_siz... | 33.58427 | 194 | 0.745065 |
91650575ede8d5e4f3f72a4a39fe20bd30463372 | 2,595 | py | Python | classification/tool/kmean.py | SunAhong1993/sz-demo | bc5e301f7d235c00ce21d4ad64f2af038b27478a | [
"Apache-2.0"
] | 1 | 2019-09-25T03:42:57.000Z | 2019-09-25T03:42:57.000Z | classification/tool/kmean.py | SunAhong1993/sz-demo | bc5e301f7d235c00ce21d4ad64f2af038b27478a | [
"Apache-2.0"
] | null | null | null | classification/tool/kmean.py | SunAhong1993/sz-demo | bc5e301f7d235c00ce21d4ad64f2af038b27478a | [
"Apache-2.0"
] | 2 | 2019-09-16T02:03:49.000Z | 2019-09-16T12:21:47.000Z | # -*- coding: UTF-8 -*-
import cv2
import os
import numpy as np
import sys
import pickle
import argparse
import functools
import random as rdm
#import matplotlib
#matplotlib.use('TkAgg')
from PCV.tools import imtools
from scipy import *
from pylab import *
from scipy.cluster.vq import *
from PCV.tools import pca
def ... | 29.157303 | 107 | 0.640848 |
916547cd20ae702ab122c55a3f395eea44869d5e | 13,027 | py | Python | swimpy/grass.py | mwort/swimpy | 2bfe83372f62d19072aee3be096549e7edf3cf3b | [
"MIT"
] | null | null | null | swimpy/grass.py | mwort/swimpy | 2bfe83372f62d19072aee3be096549e7edf3cf3b | [
"MIT"
] | null | null | null | swimpy/grass.py | mwort/swimpy | 2bfe83372f62d19072aee3be096549e7edf3cf3b | [
"MIT"
] | null | null | null | """A module to interface SWIM and GRASS.
The main classes/plugins are interfaces to the *m.swim* GRASS modules and can
execute them without ever starting GRASS if the following projects are given:
grass_db : str path
The path to the GRASS database directory.
grass_location : str
The location name.
grass_mapse... | 38.314706 | 79 | 0.665003 |
9165518337e2ee099d0b3fcf41f93946538802c8 | 2,799 | py | Python | Miroslaw/models.py | rolando-archive/theusual-kaggle-seeclickfix-ensemble | 6879d4e5686443a3ad7d7b91062c51d7241e9125 | [
"BSD-3-Clause"
] | 16 | 2015-01-02T09:09:41.000Z | 2019-12-11T14:11:44.000Z | Miroslaw/models.py | rolando-archive/theusual-kaggle-seeclickfix-ensemble | 6879d4e5686443a3ad7d7b91062c51d7241e9125 | [
"BSD-3-Clause"
] | 1 | 2019-12-11T14:20:07.000Z | 2019-12-11T14:20:07.000Z | Miroslaw/models.py | rolando-archive/theusual-kaggle-seeclickfix-ensemble | 6879d4e5686443a3ad7d7b91062c51d7241e9125 | [
"BSD-3-Clause"
] | 15 | 2015-01-02T09:10:43.000Z | 2019-12-11T14:11:51.000Z | import pandas as pd
import numpy as np
import logging
import config, utils, datasets, model_types, predict, cross_validation
logger = logging.getLogger(__name__)
def make_model(name):
cfgs = config.model_configs(name)
try:
model_class = getattr(model_types, cfgs['model'])
except AttributeError:
... | 32.546512 | 85 | 0.642372 |
91656b8a06bcd06442e711a35c4b6c5ab399c55d | 3,495 | py | Python | premade_modules/2.78/2.78c/bpy/app/__init__.py | echantry/fake-bpy-module | 004cdf198841e639b7d9a4c4db95ca1c0d3aa2c7 | [
"MIT"
] | null | null | null | premade_modules/2.78/2.78c/bpy/app/__init__.py | echantry/fake-bpy-module | 004cdf198841e639b7d9a4c4db95ca1c0d3aa2c7 | [
"MIT"
] | null | null | null | premade_modules/2.78/2.78c/bpy/app/__init__.py | echantry/fake-bpy-module | 004cdf198841e639b7d9a4c4db95ca1c0d3aa2c7 | [
"MIT"
] | null | null | null | from . import translations
from . import handlers
background = None
'''Boolean, True when blender is running without a user interface (started with -b) '''
translations = None
'''Application and addons internationalization API '''
build_branch = None
'''The branch this blender instance was built from '''
build_cfla... | 40.172414 | 522 | 0.732761 |
91658748728a9ade5cbb24621e6f615bcd107feb | 10,834 | py | Python | models/transformers/configuration_utils.py | 20000607-lxc/BERT-NER-Pytorch-master | 47f2e1291ab53674986eb91abdb72693eafe9b61 | [
"MIT"
] | 8 | 2022-02-23T08:41:26.000Z | 2022-03-14T11:42:51.000Z | models/transformers/configuration_utils.py | Oahihs/BERT-NER-Pytorch | 4bae5795df64eab35a75f9bbb0cfdb9fb4cb4583 | [
"MIT"
] | 2 | 2021-08-10T13:42:34.000Z | 2021-11-21T08:34:15.000Z | models/transformers/configuration_utils.py | Oahihs/BERT-NER-Pytorch | 4bae5795df64eab35a75f9bbb0cfdb9fb4cb4583 | [
"MIT"
] | 2 | 2022-03-09T01:50:40.000Z | 2022-03-21T09:23:09.000Z | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 51.590476 | 296 | 0.665682 |
9165e762aa570826492e973b3713b9607a0967f0 | 25,131 | py | Python | validateRedfish.py | aheynig/Redfish-Service-Validator | 0acc466582adccefcba96c7904c767155b7e2576 | [
"CNRI-Python",
"Linux-OpenIB"
] | 22 | 2017-08-23T16:47:35.000Z | 2022-03-21T09:35:42.000Z | validateRedfish.py | aheynig/Redfish-Service-Validator | 0acc466582adccefcba96c7904c767155b7e2576 | [
"CNRI-Python",
"Linux-OpenIB"
] | 404 | 2017-03-09T05:23:50.000Z | 2022-03-30T03:13:52.000Z | validateRedfish.py | aheynig/Redfish-Service-Validator | 0acc466582adccefcba96c7904c767155b7e2576 | [
"CNRI-Python",
"Linux-OpenIB"
] | 27 | 2017-03-06T17:33:56.000Z | 2022-03-30T21:03:25.000Z |
from collections import Counter, OrderedDict
from common.catalog import REDFISH_ABSENT, MissingSchemaError, ExcerptTypes, get_fuzzy_property
from common.helper import getNamespace, getNamespaceUnversioned, getType, checkPayloadConformance
import logging
my_logger = logging.getLogger()
my_logger.setLevel(logging.DEB... | 46.452865 | 178 | 0.597429 |
9165ec725a98dd6294a4c1f7d11e8d52c8e0b3f9 | 4,831 | py | Python | pycycle/elements/performance.py | swryan/pyCycleOld | fbab35b74d0e5487abe686ae0823ff52e75afb3b | [
"Apache-2.0"
] | null | null | null | pycycle/elements/performance.py | swryan/pyCycleOld | fbab35b74d0e5487abe686ae0823ff52e75afb3b | [
"Apache-2.0"
] | null | null | null | pycycle/elements/performance.py | swryan/pyCycleOld | fbab35b74d0e5487abe686ae0823ff52e75afb3b | [
"Apache-2.0"
] | null | null | null | from openmdao.api import ExplicitComponent
from six.moves import range
class Performance(ExplicitComponent):
"""Component to calculate overall engine performance parameters"""
def initialize(self):
self.options.declare('num_nozzles', default=1, types=int)
self.options.declare('num_burners', ... | 37.449612 | 122 | 0.589526 |
91664faa298ee41540b5e445798161d2ad242cb1 | 3,035 | py | Python | tests/rest/test_religion.py | UniStuttgart-VISUS/damast | 05ceb150e86227d81f0f4bb441af6d4f8bce65ee | [
"MIT"
] | 2 | 2021-12-22T17:01:02.000Z | 2022-01-18T17:05:48.000Z | tests/rest/test_religion.py | UniStuttgart-VISUS/damast | 05ceb150e86227d81f0f4bb441af6d4f8bce65ee | [
"MIT"
] | 94 | 2021-12-22T11:21:57.000Z | 2022-03-31T22:40:56.000Z | tests/rest/test_religion.py | UniStuttgart-VISUS/damast | 05ceb150e86227d81f0f4bb441af6d4f8bce65ee | [
"MIT"
] | 1 | 2022-01-04T09:04:47.000Z | 2022-01-04T09:04:47.000Z | import pytest
import damast
import flask
import json
from conftest import get_headers
@pytest.mark.parametrize('method', ['POST', 'TRACE', 'CONNECT', 'PUT', 'PATCH', 'DELETE'])
@pytest.mark.parametrize('route', ['/rest/religion-list', '/rest/religions'])
def test_method_not_allowed(client_ro, minimal_testuser, metho... | 33.722222 | 124 | 0.635255 |
9166799d69f4efeccd7ead4faa3b61c0d44e6709 | 1,942 | py | Python | demo_custom_coordinates.py | tigerneil/scattertext | 23351895ada347fae300bf910c2c77f47ac58a35 | [
"Apache-2.0"
] | 2 | 2019-03-08T23:02:25.000Z | 2019-12-27T14:18:53.000Z | demo_custom_coordinates.py | tigerneil/scattertext | 23351895ada347fae300bf910c2c77f47ac58a35 | [
"Apache-2.0"
] | null | null | null | demo_custom_coordinates.py | tigerneil/scattertext | 23351895ada347fae300bf910c2c77f47ac58a35 | [
"Apache-2.0"
] | 1 | 2020-01-08T00:25:31.000Z | 2020-01-08T00:25:31.000Z | import numpy as np
import spacy
from sklearn.linear_model import LogisticRegression
from scattertext import SampleCorpora
from scattertext import produce_scattertext_explorer
from scattertext.CorpusFromPandas import CorpusFromPandas
from scattertext.Scalers import scale
nlp = spacy.load('en')
convention_df = SampleCo... | 40.458333 | 99 | 0.555613 |
91668563510c2f2597dea5c75ce3090a4be2b515 | 2,690 | py | Python | ncclient/operations/third_party/alu/rpc.py | mikiec84/ncclient | 7662666aac957fcf6aeb50c05f6b9816179cfd23 | [
"Apache-2.0"
] | 498 | 2015-10-21T18:43:23.000Z | 2022-03-29T17:27:59.000Z | ncclient/operations/third_party/alu/rpc.py | mikiec84/ncclient | 7662666aac957fcf6aeb50c05f6b9816179cfd23 | [
"Apache-2.0"
] | 440 | 2015-09-07T23:43:01.000Z | 2022-03-17T11:43:16.000Z | ncclient/operations/third_party/alu/rpc.py | mikiec84/ncclient | 7662666aac957fcf6aeb50c05f6b9816179cfd23 | [
"Apache-2.0"
] | 330 | 2015-09-10T16:53:50.000Z | 2022-03-31T12:24:53.000Z | # by Pasi Sikala <pasi.sikala@elisa.fi>
from ncclient.xml_ import *
from ncclient.operations.rpc import RPC
from ncclient.operations import util
class ShowCLI(RPC):
def request(self, command=None):
"""Run CLI -show commands
*command* (show) command to run
"""
node = new_ele('get... | 33.209877 | 121 | 0.568401 |
9166d4ed42bc1d95e14fd0bf1f44089f57be63c6 | 4,740 | py | Python | Projects/P6 Random Walk/main.py | jonnydc4/CS1400Winter2021 | 58e1520bcd2e43cc212517737e5b6b47cdbe1855 | [
"Apache-2.0"
] | null | null | null | Projects/P6 Random Walk/main.py | jonnydc4/CS1400Winter2021 | 58e1520bcd2e43cc212517737e5b6b47cdbe1855 | [
"Apache-2.0"
] | null | null | null | Projects/P6 Random Walk/main.py | jonnydc4/CS1400Winter2021 | 58e1520bcd2e43cc212517737e5b6b47cdbe1855 | [
"Apache-2.0"
] | null | null | null | from turtle import Turtle
from scipy.stats import variation
from numpy import random, mean, max, min
from math import hypot
'''
Jonathon Carr
CS1400-007
12/5/20
P6 Random walks
My program will be able to track the random walks of Pa, Mi-Ma, and Reg. It will return the maximum and minimum
distance of each walk as well... | 29.625 | 121 | 0.622785 |
9166e2ca93c38c8b414e524234c2173e6ec806bd | 2,293 | py | Python | plan2explore/tools/streaming_mean.py | sarthak268/plan2explore | 264f513d46c6e971d5523782344a694b17139a20 | [
"Apache-2.0"
] | 189 | 2020-05-13T01:12:03.000Z | 2022-03-23T01:38:56.000Z | plan2explore/tools/streaming_mean.py | sarthak268/plan2explore | 264f513d46c6e971d5523782344a694b17139a20 | [
"Apache-2.0"
] | 13 | 2020-05-12T22:51:07.000Z | 2022-03-12T00:28:47.000Z | plan2explore/tools/streaming_mean.py | sarthak268/plan2explore | 264f513d46c6e971d5523782344a694b17139a20 | [
"Apache-2.0"
] | 24 | 2020-05-14T03:47:50.000Z | 2021-09-26T04:20:36.000Z | # Copyright 2019 The Dreamer Authors. Copyright 2020 Plan2Explore 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... | 34.742424 | 95 | 0.692979 |
9166f6b2906c9ad2f760b1f1ecae9a7f6441b26a | 448 | py | Python | roles/locale/molecule/default/tests/test_default.py | escalate/my-smart-home | a9579c845761b980515ff34d2a95568c6e7c2b6c | [
"MIT"
] | 1 | 2021-07-21T08:12:39.000Z | 2021-07-21T08:12:39.000Z | molecule/default/tests/test_default.py | escalate/ansible-raspberry-locales | 8990d8bf70011279ff7ea95358eddd0d2a25f8d4 | [
"MIT"
] | null | null | null | molecule/default/tests/test_default.py | escalate/ansible-raspberry-locales | 8990d8bf70011279ff7ea95358eddd0d2a25f8d4 | [
"MIT"
] | null | null | null | """Role testing files using testinfra"""
def test_locale_generation(host):
"""Check locale generation"""
f = host.file("/etc/locale.gen")
assert f.is_file
assert "# en_GB.UTF-8 UTF-8" not in f.content_string
cmd = host.run("locale --all-locales")
assert "en_GB.utf8" in cmd.stdout
def test_d... | 24.888889 | 56 | 0.667411 |
91670025f11c60f3feb2b5890fb93c9d606176a1 | 21,708 | py | Python | cartridge/shop/migrations/0011_auto__add_uses_remaining.py | AlexHill/cartridge | cb8599d43600442a223a484dc75726bfbbec68a0 | [
"BSD-2-Clause"
] | null | null | null | cartridge/shop/migrations/0011_auto__add_uses_remaining.py | AlexHill/cartridge | cb8599d43600442a223a484dc75726bfbbec68a0 | [
"BSD-2-Clause"
] | null | null | null | cartridge/shop/migrations/0011_auto__add_uses_remaining.py | AlexHill/cartridge | cb8599d43600442a223a484dc75726bfbbec68a0 | [
"BSD-2-Clause"
] | null | null | null | from __future__ import unicode_literals
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'DiscountCode.uses_remaining'
db.add_column('shop_di... | 86.142857 | 197 | 0.561913 |
91670874651d2ef44bc1da90f5379400b8f1569c | 4,916 | py | Python | models/train_classifier.py | whamer/Udacity_Data_Science_2 | 60f4d02344e25bef73dee33086a7ccab6e902156 | [
"Apache-2.0"
] | null | null | null | models/train_classifier.py | whamer/Udacity_Data_Science_2 | 60f4d02344e25bef73dee33086a7ccab6e902156 | [
"Apache-2.0"
] | null | null | null | models/train_classifier.py | whamer/Udacity_Data_Science_2 | 60f4d02344e25bef73dee33086a7ccab6e902156 | [
"Apache-2.0"
] | null | null | null | import sys
import nltk
nltk.download('wordnet')
nltk.download('punkt')
import pandas as pd
from sqlalchemy.engine import create_engine
from nltk.tokenize import word_tokenize
from nltk.stem import WordNetLemmatizer
import numpy as np
from sklearn.datasets import make_multilabel_classification
from sklearn.multioutput... | 28.917647 | 166 | 0.679821 |
9167478bd3acf44b9ed35933a05ec8b8886e687f | 36 | py | Python | brownian/__init__.py | rmorshea/quantfi | bb29364fe19c20ab2fe77263c474b147c795a058 | [
"MIT"
] | null | null | null | brownian/__init__.py | rmorshea/quantfi | bb29364fe19c20ab2fe77263c474b147c795a058 | [
"MIT"
] | null | null | null | brownian/__init__.py | rmorshea/quantfi | bb29364fe19c20ab2fe77263c474b147c795a058 | [
"MIT"
] | null | null | null | __all__ = ["exp", "expmo", "wiener"] | 36 | 36 | 0.583333 |
916770242c9112bb0d51dab31f66fd0883b5dbcd | 453 | py | Python | diesel/util/stats.py | msabramo/diesel | a1ed7ed0358d0fec8592e23aafc3b7ec167ab649 | [
"BSD-3-Clause"
] | 224 | 2015-01-03T06:33:05.000Z | 2021-11-22T03:19:02.000Z | diesel/util/stats.py | dowski/diesel | d9824e467805caf40e0ba21b88a27db38e64c352 | [
"BSD-3-Clause"
] | 12 | 2015-01-01T03:35:15.000Z | 2021-05-22T23:37:28.000Z | diesel/util/stats.py | dowski/diesel | d9824e467805caf40e0ba21b88a27db38e64c352 | [
"BSD-3-Clause"
] | 37 | 2015-01-04T01:47:55.000Z | 2022-03-03T02:04:15.000Z |
from diesel import core
class CPUStats(object):
def __init__(self):
self.caller = core.current_loop
self.cpu_seconds = 0.0
def __enter__(self):
self.start_clock = self.caller.clocktime()
return self
def __exit__(self, exc_type, exc_val, exc_tb):
if not (exc_type a... | 25.166667 | 59 | 0.644592 |
91677631f1a0b73fabb9a227255fbf09923d8174 | 1,676 | py | Python | API/src/main/resources/Lib/xlrd/timemachine.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | API/src/main/resources/Lib/xlrd/timemachine.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | API/src/main/resources/Lib/xlrd/timemachine.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | # Copyright (c) 2010-2020, sikuli.org, sikulix.com - MIT license
##
##
# timemachine.py -- adaptation for single codebase.
# Currently supported: 2.6 to 2.7, 3.2+
# usage: from timemachine import *
from __future__ import print_function
import sys
python_version = sys.version_info[:2] # e.g. version 2.6 -> (2, 6)
... | 31.622642 | 88 | 0.621122 |
9167c8fcf5dd1a4d9293e56461d47ca0c92a2819 | 7,756 | py | Python | homeassistant/components/homekit/type_fans.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 1 | 2020-04-07T15:44:54.000Z | 2020-04-07T15:44:54.000Z | homeassistant/components/homekit/type_fans.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 3 | 2021-09-08T03:31:36.000Z | 2022-03-12T01:00:03.000Z | homeassistant/components/homekit/type_fans.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 2 | 2020-04-19T13:35:24.000Z | 2020-04-19T13:35:51.000Z | """Class to hold all light accessories."""
import logging
from pyhap.const import CATEGORY_FAN
from homeassistant.components.fan import (
ATTR_DIRECTION,
ATTR_OSCILLATING,
ATTR_SPEED,
ATTR_SPEED_LIST,
DIRECTION_FORWARD,
DIRECTION_REVERSE,
DOMAIN,
SERVICE_OSCILLATE,
SERVICE_SET_DIRE... | 39.774359 | 86 | 0.640536 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.