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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
acfaeea7c17fda917883aa9604c9e563bac4ba0f | 773 | py | Python | protonpack/worker/cli.py | WildflowerSchools/redis-proton-pack | 886e3d79abb98744776c9189764cd4252fe06d78 | [
"MIT"
] | 1 | 2019-01-22T10:31:17.000Z | 2019-01-22T10:31:17.000Z | protonpack/worker/cli.py | WildflowerSchools/redis-proton-pack | 886e3d79abb98744776c9189764cd4252fe06d78 | [
"MIT"
] | null | null | null | protonpack/worker/cli.py | WildflowerSchools/redis-proton-pack | 886e3d79abb98744776c9189764cd4252fe06d78 | [
"MIT"
] | 1 | 2019-01-08T15:17:30.000Z | 2019-01-08T15:17:30.000Z | import time
import click
from spylogger import get_logger
from protonpack.worker import GhostBuster
logger = get_logger()
@click.group()
@click.pass_context
def worker(ctx):
pass
@worker.command('startup')
@click.option('-s', '--stream', required=True, help="stream name")
@click.option('-c', '--consumer', r... | 22.735294 | 76 | 0.668823 |
acfaeeb0bed04c1b55c688123f8a7c58d84a6944 | 1,271 | py | Python | test/test_portfolio_coverage_tvp.py | CarbonEdge2021/SBTi-finance-tool | a5dbf1c200a9e80913c34251a918363a054dcb61 | [
"MIT"
] | 26 | 2020-07-24T14:49:24.000Z | 2021-10-13T10:04:52.000Z | test/test_portfolio_coverage_tvp.py | CarbonEdge2021/SBTi-finance-tool | a5dbf1c200a9e80913c34251a918363a054dcb61 | [
"MIT"
] | 128 | 2020-07-27T08:48:27.000Z | 2021-09-25T11:35:22.000Z | test/test_portfolio_coverage_tvp.py | CarbonEdge2021/SBTi-finance-tool | a5dbf1c200a9e80913c34251a918363a054dcb61 | [
"MIT"
] | 15 | 2020-07-31T14:47:07.000Z | 2021-07-26T19:33:07.000Z | import os
import unittest
import pandas as pd
from SBTi.portfolio_aggregation import PortfolioAggregationMethod
from SBTi.portfolio_coverage_tvp import PortfolioCoverageTVP
class TestPortfolioCoverageTVP(unittest.TestCase):
"""
Test the TVP portfolio coverage (checking which companies have a valid SBTi appr... | 27.042553 | 96 | 0.63572 |
acfaeec2eaeee9b918739d6e2b545b0b9d866791 | 5,765 | py | Python | qa/rpc-tests/rpcbind_test.py | GreenCoinX/greencoin | 318995aa6b13a246e780fed3cb30917e36525da2 | [
"MIT"
] | null | null | null | qa/rpc-tests/rpcbind_test.py | GreenCoinX/greencoin | 318995aa6b13a246e780fed3cb30917e36525da2 | [
"MIT"
] | null | null | null | qa/rpc-tests/rpcbind_test.py | GreenCoinX/greencoin | 318995aa6b13a246e780fed3cb30917e36525da2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# Copyright (c) 2014 The GreenCoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Test for -rpcbind, as well as -rpcallowip and -rpcconnect
# Add python-greencoinrpc to module search path... | 37.193548 | 110 | 0.647702 |
acfaef8daaa06a551e3f8da27b91895695f04c13 | 20,714 | py | Python | main.py | CeroProgramming/VillageTool | cb6119d33fc3275f500c5492c92be67a577dc8b4 | [
"MIT"
] | null | null | null | main.py | CeroProgramming/VillageTool | cb6119d33fc3275f500c5492c92be67a577dc8b4 | [
"MIT"
] | null | null | null | main.py | CeroProgramming/VillageTool | cb6119d33fc3275f500c5492c92be67a577dc8b4 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
'''Module for a minecraft villager app in python3'''
#pylint: disable=E0611,W0611,W0201,W0640,C0301,C0200,W0613,R0201
from time import sleep
from functools import partial
from kivy.base import runTouchApp
from kivy.lang import Builder
from kivy.app import App
from kivy.config import Config
from ki... | 45.030435 | 369 | 0.656899 |
acfaef957760d8b6bdf33aecb9288d1533fb6dde | 6,861 | py | Python | postProcess.py | nikotatomir/UnsteadyDiscreteLumpedVortexMethodSolver | 368b45384eff6321718c9be199c4e9943e5a6e26 | [
"MIT"
] | 1 | 2022-02-20T21:18:51.000Z | 2022-02-20T21:18:51.000Z | postProcess.py | nikotatomir/unsteadyDiscreteLumpedVortexMethodSolver | 368b45384eff6321718c9be199c4e9943e5a6e26 | [
"MIT"
] | null | null | null | postProcess.py | nikotatomir/unsteadyDiscreteLumpedVortexMethodSolver | 368b45384eff6321718c9be199c4e9943e5a6e26 | [
"MIT"
] | null | null | null | import math
import numpy as np
import scipy.special
import matplotlib.pyplot as plt
import matplotlib.animation as animation
from parameters import *
def gridlines():
plt.minorticks_on()
plt.grid(zorder = 0, which='major', axis='x', linewidth=0.75, linestyle='-', color='0.75')
plt.grid(zorder = 0, which='... | 45.138158 | 158 | 0.658796 |
acfaf09346508e420aa336fbbab2a32edbf768ff | 15,126 | py | Python | nets/resnet_imagenet.py | wangjunxiao/unlearning | d34fdceb1a37ee6beb08747f45b5c0f3be1c5970 | [
"MIT"
] | null | null | null | nets/resnet_imagenet.py | wangjunxiao/unlearning | d34fdceb1a37ee6beb08747f45b5c0f3be1c5970 | [
"MIT"
] | null | null | null | nets/resnet_imagenet.py | wangjunxiao/unlearning | d34fdceb1a37ee6beb08747f45b5c0f3be1c5970 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
from collections import OrderedDict
from nets.base_models import MyNetwork
def conv3x3(in_planes, out_planes, stride=1, groups=1, padding=1):
return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=padding, bias=False)
def conv1x1(in_planes, out_planes, st... | 48.951456 | 211 | 0.517784 |
acfaf0bb97239c2e603b06a7641ad8722fe144ef | 260 | py | Python | tests/artificial/transf_Logit/trend_PolyTrend/cycle_0/ar_12/test_artificial_128_Logit_PolyTrend_0_12_0.py | shaido987/pyaf | b9afd089557bed6b90b246d3712c481ae26a1957 | [
"BSD-3-Clause"
] | 377 | 2016-10-13T20:52:44.000Z | 2022-03-29T18:04:14.000Z | tests/artificial/transf_Logit/trend_PolyTrend/cycle_0/ar_12/test_artificial_128_Logit_PolyTrend_0_12_0.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 160 | 2016-10-13T16:11:53.000Z | 2022-03-28T04:21:34.000Z | tests/artificial/transf_Logit/trend_PolyTrend/cycle_0/ar_12/test_artificial_128_Logit_PolyTrend_0_12_0.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 63 | 2017-03-09T14:51:18.000Z | 2022-03-27T20:52:57.000Z | import pyaf.Bench.TS_datasets as tsds
import tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "PolyTrend", cycle_length = 0, transform = "Logit", sigma = 0.0, exog_count = 0, ar_order = 12); | 37.142857 | 160 | 0.726923 |
acfaf1803b2d88eb25a16ac3105ec97eebac2450 | 6,354 | py | Python | 4p-sequence-align.py | wezil/algorithmic-thinking | 002957de1cf7b63c941cfafc08db807f2a1aedec | [
"MIT"
] | null | null | null | 4p-sequence-align.py | wezil/algorithmic-thinking | 002957de1cf7b63c941cfafc08db807f2a1aedec | [
"MIT"
] | null | null | null | 4p-sequence-align.py | wezil/algorithmic-thinking | 002957de1cf7b63c941cfafc08db807f2a1aedec | [
"MIT"
] | null | null | null | """
Algorithmic Thinking Part 2
Project 4: Computing alignment of Sequences
Author: Weikang Sun
Date: 11/2/15
CodeSkulptor source:
http://www.codeskulptor.org/#user40_tbt1hSyQm6_25.py
"""
def build_scoring_matrix(alphabet, diag_score, off_diag_score, dash_score):
"""
Function to build a scoring matrix given ... | 34.16129 | 88 | 0.538558 |
acfaf22cc18cd01fa601fa3c910fa38410f91f31 | 6,961 | py | Python | fld_proj_ensmean.py | oet808/PDO | a1af01787f027ba953685fec0ffd9988d551d249 | [
"MIT"
] | null | null | null | fld_proj_ensmean.py | oet808/PDO | a1af01787f027ba953685fec0ffd9988d551d249 | [
"MIT"
] | null | null | null | fld_proj_ensmean.py | oet808/PDO | a1af01787f027ba953685fec0ffd9988d551d249 | [
"MIT"
] | null | null | null | #!/usr/bin/python
###############################################################################
# calculate projection index for a time-varying field
# using eofs (or any other pattern) as vectors for the projection
# This script works with the PCA results of the North Pacific domain.
# This script uses the ensemble ... | 38.038251 | 112 | 0.557248 |
acfaf356c6d84d9e0eb55a014be5ea530c3e9b6c | 859 | py | Python | .github/update_docs.py | apjanco/projects | 2f8850140ba13ab18b9cf622e46e79013d41701f | [
"MIT"
] | 823 | 2019-11-22T17:08:39.000Z | 2022-03-31T03:03:23.000Z | .github/update_docs.py | apjanco/projects | 2f8850140ba13ab18b9cf622e46e79013d41701f | [
"MIT"
] | 46 | 2019-11-25T15:14:05.000Z | 2022-03-31T12:59:45.000Z | .github/update_docs.py | apjanco/projects | 2f8850140ba13ab18b9cf622e46e79013d41701f | [
"MIT"
] | 326 | 2019-11-24T01:31:27.000Z | 2022-03-27T19:48:04.000Z | from pathlib import Path
from spacy.cli.project.document import project_document
from spacy.cli._util import PROJECT_FILE
from wasabi import msg
import typer
def main(root: Path = typer.Argument(Path.cwd(), help="Root path to look in")):
"""
Automatically update all auto-generated docs in the repo. If existin... | 34.36 | 79 | 0.718277 |
acfaf6ca653c2e7ebde9b7ed7fa185eadfeaadfb | 696 | py | Python | rapid7_attackerkb/icon_rapid7_attackerkb/connection/connection.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | null | null | null | rapid7_attackerkb/icon_rapid7_attackerkb/connection/connection.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | 1 | 2021-02-23T23:57:37.000Z | 2021-02-23T23:57:37.000Z | rapid7_attackerkb/icon_rapid7_attackerkb/connection/connection.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | null | null | null | import komand
from .schema import ConnectionSchema, Input
# Custom imports below
from icon_rapid7_attackerkb.util.api import AttackerKB
class Connection(komand.Connection):
def __init__(self):
super(self.__class__, self).__init__(input=ConnectionSchema())
self.attackerKB_api = None
def conn... | 31.636364 | 88 | 0.642241 |
acfaf6d335a8593cd1597798e46c7506a9c9cd3f | 1,089 | py | Python | count_inversions.py | skebix/algorithms | c4f5d9a3e4088341817838fbf7ae0c03c32cea8a | [
"MIT"
] | null | null | null | count_inversions.py | skebix/algorithms | c4f5d9a3e4088341817838fbf7ae0c03c32cea8a | [
"MIT"
] | null | null | null | count_inversions.py | skebix/algorithms | c4f5d9a3e4088341817838fbf7ae0c03c32cea8a | [
"MIT"
] | null | null | null | import time
def count_inversions(a):
"""
Count left and right inversions recursively, piggybacking on merge sort
"""
n = len(a)
if n == 0 or n == 1:
return a, 0
middle = n // 2
left, x = count_inversions(a[:middle])
right, y = count_inversions(a[middle:])
ordered, z = spli... | 20.942308 | 75 | 0.560147 |
acfafa7fb29baea77d152acbaab758c8abf25eb3 | 3,943 | py | Python | venv/lib/python3.8/site-packages/azureml/_restclient/operations/arm_template_operations.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/azureml/_restclient/operations/arm_template_operations.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/azureml/_restclient/operations/arm_template_operations.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.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 2.3.3... | 42.397849 | 132 | 0.654071 |
acfafac3dbdf558a8fc00a941424d10155f94959 | 3,678 | py | Python | scrapers/scraper_primorskiVal.py | do5562/SLEDIMedO | 1abba7e5454b251244213abe3cd8cdadd1c94475 | [
"MIT"
] | null | null | null | scrapers/scraper_primorskiVal.py | do5562/SLEDIMedO | 1abba7e5454b251244213abe3cd8cdadd1c94475 | [
"MIT"
] | null | null | null | scrapers/scraper_primorskiVal.py | do5562/SLEDIMedO | 1abba7e5454b251244213abe3cd8cdadd1c94475 | [
"MIT"
] | null | null | null | import requests
from bs4 import BeautifulSoup as bs
import hashlib
from database.dbExecutor import dbExecutor
import datetime
base_url = 'http://www.primorskival.si/'
full_url = 'http://www.primorskival.si/snovice.php?page=' #dodaj se stevilo strani - prva stran je 1
headers = {'user-agent': 'Mozilla/5.0 (Macintosh; ... | 29.902439 | 149 | 0.605492 |
acfafbab92def6d7214a01300e2300acda976272 | 3,925 | py | Python | src/backend/data/budget.py | akmadian/openfinance | 450b39023072e2eba0a70cd14d0abe7141e8a5a6 | [
"MIT"
] | 1 | 2022-03-11T02:36:55.000Z | 2022-03-11T02:36:55.000Z | src/backend/data/budget.py | akmadian/openfinance | 450b39023072e2eba0a70cd14d0abe7141e8a5a6 | [
"MIT"
] | null | null | null | src/backend/data/budget.py | akmadian/openfinance | 450b39023072e2eba0a70cd14d0abe7141e8a5a6 | [
"MIT"
] | null | null | null | from datetime import date, timedelta, datetime
from .dbmanager import TransactionsDB
"""
category
monthly amount
time period
category
transactions: [ids]
total to date
limit amount for month
"""
TIME_START = date.fromisoformat('2020-08-12')
WEEK_DELTA = timedelta(weeks=1)
MASTER_BUDGE... | 32.708333 | 78 | 0.597707 |
acfafc54128ab95a46b801e40508790c4bba1326 | 726 | py | Python | python/draw_rectangles_on_faces.py | symisc/pixlab | bf1d46a67f8e738b059fee4fc65d579f091ef0a9 | [
"BSD-2-Clause"
] | 96 | 2017-03-17T21:53:36.000Z | 2022-03-17T19:56:06.000Z | python/draw_rectangles_on_faces.py | symisc/pixlab | bf1d46a67f8e738b059fee4fc65d579f091ef0a9 | [
"BSD-2-Clause"
] | 6 | 2017-06-03T02:41:00.000Z | 2021-08-19T22:44:27.000Z | python/draw_rectangles_on_faces.py | symisc/pixlab | bf1d46a67f8e738b059fee4fc65d579f091ef0a9 | [
"BSD-2-Clause"
] | 33 | 2017-07-12T08:22:53.000Z | 2021-05-24T09:19:18.000Z | # Mark Jeremy's face by drawing a rectangle on it. The rectangle coordinates was obtained from the facedetect command and passed untouched to this command.
# Refer to the command page https://pixlab.io/#/cmd?id=drawrectangles for more info.
import requests
import json
req = requests.post('https://api.pixlab.io/drawr... | 29.04 | 156 | 0.690083 |
acfafc6614a76e9c4ecd8d388d0ed2b17e59447f | 42,298 | py | Python | src/python/xrt_binding.py | venkatp36/XRT | 3d059992446fdfbc35f2e6b6882f79c212873fb1 | [
"Apache-2.0"
] | 1 | 2019-08-06T00:14:50.000Z | 2019-08-06T00:14:50.000Z | src/python/xrt_binding.py | venkatp36/XRT | 3d059992446fdfbc35f2e6b6882f79c212873fb1 | [
"Apache-2.0"
] | 20 | 2018-10-03T23:01:00.000Z | 2019-05-10T22:57:57.000Z | src/python/xrt_binding.py | venkatp36/XRT | 3d059992446fdfbc35f2e6b6882f79c212873fb1 | [
"Apache-2.0"
] | 1 | 2020-03-28T05:50:59.000Z | 2020-03-28T05:50:59.000Z | """
Copyright (C) 2018 Xilinx, Inc
Author(s): Ryan Radjabi
Shivangi Agarwal
Sonal Santan
ctypes based Python binding for XRT
Licensed under the Apache License, Version 2.0 (the "License"). You may
not use this file except in compliance with the License. A copy of the
License is located at... | 36.338488 | 164 | 0.710199 |
acfafdbcae1f0d84d044d65d53fe7e2956fecb07 | 7,064 | py | Python | tests/providers/amazon/aws/sensors/test_emr_job_flow.py | harishmk/airflow | 5abce471e0690c6b8d06ca25685b0845c5fd270f | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 2 | 2019-01-14T16:39:27.000Z | 2019-01-24T21:53:13.000Z | tests/providers/amazon/aws/sensors/test_emr_job_flow.py | harishmk/airflow | 5abce471e0690c6b8d06ca25685b0845c5fd270f | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 3 | 2018-10-05T18:00:01.000Z | 2019-03-27T22:17:44.000Z | tests/providers/amazon/aws/sensors/test_emr_job_flow.py | harishmk/airflow | 5abce471e0690c6b8d06ca25685b0845c5fd270f | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 2 | 2018-09-26T19:37:33.000Z | 2019-03-01T21:28:04.000Z | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | 35.676768 | 103 | 0.604473 |
acfafde9e0f74d4e3ad6f2ee8ada9da3df94f5b9 | 21,057 | py | Python | tensorflow/python/kernel_tests/map_stage_op_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/python/kernel_tests/map_stage_op_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/kernel_tests/map_stage_op_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 35.811224 | 80 | 0.582894 |
acfafe1ebf5cf6ccdcc4180d1c0f43e6397e992e | 7,361 | py | Python | warehouse/accounts/interfaces.py | Dithn/warehouse | 953b77ecfc7dade203db423307539ea9d6115657 | [
"Apache-2.0"
] | 4 | 2018-03-29T10:42:56.000Z | 2021-11-17T10:21:43.000Z | warehouse/accounts/interfaces.py | Dithn/warehouse | 953b77ecfc7dade203db423307539ea9d6115657 | [
"Apache-2.0"
] | 258 | 2021-11-29T18:29:38.000Z | 2022-03-31T18:34:18.000Z | warehouse/accounts/interfaces.py | Dithn/warehouse | 953b77ecfc7dade203db423307539ea9d6115657 | [
"Apache-2.0"
] | 1 | 2020-12-01T21:12:24.000Z | 2020-12-01T21:12:24.000Z | # 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 the Li... | 29.326693 | 88 | 0.647738 |
acfaff802f5063625ab3f7b72c4617534d3627d5 | 29,376 | py | Python | sample_project/env/lib/python3.9/_collections_abc.py | Istiakmorsalin/ML-Data-Science | 681e68059b146343ef55b0671432dc946970730d | [
"MIT"
] | 6,989 | 2017-07-18T06:23:18.000Z | 2022-03-31T15:58:36.000Z | sample_project/env/lib/python3.9/_collections_abc.py | Istiakmorsalin/ML-Data-Science | 681e68059b146343ef55b0671432dc946970730d | [
"MIT"
] | 1,978 | 2017-07-18T09:17:58.000Z | 2022-03-31T14:28:43.000Z | sample_project/env/lib/python3.9/_collections_abc.py | Istiakmorsalin/ML-Data-Science | 681e68059b146343ef55b0671432dc946970730d | [
"MIT"
] | 1,228 | 2017-07-18T09:03:13.000Z | 2022-03-29T05:57:40.000Z | # Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Abstract Base Classes (ABCs) for collections, according to PEP 3119.
Unit tests are in test_collections.
"""
from abc import ABCMeta, abstractmethod
import sys
GenericAlias = type(list[int])
EllipsisType = type(..... | 26.299015 | 87 | 0.596507 |
acfaff9eee1830963dd44197af7f57f751e33e26 | 2,007 | py | Python | mlmodels/model_tf/misc/tf_serving/13.text-classification-kafka/producer.py | gitter-badger/mlmodels | f08cc9b6ec202d4ad25ecdda2f44487da387569d | [
"MIT"
] | 1 | 2022-03-11T07:57:48.000Z | 2022-03-11T07:57:48.000Z | mlmodels/model_tf/misc/tf_serving/13.text-classification-kafka/producer.py | whitetiger1002/mlmodels | f70f1da7434e8855eed50adc67b49cc169f2ea24 | [
"MIT"
] | null | null | null | mlmodels/model_tf/misc/tf_serving/13.text-classification-kafka/producer.py | whitetiger1002/mlmodels | f70f1da7434e8855eed50adc67b49cc169f2ea24 | [
"MIT"
] | null | null | null | import json
import numpy as np
import tensorflow as tf
from kafka import KafkaProducer
def publish_message(producer_instance, topic_name, key, value):
try:
key_bytes = bytes(key, encoding="utf-8")
value_bytes = bytes(value, encoding="utf-8")
producer_instance.send(topic_name, key=key_byt... | 28.267606 | 92 | 0.674141 |
acfb00609aef908e6fcd3b93828a6d2d4f1a5ec7 | 50,726 | py | Python | sensor.py | Jahismighty/maltrail | 9bc70430993b2140ceb4dbac4b487251a9254416 | [
"MIT"
] | null | null | null | sensor.py | Jahismighty/maltrail | 9bc70430993b2140ceb4dbac4b487251a9254416 | [
"MIT"
] | null | null | null | sensor.py | Jahismighty/maltrail | 9bc70430993b2140ceb4dbac4b487251a9254416 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Copyright (c) 2014-2018 Miroslav Stampar (@stamparm)
See the file 'LICENSE' for copying permission
"""
from __future__ import print_function # Requires: Python >= 2.6
import sys
sys.dont_write_bytecode = True
import core.versioncheck
import inspect
import math
import mmap
import optpars... | 48.541627 | 306 | 0.500591 |
acfb00e8c7bf798b311ffa9e0534cf2307c75e43 | 436 | py | Python | configs/_base_/det_datasets/comics_speech_bubble_dataset.py | gsoykan/mmocr | e8ca58fc2faa1cf1d798dc440c39615ebc908558 | [
"Apache-2.0"
] | 1 | 2022-02-21T18:38:57.000Z | 2022-02-21T18:38:57.000Z | configs/_base_/det_datasets/comics_speech_bubble_dataset.py | gsoykan/mmocr | e8ca58fc2faa1cf1d798dc440c39615ebc908558 | [
"Apache-2.0"
] | null | null | null | configs/_base_/det_datasets/comics_speech_bubble_dataset.py | gsoykan/mmocr | e8ca58fc2faa1cf1d798dc440c39615ebc908558 | [
"Apache-2.0"
] | null | null | null | root = 'tests/data/comics_speech_bubble_dataset'
# dataset with type='IcdarDataset'
train = dict(
type='IcdarDataset',
ann_file=f'{root}/train/instances_train.json',
img_prefix=f'{root}/train/imgs',
pipeline=None)
test = dict(
type='IcdarDataset',
ann_file=f'{root}/test/instances_test.json',
... | 21.8 | 50 | 0.690367 |
acfb03705c27649ad1f5865c957917038f62a92e | 2,872 | py | Python | setup.py | C0DK/lightbus | be5cc2771b1058f7c927cca870ed75d4cbbe61a3 | [
"Apache-2.0"
] | null | null | null | setup.py | C0DK/lightbus | be5cc2771b1058f7c927cca870ed75d4cbbe61a3 | [
"Apache-2.0"
] | null | null | null | setup.py | C0DK/lightbus | be5cc2771b1058f7c927cca870ed75d4cbbe61a3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# DO NOT EDIT THIS FILE!
# This file has been autogenerated by dephell <3
# https://github.com/dephell/dephell
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import os.path
readme = ""
here = os.path.abspath(os.path.dirname(__file__))
readme_p... | 31.56044 | 81 | 0.607591 |
acfb038f5692fd27791af21767cb5171a2b850df | 10,025 | py | Python | docs/conf.py | rethore/waketor | 81a6688f27b5c718b98cf61e264ba9f127345ca6 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | rethore/waketor | 81a6688f27b5c718b98cf61e264ba9f127345ca6 | [
"Apache-2.0"
] | 3 | 2015-12-10T08:35:19.000Z | 2015-12-10T08:37:36.000Z | docs/conf.py | rethore/waketor | 81a6688f27b5c718b98cf61e264ba9f127345ca6 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# waketor documentation build configuration file, created by
# sphinx-quickstart on Tue Dec 8 11:57:58 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# A... | 32.33871 | 82 | 0.718005 |
acfb045eb558c6280a18793b672ff8c35665a0c1 | 10,127 | py | Python | tests/test_style/test_palettes.py | TobiasHerr/yellowbrick-fork | 09c8aeafe1b9e9524167bee25380c40aed2ccd4b | [
"Apache-2.0"
] | null | null | null | tests/test_style/test_palettes.py | TobiasHerr/yellowbrick-fork | 09c8aeafe1b9e9524167bee25380c40aed2ccd4b | [
"Apache-2.0"
] | null | null | null | tests/test_style/test_palettes.py | TobiasHerr/yellowbrick-fork | 09c8aeafe1b9e9524167bee25380c40aed2ccd4b | [
"Apache-2.0"
] | null | null | null | # tests.test_style.test_palettes
# Tests the palettes module of the yellowbrick library.
#
# Author: Benjamin Bengfort <bbengfort@districtdatalabs.com>
# Created: Tue Oct 04 16:21:58 2016 -0400
#
# Copyright (C) 2016 District Data Labs
# For license information, see LICENSE.txt
#
# ID: test_palettes.py [] benjamin@b... | 31.746082 | 94 | 0.604424 |
acfb05094c9ec4199f5835e8615a27d3712e1771 | 867 | py | Python | src/python/analyse.py | paulpatault/ChessApp | 45809de7d6a4b016e569f30258976778275203d9 | [
"MIT"
] | null | null | null | src/python/analyse.py | paulpatault/ChessApp | 45809de7d6a4b016e569f30258976778275203d9 | [
"MIT"
] | null | null | null | src/python/analyse.py | paulpatault/ChessApp | 45809de7d6a4b016e569f30258976778275203d9 | [
"MIT"
] | null | null | null | from tensorflow_chessbot import getFEN
import argparse
import sys
if __name__ == "__main__":
parser = argparse.ArgumentParser(
description="Predict a chessboard FEN from supplied local image link or URL"
)
parser.add_argument(
"--url",
default="http://imgur.com/u4zF5Hj.png",
... | 27.967742 | 84 | 0.642445 |
acfb061930111305dac2845a747c7293d9a7af4c | 6,661 | py | Python | embyapi/models/public_system_info.py | stanionascu/python-embyapi | a3f7aa49aea4052277cc43605c0d89bc6ff21913 | [
"BSD-3-Clause"
] | null | null | null | embyapi/models/public_system_info.py | stanionascu/python-embyapi | a3f7aa49aea4052277cc43605c0d89bc6ff21913 | [
"BSD-3-Clause"
] | null | null | null | embyapi/models/public_system_info.py | stanionascu/python-embyapi | a3f7aa49aea4052277cc43605c0d89bc6ff21913 | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
"""
Emby Server API
Explore the Emby Server API # noqa: E501
OpenAPI spec version: 4.1.1.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class PublicSystemInfo(object):
"""NOTE: This class is auto gen... | 27.639004 | 139 | 0.585798 |
acfb07267673e31d61d1cc694f2fe29364429e42 | 1,178 | py | Python | src/server_common/mpwp_data_sender.py | Devin0xFFFFFF/multiplayer-web-pong | 58f4663d160770747c31bc8d42c028ced9df5684 | [
"MIT"
] | null | null | null | src/server_common/mpwp_data_sender.py | Devin0xFFFFFF/multiplayer-web-pong | 58f4663d160770747c31bc8d42c028ced9df5684 | [
"MIT"
] | null | null | null | src/server_common/mpwp_data_sender.py | Devin0xFFFFFF/multiplayer-web-pong | 58f4663d160770747c31bc8d42c028ced9df5684 | [
"MIT"
] | null | null | null | import zmq
import json
from server_common import mpwp_protocol, config
class MPWPDataSender(object):
ID = None
MSGNUM = 0
context = None
log_sock = None
log_level = 0
LOGNUM = 0
def __init__(self, log_level=1):
self.context = zmq.Context()
self.log_level = log_level
... | 28.047619 | 109 | 0.60781 |
acfb07a1d93ac76a99b05a9b06136ead88141e28 | 2,454 | py | Python | wordmemory.py | AlEscher/HumanBenchmarkBot | 7f09720d62b6816160f9f3c9a5e4cafb1722dfe9 | [
"MIT"
] | 1 | 2019-12-29T14:56:38.000Z | 2019-12-29T14:56:38.000Z | wordmemory.py | AlEscher/HumanBenchmarkBot | 7f09720d62b6816160f9f3c9a5e4cafb1722dfe9 | [
"MIT"
] | null | null | null | wordmemory.py | AlEscher/HumanBenchmarkBot | 7f09720d62b6816160f9f3c9a5e4cafb1722dfe9 | [
"MIT"
] | 1 | 2021-05-06T11:32:55.000Z | 2021-05-06T11:32:55.000Z | from PIL import ImageGrab
from pynput.mouse import Button, Controller
import time
from win32api import GetSystemMetrics
import pytesseract
import sys
mouse = Controller()
screenWidth = GetSystemMetrics(0)
screenHeight = GetSystemMetrics(1)
# path to tesseract's executable, this is should be the standard path... | 31.87013 | 97 | 0.627954 |
acfb086457b95a4e3f00873c16a7ce277dc1d485 | 1,596 | py | Python | rosidl_adapter/rosidl_adapter/srv/__init__.py | DongheeYe/rosidl | 36fac1e367bd98a493a7a0935b2c7b5ae86f5e7d | [
"Apache-2.0"
] | 1 | 2019-09-17T05:31:47.000Z | 2019-09-17T05:31:47.000Z | rosidl_adapter/rosidl_adapter/srv/__init__.py | DongheeYe/rosidl | 36fac1e367bd98a493a7a0935b2c7b5ae86f5e7d | [
"Apache-2.0"
] | null | null | null | rosidl_adapter/rosidl_adapter/srv/__init__.py | DongheeYe/rosidl | 36fac1e367bd98a493a7a0935b2c7b5ae86f5e7d | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Open Source Robotics Foundation, 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... | 38.926829 | 75 | 0.744987 |
acfb09463dbf35d7cf0dbfa05fc380208022353f | 4,299 | py | Python | dephell/config/scheme.py | OliverHofkens/dephell | 6303f416018910668f1635b70cd828a2fd2b2d9e | [
"MIT"
] | 1 | 2020-04-08T01:06:51.000Z | 2020-04-08T01:06:51.000Z | dephell/config/scheme.py | OliverHofkens/dephell | 6303f416018910668f1635b70cd828a2fd2b2d9e | [
"MIT"
] | null | null | null | dephell/config/scheme.py | OliverHofkens/dephell | 6303f416018910668f1635b70cd828a2fd2b2d9e | [
"MIT"
] | null | null | null | # project
# external
from dephell_versioning import get_schemes
# app
from ..constants import FORMATS, LOG_FORMATTERS, LOG_LEVELS, REPOSITORIES, STRATEGIES
_TARGET = dict(
type='dict',
schema={
'format': dict(
type='string',
required=True,
allowed=FORMATS,
... | 32.816794 | 96 | 0.5485 |
acfb0959babdc085bd4f1e642db05bb9670cf40a | 2,121 | py | Python | sdk/python/feast/infra/transformation_servers/app.py | tpvasconcelos/feast | 37971a455f955149db00644c49a3a0944ca24bc6 | [
"Apache-2.0"
] | 2,258 | 2020-05-17T02:41:07.000Z | 2022-03-31T22:30:57.000Z | sdk/python/feast/infra/transformation_servers/app.py | tpvasconcelos/feast | 37971a455f955149db00644c49a3a0944ca24bc6 | [
"Apache-2.0"
] | 1,768 | 2020-05-16T05:37:28.000Z | 2022-03-31T23:30:05.000Z | sdk/python/feast/infra/transformation_servers/app.py | tpvasconcelos/feast | 37971a455f955149db00644c49a3a0944ca24bc6 | [
"Apache-2.0"
] | 415 | 2020-05-16T18:21:27.000Z | 2022-03-31T09:59:10.000Z | import base64
import os
import tempfile
import threading
from pathlib import Path
import yaml
from feast import FeatureStore
from feast.constants import (
DEFAULT_FEATURE_TRANSFORMATION_SERVER_PORT,
FEATURE_STORE_YAML_ENV_NAME,
FEATURE_TRANSFORMATION_SERVER_PORT_ENV_NAME,
REGISTRY_ENV_NAME,
)
from fea... | 33.140625 | 84 | 0.789722 |
acfb0a9f7408379bd6fd1d6886740b7630cd96ec | 773 | py | Python | tests/integration/graphics/test_immediate_drawing_indexed_data.py | AnantTiwari-Naman/pyglet | 4774f2889057da95a78785a69372112931e6a620 | [
"BSD-3-Clause"
] | 1,160 | 2019-06-13T11:51:40.000Z | 2022-03-31T01:55:32.000Z | tests/integration/graphics/test_immediate_drawing_indexed_data.py | AaronCWacker/pyglet | 63b1ece7043133d47eb898857876e4927d9759b2 | [
"BSD-3-Clause"
] | 491 | 2019-07-14T16:13:11.000Z | 2022-03-31T08:04:32.000Z | tests/integration/graphics/test_immediate_drawing_indexed_data.py | AaronCWacker/pyglet | 63b1ece7043133d47eb898857876e4927d9759b2 | [
"BSD-3-Clause"
] | 316 | 2019-06-14T13:56:48.000Z | 2022-03-30T19:26:58.000Z | """Tests immediate drawing using indexed data.
"""
import unittest
import pyglet
from tests.annotations import Platform, skip_platform
from .graphics_common import GraphicsIndexedGenericTestCase, get_feedback, GL_TRIANGLES
@skip_platform(Platform.OSX) # TODO: Check whether OpenGL < 3.0 or compatibility profile is ... | 40.684211 | 100 | 0.609314 |
acfb0bce02c3403297131352d15017842c7409d4 | 10,627 | py | Python | awx/main/dispatch/worker/callback.py | bhyunki/awx | ce588a6af5a5c7f71a5b176ffe53eda5ebc3492c | [
"Apache-2.0"
] | 2 | 2020-03-19T20:49:37.000Z | 2020-05-04T14:36:11.000Z | awx/main/dispatch/worker/callback.py | bhyunki/awx | ce588a6af5a5c7f71a5b176ffe53eda5ebc3492c | [
"Apache-2.0"
] | 35 | 2021-03-01T06:34:26.000Z | 2022-03-01T01:18:42.000Z | awx/main/dispatch/worker/callback.py | bhyunki/awx | ce588a6af5a5c7f71a5b176ffe53eda5ebc3492c | [
"Apache-2.0"
] | null | null | null | import json
import logging
import os
import signal
import time
import traceback
from django.conf import settings
from django.utils.timezone import now as tz_now
from django.db import DatabaseError, OperationalError, connection as django_connection
from django.db.utils import InterfaceError, InternalError
from django_g... | 45.41453 | 151 | 0.58916 |
acfb0ced42062f6104d93523835ff0b0890d48fc | 1,537 | py | Python | python/oneflow/support/func_inspect_util.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 3,285 | 2020-07-31T05:51:22.000Z | 2022-03-31T15:20:16.000Z | python/oneflow/support/func_inspect_util.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 2,417 | 2020-07-31T06:28:58.000Z | 2022-03-31T23:04:14.000Z | python/oneflow/support/func_inspect_util.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 520 | 2020-07-31T05:52:42.000Z | 2022-03-29T02:38:11.000Z | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | 30.74 | 84 | 0.685751 |
acfb0e0298154197d1a1a920c690ba29a6decfbb | 1,236 | py | Python | python_modules/libraries/dagster-papertrail/setup.py | dbatten5/dagster | d76e50295054ffe5a72f9b292ef57febae499528 | [
"Apache-2.0"
] | 4,606 | 2018-06-21T17:45:20.000Z | 2022-03-31T23:39:42.000Z | python_modules/libraries/dagster-papertrail/setup.py | dbatten5/dagster | d76e50295054ffe5a72f9b292ef57febae499528 | [
"Apache-2.0"
] | 6,221 | 2018-06-12T04:36:01.000Z | 2022-03-31T21:43:05.000Z | python_modules/libraries/dagster-papertrail/setup.py | dbatten5/dagster | d76e50295054ffe5a72f9b292ef57febae499528 | [
"Apache-2.0"
] | 619 | 2018-08-22T22:43:09.000Z | 2022-03-31T22:48:06.000Z | from typing import Dict
from setuptools import find_packages, setup # type: ignore
def get_version() -> str:
version: Dict[str, str] = {}
with open("dagster_papertrail/version.py") as fp:
exec(fp.read(), version) # pylint: disable=W0122
return version["__version__"]
if __name__ == "__main__"... | 33.405405 | 108 | 0.614887 |
acfb0e0ca95fd42533663dd60eab680c7964d1b3 | 44,137 | py | Python | misc/utils.py | srama2512/sidekicks | a5c487bb30540c98f04ece5e2c22ef95963afbdb | [
"MIT"
] | 26 | 2018-07-30T19:14:49.000Z | 2022-03-12T12:49:36.000Z | misc/utils.py | srama2512/sidekicks | a5c487bb30540c98f04ece5e2c22ef95963afbdb | [
"MIT"
] | 2 | 2018-12-10T17:12:27.000Z | 2019-07-15T22:47:28.000Z | misc/utils.py | srama2512/sidekicks | a5c487bb30540c98f04ece5e2c22ef95963afbdb | [
"MIT"
] | 8 | 2018-12-18T00:55:45.000Z | 2019-11-11T18:42:49.000Z | import sys
import pdb
import math
import json
import torch
import random
import argparse
import numpy as np
import torchvision
import tensorboardX
import torch.optim as optim
import torchvision.utils as vutils
from State import *
def str2bool(v):
return v.lower() in ("yes", "true", "t", "1")
def set_random_seeds... | 49.315084 | 199 | 0.573646 |
acfb0e89f37ca9a2508060c11d516a646750b2b7 | 2,388 | py | Python | examples/205_multivof/buoyancy_breakup/vis/contour.py | ChristopherKotthoff/Aphros-with-GraphContraction | 18af982a50e350a8bf6979ae5bd25b2ef4d3792a | [
"MIT"
] | 252 | 2020-06-03T16:01:59.000Z | 2022-03-30T14:06:32.000Z | examples/205_multivof/buoyancy_breakup/vis/contour.py | ChristopherKotthoff/Aphros-with-GraphContraction | 18af982a50e350a8bf6979ae5bd25b2ef4d3792a | [
"MIT"
] | 4 | 2021-03-13T11:13:55.000Z | 2022-03-31T15:11:22.000Z | examples/205_multivof/buoyancy_breakup/vis/contour.py | ChristopherKotthoff/Aphros-with-GraphContraction | 18af982a50e350a8bf6979ae5bd25b2ef4d3792a | [
"MIT"
] | 27 | 2020-09-18T04:12:03.000Z | 2022-03-30T04:22:42.000Z | #!/usr/bin/env pvbatch
import argparse
from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()
import os
import sys
def printerr(m):
sys.stderr.write('{:}\n'.format(m))
sys.stderr.flush()
parser = argparse.ArgumentParser()
parser.add_argument('--files0', nargs='*', help="Paths to sm_... | 34.608696 | 98 | 0.687605 |
acfb0eb8a08f6b87749b61bba81c94320c5df45d | 1,619 | py | Python | viz/web/webserve.py | vivinastase/histwords | bb3117434e76679fb38f649e2dbf11b15f5ef03b | [
"Apache-2.0"
] | null | null | null | viz/web/webserve.py | vivinastase/histwords | bb3117434e76679fb38f649e2dbf11b15f5ef03b | [
"Apache-2.0"
] | null | null | null | viz/web/webserve.py | vivinastase/histwords | bb3117434e76679fb38f649e2dbf11b15f5ef03b | [
"Apache-2.0"
] | null | null | null | import sys
import os
import base64
import threading
import ssl
import socketserver
#import BaseHTTPServer
#from SimpleHTTPServer import SimpleHTTPRequestHandler
from http.server import SimpleHTTPRequestHandler
from importlib import reload
WEB_PORT=5000
class ThreadedTCPServer(socketserver.ThreadingMixIn, socketserv... | 18.397727 | 77 | 0.680667 |
acfb0ebd2dd15a9f023726184bdaa544dae7eaa7 | 4,619 | py | Python | Task 1 turtles/turtles.py | mansasha21/phys-math-modeling | fc8b63c2894676f6eb72896b06ae726b0aa506c5 | [
"MIT"
] | 1 | 2020-02-24T16:04:37.000Z | 2020-02-24T16:04:37.000Z | Task 1 turtles/turtles.py | mansasha21/phys-math-modeling | fc8b63c2894676f6eb72896b06ae726b0aa506c5 | [
"MIT"
] | null | null | null | Task 1 turtles/turtles.py | mansasha21/phys-math-modeling | fc8b63c2894676f6eb72896b06ae726b0aa506c5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""turtles.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1Wl6WD8ntb-XqJEb1m4CfYfHvWXR-99ok
"""
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
from IPython.display import HTML
... | 25.103261 | 145 | 0.60013 |
acfb110dfa2a3d6c2bc6602626292d47cfb7c7d8 | 1,394 | py | Python | vilt/datamodules/vqav2_datamodule.py | kris927b/ViLT | db96f20ebc656f1995aa573cbcbca0fe31f55c42 | [
"Apache-2.0"
] | 587 | 2021-05-08T08:17:08.000Z | 2022-03-31T15:17:09.000Z | vilt/datamodules/vqav2_datamodule.py | kris927b/ViLT | db96f20ebc656f1995aa573cbcbca0fe31f55c42 | [
"Apache-2.0"
] | 54 | 2021-05-12T12:36:22.000Z | 2022-03-31T03:34:54.000Z | vilt/datamodules/vqav2_datamodule.py | kris927b/ViLT | db96f20ebc656f1995aa573cbcbca0fe31f55c42 | [
"Apache-2.0"
] | 107 | 2021-05-09T07:48:53.000Z | 2022-03-30T04:12:16.000Z | from vilt.datasets import VQAv2Dataset
from .datamodule_base import BaseDataModule
from collections import defaultdict
class VQAv2DataModule(BaseDataModule):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
@property
def dataset_cls(self):
return VQAv2Dataset
@p... | 37.675676 | 85 | 0.664993 |
acfb111ed62d858f7bcadc7c68808fb65c04e417 | 645 | py | Python | app/loyalty/migrations/0009_auto_20190726_0123.py | S3Infosoft/s3-loyalty-webapp | 264b98a325ccfa683737e03623acc99fe3053a99 | [
"MIT"
] | null | null | null | app/loyalty/migrations/0009_auto_20190726_0123.py | S3Infosoft/s3-loyalty-webapp | 264b98a325ccfa683737e03623acc99fe3053a99 | [
"MIT"
] | 7 | 2019-06-17T04:11:38.000Z | 2019-08-01T06:23:46.000Z | app/loyalty/migrations/0009_auto_20190726_0123.py | S3Infosoft/mvr-loyalty | 264b98a325ccfa683737e03623acc99fe3053a99 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.7 on 2019-07-25 19:53
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('loyalty', '0008_auto_20190726_0019'),
]
operations = [
migrations.AlterField(
model_name='reservati... | 25.8 | 85 | 0.618605 |
acfb1227743e49efd04d3ebaad2f2ed1fbe4d9f7 | 3,179 | py | Python | mp_sort/app/static/library.py | seancze/d2w_mini_project_mp_sort | aa472b168a7e1d238bf074e74773c3c71b0ba7af | [
"MIT"
] | null | null | null | mp_sort/app/static/library.py | seancze/d2w_mini_project_mp_sort | aa472b168a7e1d238bf074e74773c3c71b0ba7af | [
"MIT"
] | null | null | null | mp_sort/app/static/library.py | seancze/d2w_mini_project_mp_sort | aa472b168a7e1d238bf074e74773c3c71b0ba7af | [
"MIT"
] | null | null | null | from org.transcrypt.stubs.browser import *
import random
def gen_random_int(number, seed):
random.seed(seed)
array = list(range(number))
random.shuffle(array)
return array
def generate():
number = 10
seed = 200
# call gen_random_int() with the given number and seed
# store it to the variable array
array = ... | 25.845528 | 98 | 0.702422 |
acfb1299c79974fb1301f71d998802eb2e5d6e77 | 213 | py | Python | WEEKS/CD_Sata-Structures/_RESOURCES/python-prac/learn-python3/debug/do_try.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | 5 | 2021-06-02T23:44:25.000Z | 2021-12-27T16:21:57.000Z | WEEKS/CD_Sata-Structures/_RESOURCES/python-prac/learn-python3/debug/do_try.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | 22 | 2021-05-31T01:33:25.000Z | 2021-10-18T18:32:39.000Z | WEEKS/CD_Sata-Structures/_RESOURCES/python-prac/learn-python3/debug/do_try.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | 3 | 2021-06-19T03:37:47.000Z | 2021-08-31T00:49:51.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
try:
print("try...")
r = 10 / 0
print("result:", r)
except ZeroDivisionError as e:
print("except:", e)
finally:
print("finally...")
print("END")
| 16.384615 | 30 | 0.553991 |
acfb1308386405470d39d6a3a4c7b46b508f4db3 | 353 | py | Python | opencv-examples/color_range_filter.py | MeneDev/pigeon-tracker | 472dcbeb924131cdea34a37c4f787a67b37fea84 | [
"MIT"
] | 3 | 2018-11-02T09:38:56.000Z | 2019-03-09T15:58:58.000Z | opencv-examples/color_range_filter.py | MeneDev/pigeon-tracker | 472dcbeb924131cdea34a37c4f787a67b37fea84 | [
"MIT"
] | 2 | 2018-11-03T18:09:16.000Z | 2019-02-10T16:40:58.000Z | opencv-examples/color_range_filter.py | MeneDev/pigeon-tracker | 472dcbeb924131cdea34a37c4f787a67b37fea84 | [
"MIT"
] | 1 | 2018-11-02T10:15:56.000Z | 2018-11-02T10:15:56.000Z | import cv2
cam = cv2.VideoCapture(0)
lower_green = (55, 130, 65)
upper_green = (75, 175, 70)
while cam.isOpened():
ret, frame = cam.read()
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)
mask = cv2.inRange(frame, lower_green, upper_green)
cv2.imshow("threshold", mask)
key = cv2.waitKey(1) & 0xff... | 19.611111 | 55 | 0.637394 |
acfb13c2316ffe62155d1dbe9ddfc08fa646b39a | 3,824 | py | Python | jutil/format.py | kutera/django-jutil | 9ad85caeb04a0a45be4d139e32a16cf9a9ec6c12 | [
"MIT"
] | null | null | null | jutil/format.py | kutera/django-jutil | 9ad85caeb04a0a45be4d139e32a16cf9a9ec6c12 | [
"MIT"
] | null | null | null | jutil/format.py | kutera/django-jutil | 9ad85caeb04a0a45be4d139e32a16cf9a9ec6c12 | [
"MIT"
] | null | null | null | import re
from datetime import timedelta
from decimal import Decimal
def format_full_name(first_name: str, last_name: str, max_length: int = 20):
"""
Limits name length to specified length. Tries to keep name as human-readable an natural as possible.
:param first_name: First name
:param last_name: Las... | 27.314286 | 104 | 0.636768 |
acfb140bf6c022f442c334a8adf0c94ac33f2dc7 | 7,334 | py | Python | pyexcel_io/book.py | Glose/pyexcel-io | 3408497c81ae4652a0c1a1f41ed4679fbc2cb416 | [
"BSD-3-Clause"
] | null | null | null | pyexcel_io/book.py | Glose/pyexcel-io | 3408497c81ae4652a0c1a1f41ed4679fbc2cb416 | [
"BSD-3-Clause"
] | null | null | null | pyexcel_io/book.py | Glose/pyexcel-io | 3408497c81ae4652a0c1a1f41ed4679fbc2cb416 | [
"BSD-3-Clause"
] | null | null | null | """
pyexcel_io.book
~~~~~~~~~~~~~~~~~~~
The io interface to file extensions
:copyright: (c) 2014-2017 by Onni Software Ltd.
:license: New BSD License, see LICENSE for more details
"""
import pyexcel_io.manager as manager
from pyexcel_io._compact import PY2, OrderedDict, isstream
from .constants i... | 29.572581 | 79 | 0.593128 |
acfb14cdaa98e3f1741584295a6a6fca4e1cd649 | 1,327 | py | Python | aliyun-python-sdk-ehpc/aliyunsdkehpc/request/v20180412/UpgradeClientRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | 1 | 2019-12-23T12:36:43.000Z | 2019-12-23T12:36:43.000Z | aliyun-python-sdk-ehpc/aliyunsdkehpc/request/v20180412/UpgradeClientRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-ehpc/aliyunsdkehpc/request/v20180412/UpgradeClientRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | 1 | 2021-02-23T11:27:54.000Z | 2021-02-23T11:27:54.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 36.861111 | 73 | 0.767898 |
acfb152fb704304b95394cf122491b382eedb35c | 3,015 | py | Python | plenum/test/node_request/test_apply_stashed_partially_ordered.py | andkononykhin/indy-plenum-copy | 46c48feaf75e5578c9dceb76d4b6d09f7e63add5 | [
"Apache-2.0"
] | null | null | null | plenum/test/node_request/test_apply_stashed_partially_ordered.py | andkononykhin/indy-plenum-copy | 46c48feaf75e5578c9dceb76d4b6d09f7e63add5 | [
"Apache-2.0"
] | null | null | null | plenum/test/node_request/test_apply_stashed_partially_ordered.py | andkononykhin/indy-plenum-copy | 46c48feaf75e5578c9dceb76d4b6d09f7e63add5 | [
"Apache-2.0"
] | null | null | null | import pytest
from plenum.common.constants import DOMAIN_LEDGER_ID
from plenum.common.startable import Mode
from plenum.test.delayers import cDelay
from plenum.test.helper import sdk_get_and_check_replies, sdk_send_random_requests, assertExp
from plenum.test.node_catchup.helper import ensure_all_nodes_have_same_data
f... | 39.671053 | 99 | 0.75257 |
acfb153cedb0ea6b3c4ddc532218b29d0e435520 | 4,206 | py | Python | geomet/util.py | tomplex/geomet | f57a2302d738ef8af694c8dde09e95d419457d9e | [
"Apache-2.0"
] | null | null | null | geomet/util.py | tomplex/geomet | f57a2302d738ef8af694c8dde09e95d419457d9e | [
"Apache-2.0"
] | null | null | null | geomet/util.py | tomplex/geomet | f57a2302d738ef8af694c8dde09e95d419457d9e | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 Lars Butler & individual contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 31.155556 | 79 | 0.587019 |
acfb16245fea19afe596470f3c929c4fbf34c116 | 802 | py | Python | atomisticparsers/gulp/metainfo/__init__.py | nomad-coe/atomistic-parsers | 7be55968fbf45e8e49377b58e745548c55c06788 | [
"Apache-2.0"
] | null | null | null | atomisticparsers/gulp/metainfo/__init__.py | nomad-coe/atomistic-parsers | 7be55968fbf45e8e49377b58e745548c55c06788 | [
"Apache-2.0"
] | null | null | null | atomisticparsers/gulp/metainfo/__init__.py | nomad-coe/atomistic-parsers | 7be55968fbf45e8e49377b58e745548c55c06788 | [
"Apache-2.0"
] | null | null | null | #
# Copyright The NOMAD Authors.
#
# This file is part of NOMAD.
# See https://nomad-lab.eu for further info.
#
# 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/lic... | 32.08 | 74 | 0.761845 |
acfb1630fca7b7b127be1bc1a1d6025ce3b4b4ac | 1,794 | py | Python | PyQuM/ver(0.0)/QuApp/tools/AgilentDRV.py | takehuge/PYQUM | bfc9d9b1c2f4246c7aac3a371baaf587c99f8069 | [
"MIT"
] | null | null | null | PyQuM/ver(0.0)/QuApp/tools/AgilentDRV.py | takehuge/PYQUM | bfc9d9b1c2f4246c7aac3a371baaf587c99f8069 | [
"MIT"
] | null | null | null | PyQuM/ver(0.0)/QuApp/tools/AgilentDRV.py | takehuge/PYQUM | bfc9d9b1c2f4246c7aac3a371baaf587c99f8069 | [
"MIT"
] | null | null | null | # This is a collection of low-level VIs for Agilent Drivers
from QuApp.tools.Callout import Call_VI
# from Callout import Call_VI
# Root-location for the M9392A drivers
LOC01 = "C:\\Program Files (x86)\\Agilent\\M9392\\LabVIEW Driver\\20xx\\Agilent M9392" #VSA
LOC02 = "C:\\Program Files (x86)\\Agilent\\M933x\\LabVIEW... | 32.618182 | 105 | 0.654961 |
acfb174abd8fe7fb0f4700ff2027eba3a6c2916b | 4,918 | py | Python | app/routers/inception.py | ephraimberkovitch/cadet | 40ff288bfa96a3a0615fdf0b4d79246bc0fb0011 | [
"MIT"
] | 2 | 2021-06-23T14:03:09.000Z | 2021-11-21T01:06:03.000Z | app/routers/inception.py | ephraimberkovitch/cadet | 40ff288bfa96a3a0615fdf0b4d79246bc0fb0011 | [
"MIT"
] | 13 | 2021-06-23T16:07:57.000Z | 2021-07-09T20:51:09.000Z | app/routers/inception.py | ephraimberkovitch/cadet | 40ff288bfa96a3a0615fdf0b4d79246bc0fb0011 | [
"MIT"
] | 2 | 2021-06-23T16:09:32.000Z | 2022-03-18T12:44:25.000Z | from fastapi import APIRouter, Depends, HTTPException
from fastapi import Request, Form, File, UploadFile
from fastapi.templating import Jinja2Templates
from app.util.login import get_current_username
from typing import Any, Dict
from collections import namedtuple
import spacy
from cassis import Cas
from cassis import ... | 34.152778 | 107 | 0.725092 |
acfb176ba0a619cf9ced560baad83f256a9971d1 | 10,676 | py | Python | loopy/target/cuda.py | cmsquared/loopy | baef6e7603b2bba683327fd43cb006864c225aa6 | [
"MIT"
] | null | null | null | loopy/target/cuda.py | cmsquared/loopy | baef6e7603b2bba683327fd43cb006864c225aa6 | [
"MIT"
] | null | null | null | loopy/target/cuda.py | cmsquared/loopy | baef6e7603b2bba683327fd43cb006864c225aa6 | [
"MIT"
] | 1 | 2021-03-09T15:55:33.000Z | 2021-03-09T15:55:33.000Z | """CUDA target independent of PyCUDA."""
from __future__ import division, absolute_import
__copyright__ = "Copyright (C) 2015 Andreas Kloeckner"
__license__ = """
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal... | 30.502857 | 77 | 0.615774 |
acfb17dfc489ced9ae58a4a0c07d7c9a9a2b1366 | 43,992 | py | Python | osf/models/registrations.py | tsukaeru/RDM-osf.io | 2dc3e539322b6110e51772f8bd25ebdeb8e12d0e | [
"Apache-2.0"
] | 11 | 2018-12-11T16:39:40.000Z | 2022-02-26T09:51:32.000Z | osf/models/registrations.py | tsukaeru/RDM-osf.io | 2dc3e539322b6110e51772f8bd25ebdeb8e12d0e | [
"Apache-2.0"
] | 52 | 2018-04-13T05:03:21.000Z | 2022-03-22T02:56:19.000Z | osf/models/registrations.py | tsukaeru/RDM-osf.io | 2dc3e539322b6110e51772f8bd25ebdeb8e12d0e | [
"Apache-2.0"
] | 16 | 2018-07-09T01:44:51.000Z | 2021-06-30T01:57:16.000Z | import logging
import datetime
import html
from future.moves.urllib.parse import urljoin
from django.core.exceptions import ValidationError
from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.utils import timezone
from guardian.models import (
... | 37.567891 | 164 | 0.645936 |
acfb1839931eabe9e27d766ec391f61a036b5dc4 | 14,398 | py | Python | faebryk/library/library/components.py | ruben-iteng/faebryk | 58810da4cb24581f421c39784ccf61e1a4ea8ae5 | [
"MIT"
] | 7 | 2021-11-22T20:02:14.000Z | 2022-03-04T19:35:04.000Z | faebryk/library/library/components.py | ruben-iteng/faebryk | 58810da4cb24581f421c39784ccf61e1a4ea8ae5 | [
"MIT"
] | 45 | 2021-11-22T20:24:40.000Z | 2022-03-25T11:01:28.000Z | faebryk/library/library/components.py | ruben-iteng/faebryk | 58810da4cb24581f421c39784ccf61e1a4ea8ae5 | [
"MIT"
] | 3 | 2021-11-22T19:58:08.000Z | 2021-12-17T16:14:08.000Z | # This file is part of the faebryk project
# SPDX-License-Identifier: MIT
import logging
from faebryk.library.traits import component
from faebryk.library.traits.component import (
contructable_from_component,
has_defined_footprint,
has_defined_footprint_pinmap,
has_defined_type_description,
has_f... | 33.098851 | 88 | 0.624323 |
acfb1879f4a3600bebfcbb5c58fe5563f4d92971 | 17,661 | py | Python | server/models/model_base.py | jideobs/flask-gae-ndb-starter | 776a9ea967524f4a88debb6f00e4d39f15b4e799 | [
"MIT"
] | 2 | 2017-08-13T09:20:17.000Z | 2017-08-13T18:19:09.000Z | server/models/model_base.py | jideobs/flask-gae-ndb-starter | 776a9ea967524f4a88debb6f00e4d39f15b4e799 | [
"MIT"
] | null | null | null | server/models/model_base.py | jideobs/flask-gae-ndb-starter | 776a9ea967524f4a88debb6f00e4d39f15b4e799 | [
"MIT"
] | null | null | null | from google.appengine.ext import ndb
from flask import request
from flask_restful import abort
from flask_login import current_user
import datetime as main_datetime
import functools
from server import utils
from google.appengine.datastore import datastore_query
from google.appengine.datastore.datastore_query import dat... | 32.465074 | 114 | 0.730706 |
acfb18bacc1e78f80c4a1d97a6b95c36cd34bdff | 5,190 | py | Python | repos/system_upgrade/el7toel8/files/rhel_upgrade.py | brammittendorff/leapp-repository | 2b04640fd00fb1402e952a0bae13d4002b299345 | [
"Apache-2.0"
] | null | null | null | repos/system_upgrade/el7toel8/files/rhel_upgrade.py | brammittendorff/leapp-repository | 2b04640fd00fb1402e952a0bae13d4002b299345 | [
"Apache-2.0"
] | null | null | null | repos/system_upgrade/el7toel8/files/rhel_upgrade.py | brammittendorff/leapp-repository | 2b04640fd00fb1402e952a0bae13d4002b299345 | [
"Apache-2.0"
] | null | null | null | # plugin inspired by "system_upgrade.py" from rpm-software-management
from __future__ import print_function
import json
import sys
import dnf
import dnf.cli
CMDS = ['download', 'upgrade', 'check']
class DoNotDownload(Exception):
pass
def _do_not_download_packages(packages, progress=None, total=None):
rai... | 37.883212 | 115 | 0.637765 |
acfb19434f8fa92b6320b48e30b9af7b575b7de3 | 65 | py | Python | app/core.py | BlaShadow/Hestia-Mongo | 91cca65ee246f035ee15aad359aa33dd33a404dc | [
"MIT"
] | 3 | 2015-07-01T19:52:12.000Z | 2015-07-01T20:04:50.000Z | app/core.py | BlaShadow/Hestia-Mongo | 91cca65ee246f035ee15aad359aa33dd33a404dc | [
"MIT"
] | null | null | null | app/core.py | BlaShadow/Hestia-Mongo | 91cca65ee246f035ee15aad359aa33dd33a404dc | [
"MIT"
] | null | null | null | #core
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
| 13 | 39 | 0.8 |
acfb19ed9621ebbb04e9d1872f1872529cfcaf0f | 8,559 | py | Python | configerus/test/test_6_instances.py | james-nesbitt/configerus | ff11e8cb0f1ee0ca078a8fc2475f16a1c52f1271 | [
"MIT"
] | 1 | 2021-02-07T18:47:58.000Z | 2021-02-07T18:47:58.000Z | configerus/test/test_6_instances.py | james-nesbitt/configerus | ff11e8cb0f1ee0ca078a8fc2475f16a1c52f1271 | [
"MIT"
] | null | null | null | configerus/test/test_6_instances.py | james-nesbitt/configerus | ff11e8cb0f1ee0ca078a8fc2475f16a1c52f1271 | [
"MIT"
] | null | null | null | """
test the plugin instance functionality
"""
import logging
import unittest
from configerus.config import Config
from configerus.plugin import (
SourceFactory,
FormatFactory,
ValidatorFactory,
Type,
)
from configerus.instances import PluginInstance, PluginInstances
logger = logging.getLogger("test... | 31.123636 | 86 | 0.611286 |
acfb1a58ffdfe04c8b0bc5fb92b25f0e280d0248 | 1,518 | py | Python | models.py | We-Vote/BE | 7c6317b911d9a8bfe55c47f7e4b565feef7edbd6 | [
"MIT"
] | null | null | null | models.py | We-Vote/BE | 7c6317b911d9a8bfe55c47f7e4b565feef7edbd6 | [
"MIT"
] | 6 | 2020-03-24T18:06:56.000Z | 2021-12-13T20:31:19.000Z | models.py | We-Vote/BE | 7c6317b911d9a8bfe55c47f7e4b565feef7edbd6 | [
"MIT"
] | null | null | null | from app import db
from sqlalchemy.dialects.postgresql import JSON
class User(db.model):
__tablename__ = 'users'
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String(), nullable = False, unique=True)
password = db.Column(db.String(), nullable = False)
# backrefs
polls = d... | 38.923077 | 85 | 0.694335 |
acfb1a69309e0680f231ae3976b4ddb4d57c1d08 | 7,645 | py | Python | utils/data_loader.py | volflow/neural-image-assessment | 0d6ff06ddffda531efd0da9e8a77a6ea9528c473 | [
"MIT"
] | null | null | null | utils/data_loader.py | volflow/neural-image-assessment | 0d6ff06ddffda531efd0da9e8a77a6ea9528c473 | [
"MIT"
] | null | null | null | utils/data_loader.py | volflow/neural-image-assessment | 0d6ff06ddffda531efd0da9e8a77a6ea9528c473 | [
"MIT"
] | null | null | null | import numpy as np
import os
import glob
import tensorflow as tf
# path to the images and the text file which holds the scores and ids
base_images_path = r'/Users/valentinwolf/data/AVA_dataset/images/'
ava_dataset_path = r'/Users/valentinwolf/data/AVA_dataset/AVA.txt'
def import_dataset(base_images_path,ava_dataset_... | 35.230415 | 95 | 0.646174 |
acfb1a83001f20a03d7855abeb4c02406325b73c | 7,116 | py | Python | solver.py | kondrak/graph_bfs_solver | 2f44161c09e9cdb0b0433a53aeee198540f1b744 | [
"MIT"
] | null | null | null | solver.py | kondrak/graph_bfs_solver | 2f44161c09e9cdb0b0433a53aeee198540f1b744 | [
"MIT"
] | null | null | null | solver.py | kondrak/graph_bfs_solver | 2f44161c09e9cdb0b0433a53aeee198540f1b744 | [
"MIT"
] | null | null | null | # *** BFS Graph Solver ***
# (c) Krzysztof Kondrak (at) gmail (dot) com
import sys
import os
import itertools
import getopt
import pickle
from graph import *
from pathFinding import *
from tools import ProgressBar, usage, processGraphFile
sys.path.append(os.getcwd())
SILENT_MODE = False
def Message(msg):
if no... | 30.152542 | 201 | 0.575464 |
acfb1a9c80bdbdbad7e2dec4d2e633ce63c9b6c8 | 14,125 | py | Python | tests/test_rfc7191.py | pysnmp/pyasn1-modules | 93f5699988fbb090be13aaa339498c128ba7dedb | [
"BSD-2-Clause"
] | null | null | null | tests/test_rfc7191.py | pysnmp/pyasn1-modules | 93f5699988fbb090be13aaa339498c128ba7dedb | [
"BSD-2-Clause"
] | null | null | null | tests/test_rfc7191.py | pysnmp/pyasn1-modules | 93f5699988fbb090be13aaa339498c128ba7dedb | [
"BSD-2-Clause"
] | null | null | null | #
# This file is part of pyasn1-modules software.
#
# Created by Russ Housley
# Copyright (c) 2019, Vigil Security, LLC
# License: http://snmplabs.com/pyasn1/license.html
#
import sys
import unittest
from pyasn1.codec.der.decoder import decode as der_decoder
from pyasn1.codec.der.encoder import encode as der_encoder
... | 45.272436 | 84 | 0.787044 |
acfb1aad374a9bc52d3bdad235b3d045fe5e2047 | 5,493 | py | Python | docs/source/conf.py | jethornton/pman | c26e526478fc52dd097034f8451db6ef45df08b2 | [
"MIT"
] | null | null | null | docs/source/conf.py | jethornton/pman | c26e526478fc52dd097034f8451db6ef45df08b2 | [
"MIT"
] | null | null | null | docs/source/conf.py | jethornton/pman | c26e526478fc52dd097034f8451db6ef45df08b2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | 29.853261 | 79 | 0.646823 |
acfb1ad83074d4f4416976a15663e0d26d6d7a74 | 26,322 | py | Python | workspace/module/python-2.7/LxBasic/bscMethods/_bscMtdRaw.py | no7hings/Lynxi | 43c745198a714c2e5aca86c6d7a014adeeb9abf7 | [
"MIT"
] | 2 | 2018-03-06T03:33:55.000Z | 2019-03-26T03:25:11.000Z | workspace/module/python-2.7/LxBasic/bscMethods/_bscMtdRaw.py | no7hings/lynxi | 43c745198a714c2e5aca86c6d7a014adeeb9abf7 | [
"MIT"
] | null | null | null | workspace/module/python-2.7/LxBasic/bscMethods/_bscMtdRaw.py | no7hings/lynxi | 43c745198a714c2e5aca86c6d7a014adeeb9abf7 | [
"MIT"
] | null | null | null | # coding:utf-8
from LxBasic import bscMtdCore, bscCfg, bscMtdCore
from LxBasic.bscMethods import _bscMtdPath
class Raw(bscMtdCore.Mtd_BscUtility):
@classmethod
def toHash(cls, raw):
return cls._stringToHash(unicode(raw))
class String(bscMtdCore.Mtd_BscUtility):
@classmethod
def toNumberEmbe... | 31.003534 | 158 | 0.488109 |
acfb1b65a81240ea06749bd183f9df25c4dd2187 | 2,494 | py | Python | PopulationGenerator.py | HoSzyk/Genetic_algorithm_board | edcd2307761489a6e9b65424726039b89bff98ff | [
"MIT"
] | null | null | null | PopulationGenerator.py | HoSzyk/Genetic_algorithm_board | edcd2307761489a6e9b65424726039b89bff98ff | [
"MIT"
] | null | null | null | PopulationGenerator.py | HoSzyk/Genetic_algorithm_board | edcd2307761489a6e9b65424726039b89bff98ff | [
"MIT"
] | null | null | null | import random
from Board import Board
from Path import Path
from Point import Point
from Segment import Segment
from Solution import Solution
def generate_random_path_list(board: Board):
result_solution = Solution()
for start_point, end_point in board.point_pairs:
cur_point = start_point
cur... | 33.702703 | 93 | 0.60425 |
acfb1d2ab4132e9557c2e5745a18c32f4153f841 | 1,369 | py | Python | src/InvictusService.py | elijah-rou/InvictusMicroservice | 2f200dccdd28d32c8fb3cc524e128ba13583b7f1 | [
"MIT"
] | null | null | null | src/InvictusService.py | elijah-rou/InvictusMicroservice | 2f200dccdd28d32c8fb3cc524e128ba13583b7f1 | [
"MIT"
] | null | null | null | src/InvictusService.py | elijah-rou/InvictusMicroservice | 2f200dccdd28d32c8fb3cc524e128ba13583b7f1 | [
"MIT"
] | null | null | null | '''
Microservice that performs a variety of functions:
1) Squares every odd number in a vector of integers
2) Generate string:encoding key store from a list of strings
3) Decode an encoded string
'''
# Nameko import
from nameko.rpc import rpc
# Huffman encoder/decoder
from dahuffman import HuffmanCodec
### Use NLTK ... | 29.76087 | 75 | 0.706355 |
acfb1e46645b200ef47632ee3b7d0963ede484a6 | 8,411 | py | Python | tests/server/rest/jobs_test.py | WIPACrepo/iceprod | 83615da9b0e764bc2498ac588cc2e2b3f5277235 | [
"MIT"
] | 2 | 2017-01-23T17:12:41.000Z | 2019-01-14T13:38:17.000Z | tests/server/rest/jobs_test.py | WIPACrepo/iceprod | 83615da9b0e764bc2498ac588cc2e2b3f5277235 | [
"MIT"
] | 242 | 2016-05-09T18:46:51.000Z | 2022-03-31T22:02:29.000Z | tests/server/rest/jobs_test.py | WIPACrepo/iceprod | 83615da9b0e764bc2498ac588cc2e2b3f5277235 | [
"MIT"
] | 2 | 2017-03-27T09:13:40.000Z | 2019-01-27T10:55:30.000Z | """
Test script for REST/jobs
"""
import logging
logger = logging.getLogger('rest_jobs_test')
import os
import sys
import time
import random
import shutil
import tempfile
import unittest
import subprocess
import json
from functools import partial
from unittest.mock import patch, MagicMock
from tes... | 37.549107 | 119 | 0.567947 |
acfb1e5a4b66152a2df11ad431df7d017f011791 | 873 | py | Python | mongodb/MongoDB_BenchMark/WordsFilter.py | skihyy/GT-CS6675 | e2c86072f479ac3f6a334bbfcedc633e4a711421 | [
"MIT"
] | null | null | null | mongodb/MongoDB_BenchMark/WordsFilter.py | skihyy/GT-CS6675 | e2c86072f479ac3f6a334bbfcedc633e4a711421 | [
"MIT"
] | null | null | null | mongodb/MongoDB_BenchMark/WordsFilter.py | skihyy/GT-CS6675 | e2c86072f479ac3f6a334bbfcedc633e4a711421 | [
"MIT"
] | null | null | null | import csv
with open('sample.csv', 'w') as wf:
writer = csv.writer(wf)
with open('enwiki-20170120-pages-articles-multistream-index.txt', 'r') as rf:
lines = 0
ct = 0;
row = []
for line in rf:
words = line.split(":")
for word in words:
if 0 ... | 34.92 | 81 | 0.34937 |
acfb1fddec810dcd3fd682dea58cdc50b5cd1173 | 45,405 | py | Python | venv/lib/python2.7/dist-packages/pyx/path.py | pengwu/scapy_env | 3db9c5dea2e219048a2387649d6d89be342903d9 | [
"MIT"
] | null | null | null | venv/lib/python2.7/dist-packages/pyx/path.py | pengwu/scapy_env | 3db9c5dea2e219048a2387649d6d89be342903d9 | [
"MIT"
] | null | null | null | venv/lib/python2.7/dist-packages/pyx/path.py | pengwu/scapy_env | 3db9c5dea2e219048a2387649d6d89be342903d9 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
#
#
# Copyright (C) 2002-2006 Jörg Lehmann <joergl@users.sourceforge.net>
# Copyright (C) 2003-2005 Michael Schindler <m-schindler@users.sourceforge.net>
# Copyright (C) 2002-2011 André Wobst <wobsta@users.sourceforge.net>
#
# This file is part of PyX (http://pyx.sourceforge.net/).
#
# PyX is ... | 35.555991 | 130 | 0.585795 |
acfb2007850a309f1ca1d3e4b3270938f2462d5c | 517 | py | Python | pyvitemadose/__init__.py | thib1984/pyvitemadose | 5f3da18207b9da946737a468f05af0ad3c6526e5 | [
"MIT"
] | 2 | 2021-06-05T20:33:40.000Z | 2021-12-24T09:23:46.000Z | pyvitemadose/__init__.py | thib1984/pyvitemadose | 5f3da18207b9da946737a468f05af0ad3c6526e5 | [
"MIT"
] | 3 | 2021-11-23T09:26:03.000Z | 2021-11-23T09:26:32.000Z | pyvitemadose/__init__.py | thib1984/pyvitemadose | 5f3da18207b9da946737a468f05af0ad3c6526e5 | [
"MIT"
] | null | null | null | """
pyvitemadose init
"""
from os import sys
from pyvitemadose.args import compute_args, is_pyinstaller
from pyvitemadose.pyvitemadose import find
from pyvitemadose.update import update
def pyvitemadose():
"""
pyvitemadose entry point
"""
args = compute_args()
if args.update:
if not is_py... | 20.68 | 61 | 0.659574 |
acfb20936490520d95f1d296734cc25c38fedca5 | 1,160 | py | Python | testing/xvfb_test_script.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 14,668 | 2015-01-01T01:57:10.000Z | 2022-03-31T23:33:32.000Z | testing/xvfb_test_script.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 86 | 2015-10-21T13:02:42.000Z | 2022-03-14T07:50:50.000Z | testing/xvfb_test_script.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 5,941 | 2015-01-02T11:32:21.000Z | 2022-03-31T16:35:46.000Z | #!/usr/bin/env python
# Copyright (c) 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Simple script for xvfb_unittest to launch.
This script outputs formatted data to stdout for the xvfb unit tests
to read and com... | 30.526316 | 72 | 0.736207 |
acfb20c69fb8701660c1513d76fe0a67555f4fc8 | 3,575 | py | Python | test/test_project_api.py | ContrastingSounds/looker_sdk_31 | f973434049fff1b605b10086ab8b84f2f62e3489 | [
"MIT"
] | null | null | null | test/test_project_api.py | ContrastingSounds/looker_sdk_31 | f973434049fff1b605b10086ab8b84f2f62e3489 | [
"MIT"
] | null | null | null | test/test_project_api.py | ContrastingSounds/looker_sdk_31 | f973434049fff1b605b10086ab8b84f2f62e3489 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Experimental Looker API 3.1 Preview
This API 3.1 is in active development. Breaking changes are likely to occur to some API functions in future Looker releases until API 3.1 is officially launched and upgraded to beta status. If you have time and interest to experiment with new or modifie... | 24.319728 | 518 | 0.632168 |
acfb223b45dd023bf482d2a27d661e27dc23c40e | 221 | py | Python | locale/pot/api/examples/_autosummary/pyvista-examples-downloads-download_dragon-1.py | tkoyama010/pyvista-doc-translations | 23bb813387b7f8bfe17e86c2244d5dd2243990db | [
"MIT"
] | 4 | 2020-08-07T08:19:19.000Z | 2020-12-04T09:51:11.000Z | locale/pot/api/examples/_autosummary/pyvista-examples-downloads-download_dragon-1.py | tkoyama010/pyvista-doc-translations | 23bb813387b7f8bfe17e86c2244d5dd2243990db | [
"MIT"
] | 19 | 2020-08-06T00:24:30.000Z | 2022-03-30T19:22:24.000Z | locale/pot/api/examples/_autosummary/pyvista-examples-downloads-download_dragon-1.py | tkoyama010/pyvista-doc-translations | 23bb813387b7f8bfe17e86c2244d5dd2243990db | [
"MIT"
] | 1 | 2021-03-09T07:50:40.000Z | 2021-03-09T07:50:40.000Z | from pyvista import examples
dataset = examples.download_dragon() # doctest:+SKIP
#
# This dataset is used in the following examples:
#
# * :ref:`floors_example`
# * :ref:`orbiting_example`
# * :ref:`silhouette_example`
| 24.555556 | 53 | 0.733032 |
acfb24b5895076c2b36e0d6d46dd823b023a4d25 | 4,894 | py | Python | paddlers/models/ppcls/utils/gallery2fc.py | huilin16/PaddleRS | ca0d6223d8e56cd3bd3cbd3a033c89f1718ce26a | [
"Apache-2.0"
] | 40 | 2022-02-28T02:07:28.000Z | 2022-03-31T09:54:29.000Z | paddlers/models/ppcls/utils/gallery2fc.py | huilin16/PaddleRS | ca0d6223d8e56cd3bd3cbd3a033c89f1718ce26a | [
"Apache-2.0"
] | 5 | 2022-03-15T12:13:33.000Z | 2022-03-31T15:54:08.000Z | paddlers/models/ppcls/utils/gallery2fc.py | huilin16/PaddleRS | ca0d6223d8e56cd3bd3cbd3a033c89f1718ce26a | [
"Apache-2.0"
] | 20 | 2022-02-28T02:07:31.000Z | 2022-03-31T11:40:40.000Z | # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 39.467742 | 116 | 0.648754 |
acfb2509622a39670f93ac21937d153bf57892c8 | 410 | py | Python | PycharmProjects/pythonexercicios/aula 10/ex028.py | zmixtv1/cev-Python | edce04f86d943d9af070bf3c5e89575ff796ec9e | [
"MIT"
] | null | null | null | PycharmProjects/pythonexercicios/aula 10/ex028.py | zmixtv1/cev-Python | edce04f86d943d9af070bf3c5e89575ff796ec9e | [
"MIT"
] | null | null | null | PycharmProjects/pythonexercicios/aula 10/ex028.py | zmixtv1/cev-Python | edce04f86d943d9af070bf3c5e89575ff796ec9e | [
"MIT"
] | null | null | null | from random import randint
from time import sleep
computador = randint(0, 10)
print('-❤-' * 14)
print('Vou pensar em um numero entre 0 e 10. tente adivinhar!! ')
print('-❤-' * 14)
jogador = int(input('Em que número eu pensei? '))
print('Processando...')
sleep(2.5)
if jogador == computador:
print('Parabêns!! você Ga... | 29.285714 | 74 | 0.67561 |
acfb257d364e973c583da423ff8cda082bde1e47 | 1,357 | py | Python | test/test_resource_collection_community_action_template_resource.py | cvent/octopus-deploy-api-client | 0e03e842e1beb29b132776aee077df570b88366a | [
"Apache-2.0"
] | null | null | null | test/test_resource_collection_community_action_template_resource.py | cvent/octopus-deploy-api-client | 0e03e842e1beb29b132776aee077df570b88366a | [
"Apache-2.0"
] | null | null | null | test/test_resource_collection_community_action_template_resource.py | cvent/octopus-deploy-api-client | 0e03e842e1beb29b132776aee077df570b88366a | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Octopus Server API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 2019.6.7+Branch.tags-2019.6.7.Sha.aa18dc6809953218c66f57eff7d26481d9b23d6a
Generated by: https://github.com/swagger-api... | 33.097561 | 175 | 0.793662 |
acfb25c51f660470638db43fcdf30ff6b173aeb8 | 8,170 | py | Python | mmdet/models/detectors/two_stage.py | CK-er/mmdet | 9bea4068efbcf7bf739dbe41917a68d525c29868 | [
"Apache-2.0"
] | null | null | null | mmdet/models/detectors/two_stage.py | CK-er/mmdet | 9bea4068efbcf7bf739dbe41917a68d525c29868 | [
"Apache-2.0"
] | null | null | null | mmdet/models/detectors/two_stage.py | CK-er/mmdet | 9bea4068efbcf7bf739dbe41917a68d525c29868 | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
from mmdet.core import bbox2result, bbox2roi, build_assigner, build_sampler
from ..builder import DETECTORS, build_backbone, build_head, build_neck
from .base import BaseDetector
@DETECTORS.register_module()
class TwoStageDetector(BaseDetector):
"""Base class for two-stage dete... | 38.537736 | 141 | 0.55716 |
acfb26bcf5d7caea28f9a73a3763f9aaf276f3fd | 2,810 | py | Python | asv_bench/benchmarks/frame_ctor.py | mtrbean/pandas | c0ff67a22df9c18da1172766e313732ed2ab6c30 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 5 | 2019-07-26T15:22:41.000Z | 2021-09-28T09:22:17.000Z | asv_bench/benchmarks/frame_ctor.py | mtrbean/pandas | c0ff67a22df9c18da1172766e313732ed2ab6c30 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2019-08-18T16:00:45.000Z | 2019-08-18T16:00:45.000Z | asv_bench/benchmarks/frame_ctor.py | mtrbean/pandas | c0ff67a22df9c18da1172766e313732ed2ab6c30 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 3 | 2019-07-26T10:47:23.000Z | 2020-08-10T12:40:32.000Z | import numpy as np
import pandas.util.testing as tm
from pandas import DataFrame, Series, MultiIndex, Timestamp, date_range
try:
from pandas.tseries.offsets import Nano, Hour
except ImportError:
# For compatibility with older versions
from pandas.core.datetools import * # noqa
class FromDicts:
def s... | 26.018519 | 88 | 0.643416 |
acfb29aff5583055d34ddbb5937133bea5d94281 | 2,219 | py | Python | vb2py/PythonCard/components/togglebutton.py | ceprio/xl_vb2py | 899fec0301140fd8bd313e8c80b3fa839b3f5ee4 | [
"BSD-3-Clause"
] | null | null | null | vb2py/PythonCard/components/togglebutton.py | ceprio/xl_vb2py | 899fec0301140fd8bd313e8c80b3fa839b3f5ee4 | [
"BSD-3-Clause"
] | null | null | null | vb2py/PythonCard/components/togglebutton.py | ceprio/xl_vb2py | 899fec0301140fd8bd313e8c80b3fa839b3f5ee4 | [
"BSD-3-Clause"
] | null | null | null |
"""
__version__ = "$Revision: 1.2 $"
__date__ = "$Date: 2004/05/13 02:40:24 $"
"""
import wx
from PythonCard import event, widget
# KEA 2004-05-06
# expose the same interface as CheckBox
class ToggleButtonMouseClickEvent(event.MouseClickEvent):
binding = wx.EVT_TOGGLEBUTTON
id = wx.wxEVT_COMMAND_TOGGLEBUTTO... | 31.253521 | 87 | 0.676431 |
acfb29bbcad1481fcad44e65075713562087d8da | 763 | py | Python | jumper/pattern.py | ccmikechen/Jumper-Game | b68a03cdfee27cea2bfb321f77b57ce80904bef6 | [
"MIT"
] | null | null | null | jumper/pattern.py | ccmikechen/Jumper-Game | b68a03cdfee27cea2bfb321f77b57ce80904bef6 | [
"MIT"
] | null | null | null | jumper/pattern.py | ccmikechen/Jumper-Game | b68a03cdfee27cea2bfb321f77b57ce80904bef6 | [
"MIT"
] | 1 | 2017-12-19T17:42:52.000Z | 2017-12-19T17:42:52.000Z | from random import randint
from jumper.config import config
class Pattern:
def __init__(self, env, level):
self.env = env
self.levels = 0
self.platforms = []
self.items = []
self.objects = []
self.monsters = []
def get_levels(self):
return self.levels
... | 21.8 | 58 | 0.589777 |
acfb2ad2c6bd22a4c204984b6a94b6ad22b542f6 | 27,360 | py | Python | airflow/providers/google/cloud/operators/compute.py | mmaton/airflow | 16f43605f3370f20611ba9e08b568ff8a7cd433d | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2021-03-10T03:37:28.000Z | 2021-03-10T03:37:28.000Z | airflow/providers/google/cloud/operators/compute.py | mmaton/airflow | 16f43605f3370f20611ba9e08b568ff8a7cd433d | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2021-02-21T15:12:02.000Z | 2021-02-21T15:12:02.000Z | airflow/providers/google/cloud/operators/compute.py | yohei1126/airflow | b718495e4caecb753742c3eb22919411a715f24a | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 41.517451 | 108 | 0.666374 |
acfb2cbcd7c26a2a06ac4aebcf0a63b432d6c06d | 10,284 | py | Python | numba/decorators.py | tolysz/numba | d7953a18dbf5ea231dc16e967ce8e9b754578ea6 | [
"Apache-2.0",
"BSD-2-Clause"
] | null | null | null | numba/decorators.py | tolysz/numba | d7953a18dbf5ea231dc16e967ce8e9b754578ea6 | [
"Apache-2.0",
"BSD-2-Clause"
] | 1 | 2019-02-11T13:46:30.000Z | 2019-02-11T13:46:30.000Z | numba/decorators.py | asodeur/numba | d7953a18dbf5ea231dc16e967ce8e9b754578ea6 | [
"Apache-2.0",
"BSD-2-Clause"
] | null | null | null | """
Define @jit and related decorators.
"""
import sys
import warnings
import inspect
import logging
from . import config, sigutils
from .errors import DeprecationError, NumbaDeprecationWarning
from .targets import registry
from .stencil import stencil
_logger = logging.getLogger(__name__)
# --------------------... | 35.958042 | 81 | 0.620284 |
acfb2cfcd1ff9555e95d2279e1c4a1d235d8382f | 50,344 | py | Python | Tests/Marketplace/upload_packs.py | rod-castillo/content | 689692d98ce721c0823190c112f089953a4a31d8 | [
"MIT"
] | null | null | null | Tests/Marketplace/upload_packs.py | rod-castillo/content | 689692d98ce721c0823190c112f089953a4a31d8 | [
"MIT"
] | null | null | null | Tests/Marketplace/upload_packs.py | rod-castillo/content | 689692d98ce721c0823190c112f089953a4a31d8 | [
"MIT"
] | null | null | null | import json
import os
import sys
import argparse
import shutil
import uuid
import prettytable
import glob
import requests
import logging
from datetime import datetime
from zipfile import ZipFile
from typing import Any, Tuple, Union
from Tests.Marketplace.marketplace_services import init_storage_client, init_bigquery_cl... | 46.314627 | 120 | 0.681154 |
acfb2dc705ccd34238f2a1018f8ee51cd39db204 | 3,601 | py | Python | addressnet/model.py | Ryancodeshard/address-net | 4763a12e34af137a71de3b284c357f1f953e856e | [
"MIT"
] | null | null | null | addressnet/model.py | Ryancodeshard/address-net | 4763a12e34af137a71de3b284c357f1f953e856e | [
"MIT"
] | null | null | null | addressnet/model.py | Ryancodeshard/address-net | 4763a12e34af137a71de3b284c357f1f953e856e | [
"MIT"
] | null | null | null | from typing import Dict, Optional
import tensorflow as tf
from addressnet.dataset import vocab, n_labels
def model_fn(features: Dict[str, tf.Tensor], labels: tf.Tensor, mode: str, params) -> tf.estimator.EstimatorSpec:
"""
The AddressNet model function suitable for tf.estimator.Estimator
:param features... | 47.381579 | 119 | 0.698139 |
acfb2ec451b8912a57ca31959eda753a331103e1 | 1,422 | py | Python | codes/scripts/audio/librivox/preprocess_libritts.py | neonbjb/DL-Art-School | a6f0f854b987ac724e258af8b042ea4459a571bc | [
"Apache-2.0"
] | 12 | 2020-12-13T12:45:03.000Z | 2022-03-29T09:58:15.000Z | codes/scripts/audio/librivox/preprocess_libritts.py | neonbjb/DL-Art-School | a6f0f854b987ac724e258af8b042ea4459a571bc | [
"Apache-2.0"
] | 1 | 2020-12-31T01:12:45.000Z | 2021-03-31T11:43:52.000Z | codes/scripts/audio/librivox/preprocess_libritts.py | neonbjb/DL-Art-School | a6f0f854b987ac724e258af8b042ea4459a571bc | [
"Apache-2.0"
] | 3 | 2020-12-14T06:04:04.000Z | 2020-12-26T19:11:41.000Z | # Combines all libriTTS WAV->text mappings into a single file
import os
from tqdm import tqdm
if __name__ == '__main__':
libri_root = 'E:\\audio\\LibriTTS'
basis = 'train-clean-360'
readers = os.listdir(os.path.join(libri_root, basis))
ofile = open(os.path.join(libri_root, f'{basis}_list.txt'), 'w', ... | 43.090909 | 92 | 0.575949 |
acfb30776aec7f43bf37ea573bff0f984002ac41 | 3,236 | py | Python | profiles_project/settings.py | pvgirish/profiles-rest-api | 33428c14f708b1f6390286921e172deb2719dbe2 | [
"MIT"
] | 1 | 2021-06-03T06:00:05.000Z | 2021-06-03T06:00:05.000Z | profiles_project/settings.py | pvgirish/profiles-rest-api | 33428c14f708b1f6390286921e172deb2719dbe2 | [
"MIT"
] | null | null | null | profiles_project/settings.py | pvgirish/profiles-rest-api | 33428c14f708b1f6390286921e172deb2719dbe2 | [
"MIT"
] | null | null | null | """
Django settings for profiles_project project.
Generated by 'django-admin startproject' using Django 2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
impor... | 25.68254 | 91 | 0.699938 |
acfb30b718702ee7a05b4861c2f9276110dd331e | 338 | py | Python | 03_EstruturasRepeticao/13_potenciacao.py | eduardovivi/Python_tests | b70d009d6180b136c50ccfec343a13f2c09b8029 | [
"MIT"
] | null | null | null | 03_EstruturasRepeticao/13_potenciacao.py | eduardovivi/Python_tests | b70d009d6180b136c50ccfec343a13f2c09b8029 | [
"MIT"
] | null | null | null | 03_EstruturasRepeticao/13_potenciacao.py | eduardovivi/Python_tests | b70d009d6180b136c50ccfec343a13f2c09b8029 | [
"MIT"
] | null | null | null | base = int(raw_input('Informe o valor da base: '))
expoente = 0
while (expoente <= 0):
expoente = int(raw_input('Informe o valor do expoente: '))
if (expoente <= 0):
print 'O expoente deve ser positivo!'
potencia = 1
for i in range(1, expoente + 1):
potencia *= base
print base, 'elevada a', expoen... | 26 | 62 | 0.639053 |
acfb324570bfd82a32b4604029a6b0604fb2d8c3 | 5,202 | py | Python | ipproxytool/spiders/validator/validator.py | k1tCooler/himasoft | 546f11aafa9f17c36fc0f3bd98f3df5e4fe154b1 | [
"MIT"
] | null | null | null | ipproxytool/spiders/validator/validator.py | k1tCooler/himasoft | 546f11aafa9f17c36fc0f3bd98f3df5e4fe154b1 | [
"MIT"
] | 3 | 2021-03-18T20:24:09.000Z | 2021-12-13T19:44:52.000Z | ipproxytool/spiders/validator/validator.py | k1tCooler/himasoft | 546f11aafa9f17c36fc0f3bd98f3df5e4fe154b1 | [
"MIT"
] | null | null | null | #-*- coding: utf-8 -*-
import random
import time
import datetime
import utils
import config
from scrapy import Request
from scrapy.spiders import Spider
from sql import SqlManager
class Validator(Spider):
name = 'base'
concurrent_requests = 16
retry_enabled = False
def __init__(self, name=None, **kw... | 33.779221 | 81 | 0.553825 |
acfb33730892c27922f22a442ef653a991ddabcd | 70 | py | Python | filters/encoding.py | adibalcan/crawlingbot | 9f2a8b13dccafcc07cf7760e1498cf51cf691277 | [
"MIT"
] | 1 | 2016-10-07T14:10:58.000Z | 2016-10-07T14:10:58.000Z | filters/encoding.py | adibalcan/crawlingbot | 9f2a8b13dccafcc07cf7760e1498cf51cf691277 | [
"MIT"
] | null | null | null | filters/encoding.py | adibalcan/crawlingbot | 9f2a8b13dccafcc07cf7760e1498cf51cf691277 | [
"MIT"
] | null | null | null | def filter(source, meta={}):
return meta["response"].textencoding
| 23.333333 | 40 | 0.7 |
acfb33b06b81656275c5dd55b35a465e1d0c2c0a | 3,762 | py | Python | python-examples/primary-example.py | BrainsOnBoard/eye-renderer | 59ae026fcb08e029500d1d0a8f152a37200ba260 | [
"MIT"
] | 2 | 2021-10-07T07:08:47.000Z | 2021-11-02T15:52:14.000Z | python-examples/primary-example.py | BrainsOnBoard/eye-renderer | 59ae026fcb08e029500d1d0a8f152a37200ba260 | [
"MIT"
] | 1 | 2021-10-07T09:21:51.000Z | 2021-11-01T21:52:30.000Z | python-examples/primary-example.py | BrainsOnBoard/compound-ray | 59ae026fcb08e029500d1d0a8f152a37200ba260 | [
"MIT"
] | 1 | 2021-11-07T12:51:58.000Z | 2021-11-07T12:51:58.000Z | import os.path
import time
from ctypes import *
from sys import platform
from numpy.ctypeslib import ndpointer
import numpy as np
from PIL import Image
import eyeRendererHelperFunctions as eyeTools
# Makes sure we have a "test-images" folder
if not os.path.exists("test-images"):
os.mkdir("test-images")
sleepTim... | 36.524272 | 113 | 0.720627 |
acfb3498d274f0076d94c8e74ab01abcd048ae6a | 161 | py | Python | src/pytheas/data/annotation_state.py | dcronkite/pytheas | 3cdd6a21bda488e762931cbf5975964d5e574abd | [
"MIT"
] | null | null | null | src/pytheas/data/annotation_state.py | dcronkite/pytheas | 3cdd6a21bda488e762931cbf5975964d5e574abd | [
"MIT"
] | null | null | null | src/pytheas/data/annotation_state.py | dcronkite/pytheas | 3cdd6a21bda488e762931cbf5975964d5e574abd | [
"MIT"
] | null | null | null | import enum
class AnnotationState(enum.Enum):
READY = 0
IN_PROGRESS = 1
DONE = 2
DELETED = 3
ON_HOLD = 4
NOT_READY = 5
SKIPPED = 6
| 13.416667 | 33 | 0.590062 |
acfb361ecf67625a472d33e5a06fd297ca52c30b | 25,778 | py | Python | read_write_DIC_files/bubble_data_helper/BubbleDataHelper.py | cjekel/inverse_bubble_inflation | 9ec50f65cc42d4fa49af0829f90a0bf98b6a3bf4 | [
"MIT"
] | null | null | null | read_write_DIC_files/bubble_data_helper/BubbleDataHelper.py | cjekel/inverse_bubble_inflation | 9ec50f65cc42d4fa49af0829f90a0bf98b6a3bf4 | [
"MIT"
] | 2 | 2018-07-09T20:55:31.000Z | 2018-08-06T23:04:11.000Z | read_write_DIC_files/bubble_data_helper/BubbleDataHelper.py | cjekel/inverse_bubble_inflation | 9ec50f65cc42d4fa49af0829f90a0bf98b6a3bf4 | [
"MIT"
] | 1 | 2018-05-17T18:51:03.000Z | 2018-05-17T18:51:03.000Z | # -*- coding: utf-8 -*-
# =============================================================================
# MIT License
#
# Copyright (c) 2018 Andrés Bernardo
# Copyright (c) 2019 Charles Jekel
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation... | 47.386029 | 99 | 0.530491 |
acfb362c9632c2c667375806322e5ef53e2d4fe7 | 7,365 | py | Python | smeter.py | kkatayama/basic_site | c71cb2c574d63f55e3a90422f31c17e20d7897b3 | [
"MIT"
] | null | null | null | smeter.py | kkatayama/basic_site | c71cb2c574d63f55e3a90422f31c17e20d7897b3 | [
"MIT"
] | 4 | 2021-03-03T15:12:13.000Z | 2021-03-03T15:13:30.000Z | smeter.py | kkatayama/basic_site | c71cb2c574d63f55e3a90422f31c17e20d7897b3 | [
"MIT"
] | null | null | null | # coding: utf-8
from bottle import Bottle, route, request, redirect, run, template, static_file, debug
import pandas as pd
import requests
import string
import json
import sys
import os
app = Bottle()
##########################################
# GLOBAL VARIABLES / SETTINGS #
##############################... | 37.01005 | 312 | 0.609097 |
acfb36c01b91dcc2390e79ad7873767433fe39d7 | 2,633 | py | Python | src/unladen/filesystem.py | dfm/ladv | 580867c01fd3e696f1fdeffb6f979f2c48f898e6 | [
"MIT"
] | 1 | 2021-05-05T21:07:31.000Z | 2021-05-05T21:07:31.000Z | src/unladen/filesystem.py | dfm/unladen | 580867c01fd3e696f1fdeffb6f979f2c48f898e6 | [
"MIT"
] | null | null | null | src/unladen/filesystem.py | dfm/unladen | 580867c01fd3e696f1fdeffb6f979f2c48f898e6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
__all__ = ["copy_source_to_target"]
import shutil
from glob import glob
from pathlib import Path
from typing import Iterable, Optional
from . import html
from .versions import Database, Rule, Version
def copy_source_to_target(
*,
source: Path,
target: Path,
version: Version,... | 28.010638 | 75 | 0.617167 |
acfb36df6187406c9c697ef673a0c2b12d774091 | 1,525 | py | Python | mazeGen.py | Kartik-Nagpal/Tank-Trouble-IQ-Tester | 8b125710b2c31cafd5eb4aa614094746806337df | [
"MIT"
] | null | null | null | mazeGen.py | Kartik-Nagpal/Tank-Trouble-IQ-Tester | 8b125710b2c31cafd5eb4aa614094746806337df | [
"MIT"
] | null | null | null | mazeGen.py | Kartik-Nagpal/Tank-Trouble-IQ-Tester | 8b125710b2c31cafd5eb4aa614094746806337df | [
"MIT"
] | null | null | null | import numpy
from numpy.random import random_integers as rand
import matplotlib.pyplot as pyplot
def mazeGen(width=20, height=20, complexity=.1, density=.3):
# Only odd shapes
shape = ((height//2)*2 + 1, (width//2)*2 + 1);
# Adjust complexity and density relative to maze size
complexity = int(complexit... | 33.888889 | 89 | 0.487213 |
acfb374033d6bc7cfb6774f67c3ab0db80736680 | 5,708 | py | Python | tests/custom_assertions.py | jlanga/exfi | 6cd28423213aba0ab8ac191e002396ddc84c4be3 | [
"MIT"
] | 2 | 2017-11-02T11:31:41.000Z | 2020-11-28T07:42:27.000Z | tests/custom_assertions.py | jlanga/exfi | 6cd28423213aba0ab8ac191e002396ddc84c4be3 | [
"MIT"
] | 36 | 2017-04-26T09:36:54.000Z | 2021-04-16T12:35:52.000Z | tests/custom_assertions.py | jlanga/exon_finder | 6cd28423213aba0ab8ac191e002396ddc84c4be3 | [
"MIT"
] | 2 | 2017-07-23T23:03:36.000Z | 2017-09-29T15:30:55.000Z | #!/usr/bin/env python3
"""
tests.custom_assertions.py: custom assertions for unit tests:
- assertEqualListOfSeqrecords: check if a list of seqrecords have:
- the same length
- the same id
- the same sequence
- assertEqualSpliceGraphs: check if two splice graphs:
- are isomorphic with nx.is_isomorphic
... | 32.067416 | 98 | 0.667835 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.