hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a10f44ad6fe4307baa0cd97a8b555c0dab7c1fa | 442 | py | Python | evaluations/alg/App4/functions/f1/lambda_function.py | pacslab/SLApp-PerfCost-MdlOpt | 9b9fb13b9e914a7fe5c89da570bd95baff73276e | [
"MIT"
] | 8 | 2020-08-07T02:03:02.000Z | 2022-03-02T10:27:14.000Z | evaluations/alg/App5/functions/f1/lambda_function.py | pacslab/SLApp-PerfCost-MdlOpt | 9b9fb13b9e914a7fe5c89da570bd95baff73276e | [
"MIT"
] | null | null | null | evaluations/alg/App5/functions/f1/lambda_function.py | pacslab/SLApp-PerfCost-MdlOpt | 9b9fb13b9e914a7fe5c89da570bd95baff73276e | [
"MIT"
] | 4 | 2020-08-24T14:35:41.000Z | 2021-04-23T18:57:45.000Z | import json
import os
def lambda_handler(event, context):
path = '/tmp/1MB'
file_indicator=os.path.isfile(path)
if file_indicator:
os.remove(path)
for i in range(50):
f = open(path, 'wb')
f.write(os.urandom(1048576))
f.flush()
os.fsync(f.fileno())
f.clo... | 21.047619 | 63 | 0.547511 |
4a10f50647df774bccb47523d3818a38feb933eb | 16,191 | py | Python | software/validation.py | DeltaLabo/battery_characterizer | c9fa22687570a80fcf7131faa932c585fa053cf1 | [
"MIT"
] | null | null | null | software/validation.py | DeltaLabo/battery_characterizer | c9fa22687570a80fcf7131faa932c585fa053cf1 | [
"MIT"
] | null | null | null | software/validation.py | DeltaLabo/battery_characterizer | c9fa22687570a80fcf7131faa932c585fa053cf1 | [
"MIT"
] | null | null | null | '''
@file Ciclador de baterías
@author Diego Fernández Arias
@author Juan J. Rojas
@date Sep 28 2021
Instituto Tecnológico de Costa Rica
Laboratorio Delta
'''
import pyvisa
import numpy as np
import controller2
import time
from time import sleep
import threading
import pandas as pd
from datetime import datetime
import ... | 36.548533 | 247 | 0.53505 |
4a10f5eea7fdec86fcdb282fa931cae31abfe6fe | 7,612 | py | Python | kubernetes/client/models/v1_replication_controller_condition.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_replication_controller_condition.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_replication_controller_condition.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1.20.7
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
fr... | 32.118143 | 146 | 0.625197 |
4a10f611a449fb7d5f8243cd7ce07271218dc4ee | 2,850 | py | Python | reasonerAPI/python-flask-server/openapi_server/controllers/knowledge_map.py | codewarrior2000/molecular-data-provider | 820b7db35cf6578f13671caaade2d48811447822 | [
"MIT"
] | null | null | null | reasonerAPI/python-flask-server/openapi_server/controllers/knowledge_map.py | codewarrior2000/molecular-data-provider | 820b7db35cf6578f13671caaade2d48811447822 | [
"MIT"
] | null | null | null | reasonerAPI/python-flask-server/openapi_server/controllers/knowledge_map.py | codewarrior2000/molecular-data-provider | 820b7db35cf6578f13671caaade2d48811447822 | [
"MIT"
] | null | null | null | import requests
import json
from contextlib import closing
from openapi_server.models.query_graph import QueryGraph
definition_file = 'transformer_chains.json'
class KnowledgeMap:
def __init__(self):
self.kmap = self.read_knowledge_map()
def read_knowledge_map(self):
kmap = {}
wit... | 31.318681 | 90 | 0.635088 |
4a10f6ee3a7fee2a370af87a5990aa70c2e24c86 | 6,065 | py | Python | plotResults.py | mandoway/dfp | d8b1bd911fa810ce08e9719c9988e5a765b0128b | [
"Apache-2.0"
] | null | null | null | plotResults.py | mandoway/dfp | d8b1bd911fa810ce08e9719c9988e5a765b0128b | [
"Apache-2.0"
] | null | null | null | plotResults.py | mandoway/dfp | d8b1bd911fa810ce08e9719c9988e5a765b0128b | [
"Apache-2.0"
] | null | null | null | import os
import pickle
import latextable as latextable
import matplotlib.pyplot as plt
import pandas as pd
from texttable import Texttable
from dfp_main import PatchStats
DEBUG_POS_DICT = {217: 9, 0: 240, 11: 3, 238: 6, 225: 16, 1: 51, 2: 13, 41: 2, 44: 2, 86: 3, 6: 3, 87: 5, 4: 21, 26: 5,
39: 3,
... | 34.460227 | 120 | 0.573949 |
4a10f77632c24b9e4c2bed69bb088098bc5533a9 | 9,311 | py | Python | colour/appearance/rlab.py | soma2000-lang/colour | bb7ee23ac65e09613af78bd18dd98dffb1a2904a | [
"BSD-3-Clause"
] | 1 | 2022-02-12T06:28:15.000Z | 2022-02-12T06:28:15.000Z | colour/appearance/rlab.py | soma2000-lang/colour | bb7ee23ac65e09613af78bd18dd98dffb1a2904a | [
"BSD-3-Clause"
] | null | null | null | colour/appearance/rlab.py | soma2000-lang/colour | bb7ee23ac65e09613af78bd18dd98dffb1a2904a | [
"BSD-3-Clause"
] | null | null | null | """
RLAB Colour Appearance Model
============================
Defines the *RLAB* colour appearance model objects:
- :attr:`colour.VIEWING_CONDITIONS_RLAB`
- :attr:`colour.D_FACTOR_RLAB`
- :class:`colour.CAM_Specification_RLAB`
- :func:`colour.XYZ_to_RLAB`
References
----------
- :cite:`Fairchild1996a` : Fa... | 29.938907 | 79 | 0.609816 |
4a10f85528fe06884133c6390cdcf87a46743687 | 5,082 | py | Python | test/functional/feature_versionbits_warning.py | BakedInside/test | c411891206e72c0da9c9f7a69a2183703b71a988 | [
"MIT"
] | null | null | null | test/functional/feature_versionbits_warning.py | BakedInside/test | c411891206e72c0da9c9f7a69a2183703b71a988 | [
"MIT"
] | null | null | null | test/functional/feature_versionbits_warning.py | BakedInside/test | c411891206e72c0da9c9f7a69a2183703b71a988 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2016-2019 The Beans Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test version bits warning system.
Generate chains with block versions that appear to be signalling unkno... | 47.495327 | 137 | 0.717631 |
4a10fb9bd780bb1c53eda563a2a601f528b75054 | 3,488 | py | Python | gssl/inductive/tasks.py | pbielak/graph-barlow-twins | f8e20134afed4f17ffcecf8f48764df362ffdcad | [
"MIT"
] | 9 | 2021-06-11T13:23:50.000Z | 2022-03-23T19:45:54.000Z | gssl/inductive/tasks.py | pbielak/graph-barlow-twins | f8e20134afed4f17ffcecf8f48764df362ffdcad | [
"MIT"
] | 2 | 2021-09-22T13:58:39.000Z | 2021-11-23T02:26:50.000Z | gssl/inductive/tasks.py | pbielak/graph-barlow-twins | f8e20134afed4f17ffcecf8f48764df362ffdcad | [
"MIT"
] | 2 | 2021-06-10T06:05:47.000Z | 2021-09-27T15:13:23.000Z | from typing import Dict
import numpy as np
from sklearn import metrics as sk_mtr
from sklearn import preprocessing as sk_prep
import torch
from torch import nn
from tqdm import tqdm
def evaluate_node_classification(
z_train: torch.Tensor,
y_train: torch.Tensor,
z_val: torch.Tensor,
y_val: torch.Tenso... | 26.029851 | 75 | 0.583716 |
4a10fbbcc5929e00e82a9a37d8fec907205a72a5 | 869 | py | Python | src/segmentation/img/reconstruir.py | mmaximiliano/algo3-project2 | bad8f7704f8d004c1e21ba684e98890578bf8ccc | [
"MIT"
] | null | null | null | src/segmentation/img/reconstruir.py | mmaximiliano/algo3-project2 | bad8f7704f8d004c1e21ba684e98890578bf8ccc | [
"MIT"
] | null | null | null | src/segmentation/img/reconstruir.py | mmaximiliano/algo3-project2 | bad8f7704f8d004c1e21ba684e98890578bf8ccc | [
"MIT"
] | null | null | null | from PIL import Image
from PIL import ImageOps
import numpy as np
import random as rand
import os
ruta = input()
componentes = np.loadtxt(ruta+".txt", dtype=int)
height = componentes.shape[0]
width = componentes.shape[1]
exists = os.path.isfile('colores.txt')
if not exists:
print("Generando colores...")
f=open("co... | 23.486486 | 107 | 0.675489 |
4a10fc842770c44ebb6cd67b1f620920fc5e5308 | 12,372 | py | Python | pyblq/old/runtime.py | patrickrall/pyblq | 593e678ff7ca5dc77ffcc1f0636ef41762c65e60 | [
"MIT"
] | null | null | null | pyblq/old/runtime.py | patrickrall/pyblq | 593e678ff7ca5dc77ffcc1f0636ef41762c65e60 | [
"MIT"
] | null | null | null | pyblq/old/runtime.py | patrickrall/pyblq | 593e678ff7ca5dc77ffcc1f0636ef41762c65e60 | [
"MIT"
] | null | null | null |
from .qaasm import *
# returns qaasm_expn. Evaluates as much as possible.
# perhaps need to wrap the thing to keep track of dependent registers
# and also deal with arrays
# alternative: realize that a qaasm expn can only ever end up in a qaasm increment instruction.
# the wrapper could be a list of instructions ... | 33.258065 | 126 | 0.518348 |
4a10fdbc853a9040e70bdc2bb76df5065156f0f8 | 393 | py | Python | bookshub/wsgi.py | jefferson2z/books-hub | 9587deecec6b37305492874e2124578b75e6c5a2 | [
"MIT"
] | null | null | null | bookshub/wsgi.py | jefferson2z/books-hub | 9587deecec6b37305492874e2124578b75e6c5a2 | [
"MIT"
] | null | null | null | bookshub/wsgi.py | jefferson2z/books-hub | 9587deecec6b37305492874e2124578b75e6c5a2 | [
"MIT"
] | 1 | 2021-12-23T21:15:40.000Z | 2021-12-23T21:15:40.000Z | """
WSGI config for bookshub project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETT... | 23.117647 | 78 | 0.78626 |
4a10fe32f7f5f8a7b817f3a0647d664bf06ad3fd | 17,379 | py | Python | tools/device_file_generator/dfg/stm32/stm_reader.py | roboterclubaachen/xpcc | 010924901947381d20e83b838502880eb2ffea72 | [
"BSD-3-Clause"
] | 161 | 2015-01-13T15:52:06.000Z | 2020-02-13T01:26:04.000Z | tools/device_file_generator/dfg/stm32/stm_reader.py | salkinium/xpcc | 010924901947381d20e83b838502880eb2ffea72 | [
"BSD-3-Clause"
] | 281 | 2015-01-06T12:46:40.000Z | 2019-01-06T13:06:57.000Z | tools/device_file_generator/dfg/stm32/stm_reader.py | salkinium/xpcc | 010924901947381d20e83b838502880eb2ffea72 | [
"BSD-3-Clause"
] | 51 | 2015-03-03T19:56:12.000Z | 2020-03-22T02:13:36.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2013, Roboterclub Aachen e.V.
# All rights reserved.
#
# The file is part of the xpcc library and is released under the 3-clause BSD
# license. See the file `LICENSE` for the full license governing this code.
# ---------------------------------------------------------------------... | 34.758 | 138 | 0.619368 |
4a10fea6f0af8be304dba1ce872e281354577f3b | 39,444 | py | Python | thola_client/api/read_api.py | inexio/thola-client-python | f9a6812885738e33b1aed43ca55335b71e3d2b2d | [
"BSD-2-Clause"
] | 1 | 2021-12-28T18:53:52.000Z | 2021-12-28T18:53:52.000Z | thola_client/api/read_api.py | inexio/thola-client-python | f9a6812885738e33b1aed43ca55335b71e3d2b2d | [
"BSD-2-Clause"
] | null | null | null | thola_client/api/read_api.py | inexio/thola-client-python | f9a6812885738e33b1aed43ca55335b71e3d2b2d | [
"BSD-2-Clause"
] | null | null | null | # coding: utf-8
"""
Thola
REST API for Thola. For more information look at our Github : https://github.com/inexio/thola # noqa: E501
OpenAPI spec version: 1.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import re # noqa: F40... | 39.247761 | 124 | 0.601384 |
4a11000033aba07060ea56b826afb5afeb7f35ef | 1,136 | py | Python | Problems/alphabetanimals.py | rikgj/Kattis | 2e34dee307aef5acea5837732bf9f27f8c548e9c | [
"MIT"
] | null | null | null | Problems/alphabetanimals.py | rikgj/Kattis | 2e34dee307aef5acea5837732bf9f27f8c548e9c | [
"MIT"
] | null | null | null | Problems/alphabetanimals.py | rikgj/Kattis | 2e34dee307aef5acea5837732bf9f27f8c548e9c | [
"MIT"
] | null | null | null | from sys import stdin
lastletter = stdin.readline().strip()[-1]
numOfAnimals = int(stdin.readline())
animals = [None] * numOfAnimals
animals = [x.strip() for x in stdin.readlines()]
lettercomb = []
# make dictionary
# st = 'abcdefghijklmnopqrstuvwxyz'
# animals_fl = {x: 0 for x in st}
animals_fl = {'a': 0, 'b': 0, '... | 32.457143 | 221 | 0.542254 |
4a110009b5239dd53649d028d95fc19e972e4ca3 | 35,083 | py | Python | hydra/_internal/config_loader_impl.py | Devabdulakeem/hydra | 7afee0976f7507c3c1b607ebd129d3408b608fa2 | [
"MIT"
] | null | null | null | hydra/_internal/config_loader_impl.py | Devabdulakeem/hydra | 7afee0976f7507c3c1b607ebd129d3408b608fa2 | [
"MIT"
] | null | null | null | hydra/_internal/config_loader_impl.py | Devabdulakeem/hydra | 7afee0976f7507c3c1b607ebd129d3408b608fa2 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
"""
Configuration loader
"""
import copy
import os
import re
import warnings
from collections import defaultdict
from dataclasses import dataclass
from typing import Any, Dict, List, Optional, Tuple
from omegaconf import Container, DictConfig, List... | 38.59516 | 110 | 0.538751 |
4a110020251a8c39b7b4c1670f90c3cd9112631a | 15,644 | py | Python | softlearning/algorithms/rl_algorithm.py | zhaofeng-shu33/softlearning | b4db23ad266f594c891357d9dabe981ecf9bcdea | [
"MIT"
] | 1 | 2019-06-12T16:18:49.000Z | 2019-06-12T16:18:49.000Z | softlearning/algorithms/rl_algorithm.py | GitHubBeinner/softlearning | b4db23ad266f594c891357d9dabe981ecf9bcdea | [
"MIT"
] | null | null | null | softlearning/algorithms/rl_algorithm.py | GitHubBeinner/softlearning | b4db23ad266f594c891357d9dabe981ecf9bcdea | [
"MIT"
] | null | null | null | import abc
from collections import OrderedDict
from distutils.version import LooseVersion
from itertools import count
import gtimer as gt
import math
import os
import numpy as np
import tensorflow as tf
from tensorflow.python.training import training_util
from softlearning.samplers import rollouts
from softlearning.m... | 35.473923 | 79 | 0.593774 |
4a1100b0867263baf5006efc8e3c565f94d310cd | 3,079 | py | Python | cnn.py | sudipjangam/Leaf-Disease-Detection-and-Remedies-Recommendation-using-Machine-Learning | 6a460d86da6e9974247de4902ecdf6537d6e2025 | [
"Unlicense"
] | null | null | null | cnn.py | sudipjangam/Leaf-Disease-Detection-and-Remedies-Recommendation-using-Machine-Learning | 6a460d86da6e9974247de4902ecdf6537d6e2025 | [
"Unlicense"
] | null | null | null | cnn.py | sudipjangam/Leaf-Disease-Detection-and-Remedies-Recommendation-using-Machine-Learning | 6a460d86da6e9974247de4902ecdf6537d6e2025 | [
"Unlicense"
] | null | null | null | import cv2
import numpy as np
import os
from random import shuffle
from tqdm import tqdm
TRAIN_DIR = 'D:\\pr\\pr\\train\\train'
TEST_DIR = 'D:\\pr\\pr\\test\\test'
IMG_SIZE = 50
LR = 1e-3
MODEL_NAME = 'healthyvsunhealthy-{}-{}.model'.format(LR, '2conv-basic')
def... | 29.893204 | 114 | 0.678467 |
4a110100c65f7d863d4c97ff4d0fa631848c53d4 | 8,148 | py | Python | fastai/text/models/awdlstm.py | warner-benjamin/fastai | ceeba805f43e6258e7131d78706859f45c342575 | [
"Apache-2.0"
] | 1 | 2022-03-13T00:09:58.000Z | 2022-03-13T00:09:58.000Z | fastai/text/models/awdlstm.py | warner-benjamin/fastai | ceeba805f43e6258e7131d78706859f45c342575 | [
"Apache-2.0"
] | null | null | null | fastai/text/models/awdlstm.py | warner-benjamin/fastai | ceeba805f43e6258e7131d78706859f45c342575 | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/32_text.models.awdlstm.ipynb (unless otherwise specified).
from __future__ import annotations
__all__ = ['dropout_mask', 'RNNDropout', 'WeightDropout', 'EmbeddingDropout', 'AWD_LSTM', 'awd_lstm_lm_split',
'awd_lstm_lm_config', 'awd_lstm_clas_split', 'awd_ls... | 44.282609 | 131 | 0.650466 |
4a11025a55876475d61bd91d8972cac6ae9f1dac | 1,065 | py | Python | azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/ssh_configuration.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/ssh_configuration.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 54 | 2016-03-25T17:25:01.000Z | 2018-10-22T17:27:54.000Z | azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/ssh_configuration.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2017-01-20T18:25:46.000Z | 2017-05-12T21:31:47.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 34.354839 | 77 | 0.610329 |
4a1102a270ec95019010d0c6b79c743ee38d5316 | 993 | py | Python | ExtraModules/phonenumbers/shortdata/region_MC.py | chirantana-trust/web-chirantana | 18e2fb105fc5a9f55586c55096780c062ad9f2bc | [
"Unlicense"
] | 1 | 2015-01-31T01:17:14.000Z | 2015-01-31T01:17:14.000Z | ExtraModules/phonenumbers/shortdata/region_MC.py | chirantana-trust/web-chirantana | 18e2fb105fc5a9f55586c55096780c062ad9f2bc | [
"Unlicense"
] | null | null | null | ExtraModules/phonenumbers/shortdata/region_MC.py | chirantana-trust/web-chirantana | 18e2fb105fc5a9f55586c55096780c062ad9f2bc | [
"Unlicense"
] | null | null | null | """Auto-generated file, do not edit by hand. MC metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_MC = PhoneMetadata(id='MC', country_code=None, international_prefix=None,
general_desc=PhoneNumberDesc(national_number_pattern='1\\d{1,2}', possible_number_pattern='\\... | 76.384615 | 133 | 0.783484 |
4a1102cd5762dcb269d8c993d0729cf370abc698 | 1,509 | py | Python | bettertexts/forms.py | citizenline/citizenline | 5c8317fe7e18a485bb8c572cc3c55707d0303525 | [
"MIT"
] | null | null | null | bettertexts/forms.py | citizenline/citizenline | 5c8317fe7e18a485bb8c572cc3c55707d0303525 | [
"MIT"
] | 33 | 2017-02-14T15:45:16.000Z | 2022-03-11T23:22:29.000Z | bettertexts/forms.py | citizenline/citizenline | 5c8317fe7e18a485bb8c572cc3c55707d0303525 | [
"MIT"
] | null | null | null | from django_comments.forms import CommentForm
from django import forms
from django.utils.translation import ugettext_lazy as _
from bettertexts.models import TextComment
class TextCommentForm(CommentForm):
def __init__(self, *args, **kwargs):
super(TextCommentForm, self).__init__(*args, **kwargs)
... | 31.4375 | 79 | 0.622929 |
4a1102dcc914f81241efa01b8276e048cbbebf9d | 4,590 | py | Python | mangum/adapter.py | kita99/mangum | 961ff7cf3b9fa70ccbca188b13530546fd3359b6 | [
"MIT"
] | null | null | null | mangum/adapter.py | kita99/mangum | 961ff7cf3b9fa70ccbca188b13530546fd3359b6 | [
"MIT"
] | null | null | null | mangum/adapter.py | kita99/mangum | 961ff7cf3b9fa70ccbca188b13530546fd3359b6 | [
"MIT"
] | null | null | null | import logging
from contextlib import ExitStack
from typing import (
Any,
ContextManager,
Callable,
Dict,
Optional,
TYPE_CHECKING,
)
from .exceptions import ConfigurationError
from .handlers import AbstractHandler
from .protocols import HTTPCycle, WebSocketCycle, LifespanCycle
from .backends im... | 36.428571 | 88 | 0.654248 |
4a1102f91939953f173629a36f66958b61719cc2 | 787 | py | Python | savenpz.py | bHodges97/pdf-from-site | 7982619567f006a62a11cecfb7d617bc968e9ddc | [
"MIT"
] | 2 | 2021-07-06T01:58:06.000Z | 2021-09-25T07:38:55.000Z | savenpz.py | bHodges97/pdf-from-site | 7982619567f006a62a11cecfb7d617bc968e9ddc | [
"MIT"
] | 1 | 2021-06-02T00:17:30.000Z | 2021-06-02T00:17:30.000Z | savenpz.py | bHodges97/pdf-from-site | 7982619567f006a62a11cecfb7d617bc968e9ddc | [
"MIT"
] | null | null | null | import numpy as np
from scipy.sparse import csr_matrix
def save_npz(file, matrix, vocab, fixed=[], compressed=False):
arrays_dict = {}
arrays_dict.update(indices=matrix.indices, indptr=matrix.indptr)
arrays_dict.update(
shape=matrix.shape,
data=matrix.data,
vocab=vocab,
fixe... | 30.269231 | 105 | 0.623888 |
4a11031ee4ab19e588b1ae096080ac51a7d84a35 | 1,164 | py | Python | exercicios/ex084.py | renaisaalves/Python-CursoemVideo | ffb7b2cb95ae6ff5a4f2266e5c3ed2fc33951808 | [
"MIT"
] | null | null | null | exercicios/ex084.py | renaisaalves/Python-CursoemVideo | ffb7b2cb95ae6ff5a4f2266e5c3ed2fc33951808 | [
"MIT"
] | null | null | null | exercicios/ex084.py | renaisaalves/Python-CursoemVideo | ffb7b2cb95ae6ff5a4f2266e5c3ed2fc33951808 | [
"MIT"
] | null | null | null | #ex084: Faça um programa que leia nome e peso de várias pessoas, guardando tudo em uma lista. No final, mostre:A) Quantas pessoas foram cadastradas. B) Uma listagem com as pessoas mais pesadas. C) Uma listagem com as pessoas mais leves.
# NÃO CONSEGUI FAZER
cadastro = []
listagem = list()
maior = menor = 0
while Tr... | 32.333333 | 236 | 0.627148 |
4a110358b55894e94f1ca4b74bcfba6f2d9f7f08 | 7,537 | py | Python | reframe/core/variables.py | toxa81/reframe | 81357405c0c53ba9def4048c29774c867c69adc2 | [
"BSD-3-Clause"
] | null | null | null | reframe/core/variables.py | toxa81/reframe | 81357405c0c53ba9def4048c29774c867c69adc2 | [
"BSD-3-Clause"
] | null | null | null | reframe/core/variables.py | toxa81/reframe | 81357405c0c53ba9def4048c29774c867c69adc2 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016-2021 Swiss National Supercomputing Centre (CSCS/ETH Zurich)
# ReFrame Project Developers. See the top-level LICENSE file for details.
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Functionality to build extensible variable spaces into ReFrame tests.
#
import copy
import reframe.core.namespaces as na... | 34.259091 | 79 | 0.627703 |
4a1103aeb8eb2970fd27433a320cf6496fa444da | 671 | py | Python | build/navigation/global_planner/catkin_generated/pkg.develspace.context.pc.py | EurobotMDX/eurobot_2020_odroid_cam | ddd9a17d53899f1c615816fd74512c112ecad188 | [
"MIT"
] | 4 | 2019-10-26T18:48:51.000Z | 2020-02-27T19:31:36.000Z | build/navigation/global_planner/catkin_generated/pkg.develspace.context.pc.py | EurobotMDX/eurobot_2020_odroid_cam | ddd9a17d53899f1c615816fd74512c112ecad188 | [
"MIT"
] | null | null | null | build/navigation/global_planner/catkin_generated/pkg.develspace.context.pc.py | EurobotMDX/eurobot_2020_odroid_cam | ddd9a17d53899f1c615816fd74512c112ecad188 | [
"MIT"
] | 1 | 2019-10-26T18:50:48.000Z | 2019-10-26T18:50:48.000Z | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/ros/lidar_ws/devel/include;/home/ros/lidar_ws/src/navigation/global_planner/include".split(';') if "/home/ros/lidar_ws/devel/include;/home/ros/lidar_ws/src/navigation/global_planner/include" != "... | 74.555556 | 245 | 0.782414 |
4a11040b00fd018bb9df6cdcf5e2e0bcf545877a | 2,435 | py | Python | db-files/connect.py | buzzer4mornin/CTMP-ThesisProject | 83e54700d0edd8dd141127998dacd7faf11be081 | [
"MIT"
] | 5 | 2021-07-11T13:36:37.000Z | 2022-02-07T22:21:13.000Z | db-files/connect.py | buzzer4mornin/CTMP-ThesisProject | 83e54700d0edd8dd141127998dacd7faf11be081 | [
"MIT"
] | null | null | null | db-files/connect.py | buzzer4mornin/CTMP-ThesisProject | 83e54700d0edd8dd141127998dacd7faf11be081 | [
"MIT"
] | null | null | null | import cx_Oracle as cx
import pandas as pd
import os
# Change to Current File Directory
os.chdir(os.path.dirname(__file__))
# Get Current File Directory
currdir = str(os.path.dirname(os.path.abspath(__file__)))
def get_credentials() -> list:
c = []
with open('./credentials.txt') as f:
for line in f.... | 29.337349 | 127 | 0.595893 |
4a11040d65bf9a1959a1f48bef876024d0aa5dac | 5,754 | py | Python | ci_tools/github_release.py | mchaaler/mkdocs-gallery | 48a96bd32eb036b1ef82b64b4ef79a76c499eea9 | [
"BSD-3-Clause"
] | 9 | 2021-12-14T17:03:13.000Z | 2022-03-26T17:16:26.000Z | ci_tools/github_release.py | mchaaler/mkdocs-gallery | 48a96bd32eb036b1ef82b64b4ef79a76c499eea9 | [
"BSD-3-Clause"
] | 40 | 2021-12-09T08:09:03.000Z | 2022-03-30T21:29:34.000Z | ci_tools/github_release.py | mchaaler/mkdocs-gallery | 48a96bd32eb036b1ef82b64b4ef79a76c499eea9 | [
"BSD-3-Clause"
] | 2 | 2020-08-05T07:06:44.000Z | 2021-03-31T21:33:19.000Z | # a clone of the ruby example https://gist.github.com/valeriomazzeo/5491aee76f758f7352e2e6611ce87ec1
import os
from os import path
import re
import click
from click import Path
from github import Github, UnknownObjectException
# from valid8 import validate not compliant with python 2.7
@click.command()
@click.opti... | 45.666667 | 129 | 0.623045 |
4a11045642c8185666c70e80cbccbf29b5885417 | 3,892 | py | Python | src/semantics/type_collector.py | RodroVMS/cool-compiler-2022 | 718f962a647dc62be8562c946cf76fad419c08c5 | [
"MIT"
] | null | null | null | src/semantics/type_collector.py | RodroVMS/cool-compiler-2022 | 718f962a647dc62be8562c946cf76fad419c08c5 | [
"MIT"
] | null | null | null | src/semantics/type_collector.py | RodroVMS/cool-compiler-2022 | 718f962a647dc62be8562c946cf76fad419c08c5 | [
"MIT"
] | null | null | null | import semantics.visitor as visitor
from parsing.ast import Node, ProgramNode, ClassDeclarationNode
from semantics.tools import SemanticError
from semantics.tools import Context
class TypeCollector(object):
def __init__(self) -> None:
self.context = Context()
self.errors = []
self.type_grap... | 37.786408 | 122 | 0.581449 |
4a110491feca5a85ba8ccca1097642ce914d7a58 | 1,913 | py | Python | src/view.py | gordinmitya/supcardbot | fa3bfe5c51ad3256fda7418ffd267c861ff7d1ef | [
"MIT"
] | 1 | 2021-08-16T13:27:32.000Z | 2021-08-16T13:27:32.000Z | src/view.py | gordinmitya/supcardbot | fa3bfe5c51ad3256fda7418ffd267c861ff7d1ef | [
"MIT"
] | null | null | null | src/view.py | gordinmitya/supcardbot | fa3bfe5c51ad3256fda7418ffd267c861ff7d1ef | [
"MIT"
] | null | null | null | from telegram import Message
RUB = 'р'
def currency(amount: int) -> str:
return f'{amount}{RUB}'
class View:
def __init__(self, message: Message) -> None:
self.m = message
def started(self, default_limit: int) -> None:
return self.m.reply_text(
"Давай знакомиться!\n" +
... | 35.425926 | 135 | 0.6069 |
4a1104e38634365519a7ecb4ebd379963258de28 | 666 | py | Python | leetCode/maximum_depth_of_binary_tree.py | yskang/AlgorithmPractice | 31b76e38b4c2f1e3e29fb029587662a745437912 | [
"MIT"
] | null | null | null | leetCode/maximum_depth_of_binary_tree.py | yskang/AlgorithmPractice | 31b76e38b4c2f1e3e29fb029587662a745437912 | [
"MIT"
] | 1 | 2019-11-04T06:44:04.000Z | 2019-11-04T06:46:55.000Z | leetCode/maximum_depth_of_binary_tree.py | yskang/AlgorithmPractice | 31b76e38b4c2f1e3e29fb029587662a745437912 | [
"MIT"
] | null | null | null | # Title: Maximum Depth of Binary Tree
# Link: https://leetcode.com/problems/maximum-depth-of-binary-tree/
class TreeNode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
class Problem:
def max_depth(self, root: TreeNode) -> int:
... | 22.965517 | 77 | 0.633634 |
4a11056ab8275292165e1a0a7d4d481f8d9530e0 | 6,470 | py | Python | individual.py | ChangMinPark/genetic-algorithm-dct | d0112031e788061df6676d43160ec8ffbf92781a | [
"MIT"
] | null | null | null | individual.py | ChangMinPark/genetic-algorithm-dct | d0112031e788061df6676d43160ec8ffbf92781a | [
"MIT"
] | null | null | null | individual.py | ChangMinPark/genetic-algorithm-dct | d0112031e788061df6676d43160ec8ffbf92781a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3.7
'''
@author: Chang Min Park (cpark22@buffalo.edu)
- Based on open source Genetic Algorithm written in Java:
(https://github.com/memento/GeneticAlgorithm)
- Improved by refering to a paper, "Enhancement of image watermark retrieval
based on genetic algorithms", for image watermarking.
'... | 34.052632 | 80 | 0.531685 |
4a11056ea3e00b662c62e76a13a616565de24458 | 11,805 | py | Python | tests/test_time_value.py | bbc/rd-apmm-python-lib-mediatimestamp | fbf44b11984fa6d45ff29f97093a7e907b140e13 | [
"Apache-2.0"
] | 3 | 2018-09-07T01:26:08.000Z | 2019-09-13T12:37:50.000Z | tests/test_time_value.py | bbc/rd-apmm-python-lib-mediatimestamp | fbf44b11984fa6d45ff29f97093a7e907b140e13 | [
"Apache-2.0"
] | 16 | 2018-08-17T09:27:43.000Z | 2022-02-04T17:26:21.000Z | tests/test_time_value.py | bbc/rd-apmm-python-lib-mediatimestamp | fbf44b11984fa6d45ff29f97093a7e907b140e13 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 British Broadcasting Corporation
#
# This is an internal BBC tool and is not licensed externally
# If you have received a copy of this erroneously then you do
# not have permission to reproduce it.
import unittest
from fractions import Fraction
from mediatimestamp import (
TimeOffset,
Timesta... | 34.823009 | 85 | 0.557645 |
4a1105d1512c135df92938d058bf57907992b708 | 644 | py | Python | data/modules/graphic/two_D/background.py | Sheidaas/gamee | 434db4648e1719a648b8784f201b03b4c8e243c3 | [
"CC-BY-3.0"
] | null | null | null | data/modules/graphic/two_D/background.py | Sheidaas/gamee | 434db4648e1719a648b8784f201b03b4c8e243c3 | [
"CC-BY-3.0"
] | null | null | null | data/modules/graphic/two_D/background.py | Sheidaas/gamee | 434db4648e1719a648b8784f201b03b4c8e243c3 | [
"CC-BY-3.0"
] | null | null | null | import pygame
class Background:
def __init__(self, x1, y1, x2, y2, color: tuple, screen):
self.size = (x1 * screen.engine.settings.graphic['screen']['resolution_scale'][0],
y1 * screen.engine.settings.graphic['screen']['resolution_scale'][1],
x2 * screen.engine.s... | 37.882353 | 90 | 0.613354 |
4a11074c4bcf0b7bf6856fb6245dfac00a6db776 | 358 | py | Python | docs/examples/download_file.py | chevah/treq | 2d45c8227246583bc96cb4924722d9f79e95d4d7 | [
"MIT"
] | null | null | null | docs/examples/download_file.py | chevah/treq | 2d45c8227246583bc96cb4924722d9f79e95d4d7 | [
"MIT"
] | null | null | null | docs/examples/download_file.py | chevah/treq | 2d45c8227246583bc96cb4924722d9f79e95d4d7 | [
"MIT"
] | null | null | null | from twisted.internet.task import react
import treq
def download_file(reactor, url, destination_filename):
destination = open(destination_filename, 'wb')
d = treq.get(url)
d.addCallback(treq.collect, destination.write)
d.addBoth(lambda _: destination.close())
return d
react(download_file, ['http... | 25.571429 | 64 | 0.72905 |
4a110778dbe7cfb7b3fdad3984fe323a059fa7ec | 21,081 | py | Python | theano/gof/type.py | c0g/Theano | ef6f32d1b7a575b6153c0ca2e4347b39e766c412 | [
"BSD-3-Clause"
] | null | null | null | theano/gof/type.py | c0g/Theano | ef6f32d1b7a575b6153c0ca2e4347b39e766c412 | [
"BSD-3-Clause"
] | null | null | null | theano/gof/type.py | c0g/Theano | ef6f32d1b7a575b6153c0ca2e4347b39e766c412 | [
"BSD-3-Clause"
] | null | null | null | """WRITEME Defines the `Type` class."""
__docformat__ = "restructuredtext en"
from theano.compat import PY3
from theano.gof import utils
from theano.gof.utils import MethodNotDefined, object2
from theano.gof import graph
########
# Type #
########
from theano.gof.op import CLinkerObject
class CLinkerType(CLinkerOb... | 33.04232 | 117 | 0.618092 |
4a1108207aaa082416d6733da5f86cb9e12d6a58 | 1,529 | py | Python | No_0367_Valid Perfect Square/valid_perfect_square_by_newton_method.py | coderMaruf/leetcode-1 | 20ffe26e43999e44c8acf9800acb371a49bb5853 | [
"MIT"
] | 32 | 2020-01-05T13:37:16.000Z | 2022-03-26T07:27:09.000Z | No_0367_Valid Perfect Square/valid_perfect_square_by_newton_method.py | coderMaruf/leetcode-1 | 20ffe26e43999e44c8acf9800acb371a49bb5853 | [
"MIT"
] | null | null | null | No_0367_Valid Perfect Square/valid_perfect_square_by_newton_method.py | coderMaruf/leetcode-1 | 20ffe26e43999e44c8acf9800acb371a49bb5853 | [
"MIT"
] | 8 | 2020-06-18T16:17:27.000Z | 2022-03-15T23:58:18.000Z | '''
Description:
Given a positive integer num, write a function which returns True if num is a perfect square else False.
Note: Do not use any built-in library function such as sqrt.
Example 1:
Input: 16
Output: true
Example 2:
Input: 14
Output: false
'''
class Solution:
def isPerfectSquare(self, num: ... | 19.35443 | 104 | 0.483976 |
4a11086e2ffa1509dffac1dac1d912e0dda7ec47 | 99 | py | Python | output/models/ms_data/model_groups/mg_c011_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/ms_data/model_groups/mg_c011_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/ms_data/model_groups/mg_c011_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from output.models.ms_data.model_groups.mg_c011_xsd.mg_c011 import Test
__all__ = [
"Test",
]
| 16.5 | 71 | 0.747475 |
4a11092e8bb834b3f8c9f5e5c7b667cfbb10b2dd | 1,066 | py | Python | python/sprint_12/tmp/test.py | Talgatovich/algorithms-templates | e7c6fd71451304ed0dacc393c3f30ca3f5282d46 | [
"MIT"
] | null | null | null | python/sprint_12/tmp/test.py | Talgatovich/algorithms-templates | e7c6fd71451304ed0dacc393c3f30ca3f5282d46 | [
"MIT"
] | null | null | null | python/sprint_12/tmp/test.py | Talgatovich/algorithms-templates | e7c6fd71451304ed0dacc393c3f30ca3f5282d46 | [
"MIT"
] | null | null | null | # class Node:
# def __init__(self, value, next_item=None):
# self.value = value
# self.next_item = next_item
#
#
# def define_my_define(node):
# while node:
# print(node.value)
# node = node.next_item
def get_node_by_index(node, index):
while index:
node = node.next_item
... | 22.680851 | 59 | 0.619137 |
4a110c228cce4bf1775db65c76bb3e408071cc0d | 3,330 | py | Python | predict.py | vkso/FER | b7207341139ff451753a4c4640530e915673fc7c | [
"Apache-2.0"
] | null | null | null | predict.py | vkso/FER | b7207341139ff451753a4c4640530e915673fc7c | [
"Apache-2.0"
] | null | null | null | predict.py | vkso/FER | b7207341139ff451753a4c4640530e915673fc7c | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
from customParameters import *
import myMethod as myMethod
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sn
import argparse
# use method:
# python predict.py --model myModel --type whole_history_epoch
# python predict.py --model myVGG --type whole --lo... | 32.970297 | 108 | 0.653453 |
4a110c92bbf52c4de802673121f891dc7dd5e33f | 1,080 | py | Python | OtenkiBuzzer/Sensor.py | kentaro/otenki-buzzer | be007d7859770bc1b90c0b9cd9080e88aef11ad0 | [
"MIT"
] | 3 | 2016-06-14T10:18:54.000Z | 2016-06-14T10:30:44.000Z | OtenkiBuzzer/Sensor.py | kentaro/otenki-buzzer | be007d7859770bc1b90c0b9cd9080e88aef11ad0 | [
"MIT"
] | null | null | null | OtenkiBuzzer/Sensor.py | kentaro/otenki-buzzer | be007d7859770bc1b90c0b9cd9080e88aef11ad0 | [
"MIT"
] | null | null | null | import time, wiringpi as pi
SPI_CH = 0
READ_CH = 0
class Sensor:
def __init__(self):
pi.wiringPiSPISetup(SPI_CH, 1000000)
def check(self):
buffer = 0x6800 | (0x1800 * READ_CH)
buffer = buffer.to_bytes(2, byteorder='big')
pi.wiringPiSPIDataRW(SPI_CH, buffer)
value ... | 28.421053 | 56 | 0.494444 |
4a110d58eef0a709843b9add5d07897ae67548d4 | 4,561 | py | Python | numpy/lib/tests/test_polynomial.py | ivanov/numpy | 6d2665626e40f346bb5af8d780579f5a429ff9ba | [
"BSD-3-Clause"
] | null | null | null | numpy/lib/tests/test_polynomial.py | ivanov/numpy | 6d2665626e40f346bb5af8d780579f5a429ff9ba | [
"BSD-3-Clause"
] | null | null | null | numpy/lib/tests/test_polynomial.py | ivanov/numpy | 6d2665626e40f346bb5af8d780579f5a429ff9ba | [
"BSD-3-Clause"
] | null | null | null | from __future__ import division, absolute_import
'''
>>> p = np.poly1d([1.,2,3])
>>> p
poly1d([ 1., 2., 3.])
>>> print(p)
2
1 x + 2 x + 3
>>> q = np.poly1d([3.,2,1])
>>> q
poly1d([ 3., 2., 1.])
>>> print(q)
2
3 x + 2 x + 1
>>> print(np.poly1d([1.89999+2j, -3j, -5.12345678, 2+1j]))
3 2
(1.9 +... | 26.364162 | 75 | 0.475773 |
4a110d7c33f33f92237a37f23b997faf93ae4797 | 3,765 | py | Python | aiida_cusp/data/inputs/vasp_incar.py | astamminger/aiida_cusp | 4a5a014fc90761ee8855cbe6305a8f565f9626a3 | [
"MIT"
] | 2 | 2020-08-10T15:47:10.000Z | 2022-03-14T12:29:43.000Z | aiida_cusp/data/inputs/vasp_incar.py | astamminger/aiida_cusp | 4a5a014fc90761ee8855cbe6305a8f565f9626a3 | [
"MIT"
] | 13 | 2020-07-10T16:22:05.000Z | 2022-02-28T18:41:53.000Z | aiida_cusp/data/inputs/vasp_incar.py | astamminger/aiida_cusp | 4a5a014fc90761ee8855cbe6305a8f565f9626a3 | [
"MIT"
] | 2 | 2020-07-09T10:09:04.000Z | 2020-08-10T15:47:54.000Z | # -*- coding: utf-8 -*-
"""
Datatype and methods to initialize and interact with VASP specific INCAR
input data
"""
from aiida.orm import Dict
from pymatgen.io.vasp.inputs import Incar
from aiida_cusp.utils.exceptions import IncarWrapperError
class VaspIncarData(Dict):
"""
VaspIncarData(incar=None)
... | 34.541284 | 79 | 0.652855 |
4a11101663c7ba1612b1169eef3c997f8773c2b5 | 2,264 | py | Python | var/spack/repos/builtin/packages/strace/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 3 | 2021-09-29T02:14:40.000Z | 2022-01-27T20:50:36.000Z | var/spack/repos/builtin/packages/strace/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 8 | 2022-02-28T11:30:18.000Z | 2022-03-23T19:34:56.000Z | var/spack/repos/builtin/packages/strace/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Strace(AutotoolsPackage):
"""Strace is a diagnostic, debugging and instructional userspace... | 53.904762 | 94 | 0.775618 |
4a11108912943852c129708f7045c665a5e86791 | 10,978 | py | Python | autotest/gcore/hdf4_read.py | ajolma/gdal | 19d847c8519919fcd1e7e7247644d28771034317 | [
"MIT"
] | 1 | 2018-12-19T14:08:20.000Z | 2018-12-19T14:08:20.000Z | autotest/gcore/hdf4_read.py | ajolma/gdal | 19d847c8519919fcd1e7e7247644d28771034317 | [
"MIT"
] | null | null | null | autotest/gcore/hdf4_read.py | ajolma/gdal | 19d847c8519919fcd1e7e7247644d28771034317 | [
"MIT"
] | 1 | 2019-11-01T15:17:09.000Z | 2019-11-01T15:17:09.000Z | #!/usr/bin/env pytest
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test basic read support for a all datatypes from a HDF file.
# Author: Andrey Kiselev, dron@remotesensing.org
#
###################################################... | 35.527508 | 205 | 0.642011 |
4a111139c64ce3e5a4be8fc36997ef32038e474e | 2,413 | py | Python | examples/NAS-training-containers/cifar10/RunTrial.py | Akado2009/katib | cf15cd4dbb3e61814e8054678eeee8c37411fbd1 | [
"Apache-2.0"
] | null | null | null | examples/NAS-training-containers/cifar10/RunTrial.py | Akado2009/katib | cf15cd4dbb3e61814e8054678eeee8c37411fbd1 | [
"Apache-2.0"
] | null | null | null | examples/NAS-training-containers/cifar10/RunTrial.py | Akado2009/katib | cf15cd4dbb3e61814e8054678eeee8c37411fbd1 | [
"Apache-2.0"
] | null | null | null | import keras
import numpy as np
from keras.datasets import cifar10
from ModelConstructor import ModelConstructor
from keras.utils import to_categorical
import argparse
import time
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='TrainingContainer')
parser.add_argument('--architecture', ... | 40.216667 | 81 | 0.629507 |
4a1111cc2431fa02c2ae41d051e98ccb15c96808 | 9,152 | py | Python | PaddleCV/PaddleGAN/network/STGAN_network.py | FrancisLiang/models-1 | e14d5bc1ab36d0dd11977f27cff54605bf99c945 | [
"Apache-2.0"
] | 2 | 2021-09-13T06:48:23.000Z | 2021-09-13T06:48:28.000Z | PaddleCV/PaddleGAN/network/STGAN_network.py | FrancisLiang/models-1 | e14d5bc1ab36d0dd11977f27cff54605bf99c945 | [
"Apache-2.0"
] | null | null | null | PaddleCV/PaddleGAN/network/STGAN_network.py | FrancisLiang/models-1 | e14d5bc1ab36d0dd11977f27cff54605bf99c945 | [
"Apache-2.0"
] | 1 | 2022-02-08T06:00:34.000Z | 2022-02-08T06:00:34.000Z | #copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve.
#
#Licensed under the Apache License, Version 2.0 (the "License");
#you may not use this file except in compliance with the License.
#You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#Unless required by applicable l... | 30.814815 | 78 | 0.462194 |
4a11136f4289c07f207a3855d525855b76af85f3 | 1,087 | py | Python | src/pandas_profiling/report/presentation/flavours/html/__init__.py | javiergodoy/pandas-profiling | 0bed133520b9982263ed8cbc1af6b8f5a511bf0d | [
"MIT"
] | 1 | 2020-02-14T23:51:34.000Z | 2020-02-14T23:51:34.000Z | src/pandas_profiling/report/presentation/flavours/html/__init__.py | javiergodoy/pandas-profiling | 0bed133520b9982263ed8cbc1af6b8f5a511bf0d | [
"MIT"
] | null | null | null | src/pandas_profiling/report/presentation/flavours/html/__init__.py | javiergodoy/pandas-profiling | 0bed133520b9982263ed8cbc1af6b8f5a511bf0d | [
"MIT"
] | 1 | 2020-06-12T00:02:15.000Z | 2020-06-12T00:02:15.000Z | from pandas_profiling.report.presentation.flavours.html.sequence import HTMLSequence
from pandas_profiling.report.presentation.flavours.html.table import HTMLTable
from pandas_profiling.report.presentation.flavours.html.variable import HTMLVariable
from pandas_profiling.report.presentation.flavours.html.image import HT... | 51.761905 | 86 | 0.867525 |
4a11137b4027f80a9c415720fbf95c56e2a3031a | 1,489 | py | Python | Using Keras/Testing.py | abbazs/Image-Classification-by-Keras-and-Tensorflow | e6e763ca5711d458fecc3aaa23da4e73ea43772b | [
"Apache-2.0"
] | 76 | 2018-09-23T12:14:43.000Z | 2022-03-24T16:25:47.000Z | Using Keras/Testing.py | abbazs/Image-Classification-by-Keras-and-Tensorflow | e6e763ca5711d458fecc3aaa23da4e73ea43772b | [
"Apache-2.0"
] | 11 | 2018-11-07T12:53:57.000Z | 2022-02-09T23:56:46.000Z | Using Keras/Testing.py | abbazs/Image-Classification-by-Keras-and-Tensorflow | e6e763ca5711d458fecc3aaa23da4e73ea43772b | [
"Apache-2.0"
] | 49 | 2018-12-03T21:59:24.000Z | 2022-03-07T13:23:45.000Z | import os
import numpy as np
from keras.preprocessing.image import ImageDataGenerator, load_img, img_to_array
from keras.models import Sequential, load_model
import time
start = time.time()
#Define Path
model_path = './models/model.h5'
model_weights_path = './models/weights.h5'
test_path = 'data/alien_test... | 24.409836 | 81 | 0.668234 |
4a111438387acd47aae5e86b1905db6e257fd97b | 161 | py | Python | tests/model_control/detailed/transf_Fisher/model_control_one_enabled_Fisher_MovingAverage_Seasonal_DayOfWeek_AR.py | shaido987/pyaf | b9afd089557bed6b90b246d3712c481ae26a1957 | [
"BSD-3-Clause"
] | 377 | 2016-10-13T20:52:44.000Z | 2022-03-29T18:04:14.000Z | tests/model_control/detailed/transf_Fisher/model_control_one_enabled_Fisher_MovingAverage_Seasonal_DayOfWeek_AR.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 160 | 2016-10-13T16:11:53.000Z | 2022-03-28T04:21:34.000Z | tests/model_control/detailed/transf_Fisher/model_control_one_enabled_Fisher_MovingAverage_Seasonal_DayOfWeek_AR.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 63 | 2017-03-09T14:51:18.000Z | 2022-03-27T20:52:57.000Z | import tests.model_control.test_ozone_custom_models_enabled as testmod
testmod.build_model( ['Fisher'] , ['MovingAverage'] , ['Seasonal_DayOfWeek'] , ['AR'] ); | 40.25 | 88 | 0.757764 |
4a11149cf8771079bc5f43063e349b5a560f0df7 | 5,222 | py | Python | cli/helpers/Config.py | lambdastack/lambdastack | 0898cf23b490aa520b75f1bcd85be56c74cf35cf | [
"Apache-2.0"
] | 6 | 2021-11-29T13:14:14.000Z | 2022-02-02T19:27:44.000Z | cli/helpers/Config.py | lambdastack/lambdastack | 0898cf23b490aa520b75f1bcd85be56c74cf35cf | [
"Apache-2.0"
] | 5 | 2021-11-17T13:21:58.000Z | 2021-11-22T16:31:08.000Z | cli/helpers/Config.py | lambdastack/lambdastack | 0898cf23b490aa520b75f1bcd85be56c74cf35cf | [
"Apache-2.0"
] | 2 | 2021-10-21T17:31:36.000Z | 2021-12-01T08:20:25.000Z | import os
from os.path import expanduser
LOG_TYPES = ['plain', 'json']
class InvalidLogTypeException(Exception):
pass
class Config:
class __ConfigBase:
def __init__(self):
self._docker_cli = bool(os.environ.get('LSCLI_DOCKER_SHARED_DIR',''))
self._output_dir = None
... | 31.269461 | 115 | 0.598238 |
4a1114d6ccaaedc99a5469ee56e5dc86a9b9384f | 15,176 | py | Python | scripts/reports/exprep.py | cclauss/archai | a5fb8f937f7f1319e3204120803b2a045e9f768b | [
"MIT"
] | 1 | 2020-10-03T18:18:41.000Z | 2020-10-03T18:18:41.000Z | scripts/reports/exprep.py | cclauss/archai | a5fb8f937f7f1319e3204120803b2a045e9f768b | [
"MIT"
] | null | null | null | scripts/reports/exprep.py | cclauss/archai | a5fb8f937f7f1319e3204120803b2a045e9f768b | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import argparse
from typing import Dict, List, Type, Iterator, Tuple
import glob
import os
import pathlib
from collections import OrderedDict
import yaml
from inspect import getsourcefile
import re
from runstats import Statistics
... | 41.922652 | 174 | 0.621837 |
4a11152ca545171b216d21463263b45e6ff6396e | 35,206 | py | Python | lib/streamlit/legacy_caching/hashing.py | sourcery-ai-bot/streamlit | cbfa69c8ec310a839148cfa4bac5697e6f392a79 | [
"Apache-2.0"
] | null | null | null | lib/streamlit/legacy_caching/hashing.py | sourcery-ai-bot/streamlit | cbfa69c8ec310a839148cfa4bac5697e6f392a79 | [
"Apache-2.0"
] | null | null | null | lib/streamlit/legacy_caching/hashing.py | sourcery-ai-bot/streamlit | cbfa69c8ec310a839148cfa4bac5697e6f392a79 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018-2022 Streamlit 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 wr... | 34.754195 | 104 | 0.624354 |
4a1115a86af9b4d937d0f783a2f3f934bf1771c5 | 189 | py | Python | twitter/tweets/serializers.py | yasminhillis/twitter-clone-django-react | c4027ed3f9a738c4cf123f735c4a78b1eb4a9245 | [
"MIT"
] | 1 | 2020-12-21T14:42:17.000Z | 2020-12-21T14:42:17.000Z | twitter/tweets/serializers.py | yasminhillis/twitter-clone-django-react | c4027ed3f9a738c4cf123f735c4a78b1eb4a9245 | [
"MIT"
] | null | null | null | twitter/tweets/serializers.py | yasminhillis/twitter-clone-django-react | c4027ed3f9a738c4cf123f735c4a78b1eb4a9245 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from tweets.models import Tweet
class TweetSerializer(serializers.ModelSerializer):
class Meta:
model = Tweet
fields = '__all__' | 27 | 51 | 0.740741 |
4a1116335dd065f4ae6dc2605dc2937bbf408ff2 | 17,620 | py | Python | Lib/site-packages/oslo_config/sphinxext.py | raghulnarayanasami/python | 5caa6317458275ef3afbf3e16bef396b0f3c27b9 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/oslo_config/sphinxext.py | raghulnarayanasami/python | 5caa6317458275ef3afbf3e16bef396b0f3c27b9 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/oslo_config/sphinxext.py | raghulnarayanasami/python | 5caa6317458275ef3afbf3e16bef396b0f3c27b9 | [
"bzip2-1.0.6"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 34.213592 | 76 | 0.600284 |
4a1117440d38d3c4003a0ffef4133f94fcade0f2 | 2,043 | py | Python | ch6-storing-data/saveToMySQL.py | DarkDesire/python-scraping | 8023a4d129f756084ac39827a8cfb98a9201deed | [
"Apache-2.0"
] | null | null | null | ch6-storing-data/saveToMySQL.py | DarkDesire/python-scraping | 8023a4d129f756084ac39827a8cfb98a9201deed | [
"Apache-2.0"
] | null | null | null | ch6-storing-data/saveToMySQL.py | DarkDesire/python-scraping | 8023a4d129f756084ac39827a8cfb98a9201deed | [
"Apache-2.0"
] | null | null | null | from urllib.request import urlopen
from bs4 import BeautifulSoup
import re
import pymysql
from random import shuffle
import pymysql
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
conn = pymysql.connect(host='127.0.0.1',
user='root', passwd='admin', charset='utf8')
... | 31.921875 | 80 | 0.632403 |
4a11179e6b0281041520228a541ad20530340aaa | 411 | py | Python | docs/cookbook/advanced-messaging/sending_data_a.py | tjguk/networkzero | 5b40e3a213f22dc82d2ce8d36925019eaaf2c06e | [
"MIT"
] | 39 | 2016-03-31T07:49:45.000Z | 2021-09-01T10:34:02.000Z | docs/cookbook/advanced-messaging/sending_data_a.py | tjguk/networkzero | 5b40e3a213f22dc82d2ce8d36925019eaaf2c06e | [
"MIT"
] | 48 | 2016-04-07T20:22:44.000Z | 2021-09-26T18:12:01.000Z | docs/cookbook/advanced-messaging/sending_data_a.py | tjguk/networkzero | 5b40e3a213f22dc82d2ce8d36925019eaaf2c06e | [
"MIT"
] | 15 | 2016-04-07T20:12:18.000Z | 2019-10-25T14:31:41.000Z | import os, sys
import tempfile
import networkzero as nw0
address = nw0.advertise("gallery")
print("Gallery:", address)
while True:
filename, data = nw0.wait_for_message_from(address, autoreply=True)
bytes = nw0.string_to_bytes(data)
temp_filepath = os.path.join(tempfile.gettempdir(), filename)
wit... | 27.4 | 71 | 0.712895 |
4a1117c66c89620a1846323d8eac41e81fcff500 | 11,005 | py | Python | basicts/run.py | zezhishao/GuanCang_BasicTS | bbf82b9d08e82db78d4e9e9b11f43a676b54ad7c | [
"Apache-2.0"
] | null | null | null | basicts/run.py | zezhishao/GuanCang_BasicTS | bbf82b9d08e82db78d4e9e9b11f43a676b54ad7c | [
"Apache-2.0"
] | null | null | null | basicts/run.py | zezhishao/GuanCang_BasicTS | bbf82b9d08e82db78d4e9e9b11f43a676b54ad7c | [
"Apache-2.0"
] | null | null | null | import os
import sys
sys.path.append(os.path.abspath(os.path.dirname(os.path.dirname(__file__))))
from argparse import ArgumentParser
from easytorch import launch_training
def parse_args():
parser = ArgumentParser(description='Run time series forecasting model in BasicTS framework based on EasyTorch!')
# parse... | 90.204918 | 129 | 0.703771 |
4a1118c2a292e74b0878ecbd0f73f721c94cb6de | 4,045 | py | Python | lldb/test/API/functionalities/jitloader_gdb/TestJITLoaderGDB.py | rarutyun/llvm | 76fa6b3bcade074bdedef740001c4528e1aa08a8 | [
"Apache-2.0"
] | 305 | 2019-09-14T17:16:05.000Z | 2022-03-31T15:05:20.000Z | lldb/test/API/functionalities/jitloader_gdb/TestJITLoaderGDB.py | rarutyun/llvm | 76fa6b3bcade074bdedef740001c4528e1aa08a8 | [
"Apache-2.0"
] | 410 | 2019-06-06T20:52:32.000Z | 2022-01-18T14:21:48.000Z | lldb/test/API/functionalities/jitloader_gdb/TestJITLoaderGDB.py | rarutyun/llvm | 76fa6b3bcade074bdedef740001c4528e1aa08a8 | [
"Apache-2.0"
] | 50 | 2019-05-10T21:12:24.000Z | 2022-01-21T06:39:47.000Z | """Test for the JITLoaderGDB interface"""
import unittest2
import os
import lldb
from lldbsuite.test import lldbutil
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
class JITLoaderGDBTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@skipTestIfFn(
lambda: "... | 37.453704 | 90 | 0.655624 |
4a1118f108a55a1a20e4d1b27c2589f53b05430c | 2,210 | py | Python | leetcode/34.py | pingrunhuang/CodeChallenge | a8e5274e04c47d851836197907266418af4f1a22 | [
"MIT"
] | null | null | null | leetcode/34.py | pingrunhuang/CodeChallenge | a8e5274e04c47d851836197907266418af4f1a22 | [
"MIT"
] | null | null | null | leetcode/34.py | pingrunhuang/CodeChallenge | a8e5274e04c47d851836197907266418af4f1a22 | [
"MIT"
] | null | null | null | '''
Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value.
Your algorithm's runtime complexity must be in the order of O(log n).
If the target is not found in the array, return [-1, -1].
TODO Could not solve the corner case
'''
class Solution:
d... | 29.078947 | 121 | 0.499548 |
4a11190eae860050c3ccca11b79bc0c8b6e86f2d | 939 | py | Python | examples/multi-column-autocompletion.py | davidbrochart/python-prompt-toolkit | 8498692b31671fee7c5a426300a9df2ee290eae2 | [
"BSD-3-Clause"
] | 2 | 2020-04-12T01:23:25.000Z | 2021-05-22T13:46:00.000Z | examples/multi-column-autocompletion.py | davidbrochart/python-prompt-toolkit | 8498692b31671fee7c5a426300a9df2ee290eae2 | [
"BSD-3-Clause"
] | null | null | null | examples/multi-column-autocompletion.py | davidbrochart/python-prompt-toolkit | 8498692b31671fee7c5a426300a9df2ee290eae2 | [
"BSD-3-Clause"
] | 2 | 2016-12-30T23:57:44.000Z | 2021-05-22T13:50:21.000Z | #!/usr/bin/env python
"""
Similar to the autocompletion example. But display all the completions in multiple columns.
"""
from __future__ import unicode_literals
from prompt_toolkit.contrib.completers import WordCompleter
from prompt_toolkit import prompt
animal_completer = WordCompleter([
'alligator',
'ant'... | 17.388889 | 105 | 0.597444 |
4a11191cc78b9f390ebed5f50ec6a3bc064d0ce3 | 492 | py | Python | rdmo/questions/urls/__init__.py | Raspeanut/rdmo | 9f785010a499c372a2f8368ccf76d2ea4150adcb | [
"Apache-2.0"
] | null | null | null | rdmo/questions/urls/__init__.py | Raspeanut/rdmo | 9f785010a499c372a2f8368ccf76d2ea4150adcb | [
"Apache-2.0"
] | null | null | null | rdmo/questions/urls/__init__.py | Raspeanut/rdmo | 9f785010a499c372a2f8368ccf76d2ea4150adcb | [
"Apache-2.0"
] | null | null | null | from django.urls import include, re_path
from rest_framework import routers
from ..views import CatalogExportView, CatalogImportXMLView, CatalogsView
urlpatterns = [
re_path(r'^catalogs/(?P<pk>[0-9]+)/export/(?P<format>[a-z]+)/$', CatalogExportView.as_view(), name='questions_catalog_export'),
re_path(r'^cata... | 41 | 131 | 0.73374 |
4a111b23d0a976b761ae69f036294d2cf749efb9 | 162 | py | Python | eurofx/__init__.py | supercoderz/pyeurofx | 3f579bb6e4836dadb187df8c74a9d186ae7e39e7 | [
"MIT"
] | 2 | 2018-07-14T11:58:35.000Z | 2018-11-19T22:47:58.000Z | eurofx/__init__.py | supercoderz/pyeurofx | 3f579bb6e4836dadb187df8c74a9d186ae7e39e7 | [
"MIT"
] | null | null | null | eurofx/__init__.py | supercoderz/pyeurofx | 3f579bb6e4836dadb187df8c74a9d186ae7e39e7 | [
"MIT"
] | 2 | 2017-01-03T11:50:45.000Z | 2019-11-01T14:33:40.000Z | from .eurofx import get_historical_data,get_daily_data,get_currency_list
from .eurofx_pandas import get_historical_data_df,get_daily_data_df,get_currency_list_df
| 54 | 88 | 0.91358 |
4a111b56d327d182f51f5b9197073fba275d6f32 | 412 | py | Python | setup.py | esupoff/astor | 5c52bc2685793cef876acd95fa0aacca3c95ca3f | [
"BSD-3-Clause"
] | 1 | 2021-07-07T09:05:57.000Z | 2021-07-07T09:05:57.000Z | setup.py | esupoff/astor | 5c52bc2685793cef876acd95fa0aacca3c95ca3f | [
"BSD-3-Clause"
] | null | null | null | setup.py | esupoff/astor | 5c52bc2685793cef876acd95fa0aacca3c95ca3f | [
"BSD-3-Clause"
] | null | null | null | import os
import sys
from setuptools import setup
from setuptools.config import read_configuration
from setuputils import find_version
def here(*paths):
return os.path.join(os.path.dirname(__file__), *paths)
config = read_configuration(here('setup.cfg'))
config['metadata']['version'] = find_version(here('astor... | 22.888889 | 74 | 0.754854 |
4a111caf55597e56c7d387d6a2d92cdf594238ea | 3,439 | py | Python | peregrinearb/tests/bellmannx_test.py | lyn716/peregrine | 5b1f6a839bf4a86198ad85f527b04b9a34ea7ab9 | [
"MIT"
] | null | null | null | peregrinearb/tests/bellmannx_test.py | lyn716/peregrine | 5b1f6a839bf4a86198ad85f527b04b9a34ea7ab9 | [
"MIT"
] | null | null | null | peregrinearb/tests/bellmannx_test.py | lyn716/peregrine | 5b1f6a839bf4a86198ad85f527b04b9a34ea7ab9 | [
"MIT"
] | null | null | null | from unittest import TestCase
from peregrinearb import bellman_ford_multi, multi_digraph_from_json, multi_digraph_from_dict, \
calculate_profit_ratio_for_path, bellman_ford
import json
import networkx as nx
def graph_from_dict(graph_dict):
if 'graph_type' not in graph_dict:
raise ValueError('graph_dic... | 36.978495 | 119 | 0.640012 |
4a111ce8c93b72da44f8e7357a247203f33c7d73 | 1,102 | py | Python | src/pipelinex/framework/context/pipelines_in_parameters_context.py | Lap1n/pipelinex | aed47be7fd27618e345d34217e199d3795153add | [
"Apache-2.0"
] | null | null | null | src/pipelinex/framework/context/pipelines_in_parameters_context.py | Lap1n/pipelinex | aed47be7fd27618e345d34217e199d3795153add | [
"Apache-2.0"
] | null | null | null | src/pipelinex/framework/context/pipelines_in_parameters_context.py | Lap1n/pipelinex | aed47be7fd27618e345d34217e199d3795153add | [
"Apache-2.0"
] | null | null | null | from typing import Dict # NOQA
from kedro.pipeline import Pipeline # NOQA
from importlib import import_module
from .hatch_parameters_context import HatchParametersContext
from .hooks_in_parameters_context import HooksInParametersContext
class PipelinesInParametersContext(HatchParametersContext, HooksInParametersCon... | 36.733333 | 85 | 0.69873 |
4a111d1bf64e336ba2f0599f53c13a3d8343e481 | 4,184 | py | Python | plugins/modules/nsi_api_v1_search_fres_by_freid.py | ciena/ciena.mcp | b266a7cbd912c547f6e4877597d67ea9254e5758 | [
"Apache-2.0"
] | 3 | 2021-07-19T23:56:34.000Z | 2021-11-08T14:23:53.000Z | plugins/modules/nsi_api_v1_search_fres_by_freid.py | ciena/ciena.mcp | b266a7cbd912c547f6e4877597d67ea9254e5758 | [
"Apache-2.0"
] | 1 | 2022-01-19T22:06:49.000Z | 2022-01-24T15:16:53.000Z | plugins/modules/nsi_api_v1_search_fres_by_freid.py | ciena/ciena.mcp | b266a7cbd912c547f6e4877597d67ea9254e5758 | [
"Apache-2.0"
] | 1 | 2021-11-08T14:25:29.000Z | 2021-11-08T14:25:29.000Z | #!/usr/bin/env python
# Info module template
#############################################
# WARNING #
#############################################
#
# This file is auto generated by
# https://github.com/jgroom33/vmware_rest_code_generator
#
# Do not edit this file manually.
#
# Ch... | 29.885714 | 86 | 0.633604 |
4a111d490237911f0a8aa3b8aa9e18648f3da215 | 16,823 | py | Python | doctool/partials.py | nam4dev/doctool | 8b161fd099165e66862a45e56d21ff27bf521766 | [
"MIT"
] | null | null | null | doctool/partials.py | nam4dev/doctool | 8b161fd099165e66862a45e56d21ff27bf521766 | [
"MIT"
] | null | null | null | doctool/partials.py | nam4dev/doctool | 8b161fd099165e66862a45e56d21ff27bf521766 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = "Namgyal BRISSON (nam4dev)"
__since__ = "10/25/2019"
__copyright__ = """MIT License
Copyright (c) 2019 Namgyal Brisson
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Softw... | 31.801512 | 120 | 0.616656 |
4a111d8595893cedd6547bd4eab5f0bd3c559494 | 6,264 | py | Python | results/results_2/model_2_07/results_2_07_code.py | ibrahimoa/meteor_classification | 4f6267944562f81546bf5fd5e7a5f568bd2e24a5 | [
"CC0-1.0"
] | null | null | null | results/results_2/model_2_07/results_2_07_code.py | ibrahimoa/meteor_classification | 4f6267944562f81546bf5fd5e7a5f568bd2e24a5 | [
"CC0-1.0"
] | 2 | 2021-06-07T10:14:07.000Z | 2021-06-18T15:12:49.000Z | results/results_2/model_2_07/results_2_07_code.py | ibrahimoa/meteor_classification | 4f6267944562f81546bf5fd5e7a5f568bd2e24a5 | [
"CC0-1.0"
] | null | null | null | import tensorflow as tf
from tensorflow.keras.layers import Dense, Conv2D, MaxPooling2D, Dropout, Flatten
from tensorflow.keras.optimizers import Adam
from tensorflow.keras.preprocessing.image import ImageDataGenerator
from tensorflow.keras.callbacks import Callback
import numpy as np
import matplotlib.pyplot as plt
f... | 45.064748 | 140 | 0.600415 |
4a111d88e55122bbcf43fed6eee83481d4aba946 | 4,895 | py | Python | autotest/verf_test.py | hwreeves-USGS/pyemu | 6b443601fbb9bcb9e97a8c200a78480c11c51f22 | [
"BSD-3-Clause"
] | 94 | 2015-01-09T14:19:47.000Z | 2022-03-14T18:42:23.000Z | autotest/verf_test.py | hwreeves-USGS/pyemu | 6b443601fbb9bcb9e97a8c200a78480c11c51f22 | [
"BSD-3-Clause"
] | 184 | 2020-05-29T14:25:23.000Z | 2022-03-29T04:01:42.000Z | autotest/verf_test.py | hwreeves-USGS/pyemu | 6b443601fbb9bcb9e97a8c200a78480c11c51f22 | [
"BSD-3-Clause"
] | 51 | 2015-01-14T15:55:11.000Z | 2021-12-28T17:59:24.000Z | import os
import numpy as np
#import matplotlib.pyplot as plt
import pandas as pd
import pyemu
predictions = ["sw_gw_0","sw_gw_1","or28c05_0","or28c05_1"]
post_mat = os.path.join("verf_results","post.cov")
verf_dir = "verf_results"
ord_base = os.path.join(verf_dir,"freyberg_ord")
if not os.path.exists("temp"):
o... | 37.653846 | 115 | 0.638407 |
4a111e481264ea2f2f7c1097aa1a982cdab129e2 | 473 | py | Python | platform/core/polyaxon/administration/__init__.py | hackerwins/polyaxon | ff56a098283ca872abfbaae6ba8abba479ffa394 | [
"Apache-2.0"
] | null | null | null | platform/core/polyaxon/administration/__init__.py | hackerwins/polyaxon | ff56a098283ca872abfbaae6ba8abba479ffa394 | [
"Apache-2.0"
] | null | null | null | platform/core/polyaxon/administration/__init__.py | hackerwins/polyaxon | ff56a098283ca872abfbaae6ba8abba479ffa394 | [
"Apache-2.0"
] | null | null | null | from hestia.service_interface import LazyServiceWrapper
from django.conf import settings
from administration.service import AdminService
def get_admin_backend():
return settings.ADMIN_BACKEND or 'administration.service.AdminService'
def get_admin_options():
return {'models': settings.ADMIN_MODELS}
backe... | 21.5 | 74 | 0.79704 |
4a111e78dd7a53c9191820414c26b11c10b3b15b | 1,710 | py | Python | lib/surface/pubsub/subscriptions/get_iam_policy.py | kustodian/google-cloud-sdk | b6bae4137d4b58030adb3dcb1271216dfb19f96d | [
"Apache-2.0"
] | null | null | null | lib/surface/pubsub/subscriptions/get_iam_policy.py | kustodian/google-cloud-sdk | b6bae4137d4b58030adb3dcb1271216dfb19f96d | [
"Apache-2.0"
] | 11 | 2020-02-29T02:51:12.000Z | 2022-03-30T23:20:08.000Z | lib/surface/pubsub/subscriptions/get_iam_policy.py | kustodian/google-cloud-sdk | b6bae4137d4b58030adb3dcb1271216dfb19f96d | [
"Apache-2.0"
] | 1 | 2020-07-24T18:47:35.000Z | 2020-07-24T18:47:35.000Z | # -*- coding: utf-8 -*- #
# Copyright 2017 Google LLC. 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 requir... | 32.264151 | 74 | 0.716374 |
4a111f675355638e34ec09448135de7399c550f6 | 4,872 | py | Python | test/functional/interface_http.py | criptolot/bsvcoin | 125fc951c1bb5a87b706c5a3821a1e3252f45a3d | [
"MIT"
] | null | null | null | test/functional/interface_http.py | criptolot/bsvcoin | 125fc951c1bb5a87b706c5a3821a1e3252f45a3d | [
"MIT"
] | null | null | null | test/functional/interface_http.py | criptolot/bsvcoin | 125fc951c1bb5a87b706c5a3821a1e3252f45a3d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the RPC HTTP basics."""
from test_framework.test_framework import BsvcoinTestFramework
from test_... | 44.290909 | 114 | 0.636905 |
4a111f93e4c79037823a0aad5225fad57a7854fa | 11,662 | py | Python | wechat_jump_auto_curves.py | GangHg/wechat_jump_game | a6139aa6d0730c62107a54fd32a500aab2db8375 | [
"Apache-2.0"
] | null | null | null | wechat_jump_auto_curves.py | GangHg/wechat_jump_game | a6139aa6d0730c62107a54fd32a500aab2db8375 | [
"Apache-2.0"
] | null | null | null | wechat_jump_auto_curves.py | GangHg/wechat_jump_game | a6139aa6d0730c62107a54fd32a500aab2db8375 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
##基于python3.5(64位)
###如果缺少scikit-image库,建议进下面网址下载whl直接安装
##https://www.lfd.uci.edu/~gohlke/pythonlibs/#scikit-image
=== 思路 ===
核心:每次落稳之后截图,根据截图算出棋子的坐标和下一个块顶面的中点坐标,
根据两个点的距离乘以一个时间系数获得长按的时间
识别棋子:靠棋子的颜色来识别位置,通过截图发现最下面一行大概是一条
直线,就从上往下一行一行遍历,比较颜色(颜色用了一个区间来比较)
找到最下面的那一行的所有点,然后求个中点,求... | 29.979434 | 90 | 0.561139 |
4a111fa13cb1124ecf8b445622087858c42c315f | 10,143 | py | Python | ublock/core.py | gwappa/python-ublock | bdd015c8e118cc6d49e916e65ce6ff6784a17b52 | [
"MIT"
] | 1 | 2019-04-22T13:07:43.000Z | 2019-04-22T13:07:43.000Z | ublock/core.py | gwappa/python-ublock | bdd015c8e118cc6d49e916e65ce6ff6784a17b52 | [
"MIT"
] | null | null | null | ublock/core.py | gwappa/python-ublock | bdd015c8e118cc6d49e916e65ce6ff6784a17b52 | [
"MIT"
] | null | null | null | import time
import threading
from traceback import print_tb
import serial
class protocol:
"""used for discriminating between line messages
other than the `DELIMITER`, usages are completely
up to the implementor."""
DEBUG = '.'
INFO = '>'
CONFIG = '@'
RESULT = '+'
... | 30.92378 | 95 | 0.578527 |
4a1120946ddcfdc38e3d759bb1d6a87a8565f053 | 1,785 | py | Python | talks/burlingtonMeetup2019/python/one_neuron.py | breckbaldwin/StanIsThePlan | 919fd9843d5e73234d582f8a33b0477a1f010887 | [
"BSD-3-Clause"
] | 2 | 2019-08-19T19:09:43.000Z | 2019-08-21T13:08:23.000Z | talks/burlingtonMeetup2019/python/one_neuron.py | breckbaldwin/StanIsThePlan | 919fd9843d5e73234d582f8a33b0477a1f010887 | [
"BSD-3-Clause"
] | null | null | null | talks/burlingtonMeetup2019/python/one_neuron.py | breckbaldwin/StanIsThePlan | 919fd9843d5e73234d582f8a33b0477a1f010887 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
plt.style.use('default')
import keras
from keras.models import Sequential
from keras.layers import Dense
from keras.utils import to_categorical
from keras import optimizers
X=np.array([2,2])
Y=np.array([1,1])
model = Sequential()
model.add(Dense(1, batch_inpu... | 27.045455 | 133 | 0.596639 |
4a1120d8a406ba0a251720d6504c60fb45bc4126 | 4,154 | py | Python | pong/pong-solution.py | titimoby/gamebuino-python | d24ddae30177122fad5a9aa55ed90fc3571c5eee | [
"MIT"
] | null | null | null | pong/pong-solution.py | titimoby/gamebuino-python | d24ddae30177122fad5a9aa55ed90fc3571c5eee | [
"MIT"
] | null | null | null | pong/pong-solution.py | titimoby/gamebuino-python | d24ddae30177122fad5a9aa55ed90fc3571c5eee | [
"MIT"
] | null | null | null | # ----------------------------------------------------------
# Pong
# Gamebuino Academy Workshop
#
# This is a CircuitPython port of the original C++ code
# Maybe not the more pythonic, but as close as possible
# to the original to be able to understand
# Original workshop: https://gamebuino.com/academy/workshop/make-... | 29.460993 | 108 | 0.649976 |
4a1120f50406f00b0bbdd8318cf555e8aece5ba8 | 1,633 | py | Python | setup.py | jonasl/python-periphery | 37d2b6d10fdc0fa7779f94047e82d3bed4e79dac | [
"MIT"
] | 58 | 2020-07-23T09:56:16.000Z | 2022-03-15T23:43:26.000Z | setup.py | jonasl/python-periphery | 37d2b6d10fdc0fa7779f94047e82d3bed4e79dac | [
"MIT"
] | null | null | null | setup.py | jonasl/python-periphery | 37d2b6d10fdc0fa7779f94047e82d3bed4e79dac | [
"MIT"
] | 16 | 2020-06-09T15:57:39.000Z | 2022-03-23T05:02:47.000Z | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name='python-periphery',
version='2.0.0',
description='A pure Python 2/3 library for peripheral I/O (GPIO, LED, PWM, SPI, I2C, MMIO, Serial) in Linux.',
author='vsergeev',
author_email='v@sergeev.i... | 52.677419 | 486 | 0.68218 |
4a1121aa0d5cbf908d33f7683b5f2c294c110e6b | 11,600 | py | Python | jsonschema/_validators.py | vsajip/jsonschema | dc9e996c5dc53963c82adf06c27583407ce1e462 | [
"MIT"
] | 1 | 2017-09-02T00:37:49.000Z | 2017-09-02T00:37:49.000Z | jsonschema/_validators.py | vsajip/jsonschema | dc9e996c5dc53963c82adf06c27583407ce1e462 | [
"MIT"
] | null | null | null | jsonschema/_validators.py | vsajip/jsonschema | dc9e996c5dc53963c82adf06c27583407ce1e462 | [
"MIT"
] | null | null | null | import re
from jsonschema import _utils
from jsonschema.exceptions import FormatError, ValidationError
from jsonschema.compat import iteritems
FLOAT_TOLERANCE = 10 ** -15
def patternProperties(validator, patternProperties, instance, schema):
if not validator.is_type(instance, "object"):
return
for... | 31.955923 | 79 | 0.618448 |
4a11229346e75e67a5eeebca050f01f5a9492af3 | 120 | py | Python | maskrcnn_benchmark/modeling/backbone/__init__.py | chenzhutian/auto-infog-timeline | 0e524d5045aa0c925bbf1d8803782169735a4597 | [
"MIT"
] | 10 | 2019-10-01T08:33:41.000Z | 2021-09-03T18:09:51.000Z | maskrcnn_benchmark/modeling/backbone/__init__.py | PaParaZz1/auto-infog-timeline | 9f7dd5ef939a6955c69b7ce329b3b87fff89f6f5 | [
"MIT"
] | 1 | 2019-12-30T13:05:24.000Z | 2019-12-30T13:05:24.000Z | maskrcnn_benchmark/modeling/backbone/__init__.py | PaParaZz1/auto-timeline-v2 | b01e6efdaeb2f63da449844ec818d21ed305c4cf | [
"MIT"
] | 2 | 2020-12-21T18:42:08.000Z | 2021-11-30T15:24:27.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
from .backbone import build_backbone, ResNetXFPN | 60 | 71 | 0.8 |
4a1123f9ad50199edc79850f3b0679bbc5120676 | 1,353 | py | Python | scripts/pdst.py | akikuno/rosalind | 7015dc63e493d870e5789e99f2ee523a9b1f5ab9 | [
"MIT"
] | null | null | null | scripts/pdst.py | akikuno/rosalind | 7015dc63e493d870e5789e99f2ee523a9b1f5ab9 | [
"MIT"
] | null | null | null | scripts/pdst.py | akikuno/rosalind | 7015dc63e493d870e5789e99f2ee523a9b1f5ab9 | [
"MIT"
] | null | null | null | # https://rosalind.info/problems/pdst/
def fmtfa(fasta: list):
prev = True
header = []
seq = []
for f in fasta:
if ">" in f:
header.append(f[1:])
prev = True
elif prev:
seq.append(f)
prev = False
else:
seq[-1] += f
... | 18.534247 | 54 | 0.473762 |
4a112449855f2c8ae46fee4ce7db3c53cbf2a071 | 73,168 | py | Python | pyscf/scf/hf.py | tepl/pyscf | 503dcae94ca19d37f0146fa988ec77cf60954def | [
"Apache-2.0"
] | null | null | null | pyscf/scf/hf.py | tepl/pyscf | 503dcae94ca19d37f0146fa988ec77cf60954def | [
"Apache-2.0"
] | null | null | null | pyscf/scf/hf.py | tepl/pyscf | 503dcae94ca19d37f0146fa988ec77cf60954def | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2014-2020 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | 35.552964 | 104 | 0.597775 |
4a1124873aa39b3bdef22d6f64e413bbfc80a345 | 4,079 | py | Python | tests/contrib/sqlalchemy/test_patch.py | mbmblbelt/dd-trace-py | 906fb7fa91d0ed59d263df74e14aacc8b2d70251 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | tests/contrib/sqlalchemy/test_patch.py | mbmblbelt/dd-trace-py | 906fb7fa91d0ed59d263df74e14aacc8b2d70251 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | tests/contrib/sqlalchemy/test_patch.py | mbmblbelt/dd-trace-py | 906fb7fa91d0ed59d263df74e14aacc8b2d70251 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | import sqlalchemy
from ddtrace import Pin
from ddtrace.constants import ANALYTICS_SAMPLE_RATE_KEY
from ddtrace.contrib.sqlalchemy import patch
from ddtrace.contrib.sqlalchemy import unpatch
from ... import TracerTestCase
from ... import assert_is_measured
from ..config import POSTGRES_CONFIG
class SQLAlchemyPatchTe... | 36.747748 | 108 | 0.619024 |
4a1125cc680ae42d54571abd694b863b5e7ed14a | 716 | py | Python | src/internal/bot.py | gtaodiscord/modmail | 9584f29aff57969368310f56f3f75e3e0b889b11 | [
"MIT"
] | null | null | null | src/internal/bot.py | gtaodiscord/modmail | 9584f29aff57969368310f56f3f75e3e0b889b11 | [
"MIT"
] | null | null | null | src/internal/bot.py | gtaodiscord/modmail | 9584f29aff57969368310f56f3f75e3e0b889b11 | [
"MIT"
] | null | null | null | from disnake import Intents
from disnake.ext.commands import Bot as _BotBase
from loguru import logger
from src.utils import get_config
class Bot(_BotBase):
def __init__(self, *args, **kwargs) -> None:
self.config = get_config()
intents = Intents.default()
intents.members = True
... | 23.866667 | 79 | 0.641061 |
4a1125f495dc5a809aecaa1fdc24d6457dae3fd6 | 92,735 | py | Python | loguru/_logger.py | phillipuniverse/loguru | 3d5234541c81318e7f6f725eca7bab294fe09c23 | [
"MIT"
] | 11,391 | 2018-12-08T17:44:13.000Z | 2022-03-31T17:55:24.000Z | loguru/_logger.py | vkirilenko/loguru | 68616485f4f0decb5fced36a16040f5e05e2842f | [
"MIT"
] | 610 | 2018-12-08T18:03:03.000Z | 2022-03-31T22:28:14.000Z | loguru/_logger.py | vkirilenko/loguru | 68616485f4f0decb5fced36a16040f5e05e2842f | [
"MIT"
] | 601 | 2018-12-08T17:46:42.000Z | 2022-03-30T04:23:56.000Z | """
.. References and links rendered by Sphinx are kept here as "module documentation" so that they can
be used in the ``Logger`` docstrings but do not pollute ``help(logger)`` output.
.. |Logger| replace:: :class:`~Logger`
.. |add| replace:: :meth:`~Logger.add()`
.. |remove| replace:: :meth:`~Logger.remove()`
.. |... | 45.302882 | 100 | 0.513301 |
4a1129432f547f0030c5ef80aabd87c86aff60d3 | 9,054 | py | Python | samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_number_with_validations.py | mkj-is/openapi-generator | 71a8e0afda1e2a0876d166b8dba4c7ba0fe0a5a5 | [
"Apache-2.0"
] | 4 | 2021-02-20T21:39:04.000Z | 2021-08-24T13:54:15.000Z | samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_number_with_validations.py | mkj-is/openapi-generator | 71a8e0afda1e2a0876d166b8dba4c7ba0fe0a5a5 | [
"Apache-2.0"
] | 27 | 2021-04-07T07:22:02.000Z | 2022-03-31T05:10:11.000Z | samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_number_with_validations.py | mkj-is/openapi-generator | 71a8e0afda1e2a0876d166b8dba4c7ba0fe0a5a5 | [
"Apache-2.0"
] | 2 | 2021-06-11T15:24:43.000Z | 2021-06-13T12:20:31.000Z | """
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
import re # noq... | 39.537118 | 174 | 0.59609 |
4a112963b0e747d944e6b74d4e5aef52b1223fce | 350 | py | Python | MaidenFlight.py | IanC95/Master18-fleet-drones | f4a06bcbbf991a5ab163a95a458fa0f0a4184d8f | [
"MIT"
] | null | null | null | MaidenFlight.py | IanC95/Master18-fleet-drones | f4a06bcbbf991a5ab163a95a458fa0f0a4184d8f | [
"MIT"
] | null | null | null | MaidenFlight.py | IanC95/Master18-fleet-drones | f4a06bcbbf991a5ab163a95a458fa0f0a4184d8f | [
"MIT"
] | null | null | null | import time
import ps_drone
drone = ps_drone.Drone()
drone.startup()
drone.takeoff()
time.sleep(7.5)
drone.moveForward()
time.sleep(1)
drone.stop()
time.sleep(2)
drone.moveBackward(0.25)
time.sleep(1.5)
drone.stop()
time.sleep(2)
drone.setSpeed(1.0)
print drone.setSpeed()
drone.turnLeft()
time.sleep(2)
drone.stop... | 12.5 | 24 | 0.731429 |
4a1129b7635c437f30c679bb5e1988fda7761ab8 | 1,142 | py | Python | bw2regional/validate.py | brightway-lca/brightway2-regional-copy | 6aab66e76992dae89c48d60f13bf9c8baef17420 | [
"BSD-3-Clause"
] | 1 | 2022-03-02T10:33:39.000Z | 2022-03-02T10:33:39.000Z | bw2regional/validate.py | brightway-lca/brightway2-regional-copy | 6aab66e76992dae89c48d60f13bf9c8baef17420 | [
"BSD-3-Clause"
] | 3 | 2020-03-03T15:44:56.000Z | 2021-07-21T13:34:29.000Z | bw2regional/validate.py | brightway-lca/brightway2-regional-copy | 6aab66e76992dae89c48d60f13bf9c8baef17420 | [
"BSD-3-Clause"
] | 1 | 2022-02-14T14:04:51.000Z | 2022-02-14T14:04:51.000Z | from bw2data.validate import maybe_uncertainty, valid_tuple
from voluptuous import Any, Invalid, Schema
_maybe_uncertainty = Schema(maybe_uncertainty)
_loading_value = Schema(Any(str, valid_tuple))
def uncertainty_list(obj):
try:
assert len(obj) == 2
assert isinstance(obj, list)
_maybe_un... | 26.55814 | 67 | 0.662872 |
4a112ae04246320ceefd065a7ad90adcf8f0bf29 | 59,531 | py | Python | SimpleBOWizard.py | nosce/SimpleBOWizard | 281d37e82a12a5035be1afb0edf01deccbc9d926 | [
"MIT"
] | null | null | null | SimpleBOWizard.py | nosce/SimpleBOWizard | 281d37e82a12a5035be1afb0edf01deccbc9d926 | [
"MIT"
] | null | null | null | SimpleBOWizard.py | nosce/SimpleBOWizard | 281d37e82a12a5035be1afb0edf01deccbc9d926 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# =============================================================================
# The SimpleBOWizard guides through all steps required for a simple buffer
# overflow. The user can enter all required information step by step.
# Based on this, the exploit file will be create... | 30.59147 | 154 | 0.652988 |
4a112b5c42be07dc5596f4fc5c0af76bbb7e2cf5 | 21,837 | py | Python | seleniumbase/console_scripts/sb_install.py | gourav-iquanti/SeleniumBase | 420b6cc7b843f85e6efdc3eb90943b356e11b355 | [
"MIT"
] | null | null | null | seleniumbase/console_scripts/sb_install.py | gourav-iquanti/SeleniumBase | 420b6cc7b843f85e6efdc3eb90943b356e11b355 | [
"MIT"
] | null | null | null | seleniumbase/console_scripts/sb_install.py | gourav-iquanti/SeleniumBase | 420b6cc7b843f85e6efdc3eb90943b356e11b355 | [
"MIT"
] | null | null | null | """
Installs the specified web driver.
Usage:
seleniumbase install {chromedriver|geckodriver|edgedriver|
iedriver|operadriver} [OPTIONS]
Options:
VERSION Specify the version.
(Default chromedriver version = 2.44)
Use ... | 45.6841 | 79 | 0.555754 |
4a112be894a1ccede23cefcc2cda63acd5618b15 | 107 | py | Python | querv/__init__.py | boweeb/querv | 23f832018d915fe46ff85bd62b3fdd662328ae2e | [
"0BSD"
] | null | null | null | querv/__init__.py | boweeb/querv | 23f832018d915fe46ff85bd62b3fdd662328ae2e | [
"0BSD"
] | null | null | null | querv/__init__.py | boweeb/querv | 23f832018d915fe46ff85bd62b3fdd662328ae2e | [
"0BSD"
] | null | null | null | # -*- coding: utf-8 -*-
__author__ = 'Jesse Butcher'
__email__ = 'boweeb@gmail.com'
__version__ = '0.2.0'
| 17.833333 | 30 | 0.64486 |
4a112c5907f0191d437cac62a30bb1c6e91a8e88 | 648 | py | Python | django_hotel/src/home/views.py | darkares23/django-hotelSite | 71886deb27bad291d03bd7e5a2a64f63b6f889e0 | [
"MIT"
] | null | null | null | django_hotel/src/home/views.py | darkares23/django-hotelSite | 71886deb27bad291d03bd7e5a2a64f63b6f889e0 | [
"MIT"
] | null | null | null | django_hotel/src/home/views.py | darkares23/django-hotelSite | 71886deb27bad291d03bd7e5a2a64f63b6f889e0 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from property.models import Category, Property
from agents.models import Agent
from django.db.models import Count
# Create your views here.
def home(request):
category_list = Category.objects.annotate(
property_count=Count('property')).values('category_name', 'property... | 29.454545 | 92 | 0.717593 |
4a112c623505c3c5998b80c32485f8d106563b7a | 2,020 | py | Python | exercises/en/test_02_11.py | UBC-MDS/exploratory-data-viz | 83b704ce10d1ff5e10bfd4cdfa872ac52993fd54 | [
"CC-BY-4.0"
] | null | null | null | exercises/en/test_02_11.py | UBC-MDS/exploratory-data-viz | 83b704ce10d1ff5e10bfd4cdfa872ac52993fd54 | [
"CC-BY-4.0"
] | 88 | 2020-12-04T06:56:51.000Z | 2021-05-10T22:02:45.000Z | exercises/en/test_02_11.py | UBC-MDS/exploratory-data-viz | 83b704ce10d1ff5e10bfd4cdfa872ac52993fd54 | [
"CC-BY-4.0"
] | 4 | 2021-01-13T09:30:57.000Z | 2021-08-03T20:49:31.000Z | def test():
# Here we can either check objects created in the solution code, or the
# string value of the solution, available as __solution__. A helper for
# printing formatted messages is available as __msg__. See the testTemplate
# in the meta.json for details.
# If an assertion fails, the message... | 84.166667 | 173 | 0.715842 |
4a112dbdf61f6110f77f524914a01b186769246f | 2,133 | py | Python | update-sha1sums.py | LoneWolfSG/android_device_xiaomi_msm8937-common | c866c0846812b29f80c6fa0cc7de2c7cf11311ee | [
"Apache-2.0"
] | 10 | 2018-08-11T16:51:50.000Z | 2021-09-06T06:04:25.000Z | update-sha1sums.py | LoneWolfSG/android_device_xiaomi_msm8937-common | c866c0846812b29f80c6fa0cc7de2c7cf11311ee | [
"Apache-2.0"
] | 1 | 2018-12-06T12:55:25.000Z | 2018-12-08T13:30:44.000Z | update-sha1sums.py | LoneWolfSG/android_device_xiaomi_msm8937-common | c866c0846812b29f80c6fa0cc7de2c7cf11311ee | [
"Apache-2.0"
] | 51 | 2018-08-21T09:49:42.000Z | 2022-03-05T16:17:30.000Z | #!/usr/bin/env python
#
# Copyright (C) 2016 The CyanogenMod Project
# Copyright (C) 2017-2018 The LineageOS Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | 26.6625 | 74 | 0.622597 |
4a11316144762ad2afcdb770d02133cd45d8bf9f | 985 | py | Python | tools/python-okta-eventhook-server/flask-app.py | flypenguin/scripts-misc | e29fcdcf349dbf4e70a33dfb7f9d2a190d64636a | [
"MIT"
] | 3 | 2019-08-23T00:59:19.000Z | 2022-02-22T02:39:01.000Z | tools/python-okta-eventhook-server/flask-app.py | flypenguin/scripts-misc | e29fcdcf349dbf4e70a33dfb7f9d2a190d64636a | [
"MIT"
] | null | null | null | tools/python-okta-eventhook-server/flask-app.py | flypenguin/scripts-misc | e29fcdcf349dbf4e70a33dfb7f9d2a190d64636a | [
"MIT"
] | 4 | 2020-07-29T15:01:57.000Z | 2021-05-03T16:02:48.000Z | #!/usr/bin/env python
from flask import Flask
from flask import request
from flask.views import View
from json import dumps
from time import time
from datetime import datetime as dt
from os import mkdir
from os.path import join
app = Flask(__name__)
timestamp = dt.now().strftime("%Y-%m-%d_%H.%M.%S")
dirname = f"ev... | 20.520833 | 79 | 0.652792 |
4a113293f0483ffdbbf66af67bf696237c5a70d9 | 2,235 | py | Python | setup.py | abingham/swagger-to | a1ef9f46561d39809da0e6ab356427a247815d92 | [
"MIT"
] | null | null | null | setup.py | abingham/swagger-to | a1ef9f46561d39809da0e6ab356427a247815d92 | [
"MIT"
] | null | null | null | setup.py | abingham/swagger-to | a1ef9f46561d39809da0e6ab356427a247815d92 | [
"MIT"
] | null | null | null | """A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
import os
from setuptools import setup, find_packages
# pylint: disable=redefined-builtin
here = os.path.abspath(os.path.dirname(__file__)) # pylint: disable=invalid-name
wit... | 37.881356 | 100 | 0.6434 |
4a1132d3acb5ab204cccfdfd98dd05f64066146d | 7,791 | py | Python | sources/concept_analysis/ilp_samples/picking.py | lthamm/concept-embeddings-and-ilp | 27592c6424147a2fbb54d7daebc92cd72b3f4a0c | [
"MIT"
] | 3 | 2020-11-02T12:21:29.000Z | 2021-08-02T14:01:37.000Z | sources/concept_analysis/ilp_samples/picking.py | lthamm/concept-embeddings-and-ilp | 27592c6424147a2fbb54d7daebc92cd72b3f4a0c | [
"MIT"
] | 2 | 2020-11-06T07:58:13.000Z | 2022-03-13T16:11:30.000Z | sources/concept_analysis/ilp_samples/picking.py | lthamm/concept-embeddings-and-ilp | 27592c6424147a2fbb54d7daebc92cd72b3f4a0c | [
"MIT"
] | 1 | 2020-11-03T14:54:16.000Z | 2020-11-03T14:54:16.000Z | """Functions to evaluate the main model and pick according samples for ILP.
Run as script from project root as
`python3 script/picking.py`
When called as script, will pick for each prediction class the same amount of samples from the test
set that are closest to the decision boundary and copy those images into a desti... | 45.829412 | 104 | 0.676293 |
4a11336e35d30d6ba50bff36622bc2274a532100 | 1,319 | py | Python | piercing_pattern.py | SamrathPalSingh/website-scripts | e852eb9b9153616ce9ac109820a4b912e57dba9a | [
"MIT"
] | null | null | null | piercing_pattern.py | SamrathPalSingh/website-scripts | e852eb9b9153616ce9ac109820a4b912e57dba9a | [
"MIT"
] | null | null | null | piercing_pattern.py | SamrathPalSingh/website-scripts | e852eb9b9153616ce9ac109820a4b912e57dba9a | [
"MIT"
] | null | null | null | from trend import trend
import requests
#print(trend("AAPL"))
#### check for the previous trend ####
#### Downward trend required for this pattern ####
string = 'https://finnhub.io/api/v1/stock/candle?symbol='+ "AAPL" +'&resolution=D&count=2&token=bq24qknrh5rc5ioodhhg'
r = requests.get(strin... | 33.820513 | 136 | 0.490523 |
4a113406bec0041ba7c8b0d5a4fcd5838d381695 | 15,992 | py | Python | tests/popmon/analysis/test_hist_numpy.py | sbrugman-ing/popmon | a2ede6b7d56772404e9921545b83886e1a9b3806 | [
"MIT"
] | null | null | null | tests/popmon/analysis/test_hist_numpy.py | sbrugman-ing/popmon | a2ede6b7d56772404e9921545b83886e1a9b3806 | [
"MIT"
] | null | null | null | tests/popmon/analysis/test_hist_numpy.py | sbrugman-ing/popmon | a2ede6b7d56772404e9921545b83886e1a9b3806 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import pytest
from popmon.analysis.hist_numpy import (
assert_similar_hists,
check_similar_hists,
get_2dgrid,
get_consistent_numpy_1dhists,
get_consistent_numpy_2dgrids,
get_consistent_numpy_entries,
get_contentType,
prepare_2dgrid,
set_2dgrid,... | 31.856574 | 88 | 0.597361 |
4a11350e30ab396f3e3e1f0b0244409c7ed17619 | 3,160 | py | Python | src/tools/md2amiga/marko/ext/footnote.py | dMajoIT/aqb | 7d9bc71f8bdc64a6edc49fec6815b42bb3050fda | [
"MIT"
] | 161 | 2018-08-20T07:42:44.000Z | 2022-03-31T03:17:44.000Z | src/tools/md2amiga/marko/ext/footnote.py | dMajoIT/aqb | 7d9bc71f8bdc64a6edc49fec6815b42bb3050fda | [
"MIT"
] | 102 | 2018-10-15T01:19:06.000Z | 2022-03-11T13:37:00.000Z | src/tools/md2amiga/marko/ext/footnote.py | dMajoIT/aqb | 7d9bc71f8bdc64a6edc49fec6815b42bb3050fda | [
"MIT"
] | 39 | 2019-04-07T08:13:01.000Z | 2022-02-01T15:40:59.000Z | """
Footnotes extension
~~~~~~~~~~~~~~~~~~~
Enable footnotes parsing and renderering in Marko.
Usage::
from marko import Markdown
text = 'Foo[^1]\\n\\n[^1]: This is a footnote.\\n'
markdown = Markdown(extensions=['footnote'])
print(markdown(text))
"""
import re
from marko import block, inline, help... | 27.964602 | 79 | 0.596835 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.