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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8492af952a63188db0a0a659ebfab73d1b300c57 | 7,565 | py | Python | auth_backend/plugins/tastypie/authorization.py | ZhuoZhuoCrayon/bk-sops | d1475d53c19729915727ce7adc24e3226f15e332 | [
"Apache-2.0"
] | 1 | 2020-08-16T09:21:58.000Z | 2020-08-16T09:21:58.000Z | auth_backend/plugins/tastypie/authorization.py | ZhuoZhuoCrayon/bk-sops | d1475d53c19729915727ce7adc24e3226f15e332 | [
"Apache-2.0"
] | null | null | null | auth_backend/plugins/tastypie/authorization.py | ZhuoZhuoCrayon/bk-sops | d1475d53c19729915727ce7adc24e3226f15e332 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2020 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | 39.60733 | 115 | 0.686583 |
1251d4211b46700e891050659feccb0f81c29687 | 3,390 | py | Python | harmonyanalyticslambda/accessKeyUtils.py | SmartStake/harmonyanalytics | 30d195e18c471e478dabe31c22259fd64a00e7c5 | [
"MIT"
] | 1 | 2022-02-23T22:16:25.000Z | 2022-02-23T22:16:25.000Z | harmonyanalyticslambda/accessKeyUtils.py | blockflow/harmonyanalytics | 30d195e18c471e478dabe31c22259fd64a00e7c5 | [
"MIT"
] | 7 | 2021-03-02T01:40:43.000Z | 2022-03-08T23:34:48.000Z | harmonyanalyticslambda/accessKeyUtils.py | blockflow/harmonyanalytics | 30d195e18c471e478dabe31c22259fd64a00e7c5 | [
"MIT"
] | 1 | 2022-01-06T09:33:15.000Z | 2022-01-06T09:33:15.000Z | import logging
import dbUtil
import tables
import utilities
logger = logging.getLogger()
logger.setLevel(logging.INFO)
class CallRejectedException(Exception):
pass
def performCheckAndGetConn(event, app, fnName):
try:
conn, key = doPerformCheckAndGetConn(event, app, fnName)
return conn, key,... | 32.285714 | 87 | 0.657522 |
814029821bad6b952ed74389aeeb096a1ab90054 | 2,409 | py | Python | Chapter5_DNN/Chapter5_3_MNISTClassification/mnistKerasDnnSolution.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter5_DNN/Chapter5_3_MNISTClassification/mnistKerasDnnSolution.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter5_DNN/Chapter5_3_MNISTClassification/mnistKerasDnnSolution.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | import numpy as np
from tensorflow.keras.datasets import mnist
from tensorflow.keras.initializers import Constant
from tensorflow.keras.initializers import TruncatedNormal
from tensorflow.keras.layers import Activation
from tensorflow.keras.layers import Dense
from tensorflow.keras.models import Sequential
from tensorf... | 31.697368 | 112 | 0.713159 |
3b2087aa0987d459ca34106601c70890acb3a1e4 | 1,705 | py | Python | data_structures/graphs/same_path_recursive.py | ruler30cm/python-ds | f84605c5b746ea1d46de3d00b86f5fba399445c7 | [
"MIT"
] | 1,723 | 2019-07-30T07:06:22.000Z | 2022-03-31T15:22:22.000Z | data_structures/graphs/same_path_recursive.py | ruler30cm/python-ds | f84605c5b746ea1d46de3d00b86f5fba399445c7 | [
"MIT"
] | 213 | 2019-10-06T08:07:47.000Z | 2021-10-04T15:38:36.000Z | data_structures/graphs/same_path_recursive.py | ruler30cm/python-ds | f84605c5b746ea1d46de3d00b86f5fba399445c7 | [
"MIT"
] | 628 | 2019-10-06T10:26:25.000Z | 2022-03-31T01:41:00.000Z | """
Check if two nodes are on the same path in a undirected graph. Use DFS and the concept of intime and outtime.
Intime - time when a node is visited for the first time
Outtime - time when a node is visited for the second time after all its children have been visited
For any pair of node if they are on the same path -... | 26.230769 | 109 | 0.602346 |
8978eed2991297b0d9a2039353be8970a2a1bd9b | 2,871 | py | Python | setup.py | rolisz/pybtipay | e7ed022568133479d5c0b1aa5798a8185bbacbf1 | [
"MIT"
] | 1 | 2021-11-13T06:37:55.000Z | 2021-11-13T06:37:55.000Z | setup.py | rolisz/pybtipay | e7ed022568133479d5c0b1aa5798a8185bbacbf1 | [
"MIT"
] | null | null | null | setup.py | rolisz/pybtipay | e7ed022568133479d5c0b1aa5798a8185bbacbf1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
import io
import re
from glob import glob
from os.path import basename
from os.path import dirname
from os.path import join
from os.path import splitext
from setuptools import find_packages
from setuptools import setup
def read(*names, **kwargs):
with io.open(
... | 34.178571 | 96 | 0.596656 |
6bd7add1732f23108c54bea929bfe4019e30eade | 8,017 | py | Python | contrib/seeds/makeseeds.py | 8899kkA/REBELCoin | 42e21696292c98ffdaf959d6c0c060460aa188a7 | [
"MIT"
] | null | null | null | contrib/seeds/makeseeds.py | 8899kkA/REBELCoin | 42e21696292c98ffdaf959d6c0c060460aa188a7 | [
"MIT"
] | null | null | null | contrib/seeds/makeseeds.py | 8899kkA/REBELCoin | 42e21696292c98ffdaf959d6c0c060460aa188a7 | [
"MIT"
] | 1 | 2022-01-30T23:45:34.000Z | 2022-01-30T23:45:34.000Z | #!/usr/bin/env python3
# Copyright (c) 2013-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Generate seeds.txt from Pieter's DNS seeder
#
import re
import sys
import dns.resolver
import collect... | 35.473451 | 116 | 0.569166 |
a0c5b153b772e958f30880e6ccb159892471ad64 | 147 | py | Python | stacker/config/translators/__init__.py | ShopStyle/stacker | 66d976041169627093781b636648961fec86d540 | [
"BSD-2-Clause"
] | null | null | null | stacker/config/translators/__init__.py | ShopStyle/stacker | 66d976041169627093781b636648961fec86d540 | [
"BSD-2-Clause"
] | null | null | null | stacker/config/translators/__init__.py | ShopStyle/stacker | 66d976041169627093781b636648961fec86d540 | [
"BSD-2-Clause"
] | null | null | null | from __future__ import absolute_import
import yaml
from .kms import kms_simple_constructor
yaml.add_constructor('!kms', kms_simple_constructor)
| 18.375 | 52 | 0.843537 |
ae00289484761b094392c8373daba58d158b90f4 | 3,868 | py | Python | elephas/hyperparam.py | fyumoto/KerasSpark | dcc9b422cc3b9f6f592910fd8f2ed6415d44830e | [
"MIT"
] | null | null | null | elephas/hyperparam.py | fyumoto/KerasSpark | dcc9b422cc3b9f6f592910fd8f2ed6415d44830e | [
"MIT"
] | null | null | null | elephas/hyperparam.py | fyumoto/KerasSpark | dcc9b422cc3b9f6f592910fd8f2ed6415d44830e | [
"MIT"
] | null | null | null | from __future__ import print_function
from __future__ import absolute_import
from hyperopt import Trials, rand
from hyperas.ensemble import VotingModel
from hyperas.optim import get_hyperopt_model_string, base_minimizer
import numpy as np
from keras.models import model_from_yaml
import six.moves.cPickle as pickle
from ... | 39.469388 | 117 | 0.653826 |
a960ca057734bf81f25990d9f8a26b995b3daef9 | 234 | py | Python | sinolify/utils/system.py | hugo213/sinolify | 0ceb80b736334ac77e843b39ca47f03c4f95e82a | [
"MIT"
] | null | null | null | sinolify/utils/system.py | hugo213/sinolify | 0ceb80b736334ac77e843b39ca47f03c4f95e82a | [
"MIT"
] | null | null | null | sinolify/utils/system.py | hugo213/sinolify | 0ceb80b736334ac77e843b39ca47f03c4f95e82a | [
"MIT"
] | null | null | null | from distutils.spawn import find_executable
class NotInstalledError(FileNotFoundError):
pass
def where(name: str) -> str:
path = find_executable(name)
if not path:
raise NotInstalledError(name)
return path
| 18 | 43 | 0.717949 |
27a1d33b61af7e50183cc07ed945cc5f466b6bf2 | 71,398 | py | Python | pysnmp-with-texts/A3COM-LIC-R1-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/A3COM-LIC-R1-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/A3COM-LIC-R1-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module A3COM-LIC-R1-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/A3COM-LIC-R1-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:08:07 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar ... | 175.425061 | 5,708 | 0.791661 |
29f8bcc4d3f28182a3c83fc685d67c5970cd8d3d | 511 | py | Python | bert/utils.py | deepdialog/tf2bert | 6b48dd9ade1d5c364805d35c63e7fccf893f5960 | [
"MIT"
] | null | null | null | bert/utils.py | deepdialog/tf2bert | 6b48dd9ade1d5c364805d35c63e7fccf893f5960 | [
"MIT"
] | 1 | 2021-09-02T12:54:20.000Z | 2021-09-02T12:54:20.000Z | bert/utils.py | deepdialog/tf2bert | 6b48dd9ade1d5c364805d35c63e7fccf893f5960 | [
"MIT"
] | null | null | null | import tensorflow as tf
from .gelu import gelu
def get_activation(activation_string):
if not isinstance(activation_string, str):
return activation_string
if not activation_string:
return None
act = activation_string.lower()
if act == "linear":
return None
elif act == "relu... | 23.227273 | 60 | 0.62818 |
307fa1d094b6513257ff0c44dfaaac9998dce8f0 | 16,150 | py | Python | sdk/python/pulumi_aws/backup/vault.py | alexbowers/pulumi-aws | 7dbdb03b1e4f7c0d51d5b5d17233ff4465c3eff5 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/backup/vault.py | alexbowers/pulumi-aws | 7dbdb03b1e4f7c0d51d5b5d17233ff4465c3eff5 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/backup/vault.py | alexbowers/pulumi-aws | 7dbdb03b1e4f7c0d51d5b5d17233ff4465c3eff5 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import... | 42.612137 | 294 | 0.639257 |
fdbfde69a3ef0129f7570c80f188496449fdd571 | 3,399 | py | Python | test.py | elb3k/vit-pytorch | f60d0a272534b5748230faeda34b104f7c511394 | [
"MIT"
] | null | null | null | test.py | elb3k/vit-pytorch | f60d0a272534b5748230faeda34b104f7c511394 | [
"MIT"
] | null | null | null | test.py | elb3k/vit-pytorch | f60d0a272534b5748230faeda34b104f7c511394 | [
"MIT"
] | null | null | null | import os
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"] = "0,1,2,3"
import yaml
from argparse import ArgumentParser, Namespace
import torch
torch.backends.cudnn.benchmark = True
import torch.nn as nn
import numpy as np
from tqdm import tqdm, trange
from vit_pytorch import LongVViT... | 29.051282 | 149 | 0.704325 |
a3d21b3b976790a8c11140ff027a0a1be91bbabb | 1,183 | py | Python | the_good_dollar/the_good_dollar/urls.py | fouadsan/the_good_dollar | f68d2c0a54302d1bec2d8ae86ef180fc5e7f076a | [
"MIT"
] | null | null | null | the_good_dollar/the_good_dollar/urls.py | fouadsan/the_good_dollar | f68d2c0a54302d1bec2d8ae86ef180fc5e7f076a | [
"MIT"
] | null | null | null | the_good_dollar/the_good_dollar/urls.py | fouadsan/the_good_dollar | f68d2c0a54302d1bec2d8ae86ef180fc5e7f076a | [
"MIT"
] | null | null | null | from django.conf.urls import url
from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
from rest_framework_simplejwt.views import TokenObtainPairView, TokenRefreshView
urlpatterns = [
url(r'^jet/', include('jet.urls', 'jet... | 36.96875 | 80 | 0.691462 |
7891bb00124abaa9d0477ca76c513c664acb8269 | 6,123 | py | Python | modle/docx/base.py | AYSHSTUDIO/NessusToReport | e6bf68eb3d6294e9cddc956876da95aac97359dc | [
"Apache-2.0"
] | 244 | 2020-06-27T12:07:52.000Z | 2022-03-30T02:36:27.000Z | modle/docx/base.py | AYSHSTUDIO/NessusToReport | e6bf68eb3d6294e9cddc956876da95aac97359dc | [
"Apache-2.0"
] | 23 | 2021-05-20T07:38:55.000Z | 2022-03-13T14:13:01.000Z | modle/docx/base.py | AYSHSTUDIO/NessusToReport | e6bf68eb3d6294e9cddc956876da95aac97359dc | [
"Apache-2.0"
] | 74 | 2020-06-27T12:07:53.000Z | 2022-03-11T19:07:45.000Z | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
# ------------------------------------------------------------
# File: base.py
# Created Date: 2020/6/24
# Created Time: 0:14
# Author: Hypdncy
# Author Mail: hypdncy@outlook.com
# Copyright (c) 2020 Hypdncy
# ------------------------------------------------------------
# ... | 30.162562 | 114 | 0.446513 |
8328cd110e3ff3a9a11d2a24bcd638c02c60bda8 | 822 | py | Python | src/test/integration/python_test_files/file_8_output.py | ribeirompl/autoDocstring | 98af13d4a073c404ff6e40dadb5a94bc9c6bf5d1 | [
"MIT"
] | null | null | null | src/test/integration/python_test_files/file_8_output.py | ribeirompl/autoDocstring | 98af13d4a073c404ff6e40dadb5a94bc9c6bf5d1 | [
"MIT"
] | null | null | null | src/test/integration/python_test_files/file_8_output.py | ribeirompl/autoDocstring | 98af13d4a073c404ff6e40dadb5a94bc9c6bf5d1 | [
"MIT"
] | 1 | 2022-01-25T17:50:57.000Z | 2022-01-25T17:50:57.000Z | """[summary]
Classes
-------
TestClass
Methods
-------
function_1
function_2
function_3
"""
from typing import Union, List, Dict, Thing, Generator, Tuple
class TestClass(object):
def __init__(self, arg1: int, arg2: str, arg3: float = None):
self.arg1 = arg1
self.arg2 = arg2
self.arg3 = ... | 15.807692 | 65 | 0.599757 |
852424ff6f43dfd126354553e6ab3f05700d25eb | 875 | py | Python | pass_cli/creds.py | jakhax/pass_cli | 1d78a31643753cccb1eccf0e5a3e58e8b7f1ed73 | [
"MIT"
] | null | null | null | pass_cli/creds.py | jakhax/pass_cli | 1d78a31643753cccb1eccf0e5a3e58e8b7f1ed73 | [
"MIT"
] | null | null | null | pass_cli/creds.py | jakhax/pass_cli | 1d78a31643753cccb1eccf0e5a3e58e8b7f1ed73 | [
"MIT"
] | 2 | 2018-06-10T12:00:03.000Z | 2018-06-19T17:18:05.000Z | import os,sys; sys.path.insert(0, os.path.abspath('..'))
import click
'''
local imports
'''
from pass_cli.crypt import Cipher
from pass_cli.csv_file import Data_Operator
from pass_cli.config import DEFAULT
from pass_cli.config import fieldnames
from pass_cli.session_check import SessionCheck
'''
Global variables d... | 25 | 61 | 0.72 |
0b3d55fc9a72a2b35c1886bf24aa5e2474905ef6 | 2,586 | py | Python | real_time.py | jigiciak/noise_reduction | baf9f2fc4c3ce53186e33529e41caeb3df3255a9 | [
"MIT"
] | null | null | null | real_time.py | jigiciak/noise_reduction | baf9f2fc4c3ce53186e33529e41caeb3df3255a9 | [
"MIT"
] | null | null | null | real_time.py | jigiciak/noise_reduction | baf9f2fc4c3ce53186e33529e41caeb3df3255a9 | [
"MIT"
] | 1 | 2021-05-28T19:26:36.000Z | 2021-05-28T19:26:36.000Z | import sounddevice as sd
import numpy as np
import librosa
from tensorflow.keras.models import model_from_json
from signal_utils import scaled_in, inv_scaled_ou
from signal_utils import (
audio_files_to_numpy,
numpy_audio_to_matrix_spectrogram,
matrix_spectrogram_to_numpy_audio,
save_audio,
)
import win... | 32.734177 | 89 | 0.718097 |
ee82f5a306ccd8c172d6298c20f444ed116e7afa | 251 | py | Python | ex07.py | Lorranysousc/ExerciciosDeRepeticao | 4b8ac1c4eb3ac5d2739456a4f967e094fad70256 | [
"MIT"
] | null | null | null | ex07.py | Lorranysousc/ExerciciosDeRepeticao | 4b8ac1c4eb3ac5d2739456a4f967e094fad70256 | [
"MIT"
] | null | null | null | ex07.py | Lorranysousc/ExerciciosDeRepeticao | 4b8ac1c4eb3ac5d2739456a4f967e094fad70256 | [
"MIT"
] | null | null | null | '''Faça um programa que leia 5 números e informe o maior número.'''
maior_num = 0
for cont in range (1, 6):
numero = float(input(f'Digite o {cont}º número: '))
if numero > maior_num:
maior_num = numero
print(f'O maior número é o {maior_num:.2f}') | 31.375 | 67 | 0.689243 |
096471e1a995e27bf50935dff78bd9973bbe334b | 3,960 | py | Python | main.py | mahdikord/kordba | 20c71f636cfb4e49265c0f7984ac3373cd2e7ba4 | [
"Apache-2.0"
] | null | null | null | main.py | mahdikord/kordba | 20c71f636cfb4e49265c0f7984ac3373cd2e7ba4 | [
"Apache-2.0"
] | null | null | null | main.py | mahdikord/kordba | 20c71f636cfb4e49265c0f7984ac3373cd2e7ba4 | [
"Apache-2.0"
] | null | null | null | import json
import logging
import urllib
import urllib2
import webapp2
import configuration
TOKEN = '189770008:AAE8lOLf4XaZ5OZkSd9bcpUdrl9PPDZ5eD8'
MY_URL = "https://YOUR_BOT_URL"
BASE_URL = 'https://api.telegram.org/bot' + TOKEN + '/'
# config = configuration.Configuration('config/syslog.json')
# config.configura... | 30 | 148 | 0.589899 |
3806a23216aacd67b371bc7e619fb435297b7d41 | 5,774 | py | Python | layers/ssd.py | hli2020/object_detection | e87d8f1188a477fd4a4b79303e62ee29004039ee | [
"MIT"
] | 3 | 2018-10-20T14:15:30.000Z | 2018-12-12T19:44:08.000Z | layers/ssd.py | Gaofan666/object_detection | e87d8f1188a477fd4a4b79303e62ee29004039ee | [
"MIT"
] | null | null | null | layers/ssd.py | Gaofan666/object_detection | e87d8f1188a477fd4a4b79303e62ee29004039ee | [
"MIT"
] | 3 | 2019-04-13T12:43:22.000Z | 2021-04-18T00:30:39.000Z | import torch.backends.cudnn as cudnn
import torch.nn.functional as F
from torch.autograd import Variable
from utils.train import *
from option.config import *
from layers.models.models import *
from layers.modules.prior_box import PriorBox
from layers.modules.l2norm import L2Norm
from layers.detection import Detect
... | 33.964706 | 88 | 0.571874 |
d96fc63ee89d90b4e0e5d5241b414e0d3e15fbf5 | 7,148 | py | Python | template_grid_search.py | TimDettmers/sched | e16735f2c2eb6a51f5cf29ead534041574034e2e | [
"MIT"
] | 1 | 2020-04-22T17:49:48.000Z | 2020-04-22T17:49:48.000Z | template_grid_search.py | TimDettmers/sched | e16735f2c2eb6a51f5cf29ead534041574034e2e | [
"MIT"
] | null | null | null | template_grid_search.py | TimDettmers/sched | e16735f2c2eb6a51f5cf29ead534041574034e2e | [
"MIT"
] | null | null | null | import itertools
import gpuscheduler
import argparse
import os
import uuid
import hashlib
import glob
from itertools import product
from torch.optim.lr_scheduler import OneCycleLR
from os.path import join
parser = argparse.ArgumentParser(description='Compute script.')
parser.add_argument('--dry', action='store_true')... | 34.868293 | 266 | 0.61164 |
bde0505d002817ceed11d4a636e6e939708ffd41 | 9,861 | py | Python | webscanners/webinspectscanner/views.py | IO1337/archerysec | e1f6f4608ee96725f56c850393334d05e899f55d | [
"BSD-3-Clause"
] | null | null | null | webscanners/webinspectscanner/views.py | IO1337/archerysec | e1f6f4608ee96725f56c850393334d05e899f55d | [
"BSD-3-Clause"
] | 7 | 2020-06-05T19:03:04.000Z | 2022-03-11T23:28:18.000Z | webscanners/webinspectscanner/views.py | IO1337/archerysec | e1f6f4608ee96725f56c850393334d05e899f55d | [
"BSD-3-Clause"
] | null | null | null | # _
# /\ | |
# / \ _ __ ___| |__ ___ _ __ _ _
# / /\ \ | '__/ __| '_ \ / _ \ '__| | | |
# / ____ \| | | (__| | | | __/ | | |_| |
# /_/ \_\_| \___|_| |_|\___|_| \__, |
# __/ |
# |___/
# Copyright (C) 20... | 37.781609 | 120 | 0.572559 |
8ff8fcd4f50d5410a52ab8f4f7e5f6dc1480ec16 | 10,357 | py | Python | .circleci/config.py | christabella/guildai | 10d34eb9aa02aa4a374c340e75b5d44d9f3d8a25 | [
"Apache-2.0"
] | null | null | null | .circleci/config.py | christabella/guildai | 10d34eb9aa02aa4a374c340e75b5d44d9f3d8a25 | [
"Apache-2.0"
] | null | null | null | .circleci/config.py | christabella/guildai | 10d34eb9aa02aa4a374c340e75b5d44d9f3d8a25 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2017-2018 TensorHub, 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 l... | 28.849582 | 88 | 0.56416 |
caa7d111ce623f03fa0cc8430f75c67a9a27abd1 | 16,188 | py | Python | fastai/text/learner.py | kaay-null/fastai | f8002b37907853b4c6e6fd0cc37e1ca0ab501cc5 | [
"Apache-2.0"
] | 1 | 2019-01-31T08:15:59.000Z | 2019-01-31T08:15:59.000Z | fastai/text/learner.py | kaay-null/fastai | f8002b37907853b4c6e6fd0cc37e1ca0ab501cc5 | [
"Apache-2.0"
] | null | null | null | fastai/text/learner.py | kaay-null/fastai | f8002b37907853b4c6e6fd0cc37e1ca0ab501cc5 | [
"Apache-2.0"
] | null | null | null | 'Model training for NLP'
from ..torch_core import *
from ..basic_train import *
from ..callbacks import *
from ..data_block import CategoryList
from ..basic_data import *
from ..datasets import *
from ..metrics import accuracy
from ..train import GradientClipping
from ..layers import *
from .models import *
from .trans... | 53.07541 | 138 | 0.624598 |
3c48c552291e53260cd50e9acde2e0ec68c765bb | 20,698 | py | Python | grizli/grismconf.py | makhshik/grizli | 61e8e01f0f12f72706703c9c2835ad046cb51870 | [
"MIT"
] | 1 | 2021-03-27T20:42:50.000Z | 2021-03-27T20:42:50.000Z | grizli/grismconf.py | makhshik/grizli | 61e8e01f0f12f72706703c9c2835ad046cb51870 | [
"MIT"
] | null | null | null | grizli/grismconf.py | makhshik/grizli | 61e8e01f0f12f72706703c9c2835ad046cb51870 | [
"MIT"
] | null | null | null | """
Demonstrate aXe trace polynomials.
Initial code taken from `(Brammer, Pirzkal, & Ryan 2014) <https://github.com/WFC3Grism/CodeDescription>`_, which contains a detailed
explanation how the grism configuration parameters and coefficients are defined and evaluated.
"""
import os
import numpy as np
class aXeConf()... | 38.047794 | 180 | 0.490047 |
651c2651ca57ad23bc7c85f2b36eed6725acf25b | 912 | py | Python | apps/core/models/best_article.py | sparcs-kaist/new-ara-api | 63998da575cb148347708199fe1345c4e7ee3e1b | [
"MIT"
] | 19 | 2017-09-13T07:51:58.000Z | 2022-03-28T11:04:03.000Z | apps/core/models/best_article.py | sparcs-kaist/new-ara-api | 63998da575cb148347708199fe1345c4e7ee3e1b | [
"MIT"
] | 147 | 2017-09-14T13:45:30.000Z | 2022-03-14T15:54:09.000Z | apps/core/models/best_article.py | sparcs-kaist/new-ara-api | 63998da575cb148347708199fe1345c4e7ee3e1b | [
"MIT"
] | 5 | 2019-08-31T13:13:30.000Z | 2021-03-26T15:46:38.000Z | from django.db import models
from ara.db.models import MetaDataModel
class BestArticle(MetaDataModel):
PERIOD_CHOICES_DAILY = 'daily'
PERIOD_CHOICES_WEEKLY = 'weekly'
PERIOD_CHOICES = (
(PERIOD_CHOICES_DAILY, PERIOD_CHOICES_DAILY),
(PERIOD_CHOICES_WEEKLY, PERIOD_CHOICES_WEEKLY),
)
... | 23.384615 | 55 | 0.631579 |
57ba00316d8c85ed4e35ef130a6fcb490fd0bb6d | 23,262 | py | Python | mbrl/util/common.py | sradicwebster/mbrl-lib | 07bb5e5bb71a9e5b71f53c39552d675b8297b012 | [
"MIT"
] | null | null | null | mbrl/util/common.py | sradicwebster/mbrl-lib | 07bb5e5bb71a9e5b71f53c39552d675b8297b012 | [
"MIT"
] | 1 | 2021-08-25T12:45:11.000Z | 2021-08-25T12:45:11.000Z | mbrl/util/common.py | sradicwebster/mbrl-lib | 07bb5e5bb71a9e5b71f53c39552d675b8297b012 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import pathlib
from typing import Callable, Dict, List, Optional, Sequence, Tuple, Type, Union
import gym.wrappers
import... | 40.385417 | 97 | 0.663829 |
f523567d35d9c3a9e1894eea8ff6de4232e01d06 | 10,512 | py | Python | sdk/python/pulumi_azure_nextgen/network/v20180201/packet_capture.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/network/v20180201/packet_capture.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/network/v20180201/packet_capture.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 55.914894 | 2,248 | 0.694349 |
0241ad8e9b533edbdf04105ebb1a8e8966f3e44b | 12,406 | py | Python | examples/osrt_python/tfl/utils.py | fiefdx/edgeai-tidl-tools | 345fa5b2624779c2a135242777f4882e26417378 | [
"CNRI-Python"
] | null | null | null | examples/osrt_python/tfl/utils.py | fiefdx/edgeai-tidl-tools | 345fa5b2624779c2a135242777f4882e26417378 | [
"CNRI-Python"
] | null | null | null | examples/osrt_python/tfl/utils.py | fiefdx/edgeai-tidl-tools | 345fa5b2624779c2a135242777f4882e26417378 | [
"CNRI-Python"
] | null | null | null | import os
import platform
import numpy as np
from PIL import Image, ImageFont, ImageDraw, ImageEnhance
if platform.machine() == 'aarch64':
numImages = 100
else :
import requests
numImages = 3
models = {
'mobilenet_v1_1.0_224.tflite' : 'https://tfhub.dev/tensorflow/lite-model/mobilenet_v1_1.0_224/1/de... | 40.943894 | 222 | 0.633161 |
43b39cc541a57a8c192091f86341d6c518e83b6e | 3,623 | py | Python | sauronlab/caches/stim_caches.py | dmyersturnbull/sauronlab | c458b622efd3cb70c2547ec64ea9d11c293ab8f6 | [
"Apache-2.0"
] | null | null | null | sauronlab/caches/stim_caches.py | dmyersturnbull/sauronlab | c458b622efd3cb70c2547ec64ea9d11c293ab8f6 | [
"Apache-2.0"
] | 73 | 2021-02-03T21:32:44.000Z | 2022-03-28T05:14:24.000Z | sauronlab/caches/stim_caches.py | dmyersturnbull/sauronlab | c458b622efd3cb70c2547ec64ea9d11c293ab8f6 | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
from sauronlab.core.core_imports import *
from sauronlab.model.audio import Waveform
from sauronlab.model.cache_interfaces import AStimCache
from sauronlab.model.stim_frames import BatteryStimFrame
DEFAULT_UNEXPANDED_CACHE_DIR = sauronlab_env.cache_dir / "batteries" / "unexpanded"
D... | 35.174757 | 98 | 0.638973 |
2502c484d95f024047ea1f39052c6afd31ee5d44 | 1,837 | py | Python | examples/photos_repl.py | hhoeck/osxphotos | 432da7f139a5e4b37eeb358f4ede45314407f8e5 | [
"MIT"
] | null | null | null | examples/photos_repl.py | hhoeck/osxphotos | 432da7f139a5e4b37eeb358f4ede45314407f8e5 | [
"MIT"
] | null | null | null | examples/photos_repl.py | hhoeck/osxphotos | 432da7f139a5e4b37eeb358f4ede45314407f8e5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3 -i
# Open an interactive REPL with photosdb and photos defined
# as osxphotos.PhotosDB() and PhotosDB.photos respectively
# useful for debugging or exploring the Photos database
# If you run this using python from command line, do so with -i flag:
# python3 -i examples/photos_repl.py
import os... | 28.703125 | 87 | 0.685357 |
4a588b8ca3070e2d5976c80da6250e9ec8335b84 | 5,042 | py | Python | Main.py | MAXIORBOY/MazeCreator | 431ae7c09e9439fbdd348ca1cf8d7a6d9e891a4d | [
"MIT"
] | null | null | null | Main.py | MAXIORBOY/MazeCreator | 431ae7c09e9439fbdd348ca1cf8d7a6d9e891a4d | [
"MIT"
] | null | null | null | Main.py | MAXIORBOY/MazeCreator | 431ae7c09e9439fbdd348ca1cf8d7a6d9e891a4d | [
"MIT"
] | null | null | null | class FieldCalculation:
def __init__(self, field_coords=None, second_field_coords=None):
self.field_coords = field_coords
self.second_field_coords = second_field_coords
def set_field_coords(self, new_field_coords):
self.field_coords = new_field_coords
def set_both_field_coords(self... | 52.520833 | 171 | 0.678302 |
fab65daf759af6bdae007a54bb4646a03990456f | 7,090 | py | Python | python/rikai/parquet/resolver.py | changhiskhan/rikai | 6431b27b6d00862e91c165116ec0b0696a1881fc | [
"Apache-2.0"
] | 111 | 2021-01-21T16:04:08.000Z | 2022-03-27T05:45:19.000Z | python/rikai/parquet/resolver.py | askintution/rikai | 53a72a19beafc4097a816efb9cddd063e107e67a | [
"Apache-2.0"
] | 388 | 2021-01-10T22:37:38.000Z | 2022-03-31T20:33:40.000Z | python/rikai/parquet/resolver.py | askintution/rikai | 53a72a19beafc4097a816efb9cddd063e107e67a | [
"Apache-2.0"
] | 19 | 2021-01-08T03:42:00.000Z | 2022-02-24T11:36:04.000Z | # Copyright 2020 Rikai 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 applicable law or agreed to in wri... | 29.915612 | 78 | 0.621157 |
ece6f6a7e808d3fd57539813abdac760a63e6cf7 | 99 | py | Python | AquariumPro/AquariumPro/userManagers/apps.py | Python1991/Aquarium-Pro | 83034c04f55073647ea11975e4248aa7ddfc9a22 | [
"MIT"
] | null | null | null | AquariumPro/AquariumPro/userManagers/apps.py | Python1991/Aquarium-Pro | 83034c04f55073647ea11975e4248aa7ddfc9a22 | [
"MIT"
] | null | null | null | AquariumPro/AquariumPro/userManagers/apps.py | Python1991/Aquarium-Pro | 83034c04f55073647ea11975e4248aa7ddfc9a22 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class UsermanagersConfig(AppConfig):
name = 'userManagers'
| 16.5 | 36 | 0.777778 |
18514c4e41dabe65af416fb26c7ae0af28776530 | 12,020 | py | Python | pygame/test/test_utils/run_tests.py | CiubucAlexandra/Theremine-Projet-Micriprocesseurs | 7670d9cb468b060135dc5f057b734db970da0f0c | [
"BSD-3-Clause"
] | 4 | 2016-12-21T00:25:24.000Z | 2016-12-25T08:50:44.000Z | lib/python2.7/site-packages/pygame/tests/test_utils/run_tests.py | jppgibbs/Aegis | feac08cd3935569057e75531fe80bd0e1f982a93 | [
"MIT"
] | 371 | 2020-03-04T21:51:56.000Z | 2022-03-31T20:59:11.000Z | lib/python2.7/site-packages/pygame/tests/test_utils/run_tests.py | jppgibbs/Aegis | feac08cd3935569057e75531fe80bd0e1f982a93 | [
"MIT"
] | 3 | 2019-03-30T16:01:34.000Z | 2019-12-31T22:07:27.000Z | import sys
if __name__ == '__main__':
sys.exit("This module is for import only")
test_pkg_name = '.'.join(__name__.split('.')[0:-2])
is_pygame_pkg = test_pkg_name == 'pygame.tests'
test_runner_mod = test_pkg_name + '.test_utils.test_runner'
if is_pygame_pkg:
from pygame.tests.test_utils import import_submodu... | 35.352941 | 79 | 0.599418 |
e5d341e5428e07d2f1e3606c9e33234a309f01f7 | 1,609 | py | Python | server_py/flatgov/committeeReport/pipelines.py | aih/BillMap | d130b1396cb25b415cd7d9ea7389ad558a34eec1 | [
"CC0-1.0"
] | 2 | 2022-01-18T14:55:52.000Z | 2022-01-31T03:38:39.000Z | server_py/flatgov/committeeReport/pipelines.py | aih/FlatGov | 8201ef1813bbc062841421017f492e877f75a5f8 | [
"CC0-1.0"
] | 321 | 2020-09-01T16:20:35.000Z | 2021-07-03T06:42:34.000Z | server_py/flatgov/committeeReport/pipelines.py | aih/FlatGov | 8201ef1813bbc062841421017f492e877f75a5f8 | [
"CC0-1.0"
] | 1 | 2022-03-31T15:02:49.000Z | 2022-03-31T15:02:49.000Z | # Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html
# useful for handling different item types with a single interface
import re
from itemadapter import ItemAdapter
from bills.models import CommitteeDo... | 36.568182 | 141 | 0.587321 |
2f74408eacfe2b0fdcb8985eb0a6411e31c46661 | 6,546 | py | Python | Python Project Filter-Detect-GUI/mne/decoding/tests/test_base.py | JulienL3vesque/Hexoskin_RnD_OSM | b524430d6f4b2b300d119b6a1586141e6c2d14a3 | [
"MIT"
] | null | null | null | Python Project Filter-Detect-GUI/mne/decoding/tests/test_base.py | JulienL3vesque/Hexoskin_RnD_OSM | b524430d6f4b2b300d119b6a1586141e6c2d14a3 | [
"MIT"
] | null | null | null | Python Project Filter-Detect-GUI/mne/decoding/tests/test_base.py | JulienL3vesque/Hexoskin_RnD_OSM | b524430d6f4b2b300d119b6a1586141e6c2d14a3 | [
"MIT"
] | null | null | null | # Author: Jean-Remi King, <jeanremi.king@gmail.com>
#
# License: BSD (3-clause)
import numpy as np
from numpy.testing import assert_array_equal, assert_array_almost_equal
from nose.tools import assert_true, assert_equal, assert_raises
from mne.utils import requires_sklearn_0_15
from mne.decoding.base import (_get_inve... | 36.569832 | 79 | 0.653682 |
56fe2f58eb2874abcc37675a927c7126f97d8509 | 432 | py | Python | run_wrf/configs/test/config_test_reps.py | matzegoebel/run_wrf | cbbbb0ec818416d9b24698d369f70ad9ba8cb801 | [
"BSD-2-Clause"
] | 2 | 2021-01-15T11:05:37.000Z | 2021-01-15T11:05:39.000Z | run_wrf/configs/test/config_test_reps.py | matzegoebel/run_wrf | cbbbb0ec818416d9b24698d369f70ad9ba8cb801 | [
"BSD-2-Clause"
] | null | null | null | run_wrf/configs/test/config_test_reps.py | matzegoebel/run_wrf | cbbbb0ec818416d9b24698d369f70ad9ba8cb801 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Settings for launch_jobs.py
Test settings for automated tests.
To test repetitions functionality
@author: Matthias Göbel
"""
from collections import OrderedDict as odict
from run_wrf.configs.test.config_test import *
from copy import deepcopy
params = deepcopy(param... | 21.6 | 67 | 0.752315 |
6ade4d71b030ceaa56ec9213fefe76955631fbbf | 859 | py | Python | apps/tg_bot/handlers/admin.py | VladimirLazor/Lohika | a36407feeb2e3ade4f8c689030f343d88ff47a92 | [
"Apache-2.0"
] | null | null | null | apps/tg_bot/handlers/admin.py | VladimirLazor/Lohika | a36407feeb2e3ade4f8c689030f343d88ff47a92 | [
"Apache-2.0"
] | 9 | 2021-03-19T15:59:10.000Z | 2022-03-12T00:57:56.000Z | apps/tg_bot/handlers/admin.py | VladimirLazor/Lohika | a36407feeb2e3ade4f8c689030f343d88ff47a92 | [
"Apache-2.0"
] | null | null | null | import datetime
import telegram
from django.utils.timezone import now
from apps.core import static_text
from apps.users.models import User
def admin(update, context):
""" Show help info about all secret admins commands """
user = User.get_user(update, context)
if not user.is_admin:
return
r... | 24.542857 | 95 | 0.696158 |
d8e898382302ad64e1b57c7d43f288d3a78421f0 | 22,596 | py | Python | Fnc_Stk_Stk_2D.py | humehe/VSAT-2D | ffff561ed9e4da1800a198e813662a9c00a8815a | [
"BSD-3-Clause"
] | null | null | null | Fnc_Stk_Stk_2D.py | humehe/VSAT-2D | ffff561ed9e4da1800a198e813662a9c00a8815a | [
"BSD-3-Clause"
] | null | null | null | Fnc_Stk_Stk_2D.py | humehe/VSAT-2D | ffff561ed9e4da1800a198e813662a9c00a8815a | [
"BSD-3-Clause"
] | null | null | null | import bottleneck as bn
from astropy import stats as apsts
import scipy.integrate as integrate
from Fnc_Stk_Dir_2D import *
from Fnc_Stk_Spc_2D import *
from Fnc_Stk_Tbl_2D import *
####Fnc_Stk_Stk_2D####
def Cube_Stack_2D(CCubes2bStacked,name,wght_img_2bstack,sig_clp,*args, **kwargs):
wrt_fits = kwargs.get... | 53.928401 | 155 | 0.724907 |
b5c27055833395c803eb73df60f69f5400216cc5 | 14,958 | py | Python | fairseq/logging/progress_bar.py | indra622/FBK-fairseq | 4357af09ef2ad1594f75a5b7bcc02d5b10cad2e5 | [
"MIT"
] | 2 | 2021-09-14T06:42:08.000Z | 2021-11-09T21:15:18.000Z | fairseq/logging/progress_bar.py | indra622/FBK-fairseq | 4357af09ef2ad1594f75a5b7bcc02d5b10cad2e5 | [
"MIT"
] | null | null | null | fairseq/logging/progress_bar.py | indra622/FBK-fairseq | 4357af09ef2ad1594f75a5b7bcc02d5b10cad2e5 | [
"MIT"
] | 3 | 2021-09-06T10:18:39.000Z | 2021-12-29T10:52:51.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
Wrapper around various loggers and progress bars (e.g., tqdm).
"""
import atexit
import json
import logging
import os
import... | 32.237069 | 89 | 0.594531 |
be082999f1eb1c81ac2fb798dcc01c37115a0ac9 | 1,374 | py | Python | tests/contrib/operators/test_vertica_operator.py | suensummit/airflow | 37a342d0e96a91ce2d34085e225a4e86f54c4e21 | [
"Apache-2.0"
] | 5 | 2020-07-17T07:33:58.000Z | 2022-03-02T06:23:47.000Z | tests/contrib/operators/test_vertica_operator.py | suensummit/airflow | 37a342d0e96a91ce2d34085e225a4e86f54c4e21 | [
"Apache-2.0"
] | 20 | 2017-04-18T19:47:46.000Z | 2020-01-13T04:19:24.000Z | tests/contrib/operators/test_vertica_operator.py | suensummit/airflow | 37a342d0e96a91ce2d34085e225a4e86f54c4e21 | [
"Apache-2.0"
] | 12 | 2020-01-09T14:02:39.000Z | 2022-01-24T07:18:51.000Z | # -*- coding: utf-8 -*-
#
# 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
#... | 33.512195 | 73 | 0.723435 |
b6f1294d4c4307d720056d972f9f8ea6607fe3d8 | 1,095 | py | Python | vault/utils.py | Natan7/vault | ad0e9d5434dc59c9573afefef5e4eb390a7383ae | [
"Apache-2.0"
] | 1 | 2017-03-02T19:32:31.000Z | 2017-03-02T19:32:31.000Z | vault/utils.py | Natan7/vault | ad0e9d5434dc59c9573afefef5e4eb390a7383ae | [
"Apache-2.0"
] | null | null | null | vault/utils.py | Natan7/vault | ad0e9d5434dc59c9573afefef5e4eb390a7383ae | [
"Apache-2.0"
] | 2 | 2018-03-14T16:56:53.000Z | 2018-03-14T17:20:07.000Z | # -*- coding: utf-8 -*-
from django.conf import settings
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.core.urlresolvers import reverse
def update_default_context(request, context={}):
if not request.session.get('is_superuser'):
request.session['is_superuser'] = re... | 29.594595 | 76 | 0.70137 |
6664fddffd54b49aa90ea613b8279edb85dfdfc8 | 1,151 | py | Python | setup.py | syndbg/django-web-secure | 631fd62aa89c4688f4b1eacb84116d8777d45674 | [
"MIT"
] | 2 | 2015-04-05T22:55:12.000Z | 2019-04-14T20:27:31.000Z | setup.py | syndbg/django-web-secure | 631fd62aa89c4688f4b1eacb84116d8777d45674 | [
"MIT"
] | null | null | null | setup.py | syndbg/django-web-secure | 631fd62aa89c4688f4b1eacb84116d8777d45674 | [
"MIT"
] | null | null | null | import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
README = readme.read()
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='django-web-secure',
version='0.1',
packages=['django_web_secure'],
... | 30.289474 | 87 | 0.646394 |
e6f7eb8baf7619af41b39d9c0a02bf9ca2af58ec | 1,968 | py | Python | DeepLearning/AutoRecAlgorithm.py | ddezav/recommedersystem | 4532b459f6aa1d330368e38ffdc8f1608f990091 | [
"MIT"
] | null | null | null | DeepLearning/AutoRecAlgorithm.py | ddezav/recommedersystem | 4532b459f6aa1d330368e38ffdc8f1608f990091 | [
"MIT"
] | null | null | null | DeepLearning/AutoRecAlgorithm.py | ddezav/recommedersystem | 4532b459f6aa1d330368e38ffdc8f1608f990091 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri May 4 13:08:25 2018
@author: Frank
"""
from surprise import AlgoBase
from surprise import PredictionImpossible
import numpy as np
from AutoRec import AutoRec
class AutoRecAlgorithm(AlgoBase):
def __init__(self, epochs=100, hiddenDim=100, learningRate=0.01, batchSize=1... | 32.262295 | 161 | 0.622459 |
45cde63922344c95fd28a5f9c22778c8f742ba60 | 22,052 | py | Python | tensorflow_probability/python/bijectors/bijector_properties_test.py | tarrou/probability | d4d80a1c04ad0b3e98758ebc3f7f82887274384d | [
"Apache-2.0"
] | 1 | 2019-10-10T06:15:42.000Z | 2019-10-10T06:15:42.000Z | tensorflow_probability/python/bijectors/bijector_properties_test.py | tarrou/probability | d4d80a1c04ad0b3e98758ebc3f7f82887274384d | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/bijectors/bijector_properties_test.py | tarrou/probability | d4d80a1c04ad0b3e98758ebc3f7f82887274384d | [
"Apache-2.0"
] | 1 | 2019-10-10T06:15:44.000Z | 2019-10-10T06:15:44.000Z | # Copyright 2018 The TensorFlow Probability 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 applicable law o... | 38.619965 | 106 | 0.702022 |
2eb3c2bef56b7e0e81db6ff4a7401792e67495c5 | 1,554 | py | Python | app/decorators/decorators.py | hoslack/Book-A-Meal_API | c67d19d4f2b785904ad0b8e2b2a7408e8f296a1f | [
"MIT"
] | 1 | 2018-12-14T11:11:01.000Z | 2018-12-14T11:11:01.000Z | app/decorators/decorators.py | hoslack/Book-A-Meal_API | c67d19d4f2b785904ad0b8e2b2a7408e8f296a1f | [
"MIT"
] | null | null | null | app/decorators/decorators.py | hoslack/Book-A-Meal_API | c67d19d4f2b785904ad0b8e2b2a7408e8f296a1f | [
"MIT"
] | 1 | 2018-05-06T21:43:19.000Z | 2018-05-06T21:43:19.000Z | from functools import wraps
from flask import request
from app.models.models import User
from app.custom_http_respones.responses import Success, Error
success = Success()
error = Error()
def token_required(f):
@wraps(f)
def decorated(*args, **kwargs):
access_token = None
if 'Authorization' in... | 33.782609 | 83 | 0.658301 |
8c79f2374093b7aadc1f738eb581a1c34847a4aa | 452 | py | Python | adventure/migrations/0017_adventure_active.py | matthew-macgregor/eamon | e59d14e790fd8e95f5f1a91d1965f549c2b673ba | [
"MIT"
] | 22 | 2016-03-22T07:28:42.000Z | 2022-02-12T16:03:17.000Z | adventure/migrations/0017_adventure_active.py | matthew-macgregor/eamon | e59d14e790fd8e95f5f1a91d1965f549c2b673ba | [
"MIT"
] | 103 | 2017-04-14T23:19:19.000Z | 2022-01-27T03:05:36.000Z | adventure/migrations/0017_adventure_active.py | matthew-macgregor/eamon | e59d14e790fd8e95f5f1a91d1965f549c2b673ba | [
"MIT"
] | 7 | 2019-04-09T16:12:10.000Z | 2021-12-15T17:09:32.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-05-08 07:41
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('adventure', '0016_auto_20160504_0112'),
]
operations = [
migrations.AddField... | 21.52381 | 49 | 0.617257 |
b65fcf9c72d37e89755ede736760e22c77898705 | 39,186 | py | Python | pytorch_lightning/trainer/trainer.py | EricCousineau-TRI/pytorch-lightning | 0a50bb406fa41dfa6a0e2be52f531a9c81c87d00 | [
"Apache-2.0"
] | null | null | null | pytorch_lightning/trainer/trainer.py | EricCousineau-TRI/pytorch-lightning | 0a50bb406fa41dfa6a0e2be52f531a9c81c87d00 | [
"Apache-2.0"
] | null | null | null | pytorch_lightning/trainer/trainer.py | EricCousineau-TRI/pytorch-lightning | 0a50bb406fa41dfa6a0e2be52f531a9c81c87d00 | [
"Apache-2.0"
] | null | null | null | # Copyright The PyTorch Lightning team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 41.161765 | 119 | 0.65332 |
884a6ad5120314fefc02459cca5b127a91b745ee | 10,035 | py | Python | intersight/model/workflow_custom_data_type_properties_all_of.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 5 | 2021-12-16T15:13:32.000Z | 2022-03-29T16:09:54.000Z | intersight/model/workflow_custom_data_type_properties_all_of.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 4 | 2022-01-25T19:05:51.000Z | 2022-03-29T20:18:37.000Z | intersight/model/workflow_custom_data_type_properties_all_of.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 2 | 2020-07-07T15:01:08.000Z | 2022-01-31T04:27:35.000Z | """
Cisco Intersight
Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan... | 53.095238 | 1,678 | 0.64574 |
847173f0215d52f5f00eab9b00cb08b7d561b5bc | 3,598 | py | Python | app/main/models/user.py | MuhweziDeo/loci-furniture-backend | 2472e1bc932e29e3234925297d106a9110acf65d | [
"MIT"
] | null | null | null | app/main/models/user.py | MuhweziDeo/loci-furniture-backend | 2472e1bc932e29e3234925297d106a9110acf65d | [
"MIT"
] | null | null | null | app/main/models/user.py | MuhweziDeo/loci-furniture-backend | 2472e1bc932e29e3234925297d106a9110acf65d | [
"MIT"
] | null | null | null | from .. import db, flask_bcrypt
import jwt
import datetime
from ..utils.send_email import send_email
import os
class User(db.Model):
""" User Model for storing user related details """
__tablename__ = "user"
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
email = db.Column(db.String... | 35.27451 | 91 | 0.585325 |
d33a3eb506f6a419e12511f78ba69426f493c6b2 | 5,875 | py | Python | xos/admin.py | pan2za/onos-service | 38ef8b862419da05a6059ded411f59e00e109f18 | [
"Apache-2.0"
] | null | null | null | xos/admin.py | pan2za/onos-service | 38ef8b862419da05a6059ded411f59e00e109f18 | [
"Apache-2.0"
] | null | null | null | xos/admin.py | pan2za/onos-service | 38ef8b862419da05a6059ded411f59e00e109f18 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from services.onos.models import *
from django import forms
from django.utils.safestring import mark_safe
from django.contrib.auth.admin import UserAdmin
from django.contrib.admin.widgets import FilteredSelectMultiple
from django.contrib.auth.forms import ReadOnlyPasswordHashField
from... | 46.259843 | 220 | 0.709617 |
7b0d97e3acfbd6fd9e1b0374667488db7d993a12 | 252 | py | Python | manage.py | theju/urlscript | 2a917c8131bd15e85244710f0e457e17b93a54a6 | [
"MIT"
] | null | null | null | manage.py | theju/urlscript | 2a917c8131bd15e85244710f0e457e17b93a54a6 | [
"MIT"
] | null | null | null | manage.py | theju/urlscript | 2a917c8131bd15e85244710f0e457e17b93a54a6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "urlscript.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| 22.909091 | 73 | 0.77381 |
c05b7c4765c2af8bd5d7966f1051a0a14b6f48f0 | 600 | py | Python | tech_article/tech_article/middlewares.py | ayueaa/Some-Spiders | 4cf085e55eab822c08d06b62099d1c235d1840ae | [
"MIT"
] | 5 | 2021-09-08T13:18:46.000Z | 2022-03-08T03:04:43.000Z | tech_article/tech_article/middlewares.py | ayueaa/Some-Spiders | 4cf085e55eab822c08d06b62099d1c235d1840ae | [
"MIT"
] | 6 | 2021-03-19T00:38:28.000Z | 2022-03-11T23:47:06.000Z | tech_article/tech_article/middlewares.py | ayueaa/Some-Spiders | 4cf085e55eab822c08d06b62099d1c235d1840ae | [
"MIT"
] | 3 | 2020-01-09T11:41:42.000Z | 2021-12-11T22:47:16.000Z | # -*- coding: utf-8 -*-
# Define here the models for your spider middleware
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/spider-middleware.html
from scrapy import signals
from fake_useragent import UserAgent
class TechArticleDownloaderMiddleware(object):
# Not all methods need to be define... | 31.578947 | 69 | 0.723333 |
2849331399c9877bc39c4f4792661ddf651bcc3c | 2,198 | py | Python | test/system/sconstool/util/finder_/finder_userdoc_iconv.py | ptomulik/scons-tool-util | daab1c7db087feb988a721bf10e6b5c29c0e02b2 | [
"Unlicense"
] | 1 | 2021-03-13T07:18:31.000Z | 2021-03-13T07:18:31.000Z | test/system/sconstool/util/finder_/finder_userdoc_iconv.py | ptomulik/scons-tool-util | daab1c7db087feb988a721bf10e6b5c29c0e02b2 | [
"Unlicense"
] | 5 | 2020-02-24T18:32:31.000Z | 2020-04-15T18:49:14.000Z | test/system/sconstool/util/finder_/finder_userdoc_iconv.py | ptomulik/scons-tool-util | daab1c7db087feb988a721bf10e6b5c29c0e02b2 | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
#!/usr/bin/env python3
#
# Copyright (c) 2014-2020 by Paweł Tomulik <ptomulik@meil.pw.edu.pl>
#
# 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, in... | 33.30303 | 94 | 0.733849 |
07791c85e4f225ef6d70d7a21debff4b263ba49a | 12,453 | py | Python | fundamentals/mysql/insert_list_of_dictionaries_into_database_tables.py | mtbannister/fundamentals | f1ba77ded115c727432220e50b2e20d251b2e225 | [
"MIT"
] | null | null | null | fundamentals/mysql/insert_list_of_dictionaries_into_database_tables.py | mtbannister/fundamentals | f1ba77ded115c727432220e50b2e20d251b2e225 | [
"MIT"
] | null | null | null | fundamentals/mysql/insert_list_of_dictionaries_into_database_tables.py | mtbannister/fundamentals | f1ba77ded115c727432220e50b2e20d251b2e225 | [
"MIT"
] | null | null | null | #!/usr/local/bin/python
# encoding: utf-8
"""
*Given a list of dictionaries this function will insert each dictionary as a row into the given database table*
:Author:
David Young
:Date Created:
June 21, 2016
"""
################# GLOBAL IMPORTS ####################
import sys
import os
os.environ['TERM'] = 'v... | 29.095794 | 139 | 0.565004 |
802eaa70b70ab76eeb92fa4e73afb750ee00d9f8 | 13,339 | py | Python | scripts/python/labview_processing/specific_data_scripts/NH3_SCR_processing.py | coelectrolyzer/cats | 21f8e6f5f176767ec403ad2738c80a5a71fba959 | [
"MIT"
] | 1 | 2022-02-17T16:37:12.000Z | 2022-02-17T16:37:12.000Z | scripts/python/labview_processing/specific_data_scripts/NH3_SCR_processing.py | coelectrolyzer/cats | 21f8e6f5f176767ec403ad2738c80a5a71fba959 | [
"MIT"
] | 5 | 2021-10-30T00:06:31.000Z | 2022-03-09T13:34:07.000Z | scripts/python/labview_processing/specific_data_scripts/NH3_SCR_processing.py | coelectrolyzer/cats | 21f8e6f5f176767ec403ad2738c80a5a71fba959 | [
"MIT"
] | 3 | 2021-05-08T02:26:08.000Z | 2022-03-01T22:27:40.000Z | ## @package NH3_SCR_processing
#
# @brief Script to read in all folders of NH3 + SCR data
#
# @details Python script to read in CLEERS transient data for
# for all sets of folders of the NH3 SCR transient
# data and perform a series of analyses, compress the data,
# ... | 46.155709 | 120 | 0.641053 |
7af2a1602ef52ad5dac1de22d6669b28a32389cf | 359 | py | Python | aws_quota/check/ecs.py | yanbinren/aws-quota-checker | 582a440e21d5847550732c9cbd8425d3199457ef | [
"MIT"
] | null | null | null | aws_quota/check/ecs.py | yanbinren/aws-quota-checker | 582a440e21d5847550732c9cbd8425d3199457ef | [
"MIT"
] | 1 | 2021-11-05T01:17:21.000Z | 2021-11-05T01:17:21.000Z | aws_quota/check/ecs.py | yanbinren/aws-quota-checker | 582a440e21d5847550732c9cbd8425d3199457ef | [
"MIT"
] | 1 | 2021-11-03T07:07:57.000Z | 2021-11-03T07:07:57.000Z | from .quota_check import QuotaCheck, QuotaScope
class ClusterCountCheck(QuotaCheck):
key = "ecs_count"
description = "ECS Clusters per region"
scope = QuotaScope.REGION
service_code = 'ecs'
quota_code = 'L-21C621EB'
@property
def current(self):
return len(self.boto_session.client(... | 25.642857 | 82 | 0.699164 |
5117f625f0606c784d6032c6bd32067220d1af50 | 4,194 | py | Python | lecture_6/omtp_lecture6/scripts/lecture6_assignment4.py | AndrejOrsula/omtp_course | ffb916e8be18c30cafbd3aca68b984c0021331a1 | [
"BSD-3-Clause"
] | null | null | null | lecture_6/omtp_lecture6/scripts/lecture6_assignment4.py | AndrejOrsula/omtp_course | ffb916e8be18c30cafbd3aca68b984c0021331a1 | [
"BSD-3-Clause"
] | null | null | null | lecture_6/omtp_lecture6/scripts/lecture6_assignment4.py | AndrejOrsula/omtp_course | ffb916e8be18c30cafbd3aca68b984c0021331a1 | [
"BSD-3-Clause"
] | 1 | 2021-01-27T14:59:42.000Z | 2021-01-27T14:59:42.000Z | #!/usr/bin/env python
import rospy
import tf2_ros
import tf2_geometry_msgs
import geometry_msgs
import moveit_commander
import sys
from omtp_gazebo.msg import LogicalCameraImage
from omtp_gazebo.srv import VacuumGripperControl
from std_srvs.srv import Empty
def lecture6_assignment4():
"""Perform pick and place ... | 30.172662 | 112 | 0.669051 |
ad42cb2506d07f7f8ccfe9952c09d82dc01eb90e | 214 | py | Python | fishnet/__init__.py | Erotemic/baseline-viame-2018 | dec299f356ff4ae30720041713bc3f486240b72a | [
"Apache-2.0"
] | 1 | 2021-01-01T16:58:36.000Z | 2021-01-01T16:58:36.000Z | fishnet/__init__.py | Erotemic/baseline-viame-2018 | dec299f356ff4ae30720041713bc3f486240b72a | [
"Apache-2.0"
] | null | null | null | fishnet/__init__.py | Erotemic/baseline-viame-2018 | dec299f356ff4ae30720041713bc3f486240b72a | [
"Apache-2.0"
] | 2 | 2018-05-25T15:44:49.000Z | 2021-01-01T16:58:37.000Z | """
mkinit --noattrs
"""
from fishnet import coco_api
from fishnet import data
from fishnet import fit
from fishnet import predict
from fishnet import util
__all__ = ['coco_api', 'data', 'fit', 'predict', 'util']
| 19.454545 | 56 | 0.733645 |
661a6598c4302cef5fe58604c68fd47b97daa586 | 9,255 | py | Python | patchinator.py | dszmaj/channels | be07934debaf620bf30f08103d88eff39cb4d6eb | [
"BSD-3-Clause"
] | null | null | null | patchinator.py | dszmaj/channels | be07934debaf620bf30f08103d88eff39cb4d6eb | [
"BSD-3-Clause"
] | null | null | null | patchinator.py | dszmaj/channels | be07934debaf620bf30f08103d88eff39cb4d6eb | [
"BSD-3-Clause"
] | 1 | 2022-03-04T22:00:32.000Z | 2022-03-04T22:00:32.000Z | #!/usr/bin/python
"""
Script that automatically generates a Django patch from the Channels codebase
based on some simple rules and string replacements.
Once Channels lands in Django, will be reversed to instead generate this
third-party app from the now-canonical Django source.
"""
import re
import os.path
import sys... | 35.596154 | 187 | 0.627337 |
f53de3cc7369dbf0375ba0850617ec2c0ac5d829 | 198 | py | Python | src/ImageHorizonLibrary/interaction/__init__.py | deftdawg/robotframework-imagehorizonlibrary | 84728959f7128b9f9e379e640b6a94cd60173f64 | [
"MIT"
] | null | null | null | src/ImageHorizonLibrary/interaction/__init__.py | deftdawg/robotframework-imagehorizonlibrary | 84728959f7128b9f9e379e640b6a94cd60173f64 | [
"MIT"
] | null | null | null | src/ImageHorizonLibrary/interaction/__init__.py | deftdawg/robotframework-imagehorizonlibrary | 84728959f7128b9f9e379e640b6a94cd60173f64 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from _keyboard import _Keyboard
from _mouse import _Mouse
from _operating_system import _OperatingSystem
__all__ = [
'_Keyboard',
'_Mouse',
'_OperatingSystem'
]
| 18 | 46 | 0.712121 |
e5b36b58f296674dc2577572f6c1db74dcd0574d | 968 | py | Python | tests/test_integration.py | cthulahoops/monkeyislang | a3aa049b5780d8e02fd504b27dda6b0751c00eb2 | [
"MIT"
] | 7 | 2020-11-17T08:30:42.000Z | 2021-01-30T05:37:31.000Z | tests/test_integration.py | cthulahoops/monkeyislang | a3aa049b5780d8e02fd504b27dda6b0751c00eb2 | [
"MIT"
] | null | null | null | tests/test_integration.py | cthulahoops/monkeyislang | a3aa049b5780d8e02fd504b27dda6b0751c00eb2 | [
"MIT"
] | null | null | null | from monkeyislang import exec_file
def test_if(capfd):
exec_file("examples/if.mi")
out, _err = capfd.readouterr()
assert out == "It's a 1 pieces o' eight\n"
def test_factorial(capfd):
exec_file("examples/factorial.mi")
out, _err = capfd.readouterr()
assert out == "It's a 8 pieces o' eight\nIt'... | 35.851852 | 186 | 0.679752 |
bbf6519cdfb57e194f34758d330559486d238447 | 4,547 | py | Python | contrib/testgen/gen_base58_test_vectors.py | brewhaus2/Placeholders-X16R | 8757eef1a0596df490be28a0f259ab26597ac851 | [
"MIT"
] | 23 | 2018-12-18T16:46:37.000Z | 2022-01-03T23:11:09.000Z | contrib/testgen/gen_base58_test_vectors.py | brewhaus2/Placeholders-X16R | 8757eef1a0596df490be28a0f259ab26597ac851 | [
"MIT"
] | 1 | 2018-12-15T19:08:42.000Z | 2018-12-15T19:09:35.000Z | contrib/testgen/gen_base58_test_vectors.py | brewhaus2/Placeholders-X16R | 8757eef1a0596df490be28a0f259ab26597ac851 | [
"MIT"
] | 11 | 2018-12-12T05:45:24.000Z | 2021-04-23T03:07:21.000Z | #!/usr/bin/env python
# Copyright (c) 2012-2016 The Bitcoin Core developers
# Copyright (c) 2017 The Placeholder Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Generate valid and invalid base58 address and priv... | 34.976923 | 97 | 0.616011 |
665c64e7e80189e5e5bac7be06621f41b6a3ab3b | 14,262 | py | Python | usedtools/MrMannequinsTools/MMT_Export_FBX.py | TheHoodieGuy02/blender-invasion | 9a4ca994cc9d7304b394a8ae79f5b380071a4f1d | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | usedtools/MrMannequinsTools/MMT_Export_FBX.py | TheHoodieGuy02/blender-invasion | 9a4ca994cc9d7304b394a8ae79f5b380071a4f1d | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | usedtools/MrMannequinsTools/MMT_Export_FBX.py | TheHoodieGuy02/blender-invasion | 9a4ca994cc9d7304b394a8ae79f5b380071a4f1d | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | import bpy
import os
#---------- NOTES -----------------------------------------------------------------------------
# RIGHT! I've been working with blender, UE4 and Mr Mannequin since 2015!
# And only recently figured out this magic for exporting perfectly from blender to the UE4 Mannequin without retargeting! :D
#... | 65.123288 | 992 | 0.679638 |
e6cae9faf405160c11437c898849c4e9a6fd85ac | 1,147 | py | Python | examples/completion.py | vonshednob/cursedspace | 0ce43302a76fd1a9e0688994f3704515b44fa95a | [
"MIT"
] | 2 | 2021-12-12T15:08:31.000Z | 2022-01-11T13:20:53.000Z | examples/completion.py | vonshednob/cursedspace | 0ce43302a76fd1a9e0688994f3704515b44fa95a | [
"MIT"
] | 1 | 2022-01-12T18:52:43.000Z | 2022-01-21T17:41:20.000Z | examples/completion.py | vonshednob/cursedspace | 0ce43302a76fd1a9e0688994f3704515b44fa95a | [
"MIT"
] | 2 | 2022-01-11T13:29:15.000Z | 2022-02-11T13:22:43.000Z | #!/usr/bin/env python3
import curses
from cursedspace import Application, Key, InputLine
from cursedspace import SingleWordCompletionWrapper, Completion
class DemoApplication(Application):
def __init__(self):
super().__init__()
self.input = None
def main(self):
words = [Completion.Su... | 27.309524 | 77 | 0.518745 |
87f7f820fb4d05bcce525f4108f52f9786b56801 | 2,907 | py | Python | conanfile.py | vpicaver/qlibssh2 | de2e0bcb362fd91ddb72a8350385110d3b55113c | [
"MIT"
] | 15 | 2021-01-06T19:52:10.000Z | 2022-03-14T02:03:52.000Z | conanfile.py | vpicaver/qlibssh2 | de2e0bcb362fd91ddb72a8350385110d3b55113c | [
"MIT"
] | 9 | 2021-01-02T22:30:30.000Z | 2021-07-18T12:27:49.000Z | conanfile.py | vpicaver/qlibssh2 | de2e0bcb362fd91ddb72a8350385110d3b55113c | [
"MIT"
] | 3 | 2021-04-05T12:55:50.000Z | 2021-09-09T06:52:05.000Z | from conans import ConanFile, CMake
import os
class Qlibssh2Conan(ConanFile):
name = "qlibssh2"
license = "MIT"
url = "https://github.com/Jeruntu/qlibssh2"
author = "Jeroen Oomkes (jeruntu@gmail.com)"
description = "Qt wrapper for libssh2"
topics = ("ssh", "ssh2", "qt")
settings = "os", "co... | 33.034091 | 102 | 0.566219 |
e1697591abe8c86e20a6f461022dc7c25b79f63a | 1,054 | py | Python | django_airavata/apps/auth/models.py | sairohithA007/airavata-django-portal | fe18d65802f02c9faf805c8edfdee3341c66e93a | [
"Apache-2.0"
] | null | null | null | django_airavata/apps/auth/models.py | sairohithA007/airavata-django-portal | fe18d65802f02c9faf805c8edfdee3341c66e93a | [
"Apache-2.0"
] | 1 | 2019-03-06T17:36:43.000Z | 2019-03-19T14:03:39.000Z | django_airavata/apps/auth/models.py | sairohithA007/airavata-django-portal | fe18d65802f02c9faf805c8edfdee3341c66e93a | [
"Apache-2.0"
] | null | null | null | import uuid
from django.db import models
VERIFY_EMAIL_TEMPLATE = 1
NEW_USER_EMAIL_TEMPLATE = 2
class EmailVerification(models.Model):
username = models.CharField(max_length=64)
verification_code = models.CharField(
max_length=36, unique=True, default=uuid.uuid4)
created_date = models.DateTimeFie... | 31 | 61 | 0.717268 |
cdcee5f8ca1ba4ce04dd3f91c23ddb60345e9d8f | 2,223 | py | Python | stellar_sdk/xdr/create_account_result_code.py | MartinThoma/py-stellar-base | 07ab28cde7a7040f2262b224f9af8a3416c0e5ab | [
"Apache-2.0"
] | 341 | 2015-10-06T20:56:19.000Z | 2022-03-23T15:58:54.000Z | stellar_sdk/xdr/create_account_result_code.py | MartinThoma/py-stellar-base | 07ab28cde7a7040f2262b224f9af8a3416c0e5ab | [
"Apache-2.0"
] | 479 | 2015-11-09T18:39:40.000Z | 2022-03-16T06:46:58.000Z | stellar_sdk/xdr/create_account_result_code.py | MartinThoma/py-stellar-base | 07ab28cde7a7040f2262b224f9af8a3416c0e5ab | [
"Apache-2.0"
] | 181 | 2015-10-01T23:00:59.000Z | 2022-03-05T13:42:19.000Z | # This is an automatically generated file.
# DO NOT EDIT or your changes may be overwritten
import base64
from enum import IntEnum
from xdrlib import Packer, Unpacker
from ..__version__ import __issues__
from ..exceptions import ValueError
__all__ = ["CreateAccountResultCode"]
class CreateAccountResultCode(IntEnum)... | 31.757143 | 115 | 0.632479 |
aeda937ccd2d1b9e7e9f47aaa1539236476c44f3 | 214 | py | Python | Section 9/filecpickle1.py | PacktPublishing/Learning-Python-v- | 30fb28dfaaa18815f1b4c0b683e8839da223b195 | [
"MIT"
] | 1 | 2021-10-05T19:45:43.000Z | 2021-10-05T19:45:43.000Z | Section 9/filecpickle1.py | PacktPublishing/Learning-Python-v- | 30fb28dfaaa18815f1b4c0b683e8839da223b195 | [
"MIT"
] | null | null | null | Section 9/filecpickle1.py | PacktPublishing/Learning-Python-v- | 30fb28dfaaa18815f1b4c0b683e8839da223b195 | [
"MIT"
] | 2 | 2020-09-25T19:56:46.000Z | 2021-09-02T11:14:28.000Z | import cPickle as pickle
name = ["mohit","bhaskar", "manish"]
skill = ["Python", "Python", "Java"]
pickle_file = open("emp1.dat","w")
pickle.dump(name,pickle_file)
pickle.dump(skill,pickle_file)
pickle_file.close() | 30.571429 | 36 | 0.719626 |
4c60c2d94cefa739dc68113bc1fe8e967a8030f3 | 2,433 | py | Python | codeforcesChecker/checker.py | elishahyousaf/Awesome-Python-Scripts | d516584517de2d94de60852f73d8f1831524fa19 | [
"MIT"
] | 1,026 | 2018-10-02T18:51:12.000Z | 2022-03-31T13:45:14.000Z | codeforcesChecker/checker.py | elishahyousaf/Awesome-Python-Scripts | d516584517de2d94de60852f73d8f1831524fa19 | [
"MIT"
] | 164 | 2018-10-02T18:37:40.000Z | 2021-11-18T13:29:54.000Z | codeforcesChecker/checker.py | elishahyousaf/Awesome-Python-Scripts | d516584517de2d94de60852f73d8f1831524fa19 | [
"MIT"
] | 521 | 2018-10-02T18:15:40.000Z | 2022-03-26T12:10:15.000Z | """
Written by: Jinesh Parakh
This is a checker script which compiles and runs the C++ code that you have written and checks it's accuracy with all the sample inputs and outputs scrapped using the main.py script
"""
#import necessary ibraries or modules
import os
import filecmp
import sys
from termcolor import colored... | 34.757143 | 181 | 0.640362 |
d9fb3cee6f2166d89cdf1067c522473ade7bc93f | 3,792 | py | Python | python/rds_vpc_public_subnet.py | viswadevops/aws-config-rules | 70a5785a841957462c7f9efc797d09a2e9dfba05 | [
"CC0-1.0"
] | null | null | null | python/rds_vpc_public_subnet.py | viswadevops/aws-config-rules | 70a5785a841957462c7f9efc797d09a2e9dfba05 | [
"CC0-1.0"
] | null | null | null | python/rds_vpc_public_subnet.py | viswadevops/aws-config-rules | 70a5785a841957462c7f9efc797d09a2e9dfba05 | [
"CC0-1.0"
] | null | null | null | # Description: Check that no RDS Instances are in Public Subnet
#
# Trigger Type: Change Triggered
# Scope of Changes: RDS:DBInstance
# Accepted Parameters: None
# Your Lambda function execution role will need to have a policy that provides the appropriate
# permissions. Here is a policy that you can consider. You sh... | 35.773585 | 113 | 0.563819 |
5c117deaaeac39c8df858da2971e88b7c6e7c35d | 1,600 | py | Python | manage.py | elatomo/api-pycon2015 | 4a315fcda2c264f5ce0fedf664ffbd23448df71b | [
"MIT"
] | 175 | 2015-03-09T01:38:27.000Z | 2022-01-10T21:22:52.000Z | manage.py | elatomo/api-pycon2015 | 4a315fcda2c264f5ce0fedf664ffbd23448df71b | [
"MIT"
] | 7 | 2015-05-27T23:02:32.000Z | 2021-11-29T10:56:04.000Z | manage.py | elatomo/api-pycon2015 | 4a315fcda2c264f5ce0fedf664ffbd23448df71b | [
"MIT"
] | 60 | 2015-03-16T04:10:21.000Z | 2021-11-28T04:27:00.000Z | #!/usr/bin/env python
from flask import Flask, g, jsonify
from flask.ext.script import Manager
from api.app import create_app
from api.models import db, User, Class
manager = Manager(create_app)
@manager.command
def createdb(testdata=False):
app = create_app()
with app.app_context():
db.drop_all()
... | 28.070175 | 76 | 0.59625 |
96b207cbdbc5e3d05f47f56b5a7aa60c4a124f4f | 2,418 | py | Python | dual_tb9051ftg_rpi.py | dakoner/rpi_balance_bot | 7ca013924c486548f6a87ae30cce5ff5e0082c0f | [
"BSD-3-Clause"
] | 4 | 2019-12-22T03:33:22.000Z | 2020-09-07T14:36:32.000Z | dual_tb9051ftg_rpi.py | pololu/dual-tb9051ftg-motor-driver-rpi | 4496583444e4a4d37c081b6d59bd78bfcbfaf912 | [
"MIT"
] | null | null | null | dual_tb9051ftg_rpi.py | pololu/dual-tb9051ftg-motor-driver-rpi | 4496583444e4a4d37c081b6d59bd78bfcbfaf912 | [
"MIT"
] | null | null | null | import pigpio
_pi = pigpio.pi()
if not _pi.connected:
raise IOError("Can't connect to pigpio")
# Motor speeds for this library are specified as numbers between -MAX_SPEED and
# MAX_SPEED, inclusive.
# This has a value of 480 for historical reasons/to maintain compatibility with
# older libraries for other Pololu ... | 26.866667 | 83 | 0.65426 |
3b2d2597d0cec875a854362277a47ba13651f874 | 4,483 | py | Python | PaddleNLP/lexical_analysis/predict.py | suytingwan/models | ccdbfe77d071cc19b55fb9f4b738912e35d982ef | [
"Apache-2.0"
] | 5 | 2021-09-28T13:28:01.000Z | 2021-12-21T07:25:44.000Z | PaddleNLP/lexical_analysis/predict.py | suytingwan/models | ccdbfe77d071cc19b55fb9f4b738912e35d982ef | [
"Apache-2.0"
] | 1 | 2019-11-18T03:03:37.000Z | 2019-11-18T03:03:37.000Z | PaddleNLP/lexical_analysis/predict.py | suytingwan/models | ccdbfe77d071cc19b55fb9f4b738912e35d982ef | [
"Apache-2.0"
] | 3 | 2021-09-28T15:33:45.000Z | 2021-09-29T01:44:32.000Z | # -*- coding: UTF-8 -*-
# Copyright (c) 2019 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
#
... | 32.485507 | 83 | 0.665849 |
f08e35340ab6d9fb4670416579dfab1b90d83b0c | 1,432 | py | Python | src/callbacks/utils.py | WilliamAshbee/segmentation | aeb2b57faa77eac62fc30ed0222f3b8264bd888f | [
"Apache-2.0"
] | 35 | 2019-04-23T19:59:52.000Z | 2021-09-15T06:22:01.000Z | src/callbacks/utils.py | catalyst-team/segmentator | eaa89af4f233ed40ce35cf0743507beec49e3a23 | [
"Apache-2.0"
] | 37 | 2019-06-19T05:58:23.000Z | 2021-07-30T05:50:18.000Z | src/callbacks/utils.py | catalyst-team/segmentator | eaa89af4f233ed40ce35cf0743507beec49e3a23 | [
"Apache-2.0"
] | 11 | 2019-09-16T14:38:58.000Z | 2021-05-12T02:59:37.000Z | from typing import List # isort:skip
import numpy as np
from skimage.color import label2rgb
import torch
def encode_mask_with_color(
semantic_masks: torch.Tensor, threshold: float = 0.5
) -> List[np.ndarray]:
"""
Compare each channel of the `mask` with the `threshold`
and encode the result with the... | 27.018868 | 75 | 0.662709 |
065dcd90b8d76a3cde415b173a7af7d867e402c8 | 152,074 | py | Python | pandas/core/index.py | ivanliu1989/pandas | 5bbe99e7cd26651e9ecb4ab59a4cdcd335535874 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | pandas/core/index.py | ivanliu1989/pandas | 5bbe99e7cd26651e9ecb4ab59a4cdcd335535874 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | pandas/core/index.py | ivanliu1989/pandas | 5bbe99e7cd26651e9ecb4ab59a4cdcd335535874 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | # pylint: disable=E1101,E1103,W0232
import datetime
import warnings
import operator
from functools import partial
from pandas.compat import range, zip, lrange, lzip, u, reduce
from pandas import compat
import numpy as np
import pandas.tslib as tslib
import pandas.lib as lib
import pandas.algos as _algos
import pandas.... | 33.73425 | 120 | 0.549627 |
cd72704d7cc4428186b90e9bd74a24c81865b9dc | 502 | py | Python | setup.py | zpoint/model-compressor | 52aea3f8157cb236fa8ee3b697a9c5ae93e9bcb5 | [
"MIT"
] | null | null | null | setup.py | zpoint/model-compressor | 52aea3f8157cb236fa8ee3b697a9c5ae93e9bcb5 | [
"MIT"
] | null | null | null | setup.py | zpoint/model-compressor | 52aea3f8157cb236fa8ee3b697a9c5ae93e9bcb5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from distutils.core import setup, Extension
model_compressor = [Extension('core', sources=['./core/compress/compressor.cpp'], extra_compile_args=['-std=c++11'])]
setup(name='model_compressor',
version='1.0',
description='compressor json like orm models to binary format',
ext_... | 33.466667 | 117 | 0.675299 |
256b55e5e5065ca629ba126a698c35d7fc647965 | 1,514 | py | Python | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/iotcore/apis/ImportThingModelRequest.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 14 | 2018-04-19T09:53:56.000Z | 2022-01-27T06:05:48.000Z | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/iotcore/apis/ImportThingModelRequest.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 15 | 2018-09-11T05:39:54.000Z | 2021-07-02T12:38:02.000Z | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/iotcore/apis/ImportThingModelRequest.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 33 | 2018-04-20T05:29:16.000Z | 2022-02-17T09:10:05.000Z | # coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# 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 ... | 31.541667 | 130 | 0.712021 |
f33eafa5d06e325bd99a8e57372c262283f735f9 | 1,607 | py | Python | test/lyrics_download_samples.py | jcassette/beets | 10338c2a601c28289cd30debf2537b3523d95446 | [
"MIT"
] | 7,731 | 2016-01-09T14:51:33.000Z | 2022-03-31T14:08:35.000Z | test/lyrics_download_samples.py | jcassette/beets | 10338c2a601c28289cd30debf2537b3523d95446 | [
"MIT"
] | 2,465 | 2016-01-09T04:46:05.000Z | 2022-03-31T20:32:30.000Z | test/lyrics_download_samples.py | jcassette/beets | 10338c2a601c28289cd30debf2537b3523d95446 | [
"MIT"
] | 1,586 | 2016-01-11T13:03:48.000Z | 2022-03-28T01:50:06.000Z | # This file is part of beets.
# Copyright 2016, Fabrice Laporte
#
# 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, ... | 28.192982 | 74 | 0.667704 |
85c6d54f35dcaa5ad6bf0e67013c180826dd0367 | 1,167 | py | Python | tests/test_loader_semaphore.py | dylanbuchi/MONAI | 1651f1b003b0ffae8b615d191952ad65ad091277 | [
"Apache-2.0"
] | 2,971 | 2019-10-16T23:53:16.000Z | 2022-03-31T20:58:24.000Z | tests/test_loader_semaphore.py | dylanbuchi/MONAI | 1651f1b003b0ffae8b615d191952ad65ad091277 | [
"Apache-2.0"
] | 2,851 | 2020-01-10T16:23:44.000Z | 2022-03-31T22:14:53.000Z | tests/test_loader_semaphore.py | dylanbuchi/MONAI | 1651f1b003b0ffae8b615d191952ad65ad091277 | [
"Apache-2.0"
] | 614 | 2020-01-14T19:18:01.000Z | 2022-03-31T14:06:14.000Z | # Copyright 2020 - 2021 MONAI Consortium
# 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... | 24.829787 | 74 | 0.706941 |
0382627818b33819f56bdb93c8d032d86430d6e0 | 1,525 | py | Python | aliyun-python-sdk-airec/aliyunsdkairec/request/v20201126/ValidateInstanceRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-airec/aliyunsdkairec/request/v20201126/ValidateInstanceRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-airec/aliyunsdkairec/request/v20201126/ValidateInstanceRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 39.102564 | 79 | 0.769836 |
41e9e9a0d02a3f1261882b2eee84fb22f4746a6c | 2,753 | py | Python | PytorchCudaOpExtension/perspective_aware_conv2d/pad_conv2d_wrapper.py | Zhaoyi-Yan/PFDNet | 86798fbc4fadc673e7912c08492ea3611bc20154 | [
"MIT"
] | 4 | 2021-07-12T00:00:30.000Z | 2022-01-26T12:05:50.000Z | PytorchCudaOpExtension/perspective_aware_conv2d/pad_conv2d_wrapper.py | Zhaoyi-Yan/PFDNet | 86798fbc4fadc673e7912c08492ea3611bc20154 | [
"MIT"
] | 2 | 2021-01-07T03:29:48.000Z | 2021-07-12T07:41:58.000Z | PytorchCudaOpExtension/perspective_aware_conv2d/pad_conv2d_wrapper.py | Zhaoyi-Yan/PFDNet | 86798fbc4fadc673e7912c08492ea3611bc20154 | [
"MIT"
] | 3 | 2021-07-12T00:00:32.000Z | 2022-03-09T07:08:46.000Z | import torch
import torch.nn as nn
from torch.autograd import Function
from torch.nn import Module
import pad_conv2d_gpu as pad_conv2d
from adaptive_sigmoid.adaptive_sigmoid_wrapper import AdaptiveSigmoid
class PerspectiveDilatedConv2dFunction(Function):
@staticmethod
def forward(ctx, *args):
if len(a... | 43.015625 | 156 | 0.697421 |
9014bd33558bfcc3fc310c897538d84d7b08b2b9 | 13,076 | py | Python | code/python/FactSetGeoRev/v1/fds/sdk/FactSetGeoRev/model/country_response.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 6 | 2022-02-07T16:34:18.000Z | 2022-03-30T08:04:57.000Z | code/python/FactSetGeoRev/v1/fds/sdk/FactSetGeoRev/model/country_response.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 2 | 2022-02-07T05:25:57.000Z | 2022-03-07T14:18:04.000Z | code/python/FactSetGeoRev/v1/fds/sdk/FactSetGeoRev/model/country_response.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | null | null | null | """
FactSet GeoRev API
FactSet Revere Geographic Revenue (\"GeoRev\") Exposure data provides a highly structured and normalized display of companies’ revenues by geography. Using a four level taxonomy structure, understand the companies' Super-Region-->Region-->Area-->Country revenue breakdowns. Quickly unders... | 49.718631 | 1,875 | 0.605307 |
b172d9a707f952b993e8b93967d07bd76a963d60 | 8,742 | py | Python | billiard/compat.py | faheel/billiard | 0e4e7f58618e703e56f1fad2f73076dc1af20ce6 | [
"BSD-3-Clause"
] | 5,079 | 2015-01-01T03:39:46.000Z | 2022-03-31T07:38:22.000Z | desktop/core/ext-py/billiard-3.5.0.5/billiard/compat.py | zks888/hue | 93a8c370713e70b216c428caa2f75185ef809deb | [
"Apache-2.0"
] | 1,623 | 2015-01-01T08:06:24.000Z | 2022-03-30T19:48:52.000Z | desktop/core/ext-py/billiard-3.5.0.5/billiard/compat.py | zks888/hue | 93a8c370713e70b216c428caa2f75185ef809deb | [
"Apache-2.0"
] | 2,033 | 2015-01-04T07:18:02.000Z | 2022-03-28T19:55:47.000Z | from __future__ import absolute_import
import errno
import numbers
import os
import sys
from .five import range, zip_longest
if sys.platform == 'win32':
try:
import _winapi # noqa
except ImportError: # pragma: no cover
from _multiprocessing import win32 as _winapi ... | 28.291262 | 79 | 0.584191 |
06766b319e0a4b89c36d83b65c9933710db8e267 | 2,226 | py | Python | DBmanagement_scripts/populate_archvie.py | cemac/SWIFTDB | 5c6bc0ae4ff674c2eede44783ca1738630d97ebb | [
"MIT"
] | 2 | 2020-07-14T14:14:45.000Z | 2021-05-13T13:01:51.000Z | DBmanagement_scripts/populate_archvie.py | cemac-tech/SWIFTDB | 5c6bc0ae4ff674c2eede44783ca1738630d97ebb | [
"MIT"
] | 18 | 2019-02-07T10:28:19.000Z | 2020-06-18T18:31:41.000Z | DBmanagement_scripts/populate_archvie.py | cemac-tech/SWIFTDB | 5c6bc0ae4ff674c2eede44783ca1738630d97ebb | [
"MIT"
] | 1 | 2019-03-25T14:54:26.000Z | 2019-03-25T14:54:26.000Z | """
Run locally using:
$ python populatePSQL.py
Run on Heroku using:
$ heroku run python populatePSQL.py
Based off populatePSQL.py but adapted to leave partners and work_packages
intact
This will populate the database with initial data contained within the .tab
files, thus avoiding the administrator having to input a... | 32.735294 | 79 | 0.645553 |
80ab2a817eb4d329338d0e0f80ea59b345e4fbd9 | 1,724 | py | Python | setup.py | seLain/UCFrame | 67bc5bcc032726d49e5f5cc545706c85f9948259 | [
"MIT"
] | null | null | null | setup.py | seLain/UCFrame | 67bc5bcc032726d49e5f5cc545706c85f9948259 | [
"MIT"
] | 3 | 2018-02-15T15:51:03.000Z | 2018-02-20T13:58:28.000Z | setup.py | seLain/UCFrame | 67bc5bcc032726d49e5f5cc545706c85f9948259 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#quickstarted Options:
#
# sqlalchemy: True
# auth: sqlalchemy
# mako: False
#
#
#This is just a work-around for a Python2.7 issue causing
#interpreter crash at exit when trying to log an info message.
try:
import logging
import multiprocessing
except:
pass
import sys
p... | 22.684211 | 62 | 0.559165 |
6fd1eaf24bd6e7dae838d7a6704f5cc1bbbae049 | 971 | py | Python | tests/test_pipe.py | HappyEinara/wingline | 08d67ad9f58c869c385f954def6af5fa92e968ff | [
"MIT"
] | null | null | null | tests/test_pipe.py | HappyEinara/wingline | 08d67ad9f58c869c385f954def6af5fa92e968ff | [
"MIT"
] | null | null | null | tests/test_pipe.py | HappyEinara/wingline | 08d67ad9f58c869c385f954def6af5fa92e968ff | [
"MIT"
] | null | null | null | """Test the pipeline."""
from pytest_cases import fixture
import wingline
from wingline.types import PayloadIterator
def add_one(parent: PayloadIterator) -> PayloadIterator:
"""Add one to the value of each key."""
for payload in parent:
yield {k: v + 1 for (k, v) in payload.items()}
@fixture
def... | 20.229167 | 72 | 0.61277 |
c47a594911f4988924c7ca217ee07598149e6092 | 3,301 | py | Python | bqtoolkit/partition.py | schmidtfederico/bqtoolkit | 2c471c4ffc79554027864fa1a843d12e1e87c2e0 | [
"MIT"
] | null | null | null | bqtoolkit/partition.py | schmidtfederico/bqtoolkit | 2c471c4ffc79554027864fa1a843d12e1e87c2e0 | [
"MIT"
] | 1 | 2020-12-16T20:39:05.000Z | 2020-12-17T19:25:05.000Z | bqtoolkit/partition.py | schmidtfederico/bqtoolkit | 2c471c4ffc79554027864fa1a843d12e1e87c2e0 | [
"MIT"
] | null | null | null | import re
from google.cloud.exceptions import Conflict, NotFound
from bqtoolkit.table import BQTable, _TABLE_PATH_REGEX
import bqtoolkit._helpers
_PARTITION_PATH_REGEX = re.compile(
_TABLE_PATH_REGEX.pattern + r'\$(?P<partition_id>[\w]+)'
)
class BQPartition(object):
def __init__(self, table, partition_id... | 30.284404 | 120 | 0.663435 |
559688a43ea7e82b04d9f2960a28699a40e2e68a | 13,228 | py | Python | main.py | smartdolphin/naver-image-retrieval | 6b43768329d16cef7bfb2dd4c8530fde5c683376 | [
"Unlicense"
] | null | null | null | main.py | smartdolphin/naver-image-retrieval | 6b43768329d16cef7bfb2dd4c8530fde5c683376 | [
"Unlicense"
] | null | null | null | main.py | smartdolphin/naver-image-retrieval | 6b43768329d16cef7bfb2dd4c8530fde5c683376 | [
"Unlicense"
] | null | null | null | # -*- coding: utf_8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import cv2
import h5py
import argparse
import pickle
import itertools
import nsml
import numpy as np
import tqdm
from nsml import DATASET_PATH
import tensorflow as tf
import... | 39.486567 | 142 | 0.572876 |
2b042accb04bb632c631bfa976d3cf2398f4cb71 | 541 | py | Python | yatube/posts/migrations/0018_auto_20210828_1733.py | DeffronMax/Deploy14 | 0c5aac458240f254648f9ad284584bcc55b99431 | [
"MIT"
] | null | null | null | yatube/posts/migrations/0018_auto_20210828_1733.py | DeffronMax/Deploy14 | 0c5aac458240f254648f9ad284584bcc55b99431 | [
"MIT"
] | null | null | null | yatube/posts/migrations/0018_auto_20210828_1733.py | DeffronMax/Deploy14 | 0c5aac458240f254648f9ad284584bcc55b99431 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.6 on 2021-08-28 14:33
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('posts', '0017_auto_20210828_1727'),
]
operations = [
migrations.AlterModelOptions(
name='post',
options={'ordering': ['-pub_... | 23.521739 | 104 | 0.571165 |
9fc0f661df54cd7857491e8d4b2f8fb0e5afd5f6 | 19,286 | py | Python | train/new_train.py | zeroAska/TFSegmentation | 790b627506e18b427801a4911cf20944aa6a4bf1 | [
"Apache-2.0"
] | 633 | 2018-03-08T13:45:21.000Z | 2022-03-28T11:33:41.000Z | train/new_train.py | zeroAska/TFSegmentation | 790b627506e18b427801a4911cf20944aa6a4bf1 | [
"Apache-2.0"
] | 82 | 2018-03-08T18:59:03.000Z | 2022-03-11T23:18:17.000Z | train/new_train.py | zeroAska/TFSegmentation | 790b627506e18b427801a4911cf20944aa6a4bf1 | [
"Apache-2.0"
] | 182 | 2018-03-09T01:03:20.000Z | 2022-01-14T02:49:59.000Z | """
New trainer faster than ever
"""
from metrics.metrics import Metrics
from utils.reporter import Reporter
from utils.misc import timeit
from tqdm import tqdm
import numpy as np
import tensorflow as tf
import matplotlib
import time
matplotlib.use('Agg')
import matplotlib.pyplot as plt
class NewTrain(object):
... | 42.386813 | 120 | 0.551177 |
b7a21c433b1443983fb7c4be0e107eb23a5a41ee | 477 | py | Python | apps/accounts/migrations/0014_auto_20161025_0006.py | dtisza1/bluebutton-web-server | 6322f28d75bd9e00f8dc4b5988a0cd5f7c6c80cb | [
"Apache-2.0"
] | 25 | 2017-12-10T00:48:31.000Z | 2022-03-25T01:29:13.000Z | apps/accounts/migrations/0014_auto_20161025_0006.py | dtisza1/bluebutton-web-server | 6322f28d75bd9e00f8dc4b5988a0cd5f7c6c80cb | [
"Apache-2.0"
] | 298 | 2017-12-05T05:53:32.000Z | 2022-03-21T19:29:03.000Z | apps/accounts/migrations/0014_auto_20161025_0006.py | dtisza1/bluebutton-web-server | 6322f28d75bd9e00f8dc4b5988a0cd5f7c6c80cb | [
"Apache-2.0"
] | 31 | 2017-12-04T16:01:12.000Z | 2021-09-26T22:34:55.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-10-25 00:06
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0013_auto_20161024_0316'),
]
operations = [
migrations.AlterFiel... | 22.714286 | 63 | 0.631027 |
fc2abf5edc0701e9eaea106c11cf0070d9be2dfc | 1,397 | py | Python | indy_node/test/upgrade/test_node_upgrade_rescheduled_view_change.py | rantwijk/indy-node | 3cb77dab5482c8b721535020fec41506de819d2e | [
"Apache-2.0"
] | 1 | 2020-07-31T19:42:53.000Z | 2020-07-31T19:42:53.000Z | indy_node/test/upgrade/test_node_upgrade_rescheduled_view_change.py | rantwijk/indy-node | 3cb77dab5482c8b721535020fec41506de819d2e | [
"Apache-2.0"
] | null | null | null | indy_node/test/upgrade/test_node_upgrade_rescheduled_view_change.py | rantwijk/indy-node | 3cb77dab5482c8b721535020fec41506de819d2e | [
"Apache-2.0"
] | null | null | null | import dateutil
from indy_common.constants import APP_NAME
from indy_node.server.upgrade_log import UpgradeLog
from indy_node.test.upgrade.helper import emulate_view_change_pool_for_upgrade, count_action_log_package
whitelist = ['unable to send message']
# TODO: Implement a client in node
def test_scheduled_once_... | 42.333333 | 104 | 0.744452 |
539a5fdb2262df7450242ebeedf5ef19b3310ef3 | 40 | py | Python | agent/bot/tasks/__init__.py | sgrimaldi93/Loki | c749cf11e72dc27733cce76dbd14a60b8ba3a024 | [
"MIT"
] | 1 | 2020-01-23T21:57:19.000Z | 2020-01-23T21:57:19.000Z | agent/bot/tasks/__init__.py | sgrimaldi93/Loki | c749cf11e72dc27733cce76dbd14a60b8ba3a024 | [
"MIT"
] | null | null | null | agent/bot/tasks/__init__.py | sgrimaldi93/Loki | c749cf11e72dc27733cce76dbd14a60b8ba3a024 | [
"MIT"
] | 1 | 2021-08-13T07:18:39.000Z | 2021-08-13T07:18:39.000Z | # Date: 09/27/2018
# Author: Pure-L0G1C
| 13.333333 | 20 | 0.675 |
5b912546b4cb22f7728e9ac38ce5007918f28275 | 13,719 | py | Python | main.py | ckodser/a_robust_subnetwork_hiddes | 171b43dc7b4446ba722a4c51c52bf561f77e5c55 | [
"Apache-2.0"
] | null | null | null | main.py | ckodser/a_robust_subnetwork_hiddes | 171b43dc7b4446ba722a4c51c52bf561f77e5c55 | [
"Apache-2.0"
] | null | null | null | main.py | ckodser/a_robust_subnetwork_hiddes | 171b43dc7b4446ba722a4c51c52bf561f77e5c55 | [
"Apache-2.0"
] | null | null | null | import os
import pathlib
import random
import time
from torch.utils.tensorboard import SummaryWriter
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.backends.cudnn as cudnn
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
from utils.conv_type import FixedSubnetCo... | 30.76009 | 154 | 0.592609 |
98a2a37ae370966bc2e8a60ad5bb79b3329d63c7 | 715 | py | Python | app/src/__init__.py | Andrea-MariaDB/Flask-REST-Server-Repository | f5d1ceffeb3456b200b90e4f05d7430aa3f1eea4 | [
"MIT"
] | 5 | 2019-09-18T11:48:16.000Z | 2021-11-09T11:24:12.000Z | app/src/__init__.py | Andrea-MariaDB/Flask-REST-Server-Repository | f5d1ceffeb3456b200b90e4f05d7430aa3f1eea4 | [
"MIT"
] | 11 | 2019-09-13T07:14:25.000Z | 2021-06-02T00:54:06.000Z | app/src/__init__.py | Andrea-MariaDB/Flask-REST-Server-Repository | f5d1ceffeb3456b200b90e4f05d7430aa3f1eea4 | [
"MIT"
] | 3 | 2019-10-11T09:36:04.000Z | 2019-12-20T10:17:32.000Z | """
App factory for our server.
"""
import os
import pathlib
from dotenv import load_dotenv
from flask import Flask
from app.src.config import CFG_MAP
load_dotenv(dotenv_path=str(pathlib.Path.cwd() / ".env"), verbose=True)
def create_app(cfg):
"""
App factory to create app instance with provided environme... | 22.34375 | 74 | 0.716084 |
fd5b9186c28970e4698fe12bd63669877b9e6463 | 45,291 | py | Python | src/transformers/models/speech_to_text_2/modeling_speech_to_text_2.py | shangz-ai/transformers | 75259b44bf2e2b98b5a4d431fb400b7190342a01 | [
"Apache-2.0"
] | null | null | null | src/transformers/models/speech_to_text_2/modeling_speech_to_text_2.py | shangz-ai/transformers | 75259b44bf2e2b98b5a4d431fb400b7190342a01 | [
"Apache-2.0"
] | null | null | null | src/transformers/models/speech_to_text_2/modeling_speech_to_text_2.py | shangz-ai/transformers | 75259b44bf2e2b98b5a4d431fb400b7190342a01 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2021 The Fairseq Authors and The HuggingFace Inc. team. 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/... | 46.885093 | 150 | 0.656157 |
2d292de7e43ee1d333b660dde5d79c2d52db9c0b | 694 | py | Python | week5/lecture10/MITPerson.py | nobodysshadow/edX_MITx_6.00.1x | d2e5ab0bd9951153ddc5fa09f01425c54854178e | [
"MIT"
] | 1 | 2021-07-17T03:43:26.000Z | 2021-07-17T03:43:26.000Z | week5/lecture10/MITPerson.py | nobodysshadow/edX_MITx_6.00.1x | d2e5ab0bd9951153ddc5fa09f01425c54854178e | [
"MIT"
] | null | null | null | week5/lecture10/MITPerson.py | nobodysshadow/edX_MITx_6.00.1x | d2e5ab0bd9951153ddc5fa09f01425c54854178e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed May 18 08:10:59 2016
@author: ericgrimson
"""
class MITPerson(Person):
nextIdNum = 0 # next ID number to assign
def __init__(self, name):
Person.__init__(self, name) # initialize Person attributes
# new MITPerson attribute: a unique ID number
... | 23.133333 | 66 | 0.62536 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.