hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1743d8baaa44407fe5ebdb2b00eba460ef1a2ae9 | 3,783 | py | Python | long_term_operation/output_check.py | nareshram256/EnergyManagementSystem | 2a48ba3b9bf7ff3003c197ee43ea9efbfbe42baa | [
"MIT"
] | 9 | 2020-04-24T14:34:16.000Z | 2022-01-25T07:16:03.000Z | long_term_operation/output_check.py | casemsee/EnergyManagementSystem | 2a48ba3b9bf7ff3003c197ee43ea9efbfbe42baa | [
"MIT"
] | null | null | null | long_term_operation/output_check.py | casemsee/EnergyManagementSystem | 2a48ba3b9bf7ff3003c197ee43ea9efbfbe42baa | [
"MIT"
] | 7 | 2019-09-19T13:26:02.000Z | 2021-11-27T09:53:54.000Z | # Output check procedure for optimal power flow
# The following rules are used to test the feasiblity of output
# 1) Active power balancing of on AC bus
# 2) Reactive power balancing of on DC bus
from configuration.configuration_time_line import default_look_ahead_time_step
from utils import Logger
logger = Logger("L... | 50.44 | 105 | 0.602961 |
d0615e0efa9de03ccf777c9dae01830988fa3d31 | 5,217 | py | Python | sconscontrib/SCons/Tool/gob2/__init__.py | kprussing/scons-contrib | cc5ae3b212bd7c5fe40bdc79460cfe7e6c6bcff1 | [
"MIT"
] | null | null | null | sconscontrib/SCons/Tool/gob2/__init__.py | kprussing/scons-contrib | cc5ae3b212bd7c5fe40bdc79460cfe7e6c6bcff1 | [
"MIT"
] | null | null | null | sconscontrib/SCons/Tool/gob2/__init__.py | kprussing/scons-contrib | cc5ae3b212bd7c5fe40bdc79460cfe7e6c6bcff1 | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright The SCons Foundation
#
# 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, ... | 28.048387 | 79 | 0.665133 |
231c2e9a3709bc0712136f20013663c4962d91cf | 4,512 | py | Python | 25d_esa_field.py | spatialaudio/improved_driving_functions_for_rectangular_loudspeaker_arrays | 91885b4ea86a714c27a315bcc33519427830b9f3 | [
"MIT"
] | 2 | 2016-04-27T14:12:36.000Z | 2017-10-19T14:55:08.000Z | 25d_esa_field.py | spatialaudio/improved_driving_functions_for_rectangular_loudspeaker_arrays | 91885b4ea86a714c27a315bcc33519427830b9f3 | [
"MIT"
] | null | null | null | 25d_esa_field.py | spatialaudio/improved_driving_functions_for_rectangular_loudspeaker_arrays | 91885b4ea86a714c27a315bcc33519427830b9f3 | [
"MIT"
] | null | null | null | """ Generates Figure 4a of the paper
Sascha Spors, Frank Schultz, and Till Rettberg. Improved Driving Functions
for Rectangular Loudspeaker Arrays Driven by Sound Field Synthesis. In
German Annual Conference on Acoustics (DAGA), March 2016.
2.5D synthesis of a point source with the equivalent scatterin... | 33.176471 | 125 | 0.63586 |
61ccc0f503b0455a16862eb6db12c247fa61718f | 3,963 | py | Python | src/backend/apps/posts/models.py | Vixx-X/ati-project | 0ef80772a6fc3807e401cf58b9e15f3628373383 | [
"MIT"
] | null | null | null | src/backend/apps/posts/models.py | Vixx-X/ati-project | 0ef80772a6fc3807e401cf58b9e15f3628373383 | [
"MIT"
] | 61 | 2021-06-10T03:27:06.000Z | 2022-03-12T01:01:34.000Z | src/backend/apps/posts/models.py | Vixx-X/ati-project | 0ef80772a6fc3807e401cf58b9e15f3628373383 | [
"MIT"
] | null | null | null | """
Models for User module
"""
from datetime import datetime, timedelta
from flask_babel import format_datetime as _d
from flask_babel import lazy_gettext as _
from flask_user import current_user
from backend import db
from backend.apps.media.models import Media
from backend.apps.user.models import User
def get_ti... | 22.907514 | 72 | 0.590714 |
b1bffb3105a3157895b8216c7c786bc7cef094bc | 437 | py | Python | tests/sudoku_test.py | colincoleman/su_doku_solver | 2cd8da1055e4a4ea98a50bb19636743bc90e555a | [
"MIT"
] | null | null | null | tests/sudoku_test.py | colincoleman/su_doku_solver | 2cd8da1055e4a4ea98a50bb19636743bc90e555a | [
"MIT"
] | null | null | null | tests/sudoku_test.py | colincoleman/su_doku_solver | 2cd8da1055e4a4ea98a50bb19636743bc90e555a | [
"MIT"
] | null | null | null | from src.sudoku.puzzle import Puzzle
from src.sudoku.sudoku import init_puzzle, parse_input_file
input_file = './example_puzzle.txt'
def test_init_puzzle():
this_puzzle = Puzzle()
assert this_puzzle.cells[0].definite_value == "_"
init_puzzle(this_puzzle)
assert this_puzzle.cells[0].definite_value == ... | 25.705882 | 59 | 0.745995 |
6a688cbf2c652d170f704aa32e86cd43f01d5812 | 6,531 | py | Python | mmtbx/building/loop_closure/starting_conformations.py | TheApacheCats/cctbx_project | 94e3e85dd6385f0dc3f45077b743757d22b19391 | [
"BSD-3-Clause-LBNL"
] | 2 | 2021-03-18T12:31:57.000Z | 2022-03-14T06:27:06.000Z | mmtbx/building/loop_closure/starting_conformations.py | indu-in/cctbx_project1 | e09447ddc2ba3aa9d91b21008b0162ab290b0c30 | [
"BSD-3-Clause-LBNL"
] | null | null | null | mmtbx/building/loop_closure/starting_conformations.py | indu-in/cctbx_project1 | e09447ddc2ba3aa9d91b21008b0162ab290b0c30 | [
"BSD-3-Clause-LBNL"
] | null | null | null | from __future__ import absolute_import, division, print_function
from mmtbx.building.loop_closure import utils
from mmtbx.validation import ramalyze
import itertools
from libtbx.utils import null_out
import boost.python
from six.moves import zip
from six.moves import range
ext = boost.python.import_ext("mmtbx_validat... | 39.581818 | 113 | 0.709845 |
7ed4d3633bc09c79632206626b14270b86b19a01 | 2,581 | py | Python | coupling_examples/Layout_1x2.py | ebranlard/wiz | 6dfca8b2711b670229f5b2b3b3e0d7fe0bdea156 | [
"MIT"
] | 5 | 2020-06-16T11:58:10.000Z | 2022-01-03T17:09:55.000Z | coupling_examples/Layout_1x2.py | ebranlard/wiz | 6dfca8b2711b670229f5b2b3b3e0d7fe0bdea156 | [
"MIT"
] | null | null | null | coupling_examples/Layout_1x2.py | ebranlard/wiz | 6dfca8b2711b670229f5b2b3b3e0d7fe0bdea156 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import make_axes_locatable
from floris.induction import options_dict
from helper_functions import *
fontsize = 12
plt.rc('font', family='serif')
plt.rc('font', size=12)
# --- Plot options
bExport=False
bCompute=True
bColorBar=False
nStrea... | 27.752688 | 99 | 0.656722 |
4e94d14f9e33f8f9ececcad8dc9ae7bf9c8c11b5 | 1,924 | py | Python | tests/integration/goldens/eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_trigger_async.py | googleapis/client-generator-python | db9ed9177e65aff07a0c1addf73c32da4dabcaf9 | [
"Apache-2.0"
] | null | null | null | tests/integration/goldens/eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_trigger_async.py | googleapis/client-generator-python | db9ed9177e65aff07a0c1addf73c32da4dabcaf9 | [
"Apache-2.0"
] | null | null | null | tests/integration/goldens/eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_trigger_async.py | googleapis/client-generator-python | db9ed9177e65aff07a0c1addf73c32da4dabcaf9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2022 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... | 32.066667 | 85 | 0.746362 |
585930e16b00b1d3f8e374c1f595558366d775b4 | 156,924 | py | Python | salt/config/__init__.py | newwebash/salt | 133d0986be65a29373eb7de1269d3d9cec204cea | [
"Apache-2.0"
] | null | null | null | salt/config/__init__.py | newwebash/salt | 133d0986be65a29373eb7de1269d3d9cec204cea | [
"Apache-2.0"
] | null | null | null | salt/config/__init__.py | newwebash/salt | 133d0986be65a29373eb7de1269d3d9cec204cea | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
All salt configuration loading and defaults should be in this module
'''
# Import python libs
from __future__ import absolute_import, print_function, unicode_literals, generators
import os
import re
import sys
import glob
import time
import codecs
import logging
import types
from copy impor... | 37.425233 | 130 | 0.631777 |
ceeefd5c05add6402c025389eb298a9cc60347e9 | 9,573 | py | Python | src/m7_loops_within_loops_graphics.py | chenx16/20-Exam3Practice | f4652d66a12219980b8f740358ecc0d20b10c129 | [
"MIT"
] | null | null | null | src/m7_loops_within_loops_graphics.py | chenx16/20-Exam3Practice | f4652d66a12219980b8f740358ecc0d20b10c129 | [
"MIT"
] | null | null | null | src/m7_loops_within_loops_graphics.py | chenx16/20-Exam3Practice | f4652d66a12219980b8f740358ecc0d20b10c129 | [
"MIT"
] | null | null | null | """
PRACTICE Exam 3.
This problem provides practice at:
*** LOOPS WITHIN LOOPS in 2D GRAPHICS problems. ***
Authors: David Mutchler, Vibha Alangar, Matt Boutell, Dave Fisher,
Mark Hays, Amanda Stouder, Aaron Wilkin, their colleagues,
and Xinlai Chen.
""" # done: 1. PUT YOUR NAME IN THE ABOVE LI... | 37.837945 | 79 | 0.510603 |
b5a8bf7dd3d5e6764fa22fa5a9e7dbd6b4039b76 | 4,192 | py | Python | src/postprocessing/review.py | ryanlayerlab/hypedsearch | 7d3421cbbf8d9eea3ca334c4ec72b35bd0d3976c | [
"MIT"
] | null | null | null | src/postprocessing/review.py | ryanlayerlab/hypedsearch | 7d3421cbbf8d9eea3ca334c4ec72b35bd0d3976c | [
"MIT"
] | null | null | null | src/postprocessing/review.py | ryanlayerlab/hypedsearch | 7d3421cbbf8d9eea3ca334c4ec72b35bd0d3976c | [
"MIT"
] | 1 | 2021-07-10T13:19:07.000Z | 2021-07-10T13:19:07.000Z | from objects import SequenceAlignment, Alignments
def __is_swap_up_to_dist(a: str, b: str, i: int, j: int, dist: int, d: list) -> list:
'''
Helper function to edit distance long swaps. Helps identify potential swaps
and if two chars could be swapped then the entry to d is returned
'''
# first ... | 29.521127 | 100 | 0.515506 |
63333853a38c9cd2f7f6d6af5e0e8549e8b836b0 | 12,754 | py | Python | tests/test_client_session.py | MarcoSulla/aiohttp | 889b7f1450d0e604bcf5dabce1932e2f0f72fb6b | [
"Apache-2.0"
] | 1 | 2021-07-07T06:36:57.000Z | 2021-07-07T06:36:57.000Z | tests/test_client_session.py | MarcoSulla/aiohttp | 889b7f1450d0e604bcf5dabce1932e2f0f72fb6b | [
"Apache-2.0"
] | null | null | null | tests/test_client_session.py | MarcoSulla/aiohttp | 889b7f1450d0e604bcf5dabce1932e2f0f72fb6b | [
"Apache-2.0"
] | 1 | 2021-02-09T10:05:59.000Z | 2021-02-09T10:05:59.000Z | import asyncio
import contextlib
import gc
import re
import types
from unittest import mock
from multidict import CIMultiDict, MultiDict
import aiohttp
import pytest
from aiohttp.client import ClientSession
from aiohttp.connector import BaseConnector, TCPConnector
@pytest.fixture
def connector(loop):
conn = Bas... | 34.284946 | 78 | 0.553238 |
ea11abdd753e3cc5cc36821cff20e94030356b2d | 1,889 | py | Python | integrationtest/vm/installation/upgrade/test_zs_degd_latest_1.2_on_cos7.py | sherry546/zstack-woodpecker | 54a37459f2d72ce6820974feaa6eb55772c3d2ce | [
"Apache-2.0"
] | 1 | 2021-03-21T12:41:11.000Z | 2021-03-21T12:41:11.000Z | integrationtest/vm/installation/upgrade/test_zs_degd_latest_1.2_on_cos7.py | sherry546/zstack-woodpecker | 54a37459f2d72ce6820974feaa6eb55772c3d2ce | [
"Apache-2.0"
] | null | null | null | integrationtest/vm/installation/upgrade/test_zs_degd_latest_1.2_on_cos7.py | sherry546/zstack-woodpecker | 54a37459f2d72ce6820974feaa6eb55772c3d2ce | [
"Apache-2.0"
] | 1 | 2017-05-19T06:40:40.000Z | 2017-05-19T06:40:40.000Z | '''
@author: MengLai
'''
import os
import tempfile
import uuid
import time
import zstackwoodpecker.test_util as test_util
import zstackwoodpecker.test_lib as test_lib
import zstackwoodpecker.test_state as test_state
test_stub = test_lib.lib_get_test_stub()
test_obj_dict = test_state.TestStateDict()
tm... | 34.345455 | 107 | 0.719428 |
d4fe37f1f7ba1233c145b43420b8ab947e3b7681 | 29,722 | py | Python | pysnmp/CISCO-GSLB-SYSTEM-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/CISCO-GSLB-SYSTEM-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/CISCO-GSLB-SYSTEM-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module CISCO-GSLB-SYSTEM-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-GSLB-SYSTEM-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:42:14 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (def... | 136.967742 | 4,420 | 0.763811 |
fa02ec48c79fd33e60017502c3eecba6a950fe2d | 2,879 | py | Python | machine_learning/project5/binary_classification.py | buivn/Learning | 27cd468512c9d6640b5dcfecb00cd76ee6686847 | [
"BSD-2-Clause"
] | null | null | null | machine_learning/project5/binary_classification.py | buivn/Learning | 27cd468512c9d6640b5dcfecb00cd76ee6686847 | [
"BSD-2-Clause"
] | null | null | null | machine_learning/project5/binary_classification.py | buivn/Learning | 27cd468512c9d6640b5dcfecb00cd76ee6686847 | [
"BSD-2-Clause"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import helpers
def svm_train_brute(training_data):
# w for data 1,2,3,4
w = np.array([[1,0], [0,1], [1,-1], [1,1]])
# w1 = np.array([1,0]) # vertical line
# for data 2
# w2 = np.array([0,1]) # horizontal line
# for data 3
# ... | 33.091954 | 74 | 0.533866 |
2281d58cf1075a6624a122f4243fa40f7605c415 | 2,250 | py | Python | finder.py | Andrey9kin/s3-access-logs-parser | 0e1df73a0602c0e2191f0cc1fb3f3767bf996bf2 | [
"Apache-2.0"
] | 1 | 2021-01-17T14:20:16.000Z | 2021-01-17T14:20:16.000Z | finder.py | Andrey9kin/s3-access-logs-parser | 0e1df73a0602c0e2191f0cc1fb3f3767bf996bf2 | [
"Apache-2.0"
] | null | null | null | finder.py | Andrey9kin/s3-access-logs-parser | 0e1df73a0602c0e2191f0cc1fb3f3767bf996bf2 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
import re
import sys
import argparse
import logging
from boto3 import resource, client
from botocore.exceptions import ClientError
import pandas
def get_list_of_s3_buckets():
result = dict()
s3 = resource('s3')
s3_client = client('s3')
logging.info('Listing all bucket... | 28.481013 | 92 | 0.662667 |
3d5cd1247e0a59eb6f32bad6ce48c8aac4ffaa88 | 7,397 | py | Python | tests/search/test_indexes.py | mattrobenolt/warehouse | 3ae010f8bcac6f8fd948096bb8925353c2e00ff4 | [
"Apache-2.0"
] | null | null | null | tests/search/test_indexes.py | mattrobenolt/warehouse | 3ae010f8bcac6f8fd948096bb8925353c2e00ff4 | [
"Apache-2.0"
] | null | null | null | tests/search/test_indexes.py | mattrobenolt/warehouse | 3ae010f8bcac6f8fd948096bb8925353c2e00ff4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 Donald Stufft
#
# 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, so... | 32.442982 | 78 | 0.584561 |
ddd0c15e226b0436048fee4469341e3fb653c71b | 21,879 | py | Python | training/training_loop.py | benckx/stylegan3 | cafcb6e9e4f84d19e8651c6c1f8606e3ac2f7d6a | [
"BSD-Source-Code"
] | 79 | 2021-11-06T22:38:35.000Z | 2022-03-17T18:41:13.000Z | training/training_loop.py | benckx/stylegan3 | cafcb6e9e4f84d19e8651c6c1f8606e3ac2f7d6a | [
"BSD-Source-Code"
] | null | null | null | training/training_loop.py | benckx/stylegan3 | cafcb6e9e4f84d19e8651c6c1f8606e3ac2f7d6a | [
"BSD-Source-Code"
] | 5 | 2022-01-21T14:30:30.000Z | 2022-02-15T07:14:38.000Z | # Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this sof... | 51.119159 | 168 | 0.619361 |
f3b552d5d08c1327ceecb0f45ad67b7beb5bc976 | 1,686 | py | Python | Django/Video_Project/Day04/DjangoView/App/views.py | pyforspider/LearningLog | ac5988d7fbb0d07d6e7485f9050250af5bcba089 | [
"MIT"
] | null | null | null | Django/Video_Project/Day04/DjangoView/App/views.py | pyforspider/LearningLog | ac5988d7fbb0d07d6e7485f9050250af5bcba089 | [
"MIT"
] | 18 | 2020-02-12T01:18:12.000Z | 2022-03-12T00:42:15.000Z | Django/Video_Project/Day04/DjangoView/App/views.py | pyforspider/LearningLog | ac5988d7fbb0d07d6e7485f9050250af5bcba089 | [
"MIT"
] | null | null | null | from django.http import HttpResponse, HttpResponseRedirect, JsonResponse
from django.shortcuts import render, redirect
from django.urls import reverse
def hello(request):
response = HttpResponse()
response.content = "德玛西亚"
# response.status_code = 404
response.write('该刷马桶了')
response.flush()
response.content_... | 20.814815 | 99 | 0.731317 |
ff823ccb104954c4e6e879783fb81fe9c801e736 | 3,559 | py | Python | api/install.py | vontell/dynabench | 5d88346cbbfe5868395cb303eee591487cafbf0f | [
"MIT"
] | null | null | null | api/install.py | vontell/dynabench | 5d88346cbbfe5868395cb303eee591487cafbf0f | [
"MIT"
] | null | null | null | api/install.py | vontell/dynabench | 5d88346cbbfe5868395cb303eee591487cafbf0f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import importlib
import json
import os
import sqlalchemy as db
from werkzeug.security import generate_password_hash
fr... | 26.962121 | 85 | 0.5805 |
b24d1243f7dc18449662e837876ccd9fef1a2ec6 | 160 | py | Python | chapter 8/sampleCode14.py | DTAIEB/Thoughtful-Data-Science | 8b80e8f3e33b6fdc6672ecee1f27e0b983b28241 | [
"Apache-2.0"
] | 15 | 2018-06-01T19:18:32.000Z | 2021-11-28T03:31:35.000Z | chapter 8/sampleCode14.py | chshychen/Thoughtful-Data-Science | 8b80e8f3e33b6fdc6672ecee1f27e0b983b28241 | [
"Apache-2.0"
] | 1 | 2018-12-17T02:01:42.000Z | 2018-12-17T02:01:42.000Z | chapter 8/sampleCode14.py | chshychen/Thoughtful-Data-Science | 8b80e8f3e33b6fdc6672ecee1f27e0b983b28241 | [
"Apache-2.0"
] | 10 | 2018-09-16T06:06:57.000Z | 2021-06-29T05:49:18.000Z | @route(show_analytic="*")
def show_analytic_screen(self, show_analytic):
return """
<div pd_app="{{show_analytic}}" pd_render_onload></div>
"""
| 26.666667 | 55 | 0.65625 |
54a0062ca1d0730f110ad4b6687f76ac1eaf6d43 | 31,519 | py | Python | run_classifier.py | xiaonan-tx/EPI-xlnet | 9d1606990d930a1a1b5a78777d06f5abdf9e55bc | [
"Apache-2.0"
] | null | null | null | run_classifier.py | xiaonan-tx/EPI-xlnet | 9d1606990d930a1a1b5a78777d06f5abdf9e55bc | [
"Apache-2.0"
] | null | null | null | run_classifier.py | xiaonan-tx/EPI-xlnet | 9d1606990d930a1a1b5a78777d06f5abdf9e55bc | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from os.path import join
from absl import flags
import os
import sys
import csv
import collections
import numpy as np
import time
import math
import json
import random
from copy import copy
from collections imp... | 34.750827 | 80 | 0.678067 |
657f164824554f0eb83eccdac5c95d3e6e683765 | 216 | py | Python | CLCC/ex4.py | adstr123/LPTHW | 1a331ef173ffd6122b5c5ed13d8fdcc73ab7ce66 | [
"Zed"
] | null | null | null | CLCC/ex4.py | adstr123/LPTHW | 1a331ef173ffd6122b5c5ed13d8fdcc73ab7ce66 | [
"Zed"
] | null | null | null | CLCC/ex4.py | adstr123/LPTHW | 1a331ef173ffd6122b5c5ed13d8fdcc73ab7ce66 | [
"Zed"
] | null | null | null | # mkdir example
# You can type multiple non-existent levels of a directory to create them all simultaneously
# cd ~
# mkdir -p temp/hello/how/are/you # will work fine with -p (parents) & create all those folders | 43.2 | 95 | 0.736111 |
b99a79aaa22be233d14b7647583cc9160d5c10a9 | 8,561 | py | Python | rdc/core.py | akkaze/rdc | 76e85e3fe441e3ba968a190d9496f467b9d4d2e6 | [
"BSD-3-Clause"
] | 52 | 2018-10-08T01:56:15.000Z | 2021-03-14T12:19:51.000Z | rdc/core.py | akkaze/rdc | 76e85e3fe441e3ba968a190d9496f467b9d4d2e6 | [
"BSD-3-Clause"
] | null | null | null | rdc/core.py | akkaze/rdc | 76e85e3fe441e3ba968a190d9496f467b9d4d2e6 | [
"BSD-3-Clause"
] | 3 | 2019-01-02T05:17:28.000Z | 2020-01-06T03:53:12.000Z | """
Reliable Distribution Communication.
Author: Ankun Zheng
"""
import _pickle as cPickle
import ctypes
import os
import sys
import warnings
import numpy as np
from enum import Enum
from rdc import _LIB
# reduction operators
class Op(Enum):
MAX = 0
MIN = 1
SUM = 2
BITOR = 3
def __new__(cls, value... | 27.091772 | 89 | 0.629366 |
90d929b8b2cdfcbc8fd97c92d58435e0becd5d1c | 7,807 | py | Python | docs/conf.py | santimaldonado2/tfm | 7fb93149ab9823602c175991e777ff699f0928b9 | [
"MIT"
] | null | null | null | docs/conf.py | santimaldonado2/tfm | 7fb93149ab9823602c175991e777ff699f0928b9 | [
"MIT"
] | null | null | null | docs/conf.py | santimaldonado2/tfm | 7fb93149ab9823602c175991e777ff699f0928b9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# TFM documentation build configuration file, created by
# sphinx-quickstart.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a def... | 31.865306 | 120 | 0.705649 |
23776dd749a97c30ab68bd7df9e004925466ea53 | 1,831 | py | Python | backend/animal_adoption/apps/core/admin.py | PedroHenriqueDevBR/aplicacao-para-adocao-de-animais | 041f041ebbc86147b0192734fd9651fb317fbe36 | [
"MIT"
] | null | null | null | backend/animal_adoption/apps/core/admin.py | PedroHenriqueDevBR/aplicacao-para-adocao-de-animais | 041f041ebbc86147b0192734fd9651fb317fbe36 | [
"MIT"
] | null | null | null | backend/animal_adoption/apps/core/admin.py | PedroHenriqueDevBR/aplicacao-para-adocao-de-animais | 041f041ebbc86147b0192734fd9651fb317fbe36 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import (
Person,
State,
City,
AnimalType,
Animal,
AnimalPhoto,
VaccineBook,
BlockedReason,
AdoptionRequest,
)
@admin.register(Person)
class PersonAdmin(admin.ModelAdmin):
list_display = (
"id",
"image",
"cont... | 16.645455 | 44 | 0.543965 |
2105b38400e760342a1eb121c1b701ba5023dde7 | 67,296 | py | Python | wagtailmenus/tests/test_menu_rendering.py | cazgp/wagtailmenus | b0a6acb281227c93b3b4f11265366da0dada4248 | [
"MIT"
] | 329 | 2016-01-28T16:20:16.000Z | 2022-01-31T03:43:54.000Z | wagtailmenus/tests/test_menu_rendering.py | cazgp/wagtailmenus | b0a6acb281227c93b3b4f11265366da0dada4248 | [
"MIT"
] | 337 | 2016-04-15T11:09:44.000Z | 2022-01-31T10:01:32.000Z | wagtailmenus/tests/test_menu_rendering.py | cazgp/wagtailmenus | b0a6acb281227c93b3b4f11265366da0dada4248 | [
"MIT"
] | 105 | 2016-06-17T15:45:07.000Z | 2022-01-21T21:23:56.000Z | from bs4 import BeautifulSoup
from django.test import TestCase, override_settings
from wagtail.core.models import Site
from wagtailmenus.errors import SubMenuUsageError
from wagtailmenus.models import MainMenu, FlatMenu
from wagtailmenus.templatetags.menu_tags import validate_supplied_values
class TestTemplateTags(T... | 53.622311 | 312 | 0.520492 |
ac4a2993270860545375985cc80a70e8a210a675 | 182 | py | Python | tests/test_number.py | ohyecloudy/oh-python | 5bb2c4b91f79f83169bd129c32b82c086d4221d9 | [
"MIT"
] | null | null | null | tests/test_number.py | ohyecloudy/oh-python | 5bb2c4b91f79f83169bd129c32b82c086d4221d9 | [
"MIT"
] | null | null | null | tests/test_number.py | ohyecloudy/oh-python | 5bb2c4b91f79f83169bd129c32b82c086d4221d9 | [
"MIT"
] | null | null | null | import unittest
class TestNumberMethods(unittest.TestCase):
def test_power_operator(self):
self.assertEqual(5 ** 2, 25)
if __name__ == '__main__':
unittest.main()
| 18.2 | 43 | 0.697802 |
6f5cda8f9918d326b9b4ae73813231b5b1e2b9f6 | 1,469 | py | Python | tests/functional/docs/test_ec2.py | dtrimm/boto3 | 64ed0b140329e77d61571703ad8f6ff5cbf61122 | [
"Apache-2.0"
] | 1 | 2021-03-02T20:31:19.000Z | 2021-03-02T20:31:19.000Z | tests/functional/docs/test_ec2.py | dtrimm/boto3 | 64ed0b140329e77d61571703ad8f6ff5cbf61122 | [
"Apache-2.0"
] | null | null | null | tests/functional/docs/test_ec2.py | dtrimm/boto3 | 64ed0b140329e77d61571703ad8f6ff5cbf61122 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# https://aws.amazon.com/apache2.0/
#
# or in the "license" file accomp... | 40.805556 | 73 | 0.718176 |
261c1f0a1b331f39c6376f06518a45d80f9c130c | 30,141 | py | Python | test/functional/test_runner.py | susheel2335/bitcoin | 3b6d1b61d31674e033e821046baa95c66dedf623 | [
"MIT"
] | 2 | 2021-01-30T08:34:39.000Z | 2022-02-16T06:50:37.000Z | test/functional/test_runner.py | whiteslack/bitcoin | f1f26b8d5baec4a45a3a9ba0440cd4eff7af8407 | [
"MIT"
] | 5 | 2022-02-15T13:18:30.000Z | 2022-03-11T03:25:18.000Z | test/functional/test_runner.py | edmont87/albcoin | 105e85f0bf13d5836f24ffa8a462f581f9f9f8cc | [
"MIT"
] | 1 | 2022-03-16T15:03:37.000Z | 2022-03-16T15:03:37.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Run regression test suite.
This module calls down into individual test cases via subprocess. It will
f... | 38.691913 | 205 | 0.638964 |
a8e8a32992c21b844757ceae9b2708e94e85c2c5 | 768 | py | Python | maze/cif_download.py | kul-group/MAZE-sim | 0f85e74bf93f9242a73bcfaa20a593ae966f38fa | [
"MIT"
] | 13 | 2021-03-10T18:40:32.000Z | 2022-03-21T20:40:57.000Z | maze/cif_download.py | kul-group/MAZE-sim | 0f85e74bf93f9242a73bcfaa20a593ae966f38fa | [
"MIT"
] | 27 | 2021-01-28T23:18:44.000Z | 2021-05-06T19:33:09.000Z | maze/cif_download.py | kul-group/MAZE-sim | 0f85e74bf93f9242a73bcfaa20a593ae966f38fa | [
"MIT"
] | 4 | 2021-03-19T20:46:15.000Z | 2022-03-21T20:40:59.000Z | import os
import urllib.request
from pathlib import Path
from urllib.error import HTTPError
def download_cif(code: str, data_dir='data'):
"""
Args:
code (str):
data_dir:
"""
Path(data_dir).mkdir(parents=True, exist_ok=True) # create output directory if it doesn't exist
output_path... | 29.538462 | 100 | 0.634115 |
26ca9234ab4820b66c78981a53cbe7c2cdd6754b | 398 | py | Python | tests/test_vault.py | lepy/sdata | 5cd8b8e65f8aebb238d683daa93bbf620b82863b | [
"MIT"
] | 1 | 2017-04-04T07:54:11.000Z | 2017-04-04T07:54:11.000Z | tests/test_vault.py | lepy/sdata | 5cd8b8e65f8aebb238d683daa93bbf620b82863b | [
"MIT"
] | 1 | 2020-12-21T15:43:13.000Z | 2020-12-21T15:43:13.000Z | tests/test_vault.py | lepy/sdata | 5cd8b8e65f8aebb238d683daa93bbf620b82863b | [
"MIT"
] | 2 | 2017-05-12T07:17:42.000Z | 2018-06-05T11:16:21.000Z | # -*- coding: utf-8 -*-
from sdata.io.vault import FileSystemVault, VaultIndex
from sdata import Data
import pandas as pd
import numpy as np
def test_vault_index():
vi = VaultIndex()
assert isinstance(vi.df, pd.DataFrame)
print(vi.df.columns)
print(sorted(vi.df.columns)==sorted(Data.SDATA_ATTRIBUTES))... | 26.533333 | 63 | 0.726131 |
87b2010e71e730660638eb597227aae7032d0197 | 8,823 | py | Python | projector.py | JCBrouwer/stylegan2-ada-pytorch | 10058b3c37d36f85112d72808fb616983cb4165b | [
"BSD-Source-Code"
] | 1 | 2021-05-06T20:24:28.000Z | 2021-05-06T20:24:28.000Z | projector.py | JCBrouwer/stylegan2-ada-pytorch | 10058b3c37d36f85112d72808fb616983cb4165b | [
"BSD-Source-Code"
] | null | null | null | projector.py | JCBrouwer/stylegan2-ada-pytorch | 10058b3c37d36f85112d72808fb616983cb4165b | [
"BSD-Source-Code"
] | 1 | 2021-08-19T10:19:13.000Z | 2021-08-19T10:19:13.000Z | # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and rel... | 41.617925 | 119 | 0.639578 |
0ecec1aefa754e0b51544dc33d3f15980c3b7345 | 1,885 | py | Python | library/python/coredump_filter/tests/test_completed_stack.py | fibersel/catboost | 585e63b766867989acd2100fb2fd2e6ff81e7cc0 | [
"Apache-2.0"
] | null | null | null | library/python/coredump_filter/tests/test_completed_stack.py | fibersel/catboost | 585e63b766867989acd2100fb2fd2e6ff81e7cc0 | [
"Apache-2.0"
] | null | null | null | library/python/coredump_filter/tests/test_completed_stack.py | fibersel/catboost | 585e63b766867989acd2100fb2fd2e6ff81e7cc0 | [
"Apache-2.0"
] | 1 | 2021-04-27T23:40:09.000Z | 2021-04-27T23:40:09.000Z | import unittest
import yatest.common
import os
from library.python.coredump_filter import core_proc, const
AMOUNT_TEST_CASES = 7
class MockStream:
def __init__(self):
self._store = []
def write(self, payload):
self._store.append(payload)
@property
def get(self):
return '\n'.... | 34.272727 | 95 | 0.578249 |
11c9b9fda1b4ff6600c798e297f316b5c8129ebf | 4,843 | py | Python | coffe_price_brazil_es/coffee.py | VitorBonella/ProjetoIntegrado1-2021-1 | 3193dd1967b1b8ea4fd3a46517e6de054da47d28 | [
"MIT"
] | 1 | 2021-09-02T16:24:12.000Z | 2021-09-02T16:24:12.000Z | coffe_price_brazil_es/coffee.py | VitorBonella/ProjetoIntegrado1-2021-1 | 3193dd1967b1b8ea4fd3a46517e6de054da47d28 | [
"MIT"
] | null | null | null | coffe_price_brazil_es/coffee.py | VitorBonella/ProjetoIntegrado1-2021-1 | 3193dd1967b1b8ea4fd3a46517e6de054da47d28 | [
"MIT"
] | null | null | null | from coffe_price_brazil_es.get_coffee_csv_file import get_csv_file
import pandas as pd
class Coffee:
"""
Classe para armazenar as informações sobre o café
"""
def __init__(self):
try:
self.table, self.info = get_csv_file()
except AttributeError:
print("CSV COFFE... | 37.835938 | 173 | 0.600867 |
7dee865de0561262b9b90e98958e61c9c70aed26 | 2,895 | py | Python | mbdata/api/tests/__init__.py | markweaversonos/mbdata | 9f418be4851d5608f67873a6f72dd9427e255a52 | [
"MIT"
] | 51 | 2017-10-25T16:24:20.000Z | 2021-12-21T06:20:30.000Z | mbdata/api/tests/__init__.py | markweaversonos/mbdata | 9f418be4851d5608f67873a6f72dd9427e255a52 | [
"MIT"
] | 29 | 2019-05-14T10:16:27.000Z | 2021-12-10T04:37:20.000Z | mbdata/api/tests/__init__.py | markweaversonos/mbdata | 9f418be4851d5608f67873a6f72dd9427e255a52 | [
"MIT"
] | 19 | 2017-12-23T04:34:23.000Z | 2021-11-29T19:12:28.000Z | # -*- coding: utf8 -*-
from __future__ import print_function
import os
import tempfile
import logging
import json
import functools
import pprint
import difflib
from unittest import TestCase
from unittest.util import safe_repr
from nose.tools import *
from flask import g
os.environ['MBDATA_API_SETTINGS'] = os.path.joi... | 26.081081 | 110 | 0.670812 |
79c9e5e93c782ff15f21fecc8c94f604a78fa47f | 3,265 | py | Python | fixtures/service_group.py | vkolli/5.0_contrail-test | 1793f169a94100400a1b2fafbad21daf5aa4d48a | [
"Apache-2.0"
] | null | null | null | fixtures/service_group.py | vkolli/5.0_contrail-test | 1793f169a94100400a1b2fafbad21daf5aa4d48a | [
"Apache-2.0"
] | 1 | 2021-06-01T22:18:29.000Z | 2021-06-01T22:18:29.000Z | fixtures/service_group.py | lmadhusudhanan/contrail-test | bd39ff19da06a20bd79af8c25e3cde07375577cf | [
"Apache-2.0"
] | null | null | null | import vnc_api_test
from cfgm_common.exceptions import NoIdError
from tcutils.util import get_random_name, retry
class ServiceGroupFixture(vnc_api_test.VncLibFixture):
'''Fixture to handle service group object
Optional:
:param name : name of the service group
:param uuid : UUID of the service group
... | 40.308642 | 80 | 0.612864 |
6034f82fc4da8288abc4c7af833b2d41d4294410 | 4,879 | py | Python | stereo/io/gef.py | nilsmechtel/stereopy | cd8f34b45ae6667043611e5d02ea46f8ca3f0c7b | [
"MIT"
] | 61 | 2021-04-09T01:00:41.000Z | 2022-03-07T06:19:41.000Z | stereo/io/gef.py | nilsmechtel/stereopy | cd8f34b45ae6667043611e5d02ea46f8ca3f0c7b | [
"MIT"
] | 20 | 2021-04-13T10:31:04.000Z | 2022-03-29T11:07:30.000Z | stereo/io/gef.py | nilsmechtel/stereopy | cd8f34b45ae6667043611e5d02ea46f8ca3f0c7b | [
"MIT"
] | 13 | 2021-04-16T08:36:08.000Z | 2022-02-21T20:44:00.000Z | # coding: utf-8
import gc
import h5py
import pandas as pd
from scipy.sparse import csr_matrix
import numpy as np
from ..core.cell import Cell
from ..core.gene import Gene
from ..core.stereo_exp_data import StereoExpData
from ..log_manager import logger
class GEF(object):
def __init__(self, file_path: str, bin_s... | 40.322314 | 114 | 0.587825 |
4a0502d78ce2411de6a34f48157e656757a53ccf | 1,232 | py | Python | day-04/part-2/ludoge.py | badouralix/adventofcode-2018 | 543ce39d4eeb7d9d695459ffadca001a8c56386d | [
"MIT"
] | 31 | 2018-12-01T00:43:40.000Z | 2020-05-30T05:18:59.000Z | day-04/part-2/ludoge.py | badouralix/adventofcode-2018 | 543ce39d4eeb7d9d695459ffadca001a8c56386d | [
"MIT"
] | 14 | 2018-12-01T12:14:26.000Z | 2021-05-07T22:41:47.000Z | day-04/part-2/ludoge.py | badouralix/adventofcode-2018 | 543ce39d4eeb7d9d695459ffadca001a8c56386d | [
"MIT"
] | 10 | 2018-12-01T23:38:34.000Z | 2020-12-28T13:36:10.000Z | from tool.runners.python import SubmissionPy
from collections import Counter
class LudogeSubmission(SubmissionPy):
def run(self, s):
# :param s: input in string format
# :return: solution flag
# Your code goes here
lines = sorted(s.splitlines())
guards = {}
for line... | 35.2 | 95 | 0.581981 |
78681353f18b1fa0f6699e930fc2842f8cdb2b35 | 1,718 | py | Python | code/config.py | mbasart/ORM-cookies | 7837a92e56f0e694778e28a8961aec02b32a5f7a | [
"Apache-2.0"
] | null | null | null | code/config.py | mbasart/ORM-cookies | 7837a92e56f0e694778e28a8961aec02b32a5f7a | [
"Apache-2.0"
] | null | null | null | code/config.py | mbasart/ORM-cookies | 7837a92e56f0e694778e28a8961aec02b32a5f7a | [
"Apache-2.0"
] | null | null | null | import gzip
import zipfile
from contextlib import contextmanager
from os.path import abspath, dirname, join, splitext
PROJECT_DIR = abspath(dirname(__file__))
ALEXA_FILE_PATH = join(PROJECT_DIR, '../assets/alexa/top-1m.csv.zip')
CLEANER_PLUGIN_PATH = join(PROJECT_DIR, '../assets/plugin/cache_killer/cache_killer_1_0_... | 30.140351 | 98 | 0.62631 |
dddd03b31bf5574b3ad3b0ff5221e87933fabe5a | 10,667 | py | Python | Chapter-07/collections/ansible_collections/amazon/aws/plugins/modules/ec2_snapshot_info.py | PacktPublishing/Ansible-for-Real-life-Automation | 35c0d92ea08a5dbf3bea749e1971cffabd5e6de4 | [
"MIT"
] | 7 | 2021-11-16T04:05:42.000Z | 2022-02-19T21:14:29.000Z | Chapter-07/collections/ansible_collections/amazon/aws/plugins/modules/ec2_snapshot_info.py | PacktPublishing/Ansible-for-Real-life-Automation | 35c0d92ea08a5dbf3bea749e1971cffabd5e6de4 | [
"MIT"
] | 1 | 2022-03-12T02:25:26.000Z | 2022-03-12T02:25:26.000Z | Chapter-05/collections/ansible_collections/amazon/aws/plugins/modules/ec2_snapshot_info.py | PacktPublishing/Ansible-for-Real-life-Automation | 35c0d92ea08a5dbf3bea749e1971cffabd5e6de4 | [
"MIT"
] | 1 | 2022-03-01T05:43:07.000Z | 2022-03-01T05:43:07.000Z | #!/usr/bin/python
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
module: ec2_snapshot_info
version_added: 1.0.0
short_description: G... | 36.406143 | 160 | 0.675729 |
0e36b1c695442f1b6e41d9aec8027a73b7f069fe | 1,482 | py | Python | src/oemof/tabular/examples/scripting/postprocessing.py | jnnr/oemof-tabular | ab58d8c3035b6e97d9d45169832745de11e5bb36 | [
"BSD-3-Clause"
] | 2 | 2019-12-09T17:34:31.000Z | 2022-02-04T12:55:15.000Z | src/oemof/tabular/examples/scripting/postprocessing.py | jnnr/oemof-tabular | ab58d8c3035b6e97d9d45169832745de11e5bb36 | [
"BSD-3-Clause"
] | 28 | 2018-11-24T16:56:55.000Z | 2022-03-25T12:19:41.000Z | src/oemof/tabular/examples/scripting/postprocessing.py | jnnr/oemof-tabular | ab58d8c3035b6e97d9d45169832745de11e5bb36 | [
"BSD-3-Clause"
] | 7 | 2018-12-19T13:42:52.000Z | 2021-11-21T18:43:45.000Z | import pkg_resources as pkg
from oemof.outputlib import views
from oemof.solph import EnergySystem, Model
from oemof.tabular.facades import TYPEMAP
import oemof.tabular.datapackage # noqa
import oemof.tabular.tools.postprocessing as pp
examples = ["dispatch", "investment", "foreignkeys"]
for example in examples:
... | 30.244898 | 78 | 0.647773 |
3e9a6c1a0ef28616fe4c759681cb2ff6cdb5b994 | 11,344 | py | Python | airflow/gcp/utils/mlengine_operator_utils.py | ankit-shrivastava/airflow | 77b1bdc12ca5ddf043d4550d36948766b59f60ce | [
"Apache-2.0"
] | 2 | 2021-07-30T17:37:15.000Z | 2021-08-03T13:50:56.000Z | airflow/gcp/utils/mlengine_operator_utils.py | larryzhu2018/airflow-1 | 1bb12f31585c36661fe30c11c9b3e0f67586a93a | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | airflow/gcp/utils/mlengine_operator_utils.py | larryzhu2018/airflow-1 | 1bb12f31585c36661fe30c11c9b3e0f67586a93a | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 43.799228 | 88 | 0.693759 |
b83d46bbfb0b3d9e22de0e11f76a7a36026318ae | 6,426 | py | Python | test/functional/rpc_bind.py | neemcoin-project/neemcoin | 522e8f8f5b7abf582efa42e00ae1d156281ef899 | [
"MIT"
] | null | null | null | test/functional/rpc_bind.py | neemcoin-project/neemcoin | 522e8f8f5b7abf582efa42e00ae1d156281ef899 | [
"MIT"
] | null | null | null | test/functional/rpc_bind.py | neemcoin-project/neemcoin | 522e8f8f5b7abf582efa42e00ae1d156281ef899 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test running neemcoind with the -rpcbind and -rpcallowip options."""
import sys
from test_framework.n... | 49.430769 | 172 | 0.633209 |
a04e649b7a89f60fc58c0dddf0fbbf30fb643405 | 543 | py | Python | manage.py | onlywade/airtng-flask | 034d503cc311d5bbd25d829afda865845d11ca33 | [
"MIT"
] | null | null | null | manage.py | onlywade/airtng-flask | 034d503cc311d5bbd25d829afda865845d11ca33 | [
"MIT"
] | null | null | null | manage.py | onlywade/airtng-flask | 034d503cc311d5bbd25d829afda865845d11ca33 | [
"MIT"
] | null | null | null | from flask.ext.script import Manager
from flask.ext.migrate import Migrate, MigrateCommand
from airtng_flask import app, db
migrate = Migrate(app, db)
manager = Manager(app)
manager.add_command('db', MigrateCommand)
@manager.command
def test():
"""Run the unit tests."""
import sys, unittest
tests = uni... | 21.72 | 69 | 0.697974 |
3c9518c49539297e1db3e8f848ccd7244551f744 | 5,797 | py | Python | biggraphite/cli/command_stats.py | crto-es-vyg/biggraphite | 6faf66ea6fe77b9f6d538f3397b3d4d7b58b0a76 | [
"Apache-2.0"
] | 1 | 2018-06-19T13:10:19.000Z | 2018-06-19T13:10:19.000Z | biggraphite/cli/command_stats.py | crto-es-vyg/biggraphite | 6faf66ea6fe77b9f6d538f3397b3d4d7b58b0a76 | [
"Apache-2.0"
] | 2 | 2022-02-09T01:02:22.000Z | 2022-02-26T00:46:39.000Z | biggraphite/cli/command_stats.py | crto-es-vyg/biggraphite | 6faf66ea6fe77b9f6d538f3397b3d4d7b58b0a76 | [
"Apache-2.0"
] | 1 | 2019-11-19T16:21:32.000Z | 2019-11-19T16:21:32.000Z | #!/usr/bin/env python
# Copyright 2016 Criteo
#
# 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... | 30.510526 | 81 | 0.591685 |
ce12fc9d90bd21db076bb2cba408cdbfbc12e746 | 2,532 | py | Python | pset6/caesar.py | DInnaD/CS50 | 0ff04093a11893a6c2b7577bea1c962d4675317d | [
"Apache-2.0"
] | null | null | null | pset6/caesar.py | DInnaD/CS50 | 0ff04093a11893a6c2b7577bea1c962d4675317d | [
"Apache-2.0"
] | null | null | null | pset6/caesar.py | DInnaD/CS50 | 0ff04093a11893a6c2b7577bea1c962d4675317d | [
"Apache-2.0"
] | null | null | null | import cs50
import sys
def main():
if len(sys.argv) != 2:
print("You should provide cmd line arguments!")
exit(1)
#if sys.argv[1].isalpha() == False:
#print("You should provide valid key!")
#exit(1)
kplainText = int(sys.argv[1])
cipher = []
plainText = cs50.... | 31.259259 | 112 | 0.507504 |
c16d1c105b971e3e06cfa2d91adefc8c9acd2297 | 1,253 | py | Python | Raspberry/focuscontrol.py | kevin-ch-day/MajesticMagicians-Master | bf71e0f2faa2c6a3ed52f509c0beb162d377371e | [
"MIT"
] | null | null | null | Raspberry/focuscontrol.py | kevin-ch-day/MajesticMagicians-Master | bf71e0f2faa2c6a3ed52f509c0beb162d377371e | [
"MIT"
] | null | null | null | Raspberry/focuscontrol.py | kevin-ch-day/MajesticMagicians-Master | bf71e0f2faa2c6a3ed52f509c0beb162d377371e | [
"MIT"
] | null | null | null | import threading
#Single controller for focus. Executes one focus adjustment request at a time. Drops requests while adjusting focus
class FocusControl():
lock = threading.Lock()
def request_focus_adjust(amount):
if not lock.acquire(False):
return 'The focus is currently adjusting. ... | 32.973684 | 115 | 0.557861 |
984ece1f57921e9838aac27bca23dad642f6d150 | 419 | py | Python | mnelab/dialogs/errormessagebox.py | yop0/mnelab | 12b62d0611ebc63bc23f7c9101d7eabdc1175055 | [
"BSD-3-Clause"
] | null | null | null | mnelab/dialogs/errormessagebox.py | yop0/mnelab | 12b62d0611ebc63bc23f7c9101d7eabdc1175055 | [
"BSD-3-Clause"
] | null | null | null | mnelab/dialogs/errormessagebox.py | yop0/mnelab | 12b62d0611ebc63bc23f7c9101d7eabdc1175055 | [
"BSD-3-Clause"
] | null | null | null | # Authors: Clemens Brunner <clemens.brunner@gmail.com>
#
# License: BSD (3-clause)
from PySide6.QtWidgets import QMessageBox
class ErrorMessageBox(QMessageBox):
def __init__(self, parent, text, informative, detailed):
super().__init__(parent=parent)
self.setText(text)
self.setInformativeT... | 27.933333 | 60 | 0.720764 |
26c7882fdb3ff2c1d68b20885739dcfd62c56981 | 370 | py | Python | btk/__init__.py | mpaillassa/BlendingToolKit | 3dfb8bc36d6c7d944c8ef353f2c70623d882fcd1 | [
"MIT"
] | null | null | null | btk/__init__.py | mpaillassa/BlendingToolKit | 3dfb8bc36d6c7d944c8ef353f2c70623d882fcd1 | [
"MIT"
] | null | null | null | btk/__init__.py | mpaillassa/BlendingToolKit | 3dfb8bc36d6c7d944c8ef353f2c70623d882fcd1 | [
"MIT"
] | null | null | null | """Toolkit for fast simulation and analysis of overlapping objects for the
LSST Dark Energy Science Collaboration.
The code generates on the fly images of overlapping parametric galaxies, while
providing a framework to test user defined detection/deblending/measurement
algorithms.
"""
__author__ = "btk developers"
__e... | 33.636364 | 78 | 0.805405 |
a36c8b6092cfee16a9dc156dc300ba3592ed8399 | 347 | py | Python | videos/migrations/0002_rename_title_video_name.py | KibetRonoh/Movie_Zone_-Django | 901b211540943a98b531db2bc77d6b3a483a694a | [
"MIT"
] | 58 | 2021-03-13T21:00:01.000Z | 2022-03-29T05:59:39.000Z | videos/migrations/0002_rename_title_video_name.py | KibetRonoh/Movie_Zone_-Django | 901b211540943a98b531db2bc77d6b3a483a694a | [
"MIT"
] | 1 | 2021-05-21T16:40:00.000Z | 2021-05-21T16:40:00.000Z | videos/migrations/0002_rename_title_video_name.py | KibetRonoh/Movie_Zone_-Django | 901b211540943a98b531db2bc77d6b3a483a694a | [
"MIT"
] | 35 | 2021-03-17T12:04:30.000Z | 2022-03-18T02:06:31.000Z | # Generated by Django 3.2b1 on 2021-03-14 20:34
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('videos', '0001_initial'),
]
operations = [
migrations.RenameField(
model_name='video',
old_name='title',
new_nam... | 18.263158 | 47 | 0.567723 |
5ba4f41b00b941ea9a28ab9be776e6bb77e581a1 | 13,670 | py | Python | tests/test_grammar_extraction_python.py | hbrodin/polytracker | cb5733dac7d342419d5ca1dc3bea1d29f4f41edb | [
"Apache-2.0"
] | 304 | 2019-11-01T04:10:13.000Z | 2022-03-31T15:44:06.000Z | tests/test_grammar_extraction_python.py | hbrodin/polytracker | cb5733dac7d342419d5ca1dc3bea1d29f4f41edb | [
"Apache-2.0"
] | 6,091 | 2019-12-04T21:58:22.000Z | 2022-03-14T13:19:50.000Z | tests/test_grammar_extraction_python.py | hbrodin/polytracker | cb5733dac7d342419d5ca1dc3bea1d29f4f41edb | [
"Apache-2.0"
] | 26 | 2019-11-01T21:02:46.000Z | 2022-03-16T04:09:40.000Z | from abc import ABC
from collections import defaultdict
from typing import Dict, Iterable, Iterator, List, Optional, Set, Tuple, Union
import pytest
from polytracker import BasicBlock, ByteOffset, Function, TaintForest, TaintAccess, Taints
from polytracker.grammars import Grammar, parse_tree_to_grammar
from polytrack... | 32.014052 | 114 | 0.658815 |
9ccc7520152fea76b22a810c5e91da7a0a3d7865 | 367 | py | Python | tests/bots/economy/test_futures.py | swipswaps/OpenBBTerminal | 9d33f638f10fdbc77ae461b1838462571faee138 | [
"MIT"
] | null | null | null | tests/bots/economy/test_futures.py | swipswaps/OpenBBTerminal | 9d33f638f10fdbc77ae461b1838462571faee138 | [
"MIT"
] | null | null | null | tests/bots/economy/test_futures.py | swipswaps/OpenBBTerminal | 9d33f638f10fdbc77ae461b1838462571faee138 | [
"MIT"
] | null | null | null | import pytest
from bots.economy.futures import futures_command
@pytest.mark.bots
@pytest.mark.vcr
def test_futures_command(mocker, recorder):
mocker.patch("bots.helpers.uuid_get", return_value="1")
value = futures_command()
value.pop("embed")
for x in ["view", "choices", "embeds_img"]:
value[... | 24.466667 | 59 | 0.700272 |
c3e6b56ce10e0a4bc55324e72f5425ca6a2519a1 | 3,338 | py | Python | kubeasy_sdk/__init__.py | dylanturn/kubeasy | 7c9fd62e22ecd89632f5aa7a7a17fda24ebe7490 | [
"Apache-2.0"
] | null | null | null | kubeasy_sdk/__init__.py | dylanturn/kubeasy | 7c9fd62e22ecd89632f5aa7a7a17fda24ebe7490 | [
"Apache-2.0"
] | null | null | null | kubeasy_sdk/__init__.py | dylanturn/kubeasy | 7c9fd62e22ecd89632f5aa7a7a17fda24ebe7490 | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
import yaml
import json
from cdk8s import App, Chart
from constructs import Construct
from kubeasy_sdk.utils.collections.chart_resource_collection import ChartResourceCollection
from kubeasy_sdk.utils.resource import Rendered
from kubeasy_sdk.deployment import Deployment
from kubeas... | 39.738095 | 118 | 0.753745 |
be0fa2637fe3d8da43605b3154dc9c3aea694efb | 4,296 | py | Python | tests/pruning/test_utils.py | krodyush/nncf | 476a274a90a3f2f1ace7a4cb0c9d90d1ddeb7f6a | [
"Apache-2.0"
] | null | null | null | tests/pruning/test_utils.py | krodyush/nncf | 476a274a90a3f2f1ace7a4cb0c9d90d1ddeb7f6a | [
"Apache-2.0"
] | null | null | null | tests/pruning/test_utils.py | krodyush/nncf | 476a274a90a3f2f1ace7a4cb0c9d90d1ddeb7f6a | [
"Apache-2.0"
] | 1 | 2021-04-05T09:33:51.000Z | 2021-04-05T09:33:51.000Z | """
Copyright (c) 2020 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 applicable law or agreed to in writin... | 46.695652 | 111 | 0.685987 |
9b19b628187101a1820fc3f7f813d77272bd6754 | 5,659 | py | Python | extractFastaByName.py | Tong-Chen/easyTranscriptome | f03c9f708faf63735d53f1e2314c8f5ef233b3cd | [
"Apache-2.0"
] | 1 | 2021-08-16T03:16:11.000Z | 2021-08-16T03:16:11.000Z | extractFastaByName.py | Tong-Chen/easyTranscriptome | f03c9f708faf63735d53f1e2314c8f5ef233b3cd | [
"Apache-2.0"
] | null | null | null | extractFastaByName.py | Tong-Chen/easyTranscriptome | f03c9f708faf63735d53f1e2314c8f5ef233b3cd | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#from __future__ import division, with_statement
'''
Copyright 2013, 陈同 (chentong_biology@163.com).
===========================================================
'''
__author__ = 'chentong & ct586[9]'
__author_email__ = 'chentong_biology@163.com'
#==========================... | 34.506098 | 92 | 0.548153 |
22480fd6876e3a754f10f2615b86ab53efee00b3 | 3,250 | py | Python | Lib/ufo2ft/filters/explodeColorLayerGlyphs.py | JeremieHornus/ufo2ft | 6df17f97ba0730b79fb6bb5a0a51c3afaf7338fc | [
"MIT"
] | null | null | null | Lib/ufo2ft/filters/explodeColorLayerGlyphs.py | JeremieHornus/ufo2ft | 6df17f97ba0730b79fb6bb5a0a51c3afaf7338fc | [
"MIT"
] | null | null | null | Lib/ufo2ft/filters/explodeColorLayerGlyphs.py | JeremieHornus/ufo2ft | 6df17f97ba0730b79fb6bb5a0a51c3afaf7338fc | [
"MIT"
] | null | null | null | from ufo2ft.filters import BaseFilter
from ufo2ft.util import _GlyphSet
from ufo2ft.constants import COLOR_LAYERS_KEY, COLOR_LAYER_MAPPING_KEY
class ExplodeColorLayerGlyphsFilter(BaseFilter):
""" This filter doesn't really filter glyphs, but copies glyphs
from UFO layers to alternate glyphs in the default la... | 40.123457 | 79 | 0.645231 |
d8e19368f55f5ad61249fbcca51be9dcbe58ad06 | 866 | py | Python | posts/migrations/0006_pollfile.py | TomerNewmanPrograms/ResuMe | 9d9b7369625fcb044f91cde86c85c91fdaf44ddd | [
"MIT"
] | null | null | null | posts/migrations/0006_pollfile.py | TomerNewmanPrograms/ResuMe | 9d9b7369625fcb044f91cde86c85c91fdaf44ddd | [
"MIT"
] | null | null | null | posts/migrations/0006_pollfile.py | TomerNewmanPrograms/ResuMe | 9d9b7369625fcb044f91cde86c85c91fdaf44ddd | [
"MIT"
] | null | null | null | # Generated by Django 4.0.3 on 2022-03-31 11:01
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('posts', '0005_poll'),
]
operations = [
migrations.CreateModel(
na... | 32.074074 | 117 | 0.583141 |
d4d8db7183ad4377fce14d182399a2232e35a69b | 12,797 | py | Python | src/silx/gui/plot3d/test/testSceneWidgetPicking.py | rnwatanabe/silx | b0395f4a06c048b7778dc04ada828edd195ef02d | [
"CC0-1.0",
"MIT"
] | 94 | 2016-03-04T17:25:53.000Z | 2022-03-18T18:05:23.000Z | src/silx/gui/plot3d/test/testSceneWidgetPicking.py | rnwatanabe/silx | b0395f4a06c048b7778dc04ada828edd195ef02d | [
"CC0-1.0",
"MIT"
] | 2,841 | 2016-01-21T09:06:49.000Z | 2022-03-18T14:53:56.000Z | src/silx/gui/plot3d/test/testSceneWidgetPicking.py | rnwatanabe/silx | b0395f4a06c048b7778dc04ada828edd195ef02d | [
"CC0-1.0",
"MIT"
] | 71 | 2015-09-30T08:35:35.000Z | 2022-03-16T07:16:28.000Z | # coding: utf-8
# /*##########################################################################
#
# Copyright (c) 2018-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to d... | 40.625397 | 79 | 0.549895 |
45c05ed74627650c41e236aa20d5b1b51639252d | 12,518 | py | Python | mindspore/_check_version.py | dongkcs/mindspore | cd7df6dbf463ff3128e9181e9d0c779cecb81320 | [
"Apache-2.0"
] | 2 | 2020-11-23T13:46:37.000Z | 2020-12-20T02:02:38.000Z | mindspore/_check_version.py | dongkcs/mindspore | cd7df6dbf463ff3128e9181e9d0c779cecb81320 | [
"Apache-2.0"
] | null | null | null | mindspore/_check_version.py | dongkcs/mindspore | cd7df6dbf463ff3128e9181e9d0c779cecb81320 | [
"Apache-2.0"
] | 1 | 2021-01-01T08:35:01.000Z | 2021-01-01T08:35:01.000Z | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 42.006711 | 120 | 0.612957 |
dbe4cce127e9f102ad6648709b2a0aeba2c89018 | 532 | py | Python | docs/examples/point_120cells/plot_output.py | aaberbach/bmtk | 42aa70ce2003227a32df6ce5a95420dbf4bdfbd4 | [
"BSD-3-Clause"
] | 216 | 2017-10-03T17:02:42.000Z | 2022-03-20T03:35:48.000Z | docs/examples/point_120cells/plot_output.py | moekay/bmtk | 6efdf6387d2a6badf276b917ee15d238daeae883 | [
"BSD-3-Clause"
] | 70 | 2017-10-05T00:50:41.000Z | 2022-03-30T18:55:01.000Z | docs/examples/point_120cells/plot_output.py | moekay/bmtk | 6efdf6387d2a6badf276b917ee15d238daeae883 | [
"BSD-3-Clause"
] | 97 | 2017-10-03T22:15:06.000Z | 2022-03-23T21:03:26.000Z | import matplotlib.pyplot as plt
from bmtk.analyzer.compartment import plot_traces
from bmtk.analyzer.spike_trains import plot_raster, plot_rates_boxplot
# Setting show to False so we can display all the plots at the same time
plot_raster(config_file='config.json', group_by='pop_name', show=False)
plot_rates_boxplot(... | 33.25 | 93 | 0.780075 |
1a65f84e12e48119ee312de9916e56f84ffac043 | 4,902 | py | Python | openbook_connections/views.py | TamaraAbells/okuna-api | f87d8e80d2f182c01dbce68155ded0078ee707e4 | [
"MIT"
] | 164 | 2019-07-29T17:59:06.000Z | 2022-03-19T21:36:01.000Z | openbook_connections/views.py | TamaraAbells/okuna-api | f87d8e80d2f182c01dbce68155ded0078ee707e4 | [
"MIT"
] | 188 | 2019-03-16T09:53:25.000Z | 2019-07-25T14:57:24.000Z | openbook_connections/views.py | TamaraAbells/okuna-api | f87d8e80d2f182c01dbce68155ded0078ee707e4 | [
"MIT"
] | 80 | 2019-08-03T17:49:08.000Z | 2022-02-28T16:56:33.000Z | # Create your views here.
from django.contrib.auth import get_user_model
from django.db import transaction
from rest_framework import status
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
from rest_framework.views import APIView
from openbook_moderation.permissions ... | 36.857143 | 115 | 0.728682 |
fce65c0f670872f7d5d54e81c696fce662b0ff88 | 14,777 | py | Python | shadowsocks/crypto/sodium.py | rc452860/shadowsocks-mod | 71a31b5e19bedeb9024f99c1224764efa2c37b5e | [
"Apache-2.0"
] | null | null | null | shadowsocks/crypto/sodium.py | rc452860/shadowsocks-mod | 71a31b5e19bedeb9024f99c1224764efa2c37b5e | [
"Apache-2.0"
] | null | null | null | shadowsocks/crypto/sodium.py | rc452860/shadowsocks-mod | 71a31b5e19bedeb9024f99c1224764efa2c37b5e | [
"Apache-2.0"
] | 1 | 2018-05-31T02:05:04.000Z | 2018-05-31T02:05:04.000Z | #!/usr/bin/env python
#
# Copyright 2015 clowwindy
#
# 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 ... | 34.445221 | 79 | 0.632334 |
23059cf393369c42ad899ba90fc871abdb472803 | 34,164 | py | Python | src/sage/rings/padics/generic_nodes.py | hsm207/sage | 020bd59ec28717bfab9af44d2231c53da1ff99f1 | [
"BSL-1.0"
] | 1 | 2021-10-18T01:24:04.000Z | 2021-10-18T01:24:04.000Z | src/sage/rings/padics/generic_nodes.py | hsm207/sage | 020bd59ec28717bfab9af44d2231c53da1ff99f1 | [
"BSL-1.0"
] | 1 | 2020-04-18T16:30:43.000Z | 2020-04-18T16:30:43.000Z | src/sage/rings/padics/generic_nodes.py | dimpase/sage | 468f23815ade42a2192b0a9cd378de8fdc594dcd | [
"BSL-1.0"
] | null | null | null | """
`p`-Adic Generic Nodes
This file contains a bunch of intermediate classes for the `p`-adic
parents, allowing a function to be implemented at the right level of
generality.
AUTHORS:
- David Roe
"""
# ****************************************************************************
# Copyright (C) 2007-2013 Davi... | 30.750675 | 191 | 0.552043 |
75ff987606fd5ce7f36f3026dde32259e4e0cc50 | 6,849 | py | Python | dcipipeline/test_main.py | nsilla/dci-pipeline | 5395a715677b5e1c305967b2fd1ba4d699261c93 | [
"Apache-2.0"
] | null | null | null | dcipipeline/test_main.py | nsilla/dci-pipeline | 5395a715677b5e1c305967b2fd1ba4d699261c93 | [
"Apache-2.0"
] | null | null | null | dcipipeline/test_main.py | nsilla/dci-pipeline | 5395a715677b5e1c305967b2fd1ba4d699261c93 | [
"Apache-2.0"
] | 2 | 2021-09-20T10:48:55.000Z | 2022-02-28T19:47:55.000Z | #
# Copyright (C) 2020 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 36.822581 | 87 | 0.598482 |
6af7beb362b09d9e78b894d9cee63947a26e28ac | 779 | py | Python | tests/test_Circle.py | kat0lia/python_qa_oop | ca11ccae990b85e7dadd31ffbd4e976f544d1527 | [
"MIT"
] | null | null | null | tests/test_Circle.py | kat0lia/python_qa_oop | ca11ccae990b85e7dadd31ffbd4e976f544d1527 | [
"MIT"
] | null | null | null | tests/test_Circle.py | kat0lia/python_qa_oop | ca11ccae990b85e7dadd31ffbd4e976f544d1527 | [
"MIT"
] | null | null | null | from source.Circle import Circle
import math
import pytest
name = "Cr1"
def test_create_class():
circle = Circle(name, 2)
assert isinstance(circle, Circle)
assert circle.radius == 2
assert circle.angles == 0
assert circle.name == name
def test_perimeter():
circle = Circle(name, 2)
asse... | 20.5 | 77 | 0.652118 |
32d4d7bd886d3256af6874eb2ee73d9fff50b40e | 27,442 | py | Python | fedenhance/losses/sisdr.py | dbisk/fedenhance | e77cf9b1159c53db594f0d8fefb17777d7c8b58f | [
"MIT"
] | 24 | 2021-05-11T04:57:07.000Z | 2022-03-08T10:32:37.000Z | fedenhance/losses/sisdr.py | dbisk/fedenhance | e77cf9b1159c53db594f0d8fefb17777d7c8b58f | [
"MIT"
] | null | null | null | fedenhance/losses/sisdr.py | dbisk/fedenhance | e77cf9b1159c53db594f0d8fefb17777d7c8b58f | [
"MIT"
] | 3 | 2021-08-10T09:42:15.000Z | 2021-11-02T00:15:16.000Z | """!
@brief SISNR very efficient computation in Torch. PArts have been used from
asteroid for values cross checking.
@author Efthymios Tzinis {etzinis2@illinois.edu}
@copyright University of illinois at Urbana Champaign
"""
import torch
import torch.nn as nn
import itertools
from torch.nn.modules.loss import _Loss
... | 43.283912 | 84 | 0.586911 |
f1022f6b471a36dad34b862a6eafe5c38e4f401d | 5,412 | py | Python | contactmps/admin.py | OpenUpSA/contact-mps | 63d7f86e1b6c9319a4d0344a6125cd22770f34c7 | [
"MIT"
] | null | null | null | contactmps/admin.py | OpenUpSA/contact-mps | 63d7f86e1b6c9319a4d0344a6125cd22770f34c7 | [
"MIT"
] | 12 | 2017-06-08T09:36:49.000Z | 2021-06-10T18:48:08.000Z | contactmps/admin.py | OpenUpSA/contact-mps | 63d7f86e1b6c9319a4d0344a6125cd22770f34c7 | [
"MIT"
] | 2 | 2017-07-17T15:14:25.000Z | 2020-06-22T02:08:58.000Z | import xlwt
import datetime
from django.contrib.sites.shortcuts import get_current_site
from django.http import HttpResponse
from django.contrib import admin
from django.utils.translation import gettext_lazy as _
from .models import (
Campaign,
Committee,
ContactDetail,
Email,
Entity,
SenderQA... | 34.692308 | 124 | 0.607169 |
71607b876976356a5d291267e33766c03ed4ef07 | 535 | py | Python | Lib/site-packages/PyInstaller/hooks/hook-babel.py | fhqjgd/python2.7 | 6533019b8b2fbe113aa552e44247c054bdd8a75b | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/PyInstaller/hooks/hook-babel.py | fhqjgd/python2.7 | 6533019b8b2fbe113aa552e44247c054bdd8a75b | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/PyInstaller/hooks/hook-babel.py | fhqjgd/python2.7 | 6533019b8b2fbe113aa552e44247c054bdd8a75b | [
"bzip2-1.0.6"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2013-2016, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License with exception
# for distributing bootloader.
#
# The full license is in the file COPYING.txt, distributed with this s... | 33.4375 | 78 | 0.553271 |
f159d8a79c247690d6141f09f6af3e93f6b55c91 | 2,627 | py | Python | core/views/reports.py | Egorka96/med-org-portal | 3f55fb59daea03684b3bc6b5c394cd06cfd6e2df | [
"MIT"
] | 2 | 2020-03-02T17:29:14.000Z | 2020-05-28T13:19:49.000Z | core/views/reports.py | Egorka96/med-org-portal | 3f55fb59daea03684b3bc6b5c394cd06cfd6e2df | [
"MIT"
] | 88 | 2020-02-17T09:46:57.000Z | 2022-03-12T00:24:32.000Z | core/views/reports.py | Egorka96/med-org-portal | 3f55fb59daea03684b3bc6b5c394cd06cfd6e2df | [
"MIT"
] | 1 | 2020-04-17T15:56:51.000Z | 2020-04-17T15:56:51.000Z | from django.conf import settings
from django.contrib.auth.mixins import PermissionRequiredMixin
from django.urls import reverse
import core.generic.mixins
import core.generic.views
from core import forms
from core.datatools.report import get_report_period
from core.excel.reports import WorkersDoneExcel
from mis.servi... | 34.116883 | 114 | 0.655501 |
66f209c65d581f8778ca1ba0f4548d51aa3738f7 | 970 | py | Python | playwave.py | tebeka/pythonwise | 56f8cb7aa792c3ad6a3dc754e15f6a04890d694a | [
"BSD-3-Clause"
] | 21 | 2016-11-16T20:08:56.000Z | 2021-12-11T23:13:05.000Z | playwave.py | tebeka/pythonwise | 56f8cb7aa792c3ad6a3dc754e15f6a04890d694a | [
"BSD-3-Clause"
] | 1 | 2020-10-05T08:35:31.000Z | 2020-10-05T08:35:31.000Z | playwave.py | tebeka/pythonwise | 56f8cb7aa792c3ad6a3dc754e15f6a04890d694a | [
"BSD-3-Clause"
] | 8 | 2016-11-12T22:54:55.000Z | 2021-02-10T10:46:23.000Z | #!/usr/bin/env python
'''Play a wav file on Linux
Freely copied from
http://www.velocityreviews.com/forums/t337346-how-to-play-sound-in-python.html
'''
import wave
import ossaudiodev
def playwave(wavefile):
fo = wave.open(wavefile, "rb")
(nc, sw, fr, nf, comptype, compname) = fo.getparams()
dsp = ossaudi... | 22.55814 | 78 | 0.656701 |
45e438abde0556ed144683763c659906fe73b7aa | 6,423 | py | Python | utils/plot_tasks.py | SamuelePilleri/plaso | f5687f12a89c7309797ccc285da78e855c120579 | [
"Apache-2.0"
] | null | null | null | utils/plot_tasks.py | SamuelePilleri/plaso | f5687f12a89c7309797ccc285da78e855c120579 | [
"Apache-2.0"
] | null | null | null | utils/plot_tasks.py | SamuelePilleri/plaso | f5687f12a89c7309797ccc285da78e855c120579 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Script to plot tasks from profiling data.
This script requires the matplotlib and numpy Python modules.
"""
from __future__ import print_function
# mathplotlib does not support Unicode strings a column names.
# from __future__ import unicode_literals
import argparse
i... | 31.331707 | 80 | 0.709793 |
d749831e45681d9ff125c2c4cff6b5d864c69758 | 2,624 | py | Python | torchmetrics/functional/retrieval/fall_out.py | niberger/metrics | c537c9b3e8e801772a7e5670ff273321ed26e77b | [
"Apache-2.0"
] | null | null | null | torchmetrics/functional/retrieval/fall_out.py | niberger/metrics | c537c9b3e8e801772a7e5670ff273321ed26e77b | [
"Apache-2.0"
] | null | null | null | torchmetrics/functional/retrieval/fall_out.py | niberger/metrics | c537c9b3e8e801772a7e5670ff273321ed26e77b | [
"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... | 41.650794 | 119 | 0.691311 |
389c4f09d94b853d26a91486d518694d3d1ca38e | 7,380 | py | Python | pywikibot/families/wikibooks_family.py | valhallasw/pywikibot-core | 32a8c3c1298a5cb077381fe202daefde82c1c5d3 | [
"MIT"
] | null | null | null | pywikibot/families/wikibooks_family.py | valhallasw/pywikibot-core | 32a8c3c1298a5cb077381fe202daefde82c1c5d3 | [
"MIT"
] | null | null | null | pywikibot/families/wikibooks_family.py | valhallasw/pywikibot-core | 32a8c3c1298a5cb077381fe202daefde82c1c5d3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Family module for Wikibooks."""
from __future__ import unicode_literals
from pywikibot import family
__version__ = '$Id: 389c4f09d94b853d26a91486d518694d3d1ca38e $'
# The Wikimedia family that is known as Wikibooks
class Family(family.WikimediaFamily):
"""Family class for Wikibooks.... | 49.2 | 157 | 0.666531 |
575193252d49d2a71ea2d36b2f396d37c02dcd50 | 1,894 | py | Python | oslo/concurrency/fixture/lockutils.py | citrix-openstack-build/oslo.concurrency | ca01f962c940927438820e7d14f925bcce1a9895 | [
"Apache-2.0"
] | null | null | null | oslo/concurrency/fixture/lockutils.py | citrix-openstack-build/oslo.concurrency | ca01f962c940927438820e7d14f925bcce1a9895 | [
"Apache-2.0"
] | null | null | null | oslo/concurrency/fixture/lockutils.py | citrix-openstack-build/oslo.concurrency | ca01f962c940927438820e7d14f925bcce1a9895 | [
"Apache-2.0"
] | null | null | null | # Copyright 2011 OpenStack Foundation.
# 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 req... | 36.423077 | 79 | 0.68849 |
008f49efd7db1a926a73c76cc44809b557ed3a24 | 4,129 | py | Python | L17/sql_mini_solve/flask_example.py | thebestday/python | 2efb7fbd5c4ee40c03233875c1989ce68aa0fe18 | [
"MIT"
] | null | null | null | L17/sql_mini_solve/flask_example.py | thebestday/python | 2efb7fbd5c4ee40c03233875c1989ce68aa0fe18 | [
"MIT"
] | null | null | null | L17/sql_mini_solve/flask_example.py | thebestday/python | 2efb7fbd5c4ee40c03233875c1989ce68aa0fe18 | [
"MIT"
] | null | null | null | from flask import Flask, request, render_template
import requests
from average_wage import sallaryfunction
import sqlite3 as lite
import sys
app = Flask(__name__)
@app.route('/')
@app.route('/main')
def hello():
return render_template('main.html')
@app.route('/contacts')
def contact():
return render_templa... | 29.92029 | 184 | 0.635747 |
e0f877327dfcadd5a67ef4c7a49a5ed6168ca921 | 603 | py | Python | testproject/testproject/settings/base.py | motius/channels | f46ed6ec9865c5e995d4e4de1dee4b097b855ee3 | [
"BSD-3-Clause"
] | 3 | 2019-02-07T09:43:03.000Z | 2020-01-18T08:44:47.000Z | testproject/testproject/settings/base.py | motius/channels | f46ed6ec9865c5e995d4e4de1dee4b097b855ee3 | [
"BSD-3-Clause"
] | 1 | 2022-02-11T03:46:32.000Z | 2022-02-11T03:46:32.000Z | testproject/testproject/settings/base.py | zsjohny/channels | 6d71106c3c6a8924f75e5058cd6c54e765af3b94 | [
"BSD-3-Clause"
] | 1 | 2020-01-16T12:05:52.000Z | 2020-01-16T12:05:52.000Z | # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = '-3yt98bfvxe)7+^h#(@8k#1(1m_fpd9x3q2wolfbf^!r5ma62u'
DEBUG = True
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
... | 21.535714 | 71 | 0.681592 |
5b84ee8a28e1afa705949fc374f7ea13be750ad2 | 4,163 | py | Python | Scripts/Image_fetch.py | edoriggio/InstagramDuplicatesBot | 989ef33479ed0fda7be947dd278e716357a927be | [
"Apache-2.0"
] | null | null | null | Scripts/Image_fetch.py | edoriggio/InstagramDuplicatesBot | 989ef33479ed0fda7be947dd278e716357a927be | [
"Apache-2.0"
] | null | null | null | Scripts/Image_fetch.py | edoriggio/InstagramDuplicatesBot | 989ef33479ed0fda7be947dd278e716357a927be | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Edoardo Riggio
#
# 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 writ... | 33.845528 | 108 | 0.689166 |
4a41a4195f81e276767804e072be2db8a93c61fd | 1,034 | py | Python | utils/errors.py | iBlackDev/django-project-template | 44de354c560f3a2b22f3c753c1278a2f49aec75e | [
"MIT"
] | null | null | null | utils/errors.py | iBlackDev/django-project-template | 44de354c560f3a2b22f3c753c1278a2f49aec75e | [
"MIT"
] | null | null | null | utils/errors.py | iBlackDev/django-project-template | 44de354c560f3a2b22f3c753c1278a2f49aec75e | [
"MIT"
] | null | null | null | # coding:utf-8
ERROR_0_OK = 0
ERROR_UNKOWN = -100
ERROR_PERMISSION_DENIED = -210
ERROR_TOKEN_ERROR = -300
ERROR_TOKEN_EXPIRE = -310
# 错误号 英文代码 中文描述 备注
CONSTANT = {
# 公用模块
"100000": ["Request type error", u"请求类型错误"],
"100001": ["Required field can not be empty", u"必填字段不能为空"],
"100002": ["Parame... | 29.542857 | 75 | 0.60735 |
de03e01870134a7cf2b3846ff294bd3a3f6c4f68 | 138 | py | Python | tasks/R2R-judy/src/utils/__init__.py | IMNearth/Curriculum-Learning-For-VLN | d2fe1286eb295dc8c63a0c886b35883f32481d85 | [
"MIT"
] | 8 | 2021-11-09T13:29:19.000Z | 2022-03-30T04:01:42.000Z | tasks/R2R-judy/src/utils/__init__.py | IMNearth/Curriculum-Learning-For-VLN | d2fe1286eb295dc8c63a0c886b35883f32481d85 | [
"MIT"
] | 1 | 2022-03-17T14:16:44.000Z | 2022-03-29T03:16:32.000Z | tasks/R2R-judy/src/utils/__init__.py | IMNearth/Curriculum-Learning-For-VLN | d2fe1286eb295dc8c63a0c886b35883f32481d85 | [
"MIT"
] | null | null | null | from .misc import *
from .dtw import DTW
from .cls import CLS
from .config import get_cfg_defaults
from .region_label import REGION_LABELS | 27.6 | 39 | 0.818841 |
bcf6ca3d6d1b5e368d70ff619ed47470a9e58580 | 1,818 | py | Python | taffrail/heapster_api_source.py | taffrailmetrics/taffrail | 274023855dff0e20053105b7562c73324203f3b3 | [
"MIT"
] | 2 | 2018-01-30T02:44:50.000Z | 2018-02-16T13:02:44.000Z | taffrail/heapster_api_source.py | taffrailmetrics/taffrail | 274023855dff0e20053105b7562c73324203f3b3 | [
"MIT"
] | null | null | null | taffrail/heapster_api_source.py | taffrailmetrics/taffrail | 274023855dff0e20053105b7562c73324203f3b3 | [
"MIT"
] | null | null | null | from kubernetes import client
from prometheus_client.parser import text_string_to_metric_families
import json
from .metrics import MetricsUtility
import os
class HeapsterApiSource(object):
enabled = False
endpoint = {"HEAPSTER_NAME": "heapster", "HEAPSTER_NAMESPACE": "kube-system", "HEAPSTER_PATH": "/metrics"}... | 36.36 | 130 | 0.689219 |
eef607feb70c93a09a57d76c600c6bc699bc94fc | 7,664 | py | Python | arrested/mixins.py | haskiindahouse/promosales-and-prizes-flask | 5b9ae3e0506d847463e367180f4e784fe835c393 | [
"MIT"
] | 46 | 2016-06-28T10:25:07.000Z | 2019-12-10T20:53:47.000Z | arrested/mixins.py | haskiindahouse/promosales-and-prizes-flask | 5b9ae3e0506d847463e367180f4e784fe835c393 | [
"MIT"
] | 4 | 2018-02-10T10:53:08.000Z | 2018-11-07T08:11:06.000Z | arrested/mixins.py | haskiindahouse/promosales-and-prizes-flask | 5b9ae3e0506d847463e367180f4e784fe835c393 | [
"MIT"
] | 9 | 2016-07-20T17:05:46.000Z | 2022-02-15T18:40:17.000Z |
__all__ = [
'GetListMixin', 'CreateMixin', 'GetObjectMixin', 'PutObjectMixin',
'PatchObjectMixin', 'DeleteObjectMixin', 'ObjectMixin'
]
class HTTPMixin(object):
"""
"""
def _response(self, body, status):
"""
"""
return (self.make_response(body, status=status))
class Ge... | 30.173228 | 89 | 0.64953 |
897ffd7eedddf610bfd85fd4c105ac898ffa7a5e | 4,531 | py | Python | wagtail/admin/views/pages/copy.py | stevedya/wagtail | 52e5abfe62547cdfd90ea7dfeb8bf5a52f16324c | [
"BSD-3-Clause"
] | 1 | 2022-02-09T05:25:30.000Z | 2022-02-09T05:25:30.000Z | wagtail/admin/views/pages/copy.py | stevedya/wagtail | 52e5abfe62547cdfd90ea7dfeb8bf5a52f16324c | [
"BSD-3-Clause"
] | null | null | null | wagtail/admin/views/pages/copy.py | stevedya/wagtail | 52e5abfe62547cdfd90ea7dfeb8bf5a52f16324c | [
"BSD-3-Clause"
] | null | null | null | from django.shortcuts import redirect
from django.template.response import TemplateResponse
from django.utils.translation import gettext as _
from wagtail import hooks
from wagtail.actions.copy_page import CopyPageAction
from wagtail.actions.create_alias import CreatePageAliasAction
from wagtail.admin import messages
... | 39.060345 | 100 | 0.593688 |
2ea3a782db8eca929b01773b1597528b441813e2 | 1,704 | py | Python | setup.py | wmayner/umap | 224a0125cc3fac7a3720875f001ad6e25eed1cbd | [
"BSD-3-Clause"
] | null | null | null | setup.py | wmayner/umap | 224a0125cc3fac7a3720875f001ad6e25eed1cbd | [
"BSD-3-Clause"
] | null | null | null | setup.py | wmayner/umap | 224a0125cc3fac7a3720875f001ad6e25eed1cbd | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup
def readme():
try:
with open("README.rst", encoding="UTF-8") as readme_file:
return readme_file.read()
except TypeError:
# Python 2.7 doesn't support encoding argument in builtin open
import io
with io.open("README.rst", encoding="UTF-8"... | 30.428571 | 70 | 0.578638 |
820b3c8c1adc3ce1e0765efce202ce4cde9c5e45 | 449 | py | Python | cluster_tools/autoencoderpreprocessor.py | ninastijepovic/MasterThesis | 2579f1e74c0ce404f350a6d441e273b6aef4eadc | [
"MIT"
] | null | null | null | cluster_tools/autoencoderpreprocessor.py | ninastijepovic/MasterThesis | 2579f1e74c0ce404f350a6d441e273b6aef4eadc | [
"MIT"
] | null | null | null | cluster_tools/autoencoderpreprocessor.py | ninastijepovic/MasterThesis | 2579f1e74c0ce404f350a6d441e273b6aef4eadc | [
"MIT"
] | null | null | null | #Remove this later
import sys
sys.path.insert(0, '/Users/mishamesarcik/Workspace/phd/Workspace/lofar-dev')
import preprocessor
def preprocess(observation):
if observation is None:
raise ValueError('No data to preprocess.')
if observation is None or 'visibilities' not in observation:
raise Val... | 24.944444 | 76 | 0.721604 |
cb9d6c5d18a1c28b875447690d67381ea9d144dd | 7,493 | py | Python | tools/torch_tools.py | gaoliyao/Replica_Exchange_Stochastic_Gradient_MCMC | 609f803ca334b21820dc020c16ad8113363a03e2 | [
"MIT"
] | 21 | 2020-06-30T01:14:45.000Z | 2022-03-31T08:03:17.000Z | tools/torch_tools.py | gaoliyao/Replica_Exchange_Stochastic_Gradient_MCMC | 609f803ca334b21820dc020c16ad8113363a03e2 | [
"MIT"
] | null | null | null | tools/torch_tools.py | gaoliyao/Replica_Exchange_Stochastic_Gradient_MCMC | 609f803ca334b21820dc020c16ad8113363a03e2 | [
"MIT"
] | 2 | 2020-11-02T22:06:10.000Z | 2021-07-17T23:35:21.000Z | import math
import numpy as np
import copy
import sys
import os
import timeit
import csv
import dill
from tqdm import tqdm ## better progressbar
from math import exp
from utils import find_classes
import random
import pickle
import numpy as np
from numpy import genfromtxt
## import pytorch modules
import torch
from ... | 38.229592 | 155 | 0.648338 |
20fcf0fe2f6819adfcb795e5274f2c17d93198ea | 353 | py | Python | syntax/exception/helloCatchException.py | Dev-Learn/LearnPython | a601f5eeeb05236a3e179bf8c34425a95cb0c919 | [
"Apache-2.0"
] | null | null | null | syntax/exception/helloCatchException.py | Dev-Learn/LearnPython | a601f5eeeb05236a3e179bf8c34425a95cb0c919 | [
"Apache-2.0"
] | null | null | null | syntax/exception/helloCatchException.py | Dev-Learn/LearnPython | a601f5eeeb05236a3e179bf8c34425a95cb0c919 | [
"Apache-2.0"
] | null | null | null | print("Three")
value = 10 / 2
print("Two")
value = 10 / 1
print("One")
d = 0
try:
# Phép chia này có vấn đề, chia cho 0.
# Một lỗi được phát ra tại đây (ZeroDivisionError).
value = 10 / d
print("value = ", value)
except ZeroDivisionError as e:
print("Error: ", str(e))
print("Ignore to c... | 14.12 | 55 | 0.586402 |
b3d320abbb67b0d5a687421e22bfcec2b4ee708a | 1,907 | py | Python | autostat/sklearn/tests/custom_periodic_kernel_test.py | bcolloran/autostat | 1653642e42d196223cb0e5f79408100b8e590601 | [
"MIT"
] | null | null | null | autostat/sklearn/tests/custom_periodic_kernel_test.py | bcolloran/autostat | 1653642e42d196223cb0e5f79408100b8e590601 | [
"MIT"
] | null | null | null | autostat/sklearn/tests/custom_periodic_kernel_test.py | bcolloran/autostat | 1653642e42d196223cb0e5f79408100b8e590601 | [
"MIT"
] | null | null | null | import numpy as np
import pytest
from ..custom_periodic_kernel import PeriodicKernelNoConstant
class TestGradients:
@pytest.mark.parametrize("param_init_val", [0.001, 0.04, 0.3, 0.8, 1.5, 10.5, 15])
def test_grad_length_scale(self, param_init_val):
param = "length_scale"
mat_slice = 0
... | 29.338462 | 86 | 0.60042 |
bc35bd5a31628d48174cc566001f24706ce4c7d3 | 5,586 | py | Python | pagarmeapisdk/models/get_bank_account_response.py | pagarme/pagarme-python-sdk | 5a709ce54d46fc7326f73242700602c1c5a6bd26 | [
"MIT"
] | null | null | null | pagarmeapisdk/models/get_bank_account_response.py | pagarme/pagarme-python-sdk | 5a709ce54d46fc7326f73242700602c1c5a6bd26 | [
"MIT"
] | null | null | null | pagarmeapisdk/models/get_bank_account_response.py | pagarme/pagarme-python-sdk | 5a709ce54d46fc7326f73242700602c1c5a6bd26 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
pagarmeapisdk
This file was automatically generated by APIMATIC v3.0 (
https://www.apimatic.io ).
"""
from pagarmeapisdk.api_helper import APIHelper
from pagarmeapisdk.models.get_recipient_response import GetRecipientResponse
class GetBankAccountResponse(object):
"""I... | 37.743243 | 139 | 0.592195 |
34162ff692f75ac72cc8588917578293295c5d65 | 32,328 | py | Python | se/spelling.py | bryanwills/tools | ef60cd4fc81144697610df1597cdf8decb682425 | [
"CC0-1.0"
] | null | null | null | se/spelling.py | bryanwills/tools | ef60cd4fc81144697610df1597cdf8decb682425 | [
"CC0-1.0"
] | null | null | null | se/spelling.py | bryanwills/tools | ef60cd4fc81144697610df1597cdf8decb682425 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
"""
Defines various spelling-related helper functions.
"""
from typing import Set
import importlib_resources
import regex
import se
DICTIONARY: Set[str] = set() # Store our hyphenation dictionary so we don't re-read the file on every pass
def get_xhtml_language(xhtml: str) -> str:
"""
Try to... | 69.672414 | 221 | 0.63496 |
640bfefb859aa35de769fc5572187db2ada7fa4d | 5,712 | py | Python | isi_sdk_9_0_0/isi_sdk_9_0_0/models/create_hardware_tape_name_response.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_9_0_0/isi_sdk_9_0_0/models/create_hardware_tape_name_response.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_9_0_0/isi_sdk_9_0_0/models/create_hardware_tape_name_response.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 10
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from isi_sdk_9_0_0.models.create... | 32.089888 | 142 | 0.61292 |
1a96b1d978f6593ae87fde022a7f5afaa97c852a | 2,157 | py | Python | AyiinXd/modules/yinsban.py | AyiinXd/Ayiin-Userbot | 6e2fcbf087c14282eb9f4313954552c06eb52f47 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 3 | 2022-02-05T09:45:49.000Z | 2022-03-25T04:52:11.000Z | AyiinXd/modules/yinsban.py | AyiinXd/Ayiin-Userbot | 6e2fcbf087c14282eb9f4313954552c06eb52f47 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 3 | 2022-03-03T22:35:03.000Z | 2022-03-07T02:40:10.000Z | AyiinXd/modules/yinsban.py | AyiinXd/Ayiin-Userbot | 6e2fcbf087c14282eb9f4313954552c06eb52f47 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 20 | 2022-01-25T05:19:18.000Z | 2022-03-31T08:23:23.000Z | # Port By @VckyouuBitch From GeezProject
# Perkontolan Dengan Hapus Credits
# Recode By : @AyiinXd
from asyncio import sleep
from telethon.tl.types import ChatBannedRights
from telethon.tl.functions.channels import EditBannedRequest
from telethon.tl.types import ChannelParticipantsKicked
from AyiinXd import CMD_HELP... | 31.720588 | 142 | 0.658785 |
8b089206140cec00916fde72173e860a5876aaa0 | 1,909 | py | Python | src/PriceComparer/middlewares.py | bugsancho/PriceComparer | 21d1c1b38c1d570c914f5d870ed3f3dedb15a886 | [
"MIT"
] | null | null | null | src/PriceComparer/middlewares.py | bugsancho/PriceComparer | 21d1c1b38c1d570c914f5d870ed3f3dedb15a886 | [
"MIT"
] | null | null | null | src/PriceComparer/middlewares.py | bugsancho/PriceComparer | 21d1c1b38c1d570c914f5d870ed3f3dedb15a886 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Define here the models for your spider middleware
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/spider-middleware.html
from scrapy import signals
class PricecomparerSpiderMiddleware(object):
# Not all methods need to be defined. If a method is not defined,
# sc... | 33.491228 | 78 | 0.674175 |
45d00c1e0d73f1faec1dbf2cdac7fbfb4f4154eb | 4,393 | py | Python | src/unity/python/turicreate/test/test_sframe_builder.py | fossabot/turicreate | a500d5e52143ad15ebdf771d9f74198982c7c45c | [
"BSD-3-Clause"
] | 1 | 2019-04-16T19:51:18.000Z | 2019-04-16T19:51:18.000Z | src/unity/python/turicreate/test/test_sframe_builder.py | tashby/turicreate | 7f07ce795833d0c56c72b3a1fb9339bed6d178d1 | [
"BSD-3-Clause"
] | 3 | 2021-09-08T02:18:00.000Z | 2022-03-12T00:39:44.000Z | src/unity/python/turicreate/test/test_sframe_builder.py | tashby/turicreate | 7f07ce795833d0c56c72b3a1fb9339bed6d178d1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright © 2017 Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can
# be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
from __future__ import print_function as _
from __future__ import division as _
from... | 40.302752 | 99 | 0.582062 |
4e62c4548f59bd9bbb7245535174e7cc111eab96 | 5,105 | py | Python | orquesta/expressions/base.py | igcherkaev/orquesta | 2baa66d33f53cb04b660b3ce284a52d478ecc528 | [
"Apache-2.0"
] | 85 | 2018-07-26T04:29:49.000Z | 2022-03-31T10:47:50.000Z | orquesta/expressions/base.py | igcherkaev/orquesta | 2baa66d33f53cb04b660b3ce284a52d478ecc528 | [
"Apache-2.0"
] | 149 | 2018-07-27T22:36:45.000Z | 2022-03-31T10:54:32.000Z | orquesta/expressions/base.py | igcherkaev/orquesta | 2baa66d33f53cb04b660b3ce284a52d478ecc528 | [
"Apache-2.0"
] | 24 | 2018-08-07T13:37:41.000Z | 2021-12-16T18:12:43.000Z | # Copyright 2019 Extreme Networks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 28.679775 | 100 | 0.678746 |
eabfa17177e0c50fd32702cecb6186777266a9a5 | 1,019 | py | Python | sc2/controller.py | dbelliss/python-sc2 | 8ccc2c529550c44cc0c93b9a4f6702339fc2831d | [
"MIT"
] | 1 | 2018-05-16T06:14:12.000Z | 2018-05-16T06:14:12.000Z | sc2/controller.py | dbelliss/python-sc2 | 8ccc2c529550c44cc0c93b9a4f6702339fc2831d | [
"MIT"
] | null | null | null | sc2/controller.py | dbelliss/python-sc2 | 8ccc2c529550c44cc0c93b9a4f6702339fc2831d | [
"MIT"
] | null | null | null | from s2clientprotocol import sc2api_pb2 as sc_pb
from .protocol import Protocol
from .player import Computer
import logging
logger = logging.getLogger(__name__)
class Controller(Protocol):
def __init__(self, ws):
super().__init__(ws)
async def create_game(self, game_map, players, realtime):
a... | 30.878788 | 69 | 0.613346 |
e8474ee4171b46a0e1537b469c5c84d93f9697f2 | 67 | py | Python | PacManTaro/create_app.py | SomHackathon2020/somhackathon2020-pacmantaro | 9fb3fb83ada72fa043e61d2c44b8b02f14cbe60a | [
"MIT"
] | 3 | 2020-02-09T10:56:49.000Z | 2020-02-09T12:14:26.000Z | PacManTaro/create_app.py | SomHackathon2020/somhackathon2020-pacmantaro | 9fb3fb83ada72fa043e61d2c44b8b02f14cbe60a | [
"MIT"
] | null | null | null | PacManTaro/create_app.py | SomHackathon2020/somhackathon2020-pacmantaro | 9fb3fb83ada72fa043e61d2c44b8b02f14cbe60a | [
"MIT"
] | null | null | null | from __init__ import db, create_app
db.create_all(app=create_app()) | 33.5 | 35 | 0.820896 |
61d784a94017623cb9d16e8b7f532318cfa8d284 | 422 | py | Python | tests/mock_requests_responses.py | varunvarma/panoptes | 733e1b17e01d47fe0a399e2fe635f614cc5a0b88 | [
"Apache-2.0"
] | 1 | 2020-07-14T20:43:32.000Z | 2020-07-14T20:43:32.000Z | tests/mock_requests_responses.py | nghia-tran/panoptes | f91d6cd5e2afa3e1ecd9976bdfd13be3a10f0c00 | [
"Apache-2.0"
] | null | null | null | tests/mock_requests_responses.py | nghia-tran/panoptes | f91d6cd5e2afa3e1ecd9976bdfd13be3a10f0c00 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2018, Oath Inc.
Licensed under the terms of the Apache 2.0 license. See LICENSE file in project root for terms.
"""
class MockRequestsResponseBadRequest(object):
status_code = 400
content = 'Bad Request'
class MockRequestsResponseServerFailure(object):
status_code = 500
content = 'Inte... | 21.1 | 95 | 0.734597 |
b243675c5c002c0ba739115212b854d57d033ad5 | 15,809 | py | Python | test/api_tests.py | echoprotocol/echopy-lib | 7fe11eeeba727023ea61e19b2c1b0ff5c097a2f3 | [
"MIT"
] | 7 | 2019-02-26T18:28:24.000Z | 2019-12-18T14:47:04.000Z | test/api_tests.py | echoprotocol/echopy-lib | 7fe11eeeba727023ea61e19b2c1b0ff5c097a2f3 | [
"MIT"
] | null | null | null | test/api_tests.py | echoprotocol/echopy-lib | 7fe11eeeba727023ea61e19b2c1b0ff5c097a2f3 | [
"MIT"
] | 2 | 2019-09-20T10:20:54.000Z | 2020-03-20T10:06:55.000Z | import unittest
from .fixtures import connect_echo, disconnect_echo, get_keys
from echopy.echoapi.ws.exceptions import RPCError
class ApiTest(unittest.TestCase):
def setUp(self):
self.echo = connect_echo()
def tearDown(self):
disconnect_echo(self.echo)
# ASSET API TESTS
def test_get_... | 39.228288 | 110 | 0.690746 |
b91b1c026ed9f424f4171b2cca83e9bdcfa91607 | 362 | py | Python | venv/lib/python3.9/site-packages/django_postgres_extensions/signals.py | boshanxiang/bernoulli_backend | d446a33014d7bd9b5232a921edfd377d05fe0121 | [
"MIT"
] | null | null | null | venv/lib/python3.9/site-packages/django_postgres_extensions/signals.py | boshanxiang/bernoulli_backend | d446a33014d7bd9b5232a921edfd377d05fe0121 | [
"MIT"
] | null | null | null | venv/lib/python3.9/site-packages/django_postgres_extensions/signals.py | boshanxiang/bernoulli_backend | d446a33014d7bd9b5232a921edfd377d05fe0121 | [
"MIT"
] | null | null | null | def delete_reverse_related(sender, signal, instance, using, **kwargs):
for related in instance._meta.related_objects:
field = related.field
if getattr(field, 'many_to_many_array', False):
accessor_name = field.get_reverse_accessor_name()
accessor = getattr(instance, acce... | 45.25 | 71 | 0.668508 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.