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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
02c3032f7fcf222c4dcbaeab9a4990232ced4e2b | 3,948 | py | Python | auxilium/__init__.py | sonntagsgesicht/auxilium | f4e34089d6230e4a2957cf8c2f462210c6c714f0 | [
"Apache-2.0"
] | null | null | null | auxilium/__init__.py | sonntagsgesicht/auxilium | f4e34089d6230e4a2957cf8c2f462210c6c714f0 | [
"Apache-2.0"
] | null | null | null | auxilium/__init__.py | sonntagsgesicht/auxilium | f4e34089d6230e4a2957cf8c2f462210c6c714f0 | [
"Apache-2.0"
] | 1 | 2020-03-12T22:51:27.000Z | 2020-03-12T22:51:27.000Z | # -*- coding: utf-8 -*-
# auxilium
# --------
# Python project for an automated test and deploy toolkit.
#
# Author: sonntagsgesicht
# Version: 0.2.8, copyright Friday, 14 January 2022
# Website: https://github.com/sonntagsgesicht/auxilium
# License: Apache License 2.0 (see LICENSE file)
from logging import log... | 33.457627 | 79 | 0.636272 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,619 | 0.410081 |
02c4f7ff3bc4a17aba2744ac9fa57ef882474bfa | 7,875 | py | Python | importtime_output_wrapper.py | Victor333Huesca/importtime-output-wrapper | 15941ffe30a93a2d5ec1832e16df160caa1d51e4 | [
"MIT"
] | 1 | 2021-02-10T13:15:47.000Z | 2021-02-10T13:15:47.000Z | importtime_output_wrapper.py | dominikwalk/importtime_output_wrapper | 67c94371cd92ea66f4dbdd8840cf6120db4160c0 | [
"MIT"
] | 1 | 2021-09-01T19:25:33.000Z | 2021-09-01T19:25:33.000Z | importtime_output_wrapper.py | dominikwalk/importtime_output_wrapper | 67c94371cd92ea66f4dbdd8840cf6120db4160c0 | [
"MIT"
] | null | null | null | import re
import subprocess
import shutil
import sys
import json
import argparse
from typing import List, NamedTuple, Optional, Sequence
PATTERN_IMPORT_TIME = re.compile(r"^import time:\s+(\d+) \|\s+(\d+) \|(\s+.*)")
class InvalidInput(Exception):
pass
class Import(dict):
def __init__(self, name: str, t_s... | 30.405405 | 117 | 0.590349 | 360 | 0.045714 | 0 | 0 | 0 | 0 | 0 | 0 | 1,907 | 0.242159 |
02c5550343d841d31714a9ed5ade721bffe3bee2 | 6,631 | py | Python | test/unit/test_params.py | davvil/sockeye | 188db761d314a913b88a5ff44395abb77797e5b9 | [
"Apache-2.0"
] | 1,117 | 2017-06-12T15:11:12.000Z | 2022-03-23T00:53:51.000Z | test/unit/test_params.py | davvil/sockeye | 188db761d314a913b88a5ff44395abb77797e5b9 | [
"Apache-2.0"
] | 553 | 2017-06-14T09:24:10.000Z | 2022-03-31T20:17:23.000Z | test/unit/test_params.py | davvil/sockeye | 188db761d314a913b88a5ff44395abb77797e5b9 | [
"Apache-2.0"
] | 369 | 2017-06-12T15:22:34.000Z | 2022-03-30T19:32:27.000Z | # Copyright 2017--2019 Amazon.com, Inc. or its affiliates. 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. A copy of the License
# is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" fi... | 47.028369 | 119 | 0.663248 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,899 | 0.286382 |
02c5bed1bce16f210d130ab65cdc1e0b0a119b39 | 8,194 | py | Python | code/utils/data_preparation.py | cltl/positive-interpretations | 27640be255e8072b3333851f605c13c80e5d7ed3 | [
"Apache-2.0"
] | null | null | null | code/utils/data_preparation.py | cltl/positive-interpretations | 27640be255e8072b3333851f605c13c80e5d7ed3 | [
"Apache-2.0"
] | null | null | null | code/utils/data_preparation.py | cltl/positive-interpretations | 27640be255e8072b3333851f605c13c80e5d7ed3 | [
"Apache-2.0"
] | null | null | null | import csv
import collections
import pandas as pd
from random import shuffle
from tqdm import tqdm
def get_all_tokens_conll(conll_file):
"""
Reads a CoNLL-2011 file and returns all tokens with their annotations in a dataframe including the original
sentence identifiers from OntoNotes
"""
all_toke... | 45.522222 | 117 | 0.569929 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,182 | 0.266292 |
02c6de12abd9a20df4664b77466fae5d81958b59 | 800 | py | Python | {{ cookiecutter.project_name }}/setup.py | wlongxiang/cookiecutter-data-science | bbae41e22ac7db74430f3c6b457c2ff7f52537e1 | [
"MIT"
] | null | null | null | {{ cookiecutter.project_name }}/setup.py | wlongxiang/cookiecutter-data-science | bbae41e22ac7db74430f3c6b457c2ff7f52537e1 | [
"MIT"
] | null | null | null | {{ cookiecutter.project_name }}/setup.py | wlongxiang/cookiecutter-data-science | bbae41e22ac7db74430f3c6b457c2ff7f52537e1 | [
"MIT"
] | null | null | null | from setuptools import find_packages, setup
import re
VERSIONFILE = "{{ cookiecutter.project_name }}/__init__.py"
with open(VERSIONFILE, "rt") as versionfle:
verstrline = versionfle.read()
version_re = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(version_re, verstrline, re.M)
if mo:
ver_str = mo.group(... | 30.769231 | 77 | 0.6975 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 317 | 0.39625 |
02c7a6f45d41d451a3a0c3c43389880ddc7a1852 | 8,759 | py | Python | square/api/cards_api.py | codertjay/square-python-sdk | 1f5f34bc792e31991db0fb2756d92c717f2dcfa4 | [
"Apache-2.0"
] | 1 | 2022-02-28T13:18:30.000Z | 2022-02-28T13:18:30.000Z | square/api/cards_api.py | codertjay/square-python-sdk | 1f5f34bc792e31991db0fb2756d92c717f2dcfa4 | [
"Apache-2.0"
] | null | null | null | square/api/cards_api.py | codertjay/square-python-sdk | 1f5f34bc792e31991db0fb2756d92c717f2dcfa4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from square.api_helper import APIHelper
from square.http.api_response import ApiResponse
from square.api.base_api import BaseApi
class CardsApi(BaseApi):
"""A Controller to access Endpoints in the square API."""
def __init__(self, config, auth_managers, call_back=None):
super... | 36.194215 | 120 | 0.612513 | 8,602 | 0.982076 | 0 | 0 | 0 | 0 | 0 | 0 | 4,652 | 0.531111 |
02c8b5302247d3f0de4a0fcfd8043adc64146600 | 1,564 | py | Python | setup.py | nilp0inter/threadedprocess | 0120d6e795782c9f527397490846cd214d9196e1 | [
"PSF-2.0"
] | 9 | 2018-03-21T22:19:10.000Z | 2021-06-08T12:10:15.000Z | setup.py | nilp0inter/threadedprocess | 0120d6e795782c9f527397490846cd214d9196e1 | [
"PSF-2.0"
] | 3 | 2019-09-18T19:57:28.000Z | 2020-07-17T08:06:54.000Z | setup.py | nilp0inter/threadedprocess | 0120d6e795782c9f527397490846cd214d9196e1 | [
"PSF-2.0"
] | 4 | 2018-03-24T23:10:38.000Z | 2020-06-18T02:26:24.000Z | import os
from setuptools import setup
try:
import concurrent.futures
except ImportError:
CONCURRENT_FUTURES_PRESENT = False
else:
CONCURRENT_FUTURES_PRESENT = True
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name="threadedprocess",
version="0.... | 34 | 71 | 0.658568 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 887 | 0.567136 |
02c90b77315d19cadcdffd4cbada1b9dd920626e | 2,592 | py | Python | coremltools/converters/mil/mil/passes/const_elimination.py | VadimLevin/coremltools | 66c17b0fa040a0d8088d33590ab5c355478a9e5c | [
"BSD-3-Clause"
] | 3 | 2018-10-02T17:23:01.000Z | 2020-08-15T04:47:07.000Z | coremltools/converters/mil/mil/passes/const_elimination.py | holzschu/coremltools | 5ece9069a1487d5083f00f56afe07832d88e3dfa | [
"BSD-3-Clause"
] | null | null | null | coremltools/converters/mil/mil/passes/const_elimination.py | holzschu/coremltools | 5ece9069a1487d5083f00f56afe07832d88e3dfa | [
"BSD-3-Clause"
] | 1 | 2021-05-07T15:38:20.000Z | 2021-05-07T15:38:20.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2020, Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can be
# found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
import numpy as np
from coremltools.converters.mil.mil import Builder as mb... | 32 | 83 | 0.58179 | 0 | 0 | 0 | 0 | 685 | 0.264275 | 0 | 0 | 1,108 | 0.427469 |
02c92d6241ebe854f6a64f06a949f8d5440cd141 | 13,749 | py | Python | matching/retrieval.py | Macielyoung/sentence_representation_matching | aa33147eb870a805f69dbc54c2177b11a94cf814 | [
"Apache-2.0"
] | 22 | 2022-01-24T10:08:39.000Z | 2022-03-31T10:47:05.000Z | matching/retrieval.py | Macielyoung/sentence_representation_matching | aa33147eb870a805f69dbc54c2177b11a94cf814 | [
"Apache-2.0"
] | 3 | 2022-03-06T11:52:25.000Z | 2022-03-15T06:32:17.000Z | matching/retrieval.py | Macielyoung/sentence_representation_matching | aa33147eb870a805f69dbc54c2177b11a94cf814 | [
"Apache-2.0"
] | 5 | 2022-02-28T09:13:04.000Z | 2022-03-22T12:50:09.000Z | from simcse import SimCSE
from esimcse import ESimCSE
from promptbert import PromptBERT
from sbert import SBERT
from cosent import CoSent
from config import Params
from log import logger
import torch
from transformers import AutoTokenizer
class SimCSERetrieval(object):
def __init__(self, pretrained_model_path, si... | 48.928826 | 128 | 0.630664 | 11,228 | 0.816641 | 0 | 0 | 0 | 0 | 0 | 0 | 1,689 | 0.122845 |
02c969f151e36baef658a4ae669ed82de7db3bc7 | 15,885 | py | Python | Backend/src/awattprice/notifications.py | a8/AWattPrice | 008df74b66f4790276f847eecb4e05536d66b518 | [
"BSD-3-Clause"
] | null | null | null | Backend/src/awattprice/notifications.py | a8/AWattPrice | 008df74b66f4790276f847eecb4e05536d66b518 | [
"BSD-3-Clause"
] | 1 | 2021-05-31T06:07:21.000Z | 2021-05-31T06:07:21.000Z | Backend/src/awattprice/notifications.py | a8/AWattPrice | 008df74b66f4790276f847eecb4e05536d66b518 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Check which users apply to receive certain notifications.
Send notifications via APNs to those users.
"""
import asyncio
import json
from datetime import datetime
from math import floor
from pathlib import Path
from typing import List, Optional, Tuple
import arrow # type: ignore
impor... | 41.25974 | 174 | 0.629902 | 4,683 | 0.294806 | 0 | 0 | 5,441 | 0.342524 | 10,171 | 0.64029 | 4,423 | 0.278439 |
02ca7b014cd9960cd4ff5fbac17c8225edc804e1 | 821 | py | Python | examples/charts/horizon.py | timelyportfolio/bokeh | a976a85535cf137c6238ce9e90b41ab14ae8ce22 | [
"BSD-3-Clause"
] | 1 | 2015-07-17T13:57:01.000Z | 2015-07-17T13:57:01.000Z | examples/charts/horizon.py | timelyportfolio/bokeh | a976a85535cf137c6238ce9e90b41ab14ae8ce22 | [
"BSD-3-Clause"
] | null | null | null | examples/charts/horizon.py | timelyportfolio/bokeh | a976a85535cf137c6238ce9e90b41ab14ae8ce22 | [
"BSD-3-Clause"
] | 1 | 2021-08-01T08:38:53.000Z | 2021-08-01T08:38:53.000Z | from collections import OrderedDict
import pandas as pd
from bokeh.charts import Horizon, output_file, show
# read in some stock data from the Yahoo Finance API
AAPL = pd.read_csv(
"http://ichart.yahoo.com/table.csv?s=AAPL&a=0&b=1&c=2000&d=0&e=1&f=2010",
parse_dates=['Date'])
MSFT = pd.read_csv(
"http://... | 24.147059 | 77 | 0.662607 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 377 | 0.459196 |
02cb62a1399f0fec841542f9ed5b1a63b1a1c4d2 | 4,023 | py | Python | backend.py | CameronStollery/road-trip-planner | 440207ccb9273123695c04ec3027b7822413bf2c | [
"MIT"
] | 1 | 2020-08-18T13:21:00.000Z | 2020-08-18T13:21:00.000Z | backend.py | CameronStollery/road-trip-planner | 440207ccb9273123695c04ec3027b7822413bf2c | [
"MIT"
] | 1 | 2020-08-11T10:24:49.000Z | 2020-08-11T14:49:22.000Z | backend.py | CameronStollery/road-trip-planner | 440207ccb9273123695c04ec3027b7822413bf2c | [
"MIT"
] | null | null | null | # from __future__ import print_function
import pymzn
import time
from pprint import pprint
from collections import OrderedDict
import openrouteservice
from openrouteservice.geocode import pelias_search
from openrouteservice.distance_matrix import distance_matrix
client = openrouteservice.Client(key='')
# routes = cli... | 34.384615 | 123 | 0.637584 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,953 | 0.485459 |
02cbfb02bf42141ca374969c292f1c21a9ad8577 | 597 | py | Python | examples/python/django/load-generator.py | ScriptBox99/pyroscope | fbf5bd297caf6a987f9fb6ffd0240ed804eaf9b4 | [
"Apache-2.0"
] | 5,751 | 2021-01-01T18:58:15.000Z | 2022-03-31T19:19:39.000Z | examples/python/django/load-generator.py | ScriptBox99/pyroscope | fbf5bd297caf6a987f9fb6ffd0240ed804eaf9b4 | [
"Apache-2.0"
] | 913 | 2021-01-05T07:46:12.000Z | 2022-03-31T20:04:39.000Z | examples/python/django/load-generator.py | admariner/pyroscope | e13afb40348914ae29b813881bfad0ca3b89f250 | [
"Apache-2.0"
] | 329 | 2021-01-11T06:25:55.000Z | 2022-03-29T08:19:33.000Z | import random
import requests
import time
HOSTS = [
'us-east-1',
'us-west-1',
'eu-west-1',
]
VEHICLES = [
'bike',
'scooter',
'car',
]
if __name__ == "__main__":
print(f"starting load generator")
time.sleep(15)
print('done sleeping')
while True:
host = HOSTS[random.rand... | 21.321429 | 64 | 0.582915 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 185 | 0.309883 |
02cc889fddc76c8e78693be834e7b5343b8c87f5 | 3,148 | py | Python | python/Multi-Service/content_moderator_cs.py | kyichii/cognitive-services-quickstart-code | a48549dd6b1fbb795fbe3cc5286c888306b6eb79 | [
"MIT"
] | 2 | 2020-12-06T18:05:30.000Z | 2020-12-09T17:01:21.000Z | python/Multi-Service/content_moderator_cs.py | diberry/cognitive-services-quickstart-code | 53972838ff64937e099c6886ff4a3c019b2ef346 | [
"MIT"
] | null | null | null | python/Multi-Service/content_moderator_cs.py | diberry/cognitive-services-quickstart-code | 53972838ff64937e099c6886ff4a3c019b2ef346 | [
"MIT"
] | null | null | null | import os
from pprint import pprint
from msrest.authentication import CognitiveServicesCredentials
from azure.cognitiveservices.vision.contentmoderator import ContentModeratorClient
from azure.cognitiveservices.vision.contentmoderator.models import ( Evaluate, OCR, FoundFaces )
'''
This quickstart uses Content Modera... | 39.35 | 115 | 0.750318 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,510 | 0.47967 |
02cee01f37525203bf54b532eb16ee060a8b571e | 1,498 | py | Python | usda_nutrition/admin.py | danielnaab/django-usda-nutrition | ba05bf741844a1858ad4bc2474e0640cba42994c | [
"BSD-3-Clause"
] | 11 | 2017-01-18T19:57:11.000Z | 2021-06-19T08:03:21.000Z | usda_nutrition/admin.py | danielnaab/django-usda-nutrition | ba05bf741844a1858ad4bc2474e0640cba42994c | [
"BSD-3-Clause"
] | 3 | 2017-09-24T01:09:42.000Z | 2021-08-11T02:44:55.000Z | usda_nutrition/admin.py | danielnaab/django-usda-nutrition | ba05bf741844a1858ad4bc2474e0640cba42994c | [
"BSD-3-Clause"
] | 8 | 2016-09-20T17:46:39.000Z | 2020-04-24T16:20:44.000Z | from django.contrib import admin
from . import models
class ReadOnlyAdminMixin():
def get_readonly_fields(self, request, obj=None):
return list(set(
[field.name for field in self.opts.local_fields] +
[field.name for field in self.opts.local_many_to_many]
))
class ReadOnl... | 28.264151 | 77 | 0.763017 | 1,002 | 0.668892 | 0 | 0 | 0 | 0 | 0 | 0 | 241 | 0.160881 |
02cf4f4a30c1e8ca50d5538321deac3fbf7ca247 | 1,779 | py | Python | FisherExactTest/FisherExactTest.py | Ae-Mc/Fisher | 166e3ac68e304ed7418393d6a7717dd6f7032c15 | [
"MIT"
] | null | null | null | FisherExactTest/FisherExactTest.py | Ae-Mc/Fisher | 166e3ac68e304ed7418393d6a7717dd6f7032c15 | [
"MIT"
] | null | null | null | FisherExactTest/FisherExactTest.py | Ae-Mc/Fisher | 166e3ac68e304ed7418393d6a7717dd6f7032c15 | [
"MIT"
] | null | null | null | from decimal import Decimal
def Binominal(n: int, k: int) -> int:
if k > n:
return 0
result = 1
if k > n - k:
k = n - k
i = 1
while i <= k:
result *= n
result //= i
n -= 1
i += 1
return result
def pvalue(a: int, b: int,
c: int, d: in... | 21.962963 | 74 | 0.441821 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 280 | 0.157392 |
02cfb28047d612da27deb76d6967a4e3c09ca214 | 1,528 | py | Python | Signature Detection and Analysis/signprocessing.py | andrevks/Document-Forgery-Detection | 77dcde3867732a55cd0f4604627d7bf67a5e79a5 | [
"MIT"
] | null | null | null | Signature Detection and Analysis/signprocessing.py | andrevks/Document-Forgery-Detection | 77dcde3867732a55cd0f4604627d7bf67a5e79a5 | [
"MIT"
] | null | null | null | Signature Detection and Analysis/signprocessing.py | andrevks/Document-Forgery-Detection | 77dcde3867732a55cd0f4604627d7bf67a5e79a5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Mar 31 04:01:49 2018
@author: abhilasha
"""
#Team: GuardiansOfGalaxy
from PIL import Image, ImageEnhance
def enhance_signature(img):
bw = ImageEnhance.Color(img).enhance(0.0)
bright = ImageEnhance.Brightness(bw).enhance(2.2)
contrast = ImageEnha... | 25.466667 | 86 | 0.623037 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 231 | 0.151178 |
02d171270f0a756f0c3935d386245a162e597707 | 23,802 | py | Python | crowdsource/views.py | Code-and-Response/ISAC-SIMO-Repo-2 | 5b0cb0099e128dbacfdc53bf686ef2b069a51bc6 | [
"PostgreSQL",
"Apache-2.0"
] | 5 | 2021-08-16T16:32:41.000Z | 2022-02-22T03:47:49.000Z | crowdsource/views.py | Code-and-Response/ISAC-SIMO-Repo-2 | 5b0cb0099e128dbacfdc53bf686ef2b069a51bc6 | [
"PostgreSQL",
"Apache-2.0"
] | 7 | 2021-04-12T14:48:48.000Z | 2022-02-14T08:30:57.000Z | crowdsource/views.py | Code-and-Response/ISAC-SIMO-Repo-2 | 5b0cb0099e128dbacfdc53bf686ef2b069a51bc6 | [
"PostgreSQL",
"Apache-2.0"
] | 1 | 2021-04-28T14:28:34.000Z | 2021-04-28T14:28:34.000Z | from main.customdecorators import check_honeypot_conditional
from django.core.files.uploadedfile import InMemoryUploadedFile
from django.http.response import HttpResponseRedirect, JsonResponse
from rest_framework.decorators import action
from api.models import ObjectType
from django.core.cache import cache
from crowdso... | 48.279919 | 150 | 0.56991 | 8,025 | 0.337157 | 0 | 0 | 14,763 | 0.620242 | 0 | 0 | 3,622 | 0.152172 |
02d235dc4031cc79fd9ab325030c238874738554 | 2,232 | py | Python | epochCiCdApi/ita/viewsOperations.py | matsumoto-epoch/epoch | c4b1982e68aa8cb108e6ae9b1c0de489d40d4db5 | [
"Apache-2.0"
] | null | null | null | epochCiCdApi/ita/viewsOperations.py | matsumoto-epoch/epoch | c4b1982e68aa8cb108e6ae9b1c0de489d40d4db5 | [
"Apache-2.0"
] | null | null | null | epochCiCdApi/ita/viewsOperations.py | matsumoto-epoch/epoch | c4b1982e68aa8cb108e6ae9b1c0de489d40d4db5 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 NEC Corporation
#
# 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... | 28.987013 | 108 | 0.72043 | 0 | 0 | 0 | 0 | 914 | 0.398431 | 0 | 0 | 1,033 | 0.450305 |
02d4e6b3a3eee626ac3250b843b87270720d699e | 56 | py | Python | tests/test_init.py | keisuke-umezawa/chutil | df60440983c38a6dbbe4710019bcec5e83331904 | [
"MIT"
] | 1 | 2019-02-16T06:20:50.000Z | 2019-02-16T06:20:50.000Z | tests/test_init.py | keisuke-umezawa/chutil | df60440983c38a6dbbe4710019bcec5e83331904 | [
"MIT"
] | null | null | null | tests/test_init.py | keisuke-umezawa/chutil | df60440983c38a6dbbe4710019bcec5e83331904 | [
"MIT"
] | null | null | null | import chutil as module
def test_versions():
pass
| 9.333333 | 23 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
02d56efb28c0baac4d608dce2e0ed1e45b667e10 | 932 | py | Python | src/service/uri_generator.py | HalbardHobby/git-LFS-for-Lambda | d19ba6fc4605d5dc2dba52acb4236c68787f8bde | [
"MIT"
] | null | null | null | src/service/uri_generator.py | HalbardHobby/git-LFS-for-Lambda | d19ba6fc4605d5dc2dba52acb4236c68787f8bde | [
"MIT"
] | null | null | null | src/service/uri_generator.py | HalbardHobby/git-LFS-for-Lambda | d19ba6fc4605d5dc2dba52acb4236c68787f8bde | [
"MIT"
] | null | null | null | """Generates pre-signed uri's for blob handling."""
from boto3 import client
import os
s3_client = client('s3')
def create_uri(repo_name, resource_oid, upload=False, expires_in=300):
"""Create a download uri for the given oid and repo."""
action = 'get_object'
if upload:
action = 'put_object'
... | 31.066667 | 71 | 0.626609 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 257 | 0.275751 |
02d7c80b9c168487db13fab6edd36bd30ed15c3d | 4,919 | py | Python | rnn/chatbot/chatbot.py | llichengtong/yx4 | 17de7a6257a9f0c38e12089b2d1947927ec54c90 | [
"Apache-2.0"
] | 128 | 2017-03-04T08:53:44.000Z | 2020-06-05T11:19:16.000Z | rnn/chatbot/chatbot.py | github-jinwei/TensorFlowBook | 17de7a6257a9f0c38e12089b2d1947927ec54c90 | [
"Apache-2.0"
] | null | null | null | rnn/chatbot/chatbot.py | github-jinwei/TensorFlowBook | 17de7a6257a9f0c38e12089b2d1947927ec54c90 | [
"Apache-2.0"
] | 120 | 2017-02-07T09:41:25.000Z | 2022-03-17T00:57:59.000Z | # coding=utf8
import logging
import os
import random
import re
import numpy as np
import tensorflow as tf
from seq2seq_conversation_model import seq2seq_model
from seq2seq_conversation_model import data_utils
from seq2seq_conversation_model import tokenizer
from seq2seq_conversation_model.seq2seq_conversation_model imp... | 36.708955 | 98 | 0.645456 | 3,085 | 0.614175 | 0 | 0 | 0 | 0 | 0 | 0 | 1,109 | 0.220784 |
02d7c976dba252653f990cef7776c119996e55c4 | 5,986 | py | Python | chip8_pygame_integration/config_test.py | Artoooooor/chip8 | d5132348f3081aeb9af19814d8251084ae723379 | [
"MIT"
] | null | null | null | chip8_pygame_integration/config_test.py | Artoooooor/chip8 | d5132348f3081aeb9af19814d8251084ae723379 | [
"MIT"
] | null | null | null | chip8_pygame_integration/config_test.py | Artoooooor/chip8 | d5132348f3081aeb9af19814d8251084ae723379 | [
"MIT"
] | null | null | null | import unittest
import pygame
from chip8_pygame_integration.config import get_config, KeyBind, to_text
DEFAULT = [KeyBind(pygame.K_o, pygame.KMOD_CTRL, 'some_command')]
class ConfigLoadTest(unittest.TestCase):
def setUp(self):
self.default = None
def test_empty_pattern_returns_empty_array(self):
... | 36.278788 | 77 | 0.664885 | 5,760 | 0.962245 | 0 | 0 | 0 | 0 | 0 | 0 | 444 | 0.074173 |
02d8c4f8a25b42b9035c973df73101d47ff6f388 | 1,934 | py | Python | Trees/Binary Trees/Preorder_Binary_Tree.py | jarvis-1805/DSAwithPYTHON | 872073d1b8d0001ea8b1a54b5e327dd0c1c406f2 | [
"Apache-2.0"
] | 1 | 2021-03-21T18:54:34.000Z | 2021-03-21T18:54:34.000Z | Trees/Binary Trees/Preorder_Binary_Tree.py | jarvis-1805/DSAwithPYTHON | 872073d1b8d0001ea8b1a54b5e327dd0c1c406f2 | [
"Apache-2.0"
] | null | null | null | Trees/Binary Trees/Preorder_Binary_Tree.py | jarvis-1805/DSAwithPYTHON | 872073d1b8d0001ea8b1a54b5e327dd0c1c406f2 | [
"Apache-2.0"
] | null | null | null | '''
Preorder Binary Tree
For a given Binary Tree of integers, print the pre-order traversal.
Input Format:
The first and the only line of input will contain the nodes data, all separated by a single space. Since -1 is used as an indication whether the left or right node data exist for root, it will not be a part of t... | 21.977273 | 224 | 0.643226 | 127 | 0.065667 | 0 | 0 | 0 | 0 | 0 | 0 | 834 | 0.431231 |
02da14e11f8f22cf912a874caefb9a62ca916f39 | 1,693 | py | Python | test/pages/base_pages.py | gordonnguyen/10fastfingers-auto-type | 624a6667b67743904791929a36d12b0f12f50e05 | [
"MIT"
] | null | null | null | test/pages/base_pages.py | gordonnguyen/10fastfingers-auto-type | 624a6667b67743904791929a36d12b0f12f50e05 | [
"MIT"
] | 1 | 2021-03-16T13:31:33.000Z | 2021-03-16T13:31:33.000Z | test/pages/base_pages.py | gordonnguyen/10fastfingers-auto-type | 624a6667b67743904791929a36d12b0f12f50e05 | [
"MIT"
] | null | null | null | '''
Super classes for Page object
Serve as a base template for page
automating functions with selenium
'''
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from utils.best_buy.locators import Locators
from utils.best_buy import urls
... | 34.55102 | 106 | 0.705848 | 1,371 | 0.809805 | 0 | 0 | 0 | 0 | 0 | 0 | 408 | 0.240992 |
02db29d58f9fcbf982055980d5e6b51e86d8c020 | 2,419 | py | Python | Form-Filler.py | Zaidtech/AUTOMATION-SCRIPTS | 88c83e1edca02b0b86f3de4981a5f27f398b4441 | [
"MIT"
] | 4 | 2020-11-04T13:25:48.000Z | 2022-03-29T01:21:49.000Z | Form-Filler.py | Zaidtech/AUTOMATION-SCRIPTS | 88c83e1edca02b0b86f3de4981a5f27f398b4441 | [
"MIT"
] | null | null | null | Form-Filler.py | Zaidtech/AUTOMATION-SCRIPTS | 88c83e1edca02b0b86f3de4981a5f27f398b4441 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
This script has been tested on various custom google forms and other various forms with
few alteratios ..
Google forms which does include the input type "token" attribute are found
to be safer than those who don't.
Any form contains various fields.
1. input text fields
2. radio
3. checkb... | 27.804598 | 107 | 0.653162 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,506 | 0.622571 |
02dbc26cd1fbc18374360e0a5ad4732c9bed896a | 1,306 | py | Python | lektor_root_relative_path.py | a2csuga/lektor-root-relative-path | 5c200bdae50a78a2a295a3c0bb5440004b7fa72a | [
"MIT"
] | 2 | 2018-10-20T10:45:25.000Z | 2019-08-12T08:53:11.000Z | lektor_root_relative_path.py | a2csuga/lektor-root-relative-path | 5c200bdae50a78a2a295a3c0bb5440004b7fa72a | [
"MIT"
] | 2 | 2018-09-21T14:35:33.000Z | 2018-10-15T21:43:08.000Z | lektor_root_relative_path.py | a2csuga/lektor-root-relative-path | 5c200bdae50a78a2a295a3c0bb5440004b7fa72a | [
"MIT"
] | 1 | 2017-11-30T12:58:08.000Z | 2017-11-30T12:58:08.000Z | # -*- coding: utf-8 -*-
try:
# py3
from urllib.parse import urljoin, quote
except ImportError:
# py2
from urlparse import urljoin
from urllib import quote
from lektor.pluginsystem import Plugin
from furl import furl
class RootRelativePathPlugin(Plugin):
name = u'root-relative-path'
descr... | 31.853659 | 87 | 0.598009 | 1,065 | 0.815467 | 0 | 0 | 0 | 0 | 0 | 0 | 389 | 0.297856 |
02dbf3b5b09c9427c60b05103927121e020bab72 | 1,375 | py | Python | controllers/main.py | dduarte-odoogap/odoo_jenkins | 69bfcf088f75426c0e4b961a60b5c15a65b37979 | [
"BSD-2-Clause"
] | 5 | 2018-10-26T19:52:45.000Z | 2021-11-04T03:59:22.000Z | controllers/main.py | dduarte-odoogap/odoo_jenkins | 69bfcf088f75426c0e4b961a60b5c15a65b37979 | [
"BSD-2-Clause"
] | null | null | null | controllers/main.py | dduarte-odoogap/odoo_jenkins | 69bfcf088f75426c0e4b961a60b5c15a65b37979 | [
"BSD-2-Clause"
] | 6 | 2017-11-10T07:15:40.000Z | 2021-02-24T10:55:15.000Z | # -*- coding: utf-8 -*-
from odoo import http
from odoo.http import request
import jenkins
class JenkinsController(http.Controller):
@http.route('/web/jenkins/jobs', type='json', auth='user')
def jenkins_get_jobs(self, **kw):
params = request.env['ir.config_parameter']
jenkins_url = params.... | 33.536585 | 95 | 0.611636 | 1,278 | 0.929455 | 0 | 0 | 1,225 | 0.890909 | 0 | 0 | 241 | 0.175273 |
02dc9cb7558321b5cc7729d952a58e8fc90917a1 | 996 | py | Python | attendance.py | mykbgwl/Students-Attendance | bd9aef8cd12edff7fc47326fdeca6131eef575a6 | [
"Apache-2.0"
] | null | null | null | attendance.py | mykbgwl/Students-Attendance | bd9aef8cd12edff7fc47326fdeca6131eef575a6 | [
"Apache-2.0"
] | 1 | 2021-05-11T08:23:13.000Z | 2021-05-11T08:23:13.000Z | attendance.py | mykbgwl/Students-Attendance | bd9aef8cd12edff7fc47326fdeca6131eef575a6 | [
"Apache-2.0"
] | null | null | null | import cv2
import numpy as np
import pyzbar.pyzbar as pyzbar
import sys
import time
import pybase64
# Starting the webcam
capt = cv2.VideoCapture(0)
names = []
# Creating Attendees file
fob = open('attendees.txt', 'a+')
def enterData(z):
if z in names:
pass
else:
nam... | 17.473684 | 63 | 0.567269 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 178 | 0.178715 |
02dcb415d51e0799783c6d81ac253913ae5ccdc0 | 19,562 | py | Python | net.py | rishabnayak/SegAN | 6f9415a079d8417ecebec3279338423286decf1c | [
"MIT"
] | null | null | null | net.py | rishabnayak/SegAN | 6f9415a079d8417ecebec3279338423286decf1c | [
"MIT"
] | null | null | null | net.py | rishabnayak/SegAN | 6f9415a079d8417ecebec3279338423286decf1c | [
"MIT"
] | null | null | null | import torch.nn as nn
import torch.nn.functional as F
import torch
from numpy.random import normal
from math import sqrt
import argparse
channel_dim = 3
ndf = 64
class GlobalConvBlock(nn.Module):
def __init__(self, in_dim, out_dim, kernel_size):
super(GlobalConvBlock, self).__init__()
pad0 = (ker... | 41.183158 | 86 | 0.517227 | 19,384 | 0.990901 | 0 | 0 | 0 | 0 | 0 | 0 | 2,988 | 0.152745 |
02dd42303eb7feb71bc2c94bd3f296e7b8ac9419 | 2,155 | py | Python | karmagrambot/__init__.py | caiopo/karmagrambot | 00935d0de228e516047bc3848344290be2cfcc0f | [
"MIT"
] | null | null | null | karmagrambot/__init__.py | caiopo/karmagrambot | 00935d0de228e516047bc3848344290be2cfcc0f | [
"MIT"
] | null | null | null | karmagrambot/__init__.py | caiopo/karmagrambot | 00935d0de228e516047bc3848344290be2cfcc0f | [
"MIT"
] | null | null | null | import dataset
import logging
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters
from .config import TOKEN, DB_URI
from .commands import HANDLERS
logging.basicConfig()
def save_message(message, db):
replied = None
if message.reply_to_message is not None:
replied = message.rep... | 21.767677 | 73 | 0.620418 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 239 | 0.110905 |
02dff69165c131d9f3101aa1c12186dc1957dfcb | 647 | py | Python | app/services/articles.py | StanislavRud/api-realword-app-test | 9a49f299b02cec26d237f3bc4b363c8b93520b7b | [
"MIT"
] | 1,875 | 2019-03-27T14:26:20.000Z | 2022-03-31T14:52:50.000Z | app/services/articles.py | StanislavRud/api-realword-app-test | 9a49f299b02cec26d237f3bc4b363c8b93520b7b | [
"MIT"
] | 232 | 2019-04-11T11:05:48.000Z | 2022-03-05T10:23:50.000Z | app/services/articles.py | StanislavRud/api-realword-app-test | 9a49f299b02cec26d237f3bc4b363c8b93520b7b | [
"MIT"
] | 433 | 2019-04-11T01:48:59.000Z | 2022-03-31T10:33:42.000Z | from slugify import slugify
from app.db.errors import EntityDoesNotExist
from app.db.repositories.articles import ArticlesRepository
from app.models.domain.articles import Article
from app.models.domain.users import User
async def check_article_exists(articles_repo: ArticlesRepository, slug: str) -> bool:
try:
... | 26.958333 | 85 | 0.775889 | 0 | 0 | 0 | 0 | 0 | 0 | 222 | 0.343122 | 0 | 0 |
02e1c3bcb817bb01646a68ea5b10f1ece433f8ce | 1,240 | py | Python | tests/test_decoder.py | carlosmouracorreia/python_mp3_decoder | 79ea61f3ceedc07a173a216538f4acbdf1c4c6c3 | [
"MIT"
] | 23 | 2016-06-22T14:18:28.000Z | 2020-11-23T12:39:01.000Z | tests/test_decoder.py | carlosmouracorreia/python_mp3_decoder | 79ea61f3ceedc07a173a216538f4acbdf1c4c6c3 | [
"MIT"
] | 3 | 2019-12-10T01:07:41.000Z | 2021-03-29T14:40:29.000Z | tests/test_decoder.py | carlosmouracorreia/python_mp3_decoder | 79ea61f3ceedc07a173a216538f4acbdf1c4c6c3 | [
"MIT"
] | 1 | 2019-10-29T11:55:08.000Z | 2019-10-29T11:55:08.000Z | from pymp3decoder import Decoder
import contextlib
import os
import math
import pyaudio
CHUNK_SIZE = 4096
def take_chunk(content):
""" Split a buffer of data into chunks """
num_blocks = int(math.ceil(1.0*len(content)/CHUNK_SIZE))
for start in range(num_blocks):
yield content[CHUNK_SIZE*start:... | 24.313725 | 91 | 0.575806 | 895 | 0.721774 | 695 | 0.560484 | 495 | 0.399194 | 0 | 0 | 89 | 0.071774 |
02e1eaa7b6938abd4a858ad69dcce256aad518c8 | 2,232 | py | Python | bot.py | Euphorichuman/StarConstellationBot-TelgramBot- | 557dad7ce1d1a96a96b4ed65b796f20a6944e3b7 | [
"Apache-2.0"
] | null | null | null | bot.py | Euphorichuman/StarConstellationBot-TelgramBot- | 557dad7ce1d1a96a96b4ed65b796f20a6944e3b7 | [
"Apache-2.0"
] | null | null | null | bot.py | Euphorichuman/StarConstellationBot-TelgramBot- | 557dad7ce1d1a96a96b4ed65b796f20a6944e3b7 | [
"Apache-2.0"
] | null | null | null | import telegram.ext
import messsages as msg
import functions as f
import matplotlib.pyplot as plt
import traceback
import os
import os.path
from os import path
def start(update, context):
nombre = update.message.chat.first_name
mensaje = "Bienvenido {}, para conocer lo que puedo hacer utiliza el comando /Help... | 37.2 | 103 | 0.744624 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 714 | 0.319035 |
02e39765ed97295a34732ab36aceb4ca2cfebe3b | 2,706 | py | Python | tests/unit/states/test_slack.py | amaclean199/salt | 8aaac011b4616e3c9e74a1daafb4a2146a5a430f | [
"Apache-2.0"
] | 12 | 2015-01-21T00:18:25.000Z | 2021-07-11T07:35:26.000Z | tests/unit/states/test_slack.py | amaclean199/salt | 8aaac011b4616e3c9e74a1daafb4a2146a5a430f | [
"Apache-2.0"
] | 1 | 2015-10-05T22:03:10.000Z | 2015-10-05T22:03:10.000Z | tests/unit/states/test_slack.py | amaclean199/salt | 8aaac011b4616e3c9e74a1daafb4a2146a5a430f | [
"Apache-2.0"
] | 12 | 2015-01-05T09:50:42.000Z | 2019-08-19T01:43:40.000Z | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Jayesh Kariya <[email protected]>`
'''
# Import Python libs
from __future__ import absolute_import, unicode_literals, print_function
# Import Salt Testing Libs
from tests.support.mixins import LoaderModuleMockMixin
from tests.support.unit import skipIf, TestCase... | 35.605263 | 77 | 0.543607 | 2,202 | 0.813747 | 0 | 0 | 2,235 | 0.825942 | 0 | 0 | 703 | 0.259793 |
02e3d3385e104cc569c1458b36ecf6ad0a158a11 | 613 | py | Python | lintcode/499.py | jianershi/algorithm | c3c38723b9c5f1cc745550d89e228f92fd4abfb2 | [
"MIT"
] | 1 | 2021-01-08T06:57:49.000Z | 2021-01-08T06:57:49.000Z | lintcode/499.py | jianershi/algorithm | c3c38723b9c5f1cc745550d89e228f92fd4abfb2 | [
"MIT"
] | null | null | null | lintcode/499.py | jianershi/algorithm | c3c38723b9c5f1cc745550d89e228f92fd4abfb2 | [
"MIT"
] | 1 | 2021-01-08T06:57:52.000Z | 2021-01-08T06:57:52.000Z | """
499. Word Count (Map Reduce)
https://www.lintcode.com/problem/word-count-map-reduce/description
"""
class WordCount:
# @param {str} line a text, for example "Bye Bye see you next"
def mapper(self, _, line):
# Write your code here
# Please use 'yield key, value'
word_lists = line.spl... | 29.190476 | 66 | 0.611746 | 508 | 0.828711 | 325 | 0.530179 | 0 | 0 | 0 | 0 | 352 | 0.574225 |
02e41ad97ede483bee9810e5ea1fa7bf1e5f726c | 1,205 | py | Python | dataframe/statistic.py | kuangtu/pandas_exec | 659dec5eef488bec11daec33333ff8366a0d1a91 | [
"MIT"
] | null | null | null | dataframe/statistic.py | kuangtu/pandas_exec | 659dec5eef488bec11daec33333ff8366a0d1a91 | [
"MIT"
] | null | null | null | dataframe/statistic.py | kuangtu/pandas_exec | 659dec5eef488bec11daec33333ff8366a0d1a91 | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
import numpy as np
import pandas as pd
def countnum():
dates = pd.date_range(start="2019-01-01", end="2019-05-31", freq='M')
# print(dates)
# print(dates[0])
# print(type(dates[0]))
col1 = [i for i in range(1, len(dates) + 1)]
# print(col1)
col2 = [i + 1 for i in ra... | 25.104167 | 73 | 0.557676 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 307 | 0.248986 |
02e6d57771f13dca80d99555989b7627a7fef655 | 6,513 | py | Python | asv/results.py | pitrou/asv | d6efa34f1308a212bc3c2f386f2f6584bbb5398f | [
"BSD-3-Clause"
] | null | null | null | asv/results.py | pitrou/asv | d6efa34f1308a212bc3c2f386f2f6584bbb5398f | [
"BSD-3-Clause"
] | null | null | null | asv/results.py | pitrou/asv | d6efa34f1308a212bc3c2f386f2f6584bbb5398f | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import base64
import os
import zlib
from .environment import get_environment
from . import util
def iter_results_paths... | 25.641732 | 73 | 0.590511 | 3,748 | 0.575464 | 1,371 | 0.210502 | 980 | 0.150468 | 0 | 0 | 2,457 | 0.377246 |
02e9695d836ae2a21a14a0f80cc396334b03974f | 1,188 | py | Python | core/secretfinder/utils.py | MakoSec/pacu | f06f110e6c181f34b89b803e7c2024563acc9fbc | [
"BSD-3-Clause"
] | 26 | 2021-03-29T13:39:28.000Z | 2022-03-21T10:57:58.000Z | core/secretfinder/utils.py | MakoSec/pacu | f06f110e6c181f34b89b803e7c2024563acc9fbc | [
"BSD-3-Clause"
] | 1 | 2021-06-02T02:39:40.000Z | 2021-06-02T02:39:40.000Z | core/secretfinder/utils.py | MakoSec/pacu | f06f110e6c181f34b89b803e7c2024563acc9fbc | [
"BSD-3-Clause"
] | 8 | 2021-02-23T12:17:04.000Z | 2022-02-25T13:28:14.000Z | import math
import json
import re
import os
class Color:
GREEN = '\033[92m'
BLUE = '\033[94m'
RED = '\033[91m'
# noinspection SpellCheckingInspection
ENDC = '\033[0m'
@staticmethod
def print(color, text):
print('{}{}{}'.format(color, text, Color.ENDC))
def shannon_entropy(data):
... | 21.214286 | 58 | 0.570707 | 245 | 0.206229 | 0 | 0 | 97 | 0.08165 | 0 | 0 | 98 | 0.082492 |
02e997ec752171db83c0a7598b23b28d81788b83 | 2,342 | py | Python | validation/step_03_-_predict_state/step_03_-_plot_results.py | martin0004/drone_perception_system | ac76a002179bd1a7219f3c76747bd50aba0a0aea | [
"MIT"
] | 1 | 2021-08-25T08:16:27.000Z | 2021-08-25T08:16:27.000Z | validation/step_03_-_predict_state/step_03_-_plot_results.py | martin0004/drone_perception_system | ac76a002179bd1a7219f3c76747bd50aba0a0aea | [
"MIT"
] | null | null | null | validation/step_03_-_predict_state/step_03_-_plot_results.py | martin0004/drone_perception_system | ac76a002179bd1a7219f3c76747bd50aba0a0aea | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from typing import Tuple
def clean_df_headers(df: pd.DataFrame) -> pd.DataFrame:
"""Remove leading and trailing spaces in DataFrame headers."""
headers = pd.Series(df.columns)
new_headers = [header.strip() for header in headers]
... | 27.232558 | 123 | 0.585824 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 674 | 0.287788 |
02eb83c13dc0114b6ab1c905f8a724d75ccb3d34 | 8,036 | py | Python | lvsr/dependency/datasets.py | mzapotoczny/dependency-parser | e37f94e23cb61d6658774f5f9843219df331eb74 | [
"MIT"
] | 3 | 2017-06-07T06:41:18.000Z | 2019-10-26T13:08:23.000Z | lvsr/dependency/datasets.py | mzapotoczny/dependency-parser | e37f94e23cb61d6658774f5f9843219df331eb74 | [
"MIT"
] | null | null | null | lvsr/dependency/datasets.py | mzapotoczny/dependency-parser | e37f94e23cb61d6658774f5f9843219df331eb74 | [
"MIT"
] | 1 | 2020-11-26T17:40:18.000Z | 2020-11-26T17:40:18.000Z | '''
Created on Mar 20, 2016
'''
import numpy
import numbers
from fuel.datasets.hdf5 import H5PYDataset
from fuel.utils import Subset
class VMap(object):
def __init__(self, vmap_dset):
dtype = vmap_dset.dtype
dtype_unicode = [('key', 'U%d' % (dtype[0].itemsize/4,)),
('val',... | 40.585859 | 87 | 0.56558 | 7,888 | 0.981583 | 0 | 0 | 325 | 0.040443 | 0 | 0 | 600 | 0.074664 |
02ebdfddbb50d875cc9962bf326ad8e9c362cfea | 1,444 | py | Python | setup.py | LandRegistry/govuk-frontend-wtf | 3ac1501dd220ad8f4cff0137f2d87e973c9e1243 | [
"MIT"
] | 10 | 2021-02-02T11:38:42.000Z | 2022-01-21T15:10:23.000Z | setup.py | LandRegistry/govuk-frontend-wtf | 3ac1501dd220ad8f4cff0137f2d87e973c9e1243 | [
"MIT"
] | 23 | 2021-04-26T09:19:22.000Z | 2022-03-31T15:13:31.000Z | setup.py | LandRegistry/govuk-frontend-wtf | 3ac1501dd220ad8f4cff0137f2d87e973c9e1243 | [
"MIT"
] | 6 | 2021-02-04T11:09:51.000Z | 2021-06-01T08:39:02.000Z | import glob
import os
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
templates = []
directories = glob.glob("govuk_frontend_wtf/templates/*.html")
for directory in directories:
templates.append(os.path.relpath(os.path.dirname(directory), "govuk_frontend_wtf") + "/*.html")
... | 31.391304 | 99 | 0.644044 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 714 | 0.49446 |
02ebe98586fb9a06d031ee215ed1a172f2753298 | 2,930 | py | Python | project/experiments/exp_003_best_Walker2D/src/4.plot_1.py | liusida/thesis-bodies | dceb8a36efd2cefc611f6749a52b56b9d3572f7a | [
"MIT"
] | null | null | null | project/experiments/exp_003_best_Walker2D/src/4.plot_1.py | liusida/thesis-bodies | dceb8a36efd2cefc611f6749a52b56b9d3572f7a | [
"MIT"
] | null | null | null | project/experiments/exp_003_best_Walker2D/src/4.plot_1.py | liusida/thesis-bodies | dceb8a36efd2cefc611f6749a52b56b9d3572f7a | [
"MIT"
] | null | null | null | import os
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
from common.tflogs2pandas import tflog2pandas, many_logs2pandas
from common.gym_interface import template
bodies = [300]
all_seeds = list(range(20))
all_stackframe = [0,4]
cache_filename = "output_data/tmp/plot0"
try:
df = pd.rea... | 31.505376 | 94 | 0.543686 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 837 | 0.285666 |
02ec3adf599332a9c2e8596007821b919933d4a9 | 167 | py | Python | wsgi.py | emilan21/macvert | ac219507a6b20372861667f4ade8084c9902a231 | [
"MIT"
] | null | null | null | wsgi.py | emilan21/macvert | ac219507a6b20372861667f4ade8084c9902a231 | [
"MIT"
] | null | null | null | wsgi.py | emilan21/macvert | ac219507a6b20372861667f4ade8084c9902a231 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# mac_convertor.py - Converts mac address from various formats to other formats
from macvert.web import app
if __name__ == '__main__':
app.run()
| 20.875 | 79 | 0.742515 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 106 | 0.634731 |
02ed59dd65e3f0007ed59a3660fc0e47a1a878ad | 461 | py | Python | config/dotenv.py | CharuchithRanjit/open-pos | ac749a0f2a6c59077d2c13f13e776963e130501f | [
"MIT"
] | null | null | null | config/dotenv.py | CharuchithRanjit/open-pos | ac749a0f2a6c59077d2c13f13e776963e130501f | [
"MIT"
] | null | null | null | config/dotenv.py | CharuchithRanjit/open-pos | ac749a0f2a6c59077d2c13f13e776963e130501f | [
"MIT"
] | null | null | null | """
Loads dotenv variables
Classes:
None
Functions:
None
Misc variables:
DATABASE_KEY (str) -- The key for the database
DATABASE_PASSWORD (str) -- The password for the database
DATABASE_URL (str) -- The url for the database
"""
import os
from dotenv import load_dotenv, find_dotenv
load_dotenv(find_dotenv())
DATABA... | 20.954545 | 56 | 0.776573 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 277 | 0.600868 |
02eda03f6cdc3686e65cef76614261ad8f2d5c5b | 462 | py | Python | 617. Merge Two Binary Trees/solution1.py | zhoudaxia233/LeetCode | 66e8087e982f0517e22926a5574557ff006c9e4d | [
"MIT"
] | 3 | 2019-08-18T15:56:13.000Z | 2019-11-29T10:20:05.000Z | 617. Merge Two Binary Trees/solution1.py | zhoudaxia233/LeetCode | 66e8087e982f0517e22926a5574557ff006c9e4d | [
"MIT"
] | null | null | null | 617. Merge Two Binary Trees/solution1.py | zhoudaxia233/LeetCode | 66e8087e982f0517e22926a5574557ff006c9e4d | [
"MIT"
] | null | null | null | class Solution:
def mergeTrees(self, t1, t2):
"""
:type t1: TreeNode
:type t2: TreeNode
:rtype: TreeNode
"""
# This method changes the existing tree instead of returning a new one
if t1 and t2:
t1.val += t2.val
t1.left = self.mergeTrees... | 28.875 | 78 | 0.52381 | 461 | 0.997835 | 0 | 0 | 0 | 0 | 0 | 0 | 164 | 0.354978 |
02ef52ac7a4592df5ce1f94d82e027c617d780cc | 1,094 | py | Python | tests/zero_model_test.py | shatadru99/archai | 8501080f8ecc73327979c02387e02011efb4c335 | [
"MIT"
] | 1 | 2020-01-29T18:45:42.000Z | 2020-01-29T18:45:42.000Z | tests/zero_model_test.py | shatadru99/archai | 8501080f8ecc73327979c02387e02011efb4c335 | [
"MIT"
] | null | null | null | tests/zero_model_test.py | shatadru99/archai | 8501080f8ecc73327979c02387e02011efb4c335 | [
"MIT"
] | 1 | 2020-01-31T15:51:53.000Z | 2020-01-31T15:51:53.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import torch
from archai.nas.model import Model
from archai.nas.macro_builder import MacroBuilder
from archai.common.common import common_init
def test_darts_zero_model():
conf = common_init(config_filepath='confs/algos/darts.yaml')... | 36.466667 | 75 | 0.698355 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 175 | 0.159963 |
02f1e0ca932dc0360686a58ec3b261b9a83d5c58 | 13,461 | py | Python | reports/dataset.py | TexasDigitalLibrary/dataverse-reports | 90f849a1b6c0d772d19de336f9f48cd290256392 | [
"MIT"
] | 5 | 2018-10-07T14:37:40.000Z | 2021-09-14T08:57:19.000Z | reports/dataset.py | TexasDigitalLibrary/dataverse-reports | 90f849a1b6c0d772d19de336f9f48cd290256392 | [
"MIT"
] | 11 | 2019-08-30T15:29:37.000Z | 2021-12-20T19:44:37.000Z | reports/dataset.py | TexasDigitalLibrary/dataverse-reports | 90f849a1b6c0d772d19de336f9f48cd290256392 | [
"MIT"
] | 4 | 2018-01-30T18:20:54.000Z | 2021-09-30T09:04:44.000Z | import logging
import datetime
class DatasetReports(object):
def __init__(self, dataverse_api=None, dataverse_database=None, config=None):
if dataverse_api is None:
print('Dataverse API required to create dataset reports.')
return
if dataverse_database is None:
p... | 51.18251 | 174 | 0.553079 | 13,429 | 0.997623 | 0 | 0 | 0 | 0 | 0 | 0 | 2,897 | 0.215214 |
02f1e521d0c60cd1bdde651eb786414631bc4c55 | 1,377 | py | Python | classifier.py | hemu243/focus-web-crawler | 8e882315d947f04b207ec76a64fa952f18105d73 | [
"MIT"
] | 2 | 2020-02-03T02:31:09.000Z | 2021-02-03T11:54:44.000Z | classifier.py | hemu243/focus-web-crawler | 8e882315d947f04b207ec76a64fa952f18105d73 | [
"MIT"
] | null | null | null | classifier.py | hemu243/focus-web-crawler | 8e882315d947f04b207ec76a64fa952f18105d73 | [
"MIT"
] | null | null | null | #
from abc import ABCMeta
import metapy
class WebClassifier(object):
"""
This module is abstract module which needs to be called by
inherit
"""
__metaclass__ = ABCMeta
def __init__(self, configFile):
"""
Initialized basic of classifier like fwd index, index
:param configFile:
"""
#metapy.log_to_stde... | 30.6 | 97 | 0.760349 | 1,334 | 0.968773 | 0 | 0 | 0 | 0 | 0 | 0 | 759 | 0.551198 |
02f2dc9948709df77cd05687fd7477b4be25fe0c | 609 | py | Python | backend/tests/access/test_access_event_publish.py | fjacob21/mididecweb | b65f28eb6fdeafa265796b6190a4264a5eac54ce | [
"MIT"
] | null | null | null | backend/tests/access/test_access_event_publish.py | fjacob21/mididecweb | b65f28eb6fdeafa265796b6190a4264a5eac54ce | [
"MIT"
] | 88 | 2016-11-12T14:54:38.000Z | 2018-08-02T00:25:07.000Z | backend/tests/access/test_access_event_publish.py | mididecouverte/mididecweb | b65f28eb6fdeafa265796b6190a4264a5eac54ce | [
"MIT"
] | null | null | null | from src.access import EventPublishAccess
from generate_access_data import generate_access_data
def test_publish_event_access():
sessions = generate_access_data()
event = sessions['user'].events.get('test')
useraccess = EventPublishAccess(sessions['user'], event)
manageraccess = EventPublishAccess(ses... | 38.0625 | 66 | 0.760263 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 0.065681 |
02f3815c21333fd777c5f7c2b3c081090f107885 | 4,296 | py | Python | aiorabbitmq_admin/base.py | miili/aiorabbitmq-admin | 38df67a77cd029429af9add12ead3152f58ed748 | [
"MIT"
] | null | null | null | aiorabbitmq_admin/base.py | miili/aiorabbitmq-admin | 38df67a77cd029429af9add12ead3152f58ed748 | [
"MIT"
] | null | null | null | aiorabbitmq_admin/base.py | miili/aiorabbitmq-admin | 38df67a77cd029429af9add12ead3152f58ed748 | [
"MIT"
] | null | null | null | import json
import aiohttp
from copy import deepcopy
class Resource(object):
"""
A base class for API resources
"""
# """List of allowed methods, allowed values are
# ```['GET', 'PUT', 'POST', 'DELETE']``"""
# ALLOWED_METHODS = []
def __init__(self, url, auth):
"""
:param... | 30.253521 | 112 | 0.570531 | 4,240 | 0.986965 | 0 | 0 | 0 | 0 | 3,079 | 0.716713 | 1,922 | 0.447393 |
02f390bbfb313d944ca9d6c202d4c1f28b3a192e | 115,464 | py | Python | from_3b1b/old/highD.py | tigerking/manim2 | 93e8957e433b8e59acb5a5213a4074ee0125b823 | [
"MIT"
] | null | null | null | from_3b1b/old/highD.py | tigerking/manim2 | 93e8957e433b8e59acb5a5213a4074ee0125b823 | [
"MIT"
] | null | null | null | from_3b1b/old/highD.py | tigerking/manim2 | 93e8957e433b8e59acb5a5213a4074ee0125b823 | [
"MIT"
] | null | null | null | from manim2.imports import *
##########
#force_skipping
#revert_to_original_skipping_status
##########
class Slider(NumberLine):
CONFIG = {
"color" : WHITE,
"x_min" : -1,
"x_max" : 1,
"unit_size" : 2,
"center_value" : 0,
"number_scale_val" : 0.75,
"label_sc... | 31.817029 | 99 | 0.561275 | 115,176 | 0.997506 | 0 | 0 | 0 | 0 | 0 | 0 | 8,180 | 0.070845 |
02f4fc8fa710340e57d5ba18128bb096623e09a7 | 871 | py | Python | start_palpeo.py | RealDebian/Palpeo | 23be184831a3c529cf933277944e7aacda08cdad | [
"MIT"
] | null | null | null | start_palpeo.py | RealDebian/Palpeo | 23be184831a3c529cf933277944e7aacda08cdad | [
"MIT"
] | null | null | null | start_palpeo.py | RealDebian/Palpeo | 23be184831a3c529cf933277944e7aacda08cdad | [
"MIT"
] | null | null | null | from link_extractor import run_enumeration
from colorama import Fore
from utils.headers import HEADERS
from time import sleep
import requests
import database
import re
import json
from bs4 import BeautifulSoup
import colorama
print(Fore.GREEN + '-----------------------------------' + Fore.RESET, Fore.RED)
print('尸闩㇄尸㠪... | 24.194444 | 80 | 0.624569 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 267 | 0.302378 |
02f5826c6c30c33aa057a91cc4e4070320f7be69 | 4,994 | py | Python | tests/test_scores_das_01.py | wavestoweather/enstools | d0f612b0187b0ad54dfbbb78aa678564f46eaedf | [
"Apache-2.0"
] | 5 | 2021-12-16T14:08:00.000Z | 2022-03-02T14:08:10.000Z | tests/test_scores_das_01.py | wavestoweather/enstools | d0f612b0187b0ad54dfbbb78aa678564f46eaedf | [
"Apache-2.0"
] | null | null | null | tests/test_scores_das_01.py | wavestoweather/enstools | d0f612b0187b0ad54dfbbb78aa678564f46eaedf | [
"Apache-2.0"
] | null | null | null | import xarray
import numpy
from enstools.scores import DisplacementAmplitudeScore
def test_embed_image():
"""
test of embed_image from match_pyramide_ic
"""
# create test image
test_im = xarray.DataArray(numpy.random.randn(5, 3))
# new array should have shape (8, 4)
result = DisplacementA... | 33.293333 | 119 | 0.665999 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,059 | 0.212054 |
02f6d5351b6d28ac6a5a83e1bce309686a5a07fc | 833 | py | Python | src/backend/backend/shopit/migrations/0024_auto_20201028_2008.py | tejpratap545/E-Commerce-Application | c1aada5d86f231e5acd6ba4c6c9b88ff4b351f7a | [
"MIT"
] | null | null | null | src/backend/backend/shopit/migrations/0024_auto_20201028_2008.py | tejpratap545/E-Commerce-Application | c1aada5d86f231e5acd6ba4c6c9b88ff4b351f7a | [
"MIT"
] | 7 | 2021-08-13T23:05:47.000Z | 2022-02-27T10:23:46.000Z | src/backend/backend/shopit/migrations/0024_auto_20201028_2008.py | tejpratap545/E-Commerce-Application | c1aada5d86f231e5acd6ba4c6c9b88ff4b351f7a | [
"MIT"
] | null | null | null | # Generated by Django 3.1.2 on 2020-10-28 14:38
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('shopit', '0023_availablefilterselectoptions_value'),
]
operations = [
migrations.RemoveField(
model_name='productinfo',
... | 26.03125 | 80 | 0.57503 | 740 | 0.888355 | 0 | 0 | 0 | 0 | 0 | 0 | 180 | 0.216086 |
02f729610f64d4759bc9416f6b95eedcf29070ca | 1,804 | py | Python | aoc/event2019/day19/solve.py | rjbatista/AoC | 5c6ca4bcb376c24ec730eb12fd7044f5326ee473 | [
"MIT"
] | null | null | null | aoc/event2019/day19/solve.py | rjbatista/AoC | 5c6ca4bcb376c24ec730eb12fd7044f5326ee473 | [
"MIT"
] | null | null | null | aoc/event2019/day19/solve.py | rjbatista/AoC | 5c6ca4bcb376c24ec730eb12fd7044f5326ee473 | [
"MIT"
] | null | null | null | from event2019.day13.computer_v4 import Computer_v4
########
# PART 1
computer = Computer_v4([])
computer.load_code("event2019/day19/input.txt")
def get_value(x, y):
out = []
computer.reload_code()
computer.run([x, y], out)
return out[0]
def get_area(side = 50):
area = []
min_x, width = 0... | 21.73494 | 114 | 0.471729 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 233 | 0.129157 |
02f79e3624d623adc544da46b4a6554d6c1bfa3b | 849 | py | Python | fileo/accounts/forms.py | Tiqur/Fileo | 0c663f3bb28985d2d7b4cb475a95b1592cfb2013 | [
"MIT"
] | null | null | null | fileo/accounts/forms.py | Tiqur/Fileo | 0c663f3bb28985d2d7b4cb475a95b1592cfb2013 | [
"MIT"
] | null | null | null | fileo/accounts/forms.py | Tiqur/Fileo | 0c663f3bb28985d2d7b4cb475a95b1592cfb2013 | [
"MIT"
] | null | null | null | from django import forms
from django.contrib.auth import authenticate
from django.contrib.auth.forms import UserCreationForm
from .models import FileoUser
User = FileoUser()
class UserLoginForm(forms.ModelForm):
password = forms.CharField(label='Password', widget=forms.PasswordInput)
class Meta:
mode... | 29.275862 | 82 | 0.69258 | 661 | 0.778563 | 0 | 0 | 0 | 0 | 0 | 0 | 125 | 0.147232 |
02f7dfdc4c7be780ca3def3290b1d78bbe909246 | 959 | py | Python | setup.py | jnsgruk/lightkube-models | 7fce1ed1d00ee599eaa4fad82868ec6b55c84c8d | [
"MIT"
] | 1 | 2021-10-14T08:49:10.000Z | 2021-10-14T08:49:10.000Z | setup.py | jnsgruk/lightkube-models | 7fce1ed1d00ee599eaa4fad82868ec6b55c84c8d | [
"MIT"
] | 2 | 2021-10-14T18:09:31.000Z | 2021-10-14T18:09:52.000Z | setup.py | jnsgruk/lightkube-models | 7fce1ed1d00ee599eaa4fad82868ec6b55c84c8d | [
"MIT"
] | 1 | 2021-10-13T15:08:58.000Z | 2021-10-13T15:08:58.000Z | from setuptools import setup
from pathlib import Path
from lightkube.models import __version__
setup(
name='lightkube-models',
version=__version__,
description='Models and Resources for lightkube module',
long_description=Path("README.md").read_text(),
long_description_content_type="text/markdown... | 33.068966 | 60 | 0.667362 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 542 | 0.565172 |
02f8318053016bd127b7feb86e89f4c704276dce | 465 | py | Python | kagi/upper/west/_capital/four.py | jedhsu/kagi | 1301f7fc437bb445118b25ca92324dbd58d6ad2d | [
"MIT"
] | null | null | null | kagi/upper/west/_capital/four.py | jedhsu/kagi | 1301f7fc437bb445118b25ca92324dbd58d6ad2d | [
"MIT"
] | null | null | null | kagi/upper/west/_capital/four.py | jedhsu/kagi | 1301f7fc437bb445118b25ca92324dbd58d6ad2d | [
"MIT"
] | null | null | null | """
*Upper-West Capital 4* ⠨
The upper-west capital four gi.
"""
from dataclasses import dataclass
from ....._gi import Gi
from ....capital import CapitalGi
from ...._gi import StrismicGi
from ....west import WesternGi
from ...._number import FourGi
from ..._gi import UpperGi
__all__ = ["UpperWestCapital4... | 15 | 33 | 0.668817 | 128 | 0.27409 | 0 | 0 | 139 | 0.297645 | 0 | 0 | 104 | 0.222698 |
02f87c91bee648002483bc9254e7698d4ec9f8f2 | 5,626 | py | Python | tests/test_dictattr.py | atsuoishimoto/jashin | 6705839461dd9fdfe50cbc6f93fe9ba2da889f0a | [
"MIT"
] | 1 | 2020-06-04T23:44:48.000Z | 2020-06-04T23:44:48.000Z | tests/test_dictattr.py | sojin-project/jashin | 6705839461dd9fdfe50cbc6f93fe9ba2da889f0a | [
"MIT"
] | null | null | null | tests/test_dictattr.py | sojin-project/jashin | 6705839461dd9fdfe50cbc6f93fe9ba2da889f0a | [
"MIT"
] | null | null | null | import enum
from typing import Any, Dict
from jashin.dictattr import *
def test_dictattr() -> None:
class Test:
field1 = ItemAttr[str]()
field2 = ItemAttr[str](name="field_2")
field3 = ItemAttr[str](default="default_field3")
def __dictattr_get__(self) -> Dict[str, Any]:
... | 24.25 | 80 | 0.545325 | 1,763 | 0.313367 | 0 | 0 | 0 | 0 | 0 | 0 | 814 | 0.144685 |
02f8b65e136d03ceacb32c0a454b3d2ad573a0cb | 191 | py | Python | acmicpc/5612.py | juseongkr/BOJ | 8f10a2bf9a7d695455493fbe7423347a8b648416 | [
"Apache-2.0"
] | 7 | 2020-02-03T10:00:19.000Z | 2021-11-16T11:03:57.000Z | acmicpc/5612.py | juseongkr/Algorithm-training | 8f10a2bf9a7d695455493fbe7423347a8b648416 | [
"Apache-2.0"
] | 1 | 2021-01-03T06:58:24.000Z | 2021-01-03T06:58:24.000Z | acmicpc/5612.py | juseongkr/Algorithm-training | 8f10a2bf9a7d695455493fbe7423347a8b648416 | [
"Apache-2.0"
] | 1 | 2020-01-22T14:34:03.000Z | 2020-01-22T14:34:03.000Z | n = int(input())
m = int(input())
r = m
for i in range(n):
a, b = map(int, input().split())
m += a
m -= b
if m < 0:
print(0)
exit()
r = max(r, m)
print(r)
| 14.692308 | 36 | 0.418848 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
02f9422687e1cf10a5083c7345c12d1a45915872 | 66,679 | py | Python | tests/function/test_func_partition.py | ddimatos/zhmc-ansible-modules | 6eb29056052f499021a4bab26539872b25050640 | [
"Apache-2.0"
] | null | null | null | tests/function/test_func_partition.py | ddimatos/zhmc-ansible-modules | 6eb29056052f499021a4bab26539872b25050640 | [
"Apache-2.0"
] | null | null | null | tests/function/test_func_partition.py | ddimatos/zhmc-ansible-modules | 6eb29056052f499021a4bab26539872b25050640 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2017-2020 IBM Corp. 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 require... | 36.238587 | 79 | 0.558182 | 43,848 | 0.657598 | 0 | 0 | 40,581 | 0.608602 | 0 | 0 | 24,955 | 0.374256 |
02f942ae72f558610fdbd2e0d719bb8a1bc37d6c | 1,849 | py | Python | users/models.py | uoe-compsci-grp30/campusgame | d2d7ba99210f352a7b45a1db06cea0a09e3b8c31 | [
"MIT"
] | null | null | null | users/models.py | uoe-compsci-grp30/campusgame | d2d7ba99210f352a7b45a1db06cea0a09e3b8c31 | [
"MIT"
] | null | null | null | users/models.py | uoe-compsci-grp30/campusgame | d2d7ba99210f352a7b45a1db06cea0a09e3b8c31 | [
"MIT"
] | null | null | null | import uuid
from django.contrib.auth.models import AbstractUser
from django.db import models
"""
The user model that represents a user participating in the game.
Implemented using the built-in Django user model: AbstractUser.
"""
class User(AbstractUser):
""" The User class that represents a user that has crea... | 52.828571 | 449 | 0.760411 | 1,610 | 0.870741 | 0 | 0 | 0 | 0 | 0 | 0 | 1,202 | 0.650081 |
02fa655762a8c5f87ff87bed426342d23902e763 | 4,743 | py | Python | slidingwindow_generator/slidingwindow_generator.py | flashspys/SlidingWindowGenerator | bdcefd9506732ea9c9734bd4e8e81a884b78f08c | [
"Apache-2.0"
] | 3 | 2021-03-27T12:50:36.000Z | 2022-01-16T15:30:22.000Z | slidingwindow_generator/slidingwindow_generator.py | flashspys/SlidingWindowGenerator | bdcefd9506732ea9c9734bd4e8e81a884b78f08c | [
"Apache-2.0"
] | 3 | 2020-10-07T05:28:46.000Z | 2020-11-05T08:32:01.000Z | slidingwindow_generator/slidingwindow_generator.py | flashspys/SlidingWindowGenerator | bdcefd9506732ea9c9734bd4e8e81a884b78f08c | [
"Apache-2.0"
] | 1 | 2020-11-08T23:39:20.000Z | 2020-11-08T23:39:20.000Z | import numpy as np
import tensorflow as tf
class SlidingWindowGenerator:
def __init__(self, input_width, label_width, shift,
train_df, val_df, test_df,
label_columns=None):
# Store raw data with dataframe type
self.train_df = train_df
self.val_df = val_df
... | 37.346457 | 79 | 0.59709 | 4,735 | 0.990379 | 0 | 0 | 0 | 0 | 0 | 0 | 1,357 | 0.283832 |
02fb4db8ebfb72289be41e8479130a4d82ec14a9 | 1,737 | py | Python | carla/util.py | dixantmittal/intelligent-autonomous-vehicle-controller | 7ccebabe8ecb972780a492c36f48ef8f1671be71 | [
"MIT"
] | 1 | 2019-12-18T06:23:19.000Z | 2019-12-18T06:23:19.000Z | carla/util.py | dixantmittal/intelligent-autonomous-vehicle-controller | 7ccebabe8ecb972780a492c36f48ef8f1671be71 | [
"MIT"
] | null | null | null | carla/util.py | dixantmittal/intelligent-autonomous-vehicle-controller | 7ccebabe8ecb972780a492c36f48ef8f1671be71 | [
"MIT"
] | null | null | null | # Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma de
# Barcelona (UAB), and the INTEL Visual Computing Lab.
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
import datetime
import sys
from contextlib import contextmanage... | 28.016129 | 80 | 0.663788 | 274 | 0.157743 | 321 | 0.184801 | 337 | 0.194013 | 0 | 0 | 385 | 0.221647 |
02fc1e3721895fe496443e7ceaa950d900683542 | 3,002 | py | Python | examples/session2-fi/start2.py | futurice/PythonInBrowser | 066ab28ffad265efc7968b87f33dab2c68216d9d | [
"MIT"
] | 4 | 2015-12-08T19:34:49.000Z | 2019-09-08T22:11:05.000Z | examples/session2-fi/start2.py | futurice/PythonInBrowser | 066ab28ffad265efc7968b87f33dab2c68216d9d | [
"MIT"
] | 18 | 2016-10-14T13:48:39.000Z | 2019-10-11T12:14:21.000Z | examples/session2-fi/start2.py | futurice/PythonInBrowser | 066ab28ffad265efc7968b87f33dab2c68216d9d | [
"MIT"
] | 4 | 2015-11-18T15:18:43.000Z | 2018-03-02T09:36:23.000Z | # Käydään läpi mitä opimme viime viikolla (ja myös jotakin uutta)
# Jos jokin asia mietityttää, kysy vain rohkeasti apua!
##### INFO #####
# Viime viikon tärkeimmät asiat olivat:
# 1. print-komento
# 2. muuttujan käyttö
# 3. kilpikonnan käyttäminen piirtämiseen
# Ohelmointi vaatii usein tiedon etsimistä muista lähtei... | 37.525 | 110 | 0.758161 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,112 | 0.975243 |
02fcd2548a49becf32a01085ecf16e34635af225 | 32,807 | py | Python | train.py | EdwardLeeMacau/PFFNet | dfa6e45062627ce6ab7a1b1a37bada5cccae7167 | [
"MIT"
] | null | null | null | train.py | EdwardLeeMacau/PFFNet | dfa6e45062627ce6ab7a1b1a37bada5cccae7167 | [
"MIT"
] | null | null | null | train.py | EdwardLeeMacau/PFFNet | dfa6e45062627ce6ab7a1b1a37bada5cccae7167 | [
"MIT"
] | null | null | null | """
FileName [ train.py ]
PackageName [ PFFNet ]
Synopsis [ Train the model ]
Usage:
>>> python train.py --normalized --cuda
"""
import argparse
import os
import shutil
from datetime import date
import matplotlib
import numpy as np
import pandas as pd
import torch
import torchvision
import torchvi... | 33.648205 | 140 | 0.572073 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10,195 | 0.310757 |
02fe1589d692043102c05d5d014222183830f3c7 | 45,373 | py | Python | clients/python/core_pb2.py | cloudwheels/grpc-test-gateway | 5fe6564804cc1dfd2761138977d9282519b8ffc6 | [
"MIT"
] | 3 | 2020-05-01T15:27:18.000Z | 2020-05-28T15:11:34.000Z | clients/python/core_pb2.py | cloudwheels/grpc-test-gateway | 5fe6564804cc1dfd2761138977d9282519b8ffc6 | [
"MIT"
] | null | null | null | clients/python/core_pb2.py | cloudwheels/grpc-test-gateway | 5fe6564804cc1dfd2761138977d9282519b8ffc6 | [
"MIT"
] | 3 | 2020-09-15T17:24:52.000Z | 2021-07-07T10:01:25.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: core.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflecti... | 42.885633 | 2,847 | 0.760518 | 7,037 | 0.155092 | 0 | 0 | 0 | 0 | 0 | 0 | 14,506 | 0.319706 |
02fe97635bdf12eb93fa73109a7854ea036f69bf | 546 | py | Python | python_high/chapter_3/3.1.py | Rolling-meatballs/deepshare | 47c1e599c915ccd0a123fa9ab26e1f20738252ef | [
"MIT"
] | null | null | null | python_high/chapter_3/3.1.py | Rolling-meatballs/deepshare | 47c1e599c915ccd0a123fa9ab26e1f20738252ef | [
"MIT"
] | null | null | null | python_high/chapter_3/3.1.py | Rolling-meatballs/deepshare | 47c1e599c915ccd0a123fa9ab26e1f20738252ef | [
"MIT"
] | null | null | null | name = " alberT"
one = name.rsplit()
print("one:", one)
two = name.index('al', 0)
print("two:", two)
three = name.index('T', -1)
print("three:", three)
four = name.replace('l', 'p')
print("four:", four)
five = name.split('l')
print("five:", five)
six = name.upper()
print("six:", six)
seven = name.lower()
print("... | 14.756757 | 29 | 0.598901 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 0.210623 |
02feb42fde4ca975bc72c9c78d9e0931c5f1d4a2 | 384 | py | Python | src/views/simplepage/models.py | svenvandescheur/svenv.nl-new | c448714853d96ad31d26c825d8b35c4890be40a1 | [
"MIT"
] | null | null | null | src/views/simplepage/models.py | svenvandescheur/svenv.nl-new | c448714853d96ad31d26c825d8b35c4890be40a1 | [
"MIT"
] | null | null | null | src/views/simplepage/models.py | svenvandescheur/svenv.nl-new | c448714853d96ad31d26c825d8b35c4890be40a1 | [
"MIT"
] | null | null | null | from cms.extensions import PageExtension
from cms.extensions.extension_pool import extension_pool
from django.utils.translation import ugettext as _
from filer.fields.image import FilerImageField
class SimplePageExtension(PageExtension):
"""
A generic website page.
"""
image = FilerImageField(verbose_... | 25.6 | 56 | 0.796875 | 138 | 0.359375 | 0 | 0 | 0 | 0 | 0 | 0 | 46 | 0.119792 |
f301917c422d9318495feced737c153caa8bd9a9 | 290 | py | Python | baekjoon/not-classified/10844/10844.py | honux77/algorithm | 2ed8cef1fbee7ad96d8f2ae583666d52bd8892ee | [
"MIT"
] | 2 | 2019-02-08T01:23:07.000Z | 2020-11-19T12:23:52.000Z | baekjoon/not-classified/10844/10844.py | honux77/algorithm | 2ed8cef1fbee7ad96d8f2ae583666d52bd8892ee | [
"MIT"
] | null | null | null | baekjoon/not-classified/10844/10844.py | honux77/algorithm | 2ed8cef1fbee7ad96d8f2ae583666d52bd8892ee | [
"MIT"
] | null | null | null | n = int(input())
s = [[0] * 10 for _ in range(n + 1)]
s[1] = [0] + [1] * 9
mod = 1000 ** 3
for i in range(2, n + 1):
for j in range(0, 9 + 1):
if j >= 1:
s[i][j] += s[i - 1][j - 1]
if j <= 8:
s[i][j] += s[i - 1][j + 1]
print(sum(s[n]) % mod) | 19.333333 | 38 | 0.358621 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f302cba30df57e2c4fa0a9201628774e666043a8 | 3,021 | py | Python | Ideas/cricket-umpire-assistance-master/visualization/test2.py | hsspratt/Nott-Hawkeye1 | 178f4f0fef62e8699f6057d9d50adfd61a851047 | [
"MIT"
] | null | null | null | Ideas/cricket-umpire-assistance-master/visualization/test2.py | hsspratt/Nott-Hawkeye1 | 178f4f0fef62e8699f6057d9d50adfd61a851047 | [
"MIT"
] | 1 | 2021-11-11T22:15:36.000Z | 2021-11-11T22:15:36.000Z | Ideas/cricket-umpire-assistance-master/visualization/test2.py | hsspratt/Nott-Hawkeye1 | 178f4f0fef62e8699f6057d9d50adfd61a851047 | [
"MIT"
] | null | null | null | ### INITIALIZE VPYTHON
# -----------------------------------------------------------------------
from __future__ import division
from visual import *
from physutil import *
from visual.graph import *
### SETUP ELEMENTS FOR GRAPHING, SIMULATION, VISUALIZATION, TIMING
# -------------------------------------------------... | 32.138298 | 98 | 0.589209 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,813 | 0.600132 |
f3041c623ca233066149adf01d25baef21dbb909 | 727 | py | Python | parking_systems/models.py | InaraShalfei/parking_system | f1b326f12037808ab80e3b1d6b305235ba59a0db | [
"MIT"
] | null | null | null | parking_systems/models.py | InaraShalfei/parking_system | f1b326f12037808ab80e3b1d6b305235ba59a0db | [
"MIT"
] | null | null | null | parking_systems/models.py | InaraShalfei/parking_system | f1b326f12037808ab80e3b1d6b305235ba59a0db | [
"MIT"
] | null | null | null | from django.db import models
class Parking(models.Model):
def __str__(self):
return f'Парковочное место №{self.id}'
class Reservation(models.Model):
parking_space = models.ForeignKey(Parking, on_delete=models.CASCADE, related_name='reservations',
verbose_name='... | 33.045455 | 119 | 0.671252 | 783 | 0.957213 | 0 | 0 | 0 | 0 | 0 | 0 | 338 | 0.413203 |
f30518d94f19b9e7816aaf41734cf24e7b19c736 | 4,875 | py | Python | sktime/classification/kernel_based/_rocket_classifier.py | ltoniazzi/sktime | 0ea07803115c1ec7463dde99f049b131d639f4a7 | [
"BSD-3-Clause"
] | 1 | 2021-11-02T18:56:12.000Z | 2021-11-02T18:56:12.000Z | sktime/classification/kernel_based/_rocket_classifier.py | ltoniazzi/sktime | 0ea07803115c1ec7463dde99f049b131d639f4a7 | [
"BSD-3-Clause"
] | null | null | null | sktime/classification/kernel_based/_rocket_classifier.py | ltoniazzi/sktime | 0ea07803115c1ec7463dde99f049b131d639f4a7 | [
"BSD-3-Clause"
] | 1 | 2021-04-30T08:12:18.000Z | 2021-04-30T08:12:18.000Z | # -*- coding: utf-8 -*-
"""RandOm Convolutional KErnel Transform (ROCKET)."""
__author__ = "Matthew Middlehurst"
__all__ = ["ROCKETClassifier"]
import numpy as np
from sklearn.linear_model import RidgeClassifierCV
from sklearn.pipeline import make_pipeline
from sklearn.utils.multiclass import class_distribution
from... | 30.85443 | 84 | 0.611487 | 4,345 | 0.891282 | 0 | 0 | 0 | 0 | 0 | 0 | 2,755 | 0.565128 |
f3052e2208b42e9e168f9e6bcc11e27d4f1b41d3 | 9,922 | py | Python | mc/opcodes.py | iximeow/binja-m16c | debf368e5df90a96d6c8b0bc128626a9d6834bb4 | [
"0BSD"
] | 12 | 2020-01-15T00:51:06.000Z | 2021-10-02T12:45:50.000Z | mc/opcodes.py | iximeow/binja-m16c | debf368e5df90a96d6c8b0bc128626a9d6834bb4 | [
"0BSD"
] | 2 | 2020-02-03T08:26:26.000Z | 2020-07-01T19:51:44.000Z | mc/opcodes.py | iximeow/binja-m16c | debf368e5df90a96d6c8b0bc128626a9d6834bb4 | [
"0BSD"
] | 4 | 2020-02-03T07:51:12.000Z | 2021-02-14T19:13:07.000Z | import re
from . import tables
from .instr import Instruction
from .instr.nop import *
from .instr.alu import *
from .instr.bcd import *
from .instr.bit import *
from .instr.flag import *
from .instr.mov import *
from .instr.smov import *
from .instr.ld_st import *
from .instr.stack import *
from .instr.jmp import *
f... | 28.429799 | 99 | 0.621951 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,723 | 0.375227 |
f30593af5391112f0f58041cdf450a938ae282be | 797 | py | Python | class16.py | SamratAdhikari/Python_class_files | 47053e39b81c0d8f7485790fea8711aa25727caf | [
"MIT"
] | null | null | null | class16.py | SamratAdhikari/Python_class_files | 47053e39b81c0d8f7485790fea8711aa25727caf | [
"MIT"
] | null | null | null | class16.py | SamratAdhikari/Python_class_files | 47053e39b81c0d8f7485790fea8711aa25727caf | [
"MIT"
] | null | null | null | # import calculate
# import calculate as cal
# from calculate import diff as df
# from calculate import *
# print(cal.pi)
# pi = 3.1415
# print(diff(5,2))
# print(pi)
# print(calculate.pi)
# print(calculate.sum(3))
# print(calculate.div(2,1))
# print(abs(-23.21))
# print(math.ceil(5.23))
# print(dir(math))
# # print(... | 20.435897 | 43 | 0.604768 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 408 | 0.51192 |
f30618f542da8cbd2c4223847a99725100131374 | 901 | py | Python | hsir/law.py | WenjieZ/wuhan-pneumonia | 3d26955daa2deedec57cdd3effb3118531bbea7f | [
"BSD-3-Clause"
] | 6 | 2020-01-26T07:33:41.000Z | 2020-02-25T22:15:43.000Z | hsir/law.py | WenjieZ/wuhan-pneumonia | 3d26955daa2deedec57cdd3effb3118531bbea7f | [
"BSD-3-Clause"
] | 2 | 2020-02-17T16:12:50.000Z | 2020-02-29T21:31:17.000Z | hsir/law.py | WenjieZ/wuhan-pneumonia | 3d26955daa2deedec57cdd3effb3118531bbea7f | [
"BSD-3-Clause"
] | 1 | 2020-03-07T00:13:05.000Z | 2020-03-07T00:13:05.000Z | from abc import ABCMeta, abstractmethod
import numpy as np
__all__ = ['Law', 'Bin', 'Poi', 'Gau']
class Law(metaclass=ABCMeta):
@staticmethod
@abstractmethod
def sample(n, d):
pass
@staticmethod
@abstractmethod
def loglikely(n, d, k):
pass
@staticmethod
def likeli... | 20.022222 | 89 | 0.54828 | 785 | 0.871254 | 0 | 0 | 226 | 0.250832 | 0 | 0 | 54 | 0.059933 |
f30640fd7966c16ad8a70aa7a32537803f35f977 | 3,172 | py | Python | src/dummy/toga_dummy/widgets/canvas.py | Donyme/toga | 2647c7dc5db248025847e3a60b115ff51d4a0d4a | [
"BSD-3-Clause"
] | null | null | null | src/dummy/toga_dummy/widgets/canvas.py | Donyme/toga | 2647c7dc5db248025847e3a60b115ff51d4a0d4a | [
"BSD-3-Clause"
] | null | null | null | src/dummy/toga_dummy/widgets/canvas.py | Donyme/toga | 2647c7dc5db248025847e3a60b115ff51d4a0d4a | [
"BSD-3-Clause"
] | null | null | null | import re
from .base import Widget
class Canvas(Widget):
def create(self):
self._action('create Canvas')
def set_on_draw(self, handler):
self._set_value('on_draw', handler)
def set_context(self, context):
self._set_value('context', context)
def line_width(self, width=2.0):
... | 31.72 | 165 | 0.573455 | 3,133 | 0.987705 | 0 | 0 | 0 | 0 | 0 | 0 | 587 | 0.185057 |
f30707b9e83fba3280f410223a1fd7949422e724 | 164 | py | Python | rpncalc/exceptions.py | newmanrs/rpncalc | 8663e5221efd78c12889b6db4eda20821b27d52a | [
"MIT"
] | null | null | null | rpncalc/exceptions.py | newmanrs/rpncalc | 8663e5221efd78c12889b6db4eda20821b27d52a | [
"MIT"
] | 11 | 2021-11-10T04:28:51.000Z | 2022-02-25T05:19:22.000Z | rpncalc/exceptions.py | newmanrs/rpncalc | 8663e5221efd78c12889b6db4eda20821b27d52a | [
"MIT"
] | null | null | null | class RpnCalcError(Exception):
"""Calculator Generic Exception"""
pass
class StackDepletedError(RpnCalcError):
""" Stack is out of items """
pass
| 18.222222 | 39 | 0.682927 | 160 | 0.97561 | 0 | 0 | 0 | 0 | 0 | 0 | 63 | 0.384146 |
f3075ca7074510343a47f280f9ff997c85f925fa | 3,815 | py | Python | tests/unit/schemas/test_base_schema_class.py | gamechanger/dusty | dd9778e3a4f0c623209e53e98aa9dc1fe76fc309 | [
"MIT"
] | 421 | 2015-06-02T16:29:59.000Z | 2021-06-03T18:44:42.000Z | tests/unit/schemas/test_base_schema_class.py | gamechanger/dusty | dd9778e3a4f0c623209e53e98aa9dc1fe76fc309 | [
"MIT"
] | 404 | 2015-06-02T20:23:42.000Z | 2019-08-21T16:59:41.000Z | tests/unit/schemas/test_base_schema_class.py | gamechanger/dusty | dd9778e3a4f0c623209e53e98aa9dc1fe76fc309 | [
"MIT"
] | 16 | 2015-06-16T17:21:02.000Z | 2020-03-27T02:27:09.000Z | from unittest import TestCase
from schemer import Schema, Array, ValidationException
from dusty.schemas.base_schema_class import DustySchema, DustySpecs
from ...testcases import DustyTestCase
class TestDustySchemaClass(TestCase):
def setUp(self):
self.base_schema = Schema({'street': {'type': basestring},... | 42.865169 | 96 | 0.636173 | 3,616 | 0.947837 | 0 | 0 | 0 | 0 | 0 | 0 | 782 | 0.20498 |
f309247f76f7d18c28aea4b2f1973377cd29af7f | 5,470 | py | Python | Objected-Oriented Systems/Python_OOP_SDA/Task1.py | syedwaleedhyder/Freelance_Projects | 7e2b85fc968850fc018014667b5ce9af0f00cb09 | [
"MIT"
] | 1 | 2020-08-13T17:26:13.000Z | 2020-08-13T17:26:13.000Z | Objected-Oriented Systems/Python_OOP_SDA/Task1.py | syedwaleedhyder/Freelance_Projects | 7e2b85fc968850fc018014667b5ce9af0f00cb09 | [
"MIT"
] | null | null | null | Objected-Oriented Systems/Python_OOP_SDA/Task1.py | syedwaleedhyder/Freelance_Projects | 7e2b85fc968850fc018014667b5ce9af0f00cb09 | [
"MIT"
] | null | null | null | from abc import ABCMeta, abstractmethod, abstractproperty
from datetime import datetime, date
class Item(metaclass=ABCMeta):
def __init__(self, code, name, quantity, cost, offer):
self.item_code=code
self.item_name=name
self.quantity_on_hand=quantity
self.cost_price=cost
sel... | 31.988304 | 233 | 0.609506 | 4,270 | 0.780622 | 0 | 0 | 700 | 0.127971 | 0 | 0 | 1,162 | 0.212431 |
f30949586393ae32e93e9cb38a2df996aa7486fd | 1,116 | py | Python | compose/production/mongodb_backup/scripts/list_dbs.py | IMTEK-Simulation/mongodb-backup-container-image | b0e04c03cab9321d6b4277ee88412938fec95726 | [
"MIT"
] | null | null | null | compose/production/mongodb_backup/scripts/list_dbs.py | IMTEK-Simulation/mongodb-backup-container-image | b0e04c03cab9321d6b4277ee88412938fec95726 | [
"MIT"
] | null | null | null | compose/production/mongodb_backup/scripts/list_dbs.py | IMTEK-Simulation/mongodb-backup-container-image | b0e04c03cab9321d6b4277ee88412938fec95726 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
host = 'mongodb'
port = 27017
ssl_ca_cert='/run/secrets/rootCA.pem'
ssl_certfile='/run/secrets/tls_cert.pem'
ssl_keyfile='/run/secrets/tls_key.pem'
# don't turn these signal into exceptions, just die.
# necessary for integrating into bash script pipelines seamlessly.
import signal
signal.signal(... | 27.9 | 74 | 0.750896 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 496 | 0.444444 |
f309f375f4df1f396c2fac2fda0007631441102b | 1,087 | py | Python | host.py | KeePinnnn/social_media_analytic | d13580c7dcfc87699bf42c0f870fefccc2f4c78b | [
"MIT"
] | 1 | 2019-09-13T13:08:28.000Z | 2019-09-13T13:08:28.000Z | host.py | KeePinnnn/social_media_analytic | d13580c7dcfc87699bf42c0f870fefccc2f4c78b | [
"MIT"
] | null | null | null | host.py | KeePinnnn/social_media_analytic | d13580c7dcfc87699bf42c0f870fefccc2f4c78b | [
"MIT"
] | null | null | null | from flask import Flask, send_from_directory, request, Response, render_template, jsonify
from test import demo
import subprocess
import os
app = Flask(__name__, static_folder='static')
@app.route('/')
def home():
return "hello world"
@app.route('/detector')
def detector():
return send_from_directory(app.s... | 26.512195 | 89 | 0.620055 | 0 | 0 | 0 | 0 | 831 | 0.764489 | 0 | 0 | 190 | 0.174793 |
f30ad04d785ff96d12b9344dbb04adb8373f99e0 | 5,985 | py | Python | venv/lib/python3.6/site-packages/torch/_jit_internal.py | databill86/HyperFoods | 9267937c8c70fd84017c0f153c241d2686a356dd | [
"MIT"
] | 2 | 2020-09-30T00:11:09.000Z | 2021-10-04T13:00:38.000Z | venv/lib/python3.6/site-packages/torch/_jit_internal.py | databill86/HyperFoods | 9267937c8c70fd84017c0f153c241d2686a356dd | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/torch/_jit_internal.py | databill86/HyperFoods | 9267937c8c70fd84017c0f153c241d2686a356dd | [
"MIT"
] | null | null | null | """
The weak_script annotation needs to be here instead of inside torch/jit/ so it
can be used in other places in torch/ (namely torch.nn) without running into
circular dependency problems
"""
import weakref
import inspect
try:
import builtins # PY3
except Exception:
import __builtin__ as builtins # PY2
# T... | 29.628713 | 92 | 0.671846 | 499 | 0.083375 | 0 | 0 | 0 | 0 | 0 | 0 | 2,626 | 0.438764 |
f30afc0871d71087c3fea4199baf57d7f3c9c853 | 706 | py | Python | examples/qiushi.py | qDonl/Spider | ec7e7519b173b004314fc41cf1a65c2a662eb8d5 | [
"Unlicense"
] | null | null | null | examples/qiushi.py | qDonl/Spider | ec7e7519b173b004314fc41cf1a65c2a662eb8d5 | [
"Unlicense"
] | null | null | null | examples/qiushi.py | qDonl/Spider | ec7e7519b173b004314fc41cf1a65c2a662eb8d5 | [
"Unlicense"
] | null | null | null | import re, requests
def parse_page(url):
headers = {
'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36"
}
response = requests.get(url, headers=headers)
text = response.content.decode("utf-8")
contents = re.finda... | 30.695652 | 138 | 0.589235 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 252 | 0.356941 |
f30c9db8e27b84a58028614e5f7dd98149676ac3 | 4,267 | py | Python | benchmark/python/benchmark/benchmark_main.py | toschmidt/pg-cv | 897909fdb2a7824137f2128c6bd98151f6ed3cf4 | [
"MIT"
] | 3 | 2021-03-19T04:52:26.000Z | 2021-09-13T14:11:44.000Z | benchmark/python/benchmark/benchmark_main.py | toschmidt/pg-cv | 897909fdb2a7824137f2128c6bd98151f6ed3cf4 | [
"MIT"
] | null | null | null | benchmark/python/benchmark/benchmark_main.py | toschmidt/pg-cv | 897909fdb2a7824137f2128c6bd98151f6ed3cf4 | [
"MIT"
] | null | null | null | from benchmark_query import BenchmarkQuery
from clear import ClearViews, ClearQuery, ClearPublic
from compare_query import CompareQuery
from database import Database
from setup import SetupPublic, SetupViews, SetupQuery
from timing import Timing
# remove all possible side effects of a query
def clear_query(db: Databa... | 33.865079 | 85 | 0.644715 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,200 | 0.281228 |
f30dee16b7aab145441edae420bc159552e96a76 | 3,787 | py | Python | nelpy/plotting/decoding.py | shayokdutta/nelpy_modified | 8f3bd505beed570bfe917ed0a7f1d8c13f31b69a | [
"MIT"
] | null | null | null | nelpy/plotting/decoding.py | shayokdutta/nelpy_modified | 8f3bd505beed570bfe917ed0a7f1d8c13f31b69a | [
"MIT"
] | null | null | null | nelpy/plotting/decoding.py | shayokdutta/nelpy_modified | 8f3bd505beed570bfe917ed0a7f1d8c13f31b69a | [
"MIT"
] | null | null | null | __all__ = ['plot_cum_error_dist']
import numpy as np
# import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.patches as patches
from mpl_toolkits.axes_grid.inset_locator import inset_axes
import itertools
from . import palettes
# colors = itertools.cycle(npl.palettes.color_palette(palette="sweet",... | 32.930435 | 125 | 0.601532 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 930 | 0.245577 |
f30ee9cbdc128ebb414011f1922779899d37a824 | 77 | py | Python | code/abc122_a_01.py | KoyanagiHitoshi/AtCoder | 731892543769b5df15254e1f32b756190378d292 | [
"MIT"
] | 3 | 2019-08-16T16:55:48.000Z | 2021-04-11T10:21:40.000Z | code/abc122_a_01.py | KoyanagiHitoshi/AtCoder | 731892543769b5df15254e1f32b756190378d292 | [
"MIT"
] | null | null | null | code/abc122_a_01.py | KoyanagiHitoshi/AtCoder | 731892543769b5df15254e1f32b756190378d292 | [
"MIT"
] | null | null | null | b=input()
print("A" if b=="T" else "T" if b=="A" else "G" if b=="C" else "C") | 38.5 | 67 | 0.506494 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 21 | 0.272727 |
f30f0fecb3a5195d2294443d51e5048fb142c4a9 | 847 | py | Python | setup.py | carrasquel/wikipit | b8d2f870406eef866f68a4f7e5caca5398a671c2 | [
"MIT"
] | 1 | 2020-05-17T14:53:23.000Z | 2020-05-17T14:53:23.000Z | setup.py | carrasquel/wikipit | b8d2f870406eef866f68a4f7e5caca5398a671c2 | [
"MIT"
] | 1 | 2020-05-18T21:58:06.000Z | 2020-05-18T21:58:06.000Z | setup.py | carrasquel/wikipit | b8d2f870406eef866f68a4f7e5caca5398a671c2 | [
"MIT"
] | 1 | 2020-05-17T18:15:48.000Z | 2020-05-17T18:15:48.000Z | """Setup specifications for gitignore project."""
from os import path
from setuptools import setup
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name="wikipit",
... | 24.911765 | 75 | 0.662338 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 358 | 0.422668 |
f31108a183ca826267db22b5fdc9dd872d8b503e | 1,469 | py | Python | samples.py | daimeng/py-geode | a4146804e4def71a6b430e5a16f6e0b1a65deefe | [
"MIT"
] | null | null | null | samples.py | daimeng/py-geode | a4146804e4def71a6b430e5a16f6e0b1a65deefe | [
"MIT"
] | 9 | 2018-11-15T00:44:11.000Z | 2019-03-01T02:52:34.000Z | samples.py | daimeng/py-geode | a4146804e4def71a6b430e5a16f6e0b1a65deefe | [
"MIT"
] | null | null | null | import aiohttp
import time
import ujson
import asyncio
import prettyprinter
import numpy as np
import pandas as pd
from geode.dispatcher import AsyncDispatcher
prettyprinter.install_extras(include=['dataclasses'])
pd.set_option('display.float_format', '{:.4f}'.format)
async def main():
client = await AsyncDispa... | 27.203704 | 76 | 0.538462 | 0 | 0 | 0 | 0 | 0 | 0 | 1,142 | 0.7774 | 408 | 0.27774 |
f3126093965615fe8a8564523762df648831f740 | 171 | py | Python | functional_tests.py | idanmel/soccer_friends | db370c384e99308c5f6a39a18eac1556b83cc786 | [
"MIT"
] | null | null | null | functional_tests.py | idanmel/soccer_friends | db370c384e99308c5f6a39a18eac1556b83cc786 | [
"MIT"
] | null | null | null | functional_tests.py | idanmel/soccer_friends | db370c384e99308c5f6a39a18eac1556b83cc786 | [
"MIT"
] | null | null | null | from selenium import webdriver
browser = webdriver.Firefox()
browser.get('http://localhost:8000')
try:
assert 'Django' in browser.title
finally:
browser.close()
| 17.1 | 36 | 0.730994 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 31 | 0.181287 |
f3128d3872baa827767bd09bf278c2956175ee90 | 963 | py | Python | lorenzsj/blog/views.py | lorenzsj/lorenzsj | 631c6632f8fe70a021836c52aafd8746e13fc8a8 | [
"MIT"
] | null | null | null | lorenzsj/blog/views.py | lorenzsj/lorenzsj | 631c6632f8fe70a021836c52aafd8746e13fc8a8 | [
"MIT"
] | null | null | null | lorenzsj/blog/views.py | lorenzsj/lorenzsj | 631c6632f8fe70a021836c52aafd8746e13fc8a8 | [
"MIT"
] | null | null | null | from django.contrib.auth.models import User
from rest_framework import viewsets
from rest_framework import permissions
from rest_framework.response import Response
from blog.models import Post
from blog.serializers import PostSerializer
from blog.serializers import UserSerializer
from blog.permissions import IsAuthor... | 31.064516 | 74 | 0.764278 | 627 | 0.65109 | 0 | 0 | 0 | 0 | 0 | 0 | 182 | 0.188993 |
f3133d707d13f1d41040304efdb1e48fd46e0e3f | 4,270 | py | Python | src/piminder_service/resources/db_autoinit.py | ZAdamMac/pyminder | 059f57cb7cea4f517f77b1bbf391ce99f25d83bb | [
"MIT"
] | null | null | null | src/piminder_service/resources/db_autoinit.py | ZAdamMac/pyminder | 059f57cb7cea4f517f77b1bbf391ce99f25d83bb | [
"MIT"
] | 3 | 2021-05-05T21:08:24.000Z | 2021-06-23T10:47:40.000Z | src/piminder_service/resources/db_autoinit.py | ZAdamMac/pyminder | 059f57cb7cea4f517f77b1bbf391ce99f25d83bb | [
"MIT"
] | null | null | null | """
This script is a component of Piminder's back-end controller.
Specifically, it is a helper utility to be used to intialize a database for the user and message tables.
Author: Zac Adam-MacEwen ([email protected])
An Arcana Labs utility.
Produced under license.
Full license and documentation to be found at:
htt... | 31.865672 | 111 | 0.646136 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,269 | 0.531382 |
f314e1c52a7971b18107dd68a650e6479dbddda8 | 7,455 | py | Python | conftest.py | jirikuncar/renku-python | 69df9ea1d5db3c63fd2ea3537c7e46d079360c8f | [
"Apache-2.0"
] | null | null | null | conftest.py | jirikuncar/renku-python | 69df9ea1d5db3c63fd2ea3537c7e46d079360c8f | [
"Apache-2.0"
] | null | null | null | conftest.py | jirikuncar/renku-python | 69df9ea1d5db3c63fd2ea3537c7e46d079360c8f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2017 - Swiss Data Science Center (SDSC)
# A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and
# Eidgenössische Technische Hochschule Zürich (ETHZ).
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compli... | 27.921348 | 78 | 0.643997 | 777 | 0.104155 | 4,399 | 0.589678 | 6,474 | 0.867828 | 0 | 0 | 2,232 | 0.299196 |
f315277c03047d954514d2d9908c6f026aae74fa | 624 | py | Python | kuchinawa/Logger.py | threemeninaboat3247/kuchinawa | 81094e358e4dad9529a15fa526f2307caaceb82e | [
"MIT"
] | 4 | 2017-11-29T04:14:19.000Z | 2022-01-21T13:00:23.000Z | kuchinawa/Logger.py | threemeninaboat3247/kuchinawa | 81094e358e4dad9529a15fa526f2307caaceb82e | [
"MIT"
] | 3 | 2018-05-07T14:49:29.000Z | 2018-05-08T11:49:17.000Z | kuchinawa/Logger.py | threemeninaboat3247/kuchinawa | 81094e358e4dad9529a15fa526f2307caaceb82e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""" --- Description ---
Module:
Logger.py
Abstract:
A module for logging
Modified:
threemeninaboat3247 2018/04/30
--- End ---
"""
# Standard library imports
import logging
logger = logging.getLogger('Kuchinawa Log')
# ログレベルの設定
logger.setLevel(1... | 20.129032 | 81 | 0.674679 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 446 | 0.626404 |
f3159c44193bd89a772b6f2bca9dbffb2ffaa8bc | 5,933 | py | Python | test/search/capacity.py | sbutler/spotseeker_server | 02bd2d646eab9f26ddbe8536b30e391359796c9c | [
"Apache-2.0"
] | null | null | null | test/search/capacity.py | sbutler/spotseeker_server | 02bd2d646eab9f26ddbe8536b30e391359796c9c | [
"Apache-2.0"
] | null | null | null | test/search/capacity.py | sbutler/spotseeker_server | 02bd2d646eab9f26ddbe8536b30e391359796c9c | [
"Apache-2.0"
] | null | null | null | """ Copyright 2012, 2013 UW Information Technology, University of Washington
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 r... | 36.398773 | 98 | 0.532783 | 4,878 | 0.822181 | 0 | 0 | 4,953 | 0.834822 | 0 | 0 | 1,321 | 0.222653 |
f3163b561595dcd3e021c0a5f070a6337bbb8499 | 1,745 | py | Python | model/k1_clustering_pre-processing.py | not-a-hot-dog/spotify_project | b928fecb136cffdd62c650b054ca543047800f11 | [
"MIT"
] | null | null | null | model/k1_clustering_pre-processing.py | not-a-hot-dog/spotify_project | b928fecb136cffdd62c650b054ca543047800f11 | [
"MIT"
] | 1 | 2019-12-08T17:23:49.000Z | 2019-12-08T17:23:49.000Z | model/k1_clustering_pre-processing.py | not-a-hot-dog/spotify_project | b928fecb136cffdd62c650b054ca543047800f11 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
from model.helper_functions import build_playlist_features
print('Reading data into memory')
pid_list = np.genfromtxt('../data/train_pids.csv', skip_header=1, dtype=int)
playlistfile = '../data/playlists.csv'
playlist_df = pd.read_csv(playlistfile)
trackfile = '../data/songs_1000... | 52.878788 | 117 | 0.837249 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 495 | 0.283668 |
f3166c7800fb37b00a35784025071d85b46a881a | 731 | py | Python | app/main/__init__.py | a2hsh/udacity-fsnd-capstone | 545f78111784756f469127bcb4a656306a7fe242 | [
"MIT"
] | null | null | null | app/main/__init__.py | a2hsh/udacity-fsnd-capstone | 545f78111784756f469127bcb4a656306a7fe242 | [
"MIT"
] | null | null | null | app/main/__init__.py | a2hsh/udacity-fsnd-capstone | 545f78111784756f469127bcb4a656306a7fe242 | [
"MIT"
] | null | null | null | # routes Blueprint
from flask import Blueprint, jsonify, request, redirect, render_template
from flask_cors import CORS
from os import environ
# initializing the blueprint
main = Blueprint('main', __name__)
CORS(main, resources={r'*': {'origins': '*'}})
@main.after_request
def after_request(response):
... | 31.782609 | 73 | 0.675787 | 0 | 0 | 0 | 0 | 402 | 0.549932 | 0 | 0 | 273 | 0.373461 |
f316cbca5e61cde2ebe07f8eb9690a7626e13407 | 497 | py | Python | agenda/tests/test_models.py | migueleichler/django-tdd | 5b8bd6088b5e2de4d70026b761391bce3aa52f32 | [
"MIT"
] | null | null | null | agenda/tests/test_models.py | migueleichler/django-tdd | 5b8bd6088b5e2de4d70026b761391bce3aa52f32 | [
"MIT"
] | null | null | null | agenda/tests/test_models.py | migueleichler/django-tdd | 5b8bd6088b5e2de4d70026b761391bce3aa52f32 | [
"MIT"
] | null | null | null | from django.test import TestCase
from agenda.models import Compromisso
from model_mommy import mommy
class CompromissoModelTest(TestCase):
def setUp(self):
self.instance = mommy.make('Compromisso')
def test_string_representation(self):
self.assertEqual(str(self.instance), self.instance.titu... | 27.611111 | 75 | 0.750503 | 392 | 0.788732 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 0.026157 |
f31b214b07d8c2680f0f9e730882cb62c105cf97 | 1,868 | py | Python | tests/test_crypto/test_registry/test_misc.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | tests/test_crypto/test_registry/test_misc.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | tests/test_crypto/test_registry/test_misc.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2022 Valory AG
# Copyright 2018-2020 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# ... | 31.133333 | 85 | 0.599036 | 0 | 0 | 0 | 0 | 796 | 0.426124 | 0 | 0 | 1,133 | 0.606531 |