hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | 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 248 | max_issues_repo_name stringlengths 5 125 | 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 248 | max_forks_repo_name stringlengths 5 125 | 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 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6a7ef877f9a75af565239a4f498da3558863fc35 | 7,766 | py | Python | tensorflow/contrib/data/python/kernel_tests/optimization/map_and_filter_fusion_test.py | Smokrow/tensorflow | debd66dae1c9a49d36ea006c97facf06b4ac25cb | [
"Apache-2.0"
] | 1 | 2018-09-08T08:26:31.000Z | 2018-09-08T08:26:31.000Z | tensorflow/contrib/data/python/kernel_tests/optimization/map_and_filter_fusion_test.py | Smokrow/tensorflow | debd66dae1c9a49d36ea006c97facf06b4ac25cb | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/data/python/kernel_tests/optimization/map_and_filter_fusion_test.py | Smokrow/tensorflow | debd66dae1c9a49d36ea006c97facf06b4ac25cb | [
"Apache-2.0"
] | 1 | 2020-02-15T14:34:36.000Z | 2020-02-15T14:34:36.000Z | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 34.515556 | 80 | 0.638424 | 6,484 | 0.834921 | 0 | 0 | 5,181 | 0.667139 | 0 | 0 | 1,192 | 0.15349 |
6a7f52df743becc0516c5282308cd0c5db04737d | 16,979 | py | Python | meerk40t/lihuiyu/lihuiyuemulator.py | jpirnay/meerk40t | 10d4e41a8c5e2bb95a504904273699e115822b9b | [
"MIT"
] | null | null | null | meerk40t/lihuiyu/lihuiyuemulator.py | jpirnay/meerk40t | 10d4e41a8c5e2bb95a504904273699e115822b9b | [
"MIT"
] | null | null | null | meerk40t/lihuiyu/lihuiyuemulator.py | jpirnay/meerk40t | 10d4e41a8c5e2bb95a504904273699e115822b9b | [
"MIT"
] | null | null | null | from meerk40t.core.cutcode import CutCode, RawCut
from meerk40t.core.parameters import Parameters
from meerk40t.core.units import UNITS_PER_MIL
from meerk40t.kernel import Module
from meerk40t.numpath import Numpath
from meerk40t.svgelements import Color
class LihuiyuEmulator(Module):
def __init__(self, context, ... | 32.777992 | 118 | 0.52777 | 16,712 | 0.984275 | 165 | 0.009718 | 1,547 | 0.091113 | 0 | 0 | 1,703 | 0.1003 |
6a7f701b1440f625bfec8817f0a39a899231c69f | 105,704 | py | Python | tencentcloud/dbbrain/v20210527/models.py | lleiyyang/tencentcloud-sdk-python | e6e6a4ce89286673b2322ae92d3c2fbf8665aa0b | [
"Apache-2.0"
] | 465 | 2018-04-27T09:54:59.000Z | 2022-03-29T02:18:01.000Z | tencentcloud/dbbrain/v20210527/models.py | lleiyyang/tencentcloud-sdk-python | e6e6a4ce89286673b2322ae92d3c2fbf8665aa0b | [
"Apache-2.0"
] | 91 | 2018-04-27T09:48:11.000Z | 2022-03-12T08:04:04.000Z | tencentcloud/dbbrain/v20210527/models.py | lleiyyang/tencentcloud-sdk-python | e6e6a4ce89286673b2322ae92d3c2fbf8665aa0b | [
"Apache-2.0"
] | 232 | 2018-05-02T08:02:46.000Z | 2022-03-30T08:02:48.000Z | # -*- coding: utf8 -*-
# Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. 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... | 31.310427 | 195 | 0.597149 | 117,814 | 0.98723 | 0 | 0 | 0 | 0 | 0 | 0 | 59,733 | 0.500536 |
6a7fd9c2a4520acac2ad0d4b073014e3ffeaa218 | 20,152 | py | Python | oauth/provider.py | giuseppe/quay | a1b7e4b51974edfe86f66788621011eef2667e6a | [
"Apache-2.0"
] | 2,027 | 2019-11-12T18:05:48.000Z | 2022-03-31T22:25:04.000Z | oauth/provider.py | giuseppe/quay | a1b7e4b51974edfe86f66788621011eef2667e6a | [
"Apache-2.0"
] | 496 | 2019-11-12T18:13:37.000Z | 2022-03-31T10:43:45.000Z | oauth/provider.py | giuseppe/quay | a1b7e4b51974edfe86f66788621011eef2667e6a | [
"Apache-2.0"
] | 249 | 2019-11-12T18:02:27.000Z | 2022-03-22T12:19:19.000Z | # Ported to Python 3
# Originally from https://github.com/DeprecatedCode/oauth2lib/blob/d161b010f8a596826050a09e5e94d59443cc12d9/oauth2lib/provider.py
import json
import logging
from requests import Response
from io import StringIO
try:
from werkzeug.exceptions import Unauthorized
except ImportError:
Unauthor... | 35.730496 | 129 | 0.654575 | 19,775 | 0.981292 | 0 | 0 | 554 | 0.027491 | 0 | 0 | 9,337 | 0.463329 |
6a811562ddff805b40048018c138048e412a8c98 | 773 | py | Python | main.py | TomHacker/ImageCluster | c4262e08a61c50b6d850ba29bc4d56d21c789aa9 | [
"Apache-2.0"
] | 10 | 2019-04-08T06:46:35.000Z | 2019-10-31T11:10:32.000Z | main.py | HandsomeBrotherShuaiLi/ImageCluster | c4262e08a61c50b6d850ba29bc4d56d21c789aa9 | [
"Apache-2.0"
] | 3 | 2020-06-02T01:24:18.000Z | 2021-05-20T04:53:26.000Z | main.py | HandsomeBrotherShuaiLi/ImageCluster | c4262e08a61c50b6d850ba29bc4d56d21c789aa9 | [
"Apache-2.0"
] | 1 | 2019-05-23T11:08:04.000Z | 2019-05-23T11:08:04.000Z | from model import ImageCluster
m=ImageCluster(
base_model='vgg16',#your feature map extractor model
resorted_img_folder='resorted_data',#the folder for clustered images
cluster_algo='kmeans',#cluster algorithm
base_img_folder='data',
maxK=150,#the max k num is 30, which means ImageCluster calculates... | 36.809524 | 95 | 0.750323 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 576 | 0.745149 |
6a8199a221f44d9fef4df3ccc6d623b0243a377c | 1,058 | py | Python | tests/dummies.py | arvindmuralie77/gradsflow | d6ec5bc517dcf714cd4ecb91a7f702dce6bded3f | [
"Apache-2.0"
] | 253 | 2021-08-17T17:42:25.000Z | 2022-03-25T07:59:41.000Z | tests/dummies.py | arvindmuralie77/gradsflow | d6ec5bc517dcf714cd4ecb91a7f702dce6bded3f | [
"Apache-2.0"
] | 161 | 2021-08-17T16:28:08.000Z | 2022-03-27T02:36:45.000Z | tests/dummies.py | arvindmuralie77/gradsflow | d6ec5bc517dcf714cd4ecb91a7f702dce6bded3f | [
"Apache-2.0"
] | 35 | 2021-08-23T16:26:15.000Z | 2022-03-26T17:08:15.000Z | # Copyright (c) 2021 GradsFlow. 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 ... | 32.060606 | 75 | 0.697543 | 397 | 0.375236 | 0 | 0 | 0 | 0 | 0 | 0 | 645 | 0.609641 |
6a82018dc0f7662911572e4ff805c96d468e9254 | 2,330 | py | Python | JumpscaleCore/tools/executor/ExecutorSerial.py | gneumann333/jumpscaleX_core | 777d249fa3668c6e802c2f765f4b82fb39c3e5fa | [
"Apache-2.0"
] | 1 | 2020-06-21T11:18:52.000Z | 2020-06-21T11:18:52.000Z | JumpscaleCore/tools/executor/ExecutorSerial.py | gneumann333/jumpscaleX_core | 777d249fa3668c6e802c2f765f4b82fb39c3e5fa | [
"Apache-2.0"
] | 644 | 2019-08-25T10:19:56.000Z | 2020-12-23T09:41:04.000Z | JumpscaleCore/tools/executor/ExecutorSerial.py | gneumann333/jumpscaleX_core | 777d249fa3668c6e802c2f765f4b82fb39c3e5fa | [
"Apache-2.0"
] | 11 | 2019-08-29T21:38:50.000Z | 2020-06-21T11:18:55.000Z | from Jumpscale import j
JSBASE = j.baseclasses.object
from .ExecutorBase import *
import serial
class ExecutorSerial(ExecutorBase):
"""
This executor is primary made to communicate with devices (routers, switch, ...) over
console cable but you can use underlaying method to communicate with any serial de... | 27.093023 | 108 | 0.615021 | 2,229 | 0.956652 | 0 | 0 | 131 | 0.056223 | 0 | 0 | 396 | 0.169957 |
6a836399736ccfbfdcec602215566bd6e9ae598c | 2,201 | py | Python | melisa/utils/snowflake.py | MelisaDev/melisa | 53fee10d8c1bf4dd716bc90096c16f096e11bfbf | [
"MIT"
] | 5 | 2022-03-11T19:51:28.000Z | 2022-03-13T16:28:58.000Z | melisa/utils/snowflake.py | jungledev1/melisa | 835e4b644e50b5038599ecbd1bfa510a0d3200e9 | [
"MIT"
] | 2 | 2022-03-19T18:09:39.000Z | 2022-03-23T12:18:49.000Z | melisa/utils/snowflake.py | jungledev1/melisa | 835e4b644e50b5038599ecbd1bfa510a0d3200e9 | [
"MIT"
] | 1 | 2022-03-23T07:30:04.000Z | 2022-03-23T07:30:04.000Z | # Copyright MelisaDev 2022 - Present
# Full MIT License can be found in `LICENSE.txt` at the project root.
from __future__ import annotations
class Snowflake(int):
"""
Discord utilizes Twitter's snowflake format for uniquely identifiable descriptors (IDs).
These IDs are guaranteed to be unique across all... | 30.150685 | 92 | 0.63562 | 2,055 | 0.933667 | 0 | 0 | 994 | 0.451613 | 0 | 0 | 1,203 | 0.54657 |
6a83ea727e6668f4f022e77a641fbd9d212a22e3 | 8,749 | py | Python | feed/serializers/extensions.py | cul-it/arxiv-rss | 40c0e859528119cc8ba3700312cb8df095d95cdd | [
"MIT"
] | 4 | 2020-06-29T15:05:37.000Z | 2022-02-02T10:28:28.000Z | feed/serializers/extensions.py | arXiv/arxiv-feed | 82923d062e2524df94c22490cf936a988559ce66 | [
"MIT"
] | 12 | 2020-03-06T16:45:00.000Z | 2022-03-02T15:36:14.000Z | feed/serializers/extensions.py | cul-it/arxiv-rss | 40c0e859528119cc8ba3700312cb8df095d95cdd | [
"MIT"
] | 2 | 2020-12-06T16:30:06.000Z | 2021-11-05T12:29:08.000Z | """Classes derived from the Feedgen extension classes."""
from typing import Dict, List, Optional
from lxml import etree
from lxml.etree import Element
from flask import current_app
from feedgen.ext.base import BaseEntryExtension, BaseExtension
from feed.domain import Author, Media
class ArxivExtension(BaseExtensio... | 30.590909 | 79 | 0.529318 | 8,455 | 0.966396 | 0 | 0 | 0 | 0 | 0 | 0 | 3,941 | 0.450451 |
6a849b7bcd124ad715f2ce345cebb1f79d3397f0 | 1,132 | py | Python | discovery-infra/test_infra/helper_classes/config/controller_config.py | lranjbar/assisted-test-infra | 89cd4e16744afa646af88975f8038ca1774bcfa4 | [
"Apache-2.0"
] | null | null | null | discovery-infra/test_infra/helper_classes/config/controller_config.py | lranjbar/assisted-test-infra | 89cd4e16744afa646af88975f8038ca1774bcfa4 | [
"Apache-2.0"
] | 30 | 2021-11-15T07:10:49.000Z | 2022-03-28T07:10:26.000Z | discovery-infra/test_infra/helper_classes/config/controller_config.py | lranjbar/assisted-test-infra | 89cd4e16744afa646af88975f8038ca1774bcfa4 | [
"Apache-2.0"
] | null | null | null | from abc import ABC
from pathlib import Path
from typing import Any
from dataclasses import dataclass
from test_infra import consts
from test_infra.utils.global_variables import GlobalVariables
from .base_config import _BaseConfig
global_variables = GlobalVariables()
@dataclass
class BaseNodeConfig(_BaseConfig, AB... | 26.325581 | 63 | 0.719965 | 847 | 0.748233 | 0 | 0 | 858 | 0.757951 | 0 | 0 | 63 | 0.055654 |
6a84b5159878bc48cef9594078edc989fb798f13 | 952 | py | Python | bitcoinpy/mempool.py | obulpathi/bitcoinpy | 8f41e0221f2ff2d35697b6d4e5397deb7de09c3d | [
"MIT"
] | 21 | 2016-01-03T14:52:07.000Z | 2021-08-09T18:05:08.000Z | bitcoinpy/mempool.py | obulpathi/bitcoinpy | 8f41e0221f2ff2d35697b6d4e5397deb7de09c3d | [
"MIT"
] | null | null | null | bitcoinpy/mempool.py | obulpathi/bitcoinpy | 8f41e0221f2ff2d35697b6d4e5397deb7de09c3d | [
"MIT"
] | 15 | 2015-02-07T20:08:11.000Z | 2019-10-03T04:45:45.000Z | # MemPool.py
#
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import logging
from lib.serialize import uint256_to_shortstr
class MemPool(object):
def __init__(self):
self.pool = {}
# setup logging
logging.basicConfi... | 23.8 | 74 | 0.703782 | 730 | 0.766807 | 0 | 0 | 0 | 0 | 0 | 0 | 256 | 0.268908 |
6a84b6d6b4154a68e4e0a9485928b636bf10d1b0 | 13,530 | py | Python | bashspy/parser.py | sarvi/bashspy | 088f2cdfd00d29b4c7a98ec311f6e6c382ba4749 | [
"MIT"
] | null | null | null | bashspy/parser.py | sarvi/bashspy | 088f2cdfd00d29b4c7a98ec311f6e6c382ba4749 | [
"MIT"
] | 1 | 2021-06-12T12:47:44.000Z | 2021-06-12T12:47:44.000Z | bashspy/parser.py | sarvi/bashspy | 088f2cdfd00d29b4c7a98ec311f6e6c382ba4749 | [
"MIT"
] | 1 | 2020-05-18T08:55:14.000Z | 2020-05-18T08:55:14.000Z | '''
Created on Jun 13, 2019
@author: sarvi
'''
from sly import Parser
from .lexer import BashLexer
class ASTCommands(list):
__slots__ = ('grouping')
def __init__(self, command, grouping=None):
self.append(command)
self.grouping = grouping
def __repr__(self):
x=[str(i) for i in s... | 32.760291 | 135 | 0.602882 | 13,124 | 0.969993 | 0 | 0 | 7,448 | 0.55048 | 0 | 0 | 4,150 | 0.306726 |
6a84df704829c829063b750bd4cbc4f7f7261e8a | 1,555 | py | Python | Module03/pregnancy_wheel.py | biomed-bioinformatics-bootcamp/bmes-t580-2019-coursework-charrison620 | 4f53e9290b456f582464c86d114c794c1448b995 | [
"MIT"
] | null | null | null | Module03/pregnancy_wheel.py | biomed-bioinformatics-bootcamp/bmes-t580-2019-coursework-charrison620 | 4f53e9290b456f582464c86d114c794c1448b995 | [
"MIT"
] | null | null | null | Module03/pregnancy_wheel.py | biomed-bioinformatics-bootcamp/bmes-t580-2019-coursework-charrison620 | 4f53e9290b456f582464c86d114c794c1448b995 | [
"MIT"
] | null | null | null | import datetime
def print_header():
print('----------------------------')
print(' Due Date APP ')
print('----------------------------')
print()
def get_lmp_from_patient():
print("When was the patient's last normal menstrual cycle? ")
date_str = input('Format: [dd/mm/yyyy}')
... | 27.767857 | 87 | 0.65209 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 348 | 0.223794 |
6a863c2235ddfde035ee8193728b86e170dd1480 | 1,471 | py | Python | costcalculator/forms.py | connor-c/Trip-Gas-Cost-Calculator | 6101093ffd48b6cb6c4f847b8c1f40351617750b | [
"MIT"
] | null | null | null | costcalculator/forms.py | connor-c/Trip-Gas-Cost-Calculator | 6101093ffd48b6cb6c4f847b8c1f40351617750b | [
"MIT"
] | 8 | 2020-02-11T23:59:35.000Z | 2022-02-10T07:16:43.000Z | costcalculator/forms.py | connor-c/Trip-Gas-Cost-Calculator | 6101093ffd48b6cb6c4f847b8c1f40351617750b | [
"MIT"
] | null | null | null | from django import forms
from django.core.validators import MinValueValidator, MinLengthValidator
class OriginForm(forms.Form):
origin_address = forms.CharField(validators=[MinLengthValidator(1)], widget=forms.TextInput(attrs={'class': 'form-control', 'id': 'inlineFormInputGroup', 'placeholder': '123 Tech St, Sili... | 70.047619 | 220 | 0.747791 | 1,361 | 0.925221 | 0 | 0 | 0 | 0 | 0 | 0 | 486 | 0.330387 |
6a86a5adbb68bba6dc2b067c07b59de722a8d5ca | 1,940 | py | Python | tasks/storm_raffle_handler.py | Ayouuuu/bili2.0 | 1108e39208e56f129fb5eb6605a5b3f1aadc0d8f | [
"MIT"
] | 2 | 2020-01-03T09:27:53.000Z | 2020-04-07T05:06:36.000Z | tasks/storm_raffle_handler.py | Ayouuuu/bili2.0 | 1108e39208e56f129fb5eb6605a5b3f1aadc0d8f | [
"MIT"
] | null | null | null | tasks/storm_raffle_handler.py | Ayouuuu/bili2.0 | 1108e39208e56f129fb5eb6605a5b3f1aadc0d8f | [
"MIT"
] | 1 | 2019-08-23T07:43:21.000Z | 2019-08-23T07:43:21.000Z | import bili_statistics
from reqs.storm_raffle_handler import StormRaffleHandlerReq
from tasks.utils import UtilsTask
from .base_class import Forced, DontWait, Multi
class StormRaffleJoinTask(Forced, DontWait, Multi):
TASK_NAME = 'join_storm_raffle'
# 为了速度,有时不用等room_id验证就参加,置room_id为0,is_normal_room自然会返回固定值tr... | 41.276596 | 83 | 0.635567 | 1,872 | 0.917647 | 0 | 0 | 1,642 | 0.804902 | 1,606 | 0.787255 | 367 | 0.179902 |
6a86acff1cb947e60b02c94c6dbdcc5c7b79e9bf | 4,767 | py | Python | u24_lymphocyte/third_party/treeano/sandbox/nodes/gradnet.py | ALSM-PhD/quip_classification | 7347bfaa5cf11ae2d7a528fbcc43322a12c795d3 | [
"BSD-3-Clause"
] | 45 | 2015-04-26T04:45:51.000Z | 2022-01-24T15:03:55.000Z | u24_lymphocyte/third_party/treeano/sandbox/nodes/gradnet.py | ALSM-PhD/quip_classification | 7347bfaa5cf11ae2d7a528fbcc43322a12c795d3 | [
"BSD-3-Clause"
] | 8 | 2018-07-20T20:54:51.000Z | 2020-06-12T05:36:04.000Z | u24_lymphocyte/third_party/treeano/sandbox/nodes/gradnet.py | ALSM-PhD/quip_classification | 7347bfaa5cf11ae2d7a528fbcc43322a12c795d3 | [
"BSD-3-Clause"
] | 22 | 2018-05-21T23:57:20.000Z | 2022-02-21T00:48:32.000Z | import theano
import theano.tensor as T
import treeano
import treeano.nodes as tn
fX = theano.config.floatX
@treeano.register_node("grad_net_interpolation")
class GradNetInterpolationNode(treeano.NodeImpl):
"""
interpolates outputs between 2 nodes
"""
hyperparameter_names = ("late_gate",)
chil... | 36.389313 | 79 | 0.594084 | 3,177 | 0.666457 | 0 | 0 | 3,285 | 0.689113 | 0 | 0 | 990 | 0.207678 |
6a88dea060f9ea00f0bb7c465137c71904b3c14f | 662 | py | Python | minus80/RawFile.py | brohammer/Minus80 | 3cd5b61a7349b9fa6d35ed192d8a4f38523f92bb | [
"MIT"
] | null | null | null | minus80/RawFile.py | brohammer/Minus80 | 3cd5b61a7349b9fa6d35ed192d8a4f38523f92bb | [
"MIT"
] | null | null | null | minus80/RawFile.py | brohammer/Minus80 | 3cd5b61a7349b9fa6d35ed192d8a4f38523f92bb | [
"MIT"
] | null | null | null | import gzip #pragma: no cover
import bz2 #pragma: no cover
import lzma #pragma: no cover
class RawFile(object):#pragma: no cover
def __init__(self,filename):
self.filename = filename
if filename.endswith('.gz'):
self.handle = gzip.open(filename,'rt')
elif filename.endsw... | 33.1 | 50 | 0.601208 | 563 | 0.850453 | 0 | 0 | 0 | 0 | 0 | 0 | 97 | 0.146526 |
6a89b2893b587e6d66f6aa207ca89999bce84710 | 846 | py | Python | utils/config.py | jtr109/Alpha2kindle | a411d05cafa9036a732eeb75fa13f68963f254e3 | [
"MIT"
] | null | null | null | utils/config.py | jtr109/Alpha2kindle | a411d05cafa9036a732eeb75fa13f68963f254e3 | [
"MIT"
] | null | null | null | utils/config.py | jtr109/Alpha2kindle | a411d05cafa9036a732eeb75fa13f68963f254e3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
class BaseConf(object):
HEADERS = {
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) "
"AppleWebKit/537.36 (KHTML, like Gecko) "
"Chrome/55.0.2883.95 "
"Safari/537.36",
"Accept": "tex... | 27.290323 | 75 | 0.51773 | 784 | 0.926714 | 0 | 0 | 0 | 0 | 0 | 0 | 446 | 0.527187 |
6a89d65e11282b8c81495e2795c8364f65d2114c | 4,724 | py | Python | framework/database/__init__.py | fabmiz/osf.io | 8d86af3f0a6e5388bd5b18383e68e27b65a66247 | [
"Apache-2.0"
] | null | null | null | framework/database/__init__.py | fabmiz/osf.io | 8d86af3f0a6e5388bd5b18383e68e27b65a66247 | [
"Apache-2.0"
] | null | null | null | framework/database/__init__.py | fabmiz/osf.io | 8d86af3f0a6e5388bd5b18383e68e27b65a66247 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import functools
import httplib as http
import markupsafe
from django.core.paginator import Paginator
from django.db.models import Q, QuerySet
from framework.exceptions import HTTPError
def get_or_http_error(Model, pk_or_query, allow_deleted=False, display_name=None):
"""Load an instance ... | 38.406504 | 114 | 0.67591 | 0 | 0 | 1,102 | 0.233277 | 235 | 0.049746 | 0 | 0 | 2,422 | 0.512701 |
6a8b93de9ef615a88be0dad5abda769599f3cf01 | 2,886 | py | Python | neptune/internal/client_library/job_development_api/image.py | jiji-online/neptune-cli | 50cf680a80d141497f9331ab7cdaee49fcb90b0c | [
"Apache-2.0"
] | null | null | null | neptune/internal/client_library/job_development_api/image.py | jiji-online/neptune-cli | 50cf680a80d141497f9331ab7cdaee49fcb90b0c | [
"Apache-2.0"
] | null | null | null | neptune/internal/client_library/job_development_api/image.py | jiji-online/neptune-cli | 50cf680a80d141497f9331ab7cdaee49fcb90b0c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (c) 2016, deepsense.io
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 26.722222 | 93 | 0.647263 | 1,905 | 0.660083 | 0 | 0 | 1,187 | 0.411296 | 0 | 0 | 1,634 | 0.566182 |
6a8bca56c22e3267d252604b1793381dda94c58e | 626 | py | Python | src/picome/hukeyboard.py | guibohnert91/picome | 9b91c28f7e83a2b730cafbda1a97205672f3e676 | [
"MIT"
] | null | null | null | src/picome/hukeyboard.py | guibohnert91/picome | 9b91c28f7e83a2b730cafbda1a97205672f3e676 | [
"MIT"
] | null | null | null | src/picome/hukeyboard.py | guibohnert91/picome | 9b91c28f7e83a2b730cafbda1a97205672f3e676 | [
"MIT"
] | null | null | null | from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS
from adafruit_hid.keycode import Keycode
import usb_hid
import time
class HumanKeyboard(object):
def __init__(self):
self.keyboard = Keyboard(usb_hid.devices)
self.keyboardLayout = KeyboardLayou... | 28.454545 | 73 | 0.702875 | 452 | 0.722045 | 0 | 0 | 0 | 0 | 0 | 0 | 144 | 0.230032 |
6a8c272cd22c6193695ebfa5fa34ff4d88d4565d | 579 | py | Python | src/solutions/part2/q104_max_bi_tree_depth.py | hychrisli/PyAlgorithms | 71e537180f3b371d0d2cc47b11cb68ec13a8ac68 | [
"Apache-2.0"
] | null | null | null | src/solutions/part2/q104_max_bi_tree_depth.py | hychrisli/PyAlgorithms | 71e537180f3b371d0d2cc47b11cb68ec13a8ac68 | [
"Apache-2.0"
] | null | null | null | src/solutions/part2/q104_max_bi_tree_depth.py | hychrisli/PyAlgorithms | 71e537180f3b371d0d2cc47b11cb68ec13a8ac68 | [
"Apache-2.0"
] | null | null | null | from src.base.solution import Solution
from src.tests.part2.q104_test_max_bi_tree_depth import MaxBiTreeDepthTestCases
class MaxBiTreeDepth(Solution):
def gen_test_cases(self):
return MaxBiTreeDepthTestCases()
def run_test(self, input):
return self.maxDepth(input)
def maxDepth(self, root... | 23.16 | 79 | 0.661485 | 381 | 0.658031 | 0 | 0 | 0 | 0 | 0 | 0 | 74 | 0.127807 |
6a8c916961dcdf5b4bdd11f085941afc268401f1 | 771 | py | Python | inventory/admin.py | shakyasaijal/businessAnalytics | 9312bae79709387c6eadd50f87f6be85bd52c396 | [
"BSD-3-Clause"
] | null | null | null | inventory/admin.py | shakyasaijal/businessAnalytics | 9312bae79709387c6eadd50f87f6be85bd52c396 | [
"BSD-3-Clause"
] | 8 | 2021-03-30T13:03:11.000Z | 2022-03-12T00:20:13.000Z | inventory/admin.py | shakyasaijal/businessAnalytics | 9312bae79709387c6eadd50f87f6be85bd52c396 | [
"BSD-3-Clause"
] | null | null | null | from django.contrib import admin
from . import models
class SupplierAdmin(admin.ModelAdmin):
list_display = ('supplier_name', 'contact', )
search_fields = ['supplier_name', 'contact', ]
admin.site.register(models.Suppliers, SupplierAdmin)
class InventoryUserAdmin(admin.ModelAdmin):
list_display = ('empl... | 32.125 | 72 | 0.731518 | 541 | 0.701686 | 0 | 0 | 0 | 0 | 0 | 0 | 215 | 0.278859 |
6a8e0d766c7cdfdc409946fd3a6196d6981baf1d | 55 | py | Python | python/testData/resolve/TryExceptElse.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/resolve/TryExceptElse.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/resolve/TryExceptElse.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | try:
name = ""
except:
pass
else:
print na<ref>me | 9.166667 | 17 | 0.6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0.036364 |
6a8e67d20152ca7acb56c8c6199b1999e7f99406 | 500 | py | Python | pybyte/session.py | ms7m/py-byte | c5872ff5b8536160d8cbd7f88406ed593113e77d | [
"MIT"
] | 4 | 2020-01-26T17:22:05.000Z | 2020-08-15T12:23:31.000Z | pybyte/session.py | ms7m/py-byte | c5872ff5b8536160d8cbd7f88406ed593113e77d | [
"MIT"
] | 3 | 2020-01-27T18:10:06.000Z | 2020-03-31T10:56:03.000Z | pybyte/session.py | ms7m/py-byte | c5872ff5b8536160d8cbd7f88406ed593113e77d | [
"MIT"
] | 2 | 2020-01-27T17:59:45.000Z | 2020-02-01T16:43:53.000Z |
import requests
class ByteSession(object):
def __init__(self, token, providedSession=False):
self._userToken = token
if providedSession == False:
self._session = requests.session()
else:
self._session = providedSession
self._session.headers = {
... | 26.315789 | 91 | 0.594 | 482 | 0.964 | 0 | 0 | 0 | 0 | 0 | 0 | 92 | 0.184 |
6a8e7fcaf4ca3d67de4aab013987d7db788188b5 | 252 | py | Python | pyqtgraph/examples/template.py | secantsquared/pyqtgraph | 3ef7f5b91639543e43bcd66a84290fb9bc18fc5c | [
"MIT"
] | null | null | null | pyqtgraph/examples/template.py | secantsquared/pyqtgraph | 3ef7f5b91639543e43bcd66a84290fb9bc18fc5c | [
"MIT"
] | null | null | null | pyqtgraph/examples/template.py | secantsquared/pyqtgraph | 3ef7f5b91639543e43bcd66a84290fb9bc18fc5c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Description of example
"""
import pyqtgraph as pg
from pyqtgraph.Qt import QtCore, QtGui, mkQApp
import numpy as np
app = mkQApp()
# win.setWindowTitle('pyqtgraph example: ____')
if __name__ == '__main__':
pg.exec()
| 15.75 | 47 | 0.68254 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 110 | 0.436508 |
6a8f3e25920be24fb569cc55eff90ae879efa647 | 73,328 | py | Python | ambari-server/src/test/python/stacks/2.0.6/common/test_stack_advisor.py | cas-packone/ambari-chs | 68033fbd4b810b6642853f2ad9128cbbd4e0cb7b | [
"Apache-2.0"
] | 3 | 2019-06-20T11:49:36.000Z | 2020-12-11T10:44:29.000Z | ambari-server/src/test/python/stacks/2.0.6/common/test_stack_advisor.py | cas-packone/ambari-chs | 68033fbd4b810b6642853f2ad9128cbbd4e0cb7b | [
"Apache-2.0"
] | null | null | null | ambari-server/src/test/python/stacks/2.0.6/common/test_stack_advisor.py | cas-packone/ambari-chs | 68033fbd4b810b6642853f2ad9128cbbd4e0cb7b | [
"Apache-2.0"
] | 1 | 2019-03-20T08:36:17.000Z | 2019-03-20T08:36:17.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 use this ... | 36.13997 | 166 | 0.551836 | 72,478 | 0.988408 | 0 | 0 | 483 | 0.006587 | 0 | 0 | 31,198 | 0.425458 |
6a8f6efd4560f4b302cef1f8c07a3c86f509c35d | 642 | py | Python | debugging/code/multiprocess_main.py | awesome-archive/python-debugging-skills | 69af455302a805d6f198a06ea934f79d5913cb3e | [
"MIT"
] | null | null | null | debugging/code/multiprocess_main.py | awesome-archive/python-debugging-skills | 69af455302a805d6f198a06ea934f79d5913cb3e | [
"MIT"
] | null | null | null | debugging/code/multiprocess_main.py | awesome-archive/python-debugging-skills | 69af455302a805d6f198a06ea934f79d5913cb3e | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
import multiprocessing as mp
import time
from pudb.remote import set_trace
def worker(worker_id):
""" Simple worker process"""
i = 0
while i < 10:
if worker_id == 1: # debug process with id 1
set_trace(term_size=(80, 24))
time.sleep(1) # represents ... | 22.928571 | 57 | 0.573209 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 151 | 0.235202 |
6a8fb5db5439c528b72c62e081f71f595115b9ad | 1,317 | py | Python | lldb/packages/Python/lldbsuite/test/expression_command/anonymous-struct/TestCallUserAnonTypedef.py | bytesnake/Enzyme | 247606c279920d476645d2e319e574bf8be10fc9 | [
"Apache-2.0"
] | null | null | null | lldb/packages/Python/lldbsuite/test/expression_command/anonymous-struct/TestCallUserAnonTypedef.py | bytesnake/Enzyme | 247606c279920d476645d2e319e574bf8be10fc9 | [
"Apache-2.0"
] | null | null | null | lldb/packages/Python/lldbsuite/test/expression_command/anonymous-struct/TestCallUserAnonTypedef.py | bytesnake/Enzyme | 247606c279920d476645d2e319e574bf8be10fc9 | [
"Apache-2.0"
] | null | null | null | """
Test calling user defined functions using expression evaluation.
This test checks that typesystem lookup works correctly for typedefs of
untagged structures.
Ticket: https://llvm.org/bugs/show_bug.cgi?id=26790
"""
from __future__ import print_function
import lldb
from lldbsuite.test.decorators import *
from lld... | 28.021277 | 85 | 0.658314 | 928 | 0.704632 | 0 | 0 | 677 | 0.514047 | 0 | 0 | 446 | 0.338648 |
6a8fddf8511ca7d429d8644119f475536d5dae17 | 2,486 | py | Python | main.py | ThomasDLi/simple-photo-editor | f8b3f1025155e2542b93b94c12d607b9b5e45731 | [
"MIT"
] | 1 | 2021-05-21T19:21:26.000Z | 2021-05-21T19:21:26.000Z | main.py | ThomasDLi/simple-photo-editor | f8b3f1025155e2542b93b94c12d607b9b5e45731 | [
"MIT"
] | null | null | null | main.py | ThomasDLi/simple-photo-editor | f8b3f1025155e2542b93b94c12d607b9b5e45731 | [
"MIT"
] | null | null | null | from PIL import Image, ImageEnhance
user_account_name = "Thomas.Li26"
def main():
mode = input("Specify image editing mode. Type DEEPFRY, STRETCH, BRIGHTNESS, SHARPEN, or INVERT: ")
if mode == "DEEPFRY":
DEEPFRY()
if mode == "STRETCH":
STRETCH()
if mode == "INVERT":
... | 38.84375 | 104 | 0.650442 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 972 | 0.39099 |
6a90540c04aa6d7b6d0419ad6f3c05ff1c4aa797 | 377 | py | Python | scripts/field/Curbrock_Summon1.py | G00dBye/YYMS | 1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb | [
"MIT"
] | 54 | 2019-04-16T23:24:48.000Z | 2021-12-18T11:41:50.000Z | scripts/field/Curbrock_Summon1.py | G00dBye/YYMS | 1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb | [
"MIT"
] | 3 | 2019-05-19T15:19:41.000Z | 2020-04-27T16:29:16.000Z | scripts/field/Curbrock_Summon1.py | G00dBye/YYMS | 1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb | [
"MIT"
] | 49 | 2020-11-25T23:29:16.000Z | 2022-03-26T16:20:24.000Z | # Curbrock Summon 2
CURBROCK2 = 9400930 # MOD ID
CURBROCKS_ESCAPE_ROUTE_VER2 = 600050040 # MAP ID
CURBROCKS_ESCAPE_ROUTE_VER3 = 600050050 # MAP ID 2
sm.spawnMob(CURBROCK2, 190, -208, False)
sm.createClock(1800)
sm.addEvent(sm.invokeAfterDelay(1800000, "warp", CURBROCKS_ESCAPE_ROUTE_VER3, 0))
sm.waitForMobDeath(CURBRO... | 31.416667 | 81 | 0.806366 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 51 | 0.135279 |
6a9096da46f0e3f90b72b1a819bf62ce11ddc6bd | 786 | py | Python | trainloops/listeners/cluster_killswitch.py | Gerryflap/master_thesis | 5dc16e21b23837fee8a4532679bb5cb961af0b7c | [
"MIT"
] | null | null | null | trainloops/listeners/cluster_killswitch.py | Gerryflap/master_thesis | 5dc16e21b23837fee8a4532679bb5cb961af0b7c | [
"MIT"
] | null | null | null | trainloops/listeners/cluster_killswitch.py | Gerryflap/master_thesis | 5dc16e21b23837fee8a4532679bb5cb961af0b7c | [
"MIT"
] | null | null | null | """
Cancelling jobs on the University cluster forces programs to instantly quit,
which sometimes crashes cluster nodes.
As a remedy, this killswitch listener will stop the experiment in a nicer way to prevent this from happening.
The experiment will be stopped if a file named "stop" is encountered i... | 32.75 | 113 | 0.704835 | 293 | 0.372774 | 0 | 0 | 0 | 0 | 0 | 0 | 433 | 0.550891 |
6a920dacf31156e85a0fcebb52765a1d1ca683fe | 2,255 | py | Python | authors/apps/notifications/views.py | andela/ah-backend-spaces- | 58e031a96a6b9555f1a4133cf8cb688c236d3f3b | [
"BSD-3-Clause"
] | 2 | 2018-08-17T15:47:36.000Z | 2018-09-13T13:58:34.000Z | authors/apps/notifications/views.py | andela/ah-backend-spaces- | 58e031a96a6b9555f1a4133cf8cb688c236d3f3b | [
"BSD-3-Clause"
] | 35 | 2018-07-24T11:42:53.000Z | 2021-06-10T20:34:41.000Z | authors/apps/notifications/views.py | andela/ah-backend-spaces- | 58e031a96a6b9555f1a4133cf8cb688c236d3f3b | [
"BSD-3-Clause"
] | 3 | 2018-07-17T13:05:35.000Z | 2018-09-06T16:03:52.000Z | from rest_framework import status
from rest_framework.generics import (
RetrieveUpdateAPIView, CreateAPIView,
RetrieveUpdateDestroyAPIView
)
from rest_framework.permissions import AllowAny, IsAuthenticated
from rest_framework.response import Response
from rest_framework.views import APIView
from ..authenticatio... | 34.692308 | 93 | 0.73082 | 1,663 | 0.737472 | 0 | 0 | 0 | 0 | 0 | 0 | 599 | 0.265632 |
6a921ec9df90e9d0bc4821cbf3d19c03f4f29792 | 1,882 | py | Python | scripts/common/frozendict.py | bopopescu/build | 4e95fd33456e552bfaf7d94f7d04b19273d1c534 | [
"BSD-3-Clause"
] | null | null | null | scripts/common/frozendict.py | bopopescu/build | 4e95fd33456e552bfaf7d94f7d04b19273d1c534 | [
"BSD-3-Clause"
] | null | null | null | scripts/common/frozendict.py | bopopescu/build | 4e95fd33456e552bfaf7d94f7d04b19273d1c534 | [
"BSD-3-Clause"
] | 1 | 2020-07-23T11:05:06.000Z | 2020-07-23T11:05:06.000Z | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Implements a frozen dictionary-like object"""
import collections
import copy
import common.memo as memo
class frozendict(collections.Mapping):
"""A f... | 26.507042 | 79 | 0.698193 | 1,608 | 0.85441 | 0 | 0 | 150 | 0.079702 | 0 | 0 | 888 | 0.471838 |
6a92b244776a352d3c8cb2387f8e203d0ce669c3 | 22 | py | Python | avatar/__init__.py | yogeshkheri/geonode-avatar | 293474f814117ae680278223c8cdf8d59c67862d | [
"BSD-3-Clause"
] | 3 | 2021-10-17T20:37:40.000Z | 2022-03-17T10:29:14.000Z | avatar/__init__.py | yogeshkheri/geonode-avatar | 293474f814117ae680278223c8cdf8d59c67862d | [
"BSD-3-Clause"
] | 4 | 2021-09-02T13:26:11.000Z | 2022-03-16T12:26:36.000Z | avatar/__init__.py | yogeshkheri/geonode-avatar | 293474f814117ae680278223c8cdf8d59c67862d | [
"BSD-3-Clause"
] | null | null | null | __version__ = '5.0.2'
| 11 | 21 | 0.636364 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0.318182 |
6a9450d0c04cca0024a14e15346193d320a70e58 | 50 | py | Python | __init__.py | mmanganel/neurecon | 5e86324675985f1fedfc4d5d3ac2e750f480538f | [
"MIT"
] | null | null | null | __init__.py | mmanganel/neurecon | 5e86324675985f1fedfc4d5d3ac2e750f480538f | [
"MIT"
] | null | null | null | __init__.py | mmanganel/neurecon | 5e86324675985f1fedfc4d5d3ac2e750f480538f | [
"MIT"
] | null | null | null | from neurecon.reconstruction import reconstruct
| 12.5 | 47 | 0.86 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6a94a7cd3e89c26bee4c47c7741e5a37358da6ff | 46 | py | Python | Fundamentals/Reversed Strings.py | gnvidal/Codewars | 117a83bd949a1503f31f1f915641e96e7bf7a04c | [
"MIT"
] | 49 | 2018-04-30T06:42:45.000Z | 2021-07-22T16:39:02.000Z | Fundamentals/Reversed Strings.py | gnvidal/Codewars | 117a83bd949a1503f31f1f915641e96e7bf7a04c | [
"MIT"
] | 1 | 2020-08-31T02:36:53.000Z | 2020-08-31T10:14:00.000Z | Fundamentals/Reversed Strings.py | gnvidal/Codewars | 117a83bd949a1503f31f1f915641e96e7bf7a04c | [
"MIT"
] | 36 | 2016-11-07T19:59:58.000Z | 2022-03-31T11:18:27.000Z | def solution(string):
return string[::-1]
| 15.333333 | 23 | 0.652174 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6a95707999c6dd8d718ea3549fc898fb5e496ed8 | 965 | py | Python | python/flexflow/keras/datasets/cifar.py | zmxdream/FlexFlow | 7ea50d71a02e853af7ae573d88c911511b3e82e0 | [
"Apache-2.0"
] | 455 | 2018-12-09T01:57:46.000Z | 2022-03-22T01:56:47.000Z | python/flexflow/keras/datasets/cifar.py | zmxdream/FlexFlow | 7ea50d71a02e853af7ae573d88c911511b3e82e0 | [
"Apache-2.0"
] | 136 | 2019-04-19T08:24:27.000Z | 2022-03-28T01:39:19.000Z | python/flexflow/keras/datasets/cifar.py | zmxdream/FlexFlow | 7ea50d71a02e853af7ae573d88c911511b3e82e0 | [
"Apache-2.0"
] | 102 | 2018-12-22T07:38:05.000Z | 2022-03-30T06:04:39.000Z | # -*- coding: utf-8 -*-
"""Utilities common to CIFAR10 and CIFAR100 datasets.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys
from six.moves import cPickle
def load_batch(fpath, label_key='labels'):
"""Internal utility for parsing CIFAR ... | 26.081081 | 53 | 0.586528 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 358 | 0.370984 |
6a96000d55f22510def511958af1f99b01dba806 | 523 | py | Python | day7/p2.py | Seralpa/Advent-of-code | 9633624e4ff48c50d8be3deac54c83059e9c3b04 | [
"MIT"
] | 1 | 2020-12-18T16:06:25.000Z | 2020-12-18T16:06:25.000Z | day7/p2.py | Seralpa/Advent-of-code | 9633624e4ff48c50d8be3deac54c83059e9c3b04 | [
"MIT"
] | null | null | null | day7/p2.py | Seralpa/Advent-of-code | 9633624e4ff48c50d8be3deac54c83059e9c3b04 | [
"MIT"
] | null | null | null | def getNumBags(color):
if color=='':
return 0
numBags=1
for bag in rules[color]:
numBags+=bag[1]*getNumBags(bag[0])
return numBags
with open('day7/input.txt') as f:
rules=dict([l.split(' contain') for l in f.read().replace(' bags', '').replace(' bag', '').replace('.', '').replace(' ... | 40.230769 | 153 | 0.596558 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 113 | 0.216061 |
6a9611abd97c536f926ca250cbefadb44ebcbbc2 | 471 | py | Python | adv/luther.py | 6tennis/dl | 69eb7e71da9fabe9e7ec40c461b525b4f967f345 | [
"Apache-2.0"
] | null | null | null | adv/luther.py | 6tennis/dl | 69eb7e71da9fabe9e7ec40c461b525b4f967f345 | [
"Apache-2.0"
] | null | null | null | adv/luther.py | 6tennis/dl | 69eb7e71da9fabe9e7ec40c461b525b4f967f345 | [
"Apache-2.0"
] | null | null | null | from core.advbase import *
from slot.d import *
def module():
return Luther
class Luther(Adv):
a1 = ('cc',0.10,'hit15')
conf = {}
conf ['slots.d'] = Leviathan()
conf['acl'] = """
`dragon
`s1
`s2, seq=5 and cancel
`s3, seq=5 and cancel or fsc
`fs, seq=5
... | 20.478261 | 44 | 0.552017 | 280 | 0.59448 | 0 | 0 | 0 | 0 | 0 | 0 | 181 | 0.384289 |
6a9615693970b5561756763d7533ebc0f325ce0c | 21,646 | py | Python | wandb/sdk/data_types/image.py | macio232/client | 295380c99b1a0946470672d40348b17a674ad17f | [
"MIT"
] | null | null | null | wandb/sdk/data_types/image.py | macio232/client | 295380c99b1a0946470672d40348b17a674ad17f | [
"MIT"
] | null | null | null | wandb/sdk/data_types/image.py | macio232/client | 295380c99b1a0946470672d40348b17a674ad17f | [
"MIT"
] | null | null | null | import hashlib
from io import BytesIO
import logging
import os
from typing import Any, cast, Dict, List, Optional, Sequence, Type, TYPE_CHECKING, Union
from pkg_resources import parse_version
import wandb
from wandb import util
from ._private import MEDIA_TMP
from .base_types.media import BatchableMedia, Media
from .... | 36.688136 | 119 | 0.572438 | 20,254 | 0.935693 | 0 | 0 | 6,687 | 0.308925 | 0 | 0 | 5,037 | 0.232699 |
6a961a7708b268c3d81ea73ab8b93515bd578d6c | 669 | py | Python | src/ACC_Backend_Utils.py | skostic14/isda-racing-backend | 41b5f9760dc17a29aa8ab5e4cc1894a27496a72c | [
"Apache-2.0"
] | 1 | 2021-07-29T05:29:06.000Z | 2021-07-29T05:29:06.000Z | src/ACC_Backend_Utils.py | skostic14/isda-racing-backend | 41b5f9760dc17a29aa8ab5e4cc1894a27496a72c | [
"Apache-2.0"
] | null | null | null | src/ACC_Backend_Utils.py | skostic14/isda-racing-backend | 41b5f9760dc17a29aa8ab5e4cc1894a27496a72c | [
"Apache-2.0"
] | null | null | null | import datetime
# Gets time from milliseconds
# Returns string formatted as HH:MM:SS:mmm, MM:SS:mmm or S:mmm, depending on the time.
def get_time_from_milliseconds(milli):
milliseconds = milli % 1000
seconds= (milli//1000)%60
minutes= (milli//(1000*60))%60
hours= (milli//(1000*60*60))%24
if hours... | 35.210526 | 87 | 0.651719 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 214 | 0.31988 |
6a961b6b72524b941aa7777c8c1e4c9ea87f76f0 | 2,721 | py | Python | examples/advanced/pidigits.py | ovolve/sympy | 0a15782f20505673466b940454b33b8014a25c13 | [
"BSD-3-Clause"
] | 3 | 2015-01-17T23:15:04.000Z | 2015-05-26T14:11:44.000Z | examples/advanced/pidigits.py | ovolve/sympy | 0a15782f20505673466b940454b33b8014a25c13 | [
"BSD-3-Clause"
] | 7 | 2015-03-23T23:33:02.000Z | 2019-02-09T00:19:41.000Z | examples/advanced/pidigits.py | ovolve/sympy | 0a15782f20505673466b940454b33b8014a25c13 | [
"BSD-3-Clause"
] | 1 | 2019-10-18T12:39:41.000Z | 2019-10-18T12:39:41.000Z | #!/usr/bin/env python
"""Pi digits example
Example shows arbitrary precision using mpmath with the
computation of the digits of pi.
"""
from mpmath import libmp, pi
from mpmath import functions as mpf_funs
import math
from time import clock
import sys
def display_fraction(digits, skip=0, colwidth=10, columns=5):
... | 30.233333 | 119 | 0.602352 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 764 | 0.280779 |
6a975a412e5d4fce44f6c3c23326742e66d78cbe | 1,272 | py | Python | authserver/mailauth/migrations/0011_mnserviceuser.py | yopiti/authserver | 0a1f7f5a83d03963d1ecfb5199be8e05d3068dfd | [
"MIT"
] | 8 | 2017-07-04T10:07:32.000Z | 2022-01-02T10:31:43.000Z | authserver/mailauth/migrations/0011_mnserviceuser.py | yopiti/authserver | 0a1f7f5a83d03963d1ecfb5199be8e05d3068dfd | [
"MIT"
] | 14 | 2020-02-11T21:42:38.000Z | 2022-03-28T16:00:55.000Z | authserver/mailauth/migrations/0011_mnserviceuser.py | yopiti/authserver | 0a1f7f5a83d03963d1ecfb5199be8e05d3068dfd | [
"MIT"
] | 1 | 2020-03-01T10:39:28.000Z | 2020-03-01T10:39:28.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.11 on 2018-03-13 00:16
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import mailauth.models
import uuid
class Migration(migrations.Migration):
dependencies = [
... | 36.342857 | 118 | 0.633648 | 1,012 | 0.795597 | 0 | 0 | 0 | 0 | 0 | 0 | 255 | 0.200472 |
6a97a004a7c418b0d32aaf5764a1c6b24a50f26a | 10,580 | py | Python | tempest/hacking/checks.py | rishabh20111990/tempest | df15531cd4231000b0da016f5cd8641523ce984e | [
"Apache-2.0"
] | 2 | 2015-08-13T00:07:49.000Z | 2020-08-07T06:38:44.000Z | tempest/hacking/checks.py | rishabh20111990/tempest | df15531cd4231000b0da016f5cd8641523ce984e | [
"Apache-2.0"
] | null | null | null | tempest/hacking/checks.py | rishabh20111990/tempest | df15531cd4231000b0da016f5cd8641523ce984e | [
"Apache-2.0"
] | 3 | 2016-08-30T06:53:54.000Z | 2021-03-22T16:54:39.000Z | # Copyright 2013 IBM Corp.
#
# 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... | 31.963746 | 79 | 0.636578 | 0 | 0 | 4,583 | 0.433176 | 8,274 | 0.782042 | 0 | 0 | 4,222 | 0.399055 |
6a98547230e4cc83fa248137ca0fde09ebb67dcf | 1,018 | py | Python | data/train/python/6a98547230e4cc83fa248137ca0fde09ebb67dcfController.py | harshp8l/deep-learning-lang-detection | 2a54293181c1c2b1a2b840ddee4d4d80177efb33 | [
"MIT"
] | 84 | 2017-10-25T15:49:21.000Z | 2021-11-28T21:25:54.000Z | data/train/python/6a98547230e4cc83fa248137ca0fde09ebb67dcfController.py | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 5 | 2018-03-29T11:50:46.000Z | 2021-04-26T13:33:18.000Z | data/train/python/6a98547230e4cc83fa248137ca0fde09ebb67dcfController.py | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 24 | 2017-11-22T08:31:00.000Z | 2022-03-27T01:22:31.000Z | import SimpleXMLRPCServer
import sys
import logging
from K8055Controller import K8055Controller
logging.basicConfig()
controller_log = logging.getLogger("Controller")
class Controller:
def __init__(self):
self.k8055 = K8055Controller()
controller_log.debug("initialized")
def reset(s... | 24.829268 | 77 | 0.634578 | 674 | 0.662083 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 0.08055 |
6a98f5590ec68008681144a3cad2ee8a6d9f0359 | 55 | py | Python | model/__init__.py | sun1638650145/CRNN | 485157e5803b9be861a63ebb04f04fccb16ef5f1 | [
"Apache-2.0"
] | 11 | 2020-09-18T02:35:48.000Z | 2022-02-26T21:31:55.000Z | model/__init__.py | sun1638650145/CRNN | 485157e5803b9be861a63ebb04f04fccb16ef5f1 | [
"Apache-2.0"
] | null | null | null | model/__init__.py | sun1638650145/CRNN | 485157e5803b9be861a63ebb04f04fccb16ef5f1 | [
"Apache-2.0"
] | null | null | null | from .crnn import CRNN
from .crnn import CRNN_Attention | 27.5 | 32 | 0.836364 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6a9907c6e19624e9a00da0b3cff99ba87e746680 | 3,206 | py | Python | models2.py | Lydia-Tan/MindLife | 644f1a3834f337d51c99650c3924df99c5200d06 | [
"MIT"
] | 1 | 2020-01-20T19:49:07.000Z | 2020-01-20T19:49:07.000Z | models2.py | lindaweng/Mindlife | 30be070b39728fb3fe149d4c95e5bce280a3b6a7 | [
"MIT"
] | null | null | null | models2.py | lindaweng/Mindlife | 30be070b39728fb3fe149d4c95e5bce280a3b6a7 | [
"MIT"
] | null | null | null | import nltk
import re
import sys
from sys import argv
from nltk.sentiment.vader import SentimentIntensityAnalyzer
def ajay(ans):
ajay = SentimentIntensityAnalyzer()
completeScore = 0
questionWeights = [0.05, 0.20, 0.05, 0.05, 0.05, 0.20, 0.05, 0.05, 0.20, 0.10]
print ans
ansList = ans.split("$")
... | 51.709677 | 98 | 0.585153 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,752 | 0.546475 |
6a9a4141ccd8a77a2a296371f9b8eb6510494db4 | 1,487 | py | Python | tokendito/tool.py | pcmxgti/tokendito | c1672917b1b95e463c5bdf8e9c3c039189da8e42 | [
"Apache-2.0"
] | 40 | 2019-07-31T03:21:03.000Z | 2022-03-29T23:57:19.000Z | tokendito/tool.py | pcmxgti/tokendito | c1672917b1b95e463c5bdf8e9c3c039189da8e42 | [
"Apache-2.0"
] | 27 | 2019-08-07T06:40:15.000Z | 2022-03-21T18:46:49.000Z | tokendito/tool.py | pcmxgti/tokendito | c1672917b1b95e463c5bdf8e9c3c039189da8e42 | [
"Apache-2.0"
] | 16 | 2019-07-31T14:22:04.000Z | 2022-02-16T12:55:27.000Z | # vim: set filetype=python ts=4 sw=4
# -*- coding: utf-8 -*-
"""This module retrieves AWS credentials after authenticating with Okta."""
from __future__ import absolute_import, division, print_function, unicode_literals
import logging
from future import standard_library
from tokendito import aws_helpers
from tokendit... | 31.638298 | 88 | 0.774042 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 462 | 0.310693 |
6a9b47904f23c1124cf4fbc27654a8fe5f3b7493 | 42 | py | Python | resources/__init__.py | Boryslavq/UHMI_Chalenge | 4b7df902c0a0901c727a6fb26347dabca1067494 | [
"MIT"
] | null | null | null | resources/__init__.py | Boryslavq/UHMI_Chalenge | 4b7df902c0a0901c727a6fb26347dabca1067494 | [
"MIT"
] | null | null | null | resources/__init__.py | Boryslavq/UHMI_Chalenge | 4b7df902c0a0901c727a6fb26347dabca1067494 | [
"MIT"
] | null | null | null | from . import rest
from . import helpers
| 14 | 22 | 0.738095 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6a9c07074d315021100d6322a18c6bc3087be1db | 15,833 | py | Python | ir_datasets/formats/trec.py | cakiki/ir_datasets | 7f9f8e9ff62e49d40383220ecc2daa250695d267 | [
"Apache-2.0"
] | null | null | null | ir_datasets/formats/trec.py | cakiki/ir_datasets | 7f9f8e9ff62e49d40383220ecc2daa250695d267 | [
"Apache-2.0"
] | null | null | null | ir_datasets/formats/trec.py | cakiki/ir_datasets | 7f9f8e9ff62e49d40383220ecc2daa250695d267 | [
"Apache-2.0"
] | null | null | null | import io
import codecs
import tarfile
import re
import gzip
import xml.etree.ElementTree as ET
from fnmatch import fnmatch
from pathlib import Path
from typing import NamedTuple
import ir_datasets
from ir_datasets.indices import PickleLz4FullStore
from .base import GenericDoc, GenericQuery, GenericScoredDoc, BaseDocs,... | 38.429612 | 284 | 0.55978 | 15,125 | 0.955283 | 10,130 | 0.639803 | 2,126 | 0.134277 | 0 | 0 | 1,610 | 0.101686 |
6a9c552700ad0a75cac33278ee8dc5a5139c2432 | 844 | py | Python | textpand/download.py | caufieldjh/textpand-for-kgs | 42853c53c5a4cc06fbd745c147d02fe7916690fa | [
"BSD-3-Clause"
] | 3 | 2021-12-10T21:13:47.000Z | 2021-12-10T23:36:18.000Z | textpand/download.py | caufieldjh/textpand-for-kgs | 42853c53c5a4cc06fbd745c147d02fe7916690fa | [
"BSD-3-Clause"
] | 1 | 2022-01-06T20:59:07.000Z | 2022-01-06T20:59:07.000Z | textpand/download.py | caufieldjh/textpand-for-kgs | 42853c53c5a4cc06fbd745c147d02fe7916690fa | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from .utils import download_from_yaml
def download(output_dir: str, snippet_only: bool, ignore_cache: bool = False) -> None:
"""Downloads data files from list of URLs (default: download.yaml) into data directory (default: data/).
Args:
output_dir: A str... | 31.259259 | 108 | 0.625592 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 466 | 0.552133 |
6a9cb003c79f63e5985173912dffc928314248d4 | 6,770 | py | Python | venv/lib/python3.6/site-packages/ansible_collections/netapp/ontap/plugins/modules/na_ontap_autosupport_invoke.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 1 | 2020-01-22T13:11:23.000Z | 2020-01-22T13:11:23.000Z | venv/lib/python3.6/site-packages/ansible_collections/netapp/ontap/plugins/modules/na_ontap_autosupport_invoke.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 12 | 2020-02-21T07:24:52.000Z | 2020-04-14T09:54:32.000Z | venv/lib/python3.6/site-packages/ansible_collections/netapp/ontap/plugins/modules/na_ontap_autosupport_invoke.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | null | null | null | #!/usr/bin/python
# (c) 2020, NetApp, Inc
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
'''
na_ontap_autosupport_invoke
'''
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
'metadata_version': '1.1',
's... | 34.365482 | 109 | 0.644018 | 4,530 | 0.669129 | 0 | 0 | 0 | 0 | 0 | 0 | 2,200 | 0.324963 |
6a9cd0c545ed5aa451bbc0bc26a2e800d471ecd0 | 304 | py | Python | tests/api/serializer/test_user.py | armandomeeuwenoord/freight | 31ae2fa9252ab0b25385abd04742475e6671e3b1 | [
"Apache-2.0"
] | 562 | 2015-02-20T08:25:24.000Z | 2021-11-12T19:58:44.000Z | tests/api/serializer/test_user.py | armandomeeuwenoord/freight | 31ae2fa9252ab0b25385abd04742475e6671e3b1 | [
"Apache-2.0"
] | 129 | 2015-02-20T07:41:14.000Z | 2022-02-17T21:14:40.000Z | tests/api/serializer/test_user.py | armandomeeuwenoord/freight | 31ae2fa9252ab0b25385abd04742475e6671e3b1 | [
"Apache-2.0"
] | 54 | 2015-02-28T01:12:23.000Z | 2021-03-02T11:14:52.000Z | from freight.api.serializer import serialize
from freight.testutils import TestCase
class UserSerializerTest(TestCase):
def test_simple(self):
user = self.create_user()
result = serialize(user)
assert result["id"] == str(user.id)
assert result["name"] == user.name
| 25.333333 | 44 | 0.680921 | 217 | 0.713816 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.032895 |
6a9cdc6c74a18d65dd44c9480dd5e3953a78dd18 | 1,639 | py | Python | binning/pozo_5m_class_dem.py | UP-RS-ESP/GEW-DAP04-WS201819 | 18341620d9168e1eec476af1d8f568cf0017bf56 | [
"MIT"
] | 2 | 2020-10-12T11:33:00.000Z | 2021-12-20T06:33:54.000Z | binning/pozo_5m_class_dem.py | UP-RS-ESP/GEW-DAP04-WS201819 | 18341620d9168e1eec476af1d8f568cf0017bf56 | [
"MIT"
] | null | null | null | binning/pozo_5m_class_dem.py | UP-RS-ESP/GEW-DAP04-WS201819 | 18341620d9168e1eec476af1d8f568cf0017bf56 | [
"MIT"
] | null | null | null | import sys
import numpy as np
from matplotlib import pyplot as pl
from rw import WriteGTiff
fn = '../pozo-steep-vegetated-pcl.npy'
pts = np.load(fn)
x, y, z, c = pts[:, 0], pts[:, 1], pts[:, 2], pts[:, 5]
ix = (0.2 * (x - x.min())).astype('int')
iy = (0.2 * (y - y.min())).astype('int')
shape = (100, 100)
xb = np.aran... | 30.351852 | 59 | 0.52349 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 209 | 0.127517 |
6a9cfc593e93acc1f1c0f3afda04be08e714940c | 2,228 | py | Python | comtypes/_meta.py | phuslu/pyMSAA | 611bc4c31e0d6ba36f0f0bebdc6e6be14b994eb0 | [
"MIT"
] | 23 | 2015-05-28T15:31:35.000Z | 2022-02-16T07:51:34.000Z | comtypes/_meta.py | kar98kar/pyMSAA | 611bc4c31e0d6ba36f0f0bebdc6e6be14b994eb0 | [
"MIT"
] | 3 | 2020-05-19T03:00:52.000Z | 2020-11-03T09:22:51.000Z | comtypes/_meta.py | kar98kar/pyMSAA | 611bc4c31e0d6ba36f0f0bebdc6e6be14b994eb0 | [
"MIT"
] | 13 | 2016-08-26T23:00:40.000Z | 2022-03-03T09:58:36.000Z | # comtypes._meta helper module
from ctypes import POINTER, c_void_p, cast
import comtypes
################################################################
# metaclass for CoClass (in comtypes/__init__.py)
def _wrap_coclass(self):
# We are an IUnknown pointer, represented as a c_void_p instance,
# but... | 35.935484 | 85 | 0.601436 | 1,277 | 0.57316 | 0 | 0 | 0 | 0 | 0 | 0 | 962 | 0.431777 |
6a9d299ac035789dcfbdc5b67b56e5ebe19176e2 | 33,321 | py | Python | bin/ADFRsuite/CCSBpckgs/mglutil/gui/BasicWidgets/Tk/Dial.py | AngelRuizMoreno/Jupyter_Dock_devel | 6d23bc174d5294d1e9909a0a1f9da0713042339e | [
"MIT"
] | null | null | null | bin/ADFRsuite/CCSBpckgs/mglutil/gui/BasicWidgets/Tk/Dial.py | AngelRuizMoreno/Jupyter_Dock_devel | 6d23bc174d5294d1e9909a0a1f9da0713042339e | [
"MIT"
] | null | null | null | bin/ADFRsuite/CCSBpckgs/mglutil/gui/BasicWidgets/Tk/Dial.py | AngelRuizMoreno/Jupyter_Dock_devel | 6d23bc174d5294d1e9909a0a1f9da0713042339e | [
"MIT"
] | 1 | 2021-11-04T21:48:14.000Z | 2021-11-04T21:48:14.000Z | ################################################################################
##
## 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 op... | 36.376638 | 87 | 0.547643 | 31,646 | 0.949731 | 0 | 0 | 0 | 0 | 0 | 0 | 8,394 | 0.251913 |
6a9d42bd307c1507375c76e403f46b3901bbf76d | 3,560 | py | Python | qt-creator-opensource-src-4.6.1/scripts/checkInstalledFiles.py | kevinlq/Qt-Creator-Opensource-Study | b8cadff1f33f25a5d4ef33ed93f661b788b1ba0f | [
"MIT"
] | 5 | 2018-12-22T14:49:13.000Z | 2022-01-13T07:21:46.000Z | qt-creator-opensource-src-4.6.1/scripts/checkInstalledFiles.py | kevinlq/Qt-Creator-Opensource-Study | b8cadff1f33f25a5d4ef33ed93f661b788b1ba0f | [
"MIT"
] | null | null | null | qt-creator-opensource-src-4.6.1/scripts/checkInstalledFiles.py | kevinlq/Qt-Creator-Opensource-Study | b8cadff1f33f25a5d4ef33ed93f661b788b1ba0f | [
"MIT"
] | 8 | 2018-07-17T03:55:48.000Z | 2021-12-22T06:37:53.000Z | #!/usr/bin/env python
############################################################################
#
# Copyright (C) 2016 The Qt Company Ltd.
# Contact: https://www.qt.io/licensing/
#
# This file is part of Qt Creator.
#
# Commercial License Usage
# Licensees holding valid commercial Qt licenses may use this file in
#... | 31.504425 | 136 | 0.608989 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,497 | 0.420506 |
6a9da9d2fe8534cba2998ec7d3c2190abe55abec | 5,190 | py | Python | deep_sdf/workspace.py | huajian1069/non-convex_optimisation | cf4cd5070524c3f7e6b814fe9b85a15a06e7b8db | [
"MIT"
] | 2 | 2020-10-12T19:22:50.000Z | 2021-08-21T21:48:27.000Z | deep_sdf/workspace.py | huajian1069/non-convex_optimisation | cf4cd5070524c3f7e6b814fe9b85a15a06e7b8db | [
"MIT"
] | 13 | 2020-04-17T09:07:06.000Z | 2020-07-25T19:43:44.000Z | deep_sdf/workspace.py | huajian1069/non-convex-optimisation | cf4cd5070524c3f7e6b814fe9b85a15a06e7b8db | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2004-present Facebook. All Rights Reserved.
import json
import os
import torch
model_params_subdir = "ModelParameters"
optimizer_params_subdir = "OptimizerParameters"
latent_codes_subdir = "LatentCodes"
logs_filename = "Logs.pth"
reconstructions_subdir = "Reconstructions"
reconstruc... | 25.566502 | 82 | 0.7158 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 723 | 0.139306 |
6a9e779e59feb114fa5c597307d0f0ba536c3a82 | 1,571 | py | Python | EmoPy/EmoPy/examples/convolutional_dropout_model.py | Rahmatullina/FinalYearProject | 326f521b9f600dbbc7ace2223bd5aafc79b2267c | [
"Apache-2.0"
] | null | null | null | EmoPy/EmoPy/examples/convolutional_dropout_model.py | Rahmatullina/FinalYearProject | 326f521b9f600dbbc7ace2223bd5aafc79b2267c | [
"Apache-2.0"
] | 9 | 2020-09-26T01:09:35.000Z | 2022-02-10T01:32:30.000Z | EmoPy/EmoPy/examples/convolutional_dropout_model.py | Rahmatullina/FinalYearProject | 326f521b9f600dbbc7ace2223bd5aafc79b2267c | [
"Apache-2.0"
] | null | null | null | from EmoPy.src.fermodel import FERModel
from EmoPy.src.directory_data_loader import DirectoryDataLoader
from EmoPy.src.csv_data_loader import CSVDataLoader
from EmoPy.src.data_generator import DataGenerator
from EmoPy.src.neuralnets import ConvolutionalNNDropout
from sklearn.model_selection import train_test_split
impo... | 38.317073 | 121 | 0.789306 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 333 | 0.211967 |
6a9f3ae293c23801e109a6d38cb1d3e6cf12238a | 189 | py | Python | ENV/lib/python3.6/site-packages/pyramid_jinja2/tests/extensions.py | captain-c00keys/pyramid-stocks | 0acf3363a6a7ee61cd41b855f43c9d6f9582ae6a | [
"MIT"
] | null | null | null | ENV/lib/python3.6/site-packages/pyramid_jinja2/tests/extensions.py | captain-c00keys/pyramid-stocks | 0acf3363a6a7ee61cd41b855f43c9d6f9582ae6a | [
"MIT"
] | null | null | null | ENV/lib/python3.6/site-packages/pyramid_jinja2/tests/extensions.py | captain-c00keys/pyramid-stocks | 0acf3363a6a7ee61cd41b855f43c9d6f9582ae6a | [
"MIT"
] | null | null | null | from jinja2 import nodes
from jinja2.ext import Extension
class TestExtension(Extension):
tags = {'test_ext'}
def parse(self, parser): return nodes.Const("This is test extension")
| 27 | 73 | 0.746032 | 129 | 0.68254 | 0 | 0 | 0 | 0 | 0 | 0 | 34 | 0.179894 |
6a9f71d63576d36e576c5ed1a561ba09b6a33e88 | 45,622 | py | Python | deepstream_ignition_usb_yolo.py | valdivj/Deepstream-IGN-Maker-YOLO | f38ece731e9797a525da932c3da2de77e48f45af | [
"Unlicense"
] | 18 | 2021-02-09T11:07:57.000Z | 2022-03-16T12:35:34.000Z | deepstream_ignition_usb_yolo.py | valdivj/Deepstream-IGN-Maker-YOLO | f38ece731e9797a525da932c3da2de77e48f45af | [
"Unlicense"
] | null | null | null | deepstream_ignition_usb_yolo.py | valdivj/Deepstream-IGN-Maker-YOLO | f38ece731e9797a525da932c3da2de77e48f45af | [
"Unlicense"
] | 3 | 2021-02-11T00:23:56.000Z | 2021-11-16T02:15:37.000Z | #!/usr/bin/env python3
################################################################################
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),... | 46.410987 | 849 | 0.645829 | 761 | 0.016681 | 0 | 0 | 0 | 0 | 0 | 0 | 18,586 | 0.407391 |
6a9fcd8ecc089595a2ffc3a48b4ee67000ac218d | 799 | py | Python | src/pyams_i18n/tests/__init__.py | Py-AMS/pyams-i18n | dbb3953302311977653145385af02e4d1ae41431 | [
"ZPL-2.1"
] | null | null | null | src/pyams_i18n/tests/__init__.py | Py-AMS/pyams-i18n | dbb3953302311977653145385af02e4d1ae41431 | [
"ZPL-2.1"
] | null | null | null | src/pyams_i18n/tests/__init__.py | Py-AMS/pyams-i18n | dbb3953302311977653145385af02e4d1ae41431 | [
"ZPL-2.1"
] | null | null | null | #
# Copyright (c) 2015-2019 Thierry Florac <tflorac AT ulthar.net>
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRAN... | 26.633333 | 75 | 0.740926 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 572 | 0.715895 |
6a9fd697438b33b3c4d1fb77bd83291ab92dfcca | 1,811 | py | Python | tests/test_custom_experts.py | protagohhz/hivemind | 487fb68feea4d27ede0afdef211f6edc889b1a9e | [
"MIT"
] | 1,026 | 2020-06-04T05:02:30.000Z | 2022-03-29T13:05:04.000Z | tests/test_custom_experts.py | mryab/hivemind | 595b831bcaac6b4d8da215de70b8138ac548c562 | [
"MIT"
] | 301 | 2020-04-04T14:26:49.000Z | 2022-03-19T15:25:39.000Z | tests/test_custom_experts.py | learning-at-home/tesseract | c6b2b2d84ccfc890314a2bfece8eef238372d410 | [
"MIT"
] | 89 | 2020-04-16T19:39:29.000Z | 2022-03-25T17:32:43.000Z | import os
import pytest
import torch
from hivemind import RemoteExpert
from hivemind.moe.server import background_server
CUSTOM_EXPERTS_PATH = os.path.join(os.path.dirname(__file__), "test_utils", "custom_networks.py")
@pytest.mark.forked
def test_custom_expert(hid_dim=16):
with background_server(
expe... | 27.439394 | 97 | 0.600773 | 0 | 0 | 0 | 0 | 1,583 | 0.874103 | 0 | 0 | 105 | 0.057979 |
6aa02482ee4345f8d62c98b8785e029ed85945dd | 1,639 | py | Python | tqsdk/demo/example/momentum.py | boyscout2008/tqsdk-python | 79496a938a44f79ea9164569637509d0cc7db70a | [
"Apache-2.0"
] | null | null | null | tqsdk/demo/example/momentum.py | boyscout2008/tqsdk-python | 79496a938a44f79ea9164569637509d0cc7db70a | [
"Apache-2.0"
] | null | null | null | tqsdk/demo/example/momentum.py | boyscout2008/tqsdk-python | 79496a938a44f79ea9164569637509d0cc7db70a | [
"Apache-2.0"
] | 1 | 2020-11-20T01:19:11.000Z | 2020-11-20T01:19:11.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = "Ringo"
'''
价格动量 策略 (难度:初级)
参考: https://www.shinnytech.com/blog/momentum-strategy/
注: 该示例策略仅用于功能示范, 实盘时请根据自己的策略/经验进行修改
'''
from tqsdk import TqAccount, TqApi, TargetPosTask
# 设置指定合约,获取N条K线计算价格动量
SYMBOL = "SHFE.au1912"
N = 15
api = TqApi()
klines = api.get_... | 26.015873 | 90 | 0.621721 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 910 | 0.43687 |
6aa1d7c9f54267d6e42717a153600f7e111a7f9f | 10,323 | py | Python | color_transfer/__init__.py | AdamSpannbauer/color_transfer | 155e0134615f35bf19bf32f4cacf056603604914 | [
"MIT"
] | null | null | null | color_transfer/__init__.py | AdamSpannbauer/color_transfer | 155e0134615f35bf19bf32f4cacf056603604914 | [
"MIT"
] | null | null | null | color_transfer/__init__.py | AdamSpannbauer/color_transfer | 155e0134615f35bf19bf32f4cacf056603604914 | [
"MIT"
] | 1 | 2020-11-05T17:35:14.000Z | 2020-11-05T17:35:14.000Z | # import the necessary packages
import numpy as np
import cv2
import imutils
def color_transfer(source, target, clip=True, preserve_paper=True):
"""
Transfers the color distribution from the source to the target
image using the mean and standard deviations of the L*a*b*
color space.
This implemen... | 36.477032 | 105 | 0.657173 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,400 | 0.523104 |
6aa21222a53d441e6c157bad6965004f0771b6e4 | 250 | py | Python | Python/Tree/TestCreateTreeLibraryImport.py | zseen/hackerrank-challenges | c154f039f58073ee3d94d012462c7055e68784b2 | [
"MIT"
] | null | null | null | Python/Tree/TestCreateTreeLibraryImport.py | zseen/hackerrank-challenges | c154f039f58073ee3d94d012462c7055e68784b2 | [
"MIT"
] | null | null | null | Python/Tree/TestCreateTreeLibraryImport.py | zseen/hackerrank-challenges | c154f039f58073ee3d94d012462c7055e68784b2 | [
"MIT"
] | null | null | null | from Library.CreateATree import CreateATree
tree = CreateATree.BinarySearchTree()
nodesList = list((4, 5, 1, 3, 2))
for i in range(0, len(nodesList)):
tree.insert(nodesList[i])
#tree.printInorder()
tree.printPreorder()
#tree.printPostorder()
| 19.230769 | 43 | 0.732 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 42 | 0.168 |
6aa25f7e4d64679c81ca1e60dffb6ddf922f9c4c | 522 | py | Python | application/siteApp/urls.py | Marcelotsvaz/vaz-projects | 8ccc0bf8d25f9276714e1e5ecb0a4e80f07442b4 | [
"Unlicense"
] | null | null | null | application/siteApp/urls.py | Marcelotsvaz/vaz-projects | 8ccc0bf8d25f9276714e1e5ecb0a4e80f07442b4 | [
"Unlicense"
] | null | null | null | application/siteApp/urls.py | Marcelotsvaz/vaz-projects | 8ccc0bf8d25f9276714e1e5ecb0a4e80f07442b4 | [
"Unlicense"
] | null | null | null | #
# VAZ Projects
#
#
# Author: Marcelo Tellier Sartori Vaz <marcelotsvaz@gmail.com>
from django.urls import path
from . import views
app_name = 'siteApp'
urlpatterns = [
path( '', views.Home.as_view(), name = 'home' ),
path( 'about-me', views.About_me.as_view(), name = 'about_me' ),
path( 'searc... | 23.727273 | 77 | 0.628352 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 189 | 0.362069 |
6aa2b3de5b891e225cac65fc5b3ebe31165e5ef6 | 63 | py | Python | svd/core/exc.py | epicosy/svd | baa91f57ee5bd51b0140d9d0b1b97ce39f18acc4 | [
"MIT"
] | null | null | null | svd/core/exc.py | epicosy/svd | baa91f57ee5bd51b0140d9d0b1b97ce39f18acc4 | [
"MIT"
] | null | null | null | svd/core/exc.py | epicosy/svd | baa91f57ee5bd51b0140d9d0b1b97ce39f18acc4 | [
"MIT"
] | null | null | null |
class SVDError(Exception):
"""Generic errors."""
pass
| 12.6 | 26 | 0.619048 | 61 | 0.968254 | 0 | 0 | 0 | 0 | 0 | 0 | 21 | 0.333333 |
6aa2cafc9ca0f9283336142e3b81fea44a3587b3 | 1,286 | py | Python | Classes/ServiceBase.py | tkeske/SMS-Fetcher | 7b3ec0ea4517ad11164b8e2d7ee2c60d2a9f0ed2 | [
"BSD-3-Clause"
] | null | null | null | Classes/ServiceBase.py | tkeske/SMS-Fetcher | 7b3ec0ea4517ad11164b8e2d7ee2c60d2a9f0ed2 | [
"BSD-3-Clause"
] | null | null | null | Classes/ServiceBase.py | tkeske/SMS-Fetcher | 7b3ec0ea4517ad11164b8e2d7ee2c60d2a9f0ed2 | [
"BSD-3-Clause"
] | null | null | null | '''
@author Tomáš Keske
@since 10.8.2019
'''
import sys
from jnius import autoclass
from Conf.Conf import *
class ServiceBase():
def __init__(self):
PythonServiceClass = autoclass('org.kivy.android.PythonService')
self.Context = autoclass('android.content.Context')
self.Service = Python... | 32.15 | 98 | 0.667963 | 1,176 | 0.913043 | 0 | 0 | 0 | 0 | 0 | 0 | 567 | 0.440217 |
6aa359b860399eb8f9859835f9d9ac0f53b4de56 | 723 | py | Python | api/queue/__init__.py | sofia008/api-redis-queue | 8d65665c8a9f44990565baa8c7ba43d7f01425d3 | [
"Apache-2.0"
] | null | null | null | api/queue/__init__.py | sofia008/api-redis-queue | 8d65665c8a9f44990565baa8c7ba43d7f01425d3 | [
"Apache-2.0"
] | null | null | null | api/queue/__init__.py | sofia008/api-redis-queue | 8d65665c8a9f44990565baa8c7ba43d7f01425d3 | [
"Apache-2.0"
] | null | null | null | # api/queue/__init__.py
import os
from flask import Flask
from flask_bootstrap import Bootstrap
# instantiate the extensions
bootstrap = Bootstrap()
def create_app(script_info=None):
# instantiate the app
app = Flask(
__name__,
template_folder="../client/templates",
static_folder=... | 19.026316 | 51 | 0.697095 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 211 | 0.29184 |
6aa447f55a379751c7664d4eb5818450b99462c4 | 2,183 | py | Python | tests/test_engine.py | Foxboron/python-adblock | 50b2ddba9f7b237b38c848c7d4a1637917444924 | [
"Apache-2.0",
"MIT"
] | 35 | 2020-06-26T21:06:13.000Z | 2022-03-19T10:50:35.000Z | tests/test_engine.py | Foxboron/python-adblock | 50b2ddba9f7b237b38c848c7d4a1637917444924 | [
"Apache-2.0",
"MIT"
] | 34 | 2020-04-27T02:59:40.000Z | 2022-03-06T20:55:00.000Z | tests/test_engine.py | Foxboron/python-adblock | 50b2ddba9f7b237b38c848c7d4a1637917444924 | [
"Apache-2.0",
"MIT"
] | 6 | 2020-12-22T21:56:02.000Z | 2022-02-16T02:13:21.000Z | import adblock
import pytest
SMALL_FILTER_LIST = """
||wikipedia.org^
||old.reddit.com^
||lobste.rs^
"""
def empty_engine():
return adblock.Engine(adblock.FilterSet())
def test_engine_creation_and_blocking():
filter_set = adblock.FilterSet(debug=True)
filter_set.add_filter_list(SMALL_FILTER_LIST)
e... | 29.106667 | 78 | 0.724233 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 345 | 0.158039 |
6aa4b1f3d6675f767aaa7329c04a4c62bcde0e63 | 232 | py | Python | v1/status_updates/urls.py | DucPhamTV/Bank | 4905ec7d63ef4daafe2119bf6b32928d4db2d4f2 | [
"MIT"
] | 94 | 2020-07-12T23:08:47.000Z | 2022-03-05T14:00:01.000Z | v1/status_updates/urls.py | DucPhamTV/Bank | 4905ec7d63ef4daafe2119bf6b32928d4db2d4f2 | [
"MIT"
] | 84 | 2020-07-13T23:30:50.000Z | 2022-03-15T15:47:46.000Z | v1/status_updates/urls.py | DucPhamTV/Bank | 4905ec7d63ef4daafe2119bf6b32928d4db2d4f2 | [
"MIT"
] | 63 | 2020-07-13T02:46:51.000Z | 2021-11-26T09:29:29.000Z | from rest_framework.routers import SimpleRouter
from .views.upgrade_notice import UpgradeNoticeViewSet
router = SimpleRouter(trailing_slash=False)
router.register('upgrade_notice', UpgradeNoticeViewSet, basename='upgrade_notice')
| 33.142857 | 82 | 0.857759 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 32 | 0.137931 |
6aa55947380a65f7c24093ff3b3feee2ac3b5948 | 1,048 | py | Python | data_structures/stack/largest_rectangle_area_in_histogram.py | ruler30cm/python-ds | f84605c5b746ea1d46de3d00b86f5fba399445c7 | [
"MIT"
] | 1,723 | 2019-07-30T07:06:22.000Z | 2022-03-31T15:22:22.000Z | data_structures/stack/largest_rectangle_area_in_histogram.py | ruler30cm/python-ds | f84605c5b746ea1d46de3d00b86f5fba399445c7 | [
"MIT"
] | 213 | 2019-10-06T08:07:47.000Z | 2021-10-04T15:38:36.000Z | data_structures/stack/largest_rectangle_area_in_histogram.py | ruler30cm/python-ds | f84605c5b746ea1d46de3d00b86f5fba399445c7 | [
"MIT"
] | 628 | 2019-10-06T10:26:25.000Z | 2022-03-31T01:41:00.000Z | '''
Largest rectangle area in a histogram::
Find the largest rectangular area possible in a given histogram where the largest rectangle can be made of a number of contiguous bars.
For simplicity, assume that all bars have same width and the width is 1 unit.
'''
def max_area_histogram(histogram):
stack = list()... | 28.324324 | 136 | 0.603053 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 301 | 0.287214 |
6aa62343269180c72e1026d8bfdc9d3fa9196b1e | 7,448 | py | Python | gluon/contrib/pbkdf2_ctypes.py | Cwlowe/web2py | 6ae4c3c274be1026cbc45b0fcd8d1180c74b9070 | [
"BSD-3-Clause"
] | 9 | 2018-04-19T05:08:30.000Z | 2021-11-23T07:36:58.000Z | gluon/contrib/pbkdf2_ctypes.py | mohit3011/Quiz-Mate | 17988a623abde439aef2b43fc8dc3162b5cae15e | [
"BSD-3-Clause"
] | 98 | 2017-11-02T19:00:44.000Z | 2022-03-22T16:15:39.000Z | gluon/contrib/pbkdf2_ctypes.py | mohit3011/Quiz-Mate | 17988a623abde439aef2b43fc8dc3162b5cae15e | [
"BSD-3-Clause"
] | 9 | 2017-10-24T21:53:36.000Z | 2021-11-23T07:36:59.000Z | # -*- coding: utf-8 -*-
"""
pbkdf2_ctypes
~~~~~~
Fast pbkdf2.
This module implements pbkdf2 for Python using crypto lib from
openssl or commoncrypto.
Note: This module is intended as a plugin replacement of pbkdf2.py
by Armin Ronacher.
Git repository:
$ git clone https://github.c... | 38.194872 | 88 | 0.569683 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,354 | 0.181794 |
6aa72ed7ab8eb40be3928ae652b97a0368992b42 | 2,389 | py | Python | auth_backend/src/key_op.py | cispa/bitahoy | ffc2004930a033cfb94d13671bc6068b473ce226 | [
"MIT"
] | null | null | null | auth_backend/src/key_op.py | cispa/bitahoy | ffc2004930a033cfb94d13671bc6068b473ce226 | [
"MIT"
] | null | null | null | auth_backend/src/key_op.py | cispa/bitahoy | ffc2004930a033cfb94d13671bc6068b473ce226 | [
"MIT"
] | 2 | 2021-12-30T16:48:15.000Z | 2022-01-14T14:21:15.000Z | import sys
import os
import psycopg2
import base64
from cryptography.hazmat.primitives import serialization, hashes
from cryptography.hazmat.primitives.asymmetric import padding, rsa
from cryptography.hazmat.backends import default_backend
import time
if len(sys.argv) < 2:
print("Please enter either create or rem... | 45.942308 | 184 | 0.637505 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 695 | 0.290917 |
6aa73c2ad6102f4cce8d4e90a98090c3f6fe5363 | 342 | py | Python | src/tools/types/obj.py | loongson-zn/build | d4bedebfa046b763c316e31c98b48ed2779741b9 | [
"BSL-1.0"
] | 215 | 2015-01-10T17:16:34.000Z | 2022-02-23T15:22:08.000Z | src/tools/types/obj.py | loongson-zn/build | d4bedebfa046b763c316e31c98b48ed2779741b9 | [
"BSL-1.0"
] | 594 | 2015-01-22T16:17:55.000Z | 2022-02-26T22:11:01.000Z | src/tools/types/obj.py | loongson-zn/build | d4bedebfa046b763c316e31c98b48ed2779741b9 | [
"BSL-1.0"
] | 302 | 2015-02-03T01:20:29.000Z | 2022-02-12T07:01:28.000Z | # Copyright David Abrahams 2004. Distributed under the Boost
# Software License, Version 1.0. (See accompanying
# file LICENSE.txt or copy at https://www.bfgroup.xyz/b2/LICENSE.txt)
from b2.build import type
def register ():
type.register_type ('OBJ', ['obj'], None, ['NT', 'CYGWIN'])
type.register_type ('OBJ'... | 28.5 | 69 | 0.692982 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 209 | 0.611111 |
6aa7fd8436efabe5593a8174e9772f897fb7aec0 | 4,465 | py | Python | sympy/polys/tests/test_sqfreetools.py | eriknw/sympy | b7544e2bb74c011f6098a7e886fd77f41776c2c4 | [
"BSD-3-Clause"
] | 7 | 2015-01-14T06:55:33.000Z | 2018-08-11T14:43:52.000Z | sympy/polys/tests/test_sqfreetools.py | pbeltran/sympy-1 | 94f92b36731c2bebe6de1037c063c2a258a8a399 | [
"BSD-3-Clause"
] | 1 | 2018-02-19T04:56:04.000Z | 2018-02-19T04:56:04.000Z | sympy/polys/tests/test_sqfreetools.py | pbeltran/sympy-1 | 94f92b36731c2bebe6de1037c063c2a258a8a399 | [
"BSD-3-Clause"
] | 1 | 2016-04-24T14:39:22.000Z | 2016-04-24T14:39:22.000Z | """Tests for square-free decomposition algorithms and related tools. """
from sympy.polys.rings import ring
from sympy.polys.domains import FF, ZZ, QQ
from sympy.polys.polyclasses import DMP
from sympy.polys.specialpolys import f_polys
from sympy.utilities.pytest import raises
f_0, f_1, f_2, f_3, f_4, f_5, f_6 = f_p... | 29.569536 | 100 | 0.519821 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 138 | 0.030907 |
6aa848925fe885025486d711e7226e473656a954 | 1,377 | py | Python | ezno_convert/enums.py | ofersadan85/ezno_convert | 4c5cf7d41c72698e5486068673f170d968a9de27 | [
"MIT"
] | 2 | 2021-02-07T21:27:04.000Z | 2021-03-13T06:47:25.000Z | ezno_convert/enums.py | ofersadan85/ezno_convert | 4c5cf7d41c72698e5486068673f170d968a9de27 | [
"MIT"
] | 1 | 2021-02-10T05:45:00.000Z | 2021-02-10T05:45:00.000Z | ezno_convert/enums.py | ofersadan85/ezno_convert | 4c5cf7d41c72698e5486068673f170d968a9de27 | [
"MIT"
] | null | null | null | import enum
from typing import Union
@enum.unique
class PPT(enum.Enum):
# Source: https://docs.microsoft.com/en-us/office/vba/api/powerpoint.ppsaveasfiletype
AnimatedGIF = 40
BMP = 19
Default = 11
EMF = 23
External = 64000
GIF = 16
JPG = 17
META = 15
MP4 = 39
OpenPresentati... | 20.863636 | 114 | 0.611474 | 1,256 | 0.912128 | 0 | 0 | 1,295 | 0.94045 | 0 | 0 | 451 | 0.327524 |
6aa897704d8b8b96376b6c78aa9de27ecec18071 | 378 | py | Python | app/django_first/news/migrations/0002_movies_year.py | vvuri/flask_pipeline | d3f283b8a6a6239e56d85e67dbe3edce55bcb980 | [
"MIT"
] | null | null | null | app/django_first/news/migrations/0002_movies_year.py | vvuri/flask_pipeline | d3f283b8a6a6239e56d85e67dbe3edce55bcb980 | [
"MIT"
] | null | null | null | app/django_first/news/migrations/0002_movies_year.py | vvuri/flask_pipeline | d3f283b8a6a6239e56d85e67dbe3edce55bcb980 | [
"MIT"
] | null | null | null | # Generated by Django 4.0.1 on 2022-01-19 23:58
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('news', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='movies',
name='year',
field=mo... | 19.894737 | 60 | 0.582011 | 285 | 0.753968 | 0 | 0 | 0 | 0 | 0 | 0 | 81 | 0.214286 |
6aa93bd0cfbc5bae7eaa0365dd95b7de863c0e17 | 653 | py | Python | scripts/issue_param_value.py | Jhsmit/awesome-panel-extensions | 41eba7cf84caa911be4ed0df2a96e16fc1e70263 | [
"CC-BY-4.0"
] | 3 | 2020-07-16T07:28:45.000Z | 2020-07-17T12:53:56.000Z | scripts/issue_param_value.py | MarcSkovMadsen/panel-extensions-template | f41ad8d8fb8502f87de3a4992917cbffb6299012 | [
"CC-BY-4.0"
] | null | null | null | scripts/issue_param_value.py | MarcSkovMadsen/panel-extensions-template | f41ad8d8fb8502f87de3a4992917cbffb6299012 | [
"CC-BY-4.0"
] | null | null | null | import panel as pn
import param
from awesome_panel_extensions.frameworks.fast import FastTemplate, FastTextInput
WIDGETS = {
"some_text": {"type": FastTextInput, "readonly": True, "sizing_mode": "fixed", "width": 400}
}
class ParameterizedApp(param.Parameterized):
some_text = param.String(default="This is s... | 27.208333 | 96 | 0.735069 | 280 | 0.42879 | 0 | 0 | 0 | 0 | 0 | 0 | 84 | 0.128637 |
6aaa29259fb6e01655aa91ee60654bb2eceee036 | 1,271 | py | Python | gjqyxyxxcxxt/gjqyxyxxcxxt/queue_companies.py | AisinoPythonTeam/PythonAiniso | 983a29962752679d8cc26a2c3cdb0ba8fcfa3f02 | [
"Apache-2.0"
] | null | null | null | gjqyxyxxcxxt/gjqyxyxxcxxt/queue_companies.py | AisinoPythonTeam/PythonAiniso | 983a29962752679d8cc26a2c3cdb0ba8fcfa3f02 | [
"Apache-2.0"
] | null | null | null | gjqyxyxxcxxt/gjqyxyxxcxxt/queue_companies.py | AisinoPythonTeam/PythonAiniso | 983a29962752679d8cc26a2c3cdb0ba8fcfa3f02 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import pymysql
import sys, os, json, time, pymongo
app_dir = os.path.abspath("../")
sys.path.append(app_dir)
from gjqyxyxxcxxt import settings
from gjqyxyxxcxxt.database.my_redis import QueueRedis
conn = None
def connect_db():
global conn
conn = pymysql.connect(host="172.16.16.15",port... | 24.921569 | 125 | 0.650669 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 240 | 0.183066 |
6aab26683b9b2a063b1ca8928d6b0655775e0f6b | 86,132 | py | Python | model/entity_quotes.py | tkuculo/QuoteKG | a7b7d323679624a9cd3805e866028fad0a5a5408 | [
"MIT"
] | null | null | null | model/entity_quotes.py | tkuculo/QuoteKG | a7b7d323679624a9cd3805e866028fad0a5a5408 | [
"MIT"
] | null | null | null | model/entity_quotes.py | tkuculo/QuoteKG | a7b7d323679624a9cd3805e866028fad0a5a5408 | [
"MIT"
] | null | null | null | #main_section > lines > line > text
#main_section > lines > line > sub_line > text
#main_section > sub_sections
#main_section > templates > type
#main_section > templates > empty_values
#main_section > templates > values
#main_section > templates > sub_templates
#main_section > title > line > text
from transformers.mod... | 337.772549 | 1,878 | 0.652603 | 4,117 | 0.036174 | 0 | 0 | 0 | 0 | 0 | 0 | 97,659 | 0.858073 |
6aab6b3ba732d64220b4fb1bf6b4cc739254d1fe | 1,019 | py | Python | tests/pm/update_sla.py | supsi-dacd-isaac/parity-sidechain-interface | b64a5fb724955332afb4998344081d1b93ac216a | [
"MIT"
] | null | null | null | tests/pm/update_sla.py | supsi-dacd-isaac/parity-sidechain-interface | b64a5fb724955332afb4998344081d1b93ac216a | [
"MIT"
] | null | null | null | tests/pm/update_sla.py | supsi-dacd-isaac/parity-sidechain-interface | b64a5fb724955332afb4998344081d1b93ac216a | [
"MIT"
] | null | null | null | # Importing section
import json
import requests
import argparse
import hashlib
import time
from http import HTTPStatus
# Main
if __name__ == "__main__":
arg_parser = argparse.ArgumentParser()
args = arg_parser.parse_args()
set_cmd = 'updateSla'
params = {
'idx': 'sla04',
... | 24.261905 | 80 | 0.617272 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 337 | 0.330716 |
6aac1f4d092634d65b03e7c6699787370a84bac7 | 498 | py | Python | array/python3/5_move_all_negative_elements.py | jitendragangwar123/cp | 8d9da1abd841784da8304e7ebb64a6b94cb804bb | [
"MIT"
] | null | null | null | array/python3/5_move_all_negative_elements.py | jitendragangwar123/cp | 8d9da1abd841784da8304e7ebb64a6b94cb804bb | [
"MIT"
] | 1 | 2020-12-12T19:09:01.000Z | 2020-12-12T19:09:01.000Z | array/python3/5_move_all_negative_elements.py | jitendragangwar123/cp | 8d9da1abd841784da8304e7ebb64a6b94cb804bb | [
"MIT"
] | 1 | 2020-12-12T18:36:24.000Z | 2020-12-12T18:36:24.000Z | def sort(arr):
# Start index 0.
start = 0
# End index
end = len(arr)-1
while start <= end:
# Swap all positive value with last index end & decrease end by 1.
if arr[start] >= 0:
arr[start], arr[end] = arr[end], arr[start]
end -= 1
else:
# ... | 23.714286 | 74 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 160 | 0.321285 |
6aac551e77cffa8d22df81867eace49a7797fd1d | 1,199 | py | Python | misc.py | hldai/wikiprocesspy | 788ccb6f0e0e54a7322863d5a13332635afc240d | [
"MIT"
] | null | null | null | misc.py | hldai/wikiprocesspy | 788ccb6f0e0e54a7322863d5a13332635afc240d | [
"MIT"
] | null | null | null | misc.py | hldai/wikiprocesspy | 788ccb6f0e0e54a7322863d5a13332635afc240d | [
"MIT"
] | null | null | null | import json
def __text_from_anchor_sents_file(anchor_sents_file, output_file):
f = open(anchor_sents_file, encoding='utf-8')
fout = open(output_file, 'w', encoding='utf-8', newline='\n')
for i, line in enumerate(f):
sent = json.loads(line)
fout.write('{}\n'.format(sent['tokens']))
... | 35.264706 | 118 | 0.686405 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 481 | 0.401168 |
6aad34cdb7b95e79e68448f602b65f3d09cae50a | 1,106 | py | Python | test/smptest.py | myrtam/CANNR | b966a873ec60264b0fd42b81edadb5495237d7ea | [
"Apache-2.0"
] | null | null | null | test/smptest.py | myrtam/CANNR | b966a873ec60264b0fd42b81edadb5495237d7ea | [
"Apache-2.0"
] | null | null | null | test/smptest.py | myrtam/CANNR | b966a873ec60264b0fd42b81edadb5495237d7ea | [
"Apache-2.0"
] | 1 | 2021-05-14T08:37:37.000Z | 2021-05-14T08:37:37.000Z | """
Test harness for smp.py
"""
import sys
import os
sys.path.append('/Users/ptendick/open-source-workspace/cannr Image/source/cannr/lib')
os.environ['PATH'] = '/Library/Frameworks/Python.framework/Versions/3.7/bin:' + os.environ['PATH']
import cannr
import smp
# Test openProcess by opening a Flask process
def test_o... | 32.529412 | 108 | 0.705244 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 666 | 0.60217 |
6aad4ce5dfa92a930b5b7dfb6e85c80cb8498743 | 2,833 | py | Python | neural_toolbox/inception.py | ibrahimSouleiman/GuessWhat | 60d140de1aae5ccda27e7d3eef2b9fb9548f0854 | [
"Apache-2.0"
] | null | null | null | neural_toolbox/inception.py | ibrahimSouleiman/GuessWhat | 60d140de1aae5ccda27e7d3eef2b9fb9548f0854 | [
"Apache-2.0"
] | null | null | null | neural_toolbox/inception.py | ibrahimSouleiman/GuessWhat | 60d140de1aae5ccda27e7d3eef2b9fb9548f0854 | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
import tensorflow.contrib.slim as slim
import tensorflow.contrib.slim.python.slim.nets.resnet_v1 as resnet_v1
import tensorflow.contrib.slim.python.slim.nets.inception_v1 as inception_v1
import tensorflow.contrib.slim.python.slim.nets.resnet_utils as slim_utils
from tensorflow.contrib import l... | 36.320513 | 143 | 0.676668 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,527 | 0.539005 |
6aad74ee52655f68220f799efaffcbccdd0748ad | 6,133 | py | Python | timm/utils/checkpoint_saver.py | Robert-JunWang/pytorch-image-models | 7c67d6aca992f039eece0af5f7c29a43d48c00e4 | [
"Apache-2.0"
] | 17,769 | 2019-05-02T08:08:25.000Z | 2022-03-31T22:14:44.000Z | timm/utils/checkpoint_saver.py | jonychoi/pytorch-image-models | e4360e6125bb0bb4279785810c8eb33b40af3ebd | [
"Apache-2.0"
] | 556 | 2019-05-26T16:31:37.000Z | 2022-03-30T04:21:07.000Z | timm/utils/checkpoint_saver.py | jonychoi/pytorch-image-models | e4360e6125bb0bb4279785810c8eb33b40af3ebd | [
"Apache-2.0"
] | 3,029 | 2019-05-14T01:18:28.000Z | 2022-03-31T20:09:50.000Z | """ Checkpoint Saver
Track top-n training checkpoints and maintain recovery checkpoints on specified intervals.
Hacked together by / Copyright 2020 Ross Wightman
"""
import glob
import operator
import os
import logging
import torch
from .model import unwrap_model, get_state_dict
_logger = logging.getLogger(__nam... | 40.615894 | 104 | 0.626121 | 5,805 | 0.946519 | 0 | 0 | 0 | 0 | 0 | 0 | 779 | 0.127018 |
6aad9dd74183fdbafeb45c7c06a4bb4ab92534aa | 292 | py | Python | AGC004/AGC004a.py | VolgaKurvar/AtCoder | 21acb489f1594bbb1cdc64fbf8421d876b5b476d | [
"Unlicense"
] | null | null | null | AGC004/AGC004a.py | VolgaKurvar/AtCoder | 21acb489f1594bbb1cdc64fbf8421d876b5b476d | [
"Unlicense"
] | null | null | null | AGC004/AGC004a.py | VolgaKurvar/AtCoder | 21acb489f1594bbb1cdc64fbf8421d876b5b476d | [
"Unlicense"
] | null | null | null | # AGC004a
def main():
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
a, b, c = map(int, input().split())
if a % 2 == 0 or b % 2 == 0 or c % 2 == 0:
print(0)
exit(0)
print(min(a*b, b*c, c*a))
if __name__ == '__main__':
main()
| 18.25 | 46 | 0.506849 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 19 | 0.065068 |
6aae27568c85842fa9dbea1ace5c81d9190ab20e | 12,603 | py | Python | glance/tests/functional/test_api.py | arvindn05/glance | 055d15a6ba5d132f649156eac0fc91f4cd2813e4 | [
"Apache-2.0"
] | null | null | null | glance/tests/functional/test_api.py | arvindn05/glance | 055d15a6ba5d132f649156eac0fc91f4cd2813e4 | [
"Apache-2.0"
] | null | null | null | glance/tests/functional/test_api.py | arvindn05/glance | 055d15a6ba5d132f649156eac0fc91f4cd2813e4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | 39.261682 | 78 | 0.614933 | 9,962 | 0.790447 | 0 | 0 | 0 | 0 | 0 | 0 | 4,332 | 0.343728 |
6ab135f81cd0354b89240b44a37bacfa732bfab3 | 13,664 | py | Python | qcore/asserts.py | corey-sobel/qcore | 719a44617789e3cc384ce860031d9479ee0877e4 | [
"Apache-2.0"
] | 1 | 2022-01-31T23:15:48.000Z | 2022-01-31T23:15:48.000Z | qcore/asserts.py | corey-sobel/qcore | 719a44617789e3cc384ce860031d9479ee0877e4 | [
"Apache-2.0"
] | null | null | null | qcore/asserts.py | corey-sobel/qcore | 719a44617789e3cc384ce860031d9479ee0877e4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Quora, 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 writing, so... | 34.592405 | 100 | 0.640222 | 2,050 | 0.150029 | 0 | 0 | 0 | 0 | 0 | 0 | 5,021 | 0.367462 |
6ab1bd9218aece261b575574072df1d919112085 | 1,108 | py | Python | lib/galaxy/web/__init__.py | rikeshi/galaxy | c536a877e4a9b3d12aa0d00fd4d5e705109a0d0a | [
"CC-BY-3.0"
] | 4 | 2015-05-12T20:36:41.000Z | 2017-06-26T15:34:02.000Z | lib/galaxy/web/__init__.py | rikeshi/galaxy | c536a877e4a9b3d12aa0d00fd4d5e705109a0d0a | [
"CC-BY-3.0"
] | 52 | 2015-03-16T14:02:14.000Z | 2021-12-24T09:50:23.000Z | lib/galaxy/web/__init__.py | rikeshi/galaxy | c536a877e4a9b3d12aa0d00fd4d5e705109a0d0a | [
"CC-BY-3.0"
] | 1 | 2016-03-21T12:54:06.000Z | 2016-03-21T12:54:06.000Z | """
The Galaxy web application framework
"""
from .framework import url_for
from .framework.base import httpexceptions
from .framework.decorators import (
do_not_cache,
error,
expose,
expose_api,
expose_api_anonymous,
expose_api_anonymous_and_sessionless,
expose_api_raw,
expose_api_raw_... | 30.777778 | 74 | 0.737365 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 449 | 0.405235 |
6ab21446cecd0d46b1a47275470353f326cec4d7 | 6,318 | py | Python | src/python/pants/core/goals/check_test.py | yoav-orca/pants | 995448e9add343975844c7a43d5d64618fc4e4d9 | [
"Apache-2.0"
] | 1,806 | 2015-01-05T07:31:00.000Z | 2022-03-31T11:35:41.000Z | src/python/pants/core/goals/check_test.py | yoav-orca/pants | 995448e9add343975844c7a43d5d64618fc4e4d9 | [
"Apache-2.0"
] | 9,565 | 2015-01-02T19:01:59.000Z | 2022-03-31T23:25:16.000Z | src/python/pants/core/goals/check_test.py | riisi/pants | b33327389fab67c47b919710ea32f20ca284b1a6 | [
"Apache-2.0"
] | 443 | 2015-01-06T20:17:57.000Z | 2022-03-31T05:28:17.000Z | # Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from abc import ABCMeta, abstractmethod
from pathlib import Path
from textwrap import dedent
from typing import ClassVar, Iterable, List, Optional, Tuple, Type
from pants.core.goals.check... | 28.459459 | 99 | 0.650681 | 1,946 | 0.307619 | 0 | 0 | 1,060 | 0.167562 | 0 | 0 | 921 | 0.14559 |
6ab219191a7ea6ce5d831e0b7655a8775e4ac26e | 9,851 | py | Python | data-processing/entities/definitions/model/utils.py | alexkreidler/scholarphi | 86d26d0bfa5ded00760fba1a9c6891a94a3dd6d2 | [
"Apache-2.0"
] | null | null | null | data-processing/entities/definitions/model/utils.py | alexkreidler/scholarphi | 86d26d0bfa5ded00760fba1a9c6891a94a3dd6d2 | [
"Apache-2.0"
] | null | null | null | data-processing/entities/definitions/model/utils.py | alexkreidler/scholarphi | 86d26d0bfa5ded00760fba1a9c6891a94a3dd6d2 | [
"Apache-2.0"
] | 1 | 2020-10-23T12:36:11.000Z | 2020-10-23T12:36:11.000Z | import os
import random
from typing import Any, Dict, List, Union
import numpy as np
import torch
from colorama import Fore, Style
from sklearn.metrics import f1_score
from sklearn.metrics import precision_recall_fscore_support as score
from sklearn.metrics import precision_score, recall_score
def highlight(input_: ... | 35.952555 | 376 | 0.66308 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,143 | 0.217365 |
6ab2ef53d9a0815c477ae2435981a3a0029d019b | 11,463 | py | Python | fire/trace.py | nvhoang55/python-fire | b78287f6d68208732ca4d91e57f4678e6c4747c7 | [
"Apache-2.0"
] | null | null | null | fire/trace.py | nvhoang55/python-fire | b78287f6d68208732ca4d91e57f4678e6c4747c7 | [
"Apache-2.0"
] | null | null | null | fire/trace.py | nvhoang55/python-fire | b78287f6d68208732ca4d91e57f4678e6c4747c7 | [
"Apache-2.0"
] | 1 | 2022-01-17T08:35:09.000Z | 2022-01-17T08:35:09.000Z | # Copyright (C) 2018 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 36.275316 | 84 | 0.640932 | 9,799 | 0.854837 | 0 | 0 | 0 | 0 | 0 | 0 | 6,005 | 0.523859 |
6ab36187809db9e1ba202abbdfa4e21a0d5b6dfb | 33,549 | py | Python | test/unit/__init__.py | thiagodasilva/swift | 0553d9333ed0045c4d209065b315533a33e5d7d7 | [
"Apache-2.0"
] | null | null | null | test/unit/__init__.py | thiagodasilva/swift | 0553d9333ed0045c4d209065b315533a33e5d7d7 | [
"Apache-2.0"
] | null | null | null | test/unit/__init__.py | thiagodasilva/swift | 0553d9333ed0045c4d209065b315533a33e5d7d7 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2010-2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | 32.104306 | 79 | 0.592924 | 22,331 | 0.665623 | 2,782 | 0.082923 | 3,072 | 0.091568 | 0 | 0 | 8,031 | 0.239381 |
6ab3a62e50f821717cc617bcae69096621bae1d3 | 10,138 | py | Python | fairseq/models/bart/model.py | samsontmr/fairseq | 1d50b6dcd961faaa74ee32e9d7a02ff76f16ab87 | [
"MIT"
] | 172 | 2019-08-22T14:20:25.000Z | 2022-02-16T07:38:12.000Z | fairseq/models/bart/model.py | samsontmr/fairseq | 1d50b6dcd961faaa74ee32e9d7a02ff76f16ab87 | [
"MIT"
] | 3 | 2019-08-30T11:56:15.000Z | 2020-10-02T13:57:49.000Z | fairseq/models/bart/model.py | samsontmr/fairseq | 1d50b6dcd961faaa74ee32e9d7a02ff76f16ab87 | [
"MIT"
] | 8 | 2019-10-15T04:36:43.000Z | 2020-10-21T01:50:09.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.
"""
BART: Denoising Sequence-to-Sequence Pre-training for
Natural Language Generation, Translation, and Comprehension
"""
import torch.nn as n... | 41.044534 | 111 | 0.641251 | 7,130 | 0.703295 | 0 | 0 | 8,794 | 0.867429 | 0 | 0 | 2,360 | 0.232788 |
6ab43a62d7fe9c3851fb93216f017948e9264012 | 4,665 | py | Python | vagrant/optraj.istic.univ-rennes1.fr/src/system/Assignment.py | gpierre42/optraj | 53beb81c669093b866a786f2c1df9c663bbd7224 | [
"Apache-2.0"
] | null | null | null | vagrant/optraj.istic.univ-rennes1.fr/src/system/Assignment.py | gpierre42/optraj | 53beb81c669093b866a786f2c1df9c663bbd7224 | [
"Apache-2.0"
] | null | null | null | vagrant/optraj.istic.univ-rennes1.fr/src/system/Assignment.py | gpierre42/optraj | 53beb81c669093b866a786f2c1df9c663bbd7224 | [
"Apache-2.0"
] | null | null | null | # coding=utf8
'''
Created on 29 Oct 2013
@author: Nicolas Poirey
'''
from Worker import Worker
from Phase import Phase
class Assignment(object):
'''
Classe Assignment définissant une affectation
attributs publics :
- num : l'id de l'affectation (int)
- worker : l'ouvrier de l'affectation (Wor... | 34.555556 | 1,463 | 0.520043 | 4,553 | 0.973904 | 0 | 0 | 665 | 0.142246 | 0 | 0 | 3,351 | 0.716791 |
6ab44cf57a381d44d95045fd0ee5b06ba9aa8eed | 2,257 | py | Python | tracker/view/error.py | cmm1107/arch-security-tracker | 7d5f7d69f2b02c056c3888a9b70132c29432a468 | [
"MIT"
] | null | null | null | tracker/view/error.py | cmm1107/arch-security-tracker | 7d5f7d69f2b02c056c3888a9b70132c29432a468 | [
"MIT"
] | null | null | null | tracker/view/error.py | cmm1107/arch-security-tracker | 7d5f7d69f2b02c056c3888a9b70132c29432a468 | [
"MIT"
] | null | null | null | from binascii import hexlify
from functools import wraps
from logging import error
from os import urandom
from random import randint
from flask import make_response
from flask import render_template
from werkzeug.exceptions import BadRequest
from werkzeug.exceptions import Forbidden
from werkzeug.exceptions import Gon... | 29.311688 | 116 | 0.717767 | 0 | 0 | 0 | 0 | 1,134 | 0.502437 | 0 | 0 | 207 | 0.091715 |