hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 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 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_forks_repo_name stringlengths 5 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a26fe886e8adceb9b8d81173228bcaaf66fda7b | 2,685 | py | Python | contrib/python-obsolete/setup.py | eido5/cubrid | f32dbe7cb90f096035c255d7b5f348438bbb5830 | [
"Apache-2.0",
"BSD-3-Clause"
] | 253 | 2016-03-12T01:03:42.000Z | 2022-03-14T08:24:39.000Z | contrib/python-obsolete/setup.py | eido5/cubrid | f32dbe7cb90f096035c255d7b5f348438bbb5830 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1,124 | 2016-03-31T03:48:58.000Z | 2022-03-31T23:44:04.000Z | contrib/python-obsolete/setup.py | eido5/cubrid | f32dbe7cb90f096035c255d7b5f348438bbb5830 | [
"Apache-2.0",
"BSD-3-Clause"
] | 268 | 2016-03-02T06:48:44.000Z | 2022-03-04T05:17:24.000Z | #
# Copyright (C) 2008 Search Solution Corporation.
# Copyright (c) 2016 CUBRID Corporation.
#
# 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 n... | 35.8 | 89 | 0.700931 |
4a26feb6bafc5ade9e8e2bb193282e9f5d50bb59 | 4,107 | py | Python | src/human_lambdas/user_handler/tests/test_forgotten_password.py | Human-Lambdas/human-lambdas | 9a2f2317f0c8dbfbfa88f3ba4994de7e6b2c4d50 | [
"Apache-2.0"
] | 25 | 2021-06-08T08:00:08.000Z | 2022-03-17T22:49:10.000Z | src/human_lambdas/user_handler/tests/test_forgotten_password.py | Human-Lambdas/human-lambdas | 9a2f2317f0c8dbfbfa88f3ba4994de7e6b2c4d50 | [
"Apache-2.0"
] | null | null | null | src/human_lambdas/user_handler/tests/test_forgotten_password.py | Human-Lambdas/human-lambdas | 9a2f2317f0c8dbfbfa88f3ba4994de7e6b2c4d50 | [
"Apache-2.0"
] | 5 | 2021-06-15T09:57:46.000Z | 2022-02-03T16:18:33.000Z | import logging
from django.test.utils import override_settings
from django.utils import timezone
from rest_framework import status
from rest_framework.test import APITestCase
from human_lambdas.user_handler.models import ForgottenPassword, User
logger = logging.getLogger(__name__)
class TestInvite(APITestCase):
... | 38.027778 | 84 | 0.658632 |
4a2700c68070bcc72e1d12f7ad22d715b92e7263 | 2,551 | py | Python | django_playlist/django_playlist/settings/local.py | kburts/django-playlist | d9b2fdc144fb1c227b683ae253bdcabd8a7e40c2 | [
"MIT"
] | null | null | null | django_playlist/django_playlist/settings/local.py | kburts/django-playlist | d9b2fdc144fb1c227b683ae253bdcabd8a7e40c2 | [
"MIT"
] | null | null | null | django_playlist/django_playlist/settings/local.py | kburts/django-playlist | d9b2fdc144fb1c227b683ae253bdcabd8a7e40c2 | [
"MIT"
] | null | null | null | """Development settings and globals."""
from __future__ import absolute_import
from os.path import join, normpath
from .base import *
########## DEBUG CONFIGURATION
# See: https://docs.djangoproject.com/en/dev/ref/settings/#debug
DEBUG = True
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-deb... | 27.138298 | 93 | 0.669541 |
4a2700e70f06db76afd257038ebdf0f36ad6fdfe | 5,341 | py | Python | src/models/layers/aspp.py | Klimorg/template_segmentation | f5a5066905acb06c66793d9a361eae8570652af2 | [
"Apache-2.0"
] | 1 | 2022-02-01T06:54:22.000Z | 2022-02-01T06:54:22.000Z | src/models/layers/aspp.py | Klimorg/template_segmentation | f5a5066905acb06c66793d9a361eae8570652af2 | [
"Apache-2.0"
] | 34 | 2021-11-01T14:19:35.000Z | 2022-03-28T14:25:35.000Z | src/models/layers/aspp.py | Klimorg/template_segmentation | f5a5066905acb06c66793d9a361eae8570652af2 | [
"Apache-2.0"
] | null | null | null | from typing import Any, Dict
import tensorflow as tf
from tensorflow.keras.layers import (
AveragePooling2D,
BatchNormalization,
Concatenate,
Conv2D,
Layer,
ReLU,
UpSampling2D,
)
from tensorflow.keras.models import Sequential
@tf.keras.utils.register_keras_serializable()
class ASPP(Layer)... | 29.346154 | 84 | 0.482307 |
4a27025f09cdf789d2b089c5093c138bd50fa094 | 2,201 | py | Python | aliyun-python-sdk-mse/aliyunsdkmse/request/v20190531/AddAuthResourceRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-mse/aliyunsdkmse/request/v20190531/AddAuthResourceRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-mse/aliyunsdkmse/request/v20190531/AddAuthResourceRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 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... | 37.305085 | 74 | 0.754203 |
4a270394aa718637de827bb494e3d1458dc42f56 | 9,769 | py | Python | models.py | Fraunhofer-SIT/ModExTransformer | 709e321ba68d7b4f1e55e50230adec5389574701 | [
"Apache-2.0"
] | 1 | 2022-03-21T13:16:42.000Z | 2022-03-21T13:16:42.000Z | models.py | Fraunhofer-SIT/ModExTransformer | 709e321ba68d7b4f1e55e50230adec5389574701 | [
"Apache-2.0"
] | null | null | null | models.py | Fraunhofer-SIT/ModExTransformer | 709e321ba68d7b4f1e55e50230adec5389574701 | [
"Apache-2.0"
] | null | null | null |
# Apache 2.0 License
# Copyright (c) 2015-present, Facebook, Inc.
# All rights reserved.
""" This file was copied from: https://github.com/facebookresearch/deit/blob/main/models.py
and modified by Fraunhofer SIT in order to use the DeiT as attack model in a model extraction attack.
Modified passages ar... | 39.232932 | 116 | 0.667929 |
4a2703dedf744199d59cfafa477e643e8eed1954 | 2,929 | py | Python | corus/sources/mokoron.py | Ilseyar/corus | 61a4776f5e534469bb9df1e451b6a6d5fc0e991b | [
"MIT"
] | 205 | 2019-05-01T07:38:01.000Z | 2022-03-30T04:02:54.000Z | corus/sources/mokoron.py | Ilseyar/corus | 61a4776f5e534469bb9df1e451b6a6d5fc0e991b | [
"MIT"
] | 78 | 2019-04-29T06:53:53.000Z | 2021-09-20T14:51:25.000Z | corus/sources/mokoron.py | Ilseyar/corus | 61a4776f5e534469bb9df1e451b6a6d5fc0e991b | [
"MIT"
] | 18 | 2019-06-19T09:56:10.000Z | 2022-01-30T14:55:14.000Z |
import re
from datetime import datetime
from corus.record import Record
from corus.io import load_lines
# – id: уникальный номер сообщения в системе twitter;
# – tdate: дата публикации сообщения (твита);
# – tmane: имя пользователя, опубликовавшего сообщение;
# – ttext: текст сообщения (твита);
# – ttype: поле в к... | 34.05814 | 334 | 0.656879 |
4a270429055799bb11c5f1a4697f3b53b4e71743 | 13,409 | py | Python | stage/test_dataformats.py | anubandhan/datacollector-tests | 301c024c66d68353735256b262b681dd05ba16cc | [
"Apache-2.0"
] | null | null | null | stage/test_dataformats.py | anubandhan/datacollector-tests | 301c024c66d68353735256b262b681dd05ba16cc | [
"Apache-2.0"
] | 1 | 2019-04-24T11:06:38.000Z | 2019-04-24T11:06:38.000Z | stage/test_dataformats.py | anubandhan/datacollector-tests | 301c024c66d68353735256b262b681dd05ba16cc | [
"Apache-2.0"
] | 2 | 2019-05-24T06:34:37.000Z | 2020-03-30T11:48:18.000Z | # Copyright 2018 StreamSets 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 writi... | 37.455307 | 141 | 0.69431 |
4a2704aa64be8a8c31100473b9806dc75ba7a26e | 112 | py | Python | mlask/__init__.py | name-yh2022/pymlask | 00e1602502b122db87f69236da7ed9cae0514abe | [
"BSD-3-Clause"
] | 89 | 2017-02-10T13:02:15.000Z | 2022-02-12T06:49:06.000Z | mlask/__init__.py | name-yh2022/pymlask | 00e1602502b122db87f69236da7ed9cae0514abe | [
"BSD-3-Clause"
] | 14 | 2017-02-12T06:22:01.000Z | 2022-01-16T03:17:53.000Z | mlask/__init__.py | name-yh2022/pymlask | 00e1602502b122db87f69236da7ed9cae0514abe | [
"BSD-3-Clause"
] | 19 | 2017-02-12T05:44:24.000Z | 2022-02-17T03:31:06.000Z | # -*- coding: utf-8 -*-
from .mlask import MLAsk
VERSION = (0, 3, 2)
__version__ = '0.3.2'
__all__ = ['MLAsk']
| 16 | 24 | 0.589286 |
4a2704b4df752ff7cd6e66bcd230cfed9d3640a7 | 975 | py | Python | Chapter06/2multinomial.py | Jchen-sudo/ml-code-record | 4a6f8237c66b381832ebd534cad92c684dc5fe3b | [
"MIT"
] | 50 | 2018-08-13T13:11:04.000Z | 2022-02-17T23:00:20.000Z | Chapter06/2multinomial.py | Jchen-sudo/ml-code-record | 4a6f8237c66b381832ebd534cad92c684dc5fe3b | [
"MIT"
] | null | null | null | Chapter06/2multinomial.py | Jchen-sudo/ml-code-record | 4a6f8237c66b381832ebd534cad92c684dc5fe3b | [
"MIT"
] | 29 | 2018-06-08T10:56:40.000Z | 2022-02-19T06:26:23.000Z | from __future__ import print_function
import numpy as np
from sklearn.feature_extraction import DictVectorizer
from sklearn.naive_bayes import MultinomialNB
# For reproducibility
np.random.seed(1000)
if __name__ == '__main__':
# Prepare a dummy dataset
data = [
{'house': 100, 'street': 50, 'shop':... | 26.351351 | 83 | 0.611282 |
4a27061d373cd4de43c133e5ef7316b076acd0c8 | 2,399 | py | Python | fluiddb/api/util.py | fluidinfo/fluiddb | b5a8c8349f3eaf3364cc4efba4736c3e33b30d96 | [
"Apache-2.0"
] | 3 | 2021-05-10T14:41:30.000Z | 2021-12-16T05:53:30.000Z | fluiddb/api/util.py | fluidinfo/fluiddb | b5a8c8349f3eaf3364cc4efba4736c3e33b30d96 | [
"Apache-2.0"
] | null | null | null | fluiddb/api/util.py | fluidinfo/fluiddb | b5a8c8349f3eaf3364cc4efba4736c3e33b30d96 | [
"Apache-2.0"
] | 2 | 2018-01-24T09:03:21.000Z | 2021-06-25T08:34:54.000Z | from fluiddb.data.permission import Operation
CATEGORY_AND_ACTION_BY_OPERATION = {
Operation.CREATE_NAMESPACE: (u'namespaces', u'create'),
Operation.UPDATE_NAMESPACE: (u'namespaces', u'update'),
Operation.DELETE_NAMESPACE: (u'namespaces', u'delete'),
Operation.LIST_NAMESPACE: (u'namespaces', u'list'),... | 40.661017 | 77 | 0.697791 |
4a27069d1076138b39c65a74aa54242265cb2583 | 42,328 | py | Python | pytorch_lightning/trainer/trainer.py | ybrovman/pytorch-lightning | c1c6e3b6c988c690f9e2cd5726da4ab3402dbd03 | [
"Apache-2.0"
] | 1 | 2020-05-07T15:15:40.000Z | 2020-05-07T15:15:40.000Z | pytorch_lightning/trainer/trainer.py | ybrovman/pytorch-lightning | c1c6e3b6c988c690f9e2cd5726da4ab3402dbd03 | [
"Apache-2.0"
] | null | null | null | pytorch_lightning/trainer/trainer.py | ybrovman/pytorch-lightning | c1c6e3b6c988c690f9e2cd5726da4ab3402dbd03 | [
"Apache-2.0"
] | null | null | null | import distutils
import inspect
import os
import sys
from argparse import ArgumentParser
from typing import Union, Optional, List, Dict, Tuple, Iterable, Any
import torch
import torch.distributed as torch_distrib
import torch.multiprocessing as mp
from torch.utils.data import DataLoader
from tqdm.auto import tqdm
fro... | 39.856874 | 119 | 0.6293 |
4a2706f92aedc8a27df4f80c14d6dbda08fe52fb | 2,235 | py | Python | kernel/examples/handler/component/feature/vert_soften.py | rinceyuan/WeFe | 8482cb737cb7ba37b2856d184cd42c1bd35a6318 | [
"Apache-2.0"
] | 39 | 2021-10-12T01:43:27.000Z | 2022-03-28T04:46:35.000Z | kernel/examples/handler/component/feature/vert_soften.py | rinceyuan/WeFe | 8482cb737cb7ba37b2856d184cd42c1bd35a6318 | [
"Apache-2.0"
] | 6 | 2021-10-14T02:11:47.000Z | 2022-03-23T02:41:50.000Z | kernel/examples/handler/component/feature/vert_soften.py | rinceyuan/WeFe | 8482cb737cb7ba37b2856d184cd42c1bd35a6318 | [
"Apache-2.0"
] | 10 | 2021-10-14T09:36:03.000Z | 2022-02-10T11:05:12.000Z | # Copyright 2021 Tianmian Tech. 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 applicable la... | 37.25 | 84 | 0.746309 |
4a2707312c8f112f66616bab1a593625aac53755 | 3,091 | py | Python | openGaussBase/testcase/KEYWORDS/current_user/Opengauss_Function_Keyword_Current_user_Case0020.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | openGaussBase/testcase/KEYWORDS/current_user/Opengauss_Function_Keyword_Current_user_Case0020.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | openGaussBase/testcase/KEYWORDS/current_user/Opengauss_Function_Keyword_Current_user_Case0020.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | """
Copyright (c) 2022 Huawei Technologies Co.,Ltd.
openGauss is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W... | 46.134328 | 128 | 0.621805 |
4a270775a7083975eb4cdf9f0584b7c410018d09 | 3,531 | py | Python | tests/test_utility/test_file_utils/test.py | ikegawa-koshi/avalon | 09ccad29f953341078e767053646f41c8c800237 | [
"Apache-2.0"
] | 127 | 2019-10-25T08:43:26.000Z | 2022-03-20T15:33:32.000Z | tests/test_utility/test_file_utils/test.py | ikegawa-koshi/avalon | 09ccad29f953341078e767053646f41c8c800237 | [
"Apache-2.0"
] | 275 | 2019-10-24T23:36:21.000Z | 2022-01-24T20:38:07.000Z | tests/test_utility/test_file_utils/test.py | ikegawa-koshi/avalon | 09ccad29f953341078e767053646f41c8c800237 | [
"Apache-2.0"
] | 110 | 2019-10-30T07:09:25.000Z | 2022-01-28T09:40:44.000Z | # Copyright 2019 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 wri... | 38.802198 | 80 | 0.601813 |
4a2707df6e8caed8caf622b3ac46cc792f1ee83e | 641 | py | Python | batch3/outputs/lensing-ommh2.py | sjoudaki/CosmoJBD | 3c1d029b74034b92cb2974de15e4c18637a5277e | [
"MIT"
] | null | null | null | batch3/outputs/lensing-ommh2.py | sjoudaki/CosmoJBD | 3c1d029b74034b92cb2974de15e4c18637a5277e | [
"MIT"
] | null | null | null | batch3/outputs/lensing-ommh2.py | sjoudaki/CosmoJBD | 3c1d029b74034b92cb2974de15e4c18637a5277e | [
"MIT"
] | null | null | null | import planckStyle as s
g = s.getSinglePlotter()
g.settings.solid_colors = [('#8CD3F5', '#006FED'), ('#F7BAA6', '#E03424'), 'g', 'cadetblue', 'olive',
'darkcyan']
roots = []
roots.append('base_lensing_lenspriors')
roots.append('base_plikHM_TE_lowE')
roots.append('base_plikHM_TT_lowl_lowE')... | 35.611111 | 101 | 0.692668 |
4a270893820360696545a5a30d78504c4a07b342 | 153 | py | Python | webapp.py | RouSage/diploma-webapp | 7fc7f477a9b45f85223a2aa72fdf9a7f3f567b26 | [
"MIT"
] | null | null | null | webapp.py | RouSage/diploma-webapp | 7fc7f477a9b45f85223a2aa72fdf9a7f3f567b26 | [
"MIT"
] | 4 | 2021-03-30T15:28:13.000Z | 2022-03-11T23:44:28.000Z | webapp.py | RouSage/diploma-webapp | 7fc7f477a9b45f85223a2aa72fdf9a7f3f567b26 | [
"MIT"
] | null | null | null | from app import app, db, cli
from app.models import Image
@app.shell_context_processor
def make_shell_context():
return {'db': db, 'Image': Image}
| 19.125 | 37 | 0.732026 |
4a270a7d1ad22dc927894adfcfb32ba3245ac343 | 12,789 | py | Python | dipy/reconst/tests/test_shm.py | ChantalTax/dipy | da656ca630934a79e5eabd4aee64f8f0ae05bf95 | [
"BSD-3-Clause"
] | null | null | null | dipy/reconst/tests/test_shm.py | ChantalTax/dipy | da656ca630934a79e5eabd4aee64f8f0ae05bf95 | [
"BSD-3-Clause"
] | null | null | null | dipy/reconst/tests/test_shm.py | ChantalTax/dipy | da656ca630934a79e5eabd4aee64f8f0ae05bf95 | [
"BSD-3-Clause"
] | null | null | null | """Test spherical harmonic models and the tools associated with those models"""
import numpy as np
import numpy.linalg as npl
from nose.tools import assert_equal, assert_raises, assert_true
from numpy.testing import assert_array_equal, assert_array_almost_equal
from dipy.core.sphere import hemi_icosahedron
from dipy.... | 34.847411 | 79 | 0.591837 |
4a270a9bfcba898e87481910c36d9638e49bff72 | 1,473 | py | Python | backend/users/models.py | JoaoAPS/AlugaInstrumentos | f4001f439c4f96c4de2b194ce268b9d7f95e4512 | [
"MIT"
] | null | null | null | backend/users/models.py | JoaoAPS/AlugaInstrumentos | f4001f439c4f96c4de2b194ce268b9d7f95e4512 | [
"MIT"
] | null | null | null | backend/users/models.py | JoaoAPS/AlugaInstrumentos | f4001f439c4f96c4de2b194ce268b9d7f95e4512 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import BaseUserManager, AbstractBaseUser
from django.contrib.auth.models import PermissionsMixin
class UserManager(BaseUserManager):
def create_user(self, email: str, name: str, password: str):
"""Create and save a new user"""
user = se... | 28.882353 | 74 | 0.674134 |
4a270b7d5568667b39eb1ed26f200856cfa041b8 | 6,157 | py | Python | python/snapy/netsnmp/unittests/__init__.py | marineam/nagcat | 445d0efe1fb2ec93c31d1f9d8fa0c0563189ffaf | [
"Apache-2.0"
] | null | null | null | python/snapy/netsnmp/unittests/__init__.py | marineam/nagcat | 445d0efe1fb2ec93c31d1f9d8fa0c0563189ffaf | [
"Apache-2.0"
] | null | null | null | python/snapy/netsnmp/unittests/__init__.py | marineam/nagcat | 445d0efe1fb2ec93c31d1f9d8fa0c0563189ffaf | [
"Apache-2.0"
] | null | null | null | # snapy - a python snmp library
#
# Copyright (C) 2009 ITA Software, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# version 2 as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be ... | 30.631841 | 76 | 0.600455 |
4a270d52ed62b8be666ae6536eb09180df7981dd | 1,949 | py | Python | ortools/sat/samples/optional_interval_sample_sat.py | AlohaChina/or-tools | 1ece0518104db435593a1a21882801ab6ada3e15 | [
"Apache-2.0"
] | 8,273 | 2015-02-24T22:10:50.000Z | 2022-03-31T21:19:27.000Z | ortools/sat/samples/optional_interval_sample_sat.py | AlohaChina/or-tools | 1ece0518104db435593a1a21882801ab6ada3e15 | [
"Apache-2.0"
] | 2,530 | 2015-03-05T04:27:21.000Z | 2022-03-31T06:13:02.000Z | ortools/sat/samples/optional_interval_sample_sat.py | AlohaChina/or-tools | 1ece0518104db435593a1a21882801ab6ada3e15 | [
"Apache-2.0"
] | 2,057 | 2015-03-04T15:02:02.000Z | 2022-03-30T02:29:27.000Z | #!/usr/bin/env python3
# Copyright 2010-2021 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 ... | 40.604167 | 79 | 0.706003 |
4a270d687783e58ea4d0778236cfdbe76a9b5136 | 911 | py | Python | DPGAnalysis/Skims/python/EcalTangentSkim_cfg.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 6 | 2017-09-08T14:12:56.000Z | 2022-03-09T23:57:01.000Z | DPGAnalysis/Skims/python/EcalTangentSkim_cfg.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 545 | 2017-09-19T17:10:19.000Z | 2022-03-07T16:55:27.000Z | DPGAnalysis/Skims/python/EcalTangentSkim_cfg.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 14 | 2017-10-04T09:47:21.000Z | 2019-10-23T18:04:45.000Z | import FWCore.ParameterSet.Config as cms
process = cms.Process("NonTkPointSkim")
process.load("FWCore.MessageService.MessageLogger_cfi")
process.MessageLogger = cms.Service(
"MessageLogger",
destinations = cms.untracked.vstring('output.txt')
)
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1... | 24.621622 | 73 | 0.749726 |
4a270dc17c0b5ca52d9adf06bc47434a839c7703 | 6,470 | py | Python | python_2dcfd/latticeBoltzmanDemo.py | matthewa313/2D-CFD | af5f0f81ae1ba55993eb331f08480927875a6d1a | [
"MIT"
] | 2 | 2021-05-06T00:04:40.000Z | 2021-05-06T08:02:06.000Z | python_2dcfd/latticeBoltzmanDemo.py | matthewa313/2d-cfd | af5f0f81ae1ba55993eb331f08480927875a6d1a | [
"MIT"
] | 1 | 2021-10-21T04:30:24.000Z | 2022-01-05T07:43:00.000Z | python_2dcfd/latticeBoltzmanDemo.py | matthewa313/2D-CFD | af5f0f81ae1ba55993eb331f08480927875a6d1a | [
"MIT"
] | null | null | null | # LatticeBoltzmannDemo.py: a two-dimensional lattice-Boltzmann "wind tunnel" simulation
# Uses numpy to speed up all array handling.
# Uses matplotlib to plot and animate the curl of the macroscopic velocity field.
# to-do make interactive
import numpy
import time
import matplotlib.pyplot
import matplotlib.animation... | 48.283582 | 172 | 0.622566 |
4a270ef941f0fc1aa7ec9e3a6222169e0ccb42a2 | 996 | py | Python | Indicators/AccumulationNDistributionLine.py | puchchi/stock_scraper_latest | 09abfa12edbec0d6a65915db37ad3ad1b25fa092 | [
"MIT"
] | null | null | null | Indicators/AccumulationNDistributionLine.py | puchchi/stock_scraper_latest | 09abfa12edbec0d6a65915db37ad3ad1b25fa092 | [
"MIT"
] | null | null | null | Indicators/AccumulationNDistributionLine.py | puchchi/stock_scraper_latest | 09abfa12edbec0d6a65915db37ad3ad1b25fa092 | [
"MIT"
] | null | null | null | import sys
from os import path
sys.path.append( path.dirname( path.dirname( path.abspath(__file__) ) ) )
import pandas as pd
class kAccumulationNDistributionLine():
def __init__(self):
#do nothing
print "In kADL class"
def calculate(self, dataFrame):
##### FORMULA #####
#1. M... | 34.344828 | 148 | 0.630522 |
4a270f452faf9a6f15eef8da85622d7f03cbb767 | 1,521 | py | Python | cdt/__init__.py | koutrgor/CausalDiscoveryToolbox | 0d9997294520430e24bd80f1bfb05c0f852984cb | [
"MIT"
] | null | null | null | cdt/__init__.py | koutrgor/CausalDiscoveryToolbox | 0d9997294520430e24bd80f1bfb05c0f852984cb | [
"MIT"
] | null | null | null | cdt/__init__.py | koutrgor/CausalDiscoveryToolbox | 0d9997294520430e24bd80f1bfb05c0f852984cb | [
"MIT"
] | null | null | null | """The Causal Discovery Toolbox contains various methods for graph structure recovery and causal inference.
It is CUDA-compatible for the most computationally expensive algorithms.
.. MIT License
..
.. Copyright (c) 2018 Diviyan Kalainathan
..
.. Permission is hereby granted, free of charge, to any person obtaining a... | 43.457143 | 107 | 0.780408 |
4a270f52d7a58c6a92ac0508ffb7f034043f8aba | 1,607 | py | Python | setup.py | wppply/s4l | aedea4f73ddcae23d8d20d1c4881987c2da2f9d3 | [
"Apache-2.0"
] | 94 | 2019-10-23T13:30:48.000Z | 2022-01-26T17:44:39.000Z | setup.py | wppply/s4l | aedea4f73ddcae23d8d20d1c4881987c2da2f9d3 | [
"Apache-2.0"
] | 4 | 2019-12-16T01:54:32.000Z | 2021-05-17T07:02:35.000Z | setup.py | wppply/s4l | aedea4f73ddcae23d8d20d1c4881987c2da2f9d3 | [
"Apache-2.0"
] | 24 | 2019-10-30T01:28:42.000Z | 2022-03-12T07:51:10.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 30.320755 | 86 | 0.667082 |
4a271084e7581548b9e8d18902cb0b0c514ef1fa | 4,188 | py | Python | examples/graph_based_clustering_demo/train.py | zbmain/PGL | dbded6a1543248b0a33c05eb476ddc513401a774 | [
"Apache-2.0"
] | 1 | 2022-03-25T12:04:51.000Z | 2022-03-25T12:04:51.000Z | examples/graph_based_clustering_demo/train.py | zbmain/PGL | dbded6a1543248b0a33c05eb476ddc513401a774 | [
"Apache-2.0"
] | null | null | null | examples/graph_based_clustering_demo/train.py | zbmain/PGL | dbded6a1543248b0a33c05eb476ddc513401a774 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 30.794118 | 78 | 0.658309 |
4a2714409960c2062160031b58dba4564e0d115c | 829 | py | Python | tests/test_memorize_util.py | ridi/django-shard-library | 405e1c213420e095f776d8d2969a147bb0793d9c | [
"BSD-3-Clause"
] | 17 | 2018-03-12T11:37:14.000Z | 2021-12-09T15:30:52.000Z | tests/test_memorize_util.py | ridi/django-shard-library | 405e1c213420e095f776d8d2969a147bb0793d9c | [
"BSD-3-Clause"
] | 12 | 2018-03-12T10:39:39.000Z | 2018-08-21T03:26:09.000Z | tests/test_memorize_util.py | ridi/django-shard-library | 405e1c213420e095f776d8d2969a147bb0793d9c | [
"BSD-3-Clause"
] | 3 | 2018-03-12T10:32:11.000Z | 2021-04-02T06:24:14.000Z | from shard.utils.memorize import memorize
from tests.base import BaseTestCase
def dummy_func(value):
return object()
class MemorizeUtilTestCase(BaseTestCase):
def setUp(self):
self.func = memorize(dummy_func)
def test_memorize(self):
obj = self.func(value=1)
obj2 = self.func(val... | 25.121212 | 47 | 0.640531 |
4a2714a8239a3d55335bcaeafef9166e0ae72d95 | 14,440 | py | Python | .venv/lib/python3.8/site-packages/cleo/commands/completions_command.py | RivtLib/replit01 | ce1ae18b446a9c844f40e88a51c71fbc45ab3ad7 | [
"MIT"
] | 1 | 2020-08-07T16:09:57.000Z | 2020-08-07T16:09:57.000Z | .venv/lib/python3.8/site-packages/cleo/commands/completions_command.py | RivtLib/replit01 | ce1ae18b446a9c844f40e88a51c71fbc45ab3ad7 | [
"MIT"
] | null | null | null | .venv/lib/python3.8/site-packages/cleo/commands/completions_command.py | RivtLib/replit01 | ce1ae18b446a9c844f40e88a51c71fbc45ab3ad7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import hashlib
import posixpath
import re
import subprocess
from .._compat import encode
from ..helpers import argument
from ..helpers import option
from .command import Command
from .completions.templates import TEMPLATES
class CompletionsCommand(Command):
... | 34.879227 | 108 | 0.561219 |
4a2714db68763d08f4b47d7b6fc015f9a8b10e90 | 1,765 | py | Python | anchore_engine/analyzers/modules/20_file_list.py | dspalmer99/anchore-engine | 8c61318be6fec5d767426fa4ccd98472cc85b5cd | [
"Apache-2.0"
] | 1 | 2019-06-27T08:47:48.000Z | 2019-06-27T08:47:48.000Z | anchore_engine/analyzers/modules/20_file_list.py | dspalmer99/anchore-engine | 8c61318be6fec5d767426fa4ccd98472cc85b5cd | [
"Apache-2.0"
] | 4 | 2020-11-07T00:16:02.000Z | 2020-11-08T20:52:06.000Z | anchore_engine/analyzers/modules/20_file_list.py | dspalmer99/anchore-engine | 8c61318be6fec5d767426fa4ccd98472cc85b5cd | [
"Apache-2.0"
] | 1 | 2019-11-23T03:39:28.000Z | 2019-11-23T03:39:28.000Z | #!/usr/bin/env python3
import sys
import os
import re
import json
import subprocess
import stat
import anchore_engine.analyzers.utils
analyzer_name = "file_list"
try:
config = anchore_engine.analyzers.utils.init_analyzer_cmdline(sys.argv, analyzer_name)
except Exception as err:
print(str(err))
sys.exit(... | 28.934426 | 128 | 0.713314 |
4a27158cee0df16bbf0802a2d6d8a0d961e03890 | 844 | py | Python | ubc/imsi_fail_trans.py | Wcopython/cpython_test | d65713a72df0f0a3db7c742bf7c5efbb5ea679a4 | [
"Apache-2.0"
] | null | null | null | ubc/imsi_fail_trans.py | Wcopython/cpython_test | d65713a72df0f0a3db7c742bf7c5efbb5ea679a4 | [
"Apache-2.0"
] | null | null | null | ubc/imsi_fail_trans.py | Wcopython/cpython_test | d65713a72df0f0a3db7c742bf7c5efbb5ea679a4 | [
"Apache-2.0"
] | null | null | null | # ! python
# -*- coding: utf-8 -*-
import sqlite3
import os
class CheckFailImsi(object):
def __init__(self):
self.db_path = '/tmp/db_cache/imsiSet.db'
def check_db_exsists(self):
if os.path.exists('/tmp/db_cache'):
return True
return False
def query_imsi(self, imsi, w... | 27.225806 | 84 | 0.577014 |
4a2715a8b85f53121e2a252279a7b0b3ffe47326 | 6,358 | py | Python | research/object_detection/protos/eval_pb2.py | tarlen5/models | 06646932bd571f4425b21e119104a6b93b0e244c | [
"Apache-2.0"
] | null | null | null | research/object_detection/protos/eval_pb2.py | tarlen5/models | 06646932bd571f4425b21e119104a6b93b0e244c | [
"Apache-2.0"
] | null | null | null | research/object_detection/protos/eval_pb2.py | tarlen5/models | 06646932bd571f4425b21e119104a6b93b0e244c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: object_detection/protos/eval.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import message ... | 77.536585 | 2,698 | 0.815036 |
4a2715f1ff3840e45bb39b2efc50ed48e68f5a9a | 1,779 | py | Python | prepare_data.py | SETIADEEPANSHU/covid-jina-qa | 6514624eac7f32f8ff3b536281c6dcced760c9dd | [
"Apache-2.0"
] | 2 | 2020-09-21T17:21:21.000Z | 2021-04-09T10:20:26.000Z | prepare_data.py | SETIADEEPANSHU/covid-jina-qa | 6514624eac7f32f8ff3b536281c6dcced760c9dd | [
"Apache-2.0"
] | null | null | null | prepare_data.py | SETIADEEPANSHU/covid-jina-qa | 6514624eac7f32f8ff3b536281c6dcced760c9dd | [
"Apache-2.0"
] | null | null | null | __copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved."
__license__ = "Apache-2.0"
import csv
import os
import re
import sys
def read_data(data_fn, output_fn):
_min_sent_len = 3
_max_sent_len = 64
punct_chars = ['!', '.', '?', '։', '؟', '۔', '܀', '܁', '܂', '‼', '‽', '⁇', '⁈', '⁉', '⸮'... | 35.58 | 114 | 0.548623 |
4a2716a554928e44099dc2bff985ffaa41619e91 | 590 | py | Python | seldom-web-testing/test_dir/test_005_ddt.py | SeldomQA/seldom-platform | d165d33b586426669c537c89a0ff7d49d44c5b97 | [
"Apache-2.0"
] | 2 | 2022-02-12T15:02:04.000Z | 2022-02-26T12:40:03.000Z | seldom-web-testing/test_dir/test_005_ddt.py | SeldomQA/seldom-platform | d165d33b586426669c537c89a0ff7d49d44c5b97 | [
"Apache-2.0"
] | null | null | null | seldom-web-testing/test_dir/test_005_ddt.py | SeldomQA/seldom-platform | d165d33b586426669c537c89a0ff7d49d44c5b97 | [
"Apache-2.0"
] | 2 | 2022-02-22T02:45:49.000Z | 2022-03-18T12:32:32.000Z | import seldom
from seldom import data
class DDTTest(seldom.TestCase):
"""
数据驱动
"""
@data([
('case1', 'seldom'),
('case2', 'selenium'),
('case3', 'unittest'),
])
def test_baidu(self, _, search_key):
"""
used parameterized test
:param _: case nam... | 20.344828 | 44 | 0.547458 |
4a2716c8f9157bcd67f7ef609f3b64f5212dc76d | 5,854 | py | Python | SoftLayer/managers/autoscale.py | ko101/softlayer-python | f4cc9fa2eb01d97c0e890907ef6735390f1a5b10 | [
"MIT"
] | null | null | null | SoftLayer/managers/autoscale.py | ko101/softlayer-python | f4cc9fa2eb01d97c0e890907ef6735390f1a5b10 | [
"MIT"
] | null | null | null | SoftLayer/managers/autoscale.py | ko101/softlayer-python | f4cc9fa2eb01d97c0e890907ef6735390f1a5b10 | [
"MIT"
] | null | null | null | """
SoftLayer.autoscale
~~~~~~~~~~~~~~~~~~~
Autoscale manager
:license: MIT, see LICENSE for more details.
"""
class AutoScaleManager(object):
"""Manager for interacting with Autoscale instances."""
def __init__(self, client):
self.client = client
def list(self, mask=None):
... | 41.814286 | 119 | 0.678852 |
4a271879ce9bb21c65755cfce515838ff7c79c8c | 12,312 | py | Python | src/pygaps/characterisation/area_bet.py | pauliacomi/pyGAPS | c4d45b710e171c937471686437e382e05aec4ed5 | [
"MIT"
] | 35 | 2018-01-24T14:59:08.000Z | 2022-03-10T02:47:58.000Z | src/pygaps/characterisation/area_bet.py | pauliacomi/pyGAPS | c4d45b710e171c937471686437e382e05aec4ed5 | [
"MIT"
] | 29 | 2018-01-06T12:08:08.000Z | 2022-03-11T20:26:53.000Z | src/pygaps/characterisation/area_bet.py | pauliacomi/pyGAPS | c4d45b710e171c937471686437e382e05aec4ed5 | [
"MIT"
] | 20 | 2019-06-12T19:20:29.000Z | 2022-03-02T09:57:02.000Z | """This module contains BET area calculations."""
import logging
logger = logging.getLogger('pygaps')
import textwrap
import warnings
import numpy
from .. import scipy
from ..core.adsorbate import Adsorbate
from ..graphing.calc_graphs import bet_plot
from ..graphing.calc_graphs import roq_plot
from ..utilities.exce... | 35.583815 | 103 | 0.651803 |
4a27189b207858859eee17a5f016c4f7c9b8310d | 663 | py | Python | tasks/__init__.py | kuwv/spades | 9c36eff2c8fe2e4acc69a317d0c58bb8e1c2373f | [
"Apache-2.0"
] | null | null | null | tasks/__init__.py | kuwv/spades | 9c36eff2c8fe2e4acc69a317d0c58bb8e1c2373f | [
"Apache-2.0"
] | null | null | null | tasks/__init__.py | kuwv/spades | 9c36eff2c8fe2e4acc69a317d0c58bb8e1c2373f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# type: ignore
# copyright: (c) 2020 by Jesse Johnson.
# license: Apache 2.0, see LICENSE for more details.
'''Initialize project management tasks.'''
from invoke import Collection
from . import (
compose, docs, webui, webapp, build, certs, qa, setup
)
ns = Collection().from_module(setup)... | 31.571429 | 57 | 0.776772 |
4a2718ba98a65e72f3c9cf446c73d7552e3b0d78 | 1,706 | py | Python | eval/tests/dp_multikey.py | AprilXiaoyanLiu/whitenoise-system | 0e94d2cc8114b97a61d5d2e45278428f91f1e687 | [
"MIT"
] | 63 | 2020-03-26T15:26:10.000Z | 2020-10-22T06:26:38.000Z | eval/tests/dp_multikey.py | AprilXiaoyanLiu/whitenoise-system | 0e94d2cc8114b97a61d5d2e45278428f91f1e687 | [
"MIT"
] | 87 | 2021-02-20T20:43:49.000Z | 2022-03-31T16:24:46.000Z | eval/tests/dp_multikey.py | AprilXiaoyanLiu/whitenoise-system | 0e94d2cc8114b97a61d5d2e45278428f91f1e687 | [
"MIT"
] | 17 | 2021-02-18T18:47:09.000Z | 2022-03-01T06:44:17.000Z | from sneval.params._privacy_params import PrivacyParams
from sneval.params._eval_params import EvaluatorParams
from sneval.report._report import Report
from sneval.privacyalgorithm._base import PrivacyAlgorithm
from snsql.sql import PrivateReader
class DPMultiKey(PrivacyAlgorithm):
"""
Sample implementation of... | 43.74359 | 103 | 0.711606 |
4a2718fc0a0af2effde53999c492bd1652fc026b | 1,117 | py | Python | Chapter08/background_substraction_GMG.py | debojyoti007/OpenCV | 0096a6d0b6e9e4d5abc473c25def075403ccb0f2 | [
"MIT"
] | 105 | 2018-03-12T11:40:56.000Z | 2022-02-24T18:38:30.000Z | Chapter08/background_substraction_GMG.py | abelZW/OpenCV-3-x-with-Python-By-Example | 6810e2242ce7c9ea5e492d4d951c45cc99782785 | [
"MIT"
] | 1 | 2019-12-17T14:26:56.000Z | 2021-01-05T14:07:01.000Z | Chapter08/background_substraction_GMG.py | abelZW/OpenCV-3-x-with-Python-By-Example | 6810e2242ce7c9ea5e492d4d951c45cc99782785 | [
"MIT"
] | 97 | 2018-01-17T01:35:43.000Z | 2022-03-16T07:37:28.000Z | import cv2
import numpy as np
# Capture the input frame
def get_frame(cap, scaling_factor=0.5):
ret, frame = cap.read()
# Resize the frame
frame = cv2.resize(frame, None, fx=scaling_factor,
fy=scaling_factor, interpolation=cv2.INTER_AREA)
return frame
if __name__=='__main__'... | 28.641026 | 70 | 0.644584 |
4a27192198783950225c3cbde02318b6cd58555f | 1,851 | py | Python | backend/api/fixtures/test/0005_add_bceid_user_roles.py | kuanfan99/zeva | 57b506a108fe57438506569d5503c90c52216b2f | [
"Apache-2.0"
] | 3 | 2020-03-25T03:06:20.000Z | 2021-01-20T23:36:03.000Z | backend/api/fixtures/test/0005_add_bceid_user_roles.py | kuanfan99/zeva | 57b506a108fe57438506569d5503c90c52216b2f | [
"Apache-2.0"
] | 740 | 2019-12-16T15:53:39.000Z | 2022-03-26T08:25:10.000Z | backend/api/fixtures/test/0005_add_bceid_user_roles.py | kuanfan99/zeva | 57b506a108fe57438506569d5503c90c52216b2f | [
"Apache-2.0"
] | 11 | 2019-11-28T20:39:15.000Z | 2022-01-31T17:53:31.000Z | from django.db import transaction
from api.management.data_script import OperationalDataScript
from api.models.role import Role
from api.models.user_profile import UserProfile
from api.models.user_role import UserRole
class AddBCEIDUserRoles(OperationalDataScript):
"""
Gives our test accounts (bceid) user ro... | 25.708333 | 76 | 0.568341 |
4a271936fb86ca991973af467aec333b367b6dd4 | 1,004 | py | Python | RumourEval2019Models/Bert-MFajcik/neural_bag/embedders.py | isspek/veracity-detection | 9368309722bead209e49e52c206758e3d173092a | [
"MIT"
] | null | null | null | RumourEval2019Models/Bert-MFajcik/neural_bag/embedders.py | isspek/veracity-detection | 9368309722bead209e49e52c206758e3d173092a | [
"MIT"
] | null | null | null | RumourEval2019Models/Bert-MFajcik/neural_bag/embedders.py | isspek/veracity-detection | 9368309722bead209e49e52c206758e3d173092a | [
"MIT"
] | null | null | null | import logging
import torch
class Embedder(torch.nn.Module):
def __init__(self, vocab, config):
super().__init__()
self.scale_grad = config['scale_emb_grad_by_freq']
self.init_vocab(vocab, config['optimize_embeddings'])
logging.info(f"Optimize embeddings = {config['optimize_embedd... | 38.615385 | 112 | 0.691235 |
4a27194ab2c36f4bae6ebf331f7efa8ddf65687b | 5,727 | py | Python | distance_analysis.py | TorHou/ContigAnalysisScripts | 7cd240babf6c8889a25604d3cfb262e241fcfa11 | [
"MIT"
] | 1 | 2018-07-27T00:54:35.000Z | 2018-07-27T00:54:35.000Z | distance_analysis.py | DiltheyLab/ContigAnalysisScripts | 7cd240babf6c8889a25604d3cfb262e241fcfa11 | [
"MIT"
] | null | null | null | distance_analysis.py | DiltheyLab/ContigAnalysisScripts | 7cd240babf6c8889a25604d3cfb262e241fcfa11 | [
"MIT"
] | null | null | null | from argparse import ArgumentParser
from operator import itemgetter
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import sys
from itertools import combinations
from scaffold import Longreads
parser = ArgumentParser()
parser.add_argument("inputfiles", help="Input Files in Error-Rate or PAF fo... | 31.994413 | 166 | 0.590012 |
4a27195ede0e991b305e9239724db16570e831af | 1,410 | py | Python | app/test/test_config.py | Shulyakovskiy/flask-restplus-jwtext | 76cde85aa2f2b97912520c5f4dc810fe9fa2377a | [
"MIT"
] | null | null | null | app/test/test_config.py | Shulyakovskiy/flask-restplus-jwtext | 76cde85aa2f2b97912520c5f4dc810fe9fa2377a | [
"MIT"
] | null | null | null | app/test/test_config.py | Shulyakovskiy/flask-restplus-jwtext | 76cde85aa2f2b97912520c5f4dc810fe9fa2377a | [
"MIT"
] | null | null | null | import os
import unittest
from flask import current_app
from flask_testing import TestCase
from app.main.config import basedir
from server import app
class TestDevelopmentConfig(TestCase):
def create_app(self):
app.config.from_object('app.main.config.DevelopmentConfig')
return app
def test_... | 28.77551 | 118 | 0.689362 |
4a2719acaa06b1b3b04da43217d4f79e6a3933e0 | 1,449 | py | Python | Unit test/test_HornSchunk.py | khaledsabry97/Argus | c794f6e46ec529a836db127dfdb33b3161cf79ee | [
"MIT"
] | 9 | 2021-01-09T17:04:18.000Z | 2022-03-24T11:26:00.000Z | Unit test/test_HornSchunk.py | khaledsabry97/Argus | c794f6e46ec529a836db127dfdb33b3161cf79ee | [
"MIT"
] | 4 | 2021-03-21T21:40:06.000Z | 2022-03-12T00:53:55.000Z | Unit test/test_HornSchunk.py | khaledsabry97/Argus | c794f6e46ec529a836db127dfdb33b3161cf79ee | [
"MIT"
] | 3 | 2021-03-13T07:39:19.000Z | 2022-01-28T23:00:51.000Z | import cv2
from VIF.HornSchunck import HornSchunck
"""
Unit test for Horn Schunk class.
"""
def test_hs_init():
"""
Verify that object is created successfully
"""
try:
hs = HornSchunck()
assert 1
except:
assert 0
def test_hs_derivatives():
"""
Verif... | 22.640625 | 60 | 0.57902 |
4a271a5f19adda163130d8bab44dae5574f77166 | 501 | py | Python | tests/test_news.py | Bernard2030/news-app | c5c7f2b04cc4a35709a81747ad8449d91921d655 | [
"Unlicense"
] | null | null | null | tests/test_news.py | Bernard2030/news-app | c5c7f2b04cc4a35709a81747ad8449d91921d655 | [
"Unlicense"
] | null | null | null | tests/test_news.py | Bernard2030/news-app | c5c7f2b04cc4a35709a81747ad8449d91921d655 | [
"Unlicense"
] | null | null | null | import unittest
from app.models import News
# News = news.News
class NewsTest(unittest.TestCase):
"""
Test class to test the behavior of the News class.
"""
def setUp(self):
"""
set up method that will run before every Test.
"""
self.current_news = News('A thrilling new... | 25.05 | 71 | 0.61477 |
4a271a6ebcca22d00616dd50585ef775cf6ed2b3 | 52,771 | py | Python | pymatgen/analysis/defects/point_defects.py | rousseab/pymatgen | ecfba4a576a21f31c222be8fd20ce2ddaa77495a | [
"MIT"
] | 1 | 2015-05-18T14:31:20.000Z | 2015-05-18T14:31:20.000Z | pymatgen/analysis/defects/point_defects.py | rousseab/pymatgen | ecfba4a576a21f31c222be8fd20ce2ddaa77495a | [
"MIT"
] | null | null | null | pymatgen/analysis/defects/point_defects.py | rousseab/pymatgen | ecfba4a576a21f31c222be8fd20ce2ddaa77495a | [
"MIT"
] | null | null | null | # coding: utf-8
from __future__ import division, unicode_literals
"""
This module defines classes for point defects
"""
import os
import abc
import json
from bisect import bisect_left
from pymatgen.core.periodic_table import Specie, Element
from pymatgen.core.sites import PeriodicSite
from pymatgen.symmetry.analyze... | 35.464382 | 88 | 0.609312 |
4a271b3a9c7719d7dfc2e1584e001a855e6b03e4 | 1,074 | py | Python | setup.py | filwaline/drf-typed-views | b92c81e8174e1be07f689ab494e4453fcf9cb915 | [
"MIT"
] | null | null | null | setup.py | filwaline/drf-typed-views | b92c81e8174e1be07f689ab494e4453fcf9cb915 | [
"MIT"
] | null | null | null | setup.py | filwaline/drf-typed-views | b92c81e8174e1be07f689ab494e4453fcf9cb915 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from codecs import open
from setuptools import find_packages, setup
def readme():
with open("README.md", "r") as infile:
return infile.read()
classifiers = [
# Pick your license as you wish (should match "license" above)
"Development Status :: 4 - Beta",
"License :: OS... | 30.685714 | 97 | 0.684358 |
4a271d6e249562bb660fd077645ddff858b77b2c | 15,250 | py | Python | cryptoapis/model/get_wallet_transaction_details_by_transaction_ide403.py | Crypto-APIs/Crypto_APIs_2.0_SDK_Python | c59ebd914850622b2c6500c4c30af31fb9cecf0e | [
"MIT"
] | 5 | 2021-05-17T04:45:03.000Z | 2022-03-23T12:51:46.000Z | cryptoapis/model/get_wallet_transaction_details_by_transaction_ide403.py | Crypto-APIs/Crypto_APIs_2.0_SDK_Python | c59ebd914850622b2c6500c4c30af31fb9cecf0e | [
"MIT"
] | null | null | null | cryptoapis/model/get_wallet_transaction_details_by_transaction_ide403.py | Crypto-APIs/Crypto_APIs_2.0_SDK_Python | c59ebd914850622b2c6500c4c30af31fb9cecf0e | [
"MIT"
] | 2 | 2021-06-02T07:32:26.000Z | 2022-02-12T02:36:23.000Z | """
CryptoAPIs
Crypto APIs 2.0 is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs 2.0 can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of thei... | 45.933735 | 484 | 0.604787 |
4a271dce77e6c8643ba4d78e0ca6ad5c2c466758 | 2,638 | py | Python | data/p4VQE/R4/benchmark/startQiskit646.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R4/benchmark/startQiskit646.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R4/benchmark/startQiskit646.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=3
# total number=15
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
import networkx as nx
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collectio... | 28.06383 | 118 | 0.636088 |
4a271e21046824b1662e0a1db4c1bd4bec69d84c | 9,140 | py | Python | AIXOR/Utils/gi_composites.py | scando1993/MLPXORGate | 0a1eefe32941f45be3c28b40d4f0637b23446fca | [
"BSD-3-Clause"
] | null | null | null | AIXOR/Utils/gi_composites.py | scando1993/MLPXORGate | 0a1eefe32941f45be3c28b40d4f0637b23446fca | [
"BSD-3-Clause"
] | null | null | null | AIXOR/Utils/gi_composites.py | scando1993/MLPXORGate | 0a1eefe32941f45be3c28b40d4f0637b23446fca | [
"BSD-3-Clause"
] | null | null | null | #
# Copyright (C) 2015 Dustin Spicuzza <dustin@virtualroadside.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later ve... | 35.843137 | 93 | 0.640919 |
4a271e5183ffc876497d94e993e5670e61942531 | 2,508 | py | Python | waf/playground/eclipse/java/junit.py | yankee14/reflow-oven-atmega328p | e6792143576f13f0a3a49edfd54dbb2ef851d95a | [
"Apache-2.0"
] | 24 | 2019-08-13T02:39:01.000Z | 2022-03-03T15:44:54.000Z | waf/playground/eclipse/java/junit.py | yankee14/reflow-oven-atmega328p | e6792143576f13f0a3a49edfd54dbb2ef851d95a | [
"Apache-2.0"
] | 4 | 2020-11-16T02:03:09.000Z | 2021-08-19T08:16:48.000Z | waf/playground/eclipse/java/junit.py | yankee14/reflow-oven-atmega328p | e6792143576f13f0a3a49edfd54dbb2ef851d95a | [
"Apache-2.0"
] | 11 | 2016-07-01T02:21:06.000Z | 2020-11-23T08:29:22.000Z | #! /usr/bin/env python
# encoding: utf-8
"""
JUnit test system
- executes all junit tests in the specified subtree (junitsrc)
- only if --junit is given on the commandline
- method:
- add task to compile junitsrc after compiling srcdir
- additional junit_classpath specifiable
- defaults to classpath +... | 29.162791 | 105 | 0.719298 |
4a271e7c6c6aadae4b6f5d576d8acb5caccc7fc5 | 5,534 | py | Python | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/aio/operations/_resolve_private_link_service_id_operations.py | ankitarorabit/azure-sdk-for-python | dd90281cbad9400f8080754a5ef2f56791a5a88f | [
"MIT"
] | 3 | 2020-06-23T02:25:27.000Z | 2021-09-07T18:48:11.000Z | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/aio/operations/_resolve_private_link_service_id_operations.py | ankitarorabit/azure-sdk-for-python | dd90281cbad9400f8080754a5ef2f56791a5a88f | [
"MIT"
] | 510 | 2019-07-17T16:11:19.000Z | 2021-08-02T08:38:32.000Z | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/aio/operations/_resolve_private_link_service_id_operations.py | ankitarorabit/azure-sdk-for-python | dd90281cbad9400f8080754a5ef2f56791a5a88f | [
"MIT"
] | 5 | 2019-09-04T12:51:37.000Z | 2020-09-16T07:28:40.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 49.855856 | 209 | 0.692808 |
4a27205b1746b71ee1ee3316b7b20643e490963a | 1,516 | py | Python | cocoa/inter/result_table.py | astrofrog/dupeguru | d0a3f081dab21ea3d2fc69830c9e71a18078c150 | [
"BSD-3-Clause"
] | 1 | 2017-01-03T05:50:39.000Z | 2017-01-03T05:50:39.000Z | cocoa/inter/result_table.py | astrofrog/dupeguru | d0a3f081dab21ea3d2fc69830c9e71a18078c150 | [
"BSD-3-Clause"
] | null | null | null | cocoa/inter/result_table.py | astrofrog/dupeguru | d0a3f081dab21ea3d2fc69830c9e71a18078c150 | [
"BSD-3-Clause"
] | null | null | null | from objp.util import dontwrap
from cocoa.inter import PyTable, TableView
class ResultTableView(TableView):
def invalidateMarkings(self): pass
class PyResultTable(PyTable):
def powerMarkerMode(self) -> bool:
return self.model.power_marker
def setPowerMarkerMode_(self, value: bool):
se... | 30.32 | 73 | 0.664908 |
4a2720dfdcbfd8bae0de0b51af5f51592acec55c | 11,515 | py | Python | src/maintenance/azext_maintenance/tests/latest/example_steps.py | wwendyc/azure-cli-extensions | 6b4099676bb5d43fdb57bc69f9c0281cca510a0a | [
"MIT"
] | 1 | 2021-08-03T18:32:54.000Z | 2021-08-03T18:32:54.000Z | src/maintenance/azext_maintenance/tests/latest/example_steps.py | wwendyc/azure-cli-extensions | 6b4099676bb5d43fdb57bc69f9c0281cca510a0a | [
"MIT"
] | 4 | 2020-09-07T12:56:24.000Z | 2021-02-04T12:19:20.000Z | src/maintenance/azext_maintenance/tests/latest/example_steps.py | wwendyc/azure-cli-extensions | 6b4099676bb5d43fdb57bc69f9c0281cca510a0a | [
"MIT"
] | 5 | 2020-09-08T22:46:48.000Z | 2020-11-08T14:54:35.000Z | # --------------------------------------------------------------------------
# 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 cause incor... | 37.025723 | 120 | 0.627703 |
4a2720e777ff4812df9a78c3992e57734dc3abc5 | 2,062 | py | Python | egs2/zh_openslr38/asr1/local/check_train_test_duplicate.py | cuichenx/espnet | dcd4aed1d806e5d0360276a9518119d0376d68da | [
"Apache-2.0"
] | null | null | null | egs2/zh_openslr38/asr1/local/check_train_test_duplicate.py | cuichenx/espnet | dcd4aed1d806e5d0360276a9518119d0376d68da | [
"Apache-2.0"
] | null | null | null | egs2/zh_openslr38/asr1/local/check_train_test_duplicate.py | cuichenx/espnet | dcd4aed1d806e5d0360276a9518119d0376d68da | [
"Apache-2.0"
] | null | null | null | from collections import Counter
train_file = "data/train/text"
train_lines = []
with open(train_file) as f:
for line in f:
if not line:
continue
train_lines.append(line.split()[1])
train_lines = set(train_lines)
for test_name in ("test", "dev"):
test_file = f"data/{test_name}/text... | 33.258065 | 94 | 0.555286 |
4a27211df49d9b4219d03e5a74d1c102167f32e1 | 71 | py | Python | pyairvisual/const.py | bachya/pyairvisual | 13910a6e21db97243b6c34b09ee8fbd13a62afed | [
"MIT"
] | 6 | 2019-04-04T10:48:12.000Z | 2022-02-01T20:00:53.000Z | pyairvisual/const.py | bachya/pyairvisual | 13910a6e21db97243b6c34b09ee8fbd13a62afed | [
"MIT"
] | 76 | 2018-06-11T21:27:05.000Z | 2022-03-01T18:14:36.000Z | pyairvisual/const.py | bachya/pyairvisual | 13910a6e21db97243b6c34b09ee8fbd13a62afed | [
"MIT"
] | 2 | 2019-07-27T20:51:02.000Z | 2019-11-04T23:31:47.000Z | """Define package-wide constants."""
DEFAULT_REQUEST_TIMEOUT: int = 10
| 23.666667 | 36 | 0.760563 |
4a2721b5a7b25b1d375fa3e8b4a2c6d0e0513116 | 11,018 | py | Python | plotly/graph_objs/heatmapgl/hoverlabel/__init__.py | piyush1301/plotly.py | 50cd5c4cd4732042422751c7760acbab8dd8a50d | [
"MIT"
] | 6 | 2019-05-03T02:12:04.000Z | 2020-03-01T06:33:21.000Z | plotly/graph_objs/heatmapgl/hoverlabel/__init__.py | piyush1301/plotly.py | 50cd5c4cd4732042422751c7760acbab8dd8a50d | [
"MIT"
] | null | null | null | plotly/graph_objs/heatmapgl/hoverlabel/__init__.py | piyush1301/plotly.py | 50cd5c4cd4732042422751c7760acbab8dd8a50d | [
"MIT"
] | 5 | 2019-05-18T16:50:11.000Z | 2021-07-06T21:14:36.000Z |
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Font(_BaseTraceHierarchyType):
# color
# -----
@property
def color(self):
"""
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#ff000... | 34.111455 | 82 | 0.563351 |
4a2723bc3123cbb0043d0213f84b7c8510d4efd0 | 14,565 | py | Python | examples/data_augmentation/reinforcement/main.py | bhaskar2443053/forte | 95fabd94126d45c0db07cdcc197049ed1859d228 | [
"Apache-2.0"
] | null | null | null | examples/data_augmentation/reinforcement/main.py | bhaskar2443053/forte | 95fabd94126d45c0db07cdcc197049ed1859d228 | [
"Apache-2.0"
] | null | null | null | examples/data_augmentation/reinforcement/main.py | bhaskar2443053/forte | 95fabd94126d45c0db07cdcc197049ed1859d228 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The Forte 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 applicable ... | 33.715278 | 80 | 0.571438 |
4a27243f54ae06b9335053167b023b69346992a4 | 2,769 | py | Python | bindings/python/ensmallen/datasets/networkrepository/sw1000030d2trial2.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/networkrepository/sw1000030d2trial2.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/networkrepository/sw1000030d2trial2.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph SW-10000-3-0d2-trial2.
The graph is automatically retrieved from the NetworkRepository repository.
References
---------------------
Please cite the following if you use the data:
```bib
@inproceedings{nr,
title = {The Network Data Repository ... | 29.147368 | 94 | 0.657999 |
4a2724b63fa05198d9dfeb56eafad6be62b6cb40 | 2,206 | py | Python | kerfuffle!.py | nasioutz/HashNet | e52286ac7eeb4c680c9631cc34b2ccd1291f1cf7 | [
"MIT"
] | null | null | null | kerfuffle!.py | nasioutz/HashNet | e52286ac7eeb4c680c9631cc34b2ccd1291f1cf7 | [
"MIT"
] | null | null | null | kerfuffle!.py | nasioutz/HashNet | e52286ac7eeb4c680c9631cc34b2ccd1291f1cf7 | [
"MIT"
] | null | null | null | import train
import test
from os.path import join
import json
# ------ TRAIN ------
args_train = train.Arguments(net='AlexNet', hash_bit=48, dual_batch=False, scale_tanh=False, tanh_step=200,
#snapshot=("cross-entropy", '2018_12_25_4_19_4', 'iter_07500'),
pre... | 43.254902 | 108 | 0.664098 |
4a2725569e99ae0f013a3a8c55a6b2d7e4bd85b6 | 432 | py | Python | ai/admin.py | CzechInvest/ciis | c6102598f564a717472e5e31e7eb894bba2c8104 | [
"MIT"
] | 1 | 2019-05-26T22:24:01.000Z | 2019-05-26T22:24:01.000Z | ai/admin.py | CzechInvest/ciis | c6102598f564a717472e5e31e7eb894bba2c8104 | [
"MIT"
] | 6 | 2019-01-22T14:53:43.000Z | 2020-09-22T16:20:28.000Z | ai/admin.py | CzechInvest/ciis | c6102598f564a717472e5e31e7eb894bba2c8104 | [
"MIT"
] | null | null | null | from django.contrib import admin
from leaflet.admin import LeafletGeoAdmin, LeafletGeoAdminMixin
from cigeo.admin import ArealFieldAdmin
from .models import *
class AiAdmin(ArealFieldAdmin, LeafletGeoAdmin):
change_list_template = "admin/change_list-map.html"
raw_id_fields = ("address",)
default_zoom = 7
... | 27 | 63 | 0.780093 |
4a27268ac7c024f98f55d0d6addfe11e3c4b2dd4 | 1,864 | py | Python | NC/lagrange_interplotation.py | nmanumr/comsats-scripts | ec7a38c705315170f689f26ce6f6c56bbd87d923 | [
"MIT"
] | 4 | 2021-07-04T16:43:29.000Z | 2021-12-23T16:10:50.000Z | NC/lagrange_interplotation.py | nmanumr/comsats-scripts | ec7a38c705315170f689f26ce6f6c56bbd87d923 | [
"MIT"
] | null | null | null | NC/lagrange_interplotation.py | nmanumr/comsats-scripts | ec7a38c705315170f689f26ce6f6c56bbd87d923 | [
"MIT"
] | null | null | null | from functools import reduce
import operator
from utils import r
def lagrange(x_data, y_data, x, n=1):
out_str = f"$$ f_{{{n}}}(x) = "
if n is None:
n = min(len(x_data), 4)
i = [i for i, e in enumerate(x_data[:-1]) if x_data[i] < x and x < x_data[i+1]][0]
nearest = list(sum(zip(rang... | 31.59322 | 101 | 0.457082 |
4a2727458a549e7f7f3fe2b6241f481aad03acf2 | 4,609 | py | Python | asciimatics/scene.py | peppy0510/asciimatics | 660f2bf9578e78ea2c7bee0c73a3c5277e8afa5f | [
"Apache-2.0"
] | null | null | null | asciimatics/scene.py | peppy0510/asciimatics | 660f2bf9578e78ea2c7bee0c73a3c5277e8afa5f | [
"Apache-2.0"
] | null | null | null | asciimatics/scene.py | peppy0510/asciimatics | 660f2bf9578e78ea2c7bee0c73a3c5277e8afa5f | [
"Apache-2.0"
] | null | null | null | """
This module defines Scene objects for animation purposes. For more details, see
http://asciimatics.readthedocs.io/en/latest/animation.html
"""
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from builtins import ... | 33.158273 | 97 | 0.610979 |
4a27289856333d22a494b3f41143e6cd8bf1f0e5 | 1,151 | py | Python | TBS/b2c/api/views.py | v1ct0r5u3n/TBS | 459cd7c971f6aab7bd5f4f8d1e0788b90f34e772 | [
"Apache-2.0"
] | null | null | null | TBS/b2c/api/views.py | v1ct0r5u3n/TBS | 459cd7c971f6aab7bd5f4f8d1e0788b90f34e772 | [
"Apache-2.0"
] | null | null | null | TBS/b2c/api/views.py | v1ct0r5u3n/TBS | 459cd7c971f6aab7bd5f4f8d1e0788b90f34e772 | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import generics
from django.shortcuts import get_object_or_404
from b2c.models import Order,SalesShare,Refund
from .serializers import OrderSerializer
from .serializers import... | 30.289474 | 56 | 0.841877 |
4a2729da3af5c46cbccd253c6101ed4bc60f0db1 | 132 | py | Python | publiquese/publiquese.py | abraji/publique_se | 851dbce302485db52867ed3b21349f5847b94aea | [
"MIT"
] | 5 | 2019-06-28T01:35:45.000Z | 2020-09-22T22:07:00.000Z | publiquese/publiquese.py | abraji/publique_se | 851dbce302485db52867ed3b21349f5847b94aea | [
"MIT"
] | null | null | null | publiquese/publiquese.py | abraji/publique_se | 851dbce302485db52867ed3b21349f5847b94aea | [
"MIT"
] | null | null | null | """Main module."""
from .globals import *
from .api.access import *
from .tse.access import *
from .etl.process_digesto import *
| 14.666667 | 34 | 0.704545 |
4a2729f6fb57765644bd61927c71fd1d6cbb9238 | 2,695 | py | Python | src/cliptools/modules/sanitize.py | bigbirdcode/cliptools | 992ddf2088462477992734af8eb00453bde3ce85 | [
"MIT"
] | null | null | null | src/cliptools/modules/sanitize.py | bigbirdcode/cliptools | 992ddf2088462477992734af8eb00453bde3ce85 | [
"MIT"
] | 6 | 2019-04-02T18:25:35.000Z | 2019-08-21T20:24:16.000Z | src/cliptools/modules/sanitize.py | bigbirdcode/cliptools | 992ddf2088462477992734af8eb00453bde3ce85 | [
"MIT"
] | null | null | null |
"""
Sample code for Chapter 4 - "Text and bytes"
From the book "Fluent Python" by Luciano Ramalho (O'Reilly, 2015)
http://shop.oreilly.com/product/0636920032519.do
Radical folding and text sanitizing.
Handling a string with `cp1252` symbols:
>>> order = '“Herr Voß: • ½ cup of Œtker™ caffè latte • bowl of açaí... | 28.670213 | 75 | 0.592579 |
4a272a2cc76acdc119799b2c4562785e7160a374 | 712 | py | Python | day05/demo01.py | CHExN/practice_python | 10460eebaabe52b64163604506eeaa84ebb4d229 | [
"MIT"
] | null | null | null | day05/demo01.py | CHExN/practice_python | 10460eebaabe52b64163604506eeaa84ebb4d229 | [
"MIT"
] | null | null | null | day05/demo01.py | CHExN/practice_python | 10460eebaabe52b64163604506eeaa84ebb4d229 | [
"MIT"
] | null | null | null | '''
寻找“水仙花数”。
'''
index = 100
while False:
a = int(index / 100)
b = int(index / 10 % 10)
c = int(index % 10)
# print(a, end='\t')
# print(b, end='\t')
# print(c)
if (a * a * a + b * b * b + c * c * c == index):
print(index)
index += 1
num = 100
while True:
s = str(num)
... | 21.575758 | 69 | 0.466292 |
4a272a6d6a1492401c30db5d0dca9ace3643b65f | 3,093 | py | Python | pahelix/datasets/bace_dataset.py | agave233/PaddleHelix | e5578f72c2a203a27d9df7da111f1ced826c1429 | [
"Apache-2.0"
] | 454 | 2020-11-21T01:02:45.000Z | 2022-03-29T12:53:40.000Z | pahelix/datasets/bace_dataset.py | chupvl/PaddleHelix | 6e082f89b8090c3c360593d40a08bffc884165dd | [
"Apache-2.0"
] | 161 | 2020-12-12T06:35:54.000Z | 2022-03-27T11:31:13.000Z | pahelix/datasets/bace_dataset.py | chupvl/PaddleHelix | 6e082f89b8090c3c360593d40a08bffc884165dd | [
"Apache-2.0"
] | 108 | 2020-12-07T09:01:10.000Z | 2022-03-31T14:42:29.000Z | #!/usr/bin/python
#-*-coding:utf-8-*-
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/... | 30.323529 | 199 | 0.687359 |
4a272b21cb8f31614a340425aefa4949d0aa3461 | 1,365 | py | Python | framework/OutStreams/__init__.py | milljm/raven | 5f29fe81b75e2ffbeb54a55aa63647e7b2f6457b | [
"Apache-2.0"
] | 2 | 2019-10-11T15:59:10.000Z | 2021-04-08T18:23:57.000Z | framework/OutStreams/__init__.py | milljm/raven | 5f29fe81b75e2ffbeb54a55aa63647e7b2f6457b | [
"Apache-2.0"
] | 1 | 2018-03-27T13:06:00.000Z | 2018-03-27T13:06:00.000Z | framework/OutStreams/__init__.py | milljm/raven | 5f29fe81b75e2ffbeb54a55aa63647e7b2f6457b | [
"Apache-2.0"
] | 1 | 2017-08-29T16:09:13.000Z | 2017-08-29T16:09:13.000Z | # Copyright 2017 Battelle Energy Alliance, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 35.921053 | 76 | 0.788278 |
4a272bd64bb05ef971f41aa0c6da8c61fc9d8c2c | 153 | py | Python | lib.py | nfoletia/git-wizard-code | ca3157d665b1ce83fad3546bae88fd676a937017 | [
"MIT"
] | null | null | null | lib.py | nfoletia/git-wizard-code | ca3157d665b1ce83fad3546bae88fd676a937017 | [
"MIT"
] | 1 | 2020-02-22T19:11:55.000Z | 2020-02-22T19:11:55.000Z | lib.py | nfoletia/git-wizard-code | ca3157d665b1ce83fad3546bae88fd676a937017 | [
"MIT"
] | 14 | 2020-02-03T23:19:47.000Z | 2020-02-22T18:27:30.000Z | #! /usr/bin/env python3
'''A library of functions for our cool app'''
def add(a, b):
return a + b
def add1(a):
pass
def sub1(a):
pass
| 9.5625 | 45 | 0.575163 |
4a272cc63c7869ada0d1d35f43af8f9809196776 | 2,610 | py | Python | examples/basic_cog.py | realstealthninja/Stealthy-Wavelink | b51f6f7aab5e79694897b193b57de8f9cdb14852 | [
"MIT"
] | null | null | null | examples/basic_cog.py | realstealthninja/Stealthy-Wavelink | b51f6f7aab5e79694897b193b57de8f9cdb14852 | [
"MIT"
] | null | null | null | examples/basic_cog.py | realstealthninja/Stealthy-Wavelink | b51f6f7aab5e79694897b193b57de8f9cdb14852 | [
"MIT"
] | null | null | null | """MIT License
Copyright (c) 2019-2021 PythonistaGuild
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, pu... | 34.342105 | 93 | 0.682759 |
4a272cf02555d9493642df6f925c1fdd26b2986b | 1,348 | py | Python | awesome-webapp/www/models.py | ThansksJava/learnPython | 64c8df012bf91582ee10459610b2157f535f78ad | [
"Apache-2.0"
] | null | null | null | awesome-webapp/www/models.py | ThansksJava/learnPython | 64c8df012bf91582ee10459610b2157f535f78ad | [
"Apache-2.0"
] | null | null | null | awesome-webapp/www/models.py | ThansksJava/learnPython | 64c8df012bf91582ee10459610b2157f535f78ad | [
"Apache-2.0"
] | null | null | null | import time, uuid
from .orm import Model,StringField,BooleanField,FloatField,TextField
def next_id():
return '%015d%s000' % (int(time.time() * 1000), uuid.uuid4().hex)
class User(Model):
__table__ = 'users'
id = StringField(primary_key=True, default=next_id, ddl='varchar(50)')
email = StringField(ddl... | 32.878049 | 74 | 0.68546 |
4a272d6d28f8851f45a900b804a489625d40aaf0 | 2,372 | py | Python | Android/NDK/android-ndk-r20b-win/build/extract_platform.py | X018/CCTOOL | 989af4d7edab82bf540400eb72eca4e7447d722c | [
"MIT"
] | null | null | null | Android/NDK/android-ndk-r20b-win/build/extract_platform.py | X018/CCTOOL | 989af4d7edab82bf540400eb72eca4e7447d722c | [
"MIT"
] | null | null | null | Android/NDK/android-ndk-r20b-win/build/extract_platform.py | X018/CCTOOL | 989af4d7edab82bf540400eb72eca4e7447d722c | [
"MIT"
] | null | null | null | #
# Copyright (C) 2017 The Android Open Source Project
#
# 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 la... | 32.054054 | 79 | 0.693086 |
4a272e3f60726922330f9a69f1c8c048cf929d72 | 3,021 | py | Python | src/oscar/apps/order/admin.py | nibinjose/django-oscar | efd86d048da8696ebfe9ab440c9c9a9f7c128ee9 | [
"BSD-3-Clause"
] | null | null | null | src/oscar/apps/order/admin.py | nibinjose/django-oscar | efd86d048da8696ebfe9ab440c9c9a9f7c128ee9 | [
"BSD-3-Clause"
] | null | null | null | src/oscar/apps/order/admin.py | nibinjose/django-oscar | efd86d048da8696ebfe9ab440c9c9a9f7c128ee9 | [
"BSD-3-Clause"
] | 2 | 2022-02-23T11:28:36.000Z | 2022-03-07T10:32:18.000Z | from django.contrib import admin
from oscar.core.loading import get_model
Order = get_model('order', 'Order')
OrderNote = get_model('order', 'OrderNote')
OrderStatusChange = get_model('order', 'OrderStatusChange')
CommunicationEvent = get_model('order', 'CommunicationEvent')
BillingAddress = get_model('order', 'Billi... | 33.566667 | 74 | 0.738497 |
4a272e5de73ec81398429ee013408a2be775cb2a | 1,379 | py | Python | var/spack/repos/builtin/packages/r-makecdfenv/package.py | varioustoxins/spack | cab0e4cb240f34891a6d753f3393e512f9a99e9a | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/r-makecdfenv/package.py | varioustoxins/spack | cab0e4cb240f34891a6d753f3393e512f9a99e9a | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 6 | 2022-01-08T08:41:11.000Z | 2022-03-14T19:28:07.000Z | var/spack/repos/builtin/packages/r-makecdfenv/package.py | foeroyingur/spack | 5300cbbb2e569190015c72d0970d25425ea38647 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RMakecdfenv(RPackage):
"""CDF Environment Maker
This package has two functions. On... | 43.09375 | 78 | 0.720812 |
4a272e618c68b989c45d22721c45f06ae93d41e3 | 1,144 | py | Python | figure/grad/figure2.py | HanSeokhyeon/Speech_recogniton_for_English_and_Korean | e0eaf1da1e1ac15f34402fea8cb330d008140d61 | [
"MIT"
] | null | null | null | figure/grad/figure2.py | HanSeokhyeon/Speech_recogniton_for_English_and_Korean | e0eaf1da1e1ac15f34402fea8cb330d008140d61 | [
"MIT"
] | null | null | null | figure/grad/figure2.py | HanSeokhyeon/Speech_recogniton_for_English_and_Korean | e0eaf1da1e1ac15f34402fea8cb330d008140d61 | [
"MIT"
] | null | null | null | """
그림 2. 40 밴드 멜 필터뱅크와 제안하는 방법에서 사용하는 32 밴드 감마톤 필터뱅크의 주파수 응답
"""
import numpy as np
import matplotlib.pyplot as plt
import librosa
plt.rcParams['font.family'] = 'Times New Roman'
plt.rcParams['font.size'] = 20
fig = plt.figure(figsize=(10, 10))
plt.subplot(2, 1, 1)
mel_filter_freq = librosa.filters.mel(sr=16000, n_... | 24.869565 | 109 | 0.697552 |
4a272f9fb37bc96dd9f4b0e81e5f23757bc24673 | 1,300 | py | Python | samples/azure-quantum/parallel-qrng/parallel_qrng.py | buseorak/Quantum | 8cf50d30cfd4932f79d791245305b5c47ac609a1 | [
"MIT"
] | 1 | 2021-02-17T23:44:18.000Z | 2021-02-17T23:44:18.000Z | samples/azure-quantum/parallel-qrng/parallel_qrng.py | seanwallawalla-forks/Quantum | 24b7497b012e4ac4d533ec30df1794621b753dfa | [
"MIT"
] | 2 | 2022-03-30T15:29:15.000Z | 2022-03-30T15:29:18.000Z | samples/azure-quantum/parallel-qrng/parallel_qrng.py | seanwallawalla-forks/Quantum | 24b7497b012e4ac4d533ec30df1794621b753dfa | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import sys
import qsharp
import qsharp.azure
# Print a list of Q# operations that are available to simulate or execute
# from Python.
print(qsharp.get_available_operations())
from Microsoft.Quantum.Samples import SampleRandomNumber
if __name_... | 38.235294 | 127 | 0.712308 |
4a272fb5542c803a3dd8456da469fbf3b989cc04 | 850 | py | Python | accounts/urls.py | amyxzhang/pano-server | b3949af178a41b6327b5a74dae96fc466b12f91a | [
"MIT"
] | 22 | 2015-03-10T12:53:36.000Z | 2022-03-01T15:15:39.000Z | accounts/urls.py | amyxzhang/pano-server | b3949af178a41b6327b5a74dae96fc466b12f91a | [
"MIT"
] | 135 | 2015-01-13T03:36:43.000Z | 2018-10-06T20:09:45.000Z | accounts/urls.py | haystack/eyebrowse-server | 582570a9af031efba77f4c50286fdc24dcec1e55 | [
"MIT"
] | 11 | 2015-03-12T21:07:32.000Z | 2018-07-26T16:58:53.000Z | from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url
urlpatterns = patterns('accounts.views',
url(r'', include('registration.backends.default.urls')),
url(r'^profile/sharelist$', 'whitelist'),
... | 44.736842 | 79 | 0.510588 |
4a27300b38dcb17854008bc79746841debcfe40a | 2,624 | py | Python | ytmusicapi/parsers/library.py | neuenmuller/ytmusicapi | 7c18d8df4be21989ee95a17005dcfb728a067bb2 | [
"MIT"
] | null | null | null | ytmusicapi/parsers/library.py | neuenmuller/ytmusicapi | 7c18d8df4be21989ee95a17005dcfb728a067bb2 | [
"MIT"
] | null | null | null | ytmusicapi/parsers/library.py | neuenmuller/ytmusicapi | 7c18d8df4be21989ee95a17005dcfb728a067bb2 | [
"MIT"
] | null | null | null | from .utils import *
def parse_artists(results, uploaded=False):
artists = []
for result in results:
data = result['musicResponsiveListItemRenderer']
artist = {}
artist['browseId'] = nav(data, NAVIGATION_BROWSE_ID)
artist['artist'] = get_item_text(data, 0)
if uploaded:
... | 33.641026 | 86 | 0.5625 |
4a273096d688a07370d4d5381b53aa107c65a48b | 4,772 | py | Python | PyScripts(elseIsTkinter)/hangman.py | Dario213/My-Python-Scripts | dee96e84e8a892e7a72f96c47a1f161e068572cb | [
"Apache-2.0"
] | null | null | null | PyScripts(elseIsTkinter)/hangman.py | Dario213/My-Python-Scripts | dee96e84e8a892e7a72f96c47a1f161e068572cb | [
"Apache-2.0"
] | null | null | null | PyScripts(elseIsTkinter)/hangman.py | Dario213/My-Python-Scripts | dee96e84e8a892e7a72f96c47a1f161e068572cb | [
"Apache-2.0"
] | null | null | null | from random import randint
from time import sleep
def turn(player_lives: int, player_name: str, sentence: str, sentence_out: str) -> list: # [state_of_choice, reformed_sentence, lives_to_remove]
found = False
letters = "qwertzuiopasdfghjklyxcvbnm"
counter = 0
if player_lives > 0:
letter = input(f"{pla... | 30.987013 | 181 | 0.665968 |
4a2730d3061f280ff0283e41be616f88b2de9809 | 8,372 | py | Python | openstack_dashboard/dashboards/project/routers/ports/forms.py | NunoEdgarGFlowHub/horizon | 73a0bbd43ea78ac5337f7d00977ec5f32452067e | [
"Apache-2.0"
] | 1 | 2018-04-17T02:32:05.000Z | 2018-04-17T02:32:05.000Z | openstack_dashboard/dashboards/project/routers/ports/forms.py | NunoEdgarGFlowHub/horizon | 73a0bbd43ea78ac5337f7d00977ec5f32452067e | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/project/routers/ports/forms.py | NunoEdgarGFlowHub/horizon | 73a0bbd43ea78ac5337f7d00977ec5f32452067e | [
"Apache-2.0"
] | null | null | null | # Copyright 2012, Nachi Ueno, NTT MCL, 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 applic... | 41.241379 | 78 | 0.582656 |
4a273176e3f257c52533f7713b8070164e502f3e | 2,972 | py | Python | tests/unit/comments/test_comment_signing.py | snapperVibes/lbry-sdk | 77a51d1ad43404e5dc52af715a7bebfaeb3fee16 | [
"MIT"
] | 2 | 2021-12-24T18:29:49.000Z | 2021-12-26T02:04:57.000Z | tests/unit/comments/test_comment_signing.py | snapperVibes/lbry-sdk | 77a51d1ad43404e5dc52af715a7bebfaeb3fee16 | [
"MIT"
] | null | null | null | tests/unit/comments/test_comment_signing.py | snapperVibes/lbry-sdk | 77a51d1ad43404e5dc52af715a7bebfaeb3fee16 | [
"MIT"
] | null | null | null | from lbry.testcase import AsyncioTestCase
import hashlib
from lbry.extras.daemon.comment_client import sign_comment
from lbry.extras.daemon.comment_client import is_comment_signed_by_channel
from tests.unit.wallet.test_schema_signing import get_stream, get_channel
class TestSigningComments(AsyncioTestCase):
@st... | 49.533333 | 118 | 0.729475 |
4a2733ebc1c50a3d2c597e89804c314bfac7c68e | 2,141 | py | Python | download-transcripts.py | zuhairmahd/speech-to-text-viewer | 34704c91ac3b5628b402dd85817455f50284ca68 | [
"CC0-1.0"
] | 10 | 2019-08-09T21:01:39.000Z | 2021-08-13T16:41:00.000Z | download-transcripts.py | zuhairmahd/speech-to-text-viewer | 34704c91ac3b5628b402dd85817455f50284ca68 | [
"CC0-1.0"
] | null | null | null | download-transcripts.py | zuhairmahd/speech-to-text-viewer | 34704c91ac3b5628b402dd85817455f50284ca68 | [
"CC0-1.0"
] | 4 | 2020-06-09T13:51:16.000Z | 2021-12-11T22:25:23.000Z | #!/usr/bin/env python -u
"""Download completed AWS Transcribe jobs"""
import json
import os
import sys
import time
import boto3
import botocore
import requests
transcribe = boto3.client("transcribe")
def get_completed_jobs():
next_token = ""
# boto3 will throw an error if you provide an empty NextToken but... | 29.328767 | 87 | 0.630079 |
4a27343a751d2271f72978c0285fac2d2e0bfc4c | 2,905 | py | Python | surveyweights/census/uk_census.py | rethinkpriorities/surveyweights | 9023e69d9721d0d00c5081f1e2c23d8befa63ebb | [
"MIT"
] | 1 | 2020-10-17T03:55:58.000Z | 2020-10-17T03:55:58.000Z | surveyweights/census/uk_census.py | rethinkpriorities/surveyweights | 9023e69d9721d0d00c5081f1e2c23d8befa63ebb | [
"MIT"
] | null | null | null | surveyweights/census/uk_census.py | rethinkpriorities/surveyweights | 9023e69d9721d0d00c5081f1e2c23d8befa63ebb | [
"MIT"
] | null | null | null | UK_CENSUS = {'age': {'18-24': 0.094,
'25-29': 0.068,
'30-34': 0.066,
'35-39': 0.067,
'40-44': 0.073,
'45-49': 0.073,
'50-54': 0.064,
'55-59': 0.057,
'60... | 52.818182 | 251 | 0.449914 |
4a2734aab09f9183d07c3795710f60663bdc55ad | 1,098 | py | Python | setup.py | leixin/k2 | 4eb3a9a81754e85325caad5d5c7e2bdc0b8f26e6 | [
"MIT"
] | 144 | 2020-04-17T10:10:57.000Z | 2022-03-25T19:07:54.000Z | setup.py | leixin/k2 | 4eb3a9a81754e85325caad5d5c7e2bdc0b8f26e6 | [
"MIT"
] | 136 | 2020-04-22T10:35:10.000Z | 2021-08-16T13:49:29.000Z | setup.py | leixin/k2 | 4eb3a9a81754e85325caad5d5c7e2bdc0b8f26e6 | [
"MIT"
] | 26 | 2020-04-21T08:23:06.000Z | 2021-09-02T15:23:53.000Z | import setuptools
def get_long_description():
with open('README.md', 'r') as f:
long_description = f.read()
return long_description
version = '0.0.1'
description = 'FSA/FST algorithms, intended to (eventually) be interoperable with PyTorch and similar'
setuptools.setup(
python_requires='>=3... | 29.675676 | 102 | 0.642987 |
4a27359ef256adb947029d5457a2012ad4c28222 | 5,464 | py | Python | pyATMO/Utils.py | tomevans/pyATMO | dbd561bf2b1bfdbcde8c2af3e2bfdf2baebad8f6 | [
"MIT"
] | null | null | null | pyATMO/Utils.py | tomevans/pyATMO | dbd561bf2b1bfdbcde8c2af3e2bfdf2baebad8f6 | [
"MIT"
] | null | null | null | pyATMO/Utils.py | tomevans/pyATMO | dbd561bf2b1bfdbcde8c2af3e2bfdf2baebad8f6 | [
"MIT"
] | null | null | null | from __future__ import print_function
import scipy.io
import numpy as np
import matplotlib.pyplot as plt
import pdb, os, sys
def ReadChem( ATMO, ncdf_fpath='' ):
ncdfFile = scipy.io.netcdf.netcdf_file( ncdf_fpath, mode='r', mmap=False )
z = ncdfFile.variables
molname = []
for i in z['molname'][:]:
... | 33.317073 | 101 | 0.571559 |
4a27361a9244ad3a07fdd0ee8cafe8b54c444a9f | 833 | py | Python | jq/works/migrations/0005_vote.py | Thousif-S/J-Q | 478d69181bf22f23b56c75d50c212d9d4aa0b1a9 | [
"MIT"
] | null | null | null | jq/works/migrations/0005_vote.py | Thousif-S/J-Q | 478d69181bf22f23b56c75d50c212d9d4aa0b1a9 | [
"MIT"
] | 18 | 2020-02-12T01:05:41.000Z | 2022-03-11T23:58:14.000Z | jq/works/migrations/0005_vote.py | Thousif-S/J-Q | 478d69181bf22f23b56c75d50c212d9d4aa0b1a9 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.3 on 2019-07-20 10:39
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('works', '0004_basework_p... | 33.32 | 130 | 0.65066 |
4a27367e79c2de8680f65235f9d062ab604d5f78 | 6,548 | py | Python | src/olympia/reviewers/management/commands/review_reports.py | snifhex/addons-server | 2b9dee65c10c0dca700ff2d25f3694c7cf769816 | [
"BSD-3-Clause"
] | null | null | null | src/olympia/reviewers/management/commands/review_reports.py | snifhex/addons-server | 2b9dee65c10c0dca700ff2d25f3694c7cf769816 | [
"BSD-3-Clause"
] | 1,050 | 2020-07-02T11:48:43.000Z | 2022-03-31T08:11:54.000Z | src/olympia/reviewers/management/commands/review_reports.py | snifhex/addons-server | 2b9dee65c10c0dca700ff2d25f3694c7cf769816 | [
"BSD-3-Clause"
] | 1 | 2019-07-16T00:23:07.000Z | 2019-07-16T00:23:07.000Z | from datetime import date, timedelta
import os
import settings
from django.core.management.base import BaseCommand
from django.db import connection
from django.utils.encoding import force_str
import olympia.core.logger
from olympia.amo.utils import send_mail
from olympia.constants.reviewers import (
POST_REVIEW... | 33.927461 | 87 | 0.539707 |
4a2737c93ef25b6490d45a897b8011932cba9aa7 | 995 | py | Python | 70_question/dynamic_programming/make_change.py | alvinctk/google-tech-dev-guide | 9d7759bea1f44673c2de4f25a94b27368928a59f | [
"Apache-2.0"
] | 26 | 2019-06-07T05:29:47.000Z | 2022-03-19T15:32:27.000Z | 70_question/dynamic_programming/make_change.py | alvinctk/google-tech-dev-guide | 9d7759bea1f44673c2de4f25a94b27368928a59f | [
"Apache-2.0"
] | null | null | null | 70_question/dynamic_programming/make_change.py | alvinctk/google-tech-dev-guide | 9d7759bea1f44673c2de4f25a94b27368928a59f | [
"Apache-2.0"
] | 6 | 2019-10-10T06:39:28.000Z | 2020-05-12T19:50:55.000Z | # O(nd) time | O(n) space
# where d is the number of denominations
def numberOfWaysToMakeChange(n, denoms):
"""
ways[amount] += ways[amount - denomination]
ways[amount] = ways[amount - denomination] + ways[amount]
for amount - denomination >= 0
base case: ways[amount=0] = number of ways for smallest... | 33.166667 | 87 | 0.6 |
4a2737cc3ca162fb2f77c9be4f04f4a9ec65e9d5 | 284 | py | Python | src/utils/game_mode.py | paolodelia99/py-pacman | d58cc7429f19ab5189a17ce209cc467bd2db72a9 | [
"MIT"
] | 4 | 2021-03-15T16:28:01.000Z | 2022-03-07T21:41:15.000Z | src/utils/game_mode.py | paolodelia99/py-pacman | d58cc7429f19ab5189a17ce209cc467bd2db72a9 | [
"MIT"
] | null | null | null | src/utils/game_mode.py | paolodelia99/py-pacman | d58cc7429f19ab5189a17ce209cc467bd2db72a9 | [
"MIT"
] | null | null | null | from enum import Enum
class GameMode(Enum):
ready = 0
normal = 1
hit_ghost = 2
game_over = 3
wait_to_start = 4
wait_after_eating_ghost = 5
wait_after_finishing_level = 6
flash_maze = 7
extra_pacman = 8
change_ghosts = 9
black_screen = 10
| 17.75 | 34 | 0.651408 |
4a27384da8a1c3fd4dd173b652e8a625977fc7df | 7,784 | py | Python | tensorflow/python/kernel_tests/segment_reduction_ops_deterministic_test.py | ashutom/tensorflow-upstream | c16069c19de9e286dd664abb78d0ea421e9f32d4 | [
"Apache-2.0"
] | 10 | 2021-05-25T17:43:04.000Z | 2022-03-08T10:46:09.000Z | tensorflow/python/kernel_tests/segment_reduction_ops_deterministic_test.py | CaptainGizzy21/tensorflow | 3457a2b122e50b4d44ceaaed5a663d635e5c22df | [
"Apache-2.0"
] | 6 | 2021-11-10T20:16:36.000Z | 2022-02-10T05:52:17.000Z | tensorflow/python/kernel_tests/segment_reduction_ops_deterministic_test.py | CaptainGizzy21/tensorflow | 3457a2b122e50b4d44ceaaed5a663d635e5c22df | [
"Apache-2.0"
] | 3 | 2021-09-26T22:20:25.000Z | 2021-09-26T23:07:13.000Z | # Copyright 2021 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 44.48 | 80 | 0.68795 |
4a273ac709f58bd4e7ab13520471452889ff0f16 | 1,123 | py | Python | test/test_country_details.py | Cloudmersive/Cloudmersive.APIClient.Python.Validate | 894a3f578c3860db41b3eed179dcc52e02f565a0 | [
"Apache-2.0"
] | 3 | 2018-06-23T21:37:21.000Z | 2020-04-20T23:07:36.000Z | test/test_country_details.py | Cloudmersive/Cloudmersive.APIClient.Python.Validate | 894a3f578c3860db41b3eed179dcc52e02f565a0 | [
"Apache-2.0"
] | 1 | 2019-02-04T17:03:35.000Z | 2019-03-02T20:16:52.000Z | test/test_country_details.py | Cloudmersive/Cloudmersive.APIClient.Python.Validate | 894a3f578c3860db41b3eed179dcc52e02f565a0 | [
"Apache-2.0"
] | 2 | 2019-03-21T15:54:15.000Z | 2020-05-27T17:30:43.000Z | # coding: utf-8
"""
validateapi
The validation APIs help you validate data. Check if an E-mail address is real. Check if a domain is real. Check up on an IP address, and even where it is located. All this and much more is available in the validation API. # noqa: E501
OpenAPI spec version: v1
Ge... | 27.390244 | 240 | 0.731968 |
4a273b3c39bbc15b578413c52fc0111332235426 | 8,167 | py | Python | python/maintenance.py | jpiercefield/CattleTrakcer | a1fb93a8c2f1072601bcd9871c5928610cbbaf88 | [
"MIT"
] | 1 | 2017-06-10T19:17:11.000Z | 2017-06-10T19:17:11.000Z | python/maintenance.py | jpiercefield/CattleTrakcer | a1fb93a8c2f1072601bcd9871c5928610cbbaf88 | [
"MIT"
] | null | null | null | python/maintenance.py | jpiercefield/CattleTrakcer | a1fb93a8c2f1072601bcd9871c5928610cbbaf88 | [
"MIT"
] | 2 | 2017-03-21T01:41:53.000Z | 2018-12-03T08:38:06.000Z | from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
import smtplib
import time
import datetime
from sqlalchemy import create_engine, Column, Integer, String, DateTime, Binary
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import exists
from sqlalchemy.orm import... | 33.609053 | 120 | 0.478389 |
4a273bd6174c7d8bc1502225dd5d6a62220ac024 | 9,151 | py | Python | app/api/v1/schema/regdetails.py | a-wakeel/Device-Registration-Subsystem | dd9fa387e2087a6ccea9676303debe640bd99422 | [
"Unlicense"
] | 6 | 2018-11-07T12:41:30.000Z | 2020-04-12T18:07:03.000Z | app/api/v1/schema/regdetails.py | a-wakeel/Device-Registration-Subsystem | dd9fa387e2087a6ccea9676303debe640bd99422 | [
"Unlicense"
] | 1 | 2020-10-20T12:33:18.000Z | 2020-10-20T12:33:18.000Z | app/api/v1/schema/regdetails.py | a-wakeel/Device-Registration-Subsystem | dd9fa387e2087a6ccea9676303debe640bd99422 | [
"Unlicense"
] | 10 | 2018-11-12T06:15:19.000Z | 2021-11-18T05:45:12.000Z | """
DRS Registration schema package.
Copyright (c) 2018-2020 Qualcomm Technologies, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met:
Redistrib... | 55.79878 | 844 | 0.654136 |
4a273c2c165578d953d10066f56f220499d219d0 | 12,791 | py | Python | spritecss/packing/anneal.py | yostudios/Spritemapper | 277cb76a14be639b6d7fa3191bc427409e72ad69 | [
"MIT"
] | 49 | 2015-01-22T14:27:32.000Z | 2021-12-24T23:07:40.000Z | spritecss/packing/anneal.py | tzuryby/Spritemapper | 7cd3b68348a86982420b6231861fda4a0e676f35 | [
"MIT"
] | 2 | 2015-02-12T12:31:34.000Z | 2015-04-12T10:43:17.000Z | spritecss/packing/anneal.py | tzuryby/Spritemapper | 7cd3b68348a86982420b6231861fda4a0e676f35 | [
"MIT"
] | 6 | 2015-04-03T07:29:54.000Z | 2021-12-15T02:21:35.000Z | #!/usr/bin/env python
# Python module for simulated annealing - anneal.py - v1.0 - 2 Sep 2009
#
# Copyright (c) 2009, Richard J. Wagner <wagnerr@umich.edu>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright... | 40.477848 | 93 | 0.596435 |
4a273c99f824d1aff1168c04620a7dba0126d34c | 5,363 | py | Python | kolibri/core/content/test/test_movedirectory.py | arceduardvincent/kolibri | 26073dda2569bb38bfe1e08ba486e96f650d10ce | [
"MIT"
] | null | null | null | kolibri/core/content/test/test_movedirectory.py | arceduardvincent/kolibri | 26073dda2569bb38bfe1e08ba486e96f650d10ce | [
"MIT"
] | null | null | null | kolibri/core/content/test/test_movedirectory.py | arceduardvincent/kolibri | 26073dda2569bb38bfe1e08ba486e96f650d10ce | [
"MIT"
] | null | null | null | from django.core.management import call_command
from django.test import TestCase
from mock import patch
from kolibri.utils.conf import OPTIONS
class ContentMoveDirectoryTestCase(TestCase):
"""
Testcase for the command kolibri manage content movedirectory <destination>
"""
# Helper methods
def _pat... | 56.452632 | 128 | 0.732612 |
4a273e1ee255533a50d76c84314e30b3ed1c3f6b | 26,325 | py | Python | test/sql/test_text.py | csboling/sqlalchemy-fk-hack | d199de2620ac2bd2d6be5e5f081a8b2c3a4211dc | [
"MIT"
] | null | null | null | test/sql/test_text.py | csboling/sqlalchemy-fk-hack | d199de2620ac2bd2d6be5e5f081a8b2c3a4211dc | [
"MIT"
] | null | null | null | test/sql/test_text.py | csboling/sqlalchemy-fk-hack | d199de2620ac2bd2d6be5e5f081a8b2c3a4211dc | [
"MIT"
] | null | null | null | """Test the TextClause and related constructs."""
from sqlalchemy.testing import fixtures, AssertsCompiledSQL, eq_, \
assert_raises_message, expect_warnings, assert_warnings
from sqlalchemy import text, select, Integer, String, Float, \
bindparam, and_, func, literal_column, exc, MetaData, Table, Column,\
... | 33.880309 | 78 | 0.543324 |
4a273e3696030301d820b625177ce0089119a074 | 432 | py | Python | oscar/apps/customer/models.py | endgame/django-oscar | e5d78436e20b55902537a6cc82edf4e22568f9d6 | [
"BSD-3-Clause"
] | 1 | 2015-11-07T12:37:50.000Z | 2015-11-07T12:37:50.000Z | oscar/apps/customer/models.py | michaelBenin/django-oscar | f45d38b5d3ffa10756d95c625fb90a27185ce1e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/apps/customer/models.py | michaelBenin/django-oscar | f45d38b5d3ffa10756d95c625fb90a27185ce1e1 | [
"BSD-3-Clause"
] | 1 | 2019-07-10T06:32:14.000Z | 2019-07-10T06:32:14.000Z | from oscar.apps.customer import abstract_models
class Email(abstract_models.AbstractEmail):
pass
class CommunicationEventType(abstract_models.AbstractCommunicationEventType):
pass
class Notification(abstract_models.AbstractNotification):
pass
class ProductAlert(abstract_models.AbstractProductAlert):... | 20.571429 | 77 | 0.824074 |
4a273e6042015a47d96df17819a8319af78d82de | 350 | py | Python | job_client_redis/store.py | jupyter-observablehq-bridge/job-client-py-redis | 6b2156a35a45091ebe4fe3c806ca34b1eb47a423 | [
"MIT"
] | null | null | null | job_client_redis/store.py | jupyter-observablehq-bridge/job-client-py-redis | 6b2156a35a45091ebe4fe3c806ca34b1eb47a423 | [
"MIT"
] | null | null | null | job_client_redis/store.py | jupyter-observablehq-bridge/job-client-py-redis | 6b2156a35a45091ebe4fe3c806ca34b1eb47a423 | [
"MIT"
] | null | null | null |
class Store(dict):
"""
"""
def __init__(self, id, action=None):
"""
"""
self.id = id
self.action = action
def __setitem__(self, name, value):
"""
"""
super().__setitem__(name, value)
if name != 'action' and self.action:
self... | 18.421053 | 45 | 0.477143 |
4a273f0e134cf4c222d6779632c9ce77f8090e9b | 10,061 | py | Python | report_builder.py | benjaminramsden/500k | 18379d98e485a7244e2f8ef79a56cec47cbdb630 | [
"MIT"
] | null | null | null | report_builder.py | benjaminramsden/500k | 18379d98e485a7244e2f8ef79a56cec47cbdb630 | [
"MIT"
] | 12 | 2017-05-19T03:42:41.000Z | 2017-09-07T20:19:41.000Z | report_builder.py | benjaminramsden/500k | 18379d98e485a7244e2f8ef79a56cec47cbdb630 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
from sheets_api import *
from report import Report
from village import Village
from missionary import Missionary, Child, Spouse
from imgur import update_imgur_ids
from powerpoint import *
from Queue import Queue
import threading
import argparse
# This script conducts the following:
#... | 39.610236 | 107 | 0.553722 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.