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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
81b75b5619b0c3e8fbf77d44a083c297724d2365 | 6,110 | py | Python | ConfigUpdater.py | godfatherlmh/LoLAnalyzer | 0b265b33230316ab1a1459a9767ef7527a4a4f89 | [
"MIT"
] | null | null | null | ConfigUpdater.py | godfatherlmh/LoLAnalyzer | 0b265b33230316ab1a1459a9767ef7527a4a4f89 | [
"MIT"
] | null | null | null | ConfigUpdater.py | godfatherlmh/LoLAnalyzer | 0b265b33230316ab1a1459a9767ef7527a4a4f89 | [
"MIT"
] | null | null | null | # Update the working patch and champions list
from __future__ import print_function
import configparser
import json
import os
import urllib.request
from datetime import datetime
from slugify import slugify
from collections import OrderedDict
from InterfaceAPI import InterfaceAPI
def run():
config = configparser... | 54.553571 | 147 | 0.592635 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,642 | 0.432406 |
81b791765a1072aa2be9a40bf2e9fca71ca77b5d | 555 | py | Python | app/migrations/0010_auto_20200709_1512.py | RuijiaX/w3hacks | 79e1eb81836b766737e8f053a26495ec2c6fd963 | [
"MIT"
] | 1 | 2020-08-30T04:49:20.000Z | 2020-08-30T04:49:20.000Z | app/migrations/0010_auto_20200709_1512.py | RuijiaX/w3hacks | 79e1eb81836b766737e8f053a26495ec2c6fd963 | [
"MIT"
] | 44 | 2020-06-21T03:10:35.000Z | 2020-08-08T23:55:19.000Z | app/migrations/0010_auto_20200709_1512.py | RuijiaX/w3hacks | 79e1eb81836b766737e8f053a26495ec2c6fd963 | [
"MIT"
] | 2 | 2020-07-01T16:54:58.000Z | 2020-07-13T21:13:06.000Z | # Generated by Django 3.0.7 on 2020-07-09 22:12
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0009_auto_20200709_1430'),
]
operations = [
migrations.AlterField(
model_name='location',
name='lat',
... | 23.125 | 61 | 0.574775 | 462 | 0.832432 | 0 | 0 | 0 | 0 | 0 | 0 | 107 | 0.192793 |
81b8a377f7e00482ba8d3e94e5cc8f42cb23bfce | 28,078 | py | Python | tests/test_fitting.py | adrdrew/viroconcom | 3eb748ba8e3e076eddd174a0fcdfee3917aa4045 | [
"MIT"
] | null | null | null | tests/test_fitting.py | adrdrew/viroconcom | 3eb748ba8e3e076eddd174a0fcdfee3917aa4045 | [
"MIT"
] | 1 | 2020-05-18T11:06:28.000Z | 2020-05-18T11:06:28.000Z | tests/test_fitting.py | adrdrew/viroconcom | 3eb748ba8e3e076eddd174a0fcdfee3917aa4045 | [
"MIT"
] | null | null | null | import unittest
import csv
import numpy as np
from viroconcom.fitting import Fit
def read_benchmark_dataset(path='tests/testfiles/1year_dataset_A.txt'):
"""
Reads a datasets provided for the environmental contour benchmark.
Parameters
----------
path : string
Path to dataset including the... | 46.563847 | 121 | 0.561044 | 26,704 | 0.951065 | 0 | 0 | 0 | 0 | 0 | 0 | 9,823 | 0.349847 |
81b9e4775c9ff677415dc6ea782a4181f1639a50 | 22,100 | py | Python | python/scripts/wavsep/wavsep.py | rugheid/OSS-ZAP | d486dde326a9120c9ddd52a3d4dcf1b9a2b4d042 | [
"Apache-2.0"
] | 4 | 2016-08-11T05:35:26.000Z | 2021-11-15T11:27:28.000Z | python/scripts/wavsep/wavsep.py | rugheid/OSS-ZAP | d486dde326a9120c9ddd52a3d4dcf1b9a2b4d042 | [
"Apache-2.0"
] | 1 | 2018-06-12T13:55:16.000Z | 2018-06-12T15:27:59.000Z | python/scripts/wavsep/wavsep.py | rugheid/OSS-ZAP | d486dde326a9120c9ddd52a3d4dcf1b9a2b4d042 | [
"Apache-2.0"
] | 12 | 2018-05-15T10:14:00.000Z | 2019-11-10T07:03:16.000Z | # Zed Attack Proxy (ZAP) and its related class files.
#
# ZAP is an HTTP/HTTPS proxy for assessing web application security.
#
# Copyright 2012 ZAP Development Team
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a c... | 38.368056 | 170 | 0.611403 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12,448 | 0.563258 |
81ba27f4241d7478bbc576ab7545d0bb01038c41 | 665 | py | Python | ex115/biblioteca/interface/__init__.py | Danilo-Xaxa/python_curso_em_video | 9a88e5f579dfc844f936b7759d33e4068b091f09 | [
"MIT"
] | 4 | 2021-08-29T02:19:55.000Z | 2021-08-30T20:21:30.000Z | ex115/biblioteca/interface/__init__.py | Danilo-Xaxa/python_curso_em_video | 9a88e5f579dfc844f936b7759d33e4068b091f09 | [
"MIT"
] | null | null | null | ex115/biblioteca/interface/__init__.py | Danilo-Xaxa/python_curso_em_video | 9a88e5f579dfc844f936b7759d33e4068b091f09 | [
"MIT"
] | null | null | null | def LeiaInt(msg1):
pronto = False
while True:
valor1 = input(msg1)
if valor1.isnumeric():
pronto = True
else:
print('\033[1;31mERRO! FAVOR DIGITAR UM NÚMERO INTEIRO VÁLIDO\033[m')
if pronto:
break
return valor1
def linha(tamanho=42):
... | 20.78125 | 81 | 0.554887 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 155 | 0.230312 |
81bafa0175de3af83830a52504e9b10d4a89639b | 10,439 | py | Python | pocketsmith/models/attachment.py | brett-comber/python-pocketsmith-api | a9c7f25abf65e4e022535431dc1d34d6a1bd97e8 | [
"MIT"
] | null | null | null | pocketsmith/models/attachment.py | brett-comber/python-pocketsmith-api | a9c7f25abf65e4e022535431dc1d34d6a1bd97e8 | [
"MIT"
] | null | null | null | pocketsmith/models/attachment.py | brett-comber/python-pocketsmith-api | a9c7f25abf65e4e022535431dc1d34d6a1bd97e8 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
PocketSmith
The public PocketSmith API # noqa: E501
The version of the OpenAPI document: 2.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from pocketsmith.configuration import Configuration
... | 28.061828 | 227 | 0.590861 | 10,116 | 0.969058 | 0 | 0 | 5,838 | 0.559249 | 0 | 0 | 5,486 | 0.525529 |
81bce2f74bd4337a65e512dbd85c7e158418982f | 16,476 | py | Python | pynsq/nsq/NSQReader.py | ghorges/nsq-2.0 | b8dc67fa9467e9f39f976f923b798f574d12d8a9 | [
"MIT"
] | null | null | null | pynsq/nsq/NSQReader.py | ghorges/nsq-2.0 | b8dc67fa9467e9f39f976f923b798f574d12d8a9 | [
"MIT"
] | null | null | null | pynsq/nsq/NSQReader.py | ghorges/nsq-2.0 | b8dc67fa9467e9f39f976f923b798f574d12d8a9 | [
"MIT"
] | null | null | null | """
high-level NSQ reader class built on top of a Tornado IOLoop supporting both sync and
async modes of operation.
supports various hooks to modify behavior when heartbeats are received, temporarily
disable the reader, and pre-process/validate messages.
when supplied a list of nsqlookupd addresses, a reader instance... | 40.581281 | 113 | 0.624059 | 14,319 | 0.869082 | 0 | 0 | 0 | 0 | 0 | 0 | 5,521 | 0.335093 |
81bed88a93d034618c88d318a0da803628905ccb | 337 | py | Python | main.py | ygidtu/mountainClimber | 37a1b2934741a755c90000af8d2f9e8256f24ca6 | [
"Apache-2.0"
] | null | null | null | main.py | ygidtu/mountainClimber | 37a1b2934741a755c90000af8d2f9e8256f24ca6 | [
"Apache-2.0"
] | null | null | null | main.py | ygidtu/mountainClimber | 37a1b2934741a755c90000af8d2f9e8256f24ca6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
u"""
Created at 2020.09.04 by Zhang Yiming
"""
import warnings
warnings.filterwarnings("ignore")
import click
from cli.climb import climb
from cli.diff import diff
@click.group()
def main():
pass
main.add_command(climb)
main.add_command(diff)
if __name__ == '__mai... | 14.041667 | 37 | 0.700297 | 0 | 0 | 0 | 0 | 35 | 0.103858 | 0 | 0 | 108 | 0.320475 |
81bf3cce63eb0d81e1cb3c04efffcbc893d011ef | 2,023 | py | Python | app/fednlp/data/raw_data_loader/CNN_Dailymail/data_loader.py | ray-ruisun/FedML | 24ff30d636bb70f64e94e9ca205375033597d3dd | [
"Apache-2.0"
] | null | null | null | app/fednlp/data/raw_data_loader/CNN_Dailymail/data_loader.py | ray-ruisun/FedML | 24ff30d636bb70f64e94e9ca205375033597d3dd | [
"Apache-2.0"
] | null | null | null | app/fednlp/data/raw_data_loader/CNN_Dailymail/data_loader.py | ray-ruisun/FedML | 24ff30d636bb70f64e94e9ca205375033597d3dd | [
"Apache-2.0"
] | null | null | null | import os
from data.raw_data_loader.base.base_raw_data_loader import Seq2SeqRawDataLoader
class RawDataLoader(Seq2SeqRawDataLoader):
def __init__(self, data_path):
super().__init__(data_path)
self.cnn_path = "cnn/stories"
self.dailymail_path = "dailymail/stories"
def load_data(self)... | 36.125 | 79 | 0.527435 | 1,928 | 0.95304 | 0 | 0 | 0 | 0 | 0 | 0 | 86 | 0.042511 |
81bf6ad4a1d9f400fda048a534023120e5946c0a | 4,098 | py | Python | packages/utils/propagate_license.py | justi/m2g | 09e8b889889ee8d8fb08b9b6fcd726fb3d901644 | [
"Apache-2.0"
] | 12 | 2015-03-11T22:07:17.000Z | 2016-01-29T21:24:29.000Z | packages/utils/propagate_license.py | youngmook/m2g | 09e8b889889ee8d8fb08b9b6fcd726fb3d901644 | [
"Apache-2.0"
] | 213 | 2015-01-30T16:02:57.000Z | 2016-01-29T21:45:02.000Z | packages/utils/propagate_license.py | youngmook/m2g | 09e8b889889ee8d8fb08b9b6fcd726fb3d901644 | [
"Apache-2.0"
] | 5 | 2015-02-04T13:58:12.000Z | 2016-01-29T21:24:46.000Z | #!/usr/bin/env python
# Copyright 2014 Open Connectome Project (http://openconnecto.me)
#
# 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
#
#... | 35.327586 | 107 | 0.656418 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,115 | 0.516105 |
81c0253c14333698b3786f1e30f1b538f9b67736 | 1,384 | py | Python | core/gf/test.py | zorrock/accelerated-text | 942bacf653fc4c901748b06eaba72da4aeaaec9e | [
"Apache-2.0"
] | 1 | 2021-05-05T01:37:51.000Z | 2021-05-05T01:37:51.000Z | core/gf/test.py | zorrock/accelerated-text | 942bacf653fc4c901748b06eaba72da4aeaaec9e | [
"Apache-2.0"
] | null | null | null | core/gf/test.py | zorrock/accelerated-text | 942bacf653fc4c901748b06eaba72da4aeaaec9e | [
"Apache-2.0"
] | null | null | null | import pytest
import server
@pytest.fixture(scope="session")
def authorship_grammar():
with open("test_grammars/Authorship.gf", "r") as f:
abstract = {"content": f.read()}
with open("test_grammars/AuthorshipEng.gf", "r") as f:
inst = {"content": f.read(), "key": "Eng"}
return serv... | 32.186047 | 77 | 0.62211 | 0 | 0 | 0 | 0 | 341 | 0.246387 | 0 | 0 | 491 | 0.354769 |
81c086bf3828eec5887f2980268193fc09c2dd9d | 3,126 | py | Python | troposphere/validators/dynamodb.py | compose-x/troposphere | 9a94a8fafd8b4da1cd1f4239be0e7aa0681fd8d4 | [
"BSD-2-Clause"
] | null | null | null | troposphere/validators/dynamodb.py | compose-x/troposphere | 9a94a8fafd8b4da1cd1f4239be0e7aa0681fd8d4 | [
"BSD-2-Clause"
] | null | null | null | troposphere/validators/dynamodb.py | compose-x/troposphere | 9a94a8fafd8b4da1cd1f4239be0e7aa0681fd8d4 | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2012-2022, Mark Peek <[email protected]>
# All rights reserved.
#
# See LICENSE file for full license.
from .. import AWSHelperFn, If
def attribute_type_validator(x):
"""
Property: AttributeDefinition.AttributeType
"""
valid_types = ["S", "N", "B"]
if x not in valid_types:
ra... | 29.214953 | 88 | 0.619962 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,093 | 0.349648 |
81c08bcad1b73822669737a9c7a8c3b7773030bc | 430 | py | Python | videoclip_sources/e004.py | ChrisScarred/misty2py-skills | 30557d246b91fb525866fe8b92e280d2609ca26b | [
"MIT"
] | null | null | null | videoclip_sources/e004.py | ChrisScarred/misty2py-skills | 30557d246b91fb525866fe8b92e280d2609ca26b | [
"MIT"
] | null | null | null | videoclip_sources/e004.py | ChrisScarred/misty2py-skills | 30557d246b91fb525866fe8b92e280d2609ca26b | [
"MIT"
] | null | null | null | import time
from misty2py.robot import Misty
from misty2py.utils.env_loader import EnvLoader
from misty2py_skills.utils.utils import get_abs_path
env_loader = EnvLoader(get_abs_path(".env"))
m = Misty(env_loader.get_ip())
d = m.event("subscribe", type="BatteryCharge")
e_name = d.get("event_name")
time.sleep(1)
d... | 21.5 | 52 | 0.755814 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 100 | 0.232558 |
81c1b8a6fb449ff2c4c107dcaec453b46983daed | 2,302 | py | Python | p2/Python Files/audit_street.py | priyankaswadi/Udacity-Data-Analyst-Nanodegree | 52989f7e447e69c6fb08119f4e39a4500dcdf571 | [
"Apache-2.0"
] | null | null | null | p2/Python Files/audit_street.py | priyankaswadi/Udacity-Data-Analyst-Nanodegree | 52989f7e447e69c6fb08119f4e39a4500dcdf571 | [
"Apache-2.0"
] | null | null | null | p2/Python Files/audit_street.py | priyankaswadi/Udacity-Data-Analyst-Nanodegree | 52989f7e447e69c6fb08119f4e39a4500dcdf571 | [
"Apache-2.0"
] | null | null | null | #Map incorrect and abbreviated street names with correct/better ones
import xml.etree.cElementTree as ET
from collections import defaultdict
import re
import pprint
OSMFILE = "albany.osm"
street_type_re = re.compile(r'\b\S+\.?$', re.IGNORECASE)
# UPDATE THIS VARIABLE
mapping = {"rd": "Road",
"Rd": "Road",
... | 27.73494 | 68 | 0.541703 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 554 | 0.24066 |
81c1bcd0f7ae70104609fcbc8c962b13a08d4c00 | 1,943 | py | Python | modules/week2/utils.py | tobias-z/4-sem-python | 35c0a73f0a2085f2dc539c8ec8761c26675aa078 | [
"MIT"
] | null | null | null | modules/week2/utils.py | tobias-z/4-sem-python | 35c0a73f0a2085f2dc539c8ec8761c26675aa078 | [
"MIT"
] | null | null | null | modules/week2/utils.py | tobias-z/4-sem-python | 35c0a73f0a2085f2dc539c8ec8761c26675aa078 | [
"MIT"
] | null | null | null | from io import TextIOWrapper
import os
from typing import List
OUTPUT = "files/output.csv"
FOLDER = "modules/week2/folders"
def get_file_names(folderpath, out=OUTPUT):
"""takes a path to a folder and writes all filenames in the folder to a specified output file"""
dir_list = os.listdir(folderpath)
with o... | 34.696429 | 100 | 0.629439 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 523 | 0.269171 |
81c234494317e86e4d284863eff810f848405889 | 4,480 | py | Python | src/api/providers.py | ismetacar/ertis-auth | 64727cc8201d5fcc955485e94262500d63ff4b17 | [
"MIT"
] | 17 | 2020-06-17T15:28:59.000Z | 2021-09-21T19:18:14.000Z | src/api/providers.py | ismetacar/Ertis-Auth | 5521eb8a0b11fca7c5ff2a4ecc6cc0b9af59aa8f | [
"MIT"
] | 5 | 2020-06-17T21:22:56.000Z | 2021-05-02T19:10:05.000Z | src/api/providers.py | ismetacar/Ertis-Auth | 5521eb8a0b11fca7c5ff2a4ecc6cc0b9af59aa8f | [
"MIT"
] | 2 | 2021-03-02T17:08:07.000Z | 2021-04-07T18:11:59.000Z | import json
from sanic import response
from sanic_openapi import doc
from src.plugins.authorization import authorized
from src.plugins.validator import validated
from src.request_models.providers import Provider
from src.request_models.query_model import Query
from src.resources.generic import ensure_membership_is_ex... | 43.076923 | 104 | 0.705134 | 0 | 0 | 0 | 0 | 3,650 | 0.814732 | 2,129 | 0.475223 | 863 | 0.192634 |
81c238300e9927729e01076aa4674e5af0b62cf8 | 3,078 | py | Python | lista08_pesquisa/questao02.py | mayararysia/ESTD | 65aa8816aa8773066201cb410b02c1cb72ad5611 | [
"MIT"
] | null | null | null | lista08_pesquisa/questao02.py | mayararysia/ESTD | 65aa8816aa8773066201cb410b02c1cb72ad5611 | [
"MIT"
] | null | null | null | lista08_pesquisa/questao02.py | mayararysia/ESTD | 65aa8816aa8773066201cb410b02c1cb72ad5611 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#Lista de Exercícios 08 (Pesquisa) - Questão 02
#Mayara Rysia
from time import time
from time import sleep
from random import randint
"""
2. Use as duas funções de busca binária apresentadas (iterativa e recursiva). Gere
uma lista de números aleatórios, ordene-os e verifique o desempenho delas.... | 20.938776 | 82 | 0.635153 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 874 | 0.282482 |
81c3777bd3aa3fe5f25a3ee068f24e1720ba3426 | 3,290 | py | Python | ccvpn/views/__init__.py | CCrypto/ccvpn | 6bbfd01f41816bea905518f302f4cec474fdd221 | [
"MIT"
] | 81 | 2015-03-07T20:26:55.000Z | 2016-05-16T10:22:05.000Z | ccvpn/views/__init__.py | CCrypto/ccvpn2 | 6bbfd01f41816bea905518f302f4cec474fdd221 | [
"MIT"
] | 1 | 2017-09-21T15:56:31.000Z | 2017-11-30T15:10:56.000Z | ccvpn/views/__init__.py | CCrypto/ccvpn | 6bbfd01f41816bea905518f302f4cec474fdd221 | [
"MIT"
] | 20 | 2015-03-07T22:36:46.000Z | 2016-04-23T22:47:12.000Z | import codecs
import markdown
import os
import logging
from pyramid.view import view_config
from pyramid.httpexceptions import HTTPOk, HTTPNotFound
from sqlalchemy import func
from mako.lookup import TemplateLookup
import mako.exceptions
logger = logging.getLogger(__name__)
from ccvpn.models import DBSession, User, Ic... | 33.571429 | 87 | 0.619149 | 0 | 0 | 0 | 0 | 2,628 | 0.798784 | 0 | 0 | 379 | 0.115198 |
81c43cdcda51abd9a7c25faabe42afd1a69a3e45 | 3,142 | py | Python | rx/subjects/subject.py | MichaelSchneeberger/RxPY | 994f974d37783f63c5d9e018a316fa9b06ba9337 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | rx/subjects/subject.py | MichaelSchneeberger/RxPY | 994f974d37783f63c5d9e018a316fa9b06ba9337 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | rx/subjects/subject.py | MichaelSchneeberger/RxPY | 994f974d37783f63c5d9e018a316fa9b06ba9337 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import threading
from typing import Any, List, Optional
from rx.disposable import Disposable
from rx.core.typing import Observer, Scheduler
from rx.core import Observable, typing
from rx.internal import DisposedException
from .anonymoussubject import AnonymousSubject
from .innersubscription import InnerSubscription
... | 28.825688 | 100 | 0.590707 | 2,820 | 0.897518 | 0 | 0 | 109 | 0.034691 | 0 | 0 | 588 | 0.187142 |
81c467ca6111d33d242e6a5ccd32ee27968ad970 | 931 | py | Python | scripts/uda.py | nng555/fairseq | c9730a125825a85f33042e1b9fd1959b8ca829e5 | [
"MIT"
] | 2 | 2020-10-05T08:52:01.000Z | 2021-03-03T15:26:35.000Z | scripts/uda.py | nng555/fairseq | c9730a125825a85f33042e1b9fd1959b8ca829e5 | [
"MIT"
] | null | null | null | scripts/uda.py | nng555/fairseq | c9730a125825a85f33042e1b9fd1959b8ca829e5 | [
"MIT"
] | null | null | null | import os
import hydra
import subprocess
import logging
from omegaconf import DictConfig
from hydra import slurm_utils
log = logging.getLogger(__name__)
@hydra.main(config_path='/h/nng/conf/robust/config.yaml', strict=False)
def launch(cfg: DictConfig):
os.environ['NCCL_DEBUG'] = 'INFO'
if cfg.data.task in [... | 29.09375 | 110 | 0.684211 | 0 | 0 | 0 | 0 | 734 | 0.7884 | 0 | 0 | 198 | 0.212675 |
81c5bce0c4d9254a207a213c3a227fa2fcf0908d | 2,062 | py | Python | 06_Business/application_iris/app.py | MaryMP11/The_Bridge_School_DataScience_PT | 8b4a24d0b79608061a470e806de542dbbcccf75d | [
"Apache-2.0"
] | null | null | null | 06_Business/application_iris/app.py | MaryMP11/The_Bridge_School_DataScience_PT | 8b4a24d0b79608061a470e806de542dbbcccf75d | [
"Apache-2.0"
] | null | null | null | 06_Business/application_iris/app.py | MaryMP11/The_Bridge_School_DataScience_PT | 8b4a24d0b79608061a470e806de542dbbcccf75d | [
"Apache-2.0"
] | null | null | null | from flask import Flask, request, jsonify, session, url_for, redirect, render_template
import joblib
from flower_form import FlowerForm
classifier_loaded = joblib.load("application_iris/saved_models/knn_iris_dataset.pkl")
encoder_loaded = joblib.load("application_iris/saved_models/iris_label_encoder.pkl")
# predict... | 32.21875 | 112 | 0.734724 | 0 | 0 | 0 | 0 | 850 | 0.412221 | 0 | 0 | 729 | 0.35354 |
81c63070aaf168ec47a744d51e1a20dd220ae56b | 8,522 | py | Python | test.py | EdwinChan/python-physical | 44383280acddd77b35adf8923b7d8cdb512553a0 | [
"MIT"
] | 2 | 2021-07-13T05:58:13.000Z | 2021-08-19T04:37:57.000Z | test.py | EdwinChan/python-physical | 44383280acddd77b35adf8923b7d8cdb512553a0 | [
"MIT"
] | null | null | null | test.py | EdwinChan/python-physical | 44383280acddd77b35adf8923b7d8cdb512553a0 | [
"MIT"
] | null | null | null | import math
import re
import unittest
import urllib.error
import urllib.request
from .core import Quantity
from .define import defined_systems
si = defined_systems['si']
esu = defined_systems['esu']
emu = defined_systems['emu']
gauss = defined_systems['gauss']
class PhysicalQuantitiesTest(unittest.TestCase):
def a... | 40.198113 | 74 | 0.602558 | 8,211 | 0.963506 | 0 | 0 | 0 | 0 | 0 | 0 | 1,444 | 0.169444 |
81c77ad5e87d4cea69ce9a40ad25f9768714ae45 | 3,828 | py | Python | test/test_cirrus_ngs/test_cfnCluster/test_ConnectionManager.py | ucsd-ccbb/cirrus-ngs | 8f51450b3d971b03d4fd08a1aab11d5a076aa23e | [
"MIT"
] | 8 | 2017-01-20T00:00:45.000Z | 2022-02-11T00:20:45.000Z | test/test_cirrus_ngs/test_cfnCluster/test_ConnectionManager.py | miko-798/cirrus-ngs | 2c005f0fe29e298652ed2164e08ada75e908229b | [
"MIT"
] | 3 | 2018-03-23T19:09:06.000Z | 2018-03-26T19:49:55.000Z | test/test_cirrus_ngs/test_cfnCluster/test_ConnectionManager.py | miko-798/cirrus-ngs | 2c005f0fe29e298652ed2164e08ada75e908229b | [
"MIT"
] | 2 | 2018-03-29T06:24:31.000Z | 2019-04-01T18:34:53.000Z | import unittest
import sys
import os
sys.path.append(os.getcwd().replace("test", "src"))
import cirrus_ngs.cfnCluster.ConnectionManager as ConnectionManager
import paramiko
import tempfile
import re
##THIS TEST WILL NOT WORK##
class test_ConnectionManager(unittest.TestCase):
def test_paramiko(self):
key_f... | 35.775701 | 117 | 0.637931 | 3,510 | 0.916928 | 0 | 0 | 0 | 0 | 0 | 0 | 1,163 | 0.303814 |
81c7caa0739efb8823c259206d2c89fc45540cae | 3,166 | py | Python | src/backend/opus/opusctl/cmds/process.py | DTG-FRESCO/opus | 8975e154524802efead82794ab2f70d4a1611000 | [
"Apache-2.0"
] | null | null | null | src/backend/opus/opusctl/cmds/process.py | DTG-FRESCO/opus | 8975e154524802efead82794ab2f70d4a1611000 | [
"Apache-2.0"
] | null | null | null | src/backend/opus/opusctl/cmds/process.py | DTG-FRESCO/opus | 8975e154524802efead82794ab2f70d4a1611000 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Commands for launching processes with or without OPUS interposition.
'''
from __future__ import absolute_import, division, print_function
import argparse
import os
import psutil
from .. import config, server_start, utils
def get_current_shell():
ppid = os.getppid()
parent = psuti... | 31.979798 | 82 | 0.609602 | 0 | 0 | 0 | 0 | 1,803 | 0.569488 | 0 | 0 | 870 | 0.274795 |
81c8df8164adec85e55f94629c0090d4dd609286 | 1,718 | py | Python | tests/unit/l2_infrastructure/test_app_collection_config_parser.py | ansible-self-service/ansible-self-service | 80840f02b68c6ba5fe6c55ab9a317b310c185b4d | [
"MIT"
] | null | null | null | tests/unit/l2_infrastructure/test_app_collection_config_parser.py | ansible-self-service/ansible-self-service | 80840f02b68c6ba5fe6c55ab9a317b310c185b4d | [
"MIT"
] | null | null | null | tests/unit/l2_infrastructure/test_app_collection_config_parser.py | ansible-self-service/ansible-self-service | 80840f02b68c6ba5fe6c55ab9a317b310c185b4d | [
"MIT"
] | null | null | null | import pytest
from ansible_self_service.l2_infrastructure.app_collection_config_parser import AppCollectionConfigValidationException, \
YamlAppCollectionConfigParser
from ansible_self_service.l4_core.models import AppCategory, App
VALID_CATEGORY_NAME = 'Misc'
VALID_ITEM_NAME = 'Cowsay'
VALID_ITEM_DESCRIPTION = 'L... | 33.038462 | 121 | 0.760186 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 657 | 0.382421 |
81ca35091868d035a8a09d9c9753adadf774b179 | 6,088 | py | Python | api-server.py | proatria/sftpplus-api-example | 1fc3af66beef06d66ad46a0cf74bb0905793cf7f | [
"MIT"
] | null | null | null | api-server.py | proatria/sftpplus-api-example | 1fc3af66beef06d66ad46a0cf74bb0905793cf7f | [
"MIT"
] | null | null | null | api-server.py | proatria/sftpplus-api-example | 1fc3af66beef06d66ad46a0cf74bb0905793cf7f | [
"MIT"
] | null | null | null | """
Run a simple HTTP server which provides API endpoint for SFTPPlus.
Usage:
server.py [options]
-h --help Show this help.
-p --port=8000 Listen to a specific port. [default: 8080]
-a --address=127.0.0.1 Listen on specific address. [default: 0.0.0.0]
-c --certificate=PATH Enable HTTPS by defin... | 31.220513 | 233 | 0.655388 | 0 | 0 | 0 | 0 | 0 | 0 | 3,215 | 0.528088 | 3,241 | 0.532359 |
81ca610dec0f1e1d5519b0914515a58eb09c500b | 55 | py | Python | arkfbp/flow/__init__.py | arkfbp/arkfbp-py | 2444736462e8b4f09ae1ffe56779d9f515deb39f | [
"MIT"
] | 2 | 2020-09-11T09:26:43.000Z | 2020-12-17T07:32:38.000Z | arkfbp/flow/__init__.py | arkfbp/arkfbp-py | 2444736462e8b4f09ae1ffe56779d9f515deb39f | [
"MIT"
] | 4 | 2020-12-02T03:42:38.000Z | 2020-12-14T07:56:06.000Z | arkfbp/flow/__init__.py | arkfbp/arkfbp-py | 2444736462e8b4f09ae1ffe56779d9f515deb39f | [
"MIT"
] | 2 | 2020-12-08T01:11:54.000Z | 2021-01-25T04:29:15.000Z | from .base import Flow
from .view_flow import ViewFlow
| 18.333333 | 31 | 0.818182 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
81cb6312561698f081c8ea3ba400b666e569a740 | 740 | py | Python | ethereumetl/mappers/event_mapper.py | thanhnv2303/ethereum-etl | 94381feadf1f1602a95db44aea5e944559628271 | [
"MIT"
] | null | null | null | ethereumetl/mappers/event_mapper.py | thanhnv2303/ethereum-etl | 94381feadf1f1602a95db44aea5e944559628271 | [
"MIT"
] | null | null | null | ethereumetl/mappers/event_mapper.py | thanhnv2303/ethereum-etl | 94381feadf1f1602a95db44aea5e944559628271 | [
"MIT"
] | null | null | null | from config.constant import ExportItemConstant, ExportItemTypeConstant, EventConstant, TransactionConstant
from ethereumetl.service.eth_event_service import EthEvent
class EthEventMapper(object):
def eth_event_to_dict(self, eth_event: EthEvent):
d1 = {
ExportItemConstant.type: ExportItemTypeCo... | 43.529412 | 106 | 0.731081 | 571 | 0.771622 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
81cc09d97179b0455468e2dd08a57556c6ae600f | 5,934 | py | Python | openerp/addons/crm_partner_assign/wizard/crm_forward_to_partner.py | ntiufalara/openerp7 | 903800da0644ec0dd9c1dcd34205541f84d45fe4 | [
"MIT"
] | 3 | 2016-01-29T14:39:49.000Z | 2018-12-29T22:42:00.000Z | openerp/addons/crm_partner_assign/wizard/crm_forward_to_partner.py | ntiufalara/openerp7 | 903800da0644ec0dd9c1dcd34205541f84d45fe4 | [
"MIT"
] | 2 | 2016-03-23T14:29:41.000Z | 2017-02-20T17:11:30.000Z | openerp/addons/crm_partner_assign/wizard/crm_forward_to_partner.py | ntiufalara/openerp7 | 903800da0644ec0dd9c1dcd34205541f84d45fe4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# ... | 47.472 | 195 | 0.635322 | 4,780 | 0.805527 | 0 | 0 | 0 | 0 | 0 | 0 | 2,652 | 0.446916 |
81cd30e6f9de401088d486d770c3328acf7f5008 | 5,033 | py | Python | losses.py | DensenDavis/yolov5_tf2 | 5b2f38e3f0391e5beee1551a386e9b81512db179 | [
"Unlicense"
] | null | null | null | losses.py | DensenDavis/yolov5_tf2 | 5b2f38e3f0391e5beee1551a386e9b81512db179 | [
"Unlicense"
] | null | null | null | losses.py | DensenDavis/yolov5_tf2 | 5b2f38e3f0391e5beee1551a386e9b81512db179 | [
"Unlicense"
] | null | null | null | import tensorflow as tf
from tensorflow.keras.losses import binary_crossentropy,sparse_categorical_crossentropy
from config import Configuration
cfg = Configuration()
class YOLOLoss(tf.losses.Loss):
def __init__(self, anchors):
super(YOLOLoss, self).__init__(reduction="none", name="YOLOLoss")
self.... | 44.9375 | 98 | 0.587522 | 4,864 | 0.966422 | 0 | 0 | 0 | 0 | 0 | 0 | 705 | 0.140076 |
81cd44adfb162f86e55541035a3d572728194cd3 | 2,235 | py | Python | test/stress/mmlogic.py | dzlier-gcp/open-match | 8db449b307468e20c9835cc22dcca9511c38025a | [
"Apache-2.0"
] | null | null | null | test/stress/mmlogic.py | dzlier-gcp/open-match | 8db449b307468e20c9835cc22dcca9511c38025a | [
"Apache-2.0"
] | 12 | 2019-08-10T00:37:58.000Z | 2019-08-14T22:47:26.000Z | test/stress/mmlogic.py | dzlier-gcp/open-match | 8db449b307468e20c9835cc22dcca9511c38025a | [
"Apache-2.0"
] | 2 | 2019-08-10T00:31:54.000Z | 2019-08-10T00:33:10.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 35.47619 | 181 | 0.714541 | 1,478 | 0.661298 | 0 | 0 | 664 | 0.297092 | 0 | 0 | 1,101 | 0.492617 |
81cdcd944d2ec3787c0800a16240ad15e52f16bd | 500 | py | Python | benchmarks_sphere/report_konwihr_rexi_nl/compare_wt_dt_vs_accuracy_galewsky_new_rexi_cmlarge_elrexi/postprocessing_pickle.py | valentinaschueller/sweet | 27e99c7a110c99deeadee70688c186d82b39ac90 | [
"MIT"
] | 6 | 2017-11-20T08:12:46.000Z | 2021-03-11T15:32:36.000Z | benchmarks_sphere/report_konwihr_rexi_nl/compare_wt_dt_vs_accuracy_galewsky_new_rexi_cmlarge_elrexi/postprocessing_pickle.py | valentinaschueller/sweet | 27e99c7a110c99deeadee70688c186d82b39ac90 | [
"MIT"
] | 4 | 2018-02-02T21:46:33.000Z | 2022-01-11T11:10:27.000Z | benchmarks_sphere/report_konwihr_rexi_nl/compare_wt_dt_vs_accuracy_galewsky_new_rexi_cmlarge_elrexi/postprocessing_pickle.py | valentinaschueller/sweet | 27e99c7a110c99deeadee70688c186d82b39ac90 | [
"MIT"
] | 12 | 2016-03-01T18:33:34.000Z | 2022-02-08T22:20:31.000Z | #! /usr/bin/env python3
import sys
import math
import glob
from mule_local.postprocessing.pickle_SphereDataSpectralDiff import *
from mule.exec_program import *
# Ugly hack!
#output, retval = exec_program('ls *benchref*/*prog_h* | sort | tail -n 1 | sed "s/.*prog_h//"')
#if retval != 0:
# print(output)
# raise Excep... | 23.809524 | 96 | 0.72 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 313 | 0.626 |
81ceeac6fb9c99499e11e6ba24211d641629642f | 4,355 | py | Python | src/houdini_package_runner/items/base.py | captainhammy/houdini_package_runner | 40f8b60ebe32c64fd9b37328a9a5eefacd1c6ebd | [
"MIT"
] | 3 | 2022-02-06T23:31:17.000Z | 2022-02-07T11:10:03.000Z | src/houdini_package_runner/items/base.py | captainhammy/houdini_package_runner | 40f8b60ebe32c64fd9b37328a9a5eefacd1c6ebd | [
"MIT"
] | null | null | null | src/houdini_package_runner/items/base.py | captainhammy/houdini_package_runner | 40f8b60ebe32c64fd9b37328a9a5eefacd1c6ebd | [
"MIT"
] | null | null | null | """This module contains a base runnable item."""
# =============================================================================
# IMPORTS
# =============================================================================
# Future
from __future__ import annotations
# Standard Library
from abc import ABC, abstractmethod... | 29.828767 | 83 | 0.461538 | 3,702 | 0.850057 | 0 | 0 | 1,709 | 0.392423 | 0 | 0 | 2,292 | 0.526292 |
81cf7c347a9efbb6723692e303da22251c98208b | 71 | py | Python | visualizer/__init__.py | AndreasMadsen/bachelor-code | 115fd2b955de07f34cdec998ba2a7f103ae253e3 | [
"MIT"
] | 1 | 2015-06-16T06:53:52.000Z | 2015-06-16T06:53:52.000Z | visualizer/__init__.py | AndreasMadsen/bachelor-code | 115fd2b955de07f34cdec998ba2a7f103ae253e3 | [
"MIT"
] | null | null | null | visualizer/__init__.py | AndreasMadsen/bachelor-code | 115fd2b955de07f34cdec998ba2a7f103ae253e3 | [
"MIT"
] | null | null | null |
from graph.graph_server import GraphServer
__all__ = ['GraphServer']
| 14.2 | 42 | 0.788732 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 0.183099 |
81cfb18746180392d2ab217e02dc844bfc9a910e | 4,485 | py | Python | djangoplicity/blog/migrations/0001_initial.py | djangoplicity/blog | 2465b34228d794db9f746e314fa04657cbf18d38 | [
"BSD-3-Clause"
] | null | null | null | djangoplicity/blog/migrations/0001_initial.py | djangoplicity/blog | 2465b34228d794db9f746e314fa04657cbf18d38 | [
"BSD-3-Clause"
] | 1 | 2021-10-20T00:11:16.000Z | 2021-10-20T00:17:51.000Z | djangoplicity/blog/migrations/0001_initial.py | djangoplicity/djangoplicity-blog | 2465b34228d794db9f746e314fa04657cbf18d38 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2017-08-15 16:23
from __future__ import unicode_literals
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
import djangoplicity.archives.base
import djangoplicity.archives.fields
class Migratio... | 48.75 | 151 | 0.599331 | 4,178 | 0.93155 | 0 | 0 | 0 | 0 | 0 | 0 | 819 | 0.182609 |
81d02a1b1d708206e4f47e1ceb3bcbc7a7b7f3aa | 4,386 | py | Python | picklesize/test_picklesize.py | pydron/picklesize | c524ccae7beecfada663fbcf251c4166158f2995 | [
"MIT"
] | null | null | null | picklesize/test_picklesize.py | pydron/picklesize | c524ccae7beecfada663fbcf251c4166158f2995 | [
"MIT"
] | null | null | null | picklesize/test_picklesize.py | pydron/picklesize | c524ccae7beecfada663fbcf251c4166158f2995 | [
"MIT"
] | null | null | null | '''
Created on 20.07.2015
@author: stefan
'''
import unittest
import pickle
import picklesize
import copy_reg
class TestEstimator(unittest.TestCase):
def setUp(self):
self.target = picklesize.PickleSize()
def compare(self, obj):
data = pickle.dumps(obj, protocol=pickle.HIGHEST_PROTOCOL)... | 24.779661 | 110 | 0.564979 | 4,083 | 0.930917 | 0 | 0 | 0 | 0 | 0 | 0 | 211 | 0.048108 |
81d18ed12d722ad07b48dba575ac241b64bc31f0 | 1,691 | py | Python | setup.py | extensive-nlp/ttc_nlp | b84892b4f6856baf99d9a5975cdcbf2fe3b19b7a | [
"Apache-2.0"
] | null | null | null | setup.py | extensive-nlp/ttc_nlp | b84892b4f6856baf99d9a5975cdcbf2fe3b19b7a | [
"Apache-2.0"
] | null | null | null | setup.py | extensive-nlp/ttc_nlp | b84892b4f6856baf99d9a5975cdcbf2fe3b19b7a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Setup process."""
from io import open
from os import path
from setuptools import find_packages, setup
with open(
path.join(path.abspath(path.dirname(__file__)), "README.md"), encoding="utf-8"
) as f:
long_description = f.read()
setup(
# Basic project inf... | 28.661017 | 82 | 0.607333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 912 | 0.539326 |
81d3e9a297bdf6007923e315c9b06917f0723c4c | 216 | py | Python | auxein/fitness/__init__.py | auxein/auxein | 5388cb572b65aecc282f915515c35dc3b987154c | [
"Apache-2.0"
] | 1 | 2019-05-08T14:53:27.000Z | 2019-05-08T14:53:27.000Z | auxein/fitness/__init__.py | auxein/auxein | 5388cb572b65aecc282f915515c35dc3b987154c | [
"Apache-2.0"
] | 2 | 2020-08-26T09:16:47.000Z | 2020-10-30T16:47:03.000Z | auxein/fitness/__init__.py | auxein/auxein | 5388cb572b65aecc282f915515c35dc3b987154c | [
"Apache-2.0"
] | null | null | null | # flake8: noqa
from .core import Fitness
from .kernel_based import GlobalMinimum
from .observation_based import ObservationBasedFitness, MultipleLinearRegression, SimplePolynomialRegression, MultipleLinearRegression | 43.2 | 134 | 0.87963 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.064815 |
81d542769cfc331b3bf5ee9b379987289db08efb | 1,071 | py | Python | steelpy/codes/main.py | svortega/steelpy | bef35eb8ab8728fc29f57b7070b5f3bac0b0e840 | [
"MIT"
] | 4 | 2021-09-28T12:52:01.000Z | 2022-02-24T22:30:22.000Z | steelpy/codes/main.py | svortega/steelpy | bef35eb8ab8728fc29f57b7070b5f3bac0b0e840 | [
"MIT"
] | null | null | null | steelpy/codes/main.py | svortega/steelpy | bef35eb8ab8728fc29f57b7070b5f3bac0b0e840 | [
"MIT"
] | null | null | null | # Copyright (c) 2019-2020 steelpy
# Python stdlib imports
# package imports
#from steelpy.codes.aisc.aisc360 import AISC_360_16
#from steelpy.codes.aisc.aisc335 import AISC_335_89
#from steelpy.codes.iso.ISO19902 import ISOCodeCheck
from steelpy.codes.piping.pipeline import Pipeline_Assessment
#from steelpy.codes.api... | 22.3125 | 61 | 0.644258 | 479 | 0.447246 | 0 | 0 | 162 | 0.151261 | 0 | 0 | 556 | 0.519141 |
81d63e7ca9da71f50fffa4b00a77a421574650e4 | 347 | py | Python | main.py | soyoung97/MixText | 22993cd028a4223a54e138a89b53cd7978a5e38b | [
"MIT"
] | null | null | null | main.py | soyoung97/MixText | 22993cd028a4223a54e138a89b53cd7978a5e38b | [
"MIT"
] | null | null | null | main.py | soyoung97/MixText | 22993cd028a4223a54e138a89b53cd7978a5e38b | [
"MIT"
] | null | null | null | import os
os.system("pip install pytorch_transformers")
import nsml
print(nsml.DATASET_PATH)
os.system('python ./code/train.py --n-labeled 10 --data-path '+ nsml.DATASET_PATH + '/train/ --batch-size 4 --batch-size-u 8 --epochs 20 --val-iteration 1000 --lambda-u 1 --T 0.5 --alpha 16 --mix-layers-set 7 9 12 --lrmain 0.0... | 38.555556 | 249 | 0.706052 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 251 | 0.723343 |
81d742485fceccd1810f61f429cd089c6e0b112d | 1,126 | py | Python | test.py | IldusTim/QAStudy | f2f5e9c673259e7e1c8d0ab2887f28326300abe3 | [
"Apache-2.0"
] | null | null | null | test.py | IldusTim/QAStudy | f2f5e9c673259e7e1c8d0ab2887f28326300abe3 | [
"Apache-2.0"
] | null | null | null | test.py | IldusTim/QAStudy | f2f5e9c673259e7e1c8d0ab2887f28326300abe3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
import math
from selenium.webdriver.support.ui import Select
import os
import time
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
link = "http://... | 31.277778 | 104 | 0.785968 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 227 | 0.201599 |
81d761dcf0b173ad97a22e411c04701a33909ebc | 1,224 | py | Python | django_backend/product/migrations/0002_product.py | itsmahadi007/E-Commerce-VueJS-Django | 4fc298f2181fd22c6aeb74439edef78a397d5447 | [
"MIT"
] | null | null | null | django_backend/product/migrations/0002_product.py | itsmahadi007/E-Commerce-VueJS-Django | 4fc298f2181fd22c6aeb74439edef78a397d5447 | [
"MIT"
] | 4 | 2022-01-13T03:56:36.000Z | 2022-03-12T01:01:24.000Z | django_backend/product/migrations/0002_product.py | itsmahadi007/E-Commerce-VueJS-Django | 4fc298f2181fd22c6aeb74439edef78a397d5447 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.7 on 2021-09-01 17:46
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('product', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Product',
... | 38.25 | 140 | 0.580882 | 1,098 | 0.897059 | 0 | 0 | 0 | 0 | 0 | 0 | 229 | 0.187092 |
81d9ca381791e7e9b4231c86815a9f9bf5fa4886 | 40,400 | py | Python | kraken/ketos.py | zjsteyn/kraken | eaa9f4290db5425ddf80d0aebfa3944713558ab5 | [
"Apache-2.0"
] | null | null | null | kraken/ketos.py | zjsteyn/kraken | eaa9f4290db5425ddf80d0aebfa3944713558ab5 | [
"Apache-2.0"
] | null | null | null | kraken/ketos.py | zjsteyn/kraken | eaa9f4290db5425ddf80d0aebfa3944713558ab5 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2015 Benjamin Kiessling
#
# 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 ... | 47.251462 | 234 | 0.62146 | 0 | 0 | 0 | 0 | 38,606 | 0.955476 | 0 | 0 | 12,280 | 0.303923 |
81daacebc9755ed9fad67d0bb9146bb8f488fc5d | 2,728 | py | Python | util/visualize_loss.py | whq-hqw/detr_change | 142f75cc5e0b59ca6e07928ddcbed3e461816611 | [
"Apache-2.0"
] | 2 | 2020-07-17T15:09:47.000Z | 2020-11-20T13:52:48.000Z | util/visualize_loss.py | whq-hqw/detr_change | 142f75cc5e0b59ca6e07928ddcbed3e461816611 | [
"Apache-2.0"
] | null | null | null | util/visualize_loss.py | whq-hqw/detr_change | 142f75cc5e0b59ca6e07928ddcbed3e461816611 | [
"Apache-2.0"
] | null | null | null | from os.path import *
import glob
import json
import numpy as np
from util.plot_utils import plot_curves, plot_multi_loss_distribution
TMPJPG = expanduser("~/Pictures/")
def plot_multi_logs(exp_name, keys, save_name, epoch, addition_len):
root_path = expanduser("/raid/dataset/detection/detr_exp")
folder_cand... | 38.422535 | 101 | 0.612903 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 376 | 0.13783 |
81dab8323f10c78c0bf2886a1ab5569f40f742ad | 12,616 | py | Python | tower_cli/resources/job.py | kedark3/tower-cli | 487a1b9a8e96509798fee108e4f7d2c187177771 | [
"Apache-2.0"
] | 363 | 2015-01-14T17:48:34.000Z | 2022-01-29T06:37:04.000Z | tower_cli/resources/job.py | kedark3/tower-cli | 487a1b9a8e96509798fee108e4f7d2c187177771 | [
"Apache-2.0"
] | 703 | 2015-01-06T17:17:20.000Z | 2020-09-16T15:54:17.000Z | tower_cli/resources/job.py | kedark3/tower-cli | 487a1b9a8e96509798fee108e4f7d2c187177771 | [
"Apache-2.0"
] | 203 | 2015-01-18T22:38:23.000Z | 2022-01-28T19:19:05.000Z | # Copyright 2015, Ansible, Inc.
# Luke Sneeringer <[email protected]>
#
# 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 requi... | 46.212454 | 112 | 0.611367 | 11,555 | 0.9159 | 0 | 0 | 10,872 | 0.861763 | 0 | 0 | 6,541 | 0.518469 |
81db0f62ce609e284136aef25e5f81fbdf1a0feb | 1,643 | py | Python | src/backend/expungeservice/models/charge_types/traffic_offense.py | april96415/recordexpungPDX | 43ec60ddfb7fe1ec7940b2a38c6e7d7f85286506 | [
"MIT"
] | 38 | 2019-05-09T03:13:43.000Z | 2022-03-16T22:59:25.000Z | src/backend/expungeservice/models/charge_types/traffic_offense.py | april96415/recordexpungPDX | 43ec60ddfb7fe1ec7940b2a38c6e7d7f85286506 | [
"MIT"
] | 938 | 2019-05-02T15:13:21.000Z | 2022-02-27T20:59:00.000Z | src/backend/expungeservice/models/charge_types/traffic_offense.py | april96415/recordexpungPDX | 43ec60ddfb7fe1ec7940b2a38c6e7d7f85286506 | [
"MIT"
] | 65 | 2019-05-09T03:28:12.000Z | 2022-03-21T00:06:39.000Z | from dataclasses import dataclass
from typing import Any
from expungeservice.models.charge import ChargeType
from expungeservice.models.charge import ChargeUtil
from expungeservice.models.expungement_result import TypeEligibility, EligibilityStatus
@dataclass(frozen=True)
class TrafficOffense(ChargeType):
type_n... | 45.638889 | 181 | 0.677419 | 1,366 | 0.831406 | 0 | 0 | 1,390 | 0.846013 | 0 | 0 | 799 | 0.486306 |
81dbffa128ea7c27541a642445edf3ebd5fd3197 | 8,918 | py | Python | os_migrate/plugins/modules/import_workload_create_instance.py | jbadiapa/os-migrate | 19b591a672bc9e4af72e62dbd96be94a238a6dc2 | [
"Apache-2.0"
] | 35 | 2020-01-22T18:38:27.000Z | 2022-03-22T16:19:56.000Z | os_migrate/plugins/modules/import_workload_create_instance.py | jbadiapa/os-migrate | 19b591a672bc9e4af72e62dbd96be94a238a6dc2 | [
"Apache-2.0"
] | 292 | 2019-12-09T11:15:26.000Z | 2022-03-31T14:37:52.000Z | os_migrate/plugins/modules/import_workload_create_instance.py | jbadiapa/os-migrate | 19b591a672bc9e4af72e62dbd96be94a238a6dc2 | [
"Apache-2.0"
] | 32 | 2019-12-09T11:09:44.000Z | 2022-03-24T01:13:31.000Z | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
ANSIBLE_METADATA = {
'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'
}
DOCUMENTATION = '''
---
module: import_workload_create_instance
short_description: Create NBD ex... | 33.152416 | 106 | 0.703185 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7,362 | 0.825521 |
81dc5fd1549c9df6ac26331817777ce1242a46e7 | 427 | py | Python | PythonExercicio/ex081.py | fotavio16/PycharmProjects | f5be49db941de69159ec543e8a6dde61f9f94d86 | [
"MIT"
] | null | null | null | PythonExercicio/ex081.py | fotavio16/PycharmProjects | f5be49db941de69159ec543e8a6dde61f9f94d86 | [
"MIT"
] | null | null | null | PythonExercicio/ex081.py | fotavio16/PycharmProjects | f5be49db941de69159ec543e8a6dde61f9f94d86 | [
"MIT"
] | null | null | null | valores = []
while True:
num = int(input('Digite um valor: '))
valores.append(num)
cont = str(input('Quer continuar? [S/N] ')).upper()
if cont == 'N':
break
print(f'Você digitou {len(valores)} elememtos.')
valores.sort(reverse=True)
print(f'Os valores em ordem decrescente são {valores}')
if 5 ... | 26.6875 | 55 | 0.641686 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 204 | 0.474419 |
81dc7fd7e49eea8472a8c802075bd5a03af475ce | 10,670 | py | Python | huobi/client/margin.py | codemonkey89/huobi_Python | 92b96679f6e239c785df7c4354a0a94deda2768f | [
"Apache-2.0"
] | 1 | 2021-09-06T00:09:11.000Z | 2021-09-06T00:09:11.000Z | huobi/client/margin.py | codemonkey89/huobi_Python | 92b96679f6e239c785df7c4354a0a94deda2768f | [
"Apache-2.0"
] | null | null | null | huobi/client/margin.py | codemonkey89/huobi_Python | 92b96679f6e239c785df7c4354a0a94deda2768f | [
"Apache-2.0"
] | null | null | null |
from huobi.utils.input_checker import *
class MarginClient(object):
def __init__(self, **kwargs):
"""
Create the request client instance.
:param kwargs: The option of request connection.
api_key: The public key applied from Huobi.
secret_key: The private key appli... | 36.541096 | 116 | 0.624649 | 10,627 | 0.99597 | 0 | 0 | 0 | 0 | 0 | 0 | 4,326 | 0.405436 |
81dd1a8439621b09316ab23b0da1c48479109ea1 | 2,297 | py | Python | vine/commit.py | robinson96/GRAPE | f6404ae6ee2933647e515a9480077ab01fb2c430 | [
"BSD-3-Clause"
] | 4 | 2017-04-30T17:08:42.000Z | 2019-11-15T04:44:09.000Z | vine/commit.py | robinson96/GRAPE | f6404ae6ee2933647e515a9480077ab01fb2c430 | [
"BSD-3-Clause"
] | 1 | 2016-02-12T07:51:30.000Z | 2016-02-12T07:51:30.000Z | vine/commit.py | robinson96/GRAPE | f6404ae6ee2933647e515a9480077ab01fb2c430 | [
"BSD-3-Clause"
] | null | null | null | import os
import option
import grapeGit as git
import grapeConfig
import utility
class Commit(option.Option):
"""
Usage: grape-commit [-m <message>] [-a | <filetree>]
Options:
-m <message> The commit message.
-a Commit modified files that have not been staged.
Arguments... | 33.289855 | 134 | 0.573792 | 2,214 | 0.963866 | 0 | 0 | 0 | 0 | 0 | 0 | 678 | 0.295168 |
81ddc6f0c5c1c51183abe91817be444c4671d793 | 2,743 | py | Python | allopy/optimize/regret/abstract.py | wangcj05/allopy | 0d97127e5132df1449283198143994b45fb11214 | [
"MIT"
] | 1 | 2021-04-06T04:33:03.000Z | 2021-04-06T04:33:03.000Z | allopy/optimize/regret/abstract.py | wangcj05/allopy | 0d97127e5132df1449283198143994b45fb11214 | [
"MIT"
] | null | null | null | allopy/optimize/regret/abstract.py | wangcj05/allopy | 0d97127e5132df1449283198143994b45fb11214 | [
"MIT"
] | null | null | null | from abc import ABC
from typing import List, Optional, Union
import numpy as np
from allopy import OptData
from allopy.penalty import NoPenalty, Penalty
__all__ = ["AbstractObjectiveBuilder", "AbstractConstraintBuilder"]
class AbstractObjectiveBuilder(ABC):
def __init__(self, data: List[OptData], cvar_data: Li... | 40.338235 | 115 | 0.682829 | 2,048 | 0.746628 | 0 | 0 | 867 | 0.316077 | 0 | 0 | 461 | 0.168064 |
81de227f0a3f6458399634f490d77c2bd9c293a6 | 3,786 | py | Python | dataset-processor3.py | Pawel762/class5-homework | 8e48dcda1ed91b7a5e28bea6db13b2a82182e074 | [
"MIT"
] | null | null | null | dataset-processor3.py | Pawel762/class5-homework | 8e48dcda1ed91b7a5e28bea6db13b2a82182e074 | [
"MIT"
] | null | null | null | dataset-processor3.py | Pawel762/class5-homework | 8e48dcda1ed91b7a5e28bea6db13b2a82182e074 | [
"MIT"
] | null | null | null | import os
import pandas as pd
import matplotlib.pyplot as plt
wine_df = pd.read_csv(filepath_or_buffer='~/class5-homework/wine.data',
sep=',',
header=None)
wine_df.columns = ['Class','Alcohol','Malic_Acid','Ash','Alcalinity_of_Ash','Magnesium',
'Total_Phenols','Flavanoid... | 29.578125 | 88 | 0.744057 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,185 | 0.577126 |
81e0b2153d543771f9ccb08bc53b840667a38757 | 7,451 | py | Python | ares/attack/bim.py | KuanKuanQAQ/ares | 40dbefc18f6438e1812021fe6d6c3195f22ca295 | [
"MIT"
] | 206 | 2020-12-31T09:43:11.000Z | 2022-03-30T07:02:41.000Z | ares/attack/bim.py | afoolboy/ares | 89610d41fdde194e4ad916d29961aaed73383692 | [
"MIT"
] | 7 | 2021-01-26T06:45:44.000Z | 2022-02-26T05:25:48.000Z | ares/attack/bim.py | afoolboy/ares | 89610d41fdde194e4ad916d29961aaed73383692 | [
"MIT"
] | 61 | 2020-12-29T14:02:41.000Z | 2022-03-26T14:21:10.000Z | import tensorflow as tf
import numpy as np
from ares.attack.base import BatchAttack
from ares.attack.utils import get_xs_ph, get_ys_ph, maybe_to_array, get_unit
class BIM(BatchAttack):
''' Basic Iterative Method (BIM). A white-box iterative constraint-based method. Require a differentiable loss
function and ... | 53.992754 | 120 | 0.65414 | 7,286 | 0.977855 | 757 | 0.101597 | 0 | 0 | 0 | 0 | 3,009 | 0.403838 |
81e170cb1bf7f677e6d97334533f66e198b1aa28 | 3,148 | py | Python | parasite/resolver.py | SGevorg/parasite | 574b3992abeef03406524a94b6a8a2d662ca13e7 | [
"MIT"
] | 9 | 2020-09-21T11:21:01.000Z | 2020-12-18T08:21:27.000Z | parasite/resolver.py | bittlingmayer/parasite | daac95eeaa19d5b05c0a3af076e364ca21708ff4 | [
"MIT"
] | 1 | 2020-11-21T09:45:45.000Z | 2020-11-21T09:45:45.000Z | parasite/resolver.py | bittlingmayer/parasite | daac95eeaa19d5b05c0a3af076e364ca21708ff4 | [
"MIT"
] | 4 | 2020-11-21T09:08:30.000Z | 2020-12-05T15:46:56.000Z | import numpy as np
from functools import lru_cache
from typing import Tuple
class DynamicResolver:
def __init__(self,
matrix: np.ndarray,
*,
num_src_lines: int = None,
num_tgt_lines: int = None,
max_k: int = 3,
... | 32.453608 | 80 | 0.55432 | 3,067 | 0.974269 | 0 | 0 | 1,395 | 0.443139 | 0 | 0 | 0 | 0 |
81e2d167ec9fa89c74b62f2bf234fc1429ff2619 | 3,864 | py | Python | utils/preprocess.py | Deep-MI/3d-neuro-seg | 57cc1e16e5ecbef8caf9f6f1e735a0e7339d1152 | [
"Apache-2.0"
] | null | null | null | utils/preprocess.py | Deep-MI/3d-neuro-seg | 57cc1e16e5ecbef8caf9f6f1e735a0e7339d1152 | [
"Apache-2.0"
] | null | null | null | utils/preprocess.py | Deep-MI/3d-neuro-seg | 57cc1e16e5ecbef8caf9f6f1e735a0e7339d1152 | [
"Apache-2.0"
] | null | null | null | import numpy as np
"""
Contains preprocessing code for creating additional information based on MRI volumes and true segmentation maps (asegs).
Eg. weight masks for median frequency class weighing, edge weighing etc.
"""
def create_weight_mask(aseg):
"""
Main function for calculating weight mask of segmentati... | 35.777778 | 120 | 0.646222 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,152 | 0.556936 |
81e2ef476be7e9c25d158962fb2d60491bb44e8a | 4,381 | py | Python | test/test_oneview_hypervisor_cluster_profile_facts.py | nabhajit-ray/oneview-ansible | b31af8a696013bac7a1900748a2fa5ba491fe8e2 | [
"Apache-2.0"
] | 108 | 2016-06-28T18:14:08.000Z | 2022-02-21T09:16:06.000Z | test/test_oneview_hypervisor_cluster_profile_facts.py | HPE-Japan-Presales/oneview-ansible | 26eb13354333d862d9e80f07e3fe9bbe2eb59af3 | [
"Apache-2.0"
] | 248 | 2016-07-14T12:50:17.000Z | 2022-02-06T18:57:16.000Z | test/test_oneview_hypervisor_cluster_profile_facts.py | HPE-Japan-Presales/oneview-ansible | 26eb13354333d862d9e80f07e3fe9bbe2eb59af3 | [
"Apache-2.0"
] | 88 | 2016-06-29T15:52:44.000Z | 2022-03-10T12:34:41.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
###
# Copyright (2016-2020) Hewlett Packard Enterprise Development LP
#
# 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/licen... | 35.048 | 115 | 0.71947 | 2,953 | 0.674047 | 0 | 0 | 3,046 | 0.695275 | 0 | 0 | 1,283 | 0.292856 |
81e5c39849311e6837ffa50cd43accfe28aa75bf | 1,339 | py | Python | utils/predictions.py | jaingaurav3/ML_sample | 4e53de198f7965fa96f0db44717df27032df4b48 | [
"MIT"
] | 19 | 2018-06-08T05:33:47.000Z | 2021-04-26T16:19:32.000Z | utils/predictions.py | jaingaurav3/ML_sample | 4e53de198f7965fa96f0db44717df27032df4b48 | [
"MIT"
] | null | null | null | utils/predictions.py | jaingaurav3/ML_sample | 4e53de198f7965fa96f0db44717df27032df4b48 | [
"MIT"
] | 13 | 2018-09-24T21:52:06.000Z | 2021-02-26T10:40:25.000Z | import os
import scipy
import numpy as np
import pandas as pd
import torch
from torch.autograd import Variable
def predict_batch(net, inputs):
v = Variable(inputs.cuda(), volatile=True)
return net(v).data.cpu().numpy()
def get_probabilities(model, loader):
model.eval()
return np.vstack(predict_batch... | 25.264151 | 70 | 0.630321 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.020911 |
81e5f55f1de69308bb6ff205c3967683e8097ccc | 3,806 | py | Python | gammapy/data/tests/test_pointing.py | Rishank2610/gammapy | 3cd64fdb2c53c8e5c697a9b85ef8d0486bff0b76 | [
"BSD-3-Clause"
] | 155 | 2015-02-25T12:38:02.000Z | 2022-03-13T17:54:30.000Z | gammapy/data/tests/test_pointing.py | Rishank2610/gammapy | 3cd64fdb2c53c8e5c697a9b85ef8d0486bff0b76 | [
"BSD-3-Clause"
] | 3,131 | 2015-01-06T15:36:23.000Z | 2022-03-31T17:30:57.000Z | gammapy/data/tests/test_pointing.py | Rishank2610/gammapy | 3cd64fdb2c53c8e5c697a9b85ef8d0486bff0b76 | [
"BSD-3-Clause"
] | 158 | 2015-03-16T20:36:44.000Z | 2022-03-30T16:05:37.000Z | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from numpy.testing import assert_allclose
from astropy.time import Time
from gammapy.data import FixedPointingInfo, PointingInfo
from gammapy.utils.testing import assert_time_allclose, requires_data
@requires_data()
class TestFixedPointingInfo:
@clas... | 34.6 | 69 | 0.679453 | 3,503 | 0.920389 | 0 | 0 | 3,537 | 0.929322 | 0 | 0 | 251 | 0.065949 |
81e620b1dfd869927a5135342a7294ba02276c08 | 1,183 | py | Python | src/config.py | BRAVO68WEB/architus | 21b9f94a64b142ee6e9b5efd79bd872a13ce8f6a | [
"MIT"
] | null | null | null | src/config.py | BRAVO68WEB/architus | 21b9f94a64b142ee6e9b5efd79bd872a13ce8f6a | [
"MIT"
] | null | null | null | src/config.py | BRAVO68WEB/architus | 21b9f94a64b142ee6e9b5efd79bd872a13ce8f6a | [
"MIT"
] | null | null | null | from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
# from src.commands import *
# import src.commands as command_modules
secret_token = None
db_user = None
db_pass = None
sessions = {}
try:
lines = [line.rstrip('\n') for line in open('.secret_token')]
secret_token = lines[0]
db_u... | 25.170213 | 94 | 0.674556 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 228 | 0.19273 |
81e6447d74e137ba6ed7fb43a3550f34c92da3a7 | 2,876 | py | Python | aict_tools/scripts/plot_regressor_performance.py | LukasBeiske/aict-tools | ccf61c051c58040cf4b676180ae7184021d1b81b | [
"MIT"
] | null | null | null | aict_tools/scripts/plot_regressor_performance.py | LukasBeiske/aict-tools | ccf61c051c58040cf4b676180ae7184021d1b81b | [
"MIT"
] | null | null | null | aict_tools/scripts/plot_regressor_performance.py | LukasBeiske/aict-tools | ccf61c051c58040cf4b676180ae7184021d1b81b | [
"MIT"
] | null | null | null | import click
import logging
import matplotlib
import matplotlib.pyplot as plt
import joblib
import fact.io
from ..configuration import AICTConfig
from ..plotting import (
plot_regressor_confusion,
plot_bias_resolution,
plot_feature_importances,
)
if matplotlib.get_backend() == 'pgf':
from matplotlib.b... | 30.924731 | 83 | 0.691586 | 0 | 0 | 0 | 0 | 2,454 | 0.853268 | 0 | 0 | 435 | 0.151252 |
c48c8a45a8bc31ea98b3b0eb49ac12298185c634 | 2,426 | py | Python | kenlm_training/cc_net/tokenizer.py | ruinunca/data_tooling | 297e1f8c2898d00b523ccafb7bdd19c6d6aac9ff | [
"Apache-2.0"
] | 435 | 2019-11-04T22:35:50.000Z | 2022-03-29T20:15:07.000Z | kenlm_training/cc_net/tokenizer.py | ruinunca/data_tooling | 297e1f8c2898d00b523ccafb7bdd19c6d6aac9ff | [
"Apache-2.0"
] | 331 | 2021-11-02T00:30:56.000Z | 2022-03-08T16:48:13.000Z | kenlm_training/cc_net/tokenizer.py | ruinunca/data_tooling | 297e1f8c2898d00b523ccafb7bdd19c6d6aac9ff | [
"Apache-2.0"
] | 66 | 2019-11-06T01:28:12.000Z | 2022-03-01T09:18:32.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.
#
import time
from typing import Dict, Optional
import sacremoses # type: ignore
from cc_net import jsonql, text_normalizer
class RobustT... | 30.325 | 90 | 0.626958 | 2,115 | 0.871805 | 0 | 0 | 0 | 0 | 0 | 0 | 493 | 0.203215 |
c48caf2d700cbc3c512434c652a6ac5a08e2206b | 346 | py | Python | scripts/exercicios/ex063.py | RuanBarretodosSantos/python | 4142ccd71c4ffb4bb6a10d61c85f612758f5bb41 | [
"MIT"
] | null | null | null | scripts/exercicios/ex063.py | RuanBarretodosSantos/python | 4142ccd71c4ffb4bb6a10d61c85f612758f5bb41 | [
"MIT"
] | null | null | null | scripts/exercicios/ex063.py | RuanBarretodosSantos/python | 4142ccd71c4ffb4bb6a10d61c85f612758f5bb41 | [
"MIT"
] | null | null | null | cont = 3
t1 = 0
t2 = 1
print('-----' * 12)
print('Sequência de Fibonacci')
print('-----' * 12)
valor = int(input('Quantos termos você quer mostrar ? '))
print('~~~~~' * 12)
print(f'{t1} ➙ {t2} ' , end='➙ ')
while cont <= valor:
t3 = t1 + t2
print(f' {t3}', end=' ➙ ')
t1 = t2
t2 = t3
t3 = t1
co... | 19.222222 | 57 | 0.482659 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 131 | 0.370056 |
c48ce6625a976f83a24cccf09278351389aa811f | 3,991 | py | Python | CGAT/Sra.py | 861934367/cgat | 77fdc2f819320110ed56b5b61968468f73dfc5cb | [
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | CGAT/Sra.py | 861934367/cgat | 77fdc2f819320110ed56b5b61968468f73dfc5cb | [
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | CGAT/Sra.py | 861934367/cgat | 77fdc2f819320110ed56b5b61968468f73dfc5cb | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 1 | 2019-08-04T22:46:38.000Z | 2019-08-04T22:46:38.000Z | ##########################################################################
#
# MRC FGU Computational Genomics Group
#
# $Id$
#
# Copyright (C) 2009 Andreas Heger
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by ... | 32.447154 | 82 | 0.607367 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,825 | 0.707843 |
c48d9b9b2d55aa3083a0ad90f19c76032b967b27 | 11,902 | py | Python | LipidFinder/LFDataFrame.py | s-andrews/LipidFinder | c91d6caa8008e0a67188914e48f30913deff888d | [
"MIT"
] | null | null | null | LipidFinder/LFDataFrame.py | s-andrews/LipidFinder | c91d6caa8008e0a67188914e48f30913deff888d | [
"MIT"
] | null | null | null | LipidFinder/LFDataFrame.py | s-andrews/LipidFinder | c91d6caa8008e0a67188914e48f30913deff888d | [
"MIT"
] | null | null | null | # Copyright (c) 2019 J. Alvarez-Jarreta and C.J. Brasher
#
# This file is part of the LipidFinder software tool and governed by the
# 'MIT License'. Please see the LICENSE file that should have been
# included as part of this software.
"""Represent a DataFrame to be processed with LipidFinder's workflow."""
import glo... | 50.008403 | 80 | 0.584272 | 11,537 | 0.969333 | 0 | 0 | 1,501 | 0.126113 | 0 | 0 | 6,969 | 0.585532 |
c48f04379334e4d1150bc95e2f72b0aa259025e8 | 4,836 | py | Python | tensorflow/python/ops/fused_embedding_ops.py | lixy9474/DeepRec-1 | dbfdf98af68505201a4f647348cce56ecbb652b2 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/ops/fused_embedding_ops.py | lixy9474/DeepRec-1 | dbfdf98af68505201a4f647348cce56ecbb652b2 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/ops/fused_embedding_ops.py | lixy9474/DeepRec-1 | dbfdf98af68505201a4f647348cce56ecbb652b2 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from tensorflow.python.framework import ops
from tensorflow.python.ops import variables
from tensorflow.python.ops import array_ops
from tensorflow.python.framework import sparse_tensor
from tensorflow.python.o... | 49.346939 | 99 | 0.709884 | 0 | 0 | 0 | 0 | 1,166 | 0.241108 | 0 | 0 | 1,043 | 0.215674 |
c48f102d83062572178277d6397d5fa6395d6e36 | 705 | py | Python | docs/source/conf.py | deeplook/ipycanvas | c42a5540c55534f919da0fd462cef4593ac7d755 | [
"BSD-3-Clause"
] | null | null | null | docs/source/conf.py | deeplook/ipycanvas | c42a5540c55534f919da0fd462cef4593ac7d755 | [
"BSD-3-Clause"
] | null | null | null | docs/source/conf.py | deeplook/ipycanvas | c42a5540c55534f919da0fd462cef4593ac7d755 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import sphinx_rtd_theme
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
# 'sphinx.ext.intersphinx',
# 'sphinx.ext.autosummary',
# 'sphinx.ext.viewcode',
# 'jupyter_sphinx.embed_widgets',
]
templates_path = ['_templates']
master_doc = 'index'
source_suffix ... | 21.363636 | 58 | 0.721986 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 369 | 0.523404 |
c48f34eb08cb0b005af06224c4565e27b18c0cb3 | 672 | py | Python | pyTuplingUtils/io.py | umd-lhcb/pyTuplingUtils | dd2efe154f1418a70295eabd8919e16ace2785cc | [
"BSD-2-Clause"
] | null | null | null | pyTuplingUtils/io.py | umd-lhcb/pyTuplingUtils | dd2efe154f1418a70295eabd8919e16ace2785cc | [
"BSD-2-Clause"
] | 7 | 2020-04-20T17:25:45.000Z | 2021-06-13T21:05:14.000Z | pyTuplingUtils/io.py | umd-lhcb/pyTuplingUtils | dd2efe154f1418a70295eabd8919e16ace2785cc | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
#
# Author: Yipeng Sun
# License: BSD 2-clause
# Last Change: Sun May 09, 2021 at 02:52 AM +0200
import numpy as np
ARRAY_TYPE = 'np'
def read_branch(ntp, tree, branch, idx=None):
data = ntp[tree][branch].array(library=ARRAY_TYPE)
return data if not idx else data[idx]
def read_bran... | 23.172414 | 72 | 0.699405 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 119 | 0.177083 |
c4900758f320c35b4e8aaebac80f973e8645fdc4 | 483 | py | Python | clinnotes/reminders/forms.py | mattnickerson993/clinnotes2 | bc44e516a5042e22de8c6618425966bd58919eff | [
"MIT"
] | null | null | null | clinnotes/reminders/forms.py | mattnickerson993/clinnotes2 | bc44e516a5042e22de8c6618425966bd58919eff | [
"MIT"
] | null | null | null | clinnotes/reminders/forms.py | mattnickerson993/clinnotes2 | bc44e516a5042e22de8c6618425966bd58919eff | [
"MIT"
] | null | null | null | from django import forms
from .models import Reminder
from clinnotes.users.models import EpisodeOfCare
class ReminderForm(forms.ModelForm):
class Meta:
model = Reminder
fields = ['category', 'title', 'details', 'episode_of_care']
def __init__(self, *args, **kwargs):
user = kwargs.pop... | 34.5 | 94 | 0.693582 | 378 | 0.782609 | 0 | 0 | 0 | 0 | 0 | 0 | 66 | 0.136646 |
c491762e38ab524f8ee85b6bd6fa42008e8b092d | 3,583 | py | Python | AlgorithmB.py | tejaDhulipala/SnowflakeGen | effabafb790a1a407c5c27cf249806a4775127e4 | [
"MIT"
] | null | null | null | AlgorithmB.py | tejaDhulipala/SnowflakeGen | effabafb790a1a407c5c27cf249806a4775127e4 | [
"MIT"
] | null | null | null | AlgorithmB.py | tejaDhulipala/SnowflakeGen | effabafb790a1a407c5c27cf249806a4775127e4 | [
"MIT"
] | null | null | null | import pygame as pg
from shapely.geometry import Point, Polygon
from time import perf_counter
# Vars
A = [(100, 600), (700, 600), (400, 80)]
triangles = [[(100, 600), (700, 600), (400, 80)]]
SQRT_3 = 3 ** (1 / 2)
WHITE = (255, 255, 255)
# Graphics part
pg.init()
screen = pg.display.set_mode((800, 800))
... | 32.87156 | 86 | 0.487301 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 78 | 0.021769 |
c492c9c90d1fe8546ec965192035975153cc63a2 | 39,839 | py | Python | validator/testcases/javascript/actions.py | AutomatedTester/amo-validator | a063002497395ce04085a3940713b4467f12e9fd | [
"BSD-3-Clause"
] | null | null | null | validator/testcases/javascript/actions.py | AutomatedTester/amo-validator | a063002497395ce04085a3940713b4467f12e9fd | [
"BSD-3-Clause"
] | null | null | null | validator/testcases/javascript/actions.py | AutomatedTester/amo-validator | a063002497395ce04085a3940713b4467f12e9fd | [
"BSD-3-Clause"
] | null | null | null | from copy import deepcopy
from functools import partial
import sys
import types
# Global import of predefinedentities will cause an import loop
import instanceactions
from validator.constants import (BUGZILLA_BUG, DESCRIPTION_TYPES, FENNEC_GUID,
FIREFOX_GUID, MAX_STR_SIZE, MDN_DOC)
fro... | 37.407512 | 79 | 0.588192 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12,717 | 0.31921 |
c4930d25761ee9d797224e253c155e8643ca0fdb | 14,588 | py | Python | geometry_utils/tests/test_bound_box.py | NOAA-ORR-ERD/geometry_utils | 0417a8c459fb17f101945f53d048191dc22e97c0 | [
"BSD-3-Clause"
] | null | null | null | geometry_utils/tests/test_bound_box.py | NOAA-ORR-ERD/geometry_utils | 0417a8c459fb17f101945f53d048191dc22e97c0 | [
"BSD-3-Clause"
] | null | null | null | geometry_utils/tests/test_bound_box.py | NOAA-ORR-ERD/geometry_utils | 0417a8c459fb17f101945f53d048191dc22e97c0 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""
Test code for the BBox Object
"""
import numpy as np
import pytest
from geometry_utils.bound_box import (BBox,
asBBox,
NullBBox,
InfBBox,
f... | 25.151724 | 75 | 0.466822 | 14,120 | 0.967919 | 0 | 0 | 0 | 0 | 0 | 0 | 411 | 0.028174 |
c493107b1fd8b943176b6566abf9ca29701a3c9c | 4,789 | py | Python | cresi/net/augmentations/functional.py | ankshah131/cresi | 99328e065910c45a626e761cd308670e4a60f058 | [
"Apache-2.0"
] | 117 | 2019-08-29T08:43:55.000Z | 2022-03-24T20:56:23.000Z | cresi/net/augmentations/functional.py | ankshah131/cresi | 99328e065910c45a626e761cd308670e4a60f058 | [
"Apache-2.0"
] | 9 | 2019-11-23T10:55:13.000Z | 2021-06-22T12:26:21.000Z | cresi/net/augmentations/functional.py | ankshah131/cresi | 99328e065910c45a626e761cd308670e4a60f058 | [
"Apache-2.0"
] | 33 | 2019-08-08T16:56:37.000Z | 2022-02-24T20:52:44.000Z | import cv2
cv2.setNumThreads(0)
cv2.ocl.setUseOpenCL(False)
import numpy as np
import math
from functools import wraps
def clip(img, dtype, maxval):
return np.clip(img, 0, maxval).astype(dtype)
def clipped(func):
"""
wrapper to clip results of transform to image dtype value range
"""
... | 28.005848 | 102 | 0.595114 | 0 | 0 | 0 | 0 | 173 | 0.036124 | 0 | 0 | 531 | 0.110879 |
c493ccaae899498f57b59dd3ded561a78518f5a9 | 417 | py | Python | regtestsWin_customBuildPy.py | greenwoodms/TRANSFORM-Library | dc152d4f0298d3f18385f2ea33645d87d7812915 | [
"Apache-2.0"
] | 29 | 2018-04-24T17:06:19.000Z | 2021-11-21T05:17:28.000Z | regtestsWin_customBuildPy.py | greenwoodms/TRANSFORM-Library | dc152d4f0298d3f18385f2ea33645d87d7812915 | [
"Apache-2.0"
] | 13 | 2018-04-05T08:34:27.000Z | 2021-10-04T14:24:41.000Z | regtestsWin_customBuildPy.py | greenwoodms/TRANSFORM-Library | dc152d4f0298d3f18385f2ea33645d87d7812915 | [
"Apache-2.0"
] | 17 | 2018-08-06T22:18:01.000Z | 2022-01-29T21:38:17.000Z | # -*- coding: utf-8 -*-
"""
Created on Mon Aug 14 09:49:13 2017
@author: vmg
"""
import os
import buildingspy.development.regressiontest as r
rt = r.Tester(check_html=False)#,tool="dymola")
LibPath = os.path.join("TRANSFORM")
ResPath = LibPath
rt.showGUI(True)
rt.setLibraryRoot(LibPath, ResPath)
rt.setNumberOfThread... | 23.166667 | 82 | 0.748201 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 189 | 0.453237 |
c49410af0e45267e29dfed5b9b7fc2e415dd48a2 | 2,039 | py | Python | src/deoxys/model/activations.py | huynhngoc/deoxys | b2e9936b723807e129fda36d8d6131ca00db558f | [
"MIT"
] | 1 | 2021-12-28T15:48:45.000Z | 2021-12-28T15:48:45.000Z | src/deoxys/model/activations.py | huynhngoc/deoxys | b2e9936b723807e129fda36d8d6131ca00db558f | [
"MIT"
] | 2 | 2020-06-26T11:03:53.000Z | 2020-06-26T11:05:09.000Z | src/deoxys/model/activations.py | huynhngoc/deoxys | b2e9936b723807e129fda36d8d6131ca00db558f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
__author__ = "Ngoc Huynh Bao"
__email__ = "[email protected]"
from ..keras.layers import Activation
from ..keras.activations import deserialize
from ..utils import Singleton
class Activations(metaclass=Singleton):
"""
A singleton that contains all the registered customized acti... | 26.141026 | 77 | 0.647376 | 840 | 0.411967 | 0 | 0 | 69 | 0.03384 | 0 | 0 | 896 | 0.439431 |
c4950cd78452abf9ab6be8b01808431c4aeef93d | 2,618 | py | Python | raspisump/reading.py | seanm/raspi-sump | 65456b5e0d1e93bb2574a46527f410a08f9f51ba | [
"MIT"
] | 79 | 2015-03-11T12:13:35.000Z | 2022-03-30T04:35:09.000Z | raspisump/reading.py | seanm/raspi-sump | 65456b5e0d1e93bb2574a46527f410a08f9f51ba | [
"MIT"
] | 72 | 2015-02-20T02:26:25.000Z | 2022-02-19T01:22:36.000Z | raspisump/reading.py | seanm/raspi-sump | 65456b5e0d1e93bb2574a46527f410a08f9f51ba | [
"MIT"
] | 36 | 2015-01-11T12:11:43.000Z | 2022-01-07T01:35:30.000Z | """ Module to take a water_level reading."""
# Raspi-sump, a sump pump monitoring system.
# Al Audet
# http://www.linuxnorth.org/raspi-sump/
#
# All configuration changes should be done in raspisump.conf
# MIT License -- http://www.linuxnorth.org/raspi-sump/license.html
try:
import ConfigParser as configparser #... | 29.088889 | 79 | 0.688312 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,026 | 0.391902 |
c49a318a7b8ef2bfca67b0d3b643cbd37094de2d | 2,830 | py | Python | pipelines/pancreas_pipeline.py | marvinquiet/RefConstruction_supervisedCelltyping | 7bdd02a0486c175785ec24461dc6356c4d172091 | [
"MIT"
] | null | null | null | pipelines/pancreas_pipeline.py | marvinquiet/RefConstruction_supervisedCelltyping | 7bdd02a0486c175785ec24461dc6356c4d172091 | [
"MIT"
] | null | null | null | pipelines/pancreas_pipeline.py | marvinquiet/RefConstruction_supervisedCelltyping | 7bdd02a0486c175785ec24461dc6356c4d172091 | [
"MIT"
] | null | null | null | '''
Configuration generation for running Pancreas datasets
'''
import os, argparse
from pipelines import method_utils, dataloading_utils
from preprocess.process_train_test_data import *
if __name__ == "__main__":
data_dir = "~/gpu/data"
## parse arguments
import argparse
parser = argparse.ArgumentPa... | 41.617647 | 109 | 0.677032 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 909 | 0.321201 |
c49b19da4180160b333ba71b17f93e31d23578f0 | 436 | py | Python | MachineLearning/StandardScaler/standardization.py | yexianyi/AI_Practice | 80499ab3a06ac055641aa069fe1e37864c9e41c4 | [
"Apache-2.0"
] | null | null | null | MachineLearning/StandardScaler/standardization.py | yexianyi/AI_Practice | 80499ab3a06ac055641aa069fe1e37864c9e41c4 | [
"Apache-2.0"
] | null | null | null | MachineLearning/StandardScaler/standardization.py | yexianyi/AI_Practice | 80499ab3a06ac055641aa069fe1e37864c9e41c4 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
from sklearn.preprocessing import StandardScaler
def stand_demo():
data = pd.read_csv("dating.txt")
print(data)
transfer = StandardScaler()
data = transfer.fit_transform(data[['milage', 'Liters', 'Consumtime']])
print("Standardization result: \n", data)
print("Mean of each ... | 25.647059 | 75 | 0.692661 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 122 | 0.279817 |
c49cdbfcdbfea8b874ccc9f3311ef29e7510510a | 716 | py | Python | tests/test_primitive_roots.py | greysonDEV/rng | 5af76f5edff4de1b502c21ca1c1ce93243a618c8 | [
"MIT"
] | null | null | null | tests/test_primitive_roots.py | greysonDEV/rng | 5af76f5edff4de1b502c21ca1c1ce93243a618c8 | [
"MIT"
] | null | null | null | tests/test_primitive_roots.py | greysonDEV/rng | 5af76f5edff4de1b502c21ca1c1ce93243a618c8 | [
"MIT"
] | null | null | null | from prng.util.util import primitive_roots
import pytest
def test_primitive_roots():
prim_roots_sets = [
[3, [2]],
[7, [3,5]],
[13, [2,6,7,11]],
[17, [3,5,6,7,10,11,12,14]],
[19, [2,3,10,13,14,15]],
[31, [3,11,12,13,17,21,22,24]],
[53, [2,3,5,8,12,14,18,19,20... | 37.684211 | 112 | 0.544693 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c49d07ec16361493f21d1cdf3590979db22f9935 | 383 | py | Python | hackerrank-python/xml-1-find-the-score.py | fmelihh/competitive-programming-solutions | c15c2f7d90153f35f9bd9ffcea20ac921564eacf | [
"MIT"
] | 2 | 2021-09-06T22:13:12.000Z | 2021-11-22T08:50:04.000Z | hackerrank-python/xml-1-find-the-score.py | fmelihh/competitive-programming-solutions | c15c2f7d90153f35f9bd9ffcea20ac921564eacf | [
"MIT"
] | null | null | null | hackerrank-python/xml-1-find-the-score.py | fmelihh/competitive-programming-solutions | c15c2f7d90153f35f9bd9ffcea20ac921564eacf | [
"MIT"
] | null | null | null |
# https://www.hackerrank.com/challenges/xml-1-find-the-score/problem
import sys
import xml.etree.ElementTree as etree
def get_attr_number(node):
return etree.tostring(node).count(b'=')
if __name__ == '__main__':
sys.stdin.readline()
xml = sys.stdin.read()
tree = etree.ElementTree(etree.fromstring(xm... | 23.9375 | 68 | 0.710183 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 0.214099 |
c49d9514c95f15c6be6ba6695dcb54d27f071828 | 347 | py | Python | CodeChef/Contest/June Long/pricecon.py | GSri30/Competetive_programming | 0dc1681500a80b6f0979d0dc9f749357ee07bcb8 | [
"MIT"
] | 22 | 2020-01-03T17:32:00.000Z | 2021-11-07T09:31:44.000Z | CodeChef/Contest/June Long/pricecon.py | GSri30/Competetive_programming | 0dc1681500a80b6f0979d0dc9f749357ee07bcb8 | [
"MIT"
] | 10 | 2020-09-30T09:41:18.000Z | 2020-10-11T11:25:09.000Z | CodeChef/Contest/June Long/pricecon.py | GSri30/Competetive_programming | 0dc1681500a80b6f0979d0dc9f749357ee07bcb8 | [
"MIT"
] | 25 | 2019-10-14T19:25:01.000Z | 2021-05-26T08:12:20.000Z | test = int(input())
while test > 0 :
n,k = map(int,input().split())
p = list(map(int,input().split()))
original = 0
later = 0
for i in p :
if i > k :
later += k
original += i
else :
later += i
original += i
print(orig... | 23.133333 | 39 | 0.414986 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c49e67e8dbe87dd913b66006fd7f5daf6198c333 | 2,948 | py | Python | src/utils/Shell.py | vlab-cs-ucsb/quacky | c031577883550820e2586ce530e59eb30aeccc37 | [
"BSD-2-Clause"
] | 1 | 2022-02-28T18:10:29.000Z | 2022-02-28T18:10:29.000Z | src/utils/Shell.py | vlab-cs-ucsb/quacky | c031577883550820e2586ce530e59eb30aeccc37 | [
"BSD-2-Clause"
] | null | null | null | src/utils/Shell.py | vlab-cs-ucsb/quacky | c031577883550820e2586ce530e59eb30aeccc37 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Aug 18 22:20:01 2014
@author: baki
"""
import shlex
from subprocess import Popen, PIPE
from .Log import Log
class Shell:
def __init__(self, TAG=""):
self.log = Log(TAG=TAG)
self.current_process = None
self.process_output = None
def setTag(s... | 32.043478 | 119 | 0.557327 | 2,792 | 0.947083 | 0 | 0 | 0 | 0 | 0 | 0 | 544 | 0.184532 |
c49f689d742bf5ec9d22f74b83fe32c9c62c281f | 4,458 | py | Python | scrapy_autounit/middleware.py | ogiaquino/scrapy-autounit | 97f00d2d62c1ad49bbac462018907abe6a20e4cd | [
"BSD-3-Clause"
] | null | null | null | scrapy_autounit/middleware.py | ogiaquino/scrapy-autounit | 97f00d2d62c1ad49bbac462018907abe6a20e4cd | [
"BSD-3-Clause"
] | null | null | null | scrapy_autounit/middleware.py | ogiaquino/scrapy-autounit | 97f00d2d62c1ad49bbac462018907abe6a20e4cd | [
"BSD-3-Clause"
] | null | null | null | import os
import six
import copy
import pickle
import random
import logging
from scrapy.http import Request
from scrapy.exceptions import NotConfigured
from scrapy.commands.genspider import sanitize_module_name
from scrapy.spiders import CrawlSpider
from .utils import (
add_sample,
response_to_dict,
get_o... | 31.617021 | 77 | 0.593091 | 3,814 | 0.855541 | 0 | 0 | 85 | 0.019067 | 0 | 0 | 681 | 0.152759 |
c4a06bb562106e2918ecce48527f9b40a6d8d42c | 2,735 | py | Python | python_examples/create_tags/utils.py | kirank0220/api-examples | 9d6c51eeb2d4e38d95b0b7d88fd30fe96ef28d20 | [
"MIT"
] | 1 | 2021-12-20T16:49:00.000Z | 2021-12-20T16:49:00.000Z | python_examples/create_tags/utils.py | kirank0220/api-examples | 9d6c51eeb2d4e38d95b0b7d88fd30fe96ef28d20 | [
"MIT"
] | 2 | 2020-11-20T04:51:16.000Z | 2021-06-16T17:02:35.000Z | python_examples/create_tags/utils.py | kirank0220/api-examples | 9d6c51eeb2d4e38d95b0b7d88fd30fe96ef28d20 | [
"MIT"
] | 1 | 2020-11-20T04:46:17.000Z | 2020-11-20T04:46:17.000Z | #########################################################################
# _________ ___. ______________________ ___
# \_ ___ \___.__.\_ |__ ___________ / _____/\______ \ \/ /
# / \ \< | | | __ \_/ __ \_ __ \/ \ ___ | _/\ /
# \ \___\___ | | \_\... | 35.064103 | 114 | 0.527971 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 798 | 0.291773 |
c4a0dfed3531558a43bad867fbac20a6c63fe3e4 | 3,104 | py | Python | gpytorch/lazy/non_lazy_tensor.py | phumm/gpytorch | 4e8042bcecda049956f8f9e823d82ba6340766d5 | [
"MIT"
] | 1 | 2019-09-30T06:51:03.000Z | 2019-09-30T06:51:03.000Z | gpytorch/lazy/non_lazy_tensor.py | phumm/gpytorch | 4e8042bcecda049956f8f9e823d82ba6340766d5 | [
"MIT"
] | null | null | null | gpytorch/lazy/non_lazy_tensor.py | phumm/gpytorch | 4e8042bcecda049956f8f9e823d82ba6340766d5 | [
"MIT"
] | 1 | 2020-09-16T16:35:27.000Z | 2020-09-16T16:35:27.000Z | #!/usr/bin/env python3
import torch
from .lazy_tensor import LazyTensor
class NonLazyTensor(LazyTensor):
def _check_args(self, tsr):
if not torch.is_tensor(tsr):
return "NonLazyTensor must take a torch.Tensor; got {}".format(tsr.__class__.__name__)
if tsr.dim() < 2:
retur... | 30.431373 | 111 | 0.634665 | 2,513 | 0.809601 | 0 | 0 | 0 | 0 | 0 | 0 | 585 | 0.188466 |
c4a0e5d601dd26ad6e285ee33bc0cea8cb5b622e | 1,956 | py | Python | aoc_wim/aoc2019/q19.py | wimglenn/advent-of-code-wim | 6308c3fa5d29b318680419f877fd5b8ac1359b5d | [
"WTFPL"
] | 20 | 2019-10-15T07:33:13.000Z | 2022-01-19T13:40:36.000Z | aoc_wim/aoc2019/q19.py | wimglenn/advent-of-code-wim | 6308c3fa5d29b318680419f877fd5b8ac1359b5d | [
"WTFPL"
] | 5 | 2019-02-01T23:31:27.000Z | 2021-12-03T06:55:58.000Z | aoc_wim/aoc2019/q19.py | wimglenn/advent-of-code-wim | 6308c3fa5d29b318680419f877fd5b8ac1359b5d | [
"WTFPL"
] | 8 | 2019-12-03T15:41:23.000Z | 2021-12-06T17:13:57.000Z | """
--- Day 19: Tractor Beam ---
https://adventofcode.com/2019/day/19
"""
from aocd import data
from aoc_wim.aoc2019 import IntComputer
from aoc_wim.zgrid import ZGrid
from aoc_wim.search import Bisect
import functools
@functools.lru_cache(maxsize=100**2)
def beam(z):
comp = IntComputer(data, inputs=[int(z.imag),... | 24.759494 | 67 | 0.552147 | 0 | 0 | 0 | 0 | 200 | 0.102249 | 0 | 0 | 235 | 0.120143 |
c4a20cea738e338abf0c6eb0710a2bbf72908f18 | 378 | py | Python | BlurDetection.py | samaritan-security/samaritan-backend | 3a4450e4a2e7a823d6d2fb1e982871ac0aa97744 | [
"WTFPL"
] | null | null | null | BlurDetection.py | samaritan-security/samaritan-backend | 3a4450e4a2e7a823d6d2fb1e982871ac0aa97744 | [
"WTFPL"
] | 59 | 2020-02-05T03:09:43.000Z | 2020-04-23T19:29:58.000Z | BlurDetection.py | samaritan-security/samaritan-backend | 3a4450e4a2e7a823d6d2fb1e982871ac0aa97744 | [
"WTFPL"
] | null | null | null | import cv2
def variance_of_laplacian(image):
return cv2.Laplacian(image, cv2.CV_64F).var()
"""
checks if an image is blurry
returns True if blurry, False otherwise
"""
def detect_blurry_image(image, threshold):
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
blur = variance_of_laplacian(image)
i... | 19.894737 | 50 | 0.708995 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 76 | 0.201058 |
c4a251a0e7e64524dd68b799ffbb2a257e20933b | 894 | py | Python | python-essential-training/4_operators/main.py | alexprodan99/python-workspace | 8c805afc29fafe3916759d1cf07e597f945b8b45 | [
"MIT"
] | null | null | null | python-essential-training/4_operators/main.py | alexprodan99/python-workspace | 8c805afc29fafe3916759d1cf07e597f945b8b45 | [
"MIT"
] | null | null | null | python-essential-training/4_operators/main.py | alexprodan99/python-workspace | 8c805afc29fafe3916759d1cf07e597f945b8b45 | [
"MIT"
] | null | null | null | def main():
# Arithmetic operators
a = 7
b = 2
print(f'{a} + {b} = {a+b}')
print(f'{a} - {b} = {a-b}')
print(f'{a} * {b} = {a*b}')
print(f'{a} / {b} = {a/b}')
print(f'{a} // {b} = {a//b}')
print(f'{a} % {b} = {a%b}')
print(f'{a} ^ {b} = {a**b}')
# Bitwise ... | 21.804878 | 90 | 0.401566 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 543 | 0.607383 |
c4a2a593c0a2d8ff337685d877ea3ffe9f0a0f35 | 2,689 | py | Python | UPGen/utils.py | HenryLiangzy/COMP9517_Group | 83be7304bee47d52781ea71f06838cd148dbd0bd | [
"Apache-2.0"
] | 21 | 2020-04-24T01:14:30.000Z | 2021-11-26T09:44:00.000Z | UPGen/utils.py | HenryLiangzy/COMP9517_Group | 83be7304bee47d52781ea71f06838cd148dbd0bd | [
"Apache-2.0"
] | null | null | null | UPGen/utils.py | HenryLiangzy/COMP9517_Group | 83be7304bee47d52781ea71f06838cd148dbd0bd | [
"Apache-2.0"
] | 2 | 2020-05-18T11:43:17.000Z | 2020-06-19T13:13:14.000Z | """
Helper functions and utilities
"""
from datetime import datetime as dt
from mrcnn import visualize
import numpy as np
import os
import cv2
TIMESTAMP_FORMAT = "%d/%m/%Y %H:%M:%S"
class Logger(object):
"""
Log events and information to a file
"""
def __init__(self, savePath):
self.savePa... | 25.855769 | 115 | 0.579026 | 1,103 | 0.41019 | 0 | 0 | 0 | 0 | 0 | 0 | 480 | 0.178505 |
c4a31e4a9faadb779ad5e3539b89e160045375e9 | 108 | py | Python | lmctl/project/mutate/base.py | manojn97/lmctl | 844925cb414722351efac90cb97f10c1185eef7a | [
"Apache-2.0"
] | 3 | 2021-07-19T09:46:01.000Z | 2022-03-07T13:51:25.000Z | lmctl/project/mutate/base.py | manojn97/lmctl | 844925cb414722351efac90cb97f10c1185eef7a | [
"Apache-2.0"
] | 43 | 2019-08-27T12:36:29.000Z | 2020-08-27T14:50:40.000Z | lmctl/project/mutate/base.py | manojn97/lmctl | 844925cb414722351efac90cb97f10c1185eef7a | [
"Apache-2.0"
] | 7 | 2020-09-22T20:32:17.000Z | 2022-03-29T12:25:51.000Z | import abc
class Mutator(abc.ABC):
def apply(self, original_content):
return original_content
| 15.428571 | 38 | 0.712963 | 95 | 0.87963 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c4a3253a85318d51afd9e6db7f79225a1972648a | 630 | py | Python | src/django_otp/conf.py | jaap3/django-otp | d7980bf516018319158570cc75353c905375a3ab | [
"BSD-2-Clause"
] | 318 | 2019-08-27T15:57:05.000Z | 2022-03-30T08:38:29.000Z | src/django_otp/conf.py | jaap3/django-otp | d7980bf516018319158570cc75353c905375a3ab | [
"BSD-2-Clause"
] | 77 | 2019-09-17T11:48:38.000Z | 2022-03-13T17:26:56.000Z | src/django_otp/conf.py | jaap3/django-otp | d7980bf516018319158570cc75353c905375a3ab | [
"BSD-2-Clause"
] | 76 | 2019-08-30T20:29:40.000Z | 2022-03-30T09:14:36.000Z | import django.conf
class Settings:
"""
This is a simple class to take the place of the global settings object. An
instance will contain all of our settings as attributes, with default values
if they are not specified by the configuration.
"""
defaults = {
'OTP_LOGIN_URL': django.conf.s... | 27.391304 | 80 | 0.668254 | 584 | 0.926984 | 0 | 0 | 0 | 0 | 0 | 0 | 269 | 0.426984 |
c4a3547cec59bda0f54c29fe3708b9bf82715b42 | 544 | py | Python | Moderation/purge.py | DevFlock/Multis | 8332edddcbb957ad8fc47766d102295da8aef591 | [
"MIT"
] | 3 | 2020-12-27T20:32:14.000Z | 2021-09-02T08:59:34.000Z | Moderation/purge.py | DevFlock/Multis | 8332edddcbb957ad8fc47766d102295da8aef591 | [
"MIT"
] | 1 | 2021-05-09T21:44:42.000Z | 2022-03-01T22:36:53.000Z | Moderation/purge.py | DevFlock/Multis | 8332edddcbb957ad8fc47766d102295da8aef591 | [
"MIT"
] | 1 | 2021-05-10T22:55:41.000Z | 2021-05-10T22:55:41.000Z | import asyncio
import discord
from discord.ext import commands
from discord.ext.commands.core import has_permissions
class cog(commands.Cog):
def __init__(self, client):
self.client = client
@commands.command(aliases=["clear"])
@has_permissions(ban_members=True)
async def purge(self, ctx, cou... | 24.727273 | 62 | 0.693015 | 373 | 0.685662 | 0 | 0 | 281 | 0.516544 | 201 | 0.369485 | 35 | 0.064338 |
c4a3b7fd35e583f4df4df37c10b28021b5e84c76 | 184 | py | Python | tensorboard/acceptance/__init__.py | DeepLearnI/atlas | 8aca652d7e647b4e88530b93e265b536de7055ed | [
"Apache-2.0"
] | 296 | 2020-03-16T19:55:00.000Z | 2022-01-10T19:46:05.000Z | tensorboard/acceptance/__init__.py | DeepLearnI/atlas | 8aca652d7e647b4e88530b93e265b536de7055ed | [
"Apache-2.0"
] | 57 | 2020-03-17T11:15:57.000Z | 2021-07-10T14:42:27.000Z | tensorboard/acceptance/__init__.py | DeepLearnI/atlas | 8aca652d7e647b4e88530b93e265b536de7055ed | [
"Apache-2.0"
] | 38 | 2020-03-17T21:06:05.000Z | 2022-02-08T03:19:34.000Z | from .test_tensorboard_rest_api import TestTensorboardRestAPI
from .test_tensorboard_server import TestTensorboardServer
from .test_tensorboard_endpoints import TestTensorboardEndpoint | 61.333333 | 63 | 0.923913 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c4a3dde4993c9a95e8e97065cdef59f7fea5aa64 | 3,988 | py | Python | tests/store/test_fetch_purchases_to_ship.py | yuzi-ziyu/alphasea-agent | a8ff803fd7dedd50c757630aa83b79fb624c0414 | [
"CC0-1.0"
] | 1 | 2022-01-27T14:29:39.000Z | 2022-01-27T14:29:39.000Z | tests/store/test_fetch_purchases_to_ship.py | yuzi-ziyu/alphasea-agent | a8ff803fd7dedd50c757630aa83b79fb624c0414 | [
"CC0-1.0"
] | null | null | null | tests/store/test_fetch_purchases_to_ship.py | yuzi-ziyu/alphasea-agent | a8ff803fd7dedd50c757630aa83b79fb624c0414 | [
"CC0-1.0"
] | null | null | null | from unittest import TestCase
from ..helpers import (
create_web3,
create_contract,
get_future_execution_start_at_timestamp,
proceed_time,
get_prediction_time_shift,
get_purchase_time_shift,
get_shipping_time_shift,
get_publication_time_shift,
get_tournament_id,
get_chain_id,
... | 31.904 | 84 | 0.654965 | 3,412 | 0.855567 | 0 | 0 | 0 | 0 | 0 | 0 | 136 | 0.034102 |
c4a4559c8dad0a9248c5e83d6827ea4d86bb7ecb | 579 | py | Python | tests/test_add_option_backtrace.py | ponponon/loguru | d38ced7539b888e9e9db7495f49f4499b3ee77e1 | [
"MIT"
] | 11,391 | 2018-12-08T17:44:13.000Z | 2022-03-31T17:55:24.000Z | tests/test_add_option_backtrace.py | ponponon/loguru | d38ced7539b888e9e9db7495f49f4499b3ee77e1 | [
"MIT"
] | 610 | 2018-12-08T18:03:03.000Z | 2022-03-31T22:28:14.000Z | tests/test_add_option_backtrace.py | ponponon/loguru | d38ced7539b888e9e9db7495f49f4499b3ee77e1 | [
"MIT"
] | 601 | 2018-12-08T17:46:42.000Z | 2022-03-30T04:23:56.000Z | from loguru import logger
# See "test_catch_exceptions.py" for extended testing
def test_backtrace(writer):
logger.add(writer, format="{message}", backtrace=True)
try:
1 / 0
except Exception:
logger.exception("")
result_with = writer.read().strip()
logger.remove()
writer.clea... | 23.16 | 75 | 0.651123 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 79 | 0.136442 |
c4a4edff90f57692413fd77c390b6d607d322a51 | 251 | py | Python | BasicPythonPrograms/PythonDestructor.py | Pushkar745/PythonProgramming | ea60e97b70d46fb63ef203913c8b3f9570232dd3 | [
"Apache-2.0"
] | null | null | null | BasicPythonPrograms/PythonDestructor.py | Pushkar745/PythonProgramming | ea60e97b70d46fb63ef203913c8b3f9570232dd3 | [
"Apache-2.0"
] | null | null | null | BasicPythonPrograms/PythonDestructor.py | Pushkar745/PythonProgramming | ea60e97b70d46fb63ef203913c8b3f9570232dd3 | [
"Apache-2.0"
] | null | null | null | class Employee:
#Initializaing
def __init__(self):
print('Employee created ')
#Deleting (Calling destructor)
def __del__(self):
print('Destructor called,Employee deleted')
obj=Employee()
del obj | 25.1 | 55 | 0.609562 | 216 | 0.860558 | 0 | 0 | 0 | 0 | 0 | 0 | 99 | 0.394422 |
c4a64cd498868ef1b6019445d7127a1f346b9fe4 | 13,670 | py | Python | envi/registers.py | ConfusedMoonbear/vivisect | 8d6048037f85f745cd11923c6a8d662c150fe330 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-12-11T19:13:59.000Z | 2019-12-11T19:13:59.000Z | envi/registers.py | ConfusedMoonbear/vivisect | 8d6048037f85f745cd11923c6a8d662c150fe330 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | envi/registers.py | ConfusedMoonbear/vivisect | 8d6048037f85f745cd11923c6a8d662c150fe330 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | """
Similar to the memory subsystem, this is a unified way to
access information about objects which contain registers
"""
import envi.bits as e_bits
from envi.const import *
class InvalidRegisterName(Exception):
pass
class RegisterContext:
def __init__(self, regdef=(), metas=(), pcindex=None, spindex=None,... | 31.643519 | 88 | 0.59744 | 12,466 | 0.911924 | 0 | 0 | 0 | 0 | 0 | 0 | 5,689 | 0.416167 |
c4a6ac024777e5d5757393235c2f8a34ef55a681 | 531 | py | Python | services/nris-api/backend/app/extensions.py | parc-jason/mds | 8f181a429442208a061ed72065b71e6c2bd0f76f | [
"Apache-2.0"
] | null | null | null | services/nris-api/backend/app/extensions.py | parc-jason/mds | 8f181a429442208a061ed72065b71e6c2bd0f76f | [
"Apache-2.0"
] | null | null | null | services/nris-api/backend/app/extensions.py | parc-jason/mds | 8f181a429442208a061ed72065b71e6c2bd0f76f | [
"Apache-2.0"
] | null | null | null |
from flask_caching import Cache
from flask_jwt_oidc import JwtManager
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate, MigrateCommand
from flask import current_app
from elasticapm.contrib.flask import ElasticAPM
from .config import Config
from .helper import Api
apm = ElasticAPM()
db = SQLA... | 23.086957 | 49 | 0.770245 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 78 | 0.146893 |
c4a933bda29b080bd1aab7e22c3ee0df61cffb17 | 3,510 | py | Python | tests/test_mqtt_async.py | mpi-sws-rse/antevents-python | 5b9226813583141986014fc83f6f74342a5f271e | [
"Apache-2.0"
] | 7 | 2016-09-27T00:21:46.000Z | 2017-03-18T20:04:29.000Z | tests/test_mqtt_async.py | mpi-sws-rse/antevents-python | 5b9226813583141986014fc83f6f74342a5f271e | [
"Apache-2.0"
] | null | null | null | tests/test_mqtt_async.py | mpi-sws-rse/antevents-python | 5b9226813583141986014fc83f6f74342a5f271e | [
"Apache-2.0"
] | 2 | 2017-03-16T21:47:43.000Z | 2020-10-20T22:58:03.000Z | # Copyright 2017 by MPI-SWS and Data-Ken Research.
# Licensed under the Apache 2.0 License.
"""Test async version of mqtt libraries. Depends on hbmqtt
(https://github.com/beerfactory/hbmqtt)
"""
import unittest
import sys
import asyncio
import string
from random import choice, seed
from antevents.base import Schedule... | 30 | 88 | 0.665242 | 2,116 | 0.602849 | 0 | 0 | 2,263 | 0.644729 | 0 | 0 | 648 | 0.184615 |
c4ac27bb61de371ddbaa59cbf8dcb19f1eb8972f | 7,407 | py | Python | edit/main.py | team-alpha-kr/Partner-pyWeb | da88f10b4c511616219a701a794fa0a5ef33f01b | [
"Apache-2.0"
] | null | null | null | edit/main.py | team-alpha-kr/Partner-pyWeb | da88f10b4c511616219a701a794fa0a5ef33f01b | [
"Apache-2.0"
] | null | null | null | edit/main.py | team-alpha-kr/Partner-pyWeb | da88f10b4c511616219a701a794fa0a5ef33f01b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf8 -*-
import os
from flask import Flask, request, render_template, request, redirect, url_for, jsonify
from flask_discord import DiscordOAuth2Session, requires_authorization
from discord import Webhook, RequestsWebhookAdapter
webhook = Webhook.partial(814742019489660939, "rvSBVHtGPflSASjeGEEKdZxC5Z_w1U... | 37.984615 | 212 | 0.699743 | 0 | 0 | 0 | 0 | 7,281 | 0.822247 | 0 | 0 | 4,670 | 0.527386 |
c4ad485be7bdd5e1ac650e5ab444023836dc2e62 | 257 | py | Python | protocols/tpkt.py | dparnishchev/s7scan | 87a7aeeb3c932491745dfded2577d221083f87df | [
"Unlicense"
] | 98 | 2018-10-12T10:36:55.000Z | 2022-03-31T15:55:46.000Z | protocols/tpkt.py | FOGSEC/s7scan | d7f9c3bbd6a97a7f83991ea865be95b0e9280346 | [
"Unlicense"
] | null | null | null | protocols/tpkt.py | FOGSEC/s7scan | d7f9c3bbd6a97a7f83991ea865be95b0e9280346 | [
"Unlicense"
] | 35 | 2018-10-12T17:08:25.000Z | 2022-03-28T20:12:27.000Z | from scapy.fields import ByteField, ShortField
from scapy.packet import Packet
class TPKT(Packet):
name = "TPKT"
fields_desc = [ByteField("version", 3),
ByteField("reserved", 0),
ShortField("length", 0x0000)]
| 25.7 | 48 | 0.614786 | 175 | 0.680934 | 0 | 0 | 0 | 0 | 0 | 0 | 33 | 0.128405 |